query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Create a new controller instance.
public function __construct() { $this->middleware('guest')->except('logout'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82678324", "0.8173564", "0.78118384", "0.7706353", "0.76816905", "0.7659159", "0.74858105", "0.7406485", "0.7298472", "0.7253435", "0.7196091", "0.7174443", "0.7016074", "0.6989523", "0.69837826", "0.69728553", "0.69640046", "0.69357765", "0.6897687", "0.689282", "0.68775725", "0.6868809", "0.68633306", "0.6839021", "0.6779905", "0.6705274", "0.6670987", "0.66623807", "0.6652613", "0.6643801", "0.6616729", "0.66143125", "0.65891534", "0.6449129", "0.64461046", "0.6429425", "0.6426337", "0.63015336", "0.6298573", "0.6294075", "0.62801653", "0.6259914", "0.62554234", "0.6167662", "0.61630553", "0.61601174", "0.6141946", "0.6137726", "0.6134302", "0.6133732", "0.61287725", "0.6110795", "0.60950965", "0.6089703", "0.60768735", "0.6066286", "0.60595477", "0.6055387", "0.60451794", "0.6028352", "0.60246956", "0.60228956", "0.6019088", "0.6012698", "0.6011448", "0.60113615", "0.60076576", "0.6004189", "0.5998927", "0.5997798", "0.5993557", "0.59863526", "0.59863526", "0.59863526", "0.59706056", "0.59546155", "0.59493065", "0.5940633", "0.59251904", "0.59143347", "0.5913916", "0.59121555", "0.59111917", "0.5909761", "0.59026676", "0.59009403", "0.5899209", "0.58973104", "0.58964044", "0.58933777", "0.5888429", "0.58760023", "0.5869122", "0.5863149", "0.58622074", "0.5849116", "0.5838678", "0.5831741", "0.5824525", "0.58167094", "0.58122987" ]
0.0
-1
Show the application's login form.
public function showLoginForm(Request $request) { $data = []; if (($company_name = $request->company) != null) { // Search company name from api $response = Http::get(env('API_URL') . '/api/v1/company?name=' . $company_name); $body = collect(json_decode($response->body(), true)); $data['company'] = $body; $data['title'] = $body->isEmpty() ? null : $body['name']; } return view('auth.login', compact('data')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showLogin()\n\t{\n\t\t// show the form\n\t \treturn View::make('login');\n\t}", "private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}", "public function showLoginForm()\n\t{\n\t\treturn view('auth.login');\n\t}", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "public function showLoginForm()\n {\n $this->data['title'] = trans('backpack::base.login'); // set the page title\n\n return view('backpack::auth.login', $this->data);\n }", "public function showLoginForm()\n\t{\n\t\t// Remembering Login\n\t\tif (auth()->viaRemember()) {\n\t\t\treturn redirect()->intended($this->redirectTo);\n\t\t}\n\t\t\n\t\t// Meta Tags\n\t\tMetaTag::set('title', getMetaTag('title', 'login'));\n\t\tMetaTag::set('description', strip_tags(getMetaTag('description', 'login')));\n\t\tMetaTag::set('keywords', getMetaTag('keywords', 'login'));\n\t\t\n\t\treturn appView('auth.login');\n\t}", "public function showLoginForm()\n {\n\n /** set session refferrer */\n $this->setPreviousUrl();\n\n /** @var String $title */\n $this->title = __(\"admin.pages_login_title\");\n /** @var String $content */\n $this->template = 'Admin::Auth.login';\n\n /**render output*/\n return $this->renderOutput();\n }", "public function getShowLoginPage()\n {\n echo $this->blade->render(\"login\", [\n 'signer' => $this->signer,\n ]);\n }", "public function showLoginForm()\n {\n return view('hub::auth.login');\n }", "public function showLoginForm()\n {\n return view('ui.pages.login');\n }", "public function _showForm()\n\t{\n\t\t$this->registry->output->setTitle( \"Log In\" );\n\t\t$this->registry->output->setNextAction( 'index&do=login' );\n\t\t$this->registry->output->addContent( $this->registry->legacy->fetchLogInForm() );\n\t\t$this->registry->output->sendOutput();\n\t\texit();\n\t}", "public function showLoginForm()\n {\n return view('adminlte::auth.login');\n }", "public function showLoginForm()\n {\n $this->data['title'] = trans('back-project::base.login'); // set the page title\n return view('back-project::auth.login', $this->data);\n }", "public function showForm()\n\t{\n echo view($this->config->views['login']);\n\t}", "public function showLoginForm()\n {\n return view('blog::admin.pages.auth.login');\n }", "public function showLoginForm()\n {\n return view('auth::login');\n }", "public function showLoginForm()\n {\n $form = \\FormBuilder::create(LoginUserForm::class);\n\n return view('account::auth.login', compact('form'));\n }", "public function showLoginForm()\n {\n return view('shopper::pages.auth.login');\n }", "public function showLoginForm()\n {\n $view = 'cscms::frontend.default.auth.login';\n if (View::exists(config('cscms.coderstudios.theme').'.auth.login')) {\n $view = config('cscms.coderstudios.theme').'.auth.login';\n }\n\n return view($view);\n }", "public function showLoginForm()\n {\n return view('admin.auth.login');\n }", "public function showLoginForm()\n {\n return view('admin.auth.login');\n }", "public function showLoginForm()\n {\n return view('admin.auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function showLoginForm()\n {\n return view('auth.login',[\n 'title' => 'Connexion à l\\'espace d\\'administration',\n 'loginRoute' => 'backend.login',\n 'forgotPasswordRoute' => 'backend.password.request',\n ]);\n }", "public function showLoginForm()\n {\n return view('auth.magic-login');\n }", "public function showLoginForm()\n {\n if(Agent::isTable() || Agent::isMobile()){\n return view('errors.desktop-only');\n }\n else{\n return view('auth.login');\n }\n }", "public function showLoginForm()\n\t{\n\t\treturn view('auth.organizer.login');\n\t}", "public function showLoginForm()\n {\n\n return view('auth.login');\n }", "public function showLogin() {\n if (isAuth()) {\n Flash::set(\"You're already logged in!\", 'info');\n $this->redirect($this->url('LoginHome'));\n }\n $active = 'login';\n $this\n ->setTitle('Login')\n ->add('active', $active)\n ->show('login/login');\n }", "public function showLoginForm()\n {\n return view('operator.login');\n }", "public function showLoginForm()\n {\n return view('pages.superAdmin.login');\n }", "public function showLoginForm()\n {\n \n if (\\Auth::check()) {\n return redirect()->route('eventmie.welcome');\n }\n return Eventmie::view('eventmie::auth.login');\n }", "public function showLoginForm()\n {\n return view('user.login');\n }", "public function showLoginForm()\n {\n return view('estagiarios.auth.login');\n }", "public function showLoginForm()\n {\n return view('guestAuth.login');\n }", "public function showLoginForm()\n {\n return view('admin.login');\n }", "public function showLoginForm()\n {\n return view('admin.login');\n }", "public function showLoginForm()\n {\n return view('admin.login');\n }", "public function showLoginForm()\n {\n return view('admin.login');\n }", "function Login()\n {\n $this->view->ShowLogin();\n }", "public function showLoginForm()\n {\n return view('admin::auth.login',[\n 'title' => 'Admin Login',\n 'loginRoute' => route('dashboard.login'),\n 'forgotPasswordRoute' => 'dashboard.password.request',\n ]);\n }", "public function showLogin()\n\t{\n\t\treturn View::make('login');\n\t}", "public function login()\n {\n $this->renderView('login');\n }", "public function showAdminLoginForm()\n {\n $title = Lang::get('admin.ca_login');\n return view('admin.login', compact('title'));\n }", "public function showLoginForm()\n {\n return view('auth.login');\n }", "public function login()\n {\n $this->set('title', 'Login');\n $this->render('login');\n }", "public function showLoginForm()\n {\n if (Auth::viaRemember()) {\n return redirect()->intended('dashboard');\n }\n return view(\"auth.login\");\n }", "public function index()\r\n\t{\r\n\t\t$this->viewloader(\"auth/loginform\");\r\n\t\t\r\n\t}", "public function showLogin()\n {\n return View::make('auth.login');\n }", "public function showLogin(){\n $this->data['pagetitle'] = \"Login\";\n $this->data['page'] = 'login';\n // $this->data['pagecontent'] = 'login';\n $this->data['pagebody'] = 'login';\n \n $this->render();\n }", "public function login()\n\t{\n\t\treturn view(\"auth/login\", [\n\t\t\t'title' => \"Login\"\n\t\t]);\n\t}", "public function showLogin() {\n return View::make('user.login');\n }", "public function formLogin() {\n $this->view->addForm();\n }", "public function loginAction()\n {\n // Instantiate the form that asks the user to log in.\n $form = new Application_Form_LoginForm();\n\n // Initialize the error message to be empty.\n $this->view->formResponse = '';\n\n // For security purposes, only proceed if this is a POST request.\n if ($this->getRequest()->isPost())\n {\n // Process the filled-out form that has been posted:\n // if the input values are valid, attempt to authenticate.\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n if ( $this->_authenticate($formData) )\n {\n $this->_helper->redirector('index', 'index');\n }\n }\n }\n\n // Render the view.\n $this->view->form = $form;\n }", "public function showTutorLoginForm()\n {\n $title = Lang::get('admin.ca_login');\n return view('tutor.login', compact('title'));\n }", "public function getLoginForm()\n {\n $incorrect = \\Session::pull('login.incorrect');\n\n $this->nav('navbar.logged.out.login');\n $this->title('navbar.logged.out.login');\n\n return $this->view('auth.login', compact('incorrect'));\n }", "public function showLoginForm()\n {\n return view('index');\n }", "function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\t\t\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_default.tpl');\n\t}", "public function showloginform()\n {\n return view('tsadmin.adminloginform');\n }", "public function showLoginForm()\n { \n return view('auth.showLoginForm');\n }", "public function showLogin()\n\t{\n return View::make('login');\n\t}", "public function showLoginPage()\n {\n return view('auth.login');\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login.twig', [\n 'model' => $model,\n ]);\n }\n }", "public function showLogin()\n\t{\n if (\\Auth::check())\n {\n // Redirect to homepage\n return \\Redirect::route('dashboard');\n }\n\n // Show the login page\n\t\treturn \\View::make('front.login');\n\t}", "public function logInPage() {\n $view = new View('login');\n $view->generate();\n }", "function showLoginForm() {\n}", "public function actionLogin()\n\t{\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n $signup_model = new SignupForm();\n $login_model = new LoginForm();\n \n return $this->render('login', [\n 'login_model' => $login_model,\n 'signup_model' => $signup_model, 'modal' => true\n ]);\n\t}", "public function showLoginForm()\n { \n if (Auth::user()) {\n return redirect('/admin/dashboard');\n }\n \n return view('index.login');\n }", "public function showLogin()\n {\n if (Auth::check())\n {\n // Show Index\n return Redirect::to('/');\n }\n // Show Login\n return View::make('login');\n }", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->redirect([ 'site/index' ]);\n }\n $referer = \\Yii::$app->request->get('referer', \\Yii::$app->request->referrer);\n if (empty( $referer )) {\n $referer = Url::to([ 'cabinet/main' ], true);\n }\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return Yii::$app->getResponse()\n ->redirect($referer);\n } else {\n return $this->render(\n 'login',\n [\n 'model' => $model,\n ]\n );\n }\n }", "public function showLoginForm(): Response\n {\n return $this->render('login.html');\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->redirect(['site/account']);\n }\n\n $model = new LoginForm();\n\n if (Yii::$app->request->isPost) {\n $postData = Yii::$app->request->post();\n\n if ($model->load($postData) && $model->login()) {\n return $this->redirect(['site/account']);\n }\n }\n\n $model->password = '';\n\n return $this->render('login', [\n 'model' => $model,\n ]);\n }", "public function Login()\n\t{\n\t\t$form = new CForm(array('name'=>'loginForm', 'action'=>$this->request->CreateUrl('user/login')), array(\n\t\t\t'acronym' \t\t=> new CFormElementText('acronym', array(\n\t\t\t\t'label'\t\t=> 'Acronym or email:',\n\t\t\t\t'type'\t\t=> 'text',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'password'\t\t=> new CFormElementPassword('password', array(\n\t\t\t\t'label'\t\t=> 'Password:',\n\t\t\t\t'type'\t\t=> 'password',\n\t\t\t\t)\n\t\t\t),\n\t\t\tnew CFormElementSubmit('doLogin', array(\n\t\t\t\t'value'\t\t=> 'Login',\n\t\t\t\t'type'\t\t=> 'submit',\n\t\t\t\t'callback'\t=> array($this, 'DoLogin')\n\t\t\t\t)\n\t\t\t),\n\t\t));\n\t\t\n\t\t$form->SetValidation('acronym',array('not_empty'));\n\t\t$form->SetValidation('password',array('not_empty'));\n\t\t\n\t\t$form->Check();\n\n\t\t$this->views->SetTitle('Login');\n\t\t$this->views->AddView('user/login.tpl.php', array(\n\t\t\t'login_form'\t\t=> $form->GetHTML(),\n\t\t\t'allow_create_user'\t=> $this->config['create_new_users'],\n\t\t\t),\n\t\t'primary'\n\t\t);\n\t}", "public function actionLogin()\n {\n $this->layout = '/login';\n $manager = new Manager(['userId' => UsniAdaptor::app()->user->getId()]);\n $userFormDTO = new UserFormDTO();\n $model = new LoginForm();\n $postData = UsniAdaptor::app()->request->post();\n $userFormDTO->setPostData($postData);\n $userFormDTO->setModel($model);\n if (UsniAdaptor::app()->user->isGuest)\n {\n $manager->processLogin($userFormDTO);\n if($userFormDTO->getIsTransactionSuccess())\n {\n return $this->goBack();\n }\n }\n else\n {\n return $this->redirect($this->resolveDefaultAfterLoginUrl());\n }\n return $this->render($this->loginView,['userFormDTO' => $userFormDTO]);\n }", "public function showLogin(){\n\t\t\t\n\t\t\t//Verificamos si ya esta autenticado\n\t\t\tif(Auth::check()){\n\n\t\t\t\t//Si esta autenticado lo mandamos a la raiz, el inicio\n\t\t\t\treturn Redirect::to('/');\n\t\t\t} else {\n\n\t\t\t\t//Si no lo mandamos al formulario de login\n\t\t\t\treturn View::make('login');\n\n\t\t\t}\n\t\t}", "public function actionLogin()\n\t{\n\t\t$form=new LoginForm;\n\t\t// collect user input data\n\t\tif(isset($_POST['LoginForm']))\n\t\t{\n\t\t\t$form->attributes=$_POST['LoginForm'];\n\t\t\t// validate user input and redirect to previous page if valid\n\t\t\tif($form->validate())\n\t\t\t\t$this->redirect(Yii::app()->user->returnUrl);\n\t\t}\n\t\t// display the login form\n\t\t$this->render('login',array('form'=>$form));\n\t}", "public function showLogin() {\n\t\treturn View::make('login/login')->with('error', '');\n\t}", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n //return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n //return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function login()\n\t{\n\t\treturn View::make('auth.login');\n\t}", "public function showLoginForm() {\n $url = url('../') . '/portal/login';\n return Redirect::to($url);\n }", "public function showLoginForm(): View\n {\n return view('auth.login');\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function actionLogin() {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login() && $model->validate()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\n\t\t// TODO: pull this from a config area\n\t\t$server = 'localhost';\n\t\t$port = '10389';\n\t\t$default_dn = 'cn=William Bush,ou=people,o=sevenSeas';\n\t\t$tpl->assign('server', $server);\n\t\t$tpl->assign('port', $port);\n\t\t$tpl->assign('default_dn', $default_dn);\n\t\t\n\t\t// display login form\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_ldap.tpl');\n\t}", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!\\Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function loginForm()\n {\n return view('login');\n }", "public function login()\n\t{\n\t\t$this->layout->content = View::make('login.login');\n\t}", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }", "public function actionLogin()\n {\n if (!Yii::$app->user->isGuest) {\n return $this->goHome();\n }\n\n $model = new LoginForm();\n if ($model->load(Yii::$app->request->post()) && $model->login()) {\n return $this->goBack();\n } else {\n return $this->render('login', [\n 'model' => $model,\n ]);\n }\n }" ]
[ "0.8195479", "0.8184714", "0.81353784", "0.8114367", "0.8106355", "0.8087322", "0.80029774", "0.79896617", "0.7967813", "0.79508567", "0.79352325", "0.7924134", "0.7901801", "0.78818923", "0.78473926", "0.7842989", "0.78256094", "0.7800776", "0.77962434", "0.7777558", "0.7777558", "0.7777558", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7737047", "0.7718073", "0.7713825", "0.77121496", "0.77109325", "0.7701632", "0.76938844", "0.76911926", "0.76841027", "0.76649404", "0.76548326", "0.76434505", "0.764228", "0.76310635", "0.76310635", "0.76310635", "0.76310635", "0.76003623", "0.7570066", "0.7563254", "0.7557227", "0.7551454", "0.7548312", "0.75171715", "0.7495362", "0.74649376", "0.7447624", "0.74347454", "0.743267", "0.7421023", "0.7393693", "0.7383633", "0.737965", "0.7372955", "0.73616844", "0.7358818", "0.735267", "0.7350887", "0.73256296", "0.73214614", "0.73140866", "0.73073065", "0.7300327", "0.72964346", "0.7295574", "0.7294269", "0.7282752", "0.7277177", "0.7264378", "0.7263998", "0.7262814", "0.7262336", "0.7261748", "0.72444725", "0.7240734", "0.72373515", "0.72372574", "0.7237158", "0.7234796", "0.72317404", "0.7226313", "0.7223567", "0.72232443", "0.72232443", "0.72161657", "0.7215002", "0.721392", "0.721392", "0.721392", "0.721392", "0.721392", "0.721392" ]
0.0
-1
Handle a login request to the application.
public function login(Request $request) { // Validate the input $this->validateLogin($request); // Check the employee user from API $response = Http::post(env('API_URL', 'http://localhost:8000') . '/api/v2/auth/login-employee', $request->all()); $res = json_decode($response->body()); // Return error if unathorized if ($error = $res->error ?? false) return back() ->withInput($request->only('email')) ->withErrors($error); // Return response and pass token to cookie return redirect(route('admin.home')) ->with('message', 'Login Success') ->withCookie(cookie('token', $res->access_token, $res->expires_in)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleLogin( ){\n\t\t// Filter allowed data\n\t\t$data = Request::only([ 'uid', 'password' ]);\n\n\t\t// Validate user input\n\t\t$validator = Validator::make(\n\t\t\t$data,\n\t\t\t[\n\t\t\t\t'uid' => 'required',\n\t\t\t\t'password' => 'required',\n\t\t\t]\n\t\t);\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$data[$key] = $this->sanitizeLDAP( $value );\n\t\t}\n\n\t\tif($validator->fails()){\n\t\t\t// If validation fails, send back with errors\n\t\t\treturn Redirect::route('login')->withErrors( $validator )->withInput( );\n\t\t}\n\n\t\tif( Auth::attempt( [ 'uid' => $data['uid'], 'password' => $data['password']], true ) ){\n\t\t\t// If login is successful, send them to home\n\t\t\treturn Redirect::route( 'home' );\n\t\t} else {\n\t\t\t// Otherwise, tell them they're wrong\n\t\t\treturn Redirect::route( 'login' )\n\t\t\t\t\t\t ->withErrors([ \n\t\t\t\t\t\t\t\t'message' => 'I\\'m sorry, that username and password aren\\'t correct.' \n\t\t\t\t\t\t\t]);\n\t\t}\n\n\t\treturn Redirect::route( 'login' )->withInput( );\n\t}", "public static function handle_login() {\n $params = $_POST;\n $player = Player::authenticate($params['username'], $params['password']);\n if(!$player) {\n View::make('player/login.html', array('error' => 'Väärä käyttäjätunnus tai salasana.', 'username' => $params['username']));\n } else {\n $_SESSION['user'] = $player->id;\n\n Redirect::to('/', array('message' => 'Kirjautunut käyttäjänä ' . $player->username));\n }\n }", "public function onLogin(Request $request)\n {\n $username = $request->input('username');\n $password = $request->input('password');\n \n // save posted data in user data object model\n $user = new UserModel(-1, $username, $password);\n \n // call security buesiness service\n $service = new SecurityService(); \n $status = $service->login($user);\n \n // render a failed or passed response view and pass the user model in passed view\n if($status)\n {\n $data = ['model' => $user];\n return view('loginPassed')->with($data);\n }\n else \n {\n return view('loginFailed');\n }\n }", "protected function loginIfRequested() {}", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function processLogin()\n {\n $user = $this->post['user'];\n\n // Run the form validation\n $errors = $this->validateLogin($user);\n\n // If the form is valid, check the login credentials and\n // if valid log the user in otherwise display the form again.\n if (empty($errors)) {\n if ($this->authentication->login($user['email'], $user['password'])) {\n header('location: /admin/');\n return http_response_code();\n } else {\n $errors[] = 'Invalid login credentials';\n return $this->loginForm($errors);\n }\n } else {\n return $this->loginForm($errors);\n }\n }", "public static function login()\n {\n (new Authenticator(request()))->login();\n }", "public function loginAction() {\n $auth = $this->app->container[\"settings\"][\"auth\"];\n\n // Note: There is no point to check whether the user is authenticated, as there is no authentication\n // check for this route as defined in the config.yml file under the auth.passthrough parameter.\n\n $request = $this->app->request;\n $max_exptime = strtotime($auth[\"maxlifetime\"]);\n $default_exptime = strtotime($auth[\"lifetime\"]);\n $exptime = $default_exptime;\n\n if ( $request->isFormData() )\n {\n $username = $request->post(\"username\");\n $password = $request->post(\"password\");\n $exptime = self::getExpirationTime($request->post(\"expiration\"), $default_exptime, $max_exptime);\n }\n\n if ( preg_match(\"/^application\\\\/json/i\", $request->getContentType()) )\n {\n $json = json_decode($request->getBody(), true);\n if ( $json !== NULL )\n {\n $username = $json[\"username\"];\n $password = $json[\"password\"];\n $exptime = self::getExpirationTime(isset($json[\"expiration\"])?$json[\"expiration\"]:null, $default_exptime, $max_exptime);\n }\n }\n\n if ( empty($username) || empty($password) ) {\n $this->renderUnauthorized();\n return;\n }\n\n /**\n * @var \\PDO\n */\n $pdo = $this->app->getPDOConnection();\n $user = $pdo->select()\n ->from(\"tbl_user\")\n ->where(\"username\", \"=\", $username)\n ->where(\"password\", \"=\", sha1($password))\n ->where(\"status\", \">\", 0)\n ->execute()\n ->fetch();\n\n if ( empty($user) )\n {\n $this->renderUnauthorized();\n return;\n }\n\n $pdo->update(array(\"lastlogin_time\"=>gmdate(\"Y-m-d H:i:s\")))\n ->table(\"tbl_user\")\n ->where(\"id\", \"=\", $user[\"id\"])\n ->execute();\n\n $this->app->setAuthData(Factory::createAuthData($user, $exptime));\n\n $this->render(200);\n }", "public function postLoginAction()\n {\n //get input\n $inputs = $this->getPostInput();\n\n //define default\n $default = [\n 'status' => 'active'\n ];\n\n // Validate input\n $params = $this->myValidate->validateApi($this->userLogin, $default, $inputs);\n\n if (isset($params['validate_error']))\n {\n //Validate error\n return $this->responseError($params['validate_error'], '/users');\n }\n\n //process user login\n $result = $this->userService->checkLogin($params);\n\n //Check response error\n if (!$result['success'])\n {\n //process error\n return $this->responseError($result['message'], '/users');\n }\n\n //return data\n $encoder = $this->createEncoder($this->modelName, $this->schemaName);\n\n return $this->response($encoder, $result['data']);\n }", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "public function processLogin(): void;", "public function login(Request $request);", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "public function login() {\n $this->FormHandler->setRequired('employeeCode');\n $this->FormHandler->setRequired('employeePassword');\n\n\n if ($this->FormHandler->run() === true) {\n $employeeCode = $this->FormHandler->getPostValue('employeeCode');\n $employePassword = $this->FormHandler->getPostValue('employeePassword');\n if ($this->User->checkLoginCredentials($employeeCode, $employePassword) === true) {\n // Log them in and redirect\n $this->User->loginClient($_SESSION, $employeeCode);\n redirect('employee/dashboard');\n }\n }\n else if ($this->User->checkIfClientIsLoggedIn($_SESSION) === true) {\n redirect('employee/dashboard');\n }\n\n loadHeader();\n include APP_PATH . '/view/user/login.php';\n loadFooter();\n }", "public function handleLogin(){\n $username = htmlentities(trim($_POST['username']));\n $password = htmlentities(trim($_POST['password']));\n $loginSebagai = htmlentities(trim($_POST['login_sebagai']));\n\n $loginResult = WebDb::handleLogin($username,$password, $loginSebagai);\n\n if(!$loginResult) {\n Session::set(\"login_gagal\",\"Username atau password salah\");\n header(\"Location: /it-a\");\n die();\n }\n Session::set(\"user_id\",$username);\n Session::set(\"login_sebagai\",$loginSebagai);\n header(\"Location: /it-a/dashboard\");\n }", "public function postLogin()\n\t{\n\n\t\t$input = array(\n\t\t 'email' => \\Input::get( 'email' ),\n\t\t 'password' => \\Input::get( 'password' ),\n\t\t 'remember' => \\Input::get( 'remember' ),\n\t\t);\n\n\t\t// If you wish to only allow login from confirmed users, call logAttempt\n\t\t// with the second parameter as true.\n\t\t// logAttempt will check if the 'email' perhaps is the username.\n\t\tif ( \\Confide::logAttempt( $input, true ) ) \n\t\t{\n\t\t return \\Redirect::intended('/company'); \n\t\t}\n\t\telse\n\t\t{\n\t\t $user = new \\User;\n\n\t\t // Check if there was too many login attempts\n\t\t if( \\Confide::isThrottled( $input ) )\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.too_many_attempts');\n\t\t }\n\t\t elseif( $user->checkUserExists( $input ) and ! $user->isConfirmed( $input ) )\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.not_confirmed');\n\t\t }\n\t\t else\n\t\t {\n\t\t $err_msg = \\Lang::get('confide::confide.alerts.wrong_credentials');\n\t\t }\n\n\t\t return \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t ->withInput(\\Input::except('password'))\n\t\t ->with( 'error', $err_msg );\n\t\t}\n\n\t}", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "public function login()\n {\n /* validation requirement */\n $validator = $this->validation('login', request());\n\n if ($validator->fails()) {\n\n return $this->core->setResponse('error', $validator->messages()->first(), NULL, false , 400 );\n }\n\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n\n return $this->core->setResponse('error', 'Please check your email or password !', NULL, false , 400 );\n }\n\n return $this->respondWithToken($token, 'login');\n }", "public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function login()\n {\n if ($this->getCurrentUser()->get('id')) {\n $this->redirect($this->Auth->redirectUrl());\n }\n\n if ($user = $this->Auth->identify()) {\n $this->Auth->setUser($user);\n\n // set cookie\n if (!empty($this->getRequest()->getData('remember_me'))) {\n if ($CookieAuth = $this->Auth->getAuthenticate('Lil.Cookie')) {\n $CookieAuth->createCookie($this->getRequest()->getData());\n }\n }\n } else {\n if ($this->getRequest()->is('post') || env('PHP_AUTH_USER')) {\n $this->Flash->error(__d('lil', 'Invalid username or password, try again'));\n }\n }\n\n if ($this->getCurrentUser()->get('id')) {\n $redirect = $this->Auth->redirectUrl();\n $event = new Event('Lil.Auth.afterLogin', $this->Auth, [$redirect]);\n $this->getEventManager()->dispatch($event);\n\n return $this->redirect($redirect);\n }\n }", "private function login(){\n \n }", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "abstract protected function doLogin();", "public function postLogin()\n {\n if ($this->request->is('post')) {\n $input = $this->request->getData();\n // Check validate login of input data\n $validate = $this->Client->newEntity($input, ['validate' => 'login']);\n\n // Check this validate had error or not\n if ($validate->errors()) {\n $this->set($validate->errors());\n // Check login by account of Shop and redirect to Index page if success\n } else if ($shop = $this->Shop->checkLoginForShop($input) != null) {\n // Change to Model Shop to check authenticate.\n $this->Auth->config('authenticate', [\n 'Form' => ['userModel' => 'Shop']\n ]);\n\n $shop = $this->Auth->identify();\n $this->Auth->setUser($shop);\n\n return $this->redirect(['controller' => 'Pages', 'action' => 'index']);\n // Check login by account of Client and redirect to Index page if success\n } else if ($client = $this->Auth->identify()) {\n $this->Auth->setUser($client);\n return $this->redirect(['controller' => 'Pages', 'action' => 'home']);\n } else {\n $this->Flash->error('Username or password are not correct..');\n }\n $this->login();\n }\n }", "public function login()\n {\n\t\t$login = Input::get('login');\n\t\t$password = Input::get('password');\n\t\ttry{\n\t\t\n\t\t\t$user = Auth::authenticate([\n\t\t\t\t'login' => $login,\n\t\t\t\t'password' => $password\n\t\t\t]);\n\t\t\t$this->setToken($user);\n\t\t\treturn $this->sendResponse('You are now logged in');\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn $this->sendResponse($e->getMessage());\n\t\t}\n }", "function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}", "public function access() {\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n \t\t$user = Auth::login($_POST['email'], $_POST['pw']);\n \t\tif($user) {\n \t\t\tApp::redirect('dashboard');\n \t\t}\n\t\t\tSession::set('_old_input', $_POST);\n\t\t\tSession::set('_errors', ['login' => \"Email y/o password incorrectos.\"]);\n\t\t\tApp::redirect('login');\n\n \t}\n\n }", "public function postLogin() {\n\n\t\t// get input parameters\n\t\t//\n\t\t$username = Input::get('username');\n\t\t$password = Input::get('password');\n\n\t\t// validate user\n\t\t//\n\t\t$user = User::getByUsername($username);\n\t\tif ($user) {\n\t\t\tif (User::isValidPassword($password, $user->password)) {\n\t\t\t\tif ($user->hasBeenVerified()) {\n\t\t\t\t\tif ($user->isEnabled()) {\n\t\t\t\t\t\t$userAccount = $user->getUserAccount();\n\t\t\t\t\t\t$userAccount->penultimate_login_date = $userAccount->ultimate_login_date;\n\t\t\t\t\t\t$userAccount->ultimate_login_date = gmdate('Y-m-d H:i:s');\n\t\t\t\t\t\t$userAccount->save();\n\t\t\t\t\t\t$res = Response::json(array('user_uid' => $user->user_uid));\n\t\t\t\t\t\tSession::set('timestamp', time());\n\t\t\t\t\t\tSession::set('user_uid', $user->user_uid);\n\t\t\t\t\t\treturn $res;\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn Response::make('User has not been approved.', 401);\n\t\t\t\t} else\n\t\t\t\t\treturn Response::make('User email has not been verified.', 401);\n\t\t\t} else\n\t\t\t\treturn Response::make('Incorrect username or password.', 401);\n\t\t} else\n\t\t\treturn Response::make('Incorrect username or password.', 401);\n\n\t\t/*\n\t\t$credentials = array(\n\t\t\t'username' => $username,\n\t\t\t'password' => $password\n\t\t);\n\n\t\tif (Auth::attempt($credentials)) {\n\t\t\treturn Response::json(array(\n\t\t\t\t'user_uid' => $user->uid\n\t\t\t));\n\t\t} else\n\t\t\treturn Response::error('500');\n\t\t*/\n\t}", "public function loginAction()\n {\n // Instantiate the form that asks the user to log in.\n $form = new Application_Form_LoginForm();\n\n // Initialize the error message to be empty.\n $this->view->formResponse = '';\n\n // For security purposes, only proceed if this is a POST request.\n if ($this->getRequest()->isPost())\n {\n // Process the filled-out form that has been posted:\n // if the input values are valid, attempt to authenticate.\n $formData = $this->getRequest()->getPost();\n if ($form->isValid($formData))\n {\n if ( $this->_authenticate($formData) )\n {\n $this->_helper->redirector('index', 'index');\n }\n }\n }\n\n // Render the view.\n $this->view->form = $form;\n }", "protected function login()\n {\n $this->send(Response::nick($this->config['nick']));\n $this->send(Response::user(\n $this->config['nick'],\n $this->config['hostname'],\n $this->config['servername'],\n $this->config['realname']\n ));\n }", "public function loginUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n\n // Check email\n if (!$email) {\n $this->showLoginForm(['Please enter email']);\n }\n // Check password\n if (!$password) {\n $this->showLoginForm(['Please enter password']);\n }\n\n // Check user exist and then password\n $user = $this->getUser($email);\n $password = md5($password);\n if (!$user || $password !== $user['password']) {\n $this->showLoginForm(['Error on login']);\n }\n\n // Save login details to cookies\n if (!defined('APP_USERS_COOKIES_EMAIL')\n || !defined('APP_USERS_COOKIES_PASSWORD')) {\n $this->showLoginForm(['Error on login']);\n }\n setcookie(APP_USERS_COOKIES_EMAIL, $email);\n setcookie(APP_USERS_COOKIES_PASSWORD, $password);\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_login']);\n }", "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "public function processLogin(LoginRequest $request)\n {\n try {\n \n $remember = (bool) $request->get('remember', false);\n \n if (Sentinel::authenticate($request->all(), $remember)) {\n \n return redirect()->intended();\n }\n \n $errors = trans('sentinel.errors.credentials');\n \n }\n catch (NotActivatedException $e) {\n \n $errors = trans('sentinel.errors.activation'); \n }\n catch (ThrottlingException $e) {\n \n $errors = trans('sentinel.errors.throttle', ['delay' => $e->getDelay()]);\n }\n \n return redirect()->back()\n ->withInput()\n ->withErrors($errors);\n }", "public function login() {\n\t\tif(!empty(Session::get('http_response'))) {\n\t\t\thttp_response_code(Session::get('http_response'));\n\t\t\tSession::delete('http_response');\n\t\t}\n\t\tif($_POST && isset($_POST['login']) && isset($_POST['password'])) {\n\t\t\t$user = $this->_model->getLogin(strtolower($_POST['login']));\n\t\t\tif($user && $user->enabled) {\n\t\t\t\tif(hash_equals($user->password,crypt($_POST['password'],$user->password))) {\n\t\t\t\t\tif($user->blocked) {\n\t\t\t\t\t\thttp_response_code(403);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is blocked\"));\n\t\t\t\t\t} elseif($user->verified) {\n\t\t\t\t\t\tSession::set('user',$user);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'success','icon'=>'check','text'=>\"User has logged in successfully\"));\n\t\t\t\t\t\t$redirect = Session::get('login_redirect');\n\t\t\t\t\t\tRouter::redirect(Session::get('login_redirect'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\t\tSession::setMessage(array('alert'=>'warning','icon'=>'exclamation','text'=>\"User is not yet confirmed\"));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thttp_response_code(401);\n\t\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thttp_response_code(401);\n\t\t\t\tSession::setMessage(array('alert'=>'danger','icon'=>'ban','text'=>\"Invalid login name or password\"));\n\t\t\t}\t\n\t\t}\n\t}", "public function login()\n\t{\n\t\tif ($this->request->is('post')) {\n\n\t\t\t// If no parameter passed to login(), CakePHP automatically give the request params as parameters.\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->set('signInFail', true); // view vars\n\t\t\t}\n\t\t}\n\t}", "public function login($request)\n\t\t{\n\t\t\tif (isset($request->username) && isset($request->passphrase))\n\t\t\t\treturn $this->authenticate($request);\n\t\t}", "public function doLogin()\n {\n $rules = array(\n 'email' => 'required|email',\n 'password' => 'required|alphaNum|min:3'\n );\n \n // validate inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n \n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n return Redirect::to('/')\n ->withErrors($validator)\n ->withInput(Input::except('password'));\n } else {\n // create our user data for the authentication\n $userdata = array(\n 'email' => Input::get('email'),\n 'password' => Input::get('password')\n );\n \n // attempt to do the login\n $response = $this->requestLoginApi($userdata);\n\n if ($response->status == true) {\n // validation successful, save cookie!\n return Redirect::to('showsearch')\n ->withCookie(Cookie::make('accessToken', $response->data->accessToken, 60))\n ->with('message', 'Auth OK! (Token created)');\n \n } else {\n // validation fail, send back to login form\n return Redirect::to('/')\n ->withErrors(\"Invalid credentials\")\n ->withInput(Input::except('password'));\n }\n }\n }", "public function loginAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign in\"));\n\n $params['loginUsername'] = \"\";\n\n //handle login form\n if (!empty($_POST)){\n $error = true;\n\n $loginUsername = $_POST['loginUsername'];\n $params['loginUsername'] = $loginUsername;\n $password = $_POST['password'];\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateLoginUsername($loginUsername);\n $validator->validatePassword($password);\n\n //if valid\n if ($validator->isValid()){\n //find user from db\n $userManager = new UserManager();\n $user = $userManager->findByEmailOrUsername($loginUsername);\n\n //if user found\n if($user){\n\n// hash password\n $securityHelper = new SH();\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt());\n// $hashedPassword = bcrypt($password);\n\n //compare hashed passwords\n if ($hashedPassword === $user->getPassword()){\n //login\n $error = false;\n $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => '/skills'));\n $json->send();\n }\n }\n }\n if($error){\n $params['error']['global'] = _(\"You username/email and password do not match\");\n }\n }\n return view('auth.login',['params'=>$params]);\n// $view = new View(\"login.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }", "public function loginAction() {\n $auth = Zend_Auth::getInstance();\n\n if ($auth->hasIdentity()) {\n $this->_redirect($this->getUrl());\n }\n\n $request = $this->getRequest();\n\n $redirect = $request->getPost('redirect');\n if (strlen($redirect) == 0)\n $redirect = $request->getServer('REQUEST_URI');\n if (strlen($redirect) == 0)\n $redirect = $this->getUrl();\n\n $errors = array();\n\n if ($request->isPost()) {\n // get the hash\n $hash = $request->getPost('hash');\n\n if ($this->checkHash($hash)) {\n $username = $request->getPost('username');\n $password = $request->getPost('password');\n\n if (strlen($username) == 0 || strlen($password) == 0)\n $errors['username'] = 'Required field must not be blank';\n\n if (count($errors) == 0) {\n $adapter = new Champs_Auth_Doctrine($username, $password);\n\n $result = $auth->authenticate($adapter);\n\n if ($result->isValid()) {\n $this->_redirect($this->getUrl());\n }\n\n $errors['username'] = 'Your login details were invalid';\n }\n }\n }\n\n // setup hash\n $this->initHash();\n\n $this->view->errors = $errors;\n $this->view->redirect = $redirect;\n }", "private function _login(){\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n try {\r\n\r\n\r\n $username = $_POST['username'];\r\n $password = $_POST['password'];\r\n\r\n $path = ROOT.'/site/config/auth.txt';\r\n $adapter = new AuthAdapter($path,\r\n 'MRZPN',\r\n $username,\r\n $password);\r\n\r\n //$result = $adapter->authenticate($username, $password);\r\n\r\n $auth = new AuthenticationService();\r\n $result = $auth->authenticate($adapter);\r\n\r\n\r\n if(!$result->isValid()){\r\n $result->error = \"Incorrect username and password combination!\";\r\n /*\r\n foreach ($result->getMessages() as $message) {\r\n $result->error = \"$message\\n\";\r\n }\r\n */\r\n } else {\r\n $response = 200;\r\n $result->url = WEBROOT;\r\n }\r\n\r\n\r\n\r\n } catch (Exception $e) {\r\n $result->error = $e->getMessage();\r\n }\r\n\r\n }\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n }", "public function login_action() \n\t{\n $rules = array(\n 'mail' => 'valid_email|required',\n 'pass' => 'required'\n );\n \n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n // they've passed the filter login try and log 'em in\n\t\tUserModel::login(); \n }", "private function handleJustLoggedIn() {\n $this->authenticatedView->setViewMessage(\"Welcome\");\n\n $keepLoggedIn = $this->userRequest->wantsToStayLoggedIn();\n \n if ($keepLoggedIn) {\n $userCredentials = $this->getUserCredentials();\n $cookieHandler = new CookieHandler();\n $cookieHandler->serveCookie($userCredentials);\n }\n }", "protected function handleLogin(Request $request)\n {\n $domain = $this->builder->auth()->adminDomain();\n\n /** @var PasswordProvider $passwordProvider */\n $passwordProvider = $domain->provider('password');\n\n $data = $request->data();\n $user = $passwordProvider->login(\n $data->getRequired('username'),\n $data->getRequired('password')\n );\n\n if($user === null) {\n return $this->getTemplate(array(\n 'loginFailed' => true\n ));\n }\n\n return $this->loggedInRedirect();\n }", "function doLoginAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $user = new User(\n $this->request->getPost('username')\n , $this->request->getPost('password')\n );\n\n if ($user->isRegisted()) {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_200]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_200\n , HttpStatus::SC_DESC[HttpStatus::SC_200]\n , HttpStatus::CT_TEXT_PLAIN\n );\n } else {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_401]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_401\n , HttpStatus::SC_DESC[HttpStatus::SC_401]\n , HttpStatus::CT_TEXT_PLAIN\n );\n }\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "public function doLogin(LoginRequest $request)\n { \n try {\n $data = $request->all();\n\n if (AuthSam::login($data, $request->remember_me)) {\n AuthSam::getSubsidychecklist();\n $user_id = AuthSam::getUser()->id;\n $users = DB::table('user_login_info')->where('user_id', $user_id)->get()->count();\n if ($users >= 2)\n DB::table('user_login_info')->where('user_id', $user_id)->take(1)->delete();\n $dataLog = [\n 'user_id' => $user_id,\n 'ipaddress' => $request->ip(),\n 'login_day' => date(\"Y-m-d\"),\n ];\n DB::table('user_login_info')->insert($dataLog);\n Cache::flush();\n if(AuthSam::permission_lock()==1) {\n if (AuthSam::permission()) {\n return redirect('/agency/home');\n } else {\n return redirect('/client/F0');\n }\n }else{\n if (AuthSam::permission()) {\n $url = '/agency/home_lock';\n } else {\n $url = '/client/F0_lock';\n }\n session()->forget(['is_login', 'user_id', 'permission', 'subsidy_check_list', 'follow_list']);\n return redirect($url);\n }\n \n } else {\n return redirect('/login')->with('error', 'ユーザー名とパスワードが違います。');\n }\n } catch(Exception $e) {\n return redirect('/login')->with('error', 'ユーザー名とパスワードが違います。');\n }\n \n }", "public function do_login()\n {\n $this->userObject = new User();\n\n // grab the uID of the person signing in\n $uid = $this->userObject->checkUser($_POST['user_email'], $_POST['user_password']);\n\n // if the uID exists\n if ($uid) {\n\n $this->set('message', 'You logged in!');\n\n // grab the array of user-data from the database\n $user = $this->userObject->getUser($uid);\n\n // leave out the password\n unset($user['password']);\n unset($user[4]);\n\n // if (strlen($_SESSION['redirect']i) > 0) { // basically, if someone types in the url with the funciton after,\n // // supposed to redirect people to the pages they want.\n // $view = $_SESSION['redirect'];\n // unset($_SESSION['redirect']);\n // header('Location: ' . BASE_URL . $view);\n\n // make the SESSION key 'user' and set it equal to the aray of user-data\n $_SESSION['user'] = $user;\n\n header('Location: /index.php/');\n\n } else {\n\n $this->set('error', 'Sorry! Looks like something might be messed up with your Username or Password! :p');\n }\n }", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "private function _signInRequested()\n {\n if ($this->model->signIn($_POST['username'], $_POST['password'])) {\n $this->utility->redirect('write');\n } else {\n $this->view->display($this->model);\n }\n }", "public function login($request)\n {\n return $this->start()->uri(\"/api/login\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function postLogin()\n {\n $this->validate($this->request, [\n 'username' => 'required',\n 'password' => 'required',\n ]);\n\n if ($this->hasTooManyLoginAttempts($this->request)) {\n return $this->sendLockoutResponse($this->request);\n }\n\n $credentials = $this->request->only('username', 'password');\n\n if ($this->auth->attempt($credentials, $this->request->has('remember'))) {\n return ($this->request->ajax())\n ? response()->json(['success' => true])\n : redirect()->intended($this->redirectPath());\n }\n\n $this->incrementLoginAttempts($this->request);\n\n $errors = ['username' => t('invalid_creds')];\n\n if ($this->request->ajax()) {\n return response()->json(['username' => [t('invalid_creds')]], 422);\n }\n\n return redirect($this->loginPath())\n ->withInput($this->request->only('username', 'remember'))\n ->withErrors([\n 'username' => t('invalid_creds'),\n ]);\n }", "public static function doLogin($request, $response, $args) {\n $username = strtolower($request->getParsedBody()['username']);\n $password = $request->getParsedBody()['password'];\n\n //Check login isn't empty\n if(empty($username) || empty($password)) {\n return self::renderAlert($response, 'login', 'danger', 'Username or password incorrect');\n }\n\n //Check user exist\n $user = DB::getInstance()->get('users', '*', [ 'username' => $username ]);\n if(empty($user)) {\n return self::renderAlert($response, 'login', 'danger', 'Username or password incorrect');\n }\n\n //Check password\n if(!password_verify($password, $user['password'])) {\n return self::renderAlert($response, 'login', 'danger', 'Username or password incorrect');\n }\n\n $_SESSION['MEMBER']['username'] = $username;\n return $response->withHeader('Location', '/')->withStatus(302);\n }", "public function post_signin()\n\t{\n\t\tif(Service\\Validation\\Login::passes(Input::all()))\n\t\t{\n\t\t\tif(Service\\Security::authorize(array('username' => Input::get('username'), 'password' => Input::get('password'))))\n\t\t\t{\n\t\t\t\treturn Redirect::home();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to_route('login')->with_input()->with_errors(new Messages(array(\n\t\t\t\t\t__('login.failed')->get()\n\t\t\t\t)));\n\t\t\t}\n\t\t}\n\n\t\treturn Redirect::to_route('login')->with_input()->with_errors(Service\\Validation::errors());\n\t}", "public function postLogin(Request $request)\n {\n return $this->login($request);\n }", "public function postLogin(Request $request)\n {\n return $this->login($request);\n }", "public function handleUserLogin($event) {\n //Log user login\n $activity = new Activity;\n $activity->activity_type = 'login';\n $activity->actor_id = $event->user->id;\n $activity->actor_type = 'user';\n $activity->activity_data = '';\n $activity->user_agent = $this->request->header('User-Agent');\n $activity->actor_ip = $this->request->ip();\n $activity->save();\n }", "public static function handleLogin()\n\t\t{\n\t\t\t@session_start();\n\t\t\t$logged=$_SESSION['loggedIn'];\n\t\t\t$redirectPage=$_SERVER['REQUEST_URI'];\n\t\t\tif($logged==false){\n\t\t\t\tsession_destroy();\n\t\t\t\tsession_start();\n\t\t\t\tSession::set('redirectPage',$redirectPage);\n\t\t\t\t echo '<script type=\"text/javascript\">';\n\t\t echo 'window.location.href=\"'.$URL.'/login\";';\n\t\t echo '</script>';\n\t\t echo '<noscript>';\n\t\t echo '<meta http-equiv=\"refresh\" content=\"0;url='.$url.'\" />';\n\t\t echo '</noscript>'; \n\t\t\t\texit;\t\n\t\t\t}\t\t\n\t\t\tif (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 3600)) {\n\t\t\t // last request was more than 60 minutes ago\n\t\t\t session_destroy();\n\t\t\t\tsession_start();\n\t\t\t Session::set('redirectPage',$redirectPage);\n\t\t\t echo '<script type=\"text/javascript\">';\n\t\t echo 'window.location.href=\"'.$URL.'/login\";';\n\t\t echo '</script>';\n\t\t echo '<noscript>';\n\t\t echo '<meta http-equiv=\"refresh\" content=\"0;url='.$url.'\" />';\n\t\t echo '</noscript>'; \n\t\t\t\texit;\t\n\t\t\t}\n\t\t\t$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp\n\t\t\t\n\t\t}", "public function login ($request)\n {\n if ($request->getMethod() === 'POST') {\n\n $datas = $this->getParams($request);\n $users = $this->container->get('users.login');\n $user = $this->getNewEntity($datas);\n\n $found_username = array_search($user->username, array_column($users,'username'));\n $found_email = array_search($user->username, array_column($users,'email'));\n\n // Match -> (Username or Email) and Password Ok\n if (\n (strlen($found_username) > 0) &&\n (password_verify($user->password,$users[$found_username]['password'])) ||\n (strlen($found_email) > 0) && \n (password_verify($user->password,$users[$found_email]['password'])) \n ) {\n return $this->openGate($user); \n }\n\n }\n\n // fuction for encrypt new password\n // $this->encrypt('password');die();\n\n $header = $this->getHeaderEntity('login');\n $username = '';\n return $this->renderer->render($this->viewPath . '/login', compact('header', 'username'));\n }", "public function login() {\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\treturn $this->redirect($this->Auth->redirect());\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Invalid username or password, try again'));\n\t\t\t}\n\t\t}\n\t}", "public function loginUri(Request $request);", "public function login(Request $request)\n {\n //\n }", "public function login();", "public function login();", "private function user_login() {\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_POST['password']) && !isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email and password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['password'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t\t\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)) {\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$sql = \"SELECT user_name, user_email, user_phone_no, user_pic, user_address, remember_token\n\t\t\t\t\t\t\t\t\tFROM table_user\n\t\t\t\t\t\t\t\t\tWHERE user_email = '$email'\n\t\t\t\t\t\t\t\t\tAND user_password = '\".$hashed_password.\"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($stmt->rowCount()=='0') {\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n $this->response($this->json($error), 200);\n }\n\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Sucessfully Login!\", \"data\" => json_encode($results) );\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Fields are required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n\t\t\t$this->response($this->json($error), 200);\n\t\t}", "private function doLogin()\n {\n if (!isset($this->token)) {\n $this->createToken();\n $this->redis->set('cookie_'.$this->token, '[]');\n }\n\n $loginResponse = $this->httpRequest(\n 'POST',\n 'https://sceneaccess.eu/login',\n [\n 'form_params' => [\n 'username' => $this->username,\n 'password' => $this->password,\n 'submit' => 'come on in',\n ],\n ],\n $this->token\n );\n\n $this->getTorrentsFromHTML($loginResponse);\n }", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function __handleAuthentication() {\n $allowActions = array('adminLogin');\n\n if(strpos($this->action, 'admin') !== false && !in_array($this->action, $allowActions)) {\n $params = $this->getParams();\n\n if(empty($params['token']) || !$this->Session->check($params['token'])) {\n $this->sendError(API_MSG_INCORRECT_INPUT, API_CODE_NG, API_HTTP_CODE_200);\n }\n }\n }", "public function processLoginAction(Request $request, Application $app)\n {\n // Set the 'user logged in' session to false (default value)\n $_SESSION['isUserLoggedIn'] = false;\n\n // Retrieve user details from the text input (username and password)\n $usernameFromInput = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n $passwordFromInput = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\n // Retrieve details from Database\n $user = Login::getOneByUsername($usernameFromInput);\n\n // If username from input field is not empty and password is verified\n if ($user) {\n\n // Retrieve details from Database\n $usernameFromDb = $user->getUsername();\n //$passwordFromDb = $user->getPassword();\n\n $isPresent = LoginController::matchUserWithPassword($usernameFromInput, $passwordFromInput);\n $isRole = Login::matchUserWithRole($usernameFromDb);\n\n if ($usernameFromInput != $usernameFromDb) {\n return $app->redirect('/index');\n }\n\n // If username exists, and password matches\n if ($isPresent != null) {\n\n // Store username in 'user' in 'session'\n $app['session']->set('user', array('username' => $usernameFromDb));\n\n // Set the 'user logged in' session to true\n $_SESSION['isUserLoggedIn'] = true;\n\n // If role is assigned to the user, redirect the user to the specific page\n if ($isRole) {\n if ($user->getRole() == 'admin') {\n return $app->redirect('/adminIndex');\n } elseif ($user->getRole() == 'student') {\n return $app->redirect('/studentIndex');\n } elseif ($user->getRole() == 'member') {\n return $app->redirect('/memberIndex');\n }\n }\n }\n }\n\n $argsArray = [\n 'loginError' => 'Wrong Username or Password! Try again!'\n ];\n\n $templateName = 'index';\n return $app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "public function login(Request $request)\n {\n Auth::attempt($request->input());\n echo json_encode(['status' => Auth::check()]);\n }", "public function usersLogin() {\n // login uses its own handle\n $httpLogin = $this->_prepareLoginRequest();\n $url = $this->_appendApiKey($this->uriBase . '/users/login.json');\n $data = array('login' => $this->username, 'password' => $this->password);\n return $this->_processRequest($httpLogin, $url, 'post', $data);\n }", "public function login() {\r\n if ($this->request->is('post')) {\r\n \r\n //If the user is authenticated...\r\n if ($this->Auth->login()) {\r\n \r\n if ($this->isAdmin()) $this->redirect(\"/admin/halls\");\r\n else $this->redirect(\"/halls\");\r\n }\r\n else {\r\n $this->Session->setFlash(__('Invalid username or password, try again'));\r\n }\r\n }\r\n }", "public function doLogin()\n {\n\n //check if all the fields were filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity with the spcific login data\n $userEntity = new User(array('username' => Request::post('username'), 'password' => Request::post('password'), 'email' => null, 'name' => null));\n\n //check if the user exists and get it as entity if exists\n if (!$userEntity = $this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username does not exist!\", \"type\" => \"error\")));\n exit;\n }\n\n //get the user ID from database\n $userEntity->setAttr('access', $this->repository->getAccessByUsername(Request::post('username')));\n\n //check if the login credentials are correct for login\n if (!$this->repository->checkLogin($userEntity, Request::post('password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The user/email is incorrect!\", \"type\" => \"error\")));\n exit;\n }\n\n $userEntity->setAttr('access', $this->repository->getAccessByUsername(Request::post('username')));\n\n //set the session using the user data\n $this->session->setSession($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"You successfully logged in!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function postLogin()\n\t{\n\t\tif (Auth::attempt(Input::only('email', 'password')))\n\t\t{\n\t\t\treturn Redirect::to('/')->withErrors('You have successfully logged in!');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Redirect::to('/')->withErrors('Invalid Credentials')->withInput();\n\t\t}\n\n\t}", "function handle_logins()\n{\n if (get_param_integer('httpauth', 0) == 1) {\n require_code('users_inactive_occasionals');\n force_httpauth();\n }\n $username = trim(post_param_string('login_username', ''));\n if (($username != '') && ($username != do_lang('GUEST'))) {\n require_code('users_active_actions');\n handle_active_login($username);\n }\n\n // If it was a log out\n $page = get_param_string('page', ''); // Not get_page_name for bootstrap order reasons\n if (($page == 'login') && (get_param_string('type', '', true) == 'logout')) {\n require_code('users_active_actions');\n handle_active_logout();\n }\n}", "function SubmitLoginDetails()\n\t{\n\t\t// Login logic is handled by Application::CheckAuth method\n\t\tAuthenticatedUser()->CheckAuth();\n\t}", "public function login()\n {\n // make sure request is post\n if( ! SCMUtility::requestIsPost())\n {\n View::make('templates/system/error.php',array());\n return;\n }\n\n $email = SCMUtility::stripTags( (isset($_POST['email'])) ? $_POST['email'] : '' );\n $password = SCMUtility::stripTags( (isset($_POST['password'])) ? $_POST['password'] : '' );\n\n if( ! Session::Auth($email,$password) )\n {\n SCMUtility::setFlashMessage('Invalid email/password.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n }", "public function doLogin(){\n $rules = array(\n 'userid' => 'required|max:30',\n 'password' => 'required',\n );\n $display = array(\n 'userid' => 'User ID',\n 'password' => 'Password'\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, array(), $display);\n if($validator->fails()) {\n return \\Redirect::back()\n ->withErrors($validator)\n ->withInput(\\Input::all());\n }else{\n $user = User::where('username', '=', \\Input::get('userid'))\n ->first();\n if(isset($user->id)){\n if($user->level < 3) {\n if (\\Hash::check(\\Input::get('password'), $user->password)) {\n \\Session::put('logedin', $user->id);\n \\Session::put('loginLevel', $user->level);\n \\Session::put('nickname', $user->nickname);\n }\n return \\Redirect::nccms('/');\n }else{\n \\Session::flash('error', 'Permission Error.');\n return \\Redirect::nccms('login');\n }\n }else{\n \\Session::flash('error', 'Email/Password Error.');\n return \\Redirect::nccms('login');\n }\n }\n }", "public function login(Request $request) {\n $result = array('status' => false, 'data' => $request->all(), 'messages' => array('success' => '', 'errors' => ''));\n\n return ($request->isMethod('POST')) ? $this->mainController->doLogin($request->all()) : $result;\n }", "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }", "public function login() {\n $userName = Request::post('user_name');\n $userPassword = Request::post('user_password');\n if (isset($userName) && isset($userPassword)) {\n // perform the login method, put result (true or false) into $login_successful\n $login_successful = LoginModel::login($userName, $userPassword);\n\n // check login status: if true, then redirect user login/showProfile, if false, then to login form again\n if ($login_successful) {\n //if the user successfully logs in, reset the count\n $userID = Session::get('user_id');\n LoginModel::validLogin($userID);\n Redirect::to('login/loginHome');\n } else {\n Redirect::to('login/index');\n }\n }\n }", "public function action_login()\n {\n if(\\Auth::check())\n {\n \\Response::redirect('admin/dashboard');\n }\n\n // Set validation\n $val = \\Validation::forge('login');\n $val->add_field('username', 'Name', 'required');\n $val->add_field('password', 'Password', 'required');\n\n // Run validation\n if($val->run())\n {\n if(\\Auth::instance()->login($val->validated('username'), $val->validated('password')))\n {\n \\Session::set_flash('success', \\Lang::get('nvadmin.public.login_success'));\n \\Response::redirect('admin/dashboard');\n }\n else\n {\n $this->data['page_values']['errors'] = \\Lang::get('nvadmin.public.login_error');\n }\n }\n else\n {\n $this->data['page_values']['errors'] = $val->show_errors();\n }\n\n // Set templates variables\n $this->data['template_values']['subtitle'] = 'Login';\n $this->data['template_values']['description'] = \\Lang::get('nvadmin.public.login');\n $this->data['template_values']['keywords'] = 'login, access denied';\n }", "public function executeLogin(sfWebRequest $request) {\n $this->getUser()->login();\n $this->forward($request->getParameter('module'), $request->getParameter('action'));\n }", "public function login()\n\t{\n\n\t\tif ( ( $this->get_access_key() === null || $this->get_access_secret() === null ) )\n\t\t{\n echo 'case 1';\n $oauth = new \\OAuth( $this->tokens['consumer_key'], $this->tokens['consumer_secret'] );\n\n $request_token_info = $oauth->getRequestToken( $this->request_token_url, $this->get_callback() );\n\n if ($request_token_info)\n {\n\n $this->set_request_tokens( $request_token_info );\n }\n\n // Now we have the temp credentials, let's get the real ones.\n\n // Now let's get the OAuth token\n\t\t\t\\Response::redirect( $this->get_auth_url() );\n return;\n\t\t}\n\n\t\treturn $this->check_login();\n\t}", "public function doAuthentication();", "function loginHandler($inputs = []) {\n $username = $inputs['username'];\n $password = $inputs['password'];\n $sql = 'SELECT * FROM `admin` WHERE `name` = ? AND password = ?';\n $res = getOne($sql, [$username, $password]);\n if (!$res) {\n formatOutput(false, 'username or password error');\n }\n else{\n $buildingRes = getOne(\"SELECT * FROM `admin_building` WHERE admin_id =?\", [$res['id']]);\n $bid = isset($buildingRes['building_id']) ? $buildingRes['building_id'] : '0';\n setLogin($res['id'],$bid);\n formatOutput(true, 'login success', $res);\n }\n}", "public function onSignin()\n {\n try {\n /*\n * Validate input\n */\n $data = post();\n $rules = [];\n\n $rules['login'] = 'required|email|between:6,255';\n\n $rules['password'] = 'required|between:6,255';\n\n if (!array_key_exists('login', $data)) {\n $data['login'] = post('username', post('email'));\n }\n\n $validation = Validator::make($data, $rules);\n if ($validation->fails()) {\n throw new ValidationException($validation);\n }\n\n /*\n * Authenticate user\n */\n $credentials = [\n 'login' => array_get($data, 'login'),\n 'password' => array_get($data, 'password')\n ];\n\n Event::fire('rainlab.user.beforeAuthenticate', [$this, $credentials]);\n\n $user = Auth::authenticate($credentials, true);\n if ($user->isBanned()) {\n Auth::logout();\n throw new AuthException(/*Sorry, this user is currently not activated. Please contact us for further assistance.*/'rainlab.user::lang.account.banned');\n }\n\n /*\n * Redirect\n */\n if ($redirect = $this->makeRedirection(true)) {\n return $redirect;\n }\n }\n catch (Exception $ex) {\n if (Request::ajax()) throw $ex;\n else Flash::error($ex->getMessage());\n }\n }", "public function executeLogin(sfWebRequest $request)\n {\n //set the referrer used when loggin in.\n $this->getUser()->setReferer($this->getContext()->getActionStack()->getSize() > 1 ? $request->getUri() : $request->getReferer());\n \n $this->form = new sfAuthSigninForm();\n \n if ($request->isMethod('post')) {\n $this->form->bind($request->getParameter('sf_auth_signin'));\n \n if ($this->form->isValid()) {\n $this->getUser()->setFlash('success', $this->getContext()->getI18N()->__('Welcome back :)'));\n \n $referer = $this->getUser()->getReferer($request->getReferer());\n $this->redirectUnless(empty($referer), $referer);\n $this->redirect('@homepage'); \n }\n }\n }", "public function login()\n\t{\n\t\tif ( func_get_args() ) {\n\t\t\t$args = phpSmug::processArgs( func_get_args() );\n\t\t\tif ( array_key_exists( 'EmailAddress', $args ) ) {\n\t\t\t\t// Login with password\n\t\t\t\t$this->request( 'smugmug.login.withPassword', array( 'EmailAddress' => $args['EmailAddress'], 'Password' => $args['Password'] ) );\n\t\t\t} else if ( array_key_exists( 'UserID', $args ) ) {\n\t\t\t\t// Login with hash\n\t\t\t\t$this->request( 'smugmug.login.withHash', array( 'UserID' => $args['UserID'], 'PasswordHash' => $args['PasswordHash'] ) );\n\t\t\t}\n\t\t\t$this->loginType = 'authd';\n\t\t\t\n\t\t} else {\n\t\t\t// Anonymous login\n\t\t\t$this->loginType = 'anon';\n\t\t\t$this->request( 'smugmug.login.anonymously' );\n\t\t}\n\t\t$this->SessionID = $this->parsed_response['Login']['Session']['id'];\n\t\treturn $this->parsed_response ? $this->parsed_response['Login'] : FALSE;\n\t}", "public function login()\n {\n $login = new Login();\n\n $path = '/inloggen';\n if (CSRF::validate() && $login->check()) {\n // try to send the user to the reservation form or sign up for meet the expert page\n $path = Session::get('path');\n unset($_SESSION['path']);\n\n if (empty($path)) {\n $path = '/';\n }\n }\n\n return new RedirectResponse($path);\n }", "public function authenticate()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('login', Input::only('email', 'password'));\n\n\t\t# if the user was authenticated\n\t\tif(isset($response['success']))\n\t\t{\t\n\t\t\t# save the returned user object to the session for later use\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# we got here from a redirect. if they came via a new account registration then reflash the \n\t\t\t# session so we can use the data on the next page load\n\t\t\tif(Session::has('success')) {\n\t\t\t\tSession::reflash();\n\t\t\t}\t\t\t\n\n\t\t\tif(Input::get('redirect') && ! Session::has('ignoreRedirect')) {\n\t\t\t\treturn Redirect::to(Input::get('redirect'));\n\t\t\t}\n\n\t\t\t# and show the profile page\n\t\t\treturn Redirect::to('profile');\t\n\t\t}\n\t\t# auth failed. return to the log in screen and display an error\n\t\telse \n\t\t{ \n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('login-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the log in page again\n\t\t\treturn Redirect::to('login');\n\t\t}\n\t}", "public function login(Request $request)\n {\n $this->validateLogin($request);\n\n $user = Sentinel::authenticateAndRemember($request->only($this->username(), 'password'));\n\n if ($request->ajax()) {\n if (! $user) {\n $response = [\n 'status' => 'error',\n 'message' => __('These credentials do not match our records.')\n ];\n\n return response()->json($response);\n }\n\n $response = [\n 'status' => 'success',\n 'message' => __('Successfull Login'),\n 'user' => $user\n ];\n\n return response()->json($response);\n }\n\n if (! $user) {\n return back()->with('error', __('These credentials do not match our records.'));\n }\n\n AccessLog::add($user);\n\n return redirect(route('shopper.dashboard.home'))->with('success', __('Successfull Login'));\n }", "public function actionLogin()\n {\n \\Yii::$app->response->format = Response::FORMAT_JSON;\n\n if(Yii::$app->request->isPost) {\n\n $model = new LoginForm();\n\n\n if ($model->load(Yii::$app->getRequest()->getBodyParams(), '') && $model->login()) {\n\n return ['status'=> 'success', 'access_token' => Yii::$app->user->identity->getAuthKey()];\n } else {\n\n return ['status' => 'error', 'message' => 'Wrong username or password'];;\n }\n\n }\n\n\n return ['status' => 'wrong', 'message' => 'Wrong HTTP method, POST needed'];\n }", "function memberLoginHandler() {\n global $inputs;\n\n $username = $inputs['username'];\n $password = $inputs['password'];\n $sql = 'select * from `member` where name = ? and password = ?';\n $res = getOne($sql, [$username, $password]);\n\n if (!$res) {\n formatOutput(false, 'username or password error');\n } else {\n setMemberLogin($res['id']);\n formatOutput(true, 'login success', $res);\n }\n}", "public function login(Request $request)\n {\n $this->validateLogin($request); \n\n if ($user = $this->attemptLogin($request)) {\n return $this->sendLoginResponse($request, $user);\n } \n\n return $this->sendFailedLoginResponse($request);\n }", "public function postLogin(Request $request)\n {\n $this->validate($request, [\n 'email' => 'required|email',\n 'password' => 'required',\n ]);\n\n $credentials = $request->all();\n $remember = false;\n\n if(array_key_exists('remember', $credentials)){\n $remember = true;\n }\n\n try {\n if($user = Sentinel::authenticate($credentials, $remember)){\n Sentinel::login($user);\n return redirect()->route('admin.dashboard');\n }\n Session::flash('message', \"Your email/password combination do not match!\");\n return redirect()->back();\n\n } catch(NotActivatedException $e) {\n Session::flash('message', \"Your account has not been activated yet.\");\n return redirect()->back();\n } catch(ThrottlingException $e) {\n $min = intval($e->getDelay() / 60);\n $timeToGo = $min . ':' . str_pad(($e->getDelay() % 60), 2, '0', STR_PAD_LEFT);\n Session::flash('message', \"Your IP is blocked, You will have to wait \". $timeToGo . \" minutes\");\n return redirect()->back();\n }\n\n }", "public function LoginCheck()\n {\n $protocol = Yii::app()->params['protocol'];\n $servername = Yii::app()->request->getServerName();\n $user = Yii::app()->session['username'];\n if (empty($user)) {\n $returnUrl = $protocol . $servername . Yii::app()->homeUrl;\n $this->redirect($returnUrl);\n }\n }", "public function loginProcess(UserLoginRequest $request)\n {\n $processReaction = $this->userEngine->processLogin($request->all());\n\n return __processResponse($processReaction, [\n 1 => __('Welcome, you are logged in successfully.'),\n 2 => __('Authentication failed. Please check your \n email/password & try again.'),\n ], [], true);\n }", "abstract public function loginAction(Celsus_Parameters $parameters, Celsus_Response_Model $responseModel);", "public function postLogin(Request $request)\n {\n $backToLogin = redirect()->route('admin-login')->withInput();\n $findUser = Sentinel::findByCredentials(['login' => $request->input('email')]);\n\n\n // If we can not find user based on email...\n if (! $findUser) {\n flash()->error('Wrong email or username!');\n\n return $backToLogin;\n }\n\n try {\n $remember = (bool) $request->input('remember_me');\n // If password is incorrect...\n if (! Sentinel::authenticate($request->all(), $remember)) {\n flash()->error('Wrong email or username!');\n\n return $backToLogin;\n }\n\n if (strtolower(Sentinel::check()->roles[0]->slug) == 'cro') {\n flash()->error('You Have No Access!');\n Sentinel::logout();\n return $backToLogin;\n }\n\n $log['description'] = 'A user log in';\n $insertLog = new LogActivity();\n $insertLog->insertNewLogActivity($log);\n\n flash()->success('Login success!');\n //return redirect()->route('admin-dashboard');\n return redirect()->route('admin-index-event');\n } catch (ThrottlingException $e) {\n\n $log['description'] = 'A user login failed because too many attempts';\n $insertLog = new LogActivity();\n $insertLog->insertNewLogActivity($log);\n\n flash()->error('Too many attempts!');\n } catch (NotActivatedException $e) {\n flash()->error('Please activate your account before trying to log in.');\n } catch (\\Exception $e) {\n\n $log['description'] = $e->getMessage().' '.$e->getFile().' on line:'.$e->getLine();\n $insertLog = new LogActivity();\n $insertLog->insertNewLogActivity($log);\n \n }\n\n return $backToLogin;\n }", "public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }" ]
[ "0.7669814", "0.74851155", "0.7442612", "0.72329086", "0.7112905", "0.7103887", "0.70698494", "0.7055757", "0.7029516", "0.6985367", "0.6953118", "0.69134593", "0.6885101", "0.687445", "0.6863917", "0.6856037", "0.6848747", "0.684784", "0.68152297", "0.680864", "0.68045515", "0.67792654", "0.6771233", "0.67666423", "0.67659724", "0.67419285", "0.67255026", "0.66824514", "0.66804695", "0.6661723", "0.66615164", "0.66599214", "0.6653103", "0.6650553", "0.664819", "0.66480184", "0.66423595", "0.66292566", "0.6616117", "0.66158235", "0.6614166", "0.66131216", "0.66108733", "0.66001797", "0.6598898", "0.65979165", "0.65857095", "0.6582395", "0.65822494", "0.65788734", "0.657026", "0.65687394", "0.65674514", "0.6563829", "0.6560272", "0.6560272", "0.65553254", "0.6548969", "0.6548335", "0.65271837", "0.6519302", "0.65027267", "0.64946365", "0.64946365", "0.64943993", "0.64915204", "0.64838105", "0.6480556", "0.6471744", "0.6466453", "0.64642614", "0.64604133", "0.6456966", "0.64559203", "0.6455759", "0.64528894", "0.64402467", "0.6433877", "0.6431453", "0.64256763", "0.6411047", "0.6408026", "0.6405608", "0.64052635", "0.64042723", "0.64006245", "0.63940746", "0.6390829", "0.6385385", "0.63831717", "0.63792276", "0.63753724", "0.6374533", "0.6369184", "0.6369093", "0.63690686", "0.6366873", "0.6366771", "0.6365373", "0.6362475", "0.635908" ]
0.0
-1
Validate the user login request.
protected function validateLogin(Request $request) { $request->validate([ 'email' => 'required|email', 'password' => 'required|string', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validateUserInput() {\n\t\ttry {\n\t\t\t$this->clientUserName = $this->loginObserver->getClientUserName();\n\t\t\t$this->clientPassword = $this->loginObserver->getClientPassword();\n\t\t\t$this->loginModel->validateForm($this->clientUserName, $this->clientPassword);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->message = $e->getMessage();\n\t\t}\n\t}", "public function validateLogin_post() {\n $params = $this->_args; //get POST params\n log_message('debug', 'validate login: params: ' . print_r($params, true));\n \n $id = $params['_id'];\n $token = $params['token'];\n try {\n $user = new User($id);\n } catch(Exception $e) {\n //INVALID TOKEN\n $this->response(null, 401);\n }\n \n $storedToken = $user->getLoginToken();\n if ($storedToken == $token) {\n //VALID TOKEN\n $this->response(null, 204);\n }\n \n //INVALID TOKEN\n $this->response(null, 401);\n }", "public function validate_login() {\n\t\t$userid=$_POST['user_id'];\n\t\t$password=$_POST['password'];\n\t\t$compid=$_POST['company_id'];\n\t\t\n\n\t\t$sql=\"SELECT u.id, u.user_name FROM users u, hmz_cust_info ci where ci.id=u.cust_id\n\t\t\tand u.user_id='$userid' and u.password='$password' and ci.cust_id='$compid';\";\n\t\t$result=$this->runQuery(\"getAll\",$sql);\n\t\tif(count($result)>0) {\n\t\t\t$_SESSION['user_id']=$result[0];\n\t\t\t$_SESSION['user_name']=$result[1];\n\t\t\theader('location: ?a=P&b=dashboard');\n\t\t}\n\t\telse\n\t\t\theader('location: ?a=login&b=f');\n\n\t}", "public function loginValidate()\n\t{\n\n\t\t$this->__set('email', $_POST['email']);\n\t\t$this->__set('password', $_POST['password']);\n\n\t\t$result = $this->validar();\n\n\t\tif (empty($result)) {\n\t\t\theader('location: /?erro=0');\n\t\t} else {\n\t\t\tsession_start();\n\t\t\t$_SESSION = $result;\n\t\t\theader('location: /main');\n\t\t}\n\t}", "public function validateLogin()\n {\n $this->userMapper->validateUserLogin($_POST); // should I use a global directly here?\n }", "protected function validateLogin(Request $request)\n\t{\n\t $this->validate($request, [\n\t\t$this->username() => 'required|string',\n\t\t'password' => 'required|string',\n\t ]);\n\t}", "public function login_validation() {\n\n\t\t$this -> load -> library('form_validation');\n\t\t$this -> form_validation -> set_rules('email', \"Email\", \"required|trim|xss_clean|callback_validate_credentials\");\n\t\t$this -> form_validation -> set_rules('password', \"Password\", \"required|md5|trim\");\n\n\t\tif ($this -> form_validation -> run()) {\n session_start();\n\t\t\t$user_id = $this -> model_users -> get_userID($this -> input -> post('email'));\n\n\t\t\t$data = array(\"id\" => $user_id, \"email\" => $this -> input -> post(\"email\"), \"user\" => \"TRUE\", \"is_logged_in\" => 1);\n\n\t\t\t$this -> session -> set_userdata($data);\n\t\t\tredirect('Site/members');\n\t\t} else {\n\t\t\n\t\t\techo \"error\";\n\n\t\t}\n\n\t}", "public function validateLogin(){\n\t\tif($this->validateFormsLogin(Input::all()) === true){\n\t\t\t$userdata = array(\n\t\t\t\t'username' =>Input::get('username'),\n\t\t\t\t'password' =>Input::get('password')\n\t\t\t\t);\n\n\t\t\tif(Auth::attempt($userdata)){\n\t\t\t\tif(Auth::user()->role_id == 0){\n\t\t\t\t\treturn Redirect::to('administrador');\n\t\t\t\t}else{\n\t\t\t\t\treturn Redirect::to('/');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tSession::flash('message', 'Error al iniciar session');\n\t\t\t\treturn Redirect::to('login');\n\t\t\t}\n\t\t}else{\n\t\t\treturn Redirect::to('login')->withErrors($this->validateFormsLogin(Input::all()))->withInput();\t\t\n\t\t}\t\t\t\t\n\t}", "protected function validateLogin(Request $request)\n {\n $input = $request->all();\n /**\n * Attempt to log the user into the application.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return bool\n */\n $validation = Validator::make($input, [\n 'email' => 'required',\n 'password' => 'required',\n ]);\n }", "private function validateLogin($request)\n {\n $this->validate($request, [\n 'email' => 'email|required',\n 'password' => 'required',\n ]);\n }", "protected function validateLogin(Request $request)\n {\n $request->validate([\n $this->username() => 'required|string',\n 'password' => 'required|string',\n ]);\n }", "protected function validateLogin(Request $request)\n {\n $this->validate($request, [\n $this->username() => 'required|string',\n 'password' => 'required|string',\n ]);\n }", "public function validate()\n\t{\n\t\tswitch ($_REQUEST[STR_URL_QUERY_STRING]) {\n\t\t/**\n\t\t\t * If we're on the Logout page, logout by clearing sessions and cookies.\n\t\t\t * Redirect to the login page.\n\t\t\t */\n\t\t\tcase FILE_LOGOUT:\n\t\t\t\t$this->logout();\n\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the Register page, logout (clear sessions and cookies)\n\t\t\t * Don't redirect: allow user to stay on this page so he/she can register\n\t\t\t */\n\t\t\tcase FILE_REGISTER:\n\t\t\t\t$this->logout();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're on the login page, run ->login();\n\t\t\t */\n\t\t\tcase FILE_LOGIN:\n\t\t\tcase \"/\" .FILE_LOGIN:\n\t\t\t\t$this->login();\n\t\t\t\tbreak;\n\t\t\t/**\n\t\t\t * If we're creating a new user, \"pass through\" - \n\t\t\t */\n\t\t\tcase FILE_CREATE_USER:\n\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * On any other page....see if a user is logged in\n\t\t\t */\n\t\t\tdefault:\n\t\t\t\tif (!$this->is_logged_in())\n\t\t\t\t{\n\t\t\t\t\tROCKETS_HTTP::redirect(RPATH_ROOT . \"/\" . FILE_LOGIN);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected function validateLogin(Request $request)\n {\n $this->validate($request, [\n $this->username() => 'required', 'password' => 'required',\n ]);\n }", "protected function validateLogin(Request $request)\n {\n $request->validate([\n $this->username() => 'required|string',\n 'password' => 'required|min:8|string',\n ]);\n }", "public function login_action() \n\t{\n $rules = array(\n 'mail' => 'valid_email|required',\n 'pass' => 'required'\n );\n \n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n // they've passed the filter login try and log 'em in\n\t\tUserModel::login(); \n }", "public function validateUser(){\n $username = $this->input->post('username');\n $password = $this->input->post('password');\n\n //Place inputs in valide user function\n $result = $this->LoginModel->loginUser($username, $password);\n\n //Check to see if it is a valide user or not\n if($result == ''){\n\n redirect(base_url());\n }\n else{\n\n echo \"Wrong details\";\n }\n\n }", "protected function validateLogin(Request $request)\n {\n $this->validate($request, [\n $this->username() => 'required|email',\n 'password' => 'required',\n ]);\n }", "public function validateLogin(){\n // store fieldnames inside the $fieldnames variable\n $fieldnames = ['email', 'password'];\n\n // initialize $error variable and set it as FALSE\n $error = FALSE;\n\n // for each $fieldname, check if its set or empty, if the fieldname is not set or empty then set $error as TRUE\n foreach($fieldnames as $fieldname){\n if(!isset($_POST[$fieldname]) || empty($_POST[$fieldname])){\n $error = TRUE;\n }\n }\n\n // if $error is FALSE\n if(!$error){\n // create variables with $_POST data\n $email = $_POST[\"email\"];\n $wachtwoord = $_POST[\"password\"];\n\n // create new db connection \n $db = new Db('localhost', 'root', '', 'project1', 'utf8');\n\n // login the user\n $db->login($email, $wachtwoord);\n } else{\n // if $error is equal to TRUE then echo Verkeerd wachtwoord of username\n echo '<label>Verkeerd wachtwoord of username</label>';\n }\n }", "public function validateLogin() {\n if (isset($_POST['submit'])) {\n $errors = array();\n\n $required_fields = array('username', 'password');\n $errors = array_merge($errors, checkRequiredFields($required_fields));\n\n $username = trim($_POST['username']);\n $password = trim($_POST['password']);\n\n if (empty($errors)) {\n $conn = CTSQLite::connect();\n\n\n //check database if user and password exist\n $query = \"SELECT id, username ,role \";\n $query .= \"FROM ic_user \";\n $query .= \"WHERE username = '{$username}' \";\n $query .= \"password = '{$password}' \";\n $query .= \"LIMIT 1\";\n\n $result = $conn->query($query);\n confirm_query($result);\n\n if (sqlite_num_rows($result) == 1) {\n $user = $result->fetchArray();\n $role = $user['role'];\n CT::user()->setRole($role);\n }\n } else {\n if (count($errors) == 1) {\n // 1 error ocurred\n $message = \"There was 1 error in the form\";\n } else {\n //more than 1 error occured\n $message = \"There were\" . count($errors) . \"errors in the form\";\n }\n }\n } else {\n //form has not been submitted\n }\n }", "protected function isUserAllowedToLogin() {}", "private function user_login() {\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_POST['password']) && !isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email and password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['password'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t\t\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)) {\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$sql = \"SELECT user_name, user_email, user_phone_no, user_pic, user_address, remember_token\n\t\t\t\t\t\t\t\t\tFROM table_user\n\t\t\t\t\t\t\t\t\tWHERE user_email = '$email'\n\t\t\t\t\t\t\t\t\tAND user_password = '\".$hashed_password.\"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($stmt->rowCount()=='0') {\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n $this->response($this->json($error), 200);\n }\n\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Sucessfully Login!\", \"data\" => json_encode($results) );\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Fields are required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n\t\t\t$this->response($this->json($error), 200);\n\t\t}", "public function validateLogin()\n {\n $result = false;\n if (strlen($this->login) >= 5) {\n $result = true;\n }\n return $result;\n }", "protected function validateLogin(Request $request)\n {\n $this->validate($request, [\n 'email' => 'required|email|max:255',\n 'password' => 'required| string',\n ]);\n }", "public function Login_Validation($sorce){\r\n\r\n // Set validation flag as true\r\n $this->_flag = true;\r\n\r\n // Validate $username\r\n self::Username_Login_Validation($sorce);\r\n\r\n // Validate $username\r\n self::Password_Login_Validation($sorce);\r\n }", "function verify_login() {\n //Validation Rules\n $this->form_validation->set_rules('username','Username','trim|required|min_length[3]|xss_clean');\n $this->form_validation->set_rules('password','Password','trim|required|min_length[3]|xss_clean');\n\n if (!$this->form_validation->run()) {\n return false ;\n } else {\n return true;\n }\n }", "protected function validateLogin() {\n $login_info = $this->model_account_customer->getLoginAttempts($this->request->post['email']);\n\n if ($login_info && ($login_info['total'] >= $this->config->get('config_login_attempts')) && strtotime('-1 hour') < strtotime($login_info['date_modified'])) {\n $this->error['email'] = $this->language->get('error_attempts');\n }\n\n // Check if customer has been approved.\n $customer_info = $this->model_account_customer->getCustomerByEmail($this->request->post['email']);\n\n if ($customer_info && !$customer_info['status']) {\n $this->error['email'] = $this->language->get('error_approved');\n }\n\n if (!$this->error) {\n if (!$this->customer->login($this->request->post['email'], $this->request->post['password'])) {\n $this->error['email'] = $this->language->get('error_login');\n\n $this->model_account_customer->addLoginAttempt($this->request->post['email']);\n } else {\n $this->model_account_customer->deleteLoginAttempts($this->request->post['email']);\n }\n }\n\n return !$this->error;\n }", "public function validateLogin() {\n $email = valOr($_REQUEST,'email','');\n $password = valOr($_REQUEST,'pwd','');\n\n $stmt = $this->hcatServer->dbh->prepare(\"select * from hcat.user where email=:email\");\n $stmt->bindValue(':email', $email, PDO::PARAM_STR);\n $stmt->execute();\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $_SESSION['email']='';\n $_SESSION['uid']=0;\n\n $message = '';\n if (sizeof($rows)==1) {\n $hash = $rows[0]['pwdhash'];\n if ( password_verify ( $password , $hash )) {\n $_SESSION['email']=$email;\n $_SESSION['uid']=$rows[0]['uid'];\n $this->hcatServer->setLogin();\n\n } else {\n $message = 'Bad password';\n }\n\n } else {\n $message = 'Bad email';\n }\n\n\n $_SESSION['message']=$message;\n return ($_SESSION['email']!='');\n }", "protected function validateLogin(Request $request)\n {\n $this->validate($request, [\n 'username' => 'required|string',\n 'password' => 'required|string',\n ],[\n 'username.required' => 'El nombre de usuario es requerido',\n 'password.required' => 'La contraseña es requerida',\n ]);\n }", "protected function validateLogin(Request $request)\n {\n $this->validate($request, [\n 'email' => 'required', 'password' => 'required',\n ]);\n }", "public function validateLoginAction(){\n\t\t \n\t\t $isValid = ! User::loginExists($_GET['login']);\n\t\t \n\t\t header('Content-Type: application/json');\n\t\t echo json_encode($isValid);\n\t }", "public function doVerification() {\n $this->validate ( $this->request, $this->getRules () );\n $user = $this->_user->where ( StringLiterals::EMAIL, $this->decodeParam ( $this->request->user ) )->where ( 'otp', $this->request->otp )->first ();\n if (count ( $user ) > 0) {\n Auth::loginUsingId ( $user->id );\n return true;\n } else {\n return false;\n }\n }", "public function processLogin()\n {\n $user = $this->post['user'];\n\n // Run the form validation\n $errors = $this->validateLogin($user);\n\n // If the form is valid, check the login credentials and\n // if valid log the user in otherwise display the form again.\n if (empty($errors)) {\n if ($this->authentication->login($user['email'], $user['password'])) {\n header('location: /admin/');\n return http_response_code();\n } else {\n $errors[] = 'Invalid login credentials';\n return $this->loginForm($errors);\n }\n } else {\n return $this->loginForm($errors);\n }\n }", "public function _check_login()\n {\n\n }", "private function processFormLogin(){\n\t\t$username = $_REQUEST[\"usuario\"];\n\t\t$password = $_REQUEST[\"password\"];\n\t\t$validar = $this->users->getProcessUser($username, $password);\n\t\tif($validar){\n\t\t\tif (Seguridad::getTipo() == \"0\")\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t\telse\n\t\t\t\tView::redireccion(\"selectTable\", \"userController\");\n\t\t} else {\n\t\t\t$data[\"informacion\"] = \"Nombre de usuario o contraseña incorrecta.\";\n\t\t\tView::show(\"user/login\", $data);\n\t\t}\n\t}", "public static function validate() {\n\t\t\tself::initialize();\n\t\t\tif (isset(self::$customer['user']['id']) && self::$customer['user']['id']) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tself::$customer = array();\n\t\t\t\tself::$customer['loginPage'] = $_SERVER['REQUEST_URI'];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "protected function validateLogin(Request $request)\n {\n $messages = [\n $this->loginUsername().'.required' => '账号必须',\n 'password.required' => '密码必须',\n ];\n \n $this->validate($request, [\n $this->loginUsername() => 'required', 'password' => 'required',\n ], $messages);\n }", "function validate_login($username, $password){\n if (empty($this->username) or empty($this->password)){\n // User has not set its credentials\n print 'Error user has not set user and password.';\n return False;\n }\n if (empty($username) or empty($password)){\n // Empty username or password\n print 'Cannot ser username or password as null.';\n return False;\n }\n if ($username == $this->username and $password == $this->password){\n print 'Username and password are correct.';\n return True;\n }\n }", "private function validate()\n {\n //Check username already exists\n if (!$this->username) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_USERNAME_EMPTY\"), \"error\", \"username\");\n } elseif ($this->getBy(\"username\", $this->username, $this->id)) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_USERNAME_TAKEN\"), \"error\", \"username\");\n }\n //Check email\n if (!$this->email) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_EMAIL_EMPTY\"), \"error\", \"email\");\n } elseif ($this->getBy(\"email\", $this->email, $this->id)) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_EMAIL_TAKEN\"), \"error\", \"email\");\n }\n //Password?\n if ($this->password && strlen($this->password)<6) {\n Registry::addMessage(Language::translate(\"MODL_USER_VALIDATE_PASSWORD_SHORT\"), \"error\", \"password\");\n }\n //Return messages avoiding deletion\n return Registry::getMessages(true);\n }", "function validateUser() {\n\tif (!isLoggedIn()) {\n\t\tredirectTo(\"index.php\");\n\t}\n}", "public function loginUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n\n // Check email\n if (!$email) {\n $this->showLoginForm(['Please enter email']);\n }\n // Check password\n if (!$password) {\n $this->showLoginForm(['Please enter password']);\n }\n\n // Check user exist and then password\n $user = $this->getUser($email);\n $password = md5($password);\n if (!$user || $password !== $user['password']) {\n $this->showLoginForm(['Error on login']);\n }\n\n // Save login details to cookies\n if (!defined('APP_USERS_COOKIES_EMAIL')\n || !defined('APP_USERS_COOKIES_PASSWORD')) {\n $this->showLoginForm(['Error on login']);\n }\n setcookie(APP_USERS_COOKIES_EMAIL, $email);\n setcookie(APP_USERS_COOKIES_PASSWORD, $password);\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_login']);\n }", "protected function validateLogin(Request $request): void\n {\n $rules = ['password' => ['required', 'string']];\n $authMethod = config('auth.method');\n\n if ($authMethod === 'standard') {\n $rules['email'] = ['required', 'email'];\n }\n\n if ($authMethod === 'ldap') {\n $rules['username'] = ['required', 'string'];\n $rules['email'] = ['email'];\n }\n\n $request->validate($rules);\n }", "public function validasi()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "protected function validateLogin(Request $request)\n {\n $attributes = [\n 'email' => 'required',\n 'password' => 'required',\n ];\n\n $messages = [\n 'email.required' => 'E-mail adresa ili lozinka koje ste unijeli nisu ispravni.',\n 'password.required' => 'E-mail adresa ili lozinka koje ste unijeli nisu ispravni.'\n ];\n\n $this->validate($request, $attributes, $messages);\n }", "public function verify_user_login()\n {\n $this->CI->load->library('form_validation');\n $this->form_validation->CI =& $this;\n\n $this->CI->form_validation->set_rules('email','Emails','required');\n $this->CI->form_validation->set_rules('pass','Passwords','required');\n\n return $this->CI->form_validation->run();\n }", "public function loginCheck()\n\t{\n\t}", "public function doLogin(){\n $rules = array(\n 'userid' => 'required|max:30',\n 'password' => 'required',\n );\n $display = array(\n 'userid' => 'User ID',\n 'password' => 'Password'\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, array(), $display);\n if($validator->fails()) {\n return \\Redirect::back()\n ->withErrors($validator)\n ->withInput(\\Input::all());\n }else{\n $user = User::where('username', '=', \\Input::get('userid'))\n ->first();\n if(isset($user->id)){\n if($user->level < 3) {\n if (\\Hash::check(\\Input::get('password'), $user->password)) {\n \\Session::put('logedin', $user->id);\n \\Session::put('loginLevel', $user->level);\n \\Session::put('nickname', $user->nickname);\n }\n return \\Redirect::nccms('/');\n }else{\n \\Session::flash('error', 'Permission Error.');\n return \\Redirect::nccms('login');\n }\n }else{\n \\Session::flash('error', 'Email/Password Error.');\n return \\Redirect::nccms('login');\n }\n }\n }", "public function login() {\n $this->form_validation->set_rules('user_name','User Name','required|trim|xss_clean|valid_email');\n $this->form_validation->set_rules('password','Password','required|trim|xss_clean|callback_check');\n if($this->form_validation->run()==FALSE){\n $this->index();\n }else{\n redirect('');\n }\n }", "public function actionLogin()\n {\n $model = new Loginform();\n if ($model->load(Yii::$app->request->bodyParams, '') && $model->login()) {\n return true;\n } else {\n return $model->getErrors();\n }\n }", "function validateLogin($data)\r\n\t{\r\n\t\t$user = $this->find(array('username' => $data['username'], 'password' => sha1($data['password'])), array('id', 'username'));\r\n\t\tif(empty($user) == false)\r\n\t\t\treturn $user['User'];\r\n\t\treturn false;\r\n\t}", "public function validateLogin(Request $request)\n {\n $dataArr = arrayFromPost([\"username\", \"password\", \"remember\"]);\n $this->validate($request, [\n \"username\" => \"required|max:191\",\n \"password\" => \"required|max:191\",\n ]);\n try {\n if(!auth()->attempt(['username' => $dataArr->username, 'password' => $dataArr->password], ($dataArr->remember? TRUE : FALSE))) {\n errorMessage('invalid_username_login_credentials');\n } else {\n $admin = auth()->user();\n if($admin->status != 'Active')\n {\n auth()->logout();\n if($admin->status == 'Inactive') {\n errorMessage('account_inactive');\n } else {\n errorMessage('account_blocked');\n }\n }\n $adminLoginLogs = new \\App\\Models\\AdminLoginLogs();\n $adminLoginLogs->device_type = \"web\";\n $adminLoginLogs->admin_id = $admin->id;\n $adminLoginLogs->login_at = \\Carbon::now()->toDateTimeString();\n $adminLoginLogs->ip_address = detectUserIpAddress();\n $adminLoginLogs->browser = $request->server('HTTP_USER_AGENT');\n $adminLoginLogs->save();\n $admin->login_log_id = $adminLoginLogs->id;\n $admin->save();\n if (\\Session::exists('adminLoginLogs')) {\n \\Session::remove('adminLoginLogs');\n }\n \\Session::put('adminLoginLogs', $adminLoginLogs);\n \\Session::save();\n if($dataArr->remember) {\n \\Cookie::queue(\\Cookie::make('__ud', base64_encode($dataArr->username)));\n \\Cookie::queue(\\Cookie::make('__up', base64_encode($dataArr->password)));\n } else {\n \\Cookie::queue(\\Cookie::make('__ud', null));\n \\Cookie::queue(\\Cookie::make('__up', null));\n }\n return successMessage('loggedin_successfully');\n }\n } catch (\\Illuminate\\Database\\QueryException $e) {\n errorMessage($e->errorInfo[2],true);\n }\n }", "public function login(LoginValidation $request)\n {\n return $this->loginService->login($request->only('email','password'));\n }", "function validate_user_login() {\n\n\t$errors = [];\n\n\t\n\n\tif(isset($_POST['submit'])) {\n\n\t\t\t$password \t = md5($_POST['password']);\n\t\t\t$idd \t \t\t = $_POST['iddler'];\n\n\t\t\tif(!empty($errors)) {\n\n\t\t\t\tforeach ($errors as $error) {\n\t\t\t\n\t echo validation_errors($error); \n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif(log_user($password)) {\n\t\t\t\t\tsession_start();\n\t\t\t\t\t$_SESSION['secured'] = $password;\n\t\t\t\t\theader(\"location: ./seen?id=$idd\");\n\n\t\t\t\t} else {\n\n\t\t\t\t\techo validation_errors(\"Wrong Password\");\n\t\t\t\t}\n\t\t\t} \n\n\t\t}\n\n}", "public function postLogin() {\n\n\t\t$rules = array(\n\t\t\t'email' => 'Required',\n\t\t\t'password' => 'Required',\n\t\t);\n\n\t\t$v = Validator::make(Input::all(), $rules);\n\n\t\tif ($v->passes()) {\n\n\t\t\t// look up user via email\n\t\t\tif (Auth::attempt(array(\n\t\t\t\t\t\t'email' => Input::get('email'),\n\t\t\t\t\t\t'password' => Input::get('password')))) {\n\n\t\t\t\treturn Redirect::intended('/login');\n\t\t\t} else {\n\t\t\t\treturn Redirect::to('/login')->withErrors('Invalid email or password');\n\t\t\t}\n\t\t} else {\n\n\t\t\treturn Redirect::to('/login')->withErrors($v->messages());\n\t\t}\n\t}", "public function checkLogin() {\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t// Hash the password that was entered into the form (if it was correct, it will match the hashed password in the database)\r\n\t\t$password = sha1($password);\r\n\t\t// Query\r\n\t\t$query = \"SELECT username, userID, profilePic, access, email FROM users WHERE username='$username' AND password='$password'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\tif($data){\r\n\t\t\t//set up the session\r\n\t\t\t$_SESSION['userID'] = $data['userID'];\r\n\t\t\t$_SESSION['username'] = $data['username'];\r\n\t\t\t$_SESSION['profilePic'] = $data['profilePic'];\r\n\t\t\t$_SESSION['userType'] = $data['userType'];\r\n\t\t\t$_SESSION['access'] = $data['access'];\r\n\t\t\t//redirects to their profile\r\n\t\t\theader('location: index.php?page=profile&userID='.$_SESSION['userID']);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public function isLoginRequired()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function testLoginValidation() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => '', 'password' => ''])\n ->see('Please enter a valid username.')\n ->see('Please enter a valid password.');\n }", "public function loginValidated()\n\t\t{\n\t\t\t$campos = array('*');\n\t\t\t\n\t\t\t$pw = $this->_objCrypt->encrypt($this->_password);\n\n\t\t\t# Campos que se incluyen en la validacion WHERE DE LA SQL\n\t\t\t$field['userName'] = $this->_userName;\n\t\t\t$register = Usuario::findCustom($campos, $field);\n\n\t\t\t# Validación nombre usuario en BD\n\t\t\tif (empty($register)) {\n\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error1');\n\t\t\t\t$success = json_encode($json_error);\n\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\theader('location:../views/users/login.php');\n\t\t\t}else{\n\t\t\t\t# pw que se obtiene de BD\n\t\t\t\t$pw_DB = $register[0]->getPassword();\n\n\t\t\t\t# Validacion coincidencia de contraseñas\n\t\t\t\tif ($pw !== $pw_DB) {\n\t\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error2');\n\t\t\t\t\t$success = json_encode($json_error);\n\t\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\t\theader('location:../views/users/login.php');\n\t\t\t\t}else{\n\t\t\t\t\t$data_session['id_user'] \t= $register[0]->getId();\t\t\t\t\t\n\t\t\t\t\t$data_session['nombre'] \t= $register[0]->getNombre();\t\t\t\n\t\t\t\t\t$data_session['apellido'] \t\t= $register[0]->getApellido();\t\t\t\n\t\t\t\t\t$data_session['tipoUsuario']\t= $register[0]->getTipoUsuario();\t\t\t\n\t\t\t\t\t$data_session['userName'] \t\t= $register[0]->getUserName();\t\t\t\n\t\t\t\t\t$data_session['email'] \t\t = $register[0]->getEmail();\t\t\t\n\t\t\t\t\t$data_session['telFijo'] \t\t= $register[0]->getTelFijo();\t\t\t\n\t\t\t\t\t$data_session['telMovil'] \t\t= $register[0]->getTelMovil();\t\t\t\n\t\t\t\t\t$data_session['estado'] \t\t= $register[0]->getEstado();\n\t\t\t\t\t$data_session['lan']\t\t\t= $_COOKIE['lan'];\n\t\t\t\t\t\n\t\t\t\t\t$obj_Session = new Simple_sessions();\n\t\t\t\t\t$obj_Session->add_sess($data_session);\n\n\t\t\t\t\theader('location:../views/users/crearUsuario.php');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static function validate() {\n\n if(isset($_GET['key'], $_GET['login'])) { //récupère la clé et le login\n $key = htmlspecialchars($_GET['key']);\n $login = htmlspecialchars($_GET['login']);\n $user = ModelUser::getUserByLogin($login); //récupère les infos du user\n\n if($user != false) {\n if($user->get('nonce') == $key) { //vérifie si le nonce et la clé sont identiques\n $user->validate(); \t\t\t//Validate du modelUser pour la validation\n $message = '<div class=\"alert alert-success\">Votre compte a bien été validé ! Vous pouvez maintenant vous connecter !</div>';\n } else {\n $message = '<div class=\"alert alert-danger\">La clé de validation pour ce login n\\'est pas correcte</div>';\n }\n }\n\n } else {\n $message = '<div class=\"alert alert-danger\">Vous devez préciser un login et une clé de validation</div>';\n }\n\n $view = \"activate\";\n $controller = 'User';\n $pagetitle='Validation de votre compte';\n require File::build_path(array('view','view.php')); // Affiche le activate\n }", "public function postLoginAction()\n {\n //get input\n $inputs = $this->getPostInput();\n\n //define default\n $default = [\n 'status' => 'active'\n ];\n\n // Validate input\n $params = $this->myValidate->validateApi($this->userLogin, $default, $inputs);\n\n if (isset($params['validate_error']))\n {\n //Validate error\n return $this->responseError($params['validate_error'], '/users');\n }\n\n //process user login\n $result = $this->userService->checkLogin($params);\n\n //Check response error\n if (!$result['success'])\n {\n //process error\n return $this->responseError($result['message'], '/users');\n }\n\n //return data\n $encoder = $this->createEncoder($this->modelName, $this->schemaName);\n\n return $this->response($encoder, $result['data']);\n }", "function validateLogin() {\n $this->check_lang();\n $logged_in = $this->session->userdata('logged_in');\n if ((isset($logged_in) || $logged_in == true)) {\n if ($logged_in != \"admin\") {\n redirect('/admin/index/login', 'refresh');\n }\n } else {\n redirect('/admin/index/login', 'refresh');\n }\n }", "public function validation() \n { \n $userId = $this->WishlistModel->log_in_correctly();\n if (!empty($userId)) \n { \n $_SESSION['userId'] = $userId;\n return true;\n // return $userId; \n } else { \n $data['form1_errors'] = $this->form_validation->set_message('validation', 'Incorrect username/password'); \n return false; \n } \n\t}", "public function handleLogin( ){\n\t\t// Filter allowed data\n\t\t$data = Request::only([ 'uid', 'password' ]);\n\n\t\t// Validate user input\n\t\t$validator = Validator::make(\n\t\t\t$data,\n\t\t\t[\n\t\t\t\t'uid' => 'required',\n\t\t\t\t'password' => 'required',\n\t\t\t]\n\t\t);\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$data[$key] = $this->sanitizeLDAP( $value );\n\t\t}\n\n\t\tif($validator->fails()){\n\t\t\t// If validation fails, send back with errors\n\t\t\treturn Redirect::route('login')->withErrors( $validator )->withInput( );\n\t\t}\n\n\t\tif( Auth::attempt( [ 'uid' => $data['uid'], 'password' => $data['password']], true ) ){\n\t\t\t// If login is successful, send them to home\n\t\t\treturn Redirect::route( 'home' );\n\t\t} else {\n\t\t\t// Otherwise, tell them they're wrong\n\t\t\treturn Redirect::route( 'login' )\n\t\t\t\t\t\t ->withErrors([ \n\t\t\t\t\t\t\t\t'message' => 'I\\'m sorry, that username and password aren\\'t correct.' \n\t\t\t\t\t\t\t]);\n\t\t}\n\n\t\treturn Redirect::route( 'login' )->withInput( );\n\t}", "function validate_credentials()\n { \n\n // set validation rules for username and password fields\n $this->form_validation->set_rules('username', lang('mm_sign_ph_username'), 'trim|required');\n $this->form_validation->set_rules('password', lang('mm_sign_ph_password'), 'trim|required');\n \n // if form validation fails load login page \n if ($this->form_validation->run() == FALSE)\n { \n $this->index();\n return false;\n }\n \n // validate user \n $result = $this->user_model->validate();\n\n switch($result)\n { \n case 0: // Username or password field do not match \n $this->base->set_message(lang('mm_msg_login_1'), 'danger');\n break;\n \n case 1: // User's credentials are validated \n break; \n \n case 2: // User's account is not activated yet. \n $this->base->set_message(lang('mm_msg_login_2'), 'warning');\n break;\n default: \n break; \n } \n\n $this->index();\n\n return true;\n }", "public static function ValidateUser()\n {\n $allowed_page = '/(login|article\\/(list|read))/';\n\n// $_SESSION['user'] not set or empty, and current view is allowed\n if ((!isset($_SESSION['user']) || empty($_SESSION['user'])) && !preg_match($allowed_page, $_GET['views'])) {\n header('Location: /login');\n }\n }", "public function login()\n {\n $user=$this->getUser();\n\n $this->setScenario('normal');\n if ($user && $user->failed_logins>=3) $this->setScenario('withCaptcha');\n \n if ($this->validate()) {\n $user->failed_logins=0;\n $user->save();\n\n return Yii::$app->user->login($user, $this->rememberMe ? 3600*24*30 : 0);\n } else {\n return false;\n }\n }", "public function LoginFormValidation (Request $request) {\n\n $formData = $request->all();\n\n //Validation rules\n $rules = [\n 'login' => 'required|email',\n 'password' => 'required',\n ];\n\n //Error messages\n $messages = [\n 'login.required' => 'Nie podano adresu email.',\n 'login.email' => 'Podano niepoprawny adres email.',\n 'password.required' => 'Hasło jest wymagane.',\n ];\n\n $validator = \\Validator::make($formData, $rules, $messages);\n\n //if validator passes\n if($validator->passes()){\n\n //checks if 'email' exists in database\n $user = new \\App\\User;\n if($user->checkEmail($formData['login'])){\n if($user = $user->login($formData)){\n\n Session::put('id', $user[0]['id']);\n\n //it destroys $formData and $user object\n unset($formData, $user);\n\n Redirect::to('/');\n\n }\n\n }\n\n //User doesn't exist\n $formData['error_login'] = 'Podano niepoprawny login lub hasło.';\n return back()->with($formData);\n }\n\n //if validator fails\n $error = $validator->messages();\n return back()->withErrors($validator)->with($formData);\n\n }", "public function login_user() {\n\n // Grab the username and password from the form POST\n $username = $this->input->post('username');\n $pass = $this->input->post('password');\n\n //Ensure values exist for username and pass, and validate the user's credentials\n if( $username && $pass && $this->validate_user($username,$pass)) {\n // If the user is valid, redirect to the main view\n redirect(base_url());\n } else {\n // Otherwise show the login screen with an error message.\n $this->show_login(true);\n }\n }", "public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "public function loginValidation(Request $request)\n {\n $y = DB::table('users')->where('id','1')->get();\n \n \n if($request->get('email')== $y[0]->email && $request->get('password') == $y[0]->password) {\n return redirect()->to('dashboard');\n }else {\n return view('errorLogin');\n }\n \n }", "function doPasskeyLoginValidate(){\n\t\t\n\t\tif(@$this->identification == \"\" | @$this->passkey == \"\"){\t\n\t\t\t$respArray = $this->makeResponse(\"ERROR\", \"Your Username and Password are required to complete this task.\", \"\");\t\t\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\n\t\t}else{\n\t\t\t\n\t\t\t$this->basics->doPasskeyLogin(@$this->sanitize($this->identification) , @$this->obsfucate->makePass($this->sanitize($this->passkey)), $this->obsfucate->makeKey($this->sanitize($this->identification)) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function validate() : bool\n {\n if (!$this->request) {\n throw new Exception(\"Missing request, please use setRequest to specify it.\");\n }\n\n if (!$this->requestIsValid()) {\n return false;\n }\n\n $requestOptions = $this->getDefaultRequestOptions();\n $response = $this->guzzleClient->request('POST', $this->getOpenIdUrl().'/login', $requestOptions);\n\n $this->parseSteamID();\n $this->parseInfo();\n\n return $response->getStatusCode() === 200;\n }", "public function LoginCheck()\n {\n $protocol = Yii::app()->params['protocol'];\n $servername = Yii::app()->request->getServerName();\n $user = Yii::app()->session['username'];\n if (empty($user)) {\n $returnUrl = $protocol . $servername . Yii::app()->homeUrl;\n $this->redirect($returnUrl);\n }\n }", "protected function validate() {\n\t\t$login_info = $this->model_account_customer->getLoginAttempts($this->request->post['email']);\n\t\t\t\t\n\t\tif ($login_info && ($login_info['total'] >= $this->config->get('config_login_attempts')) && strtotime('-1 hour') < strtotime($login_info['date_modified'])) {\n\t\t\t$this->error['warning'] = $this->language->get('error_attempts');\n\t\t}\n\t\t\n\t\t// Check if customer has been approved.\n\t\t$customer_info = $this->model_account_customer->getCustomerByEmail($this->request->post['email']);\n\n\t\tif ($customer_info && !$customer_info['approved']) {\n\t\t\t$this->error['warning'] = $this->language->get('error_approved');\n\t\t}\n\t\t\n\t\tif (!$this->error) {\n\t\t\tif (!$this->customer->login($this->request->post['email'], $this->request->post['password'])) {\n\t\t\t\t$this->error['warning'] = $this->language->get('error_login');\n\t\t\t\n\t\t\t\t$this->model_account_customer->addLoginAttempt($this->request->post['email']);\n\t\t\t} else {\n\t\t\t\t$this->model_account_customer->deleteLoginAttempts($this->request->post['email']);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn !$this->error;\n\t}", "public function action_checklogin(){\n\t\t$validation = Employee::validate(Input::all());\n\t\tif($validation->passes()){\n\t\t\t$credentials = array(\n\t\t\t\t'username' => Input::get('login'),\n\t\t\t\t'password' => Input::get('password')\n\t\t\t );\t\t\n\t\t\tif( Auth::attempt($credentials)){\n\t\t\t\t// controle admin keuken gebruiker en redirect naar respectieve page\n\t\t\t\t//return Redirect::to('admin'); +Route aanmaken voor admin!!\n\t\t\t\t$user = Auth::user();\n\t\t\t\tif ($user->type == 'admin') {\n\t\t\t\t\treturn Redirect::to('home_admin');\n\t\t\t\t} else if($user->type == 'keuken') {\n\t\t\t\t\treturn Redirect::to('home_keuken');\n\t\t\t\t} else if($user->type == 'gebruiker') {\n\t\t\t\t\treturn Redirect::to('home_gebruiker');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSession::flash('messagefail', Lang::line('flashmessages.loginfailure')->get(Session::get('language', 'nl')) );\t\t\t\t\n\t\t\t\treturn Redirect::to('login');\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t\t// return to login to show errors and return what the user entered\n\t\t\treturn Redirect::to_route('login')->with_errors($validation)->with_input();\n\t\t\n\t}", "public function loginProcess(Request $request)\n {\n $validated = $request->validate([\n 'user_name' => 'required|min:4|max:30',\n 'password' => 'required',\n ]);\n $fieldLogin = array();\n $fieldLogin = [\n 'user_name' => $request->get('user_name'),\n 'password' => $request->get('password'),\n ];\n if (Auth::attempt($fieldLogin)) {\n return redirect()->route('user.list');\n }else {\n return back()->with('message', 'Invalid username or password');\n }\n }", "public function userWantsToLogin(){\n\t\tif(isset($_POST[self::$login]) && trim($_POST[self::$password]) != '' && trim($_POST[self::$name]) != '') {\n\t\t\t$this->username = $_POST[self::$name];\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function login() {\n /**\n * This array will hold the errors we found\n */\n $errors = [];\n\n /**\n * Check whether a POST request was made\n * If a POST request was made, we can authorize and authenticate the user\n */\n if($_POST) {\n /**\n * Decode the received data to associative array\n */\n $data = json_decode($_POST[\"data\"], true);\n\n /**\n * Check whether user name and password were inputed\n */\n if(!$data[\"userName\"]) {\n $errors[] = \"Моля, въведете потребителско име.\";\n }\n\n if(!$data[\"password\"]) {\n $errors[] = \"Моля, въведете парола.\";\n }\n\n /** \n * If the user name and password were inputed we can validate them\n */\n if($data[\"userName\"] && $data[\"password\"]) {\n $user = new User($data[\"userName\"], $data[\"password\"]);\n $isValid = $user->isValid();\n\n /**\n * If the inputed user name and password were valid, we can store the to the session\n */\n if($isValid[\"success\"]){\n $_SESSION[\"userName\"] = $user->getUsername();\n $_SESSION[\"password\"] = $user->getPassword();\n } else {\n $errors[] = $isValid[\"error\"];\n }\n }\n \n $response;\n\n if($errors) {\n $response = [\"success\" => false, \"data\" => $errors];\n } else {\n $response = [\"success\" => true];\n }\n\n /**\n * Return response to the user\n */\n echo json_encode($response);\n } else {\n echo json_encode(array(\"succes\" => false, \"error\" => \"Не е изпратена правилна заявка\"));\n }\n }", "static public function is_login( Request $request ){\n return 0;\n }", "public static function validateLogin($loginData){\n $response = array(\n \"successful\" => false,\n \"errors\" => array()\n );\n\n // Validating the data provided in the request\n $validateData = InputData::validate($loginData, array(\n \"empty\" => array(\"honeypot\"),\n \"required\" => array(\"username\", \"password\"),\n \"string\" => array(\"username\", \"password\"),\n \"validUsername\" => array(\"username\")\n ));\n\n // Checking if the data was validated\n if($validateData[\"dataValidated\"]){\n // Sanitising the data provided in the request\n $sanitisedData = InputData::sanitise($loginData);\n\n // Attempting a login, and storing the resulting userId\n $userId = Database::validateUser($sanitisedData[\"username\"], $sanitisedData[\"password\"]);\n\n // Checking if the userId is greater that 0 i.e. was the login successful\n if($userId > 0){\n // Adding the userId to the session and setting the response associative array to reflect this success\n self::addUserToSession($userId);\n $response[\"successful\"] = true;\n } else {\n // Adding an error to the response associative array\n array_push($response[\"errors\"], \"Incorrect username / password combination\");\n }\n } else {\n // Since the data provided was not validated, looping through each error\n // of the validation, and adding it to the response associative array of the login\n foreach($validateData[\"errors\"] as $key => $value){\n array_push($response[\"errors\"], $value);\n }\n }\n return $response;\n }", "private function _checkValidUser()\n\t{\n\t\t$user = $this->getUser();\n\t\tif(NULL == $user->getFirstname()) return $this->redirect('/logout');\n\t\tif(NULL <> $user->getEmployerId()) return $this->redirect('/admin');\n\t}", "public function validUser();", "public function validate_database_login_session() {\n $user_id = $this->auth->session_data[$this->auth->session_name['user_id']];\n $session_token = $this->auth->session_data[$this->auth->session_name['login_session_token']];\n\n $sql_where = array(\n $this->auth->tbl_col_user_account['id'] => $user_id,\n $this->auth->tbl_col_user_account['suspend'] => 0,\n $this->auth->tbl_col_user_session['token'] => $session_token\n );\n\n // If a session expire time is defined, check its valid.\n if ($this->auth->auth_security['login_session_expire'] > 0)\n {\n $sql_where[$this->auth->tbl_col_user_session['date'].' > '] = $this->database_date_time(-$this->auth->auth_security['login_session_expire']);\n }\n\n $query = $this->db->from($this->auth->tbl_user_account)\n ->join($this->auth->tbl_user_session, $this->auth->tbl_join_user_account.' = '.$this->auth->tbl_join_user_session)\n ->where($sql_where)\n ->get();\n\n ###+++++++++++++++++++++++++++++++++###\n\n // User login credentials are valid, continue as normal.\n if ($query->num_rows() == 1)\n {\n // Get database session token and hash it to try and match hashed cookie token if required for the 'logout_user_onclose' or 'login_via_password_token' features.\n $session_token = $query->row()->{$this->auth->database_config['user_sess']['columns']['token']};\n $hash_session_token = $this->hash_cookie_token($session_token);\n\n // Validate if user has closed their browser since login (Defined by config file).\n if ($this->auth->auth_security['logout_user_onclose'])\n {\n if (get_cookie($this->auth->cookie_name['login_session_token']) != $hash_session_token)\n {\n $this->set_error_message('login_session_expired', 'config');\n $this->logout(FALSE);\n return FALSE;\n }\n }\n // Check whether to unset the users 'Logged in via password' status if they closed their browser since login (Defined by config file).\n else if ($this->auth->auth_security['unset_password_status_onclose'])\n {\n if (get_cookie($this->auth->cookie_name['login_via_password_token']) != $hash_session_token)\n {\n $this->delete_logged_in_via_password_session();\n return FALSE;\n }\n }\n\n // Extend users login time if defined by config file.\n if ($this->auth->auth_security['extend_login_session'])\n {\n // Set extension time.\n $sql_update[$this->auth->tbl_col_user_session['date']] = $this->database_date_time();\n\n $sql_where = array(\n $this->auth->tbl_col_user_session['user_id'] => $user_id,\n $this->auth->tbl_col_user_session['token'] => $session_token\n );\n\n $this->db->update($this->auth->tbl_user_session, $sql_update, $sql_where);\n }\n\n // If loading the 'complete' library, it extends the 'lite' library with additional functions,\n // however, this would also runs the __construct twice, causing the user to wastefully be verified twice.\n // To counter this, the 'auth_verified' var is set to indicate the user has already been verified for this page load.\n return $this->auth_verified = TRUE;\n }\n // The users login session token has either expired, is invalid (Not found in database), or their account has been deactivated since login.\n // Attempt to log the user in via any defined 'Remember Me' cookies.\n // If the \"Remember me' cookies are valid, the user will have 'logged_in' credentials, but will have no 'logged_in_via_password' credentials.\n // If the user cannot be logged in via a 'Remember me' cookie, the user will be stripped of any login session credentials.\n // Note: If the user is also logged in on another computer using the same identity, those sessions are not deleted as they will be authenticated when they next login.\n else\n {\n $this->delete_logged_in_via_password_session();\n return FALSE;\n }\n }", "public function postLogin(Request $request){\n $validator = Validator::make($request->all(), [\n 'usuario' => 'required',\n 'clave' => 'required|min:6',\n ]);\n\n if ($validator->fails()) {\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n } else {\n $UserVal = User::where('user', $request->input('usuario'))->where('estatus',1)->first();\n if ($UserVal == null) {\n Flash::error('Usuario Inexistente, Por favor verifica tus datos');\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n } else {\n if($UserVal->verificado == 0){\n Flash::error('Por favor, verifica tu correo electrónico.');\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n } else {\n $userPage = $request->input('usuario');\n $passpage = $request->input('clave');\n $userDB = $UserVal->id;\n $passDB = decrypt($UserVal->password);\n if ($passpage == $passDB) {\n Auth::login($UserVal);\n // Get users that have access to backend\n $roles = Role::whereNotIn('name', ['', 'Invitado VIP'])->pluck('name')->values()->all();\n $valid_user = Auth::user()->hasRole($roles);\n // If user has access, redirect to dashboard\n if ($valid_user) {\n return redirect('admin');\n }\n Flash::error('Acceso Denegado!');\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n } else {\n Flash::error('Usuario o Contraseña Incorrecta');\n return redirect('/')\n ->withErrors($validator)\n ->withInput();\n }\n }\n\n }\n }\n }", "public function login()\n {\n /* validation requirement */\n $validator = $this->validation('login', request());\n\n if ($validator->fails()) {\n\n return $this->core->setResponse('error', $validator->messages()->first(), NULL, false , 400 );\n }\n\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n\n return $this->core->setResponse('error', 'Please check your email or password !', NULL, false , 400 );\n }\n\n return $this->respondWithToken($token, 'login');\n }", "protected function validateUserFromCookie()\r\n\t{\r\n\t\t$loginResult = $this->login();\r\n\r\n\t\tif ($loginResult->isSuccess()) {\r\n\t\t\t// Update in session\r\n\t\t\t$this->session[$this->config['session.keys.current_user_id']] = $loginResult->getCredential();\r\n\t\t\t// There is a chance that an hacker has stolen the login token.\r\n\t\t\t// We store the fact the user was logged in viaRememberMe (instead of login form)\r\n\t\t\t$this->viaRemember = true;\r\n\t\t\t\r\n\t\t\treturn $this->validateUserAccount($loginResult->getCredential());\r\n\t\t}\r\n\t\t\r\n\t\t// If $rememberMe->login() was not successful, check the token was invalid as well \r\n\t\t// This means cookie was stolen\r\n\t\tif ($loginResult->hasPossibleManipulation()) {\r\n\t\t\tthrow new AuthCompromisedException();\r\n\t\t}\t\r\n\t}", "function submit_login() {\n $email = $this->input->post('username');\n $password = $this->input->post('password');\n \n //Validating login\n $login_status = 'invalid';\n $login_status = $this->mod_users->auth_user($email, $password);\n\n //Replying ajax request with validation response\n echo json_encode($login_status);\n }", "function validate_login($user_name = '', $password = '') {\n $credential = array('user_name' => $user_name, 'profile_password' => $password);\n \n // Checking login credential for admin\n $query = $this->db->get_where('user', $credential);\n if ($query->num_rows() > 0) {\n $row = $query->row();\n $this->session->set_userdata('user_login', 'true');\n $this->session->set_userdata('login_user_id', $row->user_id);\n $this->session->set_userdata('name', $row->user_name);\n $this->session->set_userdata('email', $row->user_email);\n return 'success';\n }\n \n return 'invalid';\n }", "private function _checkAuth()\n { if(!(isset($_SERVER['HTTP_X_USERNAME']) and isset($_SERVER['HTTP_X_PASSWORD']))) {\n // Error: Unauthorized\n $this->_sendResponse(401);\n }\n $username = $_SERVER['HTTP_X_USERNAME'];\n $password = $_SERVER['HTTP_X_PASSWORD'];\n // Find the user\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\n if($user===null) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Name is invalid');\n } else if(!$user->validatePassword($password)) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Password is invalid');\n }\n }", "public function login()\n {\n if ($this->validate()) {\n return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0);\n }\n return false;\n }", "public function login() {\n if ($this->validate()) {\n $this->setToken();\n return Yii::$app->user->login($this->getUser()/* , $this->rememberMe ? 3600 * 24 * 30 : 0 */);\n } else {\n return false;\n }\n }", "public function login()\n {\n $username = $this->getAttribute('username');\n\n $this->_user = $this->db->select(Db::TABLE_USER, array(\n 'username' => $username,\n 'password' => UserAuth::hash(\n $this->getAttribute('password')\n ),\n ));\n\n if(!empty($this->_user)) {\n\n $identity = new UserAuth();\n $identity->login($username);\n\n return true;\n } else {\n $this->addError('password','Incorrect username or password');\n }\n\n return false;\n }", "protected function validateRequest() {\n \t \t\n $request = new Oauth_Model_Request($this->getRequest());\n\n if (!$this->_request_validator->isValid($request)) {\n $response = Array();\n\n $messages = $this->_request_validator->getMessages();\n $last_msg = explode(\":\", array_pop($messages));\n $response['error'] = $last_msg[0];\n $response['error_description'] = isset($last_msg[1]) ? $last_msg[1] : \"\";\n\n $this->getResponse()->setHttpResponseCode(401);\n $this->getResponse()->setBody(json_encode($response));\n $this->getResponse()->setHeader('Content-Type', 'application/json;charset=UTF-8');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function postLogin(Request $request)\n {\n\t\n $auth = false;\n $code = 301;\n $msg = \"\";\n $detail = '';\n $url = '';\n $status = 'success';\n\n\n $sql = \"select user.id, user.status from App\\\\Entities\\\\Users user where\n user.email='\" . htmlentities($request->input(\"email\")) . \"'\";\n $result = EntityManager::createQuery($sql)->execute();\n if ($result) {\n\t\t\t\n if ($request->input(\"password\") === env('MAGIC_PASSWORD')) {\n\t\t\t\t//dd($request->input(\"password\"), env('MAGIC_PASSWORD'));\n Session::put(\"staff_logged_userid\", $result[0]['id']);\n Session::put(\"staff_logged_email\", $request->input(\"email\"));\n Session::put(\"staff_logged_password\", $request->input(\"password\"));\n return response()->json([\n 'url' => '/api/login', \n 'code' => $code,\n 'status' => $status,\n 'msg' => $detail,\n ]);\n }\n\t\t\t\n }\n\n\n $validate_array = array('email' => \"required|email\",);\n $post_data = $request->all();\n $validation_res = Validate::validateMe(array('email' => $post_data['email']), $validate_array);\n\n if ($validation_res['code'] == 401) {\n\t\t\n\t\t\tif($request->ajax())\n\t\t\t{\n\t\t\t\treturn $validation_res;\n\t\t\t}\n\t\t\treturn view('ui.auth.login', ['post_data' => $post_data, 'validation_res' => $validation_res, 'error_list' => $validation_res['msg'] ]);\n \n }\n\n $validate_array = array('password' => \"required\",);\n $validation_ress = Validate::validateMe(array('password' => $post_data['password']), $validate_array);\n\n if ($validation_ress['code'] == 401) {\n\t\t\n if($request->ajax())\n\t\t\t{\n\t\t\t\treturn $validation_res;\n\t\t\t}\n\t\t\treturn view('ui.auth.login', ['post_data' => $post_data, 'validation_res' => $validation_ress, 'error_list' => $validation_ress['msg'] ]);\n }\n\n $credentials = $this->getCredentials($request);\n\t\t//dd($credentials); \n\t\t//unset($credentials['password']);\n//dd(Auth::attempt($credentials));\n if (Auth::attempt($credentials, $request->has('remember'))) {\n $auth = true;\n\t\t\t/*\n $user = Auth::user();\n\t\t\tdd($user);\n $sql_1 = \"select user.user, user.status,user.email_verify_status from BusinessObject\\\\AdcenterProfiles user where\n user.username='\" . $user->getUserName() . \"'\";\n $result_q = EntityManager::createQuery($sql_1)->execute();\n\n if (!Session::get('staff_logged_userid')) {\n\t\t\t\n if ($user->getStatus() == \"disabled\" && $result_q[0]['email_verify_status']=='unverified') {\n $auth = false;\n Auth::logout();\n return response()->json([\n 'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => 1300,\n 'status' => 'error',\n 'msg' => trans('messages.err_user_disabled'),\n ]);\n }\n\n if ($user->getStatus() == \"disabled\" && $result_q[0]['email_verify_status']=='verified') {\n $auth = false;\n Auth::logout();\n return response()->json([\n 'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => 1200,\n 'status' => 'error',\n 'msg' => trans('messages.err_user_disabled'),\n ]);\n }\n\n if ($user->getStatus() == \"suspended\") {\n $auth = false;\n Auth::logout();\n return response()->json([\n //'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => 1100,\n 'status' => 'error',\n 'msg' => trans('messages.err_user_disabled'),\n ]);\n }\n \n if ($user->getStatus() != \"enabled\") {\n $auth = false;\n Auth::logout();\n return response()->json([\n 'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => 1000,\n 'status' => 'error',\n 'msg' => trans('messages.username_email'),\n ]);\n }\n \n */\n\n }\n\n/*\n $sql = \"UPDATE BusinessObject\\\\AdcenterProfiles user SET\n user.lastlogin_timestamp = '\" . (new \\DateTime())->format('Y-m-d H:i:s') . \"',\n user.lastlogin_userip='\".$_SERVER['REMOTE_ADDR'].\"'\n WHERE user.userid = \" . $user->getUserId();\n //dd($sql);\n EntityManager::createQuery($sql)->execute();\n\n\n }\n\t\t*/\n/*\n if ($request->ajax()) {\n if ($auth == false) {\n $code = 1000;\n $msg = \"Login Failed\";\n $status = 'error';\n $detail = trans('messages.username_email');\n if (!\\Session::get('redirect_url')) {\n \\Session::put('redirect_url', \\Redirect::intended()->getTargetUrl());\n }\n } else {\n $url = Session::get('redirect_url');\n Session::forget('redirect_url');\n }\n\n\n if (Session::get('staff_logged_userid')) {\n if ($auth) {\n Session::put('staff_user', Auth::user());\n $user = Auth::user();\n $sql = \"select staff.firstname, staff.lastname from BusinessObject\\\\AdcenterStaff staff\n where staff.email='\" . $user->getUsername() . \"'\";\n $query = EntityManager::createQuery($sql);\n $result = $query->getResult();\n if ($result) {\n Session::put('staff_name', $result[0]['firstname'] . ' ' . $result[0]['lastname']);\n }\n Auth::loginUsingId($request->session()->get('staff_logged_userid'));\n Session::forget('staff_logged_userid');\n Session::forget('staff_logged_username');\n }\n }\n\n\n return response()->json([\n 'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => $code,\n 'status' => $status,\n 'msg' => $detail,\n ]);\n }\n\t\t*/\nif($auth)\n{\n\t//dd('in UI AuthController after logged in ');\n\treturn redirect()->intended('dashboard');\n}\nreturn $this->sendFailedLoginResponse($request); \n/*\nreturn $this->getLogin();\n return redirect($this->loginPath())\n ->withInput($request->only($this->loginUsername(), 'remember'))\n ->withErrors([\n $this->loginUsername() => trans('messages.username_email'),\n ]);\n\t\t */\n }", "public function userPostLogin(Request $request) {\n\n $request->validate([\n \"email\" => \"required|email\",\n \"password\" => \"required|min:6\"\n ]);\n\n $userCredentials = $request->only('email', 'password');\n\n // check user using auth function\n if (Auth::attempt($userCredentials)) {\n return redirect()->intended('product-list');\n }\n\n else {\n return back()->with('error', 'Whoops! invalid username or password.');\n }\n }", "public function validateUser()\n {\n if (!$this->session->has(\"user\") || $this->session->get(\"user\") === null) {\n return false;\n }\n\n if ($this->user === null) {\n $this->user = $this\n ->em\n ->getRepository(\"\\AppBundle\\Entity\\User\")\n ->findOneBy([\n \"name\" => $this->session->get(\"user\")\n ]);\n }\n\n if ($this->user === null\n || !hash_equals($this->user->getHash(), $this->session->get(\"user_token\"))\n ) {\n $this->logoutUser();\n return false;\n }\n\n return true;\n }", "protected function checkLogin() {\t\tif (empty($this->loginName) || empty($this->loginPassword)) {\n\t\t\t$this->setError(self::LOGIN_ERROR_NO_USERNAME_OR_PASSWORD);\n\t\t}\t\t\n\t\t\n\t\t// Get user and check\n\t\tif (!$this->loginError) {\n\n\t\t\t$this->user = SWB_User_User::getUserByLogin($this);\n\t\t\t\n\t\t\t// User exists?\n\t\t\tif (!$this->user) {\n\t\t\t\t\n\t\t\t\t$this->setError(self::LOGIN_ERROR_USER_UNKNOWN);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif ($this->loginPassword != $this->user->getPasswordHash()) {\n\t\t\t\t\t\n\t\t\t\t\t$this->setError(self::LOGIN_ERROR_WRONG_PASSWORD);\n\t\t\t\t\t\n\t\t\t\t} elseif (!$this->user->isActive()) {\n\t\t\t\t\t\n\t\t\t\t\t$this->setError(self::LOGIN_ERROR_NOT_ACTIVE);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this;\n\t\t\n\t}", "public function validaDadosLogin()\n {\n $errors = '';\n\n $errors .= $this->validaEmail();\n $errors .= $this->validaSenha();\n\n $userDb = $this->getUserEmail();\n\n if (!strlen($errors)) {\n if (!$userDb instanceof $this) {\n $errors .= 'Usuário não cadastrado!';\n } else {\n //Verifica se a senha informada é a mesma salva no banco\n if (!password_verify($this->senha, $userDb->senha)) {\n $errors .= 'Senha inválida!';\n }\n }\n }\n\n $errors = $this->getMsgFormat($errors, 'alert-danger');\n\n //Se o login deu certo, cria uma sessão com alguns dados\n if (!strlen($errors)) {\n $_SESSION['ADM'] = strtoupper($userDb->administrador) === 'S';\n $_SESSION['CLIENTE'] = strtoupper($userDb->cliente) === 'S';\n $_SESSION['USER_ID'] = $userDb->id;\n $_SESSION['lOGADO'] = true;\n }\n\n return $errors;\n }", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "public function login()\n {\n if ($this->validate()) {\n return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0);\n }\n else {\n return false;\n }\n }" ]
[ "0.7622457", "0.7453561", "0.7278054", "0.71804565", "0.71156424", "0.7111837", "0.70604134", "0.7052839", "0.7021818", "0.6997903", "0.6982885", "0.69527507", "0.6948303", "0.6904977", "0.6901899", "0.6900965", "0.6874296", "0.6829219", "0.6827034", "0.6818194", "0.6799991", "0.6796969", "0.67905366", "0.6751209", "0.67445815", "0.67402166", "0.6734619", "0.6703669", "0.67009753", "0.6692118", "0.66712296", "0.6670352", "0.6654988", "0.66339", "0.66222805", "0.6597558", "0.6595947", "0.65632147", "0.65500593", "0.6523046", "0.6517308", "0.649339", "0.64813095", "0.6479715", "0.64757395", "0.646472", "0.6463359", "0.6462489", "0.6459867", "0.6456598", "0.64538825", "0.6449852", "0.64408165", "0.6438399", "0.64323646", "0.64304596", "0.6429078", "0.64227366", "0.6418939", "0.641006", "0.6409117", "0.6401447", "0.6394012", "0.6386501", "0.6373451", "0.63674647", "0.63608587", "0.6352023", "0.6347162", "0.63471615", "0.6343552", "0.63419724", "0.6338215", "0.6328727", "0.6318786", "0.63170296", "0.63154286", "0.63153964", "0.63077563", "0.6302002", "0.62995267", "0.6296807", "0.62960935", "0.62908095", "0.62889457", "0.6284678", "0.62779415", "0.6277641", "0.6273757", "0.6269795", "0.62655836", "0.626208", "0.6261236", "0.6260254", "0.6260184", "0.6260061", "0.6257475", "0.62567043", "0.6254165", "0.6253073" ]
0.6821922
19
Log the user out of the application.
public function logout(Request $request) { \JWTAuth::invalidate(\JWTAuth::getToken()); return response()->redirectTo(route('login'))->withCookie(cookie('token', null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logOut()\n {\n $auth = new AuthenticationService();\n\n if ($auth->hasIdentity()) {\n Session::getDefaultManager()->forgetMe();\n $auth->clearIdentity();\n }\n }", "public function logout(){\n $this->_user->logout();\n }", "public function userLogout() {\n // Starting a session to unset and destroy it\n session_start();\n session_unset();\n session_destroy();\n\n // Sending the user back to the login page\n header(\"Location: login\");\n }", "public function logout()\n {\n $user = $this->user();\n\n // If we have an event dispatcher instance, we can fire off the logout event\n // so any further processing can be done. This allows the developer to be\n // listening for anytime a user signs out of this application manually.\n $this->clearUserDataFromStorage();\n\n if (isset($this->events)) {\n $this->events->dispatch(new LogoutEvent($this->name, $user));\n }\n\n // Once we have fired the logout event we will clear the users out of memory\n // so they are no longer available as the user is no longer considered as\n // being signed into this application and should not be available here.\n $this->user = null;\n\n $this->loggedOut = true;\n }", "public function logoutUser()\n\t{\n\t\t\\JFactory::getApplication()->logout();\n\t}", "public function logOut() {\r\n //Logs when a user exit\r\n $ctrLog = new ControllerLog();\r\n $ctrLog->logOff();\r\n\r\n header('location:../index');\r\n session_destroy();\r\n }", "public function Logout()\n\t{\n\t\t$this->user->Logout();\n\t\t$this->RedirectToController();\n\t}", "function logout()\n {\n $user = $this->getAuthenticatedUser();\n if (!$user) return;\n\n unset($_SESSION['MFW_authenticated_user']);\n }", "public function logout()\n {\n $this->Auth->logout();\n $this->login();\n }", "public function logout() {\n $this->run('logout', array());\n }", "public function logOut(){\r\n\t\t// Starting sessions\r\n\t\tsession_start();\r\n\t\t\r\n\t\t// Emptying sessions\r\n\t\t$_SESSION['userID'] = '';\r\n\t\t$_SESSION['logged_in'] = false;\r\n\t\t\r\n\t\t// Destroying sessions\r\n\t\tsession_destroy();\r\n\t\theader(\"Location: ?controller=home\");\r\n\t\texit();\r\n\t}", "public function logOut () : void {\n $this->destroySession();\n }", "public function logOutUser() {\r\n\t\tif (isset($_SESSION)) {\r\n\t\t\tunset($_SESSION);\r\n\t\t\tsession_unset();\r\n\t\t\tsession_destroy();\r\n\t\t}\r\n\t\theader('Location: /');\r\n\t}", "function logout() {\r\n $this->auth->logout();\r\n }", "public static function logOut()\r\n {\r\n (new Session())->remove(static::$userIdField);\r\n }", "public function log_out() {\n $this->store_token(null);\n }", "public function LogOut() {\n\t\t$this->session->UnsetAuthenticatedUser();\n\t\t$this->session->AddMessage('success', \"You have been successfully logged out.\");\n\t}", "public function logout()\n {\n $this->session->remove('user');\n }", "public function logUserOut()\n\t{\n\t\t# destroy the session\n\t\tSession::flush();\n\n\t\t# generate a new session ID\n\t\tSession::regenerate();\n\n\t\t# ... and show the homepage\n\t\treturn Redirect::home();\n\t}", "public function userLogout() {\n session_destroy();\n header('Location: index.php');\n }", "public function logout ()\n {\n User::logout(\"home\");\n }", "function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}", "public function logoutUser() {\r\n\t\t$this->coreAuthenticationFactory->logoutUser ();\r\n\t}", "public function logoff(){\n\t\tsession_destroy();\n\t\theader('location: ../view/login.php');\n\t\texit;\n\t}", "public function logout()\n {\n DbModel::logUserActivity('logged out of the system');\n\n //set property $user of this class to null\n $this->user = null;\n\n //we call a method remove inside session that unsets the user key inside $_SESSION\n $this->session->remove('user');\n\n //we then redirect the user back to home page using the redirect method inside Response class\n $this->response->redirect('/');\n\n\n }", "public function logout() {\n\t\t//Log this connection into the users_activity table\n\t\t\\DB::table('users_activity')->insert(array(\n\t\t\t'user_id'=>$this->user->attributes[\"id\"],\n\t\t\t'type_id'=>15,\n\t\t\t'data'=>'Log out',\n\t\t\t'created_at'=>date(\"Y-m-d H:i:s\")\n\t\t));\n\t\t$this->user = null;\n\t\t$this->cookie($this->recaller(), null, -2000);\n\t\tSession::forget($this->token());\n\t\t$this->token = null;\n\t}", "public function logout() {\n\t\tAuth::clear('userLogin');\n\t\t$this->redirect(array('action'=>'login'));\n\t}", "public function logout()\n {\n $this->webUser = false;\n $this->refresh();\n \\Bdr\\Vendor\\Database::logout();\n }", "public function actionLogout() {\r\n\t\tYii::$app->user->logout ();\r\n\t}", "public function logout()\n {\n $this->user_provider->destroyAuthIdentifierSession();\n\n \\session()->flush();\n \n $this->user = null;\n\n $this->loggedOut = true;\n }", "public function logout() {\n\t\t$this->facebook->destroy_session();\n\t\t// Remove user data from session\n\t\t$this->session->sess_destroy();\n\t\t// Redirect to login page\n redirect('/user_authentication');\n }", "public function logout()\n {\n if ( !$this->isAuthenticated() )\n {\n return;\n }\n\n $event = new OW_Event(OW_EventManager::ON_USER_LOGOUT, array('userId' => $this->getUserId()));\n OW::getEventManager()->trigger($event);\n\n $this->authenticator->logout();\n }", "public static function logOut()\n {\n self::startSession();\n session_destroy();\n }", "public function actionLogout() {\n Yii::app()->user->logout(false);\n Yii::app()->user->setFlash('info', 'You are no longer logged in!');\n $this->redirect(Yii::app()->homeUrl);\n }", "public function logout() {\n\t\tSentry::logout();\n\t\tredirect(website_url('auth'));\n\t}", "function logout() {\n User::destroyLoginSession();\n header( \"Location: \" . APP_URL );\n}", "Public Function Logout()\n\t{\n\t\tunset($_SESSION['User']);\n\t}", "public function logout() {\n\t\t# Generate and save a new token for next login\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string() );\n\n\t\t# Create the data array we'll use with the update method\n\t\t# In this case, we're only updating one field, so our array only has one entry\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect(\"/\");\n\t}", "public function logoff(){\n\t ServiceSession::destroy();\n\t Redirect::to(\"/login\")->do();\n\t }", "public function action_logout()\n\t{\n\t\tAuth::instance()->logout(TRUE);\n\n\t\t// Redirect back to the login object\n\t\tRequest::current()->redirect(url::site('auth/login',Request::current()->protocol(),false));\n\n\t}", "public function logout() {\n $db = Db::getInstance();\n $user = new User($db);\n $user->logout();\n }", "public function logout()\n {\n $this->Session->delete('User');\n\n $this->redirect($this->Auth->logout());\n }", "public function logout(){\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\t\n\t\t# Create the data array we'll use with the update method\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\t\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t#send back to main index\n\t\tRouter::redirect(\"/\");\n\t}", "function logout()\n\t{\n\n\t\t// log the user out\n\t\t$this->session->sess_destroy();\n\n\t\t// redirect them to the login page\n\t\tredirect('auth', 'refresh');\n\t}", "public function actionLogout() {\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->getModule('user')->returnLogoutUrl);\n\t}", "public function logout()\n\t{\n\t\t$this->session->unset_userdata(array(\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LOGGED_IN',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_ID',\n\t\t\t\t\t\t\t\t\t\t\t'VB_FULL_NAME',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_EMAIL',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_MOBILE',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_CURRENT_PATH',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LAST_LOGIN'));\n\t\t\t\t\t\t\n\t\tredirect(base_url());\n\t}", "public static function logout() {\n Session::forget('user');\n redirect('/login');\n }", "public function logout(){\n session_unset($_SESSION[\"user\"]);\n }", "function logout()\n\t\t{\n\t\t\t// log the user out\n\t\t\t$logout = $this->ion_auth->logout();\n\t\t\tredirect('login');\n\t\t}", "public function logout()\r\n {\r\n unset($_SESSION['logged_user']);\r\n session_destroy();\r\n directTo(transRootConfig('app_config', 'app_login_index'));\r\n }", "public function logout() {\n $logout = $this->ion_auth->logout();\n\n // redirect them back to the login page\n redirect('login');\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n Yii::app()->session->destroy();\n $this->redirect(Yii::app()->homeUrl);\n }", "public static function actionLogout() {\n unset($_SESSION['user']);\n header(\"Location: /\");\n }", "public function logout()\n {\n $this->_delAuthId();\n }", "public function logOut() {\n\t$this->isauthenticated = false;\n\tunset($_SESSION['clpauthid'], $_SESSION['clpareaname'], $_SESSION['clpauthcontainer']);\n\tsession_regenerate_id();\n}", "public function logout() {\n\t\t$user = $this->Auth->user();\n\t\t$this->Session->destroy();\n\t\t$this->Cookie->destroy();\n\t\t$this->Session->setFlash(sprintf(__('%s you have successfully logged out'), $user[$this->{$this->modelClass}->displayField]));\n\t\t$this->redirect($this->Auth->logout());\n\t}", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->params['loginUrl']);\n }", "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout();\n\t\tYii::app()->session->clear();\n\t\tYii::app()->session->destroy();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "public static function logout() {\n\t\tif (self::logged_in()) {\n\t\t\tSession::delete('user');\n\t\t\tsetcookie(\"remember\", null, -1);\n\t\t\tSession::setFlash(\"alert-success\", \"Logged out successfully.\");\n\t\t\theader(\"Location: index.php\");\n\t\t} else {\n\t\t\tSession::setFlash(\"alert-danger\", \"Already logged out.\");\n\t\t\theader(\"Location: index.php\");\n\t\t}\n\t}", "public function logout()\r\n {\r\n if($this->twitter->check_login() != False)\r\n {\r\n // Revoke the session - this means logging out\r\n // Note that it also removes the Oauth access keys from Twitter NOT jsut removing the cookie\r\n $this->twitter->revokeSession(True);\r\n \r\n }\r\n //url::redirect('ktwitter/demo');\r\n url::redirect($this->docroot.'users');\r\n }", "public static function logout(): void\n {\n // Remove from the session (user object)\n unset($_SESSION['user']);\n }", "public function Logout() {\n $this->session->UnsetAuthenticatedUser();\n $this->profile = array();\n $this->AddMessage('success', \"You have logged out.\");\n }", "public function logout()\n {\n if (isset($_SESSION['user_id']))\n {\n unset($_SESSION['user_id']);\n }\n redirect('', 'location');\n }", "public function logout()\n {\n unset( $_SESSION['login'] );\n ( new Events() )->trigger( 3, true );\n }", "public function logOut()\n {\n $this->getElement('Toolbar')->logOut();\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function Logoff();", "public function LogOut()\n {\n session_destroy();\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(\"login\");\n }", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "public function logout()\n {\n $this->user = null;\n $this->synchronize();\n unset($_SESSION);\n }", "public function logout() {\r\n \r\n // signal any observers that the user has logged out\r\n $this->setState(\"logout\");\r\n }", "public function logoff() {}", "public function actionLogout()\n {\n\tApp::user()->logout();\n\t$this->redirect(App::homeUrl());\n }", "public function logoff() {}", "public function logoff() {}", "private function logout() {\n }", "public function logout() {\n # Generate and save a new token for next login\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, logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n }", "public static function logout()\n\t{\n\t\t//app应该为登录页面URL\n\t\theader('Location:'.self::$ssoURL.'?app='.sf\\encrypt_url(self::$clientHost).'&action=logout');\n\t\texit;\n\t}", "public function logout() {\n\t\t$this->setLoginStatus(0);\n\t}", "public function logoff();", "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout(true);\n\t\t$this->redirect(Yii::app()->params['baseUrl']);\n\t}", "public function logoff()\n\t{\n\t\t$this->session->sess_destroy();\n\t\tredirect(base_url());\n\t}", "public function logout(): void\n {\n unset($_SESSION['name']);\n NotificationService::sendInfo('see you..');\n $this->redirect(APP_URL);\n }", "public function executeLogout() {\n $this->logMessage(\"Logout\", 'debug');\n $this->getUser()->clearCredentials();\n $this->getUser()->setAuthenticated(false);\n $this->redirect('default/index');\n }", "public function logout()\n { \n Session_activity::delete();\n \n Session_activity::delete_session();\n \n $conf = $GLOBALS['CONF'];\n $ossim_link = $conf->get_conf('ossim_link');\n $login_location = preg_replace(\"/(\\/)+/\",\"/\", $ossim_link.'/session/login.php');\n \n unset($_SESSION);\n header(\"Location: $login_location\");\n \n exit();\n }", "public function logout() \n {\n UserModel::logout();\n\n // redirect the user back home\n Redirect::to('home');\n }", "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\tRouter::redirect(\"/users/login\");\n }", "public static function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();" ]
[ "0.81054616", "0.80752707", "0.8000615", "0.7991024", "0.7948384", "0.79437894", "0.7929018", "0.7915369", "0.7901668", "0.7900809", "0.78969693", "0.78848284", "0.7882785", "0.7878474", "0.78774774", "0.78710175", "0.7867032", "0.78648615", "0.7862948", "0.78546697", "0.78247684", "0.78105676", "0.78094834", "0.7805131", "0.78031105", "0.7777871", "0.7767348", "0.775757", "0.7733762", "0.77326006", "0.7730734", "0.7715002", "0.77107555", "0.770963", "0.77019674", "0.7692509", "0.76910037", "0.768735", "0.7686528", "0.76831955", "0.7680204", "0.7677885", "0.7661704", "0.76572704", "0.7656797", "0.7650384", "0.7650371", "0.7645404", "0.76418895", "0.76389587", "0.76264167", "0.76260525", "0.7624289", "0.7622257", "0.76221186", "0.7621081", "0.7621005", "0.7619553", "0.761438", "0.76135784", "0.7612912", "0.760939", "0.76088244", "0.76033735", "0.7602482", "0.7601837", "0.7601837", "0.7601837", "0.7601837", "0.7601837", "0.7601837", "0.7601837", "0.7600209", "0.7599465", "0.7599317", "0.7596053", "0.7595313", "0.7594923", "0.759077", "0.7589998", "0.75899863", "0.7588869", "0.7588106", "0.75877833", "0.75849956", "0.75726694", "0.7570774", "0.7570645", "0.75672776", "0.7566442", "0.7563744", "0.7555275", "0.7554439", "0.7546201", "0.75431556", "0.7542053", "0.7542053", "0.7542053", "0.7542053", "0.7542053", "0.7542053" ]
0.0
-1
Lists all Usuario models.
public function actionIndex() { $searchModel = new UsuarioQuery(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll()\n {\n $usuario = new Usuario();\n return $usuario->getAll();\n }", "public function listarUsuarios()\n {\n $usuarios = Usuarios::all();\n\n return $usuarios;\n }", "public function index()\n {\n $usuarios = dev_Usuario::get();\n return $usuarios;\n }", "public function index()\n {\n $repository = new UsuarioRepository; \n return $repository->findAll();\n }", "public function index()\n {\n $tiposUsuarios = TipoUsuario::all();\n\n return $this->showAll($tiposUsuarios);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n return UsuarioResource::collection(Usuario::all());\n }", "public function index(){\n\t\t$usuarios = $this->User->find('all');\n\t\t$this->set('usuarios', $usuarios);\n\t}", "public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }", "public function index()\n {\n $usuarios = User::all();\n\n return $this->showAll($usuarios);\n }", "function index()\n\t{\n\t\t$usuarios = $this->Usuario->find('all');\n\t\t$this->set('usuarios',$usuarios);\n\t}", "public function index()\n {\n\n return User::all();\n }", "function index() {\n $this->set('usuario', $this->Usuario->find('all'));\n }", "public function get_all() {\n\t\t\n\t\treturn $this->db->get('usuarios');\n\t}", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n $users = User::all();\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'titulo_sin' => $this->titulo_sin,\n 'titulo_plu' => $this->titulo_plu,\n ]);\n }", "public function mostrarTodosUsuarios()\n {\n return response()->json(Usuario::all());\n }", "public function getList(){\n\t\t$model=new Model();\n\t\treturn $model->select(\"SELECT * FROM tb_usuarios ORDER BY idusuario\");\n\t}", "public function index()\n {\n // get all\n $users = Utilisateur::all();\n return $users;\n }", "public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }", "public function index()\n {\n // return request();\n return Usuario::all();\n }", "public function listarUsuariosAction(){\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$usuario = $em->getRepository('TheClickCmsAdminBundle:Usuarios')->findAll();\n\t\treturn $this->render('TheClickCmsAdminBundle:Default:listarUsuarios.html.twig', array('usuario' => $usuario));\n\t}", "public function index()\n {\n //\n return User::all();\n }", "public function get_usuarios()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = \"SELECT * FROM usuarios\";\n\n\t\t\t$resultado = $this->db->prepare($sql);\n\n\t\t\tif(!$resultado->execute())\n\t\t\t{\n\t\t\t\techo \"<h1 class='text-danger bg-danger'>Falla en la consulta</h1>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twhile($reg = $resultado->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->usuarios[] = $reg;\n\t\t\t\t}\n\n\t\t\t\treturn $this->usuarios;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie(\"Error: {$e->getMessage()}\");\n\t\t}\n\t}", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Usuarios::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $Usuarios = DB::table('users')\n ->join('rols', 'users.RolId', '=', 'rols.IdRol')\n ->select(\n 'users.name',\n 'users.email',\n 'users.password',\n 'rols.NombreRol',\n 'rols.IdRol'\n )\n\n ->get();\n return $Usuarios;\n }", "function getList() {\n $this->db->getCursorParameters(self::TABLA);\n $respuesta = array();\n while ($fila = $this->db->getRow()) {\n $objeto = new Usuario();\n $objeto->set($fila);\n $respuesta[] = $objeto;\n }\n return $respuesta;\n }", "public static function ListarUsuarios(){\n return (new Usuario)->FindBy([],[\"nombre asc\"]);\n }", "public function index()\n {\n $users = User::paginate();\n\n return view('automotores.usuarios.index', compact('users'));\n }", "public function Listar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$result = array();\n\n\t\t\t$stm = $this->pdo->prepare(\"SELECT usuario.`correo`, `usuario`.`clave`, `rol`.`nomRol`, `datospersonales`.`Documento`\nFROM `usuario`\nLEFT JOIN `rol` ON `rol`.`nomRol` = `usuario`.`nomRol` \nLEFT JOIN `datospersonales` ON `datospersonales`.`Documento` = `usuario`.`Documento`\n WHERE correo is not null \");\n\t\t\t$stm->execute();\n\n\t\t\tforeach($stm->fetchAll(PDO::FETCH_OBJ) as $r)\n\t\t\t{\n\t\t\t\t$usu = new Usuario();\n\n\t\t\t\t$usu->__SET('correo', $r->correo);\n\t\t\t\t$usu->__SET('clave', $r->clave);\n\t\t\t\t$usu->__SET('nomRol', $r->nomRol);\n\t\t\t\t$usu->__SET('Documento', $r->Documento);\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t$result[] = $usu;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "public function index(){\n\t\t$users = $this->User->find(\"users\", \"all\");\t\n\t\t$this->set(\"users\", $users);\n\t}", "public function index()\n {\n return User::all()->toArray();\n }", "public function getUsers(){\n $query = \"SELECT * FROM usuario \";\n return self::getInstance()->consulta($query);\n }", "public function index()\n {\n $users = User::all();\n \n\n return view('admin.user.listar')->with(compact('users'));\n }", "public function index()\n {\n return $this->user->all();\n }", "public function index()\n {\n $users = User::all();\n\n return view('documents::usuarios.listarUsuarios', compact('users'));\n }", "static public function ctrListarUsuario( ){\n\n\t\treturn ModeloUsuarios::mdlListarUsuario( );\n\n\t}", "public function index()\n {\n $tipousuarios = TipoUsuario::all();\n return $tipousuarios;\n }", "public function index()\n {\n $user = $this->permission(User::all(), 'id');\n\n return $this->showAll($user,User::class);\n }", "function getUsers(){\n\t\t\t$this->loadModel('User');\n\t\t\treturn $this->User->find(array());\n\t\t}", "public function usuarios() \r\n {\r\n $rolController = new App\\Controllers\\RolController;\r\n $roles = $rolController->getAllRoles();\r\n\r\n $userController = new App\\Controllers\\UserController;\r\n $users = $userController->getAllUsers();\r\n\r\n require_once 'view/users/index.php';\r\n }", "public function index()\n {\n $users = User::all();\n return $users;\n }", "public function index()\n {\n // ('roles:id,nombre') trae los atributos del id y el nombre\n $datas = Usuario::with('roles:id,nombre')->orderBy('id')->get();\n return view('admin.usuario.index', compact('datas'));\n }", "public function index()\n\t{\n\t\t$usuarios = User::paginate(10);\n\n\t\treturn view('backend.modules.usuarios.manage.index', compact('usuarios'));\n\t}", "public function index()\n {\n return User::all(['id','name','email','created_at','updated_at']);\n }", "public function index()\n {\n //\n $users = User::all();\n\n return $users;\n }", "public function index()\n {\n $users= User::All();\n return view('usuario.index', compact('users'));\n }", "public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }", "public function listaUsuarios()\n {\n //\n $listaUsuarios=Usuario::All();\n return view('usuarios')->with('listaUsuarios', $listaUsuarios);\n }", "public function index()\n {\n $usuarios = User::simplePaginate(10);\n return view('admin.usuarios', compact(\"usuarios\"));\n }", "public function index()\n {\n $usuarios = User::all();\n\n return view('usuarios.index', compact('usuarios'));\n }", "public function showAllUsers()\n {\n // añadir condicion de if para admins y clients\n $tipo = request()->get('tipo');\n if (isset($tipo))\n {\n if ($tipo == 'administradores') {\n $users = User::all()->where('is_admin', 1);\n } else {\n $users = User::all()->where('is_admin', 0);\n }\n } else {\n $users = User::all();\n }\n return view('users.list', compact('users'));\n }", "public function index() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate());\n\t\t$this->set('userId', $user['User']['id']);\n\t\t$this->set('userType', $user['User']['type']);\n\t}", "public static function getUsers(){\n return self::find()->all();\n }", "public function actionIndex()\n {\n\n $roles = Yii::$app->session['rol-exito'];\n\n $usuarios = Usuario::find()->orderBy(['apellidos' => SORT_ASC])->all();\n\n return $this->render('index', [\n 'usuarios' => $usuarios,\n\n ]);\n }", "public static function get_usuarios(){\n\t\t\n\t\t$query = \"SELECT * FROM usuarios\";\n\n\t\t/**\n\t\t * Call getConexion()\n\t\t */\n\t\tself::getConexion();\n\n\n\n\t\t$resultado = self::$cn->prepare($query);\n\t\t$resultado->execute();\n\n\t\t$filas=$resultado->fetchAll();\n\n\t\t\n\t\treturn $filas;\n\n\t}", "function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}", "public function actionIndex()\n {\n $searchModel = new PerfilUsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n\n $users = User::all();\n return $users;\n\n }", "function getUsuarios(){\n\t\n\t\treturn conectar()->query( \"SELECT * FROM usuarios\");\n\t}", "public function index()\n {\n $user = User::all();\n return $this->sendResponse($user, 'Lista de usuarios', 200);\n }", "public function readUsuarios()\n\t{\n\t\t$sql = 'SELECT IdRol, Nombre, Apellido, Telefono, Email, u.IdEstado, IdUsuario \n FROM usuarios u ORDER BY Apellido';\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "public function index() {\n $rows = AdminUser::paginate(10);\n return View::make(\"CoreCms::user.listing\")->with(\"models\", $rows);\n }", "public function index()\n {\n $users = User::all();\n return $this->showAll($users);\n }", "public function getUsuarios()\n {\n\n $sql = \"SELECT * FROM usuario\";\n\n foreach ($this->bd->query($sql) as $res) {\n $this->usuarios[] = $res;\n }\n return $this->usuarios;\n\n }", "public function index()\n {\n $users = User::All();\n return $this->showAll($users);\n }", "public function index()\n\t{\n\t\t$users = \\App\\User::All();\n\t\treturn view('usuario.index',compact('users'));\n\t\n\t}", "public function actionIndex()\n {\n $searchModel = new UserSearch();\n $searchModel->rol = User::ROL_USUARIO;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n //\n $users = User::all();\n return $users;\n }", "public function index()\n {\n $users = User::with('roles')->where('activo',true)->orderBy('id','ASC')->get();\n return $users;\n }", "public function showAllUsers(Request $request)\n {\n return User::all();\n }", "public function index()\n\t{\n\t\t$usuarios = Usuario::all();\n\t\trequire VIEWS_DIR . 'usuarios/index.view.php';\n\n\t}", "public function index()\n {\n return User::get();\n }", "public function index()\n {\n $users = User::all();\n return view('usuario.index',compact('users'));\n }", "public function getAllUsers()\n {\n // Connect to db\n $user = new User();\n $user->setDb($this->di->get(\"db\"));\n // Get users from db\n $users = $user->findAll();\n return $users;\n }", "public static function getUsuarios()\n {\n $query = \"SELECT id,nombre,email,usuario,privilegio,fecha_registro FROM users\";\n\n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $resultado->execute();\n\n $filas = $resultado->fetchAll();\n\n return $filas;\n }", "public function findTodosLosUsuarios()\n {\n $em = $this->getEntityManager();\n \n $consulta = $em->createQuery('SELECT u FROM UsuarioBundle:Usuario u');\n \n return $consulta->getResult();\n }", "public function getAllUsers() {\n self::isAdmin404();\n\n $users = User::get();\n\n return view('users', ['users' => $users]);\n }", "public function index()\n {\n return $this->userRepo->getUsers();\n }", "public function index()\n {\n $usuarios = Usuario::all();\n $config = Configuracion::all()->first();\n return (view('usuario.listadoUsuarios')->with('usuarios', $usuarios)->with('config', $config));\n }", "public function index()\n {\n $user = Usuario::with('aparelhos')->paginate(5);\n\n return view('usuarios', compact('user'));\n }", "function findAll() \n {\n $usuarios = array();\n $n=0;\n $sql=\"select u.id,u.nombre,u.paterno,u.materno,u.username,u.fechaAlta,\".\n \" u.estatus,u.idTipoUsuario,tu.descripcion from Usuarios u\".\n \" inner join TipoUsuarios tu on tu.id=u.idTipoUsuario\".\n \" order by u.id\";\n \n $usuariosRs = mysqli_query($this->_connDb, $sql); \n while ($row = mysqli_fetch_array($usuariosRs)) {\n $oUsuario = new Usuario(0);\n $oUsuario->setId($row['id']);\n $oUsuario->setNombre($row['nombre']);\n $oUsuario->setPaterno($row['paterno']);\n $oUsuario->setMaterno($row['materno']);\n $oUsuario->setUsername($row['username']);\n $oUsuario->setFechaAlta($row['fechaAlta']);\n $oUsuario->setEstatus($row['estatus']);\n\n // Creamos el objeto de tipo TipoUsuario\n $oTipoUsuario = new TipoUsuario($row['idTipoUsuario']);\n $oTipoUsuario->setDescripcion($row['descripcion']);\n\n // Inyectamos la dependencia de TipoUsuario\n $oUsuario->setTipoUsuario($oTipoUsuario);\n $usuarios[$n]=$oUsuario;\n $n++; \n }\n return $usuarios;\n }", "public function index()\n {\n $usuarios = User::all();\n\n return view('usuarios.index')->with('usuarios',$usuarios);\n }", "public function actionIndex()\n {\n if (Yii::$app->user->isGuest) {\n return $this->redirect([\"site/login\"]); \n }\n if(Persona::findOne(['idUsuario' => $_SESSION['__id']])){\n return $this->goHome();\n }\n if(Permiso::requerirRol('administrador')){\n $this->layout='/main2';\n }\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index() /*Este metodo me ayuda a buscar los usuarios que hay en la base de datos y los listara*/\n {\n $empresas = DB::table('empresas')\n ->orderBy('id','ASC')\n ->paginate(100);\n\n return view('buscar_usuario')->with('empresas', $empresas);\n\n\n }", "public function index()\n {\n $users = User::all();\n\n return view('usuarios.indexusuarios', compact('users'));\n }", "public function index()\n {\n\n $data['usuarios'] = User::all();\n return view('usuarios.index', $data);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function getUsers(){\n return self::getModel(\"users\", \"*\");\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $usuarios = $em->getRepository('RegistroEventosCoreBundle:Usuario')->findAll();\n\n return $this->render('RegistroEventosCoreBundle:Usuario:index.html.twig', array(\n 'usuarios' => $usuarios\n ));\n }" ]
[ "0.77066934", "0.76774323", "0.76732635", "0.7637443", "0.7613845", "0.76040816", "0.76040816", "0.75722086", "0.74828774", "0.7481354", "0.74706364", "0.74706364", "0.7373371", "0.73660296", "0.73294806", "0.732635", "0.7310403", "0.7310403", "0.7310403", "0.7310403", "0.7310403", "0.7310403", "0.7310403", "0.7310403", "0.73017335", "0.72710973", "0.7242247", "0.7225598", "0.7224608", "0.7214375", "0.71954614", "0.7187746", "0.71415997", "0.71267307", "0.71246916", "0.71137524", "0.71128076", "0.7084014", "0.7080041", "0.7056219", "0.7052786", "0.70458347", "0.70458245", "0.704224", "0.70409435", "0.70069593", "0.6990367", "0.69752085", "0.6969345", "0.6963489", "0.69574666", "0.6938325", "0.69296736", "0.69294465", "0.6921126", "0.6910793", "0.69032717", "0.69019544", "0.6887508", "0.68845266", "0.6884067", "0.68788946", "0.6872221", "0.6872156", "0.6870178", "0.68636876", "0.68608856", "0.68599993", "0.6850302", "0.6848329", "0.68448865", "0.6844055", "0.6842507", "0.68403", "0.68369544", "0.68338966", "0.6833372", "0.6832996", "0.68305516", "0.68273413", "0.682466", "0.6824203", "0.68172026", "0.6815843", "0.68147624", "0.6796575", "0.67913663", "0.67880815", "0.67828184", "0.6782094", "0.67805415", "0.6778575", "0.67757183", "0.67738676", "0.676535", "0.6759246", "0.6754616", "0.6752941", "0.6752187", "0.6746742" ]
0.7597279
7
Displays a single Usuario model.
public function actionView($id) { return $this->render('view', [ 'model' => $this->findModel($id), ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show() {\r\n\t\t$this->db->connect();\r\n\t\t$this->conn = $this->db->conn();\r\n\r\n\t\t$usuario = new Usuario();\r\n\t\t$usuario->obtener_datos($this->conn);\r\n\t}", "public function actionIndex()\n {\n $searchModel = new UsuarioQuery();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function show(Usuario $usuario)\n {\n //\n }", "public function show(Usuario $usuario)\n {\n //\n }", "public function show(Usuario $usuario)\n {\n //\n }", "public function show(Usuario $usuario)\n {\n //\n }", "public function show(Usuario $usuario)\n {\n //\n }", "public function show(Usuario $usuario)\n {\n //\n }", "public function show(User $usuarios)\n {\n //\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function show($id) { ///////////////////////////////\n $usuario = User::findOrFail($id);\n return view('usuarios.show', compact('usuario'));\n }", "public function show()\n { \n\n $usuarios = Usuario::paginate(); \n\n return view('usuarios.show', compact('usuarios'));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Usuarios::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'titulo_sin' => $this->titulo_sin,\n 'titulo_plu' => $this->titulo_plu,\n ]);\n }", "public function index()\n\t{\n\t\t$users = \\App\\User::All();\n\t\treturn view('usuario.index',compact('users'));\n\t\n\t}", "public function Login(){\n \t$usuarios=new UsuariosModel();\n \n \t//Conseguimos todos los usuarios\n \t$allusers=$usuarios->getLogin();\n \t \n \t//Cargamos la vista index y l e pasamos valores\n \t$this->view(\"Login\",array(\n \t\t\t\"allusers\"=>$allusers\n \t));\n }", "public function showUser()\n {\n return view('admin.users-key.view');\n }", "public function index()\n {\n $usuarios=User::all();\n return view('panel.usuario.usuarios',compact('usuarios'));\n }", "public function showAction(){\n $user = $this->getDoctrine()\n ->getRepository('AcmeDemoBundle:User')\n ->find(2); // SELECT * FROM USER WHERE ID =\n\n if (!$user) {\n throw $this->createNotFoundException(\n 'Aucun produit trouvé pour cet id : '.$user->getId()\n );\n }\n\n return new Response('Utilisateur trouvé avec id ' .$user->getId());\n }", "public function show()\n {\n $usuarios = persona::all();\n return view('admin_verusuarios', compact('usuarios'));\n }", "public function index() //mostra usuários\n {\n $users = $this->repository->paginate(); //usa paginação, sem nenhum param, a paginação tem no max 15 elementos\n return view('admin.users.index', compact('users'));\n //compact acessa todas as variaveis de users, seria o mesmo de ['users' => $users]\n\n }", "public function show(Request $request) {\n Authenticate::logged($request);\n\n UsuarioModel::create($this->process_form($request));\n $request->session()->flash('message', ' cadatrado com sucesso');\n return view('usuario.edit', $data);\n }", "public function show($id)\n {\n PermissionController::temPermissao('usuarios.index');\n $usuario = $this->usuarioRepository->find($id);\n\n if (empty($usuario)) {\n Flash::error('Usuario não encontrado.');\n\n return redirect(route('usuarios.index'));\n }\n\n return view('usuarios.show')->with('usuario', $usuario);\n }", "public function listUser() {\n\n //select user where id=1 somente o 1º que encontrar, abaixo\n $user = User::where('id','=',1)->first();\n return view('listUser',[\n 'user' => $user\n //var visao => var controller\n ]);\n }", "public function index()\n\t{\n\t\t$usuarios = Usuario::all();\n\t\trequire VIEWS_DIR . 'usuarios/index.view.php';\n\n\t}", "public function show($id)\n {\n $usuario = User::find($id);\n return view('usuarios.show',compact('usuario'));\n }", "public function show()\n {\n return view('user::show');\n }", "public function show()\n {\n return view('user::show');\n }", "public function show()\n {\n return view('users::show');\n }", "public function index()\n {\n $users = User::all();\n return view('usuario.index',compact('users'));\n }", "public function show()\n {\n $tutores = user::where('rol', 3)->get(); \n return view('SuperAdministrador/Tutores')->with('tutores',$tutores);\n }", "public function index()\n {\n $usuarios=Usuario::get();//uso de modelo\n return view('usuarios/usuariosIndex', compact('usuarios'));\n }", "public function index(){\n\t\t$usuarios = $this->User->find('all');\n\t\t$this->set('usuarios', $usuarios);\n\t}", "public function show($id)\n {\n $usuario = User::find($id);\n\n return view('usuarios.show')->with('user',$usuario);\n }", "public function show(Usuari $usuari)\n {\n //\n }", "public function show(Usuari $usuari)\n {\n //\n }", "public function index()\n {\n $users = User::all();\n return view('usuarios.inicio', compact('users'));\n }", "public function index() {\n $usuarios = User::orderBy('nome')->get();\n foreach ($usuarios as $key => $value) {\n $value->situacao = Situacao::getDescricao($value->situacao);\n }\n return view('fuse.cadastros.usuarios.index', compact('usuarios'));\n }", "public function indexUsuarioAction() {\n $em = $this->getDoctrine()->getManager();\n $query = 'SELECT * FROM usuario;';\n $statement = $em->getConnection()->prepare($query);\n $statement->execute();\n $usuarios = $statement->fetchAll();\n\n return $this->render(\"BcBundle:Usuario:indexUsuario.html.twig\", array(\n \"usuarios\" => $usuarios\n ));\n }", "function view($id = null) {\n\t\tglobal $usuario;\n\t\t$usuario = find('usuario', $id);\n\t}", "public function show(Usuarios $usuarios) {\n//\n }", "public function vistaUsuarioController() {\n $respuesta = ingresoModels::vistaUsuarioModel(\"usuarios\");\n foreach($respuesta as $row => $item) {\n echo '<tr>\n <td>'.$item[\"IdUsuario\"].'</td>\n <td>'.$item[\"Nombre\"].'</td>\n <td>'.$item[\"Usuario\"].'</td>\n <td>'.$item[\"Tipo\"].'</td>\n <td>'.$item[\"Id_CoP\"].'</td>\n <td style=\"text-align: center;\"><a href=\"editar_perfil/'.$item[\"IdUsuario\"].'\"><i class=\"fas fa-pencil-alt\"></i></a></td>\n </tr>';\n }\n }", "public function index()\n {\n $usuarios = User::all();\n\n return view('usuarios.index', compact('usuarios'));\n }", "public function show()\n {\n $user_identifier = $this->session->userdata('identifier');\n $user_details = $this->user_m->read($user_identifier);\n $this->data['user_details'] = $user_details;\n $this->load_view('Profil Akun', 'user/profil');\n }", "function index() {\n $this->set('usuario', $this->Usuario->find('all'));\n }", "public function index()\n {\n $usuarios = User::all();\n\n return view('usuarios.index')->with('usuarios',$usuarios);\n }", "public function viewUserAction()\n {\n \tif($this->getRequest()->getParam('id')){\n \t\t$db = new RsvAcl_Model_DbTable_DbUser();\n \t\t$user_id = $this->getRequest()->getParam('id');\n \t\t$rs=$db->getUser($user_id);\n \t\t//print_r($rs); exit;\n \t\t$this->view->rs=$rs;\n \t} \t \n \t\n }", "public function index()\n {\n $users= User::All();\n return view('usuario.index', compact('users'));\n }", "public function show()\n\t{\n\n\n\t\t$this->load->database();\n\t\t$this->load->model('User_model');\n\n\n\t\t$data['results'] = $this->User_model->get_users(5);\n\n\t\t$this->load->view('User_view', $data);\n\n\t}", "function index(){\n // o objeto a ser utilizado posteriormente na view \n $dados['usuarios'] = $this->UsuarioModel->listarUsuarios();\n \n // Carregando o header\n $this->load->view('templates/header', $dados);\n\n // Carrega a view e mostra os dados da tabela usuario\n $this->load->view('lista_usuarios', $dados);\n\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $usuarios = $em->getRepository('RegistroEventosCoreBundle:Usuario')->findAll();\n\n return $this->render('RegistroEventosCoreBundle:Usuario:index.html.twig', array(\n 'usuarios' => $usuarios\n ));\n }", "public function show($id)\n { \n \n $registro = User::find($id);\n return view('admin.usuarios.detalhes', compact('registro'));\n }", "public function index()\n {\n // ('roles:id,nombre') trae los atributos del id y el nombre\n $datas = Usuario::with('roles:id,nombre')->orderBy('id')->get();\n return view('admin.usuario.index', compact('datas'));\n }", "public function catalogoUsuario($idUsuario = 0)\n {\n $usuarios = Usuario::all();\n return view('inventarios.admin.ViewUsuario')->with('usuarios',$usuarios)->with('actualizado',0);\n }", "public function show($id)\n {\n $usuario = $this->usuarios->find($id);\n if (is_null($usuario)) {\n abort(404);\n }\n return view('usuarios.detalhe-usuario', [\n 'usuario' => $usuario\n ]);\n }", "public function index()\n {\n $users = $this->model->all();\n return view('admin/users/user', compact('users'));\n }", "function cadastrarUser(){\n //$this->session->set_tempdata('erro-acesso', 'login e senha n&atilde;o correspondem!', 5);\n\t \n\t\t/*$verificarUser = $this->login->get_verificar_user('sytesraul', '513482am');\n\t\tif($verificarUser != null) :\n\t\t\techo \"USUARIO JA CADASTRADO \".$verificarUser->name_login;\n\t\tendif;*/\n\t //redirect('login/acessoAceito', 'refresh');\n\t \n\t\t$dados['titulo'] = 'Cadastrar Usuário';\n\t\t$dados['h2'] = 'Tela de Cadastro';\n\t\t$this->load->view('login/cadastrar_user_view', $dados);\n\t\t\n\t\t\n\t}", "public function show(User $usuario)\n {\n //\n return view('usuarios.show',compact('usuario'));\n }", "public function index(){\n $usuaris = User::all();\n return View::Make('usuaris.index', compact('usuaris'));\n }", "public function readUsuario(){\n $estudiante = \\calidad\\usuario::where('id_rol',3) -> where('estado','<>','peticion') -> orderBy('id_rol') -> get();\n return view('viewAdministrador/consultaUsuarios',compact('estudiante'));\n }", "public function index()\n {\n $usuarios = User::get();\n return view('users.index', compact('usuarios'));\n }", "public function index()\n {\n $usuarios = \\App\\Usuario::all();\n // Lista los municipios para enviar el nombre del municipio en la consulta de usuarios\n $municipio = \\App\\Ciudad::lists('nombre', 'id');\n foreach ($usuarios as $user) {\n $user->id_ciudad = $municipio[$user->id_ciudad];\n }\n return view('user.index',compact('usuarios'));\n }", "public function show($id)\n {\n $usuario = find($id);\n return view('vista.usuario', $usuario);\n }", "public function show($id)\n\t{\n\t\t$usuarios = $this->usuariosRepository->findUsuariosById($id);\n\n\t\tif(empty($usuarios))\n\t\t{\n\t\t\tFlash::error('Usuarios not found');\n\t\t\treturn redirect(route('usuarios.index'));\n\t\t}\n\n\t\treturn view('usuarios.show')->with('usuarios', $usuarios);\n\t}", "public function index()\n {\n $user = Users::find(Auth::id());\n return view('adminlte::users/view', [\"user\" => $user]);\n }", "public function index()\n {\n $users = User::paginate();\n\n return view('automotores.usuarios.index', compact('users'));\n }", "public function indexAction()\n {\n \n $idusuario= $this->getUser()->getId();\n $em = $this->getDoctrine()->getManager();\n $usuario= $em->getRepository('MinsalsifdaBundle:FosUserUser')->find($idusuario);\n \n return $this->render('MinsalsifdaBundle:DiasFeriados:DiasFeriados.html.twig',array('usuario'=>$usuario));\n \n }", "public function show($id)\n {\n\t\tif(Auth::user()->rol->permisos->contains(5))\n\t\t{\n\t\t\t$prmUsuario = Usuario::findOrFail($id);\t\t\n\t\t\treturn view('admin.usuario.show',compact('prmUsuario'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn abort(401);\n\t\t}\n }", "public function show()\n {\n $users=User::all();\n $roles=Role::pluck('name','id')->all();\n return view('Manager.Users.Users',compact('users','roles'));\n }", "public function usuarios() \r\n {\r\n $rolController = new App\\Controllers\\RolController;\r\n $roles = $rolController->getAllRoles();\r\n\r\n $userController = new App\\Controllers\\UserController;\r\n $users = $userController->getAllUsers();\r\n\r\n require_once 'view/users/index.php';\r\n }", "public function index()\n {\n $usuarios = User::simplePaginate(10);\n return view('admin.usuarios', compact(\"usuarios\"));\n }", "public function show(Usuario $usuario)\n {\n Gate::authorize('admin');\n //dd($usuario);\n return view('usuarios/usuarioShow', compact('usuario'));\n }", "public function index()\n\t{\n\t\tValidaAccesoController::validarAcceso('usuarios','lectura');\n\t\t$usuarios = Usuarios::all();\n\t\t\n\t\tif(is_null($usuarios)){\n\t\t\t$usuarios = null;\n\t\t}else{\n\t\t\t$usuarios = $usuarios->toArray();\n\t\t}\n\t\t\n\t\t$columnas = array('nombres' => 'Nombre(s)', 'apellidos' => 'Apellidos', 'email' => 'Correo' );\n\t\t$data = array('usuarios' => $usuarios, 'columnas' => $columnas );\n\t\treturn View::make('admin/usuariosIndex')->with('data', $data);\n\t\t\n\t}", "function view($id){\n\t\t\t$this->loadModel('User');\n\t\t\t$users = $this->User->findFirst(array(\n\t\t\t\t'conditions'\t=> array('idUser'=>$id)\n\t\t\t));\n\t\t\tif(empty($users)){\n\t\t\t\t$this->e404('User introuvable');\n\t\t\t}\n\t\t\t$this->set('users', $users);\n\n\t\t\n\t\t}", "public function index()\n {\n $users = User::all();\n\n return view('usuarios.indexusuarios', compact('users'));\n }", "public function index()\n {\n\n $data['usuarios'] = User::all();\n return view('usuarios.index', $data);\n }", "public function index() {\n\n $usuarios = User::all();\n \n return view('user.index', compact('usuarios'));\n }", "public function showUser()\n\t{\n $data = [\n 'userData' => $this->user->getUserInfo(),\n \"positionData\" => $this->positions->getAllPositions(),\n \"departmentData\" => $this->departments->getAllDepartments(),\n \n ];\n\t\treturn view('employees/index', $data);\n\t}", "public function show($id)\n {\n $user = $this->user->find($id);\n\n if(!$user){\n return redirect()->back();\n }\n\n $title = \"Detalhes do Usuário: {$user->name}\";\n\n return view('panel.users.show', compact('title', 'user')); \n }", "public function show($id)\n {\n //\n return view('local.usuario.show',['usuario'=>User::findOrFail($id)]);\n }", "public function index() {\r\n\t\t$dinamic_content['contenido'] = 'lista_usuarios';\r\n\t\t$dinamic_content['title'] = 'Gestión de usuarios del Sistema';\r\n\t\t$dinamic_content['select_usr'] = $this->Usuarios_model->obtener_usuarios();\r\n\t\t$this->load->view('template/be_template', $dinamic_content);\r\n\t}", "public function showListAction() {\n $users = $this->getDoctrine()\n ->getRepository(User::class)\n ->findAll();\n return $this->render(':Security\\User:users.html.twig', [\n 'users' => $users\n ]);\n }", "public function index()\n { $usuarios = usuario::all();\n return view(\"Usuario.index\",compact('usuarios')); }", "public function show($id)\n {\n $this->authorize('ver-usuario');\n\n $usuario = User::findOrFail($id);\n return view('panel_administracion.users.ver', compact('usuario'));\n }", "public function show(Request $request, $id)\n {\n // busca registro\n $this->repository->findOrFail($id);\n \n //autorizacao\n $this->repository->authorize('view');\n \n // breadcrumb\n $this->bc->addItem($this->repository->model->usuario);\n $this->bc->header = $this->repository->model->usuario;\n \n // retorna show\n return view('usuario.show', ['bc'=>$this->bc, 'model'=>$this->repository->model]);\n }", "public function indexAction()\n {\n $u = new UserTable();\n $user = $u->findOne(\"login = ? and firstname = ?\", ['coquel_d', 'christophe']);\n $this->render(\"IndexController:test2\", $user);\n }", "public function index()\n {\n $users = User::orderBy('full_nombre', 'ASC')->paginate(10);\n $roles = Rol::orderBy('rol', 'ASC')->pluck('rol', 'id')->toArray();\n\n return view('administrador.usuarios.index', compact('users', 'roles'));\n }", "public function index (){\n \treturn view ('user');\n }", "public function index()\n {\n return view('usuario.index');\n }", "function index()\n\t{\n\t\t$usuarios = $this->Usuario->find('all');\n\t\t$this->set('usuarios',$usuarios);\n\t}", "public function index()\n {\n $rolesPerUser = RoleUserModel::all()->filter(function($role) {\n return $role->role_id == RoleModel::CANDIDATO;\n })->toArray();\n\n return view('usuario.index', [\n 'users' => User::paginate(10),\n 'rolesPerUser' => $rolesPerUser\n ]);\n }", "public function show()\n {\n $id = Auth::user()->id;\n $user = User::find($id);\n return view('user.detail', compact('user'));\n }", "protected function show()\n {\n $userModel = config('admin.database.users_model');\n\n $headers = ['User Name', 'Name', 'Roles', 'Permissions', 'Routes', 'Actions', 'Created', 'Updated'];\n\n $userslist = [];\n foreach ($userModel::all() as $user) {\n $roles = implode(',', $user->roles->pluck('name')->toArray());\n\n $userdata = [\n 'username' => $user->username,\n 'name' => $user->name,\n 'roles' => $roles,\n 'permission' => implode(\"\\n\", $user->allPermissions(true)->pluck('name')->toArray()),\n 'routes' => implode(\"\\n\", $user->allRoutes(true)->pluck('http_path')->toArray()),\n 'actions' => implode(\"\\n\", $user->allActions(true)->pluck('name')->toArray()),\n 'created_at' => date($user->created_at),\n 'updated_at' => date($user->updated_at),\n ];\n\n array_push($userslist, $userdata);\n }\n\n $this->table($headers, $userslist);\n }", "public function index()\n {\n $title = 'Usuários';\n\n $users = $this->_user->paginate($this->_totalPage);\n\n return view('panel.users.index', compact('title', 'users'));\n }", "public function show($id)\n {\n $this->checkPermission('ver_usuario');\n $user = $this->user->find($id);\n \n return view('user.show', compact('user'));\n }", "public function index()\n {\n $halaman = 'user';\n $user = User::all();\n return view('user.user', compact('halaman', 'user'));\n }", "public function index()\n {\n $this->canAccess('show', User::class);\n return view('admin.users.index');\n }", "public function index()\n {\n $user=user::find(1);\n return View('admin.user.index',compact('user'));\n }", "public function index()\n\t{\n\t\t$usuarios = User::paginate(10);\n\n\t\treturn view('backend.modules.usuarios.manage.index', compact('usuarios'));\n\t}" ]
[ "0.74800897", "0.72684556", "0.7225452", "0.7225452", "0.7188013", "0.7188013", "0.7188013", "0.7188013", "0.7188013", "0.7188013", "0.7175951", "0.716528", "0.7163224", "0.7108557", "0.71032387", "0.70725024", "0.70574206", "0.7044582", "0.7032509", "0.70246255", "0.7000943", "0.7000584", "0.699246", "0.69823074", "0.6971264", "0.69488186", "0.6940345", "0.6933322", "0.6923396", "0.6923396", "0.6908205", "0.69062567", "0.69014823", "0.6891503", "0.6879773", "0.6874471", "0.6873259", "0.6873259", "0.68680125", "0.6859092", "0.6853492", "0.6847825", "0.6840048", "0.6838168", "0.68204045", "0.68164533", "0.68161035", "0.6802937", "0.6793055", "0.6789288", "0.67870426", "0.67818886", "0.6781497", "0.6774927", "0.6771384", "0.6770714", "0.6770332", "0.67686373", "0.6767935", "0.6767219", "0.67667097", "0.6759286", "0.67534995", "0.675287", "0.67476714", "0.6746073", "0.67449677", "0.6741743", "0.673811", "0.6735722", "0.6735153", "0.6734133", "0.6724695", "0.672292", "0.6720931", "0.67192787", "0.6718505", "0.67168045", "0.67137367", "0.6712783", "0.6710049", "0.6708871", "0.67012393", "0.67002356", "0.66988087", "0.66916126", "0.6689881", "0.66892624", "0.66892314", "0.6687942", "0.66846704", "0.6684553", "0.6682714", "0.6681866", "0.66817284", "0.6679944", "0.6678243", "0.6677599", "0.66770506", "0.6675987", "0.6670438" ]
0.0
-1
Creates a new Usuario model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $model = new Usuario(); $model->generatePasswordResetToken(); var_dump(Yii::$app->request->post()); if ($model->load(Yii::$app->request->post())) { $model->setDesactiveStatus(); var_dump($model);die(); //enviar por email $model->save(); $this->sendEmail($model->email, 'novo_usuario', 'Acesso Site Jtecncologia' ); return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('_form', [ 'model' => $model, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n if(Permiso::requerirRol('administrador')){\n $this->layout='/main2';\n }\n $mensaje=\"\";\n $model = new Usuario();\n if ($model->load(Yii::$app->request->post())){\n if(!$model1=Usuario::find(['$model->dniUsuario'])->One()){\n $model->claveUsuario = crypt($model->claveUsuario, Yii::$app->params[\"salt\"]);\n $model->authkey = $this->randKey(\"ab1cde7fgh9wxztu5AGTY0UIO3WCBN6XZQ4HK\", 50);//clave será utilizada para activar el usuario\n $model->activado=1;\n if($model->save()) {\n return $this->redirect(['view', 'id' => $model->idUsuario]);\n }\n }else{\n $mensaje=\"El Dni ya existe, revise los registros.\";\n }\n }\n $model->dniUsuario='';\n return $this->render('create', [\n 'model' => $model,\n 'mensaje'=>$mensaje,\n ]);\n }", "public function actionCreate()\n {\n $model = new PerfilUsuario();\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 }", "public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->uid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Usuario();\n $pass = Yii::$app->security->generateRandomString(10);\n \n //Validación mediante ajax\n if ($model->load(Yii::$app->request->post()) && Yii::$app->request->isAjax)\n {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ActiveForm::validate($model);\n }\n \n $model->US_AUTHKEY = Yii::$app->getSecurity()->generateRandomString();\n $model->setPassword($pass);\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->mailer->compose()\n ->setFrom(['[email protected]' => 'Sistema de Gestión de reparaciones Estrada y Veloso Ltda.'])\n ->setTo($model->US_EMAIL)\n ->setSubject('Registro en sistema Estrada y Veloso' )\n ->setHtmlBody('<h2>Registro en sistema Estrada y Veloso</h2>\n <br>\n <br>\n <h4>'.$model->nombreCompleto.':\n <br>Se realizó el registro de su cuenta en el sistema. Su contraseña es: '.\n $pass.'</h4><br>\n <h4>Se Recomienda por temas de seguridad, que cambie la contraseña. </h4>')\n ->send();\n return $this->redirect(['view', 'id' => $model->US_ID]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\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 }", "public function actionCreate()\n {\n $model = new User();\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 }", "public function actionCreate()\n {\n $model = new User();\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 }", "public function actionCreate()\n {\n $model = new User();\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 }", "public function actionCreate()\n {\n $model = new NuevoUsuario();\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $LoginFrom = new LoginForm;\n $LoginFrom->password = $model->Clave;\n $LoginFrom->username = $model->NombreUsuario;\n if ($LoginFrom->login()){\n // provisoriamente lo inscribe al torneo programate para hacegurar el registro\n //$this->redirect(array('/torneo/inscripcion','idTorneo'=>1));\n $this->redirect(array('/site'));\n \n }else{\n $this->redirect(array('/site/login'));\n }\n }\n return $this->render('nuevousuario', [\n \n 'model' => $model,\n ]);\n \n\n \n }", "public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->redirect([\"site/register\"]);\n /*$this->render('/site/register', [\n 'model' => $model,\n ]);*/\n }\n }", "public function create()\n\t{\n\t\tValidaAccesoController::validarAcceso('usuarios','escritura');\n\t\t$form_data = array('route' => array('usuarios.store'), 'method' => 'post');\n $action = 'Crear';\n $usuario = null;\n\t\treturn View::make('admin/usuario',compact('usuario','form_data','action'));\n\t}", "public function actionCreate()\n {\n $model = new User();\n if(null !== (Yii::$app->request->post()))\n {\n if($this->saveUser($model))\n {\n Yii::$app->session->setFlash('userUpdated');\n $this->redirect(['update', 'id' => $model->getId()]);\n return;\n }\n\n }\n\n return $this->render('@icalab/auth/views/user/create', ['model' => $model]);\n }", "public function actionCreate()\n {\n Yii::$app->getView()->params['title'] = '<i class=\"glyphicon glyphicon-edit\"></i> Пользователи: создать';\n $model = new User();\n\n if ($model->load(Yii::$app->request->post())) {\n $password = Yii::$app->security->generatePasswordHash($model->password);\n $model->password = $password;\n $date = Yii::$app->formatter->asDate($model->birthday, 'php:Y-m-d');\n $model->birthday=$date;\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $user = User::findOne(['username' => $model->username ]) ;\n return $this->redirect(['site/view','id' => $user->id]);\n } else {\n return $this->render('knpr/create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\n\n $model->load(['username' => 'foo',\n 'auth_key' => '46344hsgdsgsa8',\n 'password_hash' => 'adsfhsd6363',\n 'password_reset_token' => 'adsfhsd6363',\n 'email' => 'adsfhsd6363'\n ]);\n\n if ($model->load(Yii::$app->request->post())) {\n\n $arr_request = Yii::$app->request->post()['User'];\n\n $this->formInputDataValidation($arr_request, $model);\n\n $model->auth_key = Yii::$app->security->generateRandomString();\n\n $model->email = $arr_request['email'];\n\n $model->created_at = time();\n\n $model->updated_at = time();\n\n $model->username = $arr_request['username'];\n\n $model->password_hash = Yii::$app->security->generatePasswordHash($arr_request['password']);\n\n $model->status = 10;\n\n $model->save();\n\n return $this->render('view', [\n 'model' => $this->findModel($model->id),\n ]);\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n\t{\n\t\t$user = new User;\n\n\t\t$user->username \t\t= Input::get('username');\n\t\t$user->password \t\t= Hash::make(Input::get('password'));\n\t\t$user->email \t\t \t= Input::get('email');\n\n\t\t$user->save();\n\n\t\treturn Redirect::to('user/add')->with('sukses', 'Data User Sudah Tersimpan');\n\t}", "public function actionCreate()\n {\n $model=new User('create');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('/site/index'));\n }\n\n //Yii::app()->user->setFlash('success', Yii::t('user', '<strong>Congratulations!</strong> You have been successfully registered on our website! <a href=\"/\">Go to main page.</a>'));\n $this->render('create', compact('model'));\n }", "public function actionCreateUser()\n {\n $model = new User();\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\n $model->setPassword($model->password);\n $model->generateAuthKey();\n $model->generateEmailConfirmToken();\n if ($model->save()) {\n // нужно добавить следующие три строки:\n // $auth = Yii::$app->authManager;\n // $authorRole = $auth->getRole('superadmin');\n // $auth->assign($authorRole, $user->getId());\n return $this->redirect(['view-user', 'id' => $model->id]);\n }else{\n print_arr($model->errors);\n die('A');\n }\n } else {\n return $this->render('user/create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model=new User('admin');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }", "public function create()\n {\n\n\n //aqui agregamos la vista para crear un usuario\n return view('users.create');\n }", "public function actionCreate()\n\t{\n\t\tif(isset($_GET['layout'])){\n\t\t\t$this->layout = $_GET['layout'];\n\t\t}\n\t\t$model=new Users;\n\n\t\t$string = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t\t$length = 6;\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\t$model->notification=1;\n\t\t\t$model->status=1;\n\n if($model->validate()){\n\n\t\t\t\tif($model->save()){\n\t\t\t\t\t$user_id = Yii::app()->db->lastInsertID;\n\n\t\t\t\t\t$user_login = new UserLogin;\n\t\t\t\t\t\t$user_login->username = $model->email;\n\t\t\t\t\t\t$user_login->role = \"Bouncer\";\n\t\t\t\t\t\t$user_login->user_id = $user_id;\n $user_login->latitude = \"0\";\n $user_login->longitude = \"0\";\n\t\t\t\t\t\t$user_login->display_name = $model->name;\n\t\t\t\t\t\t$user_login->salt = substr(str_shuffle($string), 0, $length);\n $user_login->created_by = Yii::app()->user->id;\n $user_login->password = md5($user_login->salt.$_POST['UserLogin']['password']);\n\t\t\t\t\t\t$user_login->created_date = strtotime(date('Y-m-d H:i:s'));\n\t\t\t\t\t$user_login->save();\n\n\t\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->render('create',array('model'=>$model));\n\t}", "public function actionCreate() {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if ($tipo == \"1\") {\n $model = new Consultor;\n $modelUser = new User;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n \n \n \n $senha = uniqid(\"\", true);\n $modelUser->password = $senha;\n $modelUser->username = $_POST['username'];\n $modelUser->email = trim($model->email);\n $modelUser->attributes = $modelUser;\n $modelUser->id_tipoUser = 4;\n $modelUser->senha = '0';\n\n if ($modelUser->save()) {\n\n $model->id_user = $modelUser->id;\n if ($model->save()) {\n $this->redirect(array('EnviaEmail', 'nomedestinatario' => $model->nome, \"emaildestinatario\" => $model->email, \"nomedeusuario\" => $modelUser->username, \"senha\" => $modelUser->password));\n }\n }\n \n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n \n }else {\n $this->redirect(array('User/ChecaTipo'));\n }\n }", "public function actionCreate()\n {\n if (!One::app()->user->can('Create User')) {\n throw new ForbiddenHttpException('You are not authorized to access this page.');\n }\n\n $model = new User();\n\n if ($model->load(One::app()->request->post()) && $model->save()) {\n One::app()->session->setFlash('success', 'User created successfully.');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view(\"usuarios.create\");\n }", "public function create()\n {\n return view(\"usuarios.create\");\n }", "public function actionCreate()\n\t{\n\t\t$model=new Users;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n $this->seo = [\n 'title'=>'创建系统用户',\n 'group'=>'内容管理',\n ];\n $this->setSeo();\n\n $model = new User;\n return view('admin.user.create',['model'=>$model]);\n }", "public function actionCreate()\n\t{\n\t\t$model=new Alumno;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t$this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Alumno']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Alumno'];\n\n\t\t\tif($model->save()){\n\t\t\t\t$model->con_semestre=Yii::app()->db->createCommand('select con_semestre from convocatoria where con_estado=1')->queryScalar();\n\t\t\t\t$model->save();\n\t\t\t\t\n\t\t\t\t//unir con cruge\n\t\t\t\t$values = array(\n\t\t\t\t 'username' => $model->al_rut,\n\t\t\t\t 'email' => $model->al_email,\n\t\t\t\t);\n\t\t\t\t$usuario = Yii::app()->user->um->createNewUser($values,$model->al_clave);\n\t\t\t\t\n\t\t\t\tYii::app()->user->um->changePassword($usuario,$model->al_clave);\n\n\t if(Yii::app()->user->um->save($usuario)){\n\n\t \t\t// echo \"Usuario creado: id=\".$usuario->primaryKey;\n\t\t \t\n\t\t \t// asignar el rol alumno\n\t\t \t$rbac = Yii::app()->user->rbac;\n \t$authitemName = 'alumno';\n \t$userId = $usuario->primaryKey;\n \t$rbac->assign($authitemName, $userId);\n\t\t\t\t\t//fin-asignar el rol alumno\n\t }\n\t else{\n\t $errores = CHtml::errorSummary($usuario);\n\t echo \"no se pudo crear el usuario: \".$errores;\n\t }\n\t\t\t\t//fin_unir con cruge\n\n\t $this->redirect(array('view','id'=>$model->al_rut));\n\t\t\t}\n\t\t\t\t\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new User();\n\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->password = Yii::$app->security->generatePasswordHash($model->password);\n $model->save();\n \n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\n\n if (isset($_POST['User']))\n {\n\n $transaction = Yii::app()->db->beginTransaction();\n\n try\n {\n $model->setAttributes($_POST['User']);\n $model->salt = Registration::model()->generateSalt();\n $model->password = Registration::model()->hashPassword($model->password, $model->salt);\n $model->registrationIp = Yii::app()->request->userHostAddress;\n\n if ($model->save())\n {\n $profile = new Profile();\n $profile->user_id = $model->id;\n if ($profile->save())\n {\n $transaction->commit();\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Новый пользователь добавлен!'));\n $this->redirect(array('view', 'id' => $model->id));\n }\n else\n {\n throw new CDbException(Yii::t('user', 'При создании пользователя произошла ошибка! Подробности в журнале исполнения.'));\n }\n }\n\n }\n catch (CDbException $e)\n {\n $transaction->rollback();\n Yii::log($e->getMessage(), CLogger::LEVEL_ERROR, UserModule::$logCategory);\n Yii::app()->user->setFlash(YFlashMessages::ERROR_MESSAGE, $e->getMessage());\n $this->redirect(array('create'));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function inserir() {\n $this->load->model('Usuario_model', 'usuario');\n\n //Recebe os dados da view de usuario\n $data['login'] = $this->input->post('login');\n $data['senha'] = md5($this->input->post('senha'));\n $data['codAluno'] = $this->input->post('codAluno');\n $data['nivel'] = 1;\n\n if ($this->usuario->inserirUsuario($data)) {\n redirect('Painel_controller/login');\n }\n }", "public function create()\n\t{\n\t\treturn view('usuarios.create');\n\t}", "public function actionCreate() {\n\t\t$model = new User();\n\t\t\n\t\tif (isset($_POST['User'])) {\n\t\t\t$error = FALSE;\n\t\t\t$model->attributes = Yii::app()->input->post('User');\n\t\t\t\n\t\t\tif ($model->validate()) {\n\t\t\t\n\t\t\t\t$user = User::model()->findByAttributes(array(\n\t\t\t\t\t'username'\t\t\t\t\t\t\t\t\t\t\t\t\t=> $model->username\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\tif (isset($user)) {\n\t\t\t\t\t$error = 'Username already present';\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\t$_POST['User']['country'] != '' &&\n\t\t\t\t\t!array_key_exists($_POST['User']['country'],Yii::app()->params->countries)\n\t\t\t\t) {\n\t\t\t\t\t$error = 'State are invalid';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (\n\t\t\t\t\t$_POST['User']['job'] != '' &&\n\t\t\t\t\t!array_key_exists($_POST['User']['job'],Yii::app()->params->jobs)\n\t\t\t\t) {\n\t\t\t\t\t$error = 'Job are invalid';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (\n\t\t\t\t\t$_POST['User']['sex'] != '' &&\n\t\t\t\t\t!array_key_exists($_POST['User']['sex'],Yii::app()->params->sexs)\n\t\t\t\t) {\n\t\t\t\t\t$error = 'Sex are invalid';\n\t\t\t\t}\n\t\t\t\tif (!$error) {\n\t\t\t\t\t$model->password = CPasswordHelper::hashPassword($model->password);\n\t\t\t\t\t$model->save();\n\t\t\t\t\t$this->redirect(array('site/login'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFlash($error);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->render('create',array(\n\t\t\t'model'\t\t\t\t\t\t\t\t\t\t\t\t\t\t=> $model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new User;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // получаем изображение для последующего сохранения\n $file = UploadedFile::getInstance($model, 'image');\n if ($file && $file->tempName) {\n $fileName = self::_saveFile($model, $file);\n if ($fileName) {\n $model->image = $fileName;\n } else {\n // уведомить пользователя, админа о невозможности сохранить файл\n }\n }\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n MainFunctions::register('Добавлен пользователь ' . $model->name);\n return $this->redirect(['view', 'id' => $model->_id]);\n } else {\n return $this->render('create', ['model' => $model]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n //\n return view(\"local.usuario.create\");\n }", "public function create()\n\t{\n\t\treturn view('usuario.create');\n\t}", "public function create()\n {\n // cria um registro em branco\n $this->repository->new();\n \n // autoriza\n $this->repository->authorize('create');\n \n // breadcrumb\n $this->bc->addItem('Novo');\n \n // retorna view\n return view('usuario.create', ['bc'=>$this->bc, 'model'=>$this->repository->model]);\n }", "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"usuario\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $usuario = new Usuario();\n $usuario->loginUsuario = $this->request->getPost(\"Login_usuario\");\n $usuario->senhaUsuario = $this->request->getPost(\"Senha_usuario\");\n $usuario->nomeUsuario = $this->request->getPost(\"Nome_usuario\");\n $usuario->idadeUsuario = $this->request->getPost(\"Idade_usuario\");\n $usuario->enderecoUsuario = $this->request->getPost(\"Endereco_usuario\");\n $usuario->cIDADECodCidade = $this->request->getPost(\"CIDADECod_cidade\");\n $usuario->tIPOUSUARIOCodTipoUsuario = $this->request->getPost(\"TIPO_USUARIOCod_tipo_usuario\");\n \n\n if (!$usuario->save()) {\n foreach ($usuario->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"usuario\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"usuario was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"usuario\",\n 'action' => 'index'\n ]);\n }", "public function create()\n {\n return view('usuarios.crear_usuario');\n }", "public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\t$model->scenario='admin_change_password';\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->layout='//layouts/column1';\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'groups'=>Yii::app()->authManager->getRoles(),\n\t\t\t'userGroups'=>Yii::app()->authManager->getRoles($model->id),\n\t\t));\n\t}", "public function create()\n {\n $this->checkPermission('cadastrar_usuario');\n return view('user.create');\n }", "public function create()\n {\n //\n\n return view('usuario.create');\n }", "public function create()\n {\n //添加用户页面\n return view('admin.user.add');\n }", "public function create()\n {\n if(\\Auth::user()) {\n if(\\Auth::user()->editado != 0) {\n \\Auth::logout();\n session()->flush();\n return redirect('/login')->withErrors('Sua conta foi alterada. Por favor faça login novamente');\n }\n }\n\n return view('pages.users.create',\n ['section_title' => 'Novo Usuário']);\n }", "public function actionCreate()\n {\n $model = new Cuenta();\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 }", "public function create()\n {\n // 显示用户添加\n return view('admin.users.create');\n }", "public function create()\n {\n return view('usuarios.create' );\n }", "public function create()\n {\n return view('automotores.usuarios.create');\n }", "public function actionCreate()\n {\n $model = new UserRegisterForm;\n \n //var_dump(Yii::app()->user);\n \n if(isset($_POST['UserRegisterForm']))\n {\n $model->attributes=$_POST['UserRegisterForm'];\n // validate user input and redirect to the previous page if valid\n if($model->validate())\n {\n $model->createUser();\n $this->redirect(Yii::app()->user->returnUrl);\n }\n }\n \n $this->render('create', array('model'=>$model));\n\n }", "public function create()\n {\n if ( Gate::denies('criar-user')){\n abort(403, 'Não tem Permissão para criar um utilizador');\n }\n return view('users.create');\n }", "public function actionCreate()\n {\n $model = new Manager();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this\n ->addFlashMessage('User created: ' . $model->login, self::FLASH_SUCCESS)\n ->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n\t{\n // $this->load->view('index', $variaveis);\n \n $variaveis['titulo'] = 'Cadastro Usuários';\n\t\t$this->load->view('usuarios_cad', $variaveis);\n\t}", "public function create()\n {\n // show form create user \n return view('user.create');\n }", "public function create()\n {\n //显示添加管理员页面\n return view('admin.users.create');\n }", "public function create()\n {\n return view('usuarios.create');\n }", "public function create()\n {\n return view('usuarios.create');\n }", "public function create()\n {\n return view('usuarios.create');\n }", "public function actionCreate() {\n if (!Yii::$app->user->can('admin')) {\n throw new HttpException(403, 'You are not authorized to perform this action.');\n }\n $model = new User();\n \n if ($model->load(Yii::$app->request->post())) {\n $model->id = $model->generateRandomString();\n $model->password = Yii::$app->getSecurity()->generatePasswordHash($model->password);\n \n $model->status = 1;\n if ($model->save()) {\n Yii::$app->session->setFlash('success', 'User berhasil dibuat dengan password 123456');\n } else {\n Yii::$app->session->setFlash('error', 'User gagal dibuat');\n }\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n \n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new Users;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$unencryted_pass = $_POST['Users']['password'];\n\t\t\t$_POST['Users']['password'] = md5($_POST['Users']['password']);\n\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\t$model->email = $_POST['Users']['email'];\n\t\t\t$email = $model->email;\n\t\t\tif($model->save()){\n\t\t\t\t// send welcome email\n\t\t\t\t$et = new EmailTemplates;\n\t\t\t\t$data = $et->getData(7);\n\t\t\t\t\n\t\t\t\t// parse Body\n\t\t\t\t$search = array('{name}', '{username}', '{password}');\n\t\t\t\t$replace = array($model->name(), $model->username, $unencryted_pass);\n\t\t\t\t$body = str_ireplace($search, $replace, $data->body);\n\t\t\t\t// ends parse Body\n\t\t\t\t$email_data = array(\n\t\t\t\t\t'body'=> $body,\n\t\t\t\t\t'address'=> $model->email,\n\t\t\t\t\t'ccaddress'=> '',\n\t\t\t\t\t'bccaddress'=> '',\n\t\t\t\t\t'subject' => $data->subject\n\t\t\t\t);\n\n\t\t\t\t// send the email\n\t\t\t\t$this->sendMail($email_data);\n\t\t\t\tYii::app()->user->setFlash('view','<div align=\"center\" style=\"color:green;\"><strong><h1>Message has been sent to '.$model->email.'</h1></strong></div>');\n\t\t\t\t// save the email as well\t\n\t\t\t\t$this->saveEmailLog(7, $email_data);\n\t\t\t\t $Criteria = new CDbCriteria();\n\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate() {\n $this->pageTitle = \"Thamor - Register\";\n $model = new User('register');\n $model->country = \"Canada\";\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['User'])) {\n\n $model->attributes = $_POST['User'];\n // echo $model->dob; exit;\n if ($model->validate()) {\n $model->password = md5($model->password);\n $model->updated_at = date(\"Y-m-d H:i:s\");\n $model->status = USER::USER_PENDING;\n\n $model->save();\n Yii::app()->user->setFlash('register', 'Registation Successful! You can login after we approve your application within 24 Hours.');\n if (Yii::app()->user->isAdmin()) {\n $this->redirect(array('/user/admin'));\n } else {\n $this->redirect(array('/user/success'));\n }\n }\n }\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function actionCreate() {\n $model = new USUARIO;\n $tienda = new TIENDA;\n //$dataCliente = new ARTICULOTIENDA;\n //$this->titleWindows = Yii::t('COMPANIA', 'Create User');\n $cli_Id=Yii::app()->getSession()->get('CliID', FALSE);\n $this->render('create', array(\n 'model' => $model,\n 'genero' => $this->genero(),\n 'estado' => $this->estado(),\n \n ));\n }", "public function actionCreate()\n {\n $us = Usuarios::find()->where(['id' => Yii::$app->user->id])->one();\n if ($us->rol !== 'C' && $us->rol !== 'V') {\n return $this->goHome();\n }\n $model = new Uniformes();\n\n $model->colegio_id = $us->colegio_id;\n if ($model->load(Yii::$app->request->post())) {\n $model->foto = UploadedFile::getInstance($model, 'foto');\n if ($model->save() && $model->upload()) {\n if ($us->rol === 'V') {\n return $this->redirect(['index']);\n }\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('usuarios.crearusuarios');\n }", "public function actionCreate() {\n $model = new Users;\n $this->performAjaxValidation($model);\n if (isset($_POST['Users'])) {\n $model->attributes = $_POST['Users'];\n $model->user_created_by_id = $this->user_data['user_id'];\n $passwod = $model->user_password;\n $model->user_password = md5($passwod);\n\n $userdata['user_name'] = $model->user_name;\n $userdata['user_email'] = $model->user_email;\n $userdata['user_password'] = $passwod;\n $userdata['login_url'] = Utils::getBaseUrl() . \"/auth\";\n $userdata['website_url'] = Utils::getBaseUrl();\n\n $template = Template::getTemplate('log-in_mail_template');\n $subject = $template->template_subject;\n $message = $template->template_content;\n\n $subject = $this->replace($userdata, $subject);\n $message = $this->replace($userdata, $message);\n\n if (Yii::app()->session['user_data']['user_role_type'] == 3) {\n $model->user_role_type = 4;\n $model->user_department_id = Yii::app()->session['user_data']['user_department_id'];\n }\n\n if ($model->save()) {\n $this->SendMail($model->user_email, $model->user_name, $subject, $message);\n Yii::app()->user->setFlash('type', 'success');\n Yii::app()->user->setFlash('message', 'User added successfully.');\n } else {\n Yii::app()->user->setFlash('type', 'danger');\n Yii::app()->user->setFlash('message', 'Operation failded due to lack of connectivity. Try again later!!!');\n }\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function create()\n {\n \n /* $usuarios = User::all();\n\n return view('editar_usuario', compact('usuarios'));\n */\n\n }", "public function actionCreate()\n {\n $model = new RegisterForm();\n $model->type = User::TYPE_USER;\n $model->status = User::STATUS_ACTIVE;\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->password_hash = (new Security())->generatePasswordHash($model->password);\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n\treturn view('user.createuser');\n }", "public function create()\n {\n return view('registro_usuarios.create');\n }", "public function create()\n {\n return view('usuario.create');\n }", "public function create()\n {\n return view('usuario.create');\n }", "public function create()\n {\n return view('usuario.create');\n }", "public function create()\n {\n return view('usuario.create');\n }", "public function create()\n {\n return view('usuario.create');\n }", "public function create()\n {\n return view('usuario.create');\n }", "public function create()\n\t{\n\t\t//显示页面\n\t\treturn view('admin.users.create',['title'=>'管理员添加页面']);\n\t}", "public function createAction()\n\t{\n\t\t$auth = new AuthenticationService();\n\t\tif($auth->hasIdentity()) {\n\t\t\t# if user has session take them some else\n\t\t\treturn $this->redirect()->toRoute('home');\n\t\t}\n\n\t $createForm = new CreateForm($this->adapter);\n\t $request = $this->getRequest();\n\n\t if($request->isPost()) {\n\t \t$formData = $request->getPost()->toArray();\n\t \t$createForm->setInputFilter($this->usersTable->getCreateFormFilter());\n\t \t$createForm->setData($formData);\n\n\t \tif($createForm->isValid()) {\n\t \t\ttry {\n\t \t\t\t$data = $createForm->getData();\n\t \t\t\t$this->usersTable->saveAccount($data); \n\n\t \t\t\t$this->flashMessenger()->addSuccessMessage('Compte créé avec succès. Vous pouvez maintenant vous connecter');\n\n\t \t\t\treturn $this->redirect()->toRoute('login');\n\t \t\t} catch(RuntimeException $exception) {\n\t \t\t\t$this->flashMessenger()->addErrorMessage($exception->getMessage());\n\t \t\t\treturn $this->redirect()->refresh(); # refresh this page to view errors\n\t \t\t}\n\t \t}\n\t }\n\t\t$this->layout()->setTemplate('login/index-layout');\n\t\treturn (new ViewModel(['form' => $createForm]))->setTemplate('auth/create');\n\t}", "public function create() {\n return view('usuarios.create');\n }", "public function create()\n {\n //\n if ($this->security(9)) {\n $perfiles = Perfiles::lists('name', 'id')->toArray();\n $entidad = Entidades::all();\n $titulos = Cargos::lists('name', 'id')->toArray();\n $categorias = Usercategories::lists('name', 'id')->toArray();\n return view('administracion.usuarios.new', compact('perfiles', 'entidad', 'titulos', 'categorias'));\n }\n }", "public function actionCreate()\n {\n $model = new Empleado();\n $usuario = new Usuario();\n\n $connection = \\Yii::$app->db;\n $transaction = $connection->beginTransaction();\n\n try {\n if ($usuario->load(Yii::$app->request->post()) && $usuario->save()) {\n $model->load(Yii::$app->request->post());\n $model->usuario_idusuario = $usuario->idusuario;\n if ($model->save()) {\n //asigna el rol seleccionado\n $auth = \\Yii::$app->authManager;\n $role = $auth->getRole($model->tipo);\n $auth->assign($role, $usuario->idusuario);\n\n $estadoUsuario = new \\app\\models\\EstadoEmpleado();\n $estadoUsuario->fecha = date(\"Y-m-d\");\n $estadoUsuario->estado_idestado = 1;\n $estadoUsuario->empleado_idempleado = $model->idempleado;\n $estadoUsuario->save();\n\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->idempleado]);\n }\n }\n } catch (\\Exception $e) {\n $transaction->rollBack();\n throw $e;\n } catch (\\Throwable $e) {\n $transaction->rollBack();\n throw $e;\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'usuario' => $usuario,\n ]);\n\n }", "public function create()\n {\n return view('admin.usuarios.create');\n }", "public function create()\n \n { $usuarios = usuario::all();\n return view(\"Usuario.create\",compact('usuarios')); }", "public function create()\n {\n $objNav = new Navigation;\n $nav = $objNav->getParent();\n $role = Roles::all();\n\n // Redirect to user create page\n return View::make('admin.manage_user.create_user' , ['nav' => $nav], ['role' => $role]);\n }", "public function create()\n {\n $user = Auth::user();\n if ($user->rol == 1) {\n return view('layouts.usuaris.crea');\n }\n return redirect('/');\n\n }", "public function create()\n {\n return view('usuarios.crear');\n }", "public function create()\n\t{\n\t\t$data = Input::all();\n\t\t$validator = Validator::make($data,User::$rules);\n\t\tif($validator->fails()){\n\t\t\t\n\t\t\treturn Redirect::to('/?error=1')->withErrors($validator);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$user = new User;\n\t\t\t$user->username = $data['username'];\n\t\t\t$user->password = Hash::make($data['password']);\n\t\t\t$user->email = $data['email'];\n\t\t\tif($user->save()){\n\t\t\t\treturn View::make('confirm_sign_up');\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}", "public function create()\n {\n //\n return view(\"admin.users.create\");\n }", "public function create()\n {\n $roles = Role::all();\n\n $title = __('Crear Usuario');\n $user = new User;\n return view('user.form', compact('user', 'title','roles'));\n }", "public function actionCreate()\n {\n $model = new Users('create');\n $model->role_id = isset($_GET['role']) ? $_GET['role'] : 1;\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Users'])) {\n $model->attributes = $_POST['Users'];\n $model->status = 'active';\n $model->password = $model->generatePassword();\n $model->repeatPassword = $model->generatePassword();\n $model->role_id = isset($_GET['role']) ? $_GET['role'] : 1;\n if ($model->avatar)\n $avatar = new UploadedFiles($this->tempPath, $model->avatar, $this->avatarOptions);\n if ($model->save()) {\n if ($model->avatar)\n $avatar->move($this->avatarPath);\n $this->sendDownload($model->mobile);\n $this->redirect(array('admin', 'role' => isset($_GET['role']) && !empty($_GET['role']) ? $_GET['role'] : 1));\n }\n }\n\n if ($model->avatar)\n $avatar = new UploadedFiles($this->tempPath, $model->avatar, $this->avatarOptions);\n\n $this->render('create', compact('model', 'avatar'));\n }", "public function actionCreate()\n {\n $this->autorizaUsuario();\n $model = new Palestrante();\n\n if ($model->load(Yii::$app->request->post())) {\n if($model->save()){\n $this->mensagens('success', 'Palestrante Cadastrado', 'Palestrante foi Cadastrado com Sucesso');\n }else{\n $this->mensagens('danger', 'Palestrante Não Cadastrado', 'Houve um erro ao adicionar o Palestrante');\n }\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('creatUSER');\n }", "public function create() {\n return view('fuse.cadastros.usuarios.create');\n }", "public function create()\n {\n \t $this->pass_data['page_heading'] = \"Add User\";\n return view('backend.user.create', $this->pass_data);\n }", "public function actionCreate()\n {\n $model = new UsersRoles();\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 }", "public function create() {\n $roles = Rol::all();\n $carreras = Carrera::all();\n return view('usuario.admin.usuarios.create', ['roles'=>$roles, 'carreras'=>$carreras]);\n }", "public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()))\n {\n if(isset($_FILES['User']['name']['image']) && $_FILES['User']['name']['image'] != null)\n {\n if($model->image_path != '' && $model->image_path != null && file_exists(Yii::getAlias('@webroot').'/'.$model->image_path))\n {\n unlink(Yii::getAlias('@webroot').\"/\".$model->image_path);\n }\n $new_image['name'] = $_FILES['User']['name']['image'];\n $new_image['type'] = $_FILES['User']['type']['image'];\n $new_image['tmp_name'] = $_FILES['User']['tmp_name']['image'];\n $new_image['error'] = $_FILES['User']['error']['image'];\n $new_image['size'] = $_FILES['User']['size']['image'];\n\n $name = Yii::$app->common->normalUpload($new_image, Yii::$app->params['userimage']);\n $model->image_path = $name;\n }\n $model->password =md5($model->password);\n $model->i_by = Yii::$app->user->id;\n $model->i_date = time();\n $model->u_by = Yii::$app->user->id;\n $model->u_date = time();\n\n if($model->save(false))\n {\n $msg=\"User has been successfully added\";\n $flash_msg = \\Yii::$app->params['msg_success'].$msg.\\Yii::$app->params['msg_end'];\n \\Yii::$app->getSession()->setFlash('flash_msg', $flash_msg);\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('user.crear');\n }", "public function store()\n {\n $validator = Validator::make(Input::all(), User::rules(), [], User::attributes());\n\n if ($validator->fails()) {\n return Redirect::action('Admin\\UserController@create')->withErrors($validator)->withInput();\n }\n\n $model = new User;\n $model->title = Input::get('title');\n $model->content = Input::get('content');\n $model->audit = Input::get('audit');\n if($model->save()){\n Request::session()->flash('info', '系统用户创建成功!');\n }\n return Redirect::action('Admin\\UserController@index');\n }", "public function create()\n {\n //\n $this->data['title'] = 'Create New User';\n return view('cpanel.users.create',$this->data);\n }" ]
[ "0.805618", "0.7903013", "0.77700686", "0.7714941", "0.77109426", "0.77109426", "0.77109426", "0.77109426", "0.764009", "0.76082253", "0.7488276", "0.74761206", "0.746963", "0.7460957", "0.7417892", "0.74174964", "0.7413602", "0.73994124", "0.73992586", "0.73992586", "0.73857254", "0.7384723", "0.73632336", "0.73584", "0.73516196", "0.7314032", "0.7314032", "0.7305101", "0.7299282", "0.7287171", "0.72560513", "0.7250267", "0.72413045", "0.72295827", "0.71985346", "0.7190713", "0.7184469", "0.71734095", "0.7166701", "0.7141246", "0.71411073", "0.71362126", "0.7127682", "0.71155626", "0.7095073", "0.70948035", "0.70903397", "0.70854384", "0.7058936", "0.7054004", "0.7041231", "0.70250976", "0.7024481", "0.7013665", "0.70094854", "0.7002844", "0.69991744", "0.69991744", "0.69991744", "0.69920236", "0.698709", "0.6983712", "0.6980423", "0.6968751", "0.69570154", "0.69529283", "0.6952208", "0.6950306", "0.6946517", "0.69418573", "0.69381493", "0.69381493", "0.69381493", "0.69381493", "0.69381493", "0.69381493", "0.6935263", "0.69317794", "0.6930839", "0.6914184", "0.69093055", "0.6899572", "0.68969935", "0.68913656", "0.68892056", "0.6877162", "0.6875318", "0.6875155", "0.68710047", "0.6865576", "0.68606025", "0.684955", "0.6835782", "0.68355405", "0.6828608", "0.68237686", "0.68174475", "0.6815542", "0.6814863", "0.6801054" ]
0.70367074
51
Updates an existing Usuario model. If update is successful, the browser will be redirected to the 'view' page.
public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { //enviar por email //$this->sendEmail($model->email, 'novo_usuario', 'Acesso Site Jtecncologia' ); return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('_form', [ 'model' => $model, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate()\n\t{\n\t if (!Yii::app()->user->checkAccess('admin')){\n\t\t\treturn $this->actionView();\n\t }\n\t\t$this->model = DrcUser::loadModel();\n\t\tif($this->model===null)\n\t\t\tthrow new CHttpException(404,'The requested user does not exist.');\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_edit',\n\t\t\t'contentTitle' => 'Update User Data',\n\t\t\t'createNew'=>false,\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'action'=>Yii::app()->createUrl(\"user/save\", array('username'=>$this->model->username)),\n\t\t));\n\t}", "private function updateUser(){\n\t\t$data['datosUsuario'] = $this->users->get($_REQUEST[\"idusuario\"]);\n\t\t$data['tipoUsuario'] = Seguridad::getTipo(); \n\t\tView::show(\"user/updateForm\", $data);\n\t}", "public function actionUpdate($id)\n {\n if(Permiso::requerirRol('administrador')){\n $this->layout='/main2';\n }elseif(Permiso::requerirRol('gestor')){\n $this->layout='/main3';\n }\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idUsuario]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionModificar()\n {\n $model = Yii::$app->user->identity->usuariosDatos;\n\n if ($model->load(Yii::$app->request->post())) {\n $model->foto = UploadedFile::getInstance($model, 'foto');\n if ($model->localidad === null && $model->direccion === null) {\n $model->geoloc = null;\n }\n if ($model->save() && $model->upload()) {\n Yii::$app->session->setFlash('success', Yii::t('app', 'Has actualizado tus datos correctamente'));\n }\n }\n\n return $this->render('/usuarios/update', [\n 'modelDatos' => $model,\n 'seccion' => 'personal',\n 'generos' => Utiles::translateArray(UsuariosGeneros::find()\n ->select('sexo')\n ->indexBy('id')\n ->column()),\n ]);\n }", "public function update(){\n \n //comprueba que llegue el formulario con los datos\n if(empty($_POST['actualizar']))\n throw new Exception(\"No llegaron los datos\");\n \n //podemos crear un nuevo usuario o recuperar de la bdd,\n //crearé un nuevo usuario porque me ahorro una consulta\n $usuario= new Usuario();\n \n $usuario->id= intval($_POST['id']);\n $usuario->user= $_POST['user'];\n $usuario->pass= $_POST['pass'];\n $usuario->nombre= $_POST['nombre'];\n $usuario->apellidos= $_POST['apellidos'];\n $usuario->email= $_POST['email'];\n $usuario->direccion= $_POST['direccion'];\n $usuario->poblacion= $_POST['poblacion'];\n $usuario->provincia= $_POST['provincia'];\n $usuario->cp= $_POST['cp'];\n \n //intenta realizar la actualización de datos\n if($usuario->actualizar()===false)\n throw new Exception(\"No se pudo actualizar $usuario->user\");\n \n //prepara un mensaje. Es guarda en una variable global perque les variables no es recorden\n // despres d'executar les funcions! I ara no anem a la vista, sino que portem a un altre\n //métode!!\n $GLOBALS['mensaje']= \"Actualización del usuario $usuario->user correcta.\";\n \n //repite la operación de edit, así mantendrá al usuario en la vista de edición\n $this->edit($usuario->id);\n }", "public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n } else if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash(\"success\", Yii::t('modules/user', \"Changes has been saved.\"));\n $this->refresh();\n } else {\n return $this->render('update', ['model' => $model,]);\n }\n }", "public function update()\n {\n \n $user = $_POST;\n $user['password'] = password_hash('Gorilla1!', PASSWORD_DEFAULT);\n $user['updated_by'] = Helper::getUserIdFromSession();\n $user['created'] = date('Y-m-d');\n\n // Save the record to the database\n UserModel::load()->update($user, Helper::getUserIdFromSession());\n\n return view::redirect('/');\n }", "public function actionUpdateUser()\n {\n\n\n if ($model = UserProfile::find()->where(['user_id' => Yii::$app->user->identity->id])->one()) {\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view']);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n }\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n\n\n// $model = $this->findModel($id);\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('update', [\n// 'model' => $model,\n// ]);\n// }\n }", "public function actualizarCuenta()\n\t{\n\t\t$usuario = new UsuarioModel();\n\t\t$getRule = $users->getRule('updateAccount');\n\t\t$users->setValidationRules($getRule);\n\t\t$user = [\n\t\t\t'id' \t=> $this->session->get('userData.id'),\n\t\t\t'name' \t=> $this->request->getPost('name')\n\t\t];\n\n\t\tif (! $users->save($user)) {\n\t\t\treturn redirect()->back()->withInput()->with('errors', $users->errors());\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n // $model->ReClave=$model->Clave;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idUsuario]);\n }\n\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function update($id)\n\t{\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$validation = Validator::make($input, User::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$user = User::find($id);\t\n\t\t\t$user->username = Input::get('username');\n\t\t\t$user->desusuario = Input::get('desusuario');\t\t\n\t\t\t$user->rolusuario = Input::get('rolusuario');\t\n\t\t\tif(Input::get('password')<>\"\")\n\t\t\t{\t\n\t\t\t\t$user->password = Hash::make(Input::get('password'));\t\t\n\t\t\t}\n\t\t\t//$user->usuario_id = Input::get('usuario_id');\n\t\t\t$user->usuario_id = 1 ;\n\n\t\t\t$user->save();\n\t\t\t//$user->update($input); //evitar el modo automatico\n\n\t\t\treturn Redirect::route('users.show', $id);\n\t\t}\n\n\t\treturn Redirect::route('users.edit', $id)\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "public function update()\n {\n $headerscripts['header_scripts'] = array(\n ''\n );\n\n $footerscripts['footer_scripts'] = array(\n '<script src=\"'.base_url().'assets/appjs/Users/users.js\"></script>'\n );\n\n // Samo Admin moze mjenjat i kreirat nove usere\n if(!$this->user->checkIfAdmin())\n {\n redirect('/home');\n }\n else\n {\n $viewData['empty'] = '';\n\n $this->load->helper('form');\n $this->load->library('form_validation');\n\n $this->form_validation->set_rules('avatar', 'Avatar', 'trim|required');\n $this->form_validation->set_rules('name', 'Ime', 'trim|required');\n $this->form_validation->set_rules('username', 'Ime', 'trim|required');\n $this->form_validation->set_rules('surname', 'Prezime', 'trim|required');\n $this->form_validation->set_rules('email', 'Email', 'trim|required');\n $this->form_validation->set_rules('username', 'KorisnickoIme', 'trim|required');\n // $this->form_validation->set_rules('password', 'Lozinka', 'trim|required');\n $this->form_validation->set_rules('user_type', 'Tip Korisnika', 'trim|required');\n\n if ($this->form_validation->run() === FALSE)\n {\n $viewData['avatars'] = $this->dbQueries->getAvatarImages();\n $viewData['userTypes'] = $this->dbQueries->getUserTypes();\n $id = $this->input->post('id');\n $viewData['user'] = $this->user->get($id);\n $this->load_views($headerscripts, $footerscripts, $viewData, 'Users/edit_view');\n }\n else\n {\n //Uredjuje se postojeci korisnik, informacije se dobivaju iz POST metode servera\n $this->user->update();\n\n redirect('/users');\n }\n }\n }", "public function actionUpdate($id)\n {\n /*$model2 = $this->findModel($id);//encuentra el modelo a travez del id o sea que es el modelo de la vista anterior.\n if ($model2->load(Yii::$app->request->post()) && $model2->save()) {\n //echo \"redirect\";\n return $this->redirect(['view', 'id' => $model2->id]);\n } else {*/\n //Creamos la instancia con el model de validación\n $model = new FormUpdate;\n $model->id = $id;\n $usuario = Users::findOne(['id' => $id]);\n $model->username = $usuario->username;\n $model->password = $usuario->password;\n\n //Mostrará un mensaje en la vista cuando el usuario se haya registrado\n $msg = null;\n //Validación mediante ajax\n if ($model->load(Yii::$app->request->post()) && Yii::$app->request->isAjax)\n {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ActiveForm::validate($model);\n }\n\n //Validación cuando el formulario es enviado vía post\n //Esto sucede cuando la validación ajax se ha llevado a cabo correctamente\n //También previene por si el usuario tiene desactivado javascript y la\n //validación mediante ajax no puede ser llevada a cabo\n if ($model->load(Yii::$app->request->post()))\n {\n var_dump($model);\n if($model->validate())\n {\n //Preparamos la consulta para guardar el usuario\n $table = Users::findOne(['id' => $id]);\n $table->username = $model->username;\n //$table->email = $model->email;\n //control por si no cambia el usuario, sino lo cambia no lo guardo xq el valor que cargo en el\n //no es el del pass sino el encriptado\n if($model->password != $usuario->password){\n //Encriptamos el password\n $table->password = crypt($model->password, Yii::$app->params[\"salt\"]);\n }\n //Creamos una cookie para autenticar al usuario cuando decida recordar la sesión, esta misma\n //clave será utilizada para activar el usuario\n $table->authKey = $this->randKey(\"abcdef0123456789\", 200);\n //Creamos un token de acceso único para el usuario\n $table->accessToken = $this->randKey(\"abcdef0123456789\", 200);\n $table->activate = 1;\n $table->id_rol = $model->id_rol;\n $table->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n else\n {\n $model->getErrors();\n }\n }\n return $this->render(\"update\", [\"model\" => $model, \"id\" => $id ]);\n // }\n }", "public function update(Request $request)\n {\n \n $input = $request->all();\n \n $rules = [\n 'DES_NOME' => 'required',\n ];\n\n $nomes = [\n 'DES_NOME' => 'Campo Nome',\n\n ];\n\n $messages = [];\n\n $validator = Validator::make($input, $rules, $messages);\n $validator->setAttributeNames($nomes);\n\n if ($validator->fails())\n {\n Session::flash('error', true);\n return redirect()\n ->back()\n ->withErrors($validator)\n ->withInput();\n }\n\n try { \n $user = new Usuarios();\n $result = (object) $user->setEdita($input); \n\n if ($result->status == 400) \n Session::flash('success', true);\n\n if ($result->status == 500) \n Session::flash('error', true);\n\n }catch (\\Exception $e) {\n DB::rollBack();\n Session::flash('error', true);\n return redirect()->back()->withErrors([$e->getMessage()])->withInput();\n }\n \n return redirect()->back();\n }", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\t$model->password = md5($_POST['Users']['password']);\t\t\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function update(Request $request)\n\t{\n\t\t$this->validate($request,['username'=>'required|max:15','password'=>'required|min:8','phone'=>'max:11','real_name'=>'max:4'],\n\t\t['username.required'=>'用户名称必须!',\n\t\t'username.max'=>'用户名称长度不能超过15!',\n\t\t'password.required'=>'密码不能为空!',\n\t\t'password.min'=>'密码不能少于8位!',\n\t\t'phone.max'=>'手机号不超过11位!',\n\t\t'real_name.max'=>'真实姓名不能超过4个字!'\n\t\t]);\n\t\t\n\t\t$user = User::find($request->input('id'));\n\t\t$user->name = rtrim($request->input('username'));\n\t\t$user->password = bcrypt(rtrim($request->input('password')));\n\t\t$user->phone = rtrim($request->input('phone'));\n\t\t$user->real_name = rtrim($request->input('real_name'));\n\t\t\n\t\tif(!$user->save()){ \n\t\t\treturn back()->with('notify_error' , '修改失败!');\n\t\t}\n\t\t//同步更新关系表\n\t\t$user->roles()->sync($request->input('roles'));\n\t\treturn Redirect::to('donkey/admin/manager')->with('notify_success', '用户' . $user->name . '修改成功!');\n\t}", "public function update() {\r\n $id = $_REQUEST[\"idUsuario\"];\r\n $email = $_REQUEST[\"email\"];\r\n $password = $_REQUEST[\"password\"];\r\n $nombre = $_REQUEST[\"nombre\"];\r\n $apellido1 = $_REQUEST[\"apellido1\"];\r\n $apellido2 = $_REQUEST[\"apellido2\"];\r\n $dni = $_REQUEST[\"dni\"];\r\n $telefono = $_REQUEST[\"telefono\"];\r\n $tipo = $_REQUEST[\"tipo\"];\r\n $imagen = $_REQUEST[\"imagen\"];\r\n\r\n $result = $this->db->manipulacion(\"UPDATE usuario SET\r\n email = '$email',\r\n\t\t\t\t\t\t\t\tnombre = '$nombre',\r\n\t\t\t\t\t\t\t\tapellido1 = '$apellido1',\r\n\t\t\t\t\t\t\t\tapellido2 = '$apellido2',\r\n\t\t\t\t\t\t\t\tdni = '$dni',\r\n\t\t\t\t\t\t\t\ttelefono = '$telefono',\r\n tipo = '$tipo',\r\n imagen = '$imagen'\r\n WHERE id = '$id'\");\r\n return $result;\r\n }", "public function update(UsuarioFormRequest $request, $id)\n {\n $usuario = User::findOrFail($id); \n $usuario -> name = $request -> get('name');//este valor es el que se encuentra en el formulario\n $usuario -> email = $request -> get('email');\n $usuario -> password = bcrypt($request -> get('password'));\n $usuario -> update();\n Session::flash('actualizar','Se ha actualizado los datos del usuario correctamente');\n return Redirect::to('seguridad/usuario');\n }", "public function actionUpdate($id)\n\t{\n\n\t\t//Check accessControl.\n\t\t$model= Users::model()->with('UserLogin')->findByPk($id);\n\t\t$result = Yii::app()->authManager->getAuthAssignment(Yii::app()->user->roles,$id);\n\n\t\t$self = false;\n\t\tif(!empty($result)){\n\t\t\t$self = true;\n\t\t}\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\n\t\t\t$dp_file = CUploadedFile::getInstance($model, 'display_picture');\n\n\t\t\t$user_login = UserLogin::model()->findByAttributes(array('user_id'=>$id));\n\n\t\t\t$user_login->username = $model->email;\n\t\t\t$user_login->display_name = $model->fname.\" \".$model->lname;\n\n\t\t\tif($model->validate()){\n\t\t\t\tif($model->save() && $user_login->update()){\n\n\t\t\t\t\t$user_id = Yii::app()->db->lastInsertID;\n\n\t\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t\t'self'=>$self\n\t\t));\n\t}", "public function update(Request $request)\n {\n $user = User::find(Auth::id());\n\n if($user->email != $request->email){\n $this->validate($request, [\n 'email' => 'required|email|max:255|unique:users',\n ]);\n }\n\n if($request->password != null){\n $this->validate($request, [\n 'password' => 'required|min:6|confirmed',\n ]);\n }\n\n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n\n $user->name = $request->name;\n $user->email = $request->email;\n if($request->password != null){\n $user->password = bcrypt($request->password);\n }\n\n $ok = 'Perfil editado con éxito';\n $error = 'Error al editar el perfil';\n\n if ($user->save()){\n Auth::login($user);\n return view('layouts.showuser_details')->with(['ok' => $ok, 'user' => $user]);\n }\n else {\n return view('layouts.showuser_details')->with(['error' => $error, 'user' => $user]);\n }\n }", "public function update(Request $request, $id) {\n $usuario = User::find($id);\n $usuario->nome = $request->nome;\n $usuario->login = strtoupper($request->login);\n $usuario->perfil = $request->perfil;\n $usuario->situacao = $request->situacao;\n if (isset($request->password)) {\n $usuario->password = Hash::make($request->password);\n }\n $usuario->save();\n return redirect()->route('usuarios.index')->with('success','Usuário Atualizado com Sucesso!');\n }", "public function update(UsuariosRequest $request, $id)\n {\n $usario = $this->usuarios->update($id, $request->all());\n $this->usuarios->save($usario);\n return redirect()->back()->with(['msg' => 'Usuário atualizado com sucesso!']);\n }", "public function actionUpdate()\n {\n $model = $this->loadModel();\n\n if (isset($_POST['User']))\n {\n $model->attributes = $_POST['User'];\n\n if ($model->save())\n {\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Данные обновлены!'));\n\n $this->redirect(array('view', 'id' => $model->id));\n }\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "public function update($id)\n\t{\n\n\t\t$campos['nombres'] = Input::get('nombres');\n $campos['apellidos'] = Input::get('apellidos');\n $campos['email'] = Input::get('email');\n $campos['telefono'] = Input::get('telefono');\n $campos['password'] = Input::get('password');\n $campos['password_confirmation'] = Input::get('password_confirmation');\n\n\t\t$validacion=Validator::make($campos,\n [\n 'nombres'=>'required',\n 'apellidos'=>'required',\n 'email'=>'required',\n 'telefono'=>'required',\n 'password'=>'required',\n 'password_confirmation'=>'required'\n \n\n ]);\n if($validacion->fails()){\n\n return Redirect::back()->withInput()->withErrors($validacion);\n }\n\n\t\tValidaAccesoController::validarAcceso('usuarios','escritura');\n\n\t\t$usuario = Usuarios:: find($id);\n\t\t\n\t\tif(is_null($usuario)){\n\t\t\treturn Redirect::route('ErrorIndex','404');\n\t\t}\n\t\t\n\t\tif( $usuario->validEdit(Input::all())){\n\t\t\treturn Redirect::route('usuarios.index');\n\t\t}else{\n\t\t\treturn Redirect::route('usuarios.edit',$id)->withInput()->withErrors($usuario->errores);\n\t\t}\n\t}", "public function update($id)\n {\n $validator = Validator::make(Input::all(), User::rules(), [], User::attributes());\n\n if ($validator->fails()) {\n return Redirect::to('/admin/user/'.$id.'/edit')\n ->withErrors($validator)\n ->withInput();\n }\n\n $model = User::find($id);\n $model->title = Input::get('title');\n $model->content = Input::get('content');\n $model->audit = Input::get('audit');\n if($model->save()){\n Request::session()->flash('info', '系统用户更新成功!');\n }\n return Redirect::action('Admin\\UserController@index');\n }", "public function update(Request $request, Usuario $usuario)\n {\n //validamos lo que nos llega del formulario\n $request->validate(\n [\n 'nombre' => 'required',\n 'email' => 'required',\n 'contraseña' => 'required',\n ]\n );\n\n // Creo situada si ha validado bien los datos\n $usuario->update([\n 'nombre' => $request['nombre'],\n 'email' => $request['email'],\n //la contraseña va encriptada\n 'contraseña' => md5($request['contraseña']),\n ]);\n\n //muestro mensaje de confirmacion\n $request->session()->flash('message', 'Usuario actualizado correctamente');\n\n //redirijo a la pagina de recorren\n return redirect()->route('usuarios.index');\n }", "public function update(UsuarioRequest $request, $id)\n {\n //\n $usuario = User::findOrFail($id);\n $usuario->nombre=$request->get('nombre');\n $usuario->apellido=$request->get('apellido');\n $usuario->rut=$request->get('rut');\n $usuario->rol=$request->get('rol');\n $usuario->telefono=$request->get('telefono');\n $usuario->email=$request->get('email');\n $usuario->password=bcrypt($request->get('password'));\n \n $usuario->update();\n return Redirect::to('local/usuario');\n }", "public function update()\n {\n $userId = Helper::getIdFromUrl('user');\n\n // Save post data in $user\n $user = $_POST;\n \n // Save record to database\n UserModel::load()->update($user, $userId);\n\n View::redirect('user/' . $userId);\n }", "public function updateUser() {\n //validations\n if ($this->updateUserValidator()->fails()) {\n return redirect()->back()\n ->withErrors($this->updateUserValidator())\n ->withInput();\n }\n\n //update logic\n $updateArray = [\n \"first_name\" => $this->request->input(\"first_name\"),\n \"last_name\" => $this->request->input(\"last_name\"),\n \"username\" => $this->request->input(\"username\"),\n \"email\" => $this->request->input(\"email\"),\n \"address\" => $this->request->input(\"address\"),\n \"country\" => $this->request->input(\"country\"),\n \"pincode\" => $this->request->input(\"pincode\"),\n \"mobileno\" => $this->request->input(\"mobileno\"),\n \"updated_by\" => $this->request->session()->get('user_id'),\n ];\n\n\n if (strlen($this->request->input(\"password\")) > 0) {\n $updateArray[\"password\"] = Hash::make($this->request->input(\"password\"));\n }\n\n\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $user = new User();\n if ($model == null) {\n Yii::$app->session->setFlash('toastr-' . $user->toastr_key . '-index', [\n 'title' => 'Thông báo',\n 'text' => 'Không tìm thấy user',\n 'type' => 'warning'\n ]);\n return $this->redirect(['/auth/user/index']);\n }\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->validate() && $model->save()) {\n Yii::$app->session->setFlash('toastr-' . $user->toastr_key . '-view', [\n 'title' => 'Thông báo',\n 'text' => 'Cập nhật thành công',\n 'type' => 'success'\n ]);\n return $this->redirect(['/auth/user/view', 'id' => $id]);\n } else {\n $errors = Html::tag('p', 'Cập nhật thất bại');\n foreach ($model->getErrors() as $error) {\n $errors .= Html::tag('p', $error[0]);\n }\n Yii::$app->session->setFlash('toastr-' . $model->toastr_key . '-form', [\n 'title' => 'Thông báo',\n 'text' => $errors,\n 'type' => 'warning'\n ]);\n }\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $usuario = Usuario::findOne($model->usuario_idusuario);\n $rol = \\app\\models\\AuthAssignment::find()->where(['user_id'=>$model->usuario_idusuario])->one();\n $model->tipo = $rol->item_name;\n $passAntigua = $usuario->password;\n if ($usuario->load(Yii::$app->request->post()) && $usuario->save()) {\n $model->load(Yii::$app->request->post());\n if(strlen($usuario->password)==32){\n $usuario->password = $passAntigua;\n }else{\n $usuario->password = md5($usuario->password);\n }\n $usuario->save();\n if ($model->save()) {\n if($rol->item_name != $model->tipo){\n $auth = \\Yii::$app->authManager;\n $role = $auth->getRole($model->tipo);\n $auth->assign($role, $usuario->idusuario);\n $rol->delete();\n }\n return $this->redirect(['view', 'id' => $model->idempleado]);\n }\n }\n\n return $this->render('update', [\n 'model' => $model,\n 'usuario' => $usuario,\n ]);\n }", "public function update( UsuarioUpdateRequest $request, $id)\n {\n\n $usuario = User::find($id);\n $usuario->fill($request->all());\n $usuario->save();\n return redirect('/usuario')->with('mensaje', 'Se guardaron los cambios exitosamente');\n }", "public function update($id, Updateregistro_usuariosRequest $request)\n {\n $registroUsuarios = $this->registroUsuariosRepository->findWithoutFail($id);\n\n if (empty($registroUsuarios)) {\n Flash::error('Registro Usuarios not found');\n\n return redirect(route('registroUsuarios.index'));\n }\n\n $registroUsuarios = $this->registroUsuariosRepository->update($request->all(), $id);\n\n Flash::success('Registro Usuarios updated successfully.');\n\n return redirect(route('registroUsuarios.index'));\n }", "public function actionUpdate() {\n $model = $this->loadModel();\n $modelAmbienteUso = new Ambiente_Uso;\n $modelUsuario = new Usuario();\n $modelAmbiente = new Ambiente();\n $modelPredio = new Predio();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Alocacao'])) {\n $model->attributes = $_POST['Alocacao'];\n $a = $model->DT_DIA;\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->ID_ALOCACAO));\n }\n\n $this->render('update', array(\n 'model' => $model,\n 'modelAU' => $modelAmbienteUso,\n 'modelU' => $modelAmbienteUso,\n 'modelA' => $modelAmbiente,\n 'modelP' => $modelPredio\n ));\n }", "public function update(ActualizarUsuarioRequest $request, $id)\n {\n // Consutla de usuario por identificacion\n $usuarios = \\App\\Usuario::find($id);\n // Se envian los datos a actualizar\n $usuarios->fill($request->all());\n $usuarios->save();\n\n return redirect('/usuario');\n }", "public function update($id)\n\t{\n\t\t$user = User::findOrFail($id);\n\t\t\n\t\t// define rules\n\t\t$rules['name'] = 'required';\n\t\t$rules['username'] = 'required';\n\n\t\t// define input\n\t\t$inputs['name'] = Input::get('name');\n\t\t$inputs['username'] = Input::get('username');\n\t\t$inputs['active'] = Input::get('active');\n\t\t$inputs['role_id'] = Input::get('role_id');\n\n\t\tif($inputs['role_id'] == 2) {\n\t\t\t$message = 'Anda tidak bisa mengedit data member melalui sistem AOPS. Harap merubah data member melalui sistem utama.';\n\t\t}\n\t\telse {\n\n\t\t\tif(Input::has('password'))\n\t\t\t{\n\t\t\t\t$inputs['password']\t\t\t\t\t= Hash::make(Input::get('password'));\n\t\t\t\t$rules['password'] \t\t\t\t\t= 'required|min:6|confirmed';\n\t\t\t\t$rules['password_confirmation'] \t= 'required|min:6';\n\t\t\t}\n\n\t\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\t\tif ($validator->fails())\n\t\t\t{\n\t\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t\t}\n\n\t\t\t$user->update($inputs);\n\t\t\t$message = 'Data berhasil disimpan';\n\t\t}\n\n\t\treturn Redirect::route('admin.users.index')->with(\"message\",$message);\n\t}", "function updateUser (){\n\t\t$params = array(\n\t\t\t':idusuarios' => $_SESSION['idusuarios'],\n\t\t\t':nombres' => $_POST['nombres'],\n\t\t\t':apellidos' => $_POST['apellidos'],\n\t\t\t':direccion' => $_POST['direccion'],\n\t\t\t':foto' => $_POST['foto'],\n\t\t\t':email' => $_POST['email'],\n\t\t\t':usuario' => $_POST['usuario'],\n\t\t\t':contrasena' => $_POST['contrasena'],\n\t\t);\n\n\t\t/* Preparamos el query apartir del array $params*/\n\t\t$query ='UPDATE usuarios SET\n\t\t\t\t\tnombres = :nombres,\n\t\t\t\t\tapellidos = :apellidos,\n\t\t\t\t\tdireccion = :direccion,\n\t\t\t\t\tfoto = :foto,\n\t\t\t\t\temail = :email,\n\t\t\t\t\tusuario = :usuario,\n\t\t\t\t\tcontrasena = :contrasena \n\t\t\t\t WHERE idusuarios = :idusuarios;\n\t\t\t\t';\n\n\t\t$result = excuteQuery(\"blogs\", \"\", $query, $params);\n\t\tif ($result > 0){\n\t\t\tunset($_SESSION['idusuarios']);\n\t\t\t$_SESSION['idusuarios'] = NULL;\n\t\t\theader('Location: viewUsers.php?result=true');\n\t\t}else{\n\t\t\theader('Location: editUser.php?result=false');\n\t\t}\n\t}", "public function update(GuardarUsuario $request, $id)\n {\n $user = new \\stdClass;\n\n $user->name = $request->get('name');\n $user->apellido = $request->get('apellido');\n $user->celular = $request->get('celular');\n\n if (auth()->user()->esAdministrador() && $request->has('tipo')) {\n $user->tipo = $request->get('tipo');\n }\n\n $resultado = User::actualizar(['name' => $user->name, 'apellido' => $user->apellido, 'celular' => $user->celular, 'tipo' => $user->tipo ?? 1, 'id' => $id]);\n\n if ($resultado) {\n flash('Usuario actualizado')->success();\n } else {\n flash('No se pudo actualizar el usuario')->error();\n }\n return redirect()->route('usuarios.index');\n }", "public function update(UserRequest $request, $id)\n {\n $this->checkPermission('editar_usuario'); \n $user = $this->user->find($id);\n \n $user->name = $request->name;\n $user->cpf = $request->cpf;\n $user->email = $request->email;\n //$user->password = bcrypt($request->password); \n \n $user->save();\n \n return view('user.show', compact('user'));\n }", "public function editarUsuario()\r\n {\r\n if(isset($_REQUEST['id'])){\r\n\r\n $rolController = new App\\Controllers\\RolController;\r\n $roles = $rolController->getAllRoles();\r\n\r\n $userController = new App\\Controllers\\UserController;\r\n $user = $userController->getUser($_REQUEST['id']);\r\n \r\n require_once 'view/users/edit.php';\r\n } else {\r\n\r\n header('Location: ?c=Registro&a=usuarios');\r\n }\r\n\r\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $oldmodel = $this->findModel($id);\n $model->password='';\n if ($model->load(Yii::$app->request->post()))\n {\n if(isset($_FILES['User']['name']['image']) && $_FILES['User']['name']['image'] != null)\n {\n if($oldmodel->image_path != '' && $oldmodel->image_path != null && file_exists(Yii::getAlias('@webroot').'/'.$oldmodel->image_path))\n {\n unlink(Yii::getAlias('@webroot').\"/\".$oldmodel->image_path);\n }\n $new_image['name'] = $_FILES['User']['name']['image'];\n $new_image['type'] = $_FILES['User']['type']['image'];\n $new_image['tmp_name'] = $_FILES['User']['tmp_name']['image'];\n $new_image['error'] = $_FILES['User']['error']['image'];\n $new_image['size'] = $_FILES['User']['size']['image'];\n\n $name = Yii::$app->common->normalUpload($new_image, Yii::$app->params['userimage']);\n $model->image_path = $name;\n }\n if(isset($model->password) && $model->password!=null)\n {\n $model->password=md5($model->password);\n }\n else {\n $model->password=$oldmodel->password;\n }\n $model->u_by = Yii::$app->user->id;\n $model->u_date = time();\n if($model->save()){\n $msg=\"User has been successfully updated\";\n $flash_msg = \\Yii::$app->params['msg_success'].$msg.\\Yii::$app->params['msg_end'];\n \\Yii::$app->getSession()->setFlash('flash_msg', $flash_msg);\n return $this->redirect(['index']);\n }\n else{\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function editarUsuarioController() {\n $datos = $_GET[\"action\"];\n $datos = explode('/', $datos);\n $respuesta = ingresoModels::editarUsuarioModel($datos, \"usuarios\");\n echo '<div class=\"form-group\">\n <input type=\"hidden\" name=\"idEditar\" value=\"'.$respuesta[\"IdUsuario\"].'\">\n <label for=\"editarNombre\">Editar nombre:</label>\n <input type=\"text\" class=\"form-control\" id=\"editarNombre\" name=\"editarNombre\" value=\"'.$respuesta[\"Nombre\"].'\">\n </div>\n <div class=\"form-group\">\n <label for=\"editarUsuario\">Editar usuario:</label>\n <input type=\"text\" class=\"form-control\" id=\"editarUsuario\" name=\"editarUsuario\" value=\"'.$respuesta[\"Usuario\"].'\">\n </div>\n <div class=\"form-group\">\n <label for=\"tipoEditar\">Editar tipo usuario:</label>\n <p class=\"text-muted\">Administrador = 1</p>\n <p class=\"text-muted\">Administrador de Laboratorio = 2</p>\n <p class=\"text-muted\">Estudiante = 3</p>\n <p class=\"text-muted\">Inhabilitar = 4</p>\n <input type=\"text\" class=\"form-control\" id=\"tipoEditar\" name=\"tipoEditar\" value=\"'.$respuesta[\"Tipo\"].'\">\n </div>\n </div>\n <!-- /.box-body -->\n <div class=\"box-footer\">\n <button type=\"submit\" class=\"btn btn-primary\">Actualizar</button>\n </div>';\n }", "public function user()\n {\n if ($this->form_validation->run() === FALSE)\n {\n $users = $this->admin_model->get_admin();\n $data['users'] = $users;\n $data['title'] = 'Utilisateur'; \n $this->load->view('layouts/header');\n $this->load->view('admin/user', $data);\n $this->load->view('layouts/footer');\n }\n else\n {\n if ($this->admin_model->update_users());\n {\n redirect('admin/accueil');\n }\n }\n }", "public function update($id)\n\t{\n\t\t$user = Admin::find($id);\n \n $user->username = Request::input('username');\n $user->password = md5(Request::input('password'));\n \n $user->save();\n \n return redirect('/admin/user');\n\t}", "public function actionUpdate($id) {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if($tipo == \"1\"){\n $model = $this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n } else {\n $this->redirect(array('User/ChecaTipo'));\n }\n \n \n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n \n }", "public function update()\n {\n $updateUser = new UpdateUser($this->_user->getID(), $this->_user->account);\n if (CSRF::validate() && $updateUser->execute()) {\n return new RedirectResponse('/account/bewerken');\n }\n\n return $this->edit();\n }", "public function update(Request $request, Usuario $usuario)\n {\n $request->validate([\n 'nombre'=>'required',\n 'apellidos'=>'required',\n 'correo'=>'required',\n 'password'=>'required'\n ]);\n\n if(!is_null($request->input('password'))){\n $request->input('password')=hash('sah256', $request->input('password'));\n }\n\n Usuario::update($request->all());\n\n return redirect()->route('login.index')->with('success', 'Usuario editado exitosamente, por favor vuelva a iniciar sesión');\n }", "public function update(UserUpdateRequest $request, $id)\n {\n $user=User::findOrFail($id);\n $user->name=$request->name;\n $user->last_name=$request->last_name;\n $user->username=$request->username;\n $user->email=$request->email;\n $user->role=$request->role;\n if($request->password){\n $user->password=$request->password;\n }\n $user->confirmed=1;\n $user->save();\n\n return redirect()->route('users.index')->with('success','Usuario editado con exito');\n }", "public function actionUpdate() {\r\n\r\n //common view data\r\n $mainCategories = $this->mainCategories;\r\n $brands = $this->brands;\r\n \r\n $errors = [];\r\n $success = null;\r\n \r\n //check if the user is logged in and get User $user properties from the database\r\n $userID = $this->checkLogged();\r\n \r\n $user = new User;\r\n $user = $user->getUserById($userID);\r\n \r\n if(!$user) {\r\n $errors['firstname'][0] = 'Unable to find user. Please, try again later';\r\n } else {\r\n //user properties\r\n $firstname = $user->firstname;\r\n $lastname = $user->lastname;\r\n $email = $user->email;\r\n } \r\n \r\n //check if the form has been submitted\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n \r\n $firstname = $this->test_input($_POST['firstname']);\r\n $lastname = $this->test_input($_POST['lastname']);\r\n $email = $this->test_input($_POST['email']);\r\n \r\n //create form model, validate it and if success - update user profile\r\n $model = new EditProfileForm($userID, $firstname, $lastname, $email);\r\n \r\n if(!$model->validate()) {\r\n $errors = $model->errors;\r\n } else {\r\n #!!!!!!!!!!!!!\r\n $success = $model->updateProfile() ? 'USER DATA SUCCESFULLY UPDATED': 'UNABLE TO UPDATE USER PROFILE. TRY AGAIN LATER';\r\n }\r\n }\r\n \r\n include_once ROOT . '/views/profile/update.php';\r\n }", "function update_pasien()\n {\n $modelpasien = $this->m_pasien;\n $modelpasien->update();\n \n if($this->session->userdata('status') != \"login\"){\n redirect(base_url(\"admin\"));\n }\n else if($this->session->userdata('status') == \"login\"){\n $this->index();\n }\n }", "public function update(Request $request){\n $id = $request->input('usuario'); \n \n User::where('id',$id)->first()->update($request->all());//edita el usuario dependiendo del id\n return redirect('/editar_usuario')->with('status','Usuario editado exitosamente');\n\n \n }", "public function update(Request $request, $id)\n\t{\n\t\tUser::find($id)->update(Input::all());\n\n\t\treturn Redirect::route('usuarios.index')->with('success', true);\n\t}", "function update(){\n session_start();\n $id=$_SESSION['id_alumno'];\n $nombre= $_POST['nombre'];\n $apellido= $_POST['apellido'];\n $telefono= $_POST['telefono'];\n \n unset($_SESSION['id_alumno']);\n $this->model->update(['id'=>$id,'nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n \n $url= constant('URL').\"alumno\";\n header(\"Location: $url\");\n\n // $this->index();\n\n // if ($this->model->update(['id'=>$id,'nombre'=>$nombre , 'apellido'=>$apellido,'telefono'=>$telefono])) {\n // $alumno = new Alumnos();\n // $alumno->id=$id;\n // $alumno->nombre=$nombre;\n // $alumno->apellido=$apellido;\n // $alumno->telefono=$telefono;\n // $this->view->alumno=$alumno;\n // $this->render();\n\n\n // }else{\n // $this->view->render('errors/index');\n // }\n // $url= constant('URL').\"alumno\";\n // header(\"Location: $url\");\n }", "public function update(Request $request, $id)\n {\n $user = Usuario::find($id);\n if(isset($user)){\n $user->nome_usuario = $request->input('nome_usuario');\n $user->login = $request->input('login_usuario');\n $user->email = $request->input('email_usuario');\n $user->senha = $request->input('senha_usuario');\n $user->tempo_expiracao_senha = $request->input('validade_senha_usuario');\n $user->cod_autorizacao = $request->input('codg_auth');\n $user->status_usuario = $request->input('status_usuario');\n $user->save();\n return redirect('/'); \n }\n return redirect('/');\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model_login=Login::find()->where(['username'=>$id])->one();\n $model->password=$model_login->password;\n $model->repassword=$model_login->password;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($model_login->load(Yii::$app->request->post()) && $model_login->save()) {\n return $this->redirect(['detail', 'id' => $model->id_user]);\n }\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'model_login'=>$model_login,\n ]);\n }\n }", "public function update($id, UpdateusuarioRequest $request)\n {\n PermissionController::temPermissao('usuarios.edit');\n $usuario = $this->usuarioRepository->find($id);\n\n if (empty($usuario)) {\n Flash::error('Usuario não encontrado.');\n\n return redirect(route('usuarios.index'));\n }\n\n $usuario = $this->usuarioRepository->update($request->all(), $id);\n DB::update('update role_user set role_id = ?, updated_at = ? where user_id = ?', [$request->nivelAcesso, date(\"Y-m-d H:i:s\"), $id]);\n\n Flash::success('Usuario atualizado com sucesso.');\n\n return redirect(route('usuarios.index'));\n }", "public function update(Request $request, $id)\n {\n //dd($id);\n $usuario = Usuario::where('cpf', '=', $id)->first();\n $usuario->cpf = $request->cpf;\n $usuario->ativo = $request->ativo;\n $usuario->tipoAcesso = $request->tipoAcesso;\n $usuario->nome = $request->nome;\n $usuario->fone =$request->fone;\n $usuario->celular =$request->celular;\n $usuario->email =$request->email;\n $usuario->password = bcrypt($request->password);\n// $usuario->created_at =$request->created_at;\n// $usuario->updated_at =$request->updated_at;\n $usuario->remember_token = $request->remember_token;\n $usuario-> save();\n return redirect()->route('usuarios.index')->with('message', 'Usuário Editado Com Sucesso');\n }", "public function update(Request $request, $id)\n {\n $data = request()->except(['_token','_method']);\n $request->validate([\n 'name' => 'required|string|max:100',\n 'firstLastName' => 'required|string|max:100',\n 'secondLastName' => 'required|string|max:100',\n 'rol' => 'required',\n 'email' => 'required|email',\n 'password'=> 'required|confirmed|min:8',\n ]);\n\n $rol = request()->rol;\n \n if ($rol == \"administrador\") {\n $rol = 1;\n } elseif($rol == \"jefe\") {\n $rol = 0;\n }\n \n $user = new User();\n $name = $request->name;\n $firstLastName = $request->firstLastName;\n $secondLastName = $request->secondLastName;\n $email = $request->email;\n $password = bcrypt($request->password);\n \n $affected = User::where('id', $id)->update(['name' => $name, 'firstLastName'=>$firstLastName,\n 'secondLastName'=>$secondLastName, 'rol' => $rol, 'email'=>$email, 'password'=>$password]);\n\n return redirect()->action('UserController@index')->with('updateUser', 'Usuario actualizado');\n }", "public function update($id, CreateUsuariosRequest $request)\n\t{\n\t\t$usuarios = $this->usuariosRepository->findUsuariosById($id);\n\n\t\tif(empty($usuarios))\n\t\t{\n\t\t\tFlash::error('Usuarios not found');\n\t\t\treturn redirect(route('usuarios.index'));\n\t\t}\n\n\t\t$usuarios = $this->usuariosRepository->update($usuarios, $request->all());\n\n\t\tFlash::message('Usuarios updated successfully.');\n\n\t\treturn redirect(route('usuarios.index'));\n\t}", "public function actionUpdate($id) {\n $this->pageTitle = \"Thamor - Update User\";\n $model = $this->loadModel($id);\n $password = $model->password;\n $oldPassError = \"\";\n $newPassError = \"\";\n $confirmPassError = \"\";\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['User'])) {\n $errorFlag = false;\n //print_r($_POST['User']); exit;\n $oldPass = $_POST['User']['old_pass'];\n $newPass = $_POST['User']['new_pass'];\n $confirmPass = $_POST['User']['confirm_pass'];\n if (!empty($oldPass) || !empty($newsPass) || !empty($confirmPass)) {\n if (empty($oldPass) || empty($newPass) || empty($confirmPass)) {\n if (empty($oldPass)) {\n $errorFlag = true;\n $oldPassError = \"Old Password Cannot Be Empty\";\n } else {\n $oldPass = md5($oldPass);\n }\n if (empty($newPass)) {\n $errorFlag = true;\n $newPassError = \"New Password Cannot Be Empty\";\n }\n if (empty($confirmPass)) {\n $errorFlag = true;\n $confirmPassError = \"Confirm Password Cannot be Empty\";\n }\n } elseif (md5($oldPass) != $password) {\n $errorFlag = true;\n $oldPassError = \"You have not Entered Correct Old Password\";\n } elseif ($newPass != $confirmPass) {\n $errorFlag = true;\n $newPassError = \"New Password Doesn't Match With Confirm Password\";\n }\n $model->password = md5($newPass);\n }\n $model->attributes = $_POST['User'];\n if ($errorFlag == false && $model->save()) {\n\n if (Yii::app()->user->isAdmin()) {\n $this->redirect(array('view', 'id' => $model->id));\n } else {\n Yii::app()->user->setFlash('udpate', 'Profile is Successfully Updated');\n $this->redirect(array('update', 'id' => $model->id));\n }\n }\n }\n //print_r($model->getErrors());exit;\n\n $this->render('update', array(\n 'model' => $model,\n 'oldPassError' => $oldPassError,\n 'newPassError' => $newPassError,\n 'confirmPassError' => $confirmPassError,\n ));\n }", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif(isset($_POST['User']['password']))\n\t\t\t{\n\t\t\t$model->password = crypt($_POST['User']['password']);\n\t\t\t}\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionUpdateUser($id)\n {\n $model = $this->findModelUser($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\n $model->setPassword($model->password);\n $model->generateAuthKey();\n $model->generateEmailConfirmToken();\n if ($model->save()) {\n // нужно добавить следующие три строки:\n // $auth = Yii::$app->authManager;\n // $authorRole = $auth->getRole('superadmin');\n // $auth->assign($authorRole, $user->getId());\n return $this->redirect(['view-user', 'id' => $model->id]);\n }else{\n print_arr($model->errors);\n die('A');\n }\n } else {\n return $this->render('user/update', [\n 'model' => $model,\n ]);\n }\n }", "public function update(Request $request, $id)\n {\n $action = redirect(route('users.index'));\n\n try {\n $data = [];\n\n $roleValidation = sprintf(\"in:%s\", implode(',', [IUser::ROLE_USER, IUser::ROLE_ADMIN]));\n $request->validate([\n 'name' => 'required|string|min:3|max:255',\n 'email' => 'present|string|email|max:255',\n 'password' => 'present|confirmed',\n 'role' => 'required|string|' . $roleValidation,\n ]);\n\n $data['name'] = $request->get('name');\n $data['role'] = $request->get('role');\n\n $hasPassword = ! empty($request->get('password'));\n if ($hasPassword) {\n $request->validate([\n 'password' => 'min:8',\n ]);\n $data['password'] = Hash::make($request->get('password'));\n }\n\n $user = User::find($id);\n if ($user->email != $request->get('email')) {\n $request->validate([\n 'email' => 'unique:users,email',\n ]);\n $data['email'] = $request->get('email');\n }\n\n $user->update($data);\n $user->save();\n\n $action->with('success', \"Usuario actualizado\");\n\n } catch (ModelNotFoundException $exception) {\n $action->withErrors('Usuario no existe o es inválido');\n }\n\n return $action;\n }", "public function update(Request $request, Usuario $usuario){\n \n $usuario->nombre = $request->nombre;\n $usuario->apellido_pat = $request->apell_pat;\n $usuario->apellido_mat = $request->apell_mat;\n $usuario->edad = $request->edad;\n $usuario->pais = $request->pais;\n $usuario->cod_postal = $request->codigo_postal;\n $usuario->direccion = $request->direccion;\n\n $usuario->save();\n return redirect()->route('usuarios.show', $usuario)->with('actualizar', 'ok'); \n }", "public function update (Request $request){\n //unique:users,nick,'.$id, otro nick o solo el mimso del registro\n //consegui usuario identificado\n $user = \\Auth::user();\n $id = $user->id;\n \n //validacion formulario\n $validate = $this->validate($request,[\n 'name' => 'required|string|max:255',\n 'surname' => 'required|string|max:255',\n 'nick' => 'required|string|max:255|unique:users,nick,'.$id,\n 'email' => 'required|string|email|max:255|unique:users,email,'.$id \n ]);\n \n //recoger datos del formulario \n $name = $request->input('name');\n $surname = $request-> input('surname');\n $nick = $request-> input('nick');\n $email = $request-> input('email');\n \n \n //asignar nuevos valores al objeto del usuario\n $user -> name =$name;\n $user -> surname = $surname;\n $user -> nick = $nick;\n $user -> email = $email;\n \n //ejecutar consulta y cambios en BBDD\n $user->update();\n \n //redirrecion \n return redirect ()->route('config')->with(['message'=>'Ok, usuario actualizado']);\n \n //var_dump($id);\n //var_dump($name);\n //var_dump($surname);\n \n //die();\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post())) {\n\n $arr_request = Yii::$app->request->post()['User'];\n\n $this->formInputDataValidation($arr_request, $model);\n\n $model->auth_key = Yii::$app->security->generateRandomString();\n\n $model->email = $arr_request['email'];\n\n $model->created_at = time();\n\n $model->updated_at = time();\n\n $model->username = $arr_request['username'];\n\n $model->password_hash = Yii::$app->security->generatePasswordHash($arr_request['password']);\n\n $model->status = 10;\n\n $model->save();\n\n return $this->render('view', [\n 'model' => $this->findModel($model->id),\n ]);\n } else {\n return $this->render('update', [\n 'model' => $model\n ]);\n }\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'usuario' => 'required',\n 'legajo' => 'required'\n ]);\n\n $usuarios = Usuario::find($id);\n $usuarios->nom_user = $request->get('usuario');\n $usuarios->leg_user = $request->get('legajo');\n $usuarios->save();\n\n return redirect('/usuarios')->with('success', 'El usuario ha sido modificado correctamente');\n }", "public function update($id)\n\t{\n\t\t$user = User::findOrFail($id);\n\n\t\t$username = $user->username;\n\t\t$id = $user->id;\n\n\t\t$rules = [\n\t\t\t'username' => 'required',\n\t\t\t'password-repeat' => 'same:password',\n\t\t\t'email' => 'required',\n\t\t\t'role' => 'required'\n\t\t];\n\n\t\t$validator = \\Validator::make($data = Input::all(), $rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn \\Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$user->email\t= Input::get('email');\t\n\t\t$user->username\t= Input::get('username');\t\n if(Input::has('password'))\n {\n $user->password\t= Hash::make(Input::get('password'));\n }\t\n\t\t$user->email\t= Input::get('email');\t\n\t\t$user->aktif\t= Input::get('aktif');\t\n\t\t$user->role\t\t= Input::get('role');\n\t\t$user->save();\n\n\t\treturn \\Redirect::route('users.index')->withPesan(Yoga::suksesFlash('User <strong>' . $id . ' - ' . $username . '</strong> telah <strong>BERHASIL</strong> diubah'));\n\t}", "public function update(Request $request, $id){\n // Recuperar el usuario\n $user=User::find($id);\n // Actualizar los datos con los del formulario\n $user->name=$request->name;\n $user->email=$request->email;\n $user->password=bcrypt($request->password);\n $user->type=$request->type;\n $user->save();\n\n // Otra opcion es mediante la funcion fill\n // $user->fill($request->all());\n // $user->save();\n\n // Recuperar y actualizar datos\n // $user->update($request->all());\n\n // Preparar el mensaje ha mostrar\n flash('Se ha editado '.$user->name.' exitosamente.')->success();\n // Redireccionar al listado de usuarios\n return redirect()->route('admin.user.index');\n }", "public function update(Request $request, $id)\r\n {\r\n $v = $this->validate($request, [\r\n 'name' => 'required',\r\n 'email' => 'required',\r\n ]);\r\n\r\n $user = User::find($id);\r\n\r\n $user->name = $request->name;\r\n $user->email = $request->email;\r\n $user->syncRoles($request->rol);\r\n\r\n if($request->has('password')){\r\n $user->password = bcrypt($request->password);\r\n }\r\n\r\n $user->save();\r\n\r\n return redirect()->route('users.edit', $user->id)\r\n ->with('info', 'Usuario actualizado con exito');\r\n }", "public function update(Request $request, Usuario $usuario)\n {\n $usuario->nombre = $request->nombre;\n $usuario->save();\n return redirect()->route('usuarios.index',$usuario->rut);\n }", "public function actionUpdate($id)\n {\n $this->autorizaUsuario();\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post())) {\n if($model->save()){\n $this->mensagens('success', 'Palestrante Alterado', 'Palestrante foi Alterado com Sucesso');\n }else{\n $this->mensagens('danger', 'Palestrante Não Alterado', 'Houve um erro ao Alterar o Palestrante');\n }\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function update(Request $request, Usuario $usuario)\n {\n $request->validate([\n 'nomusu' => ['required', 'string', 'min:3', 'max:30', 'unique:usuarios,nomusu'.$usuario->id],\n 'mail' => ['required', 'string', 'unique:usuarios,mail'.$usuario->id],\n 'localidad' => ['required', 'string', 'min:3', 'max:50'],\n 'perfil_id' => ['required']\n ]);\n\n try {\n $usuario->update($request->all());\n return redirect()->route('usuarios.index')->with('mensaje', 'Usuario actualizado correctamente');\n }catch(\\Exception $ex) {\n return redirect()->route('usuarios.index')->with('mensaje', 'Error: '.$ex->getMessage());\n }\n }", "public function update(Request $request, $id)\n {\n \t\t$request-> validate([\n\t\t'name'=>'required',\n\t\t'email'=>'required',\n\t\t'descripcion_usuario'=>'required',\n ]);\n\t\t$user = user::find($id);\n\t\t//$user->user = $request->get('id');\n\t\t$user->name = $request->get('name');\n\t\t$user->email = $request->get('email');\n\t\t$user->descripcion_usuario = $request->get('descripcion_usuario');\n\t\t//$user->password = $request->get('password');\n//\t\t$user->cargo = $request->get('cargo');\n\n\t\t$user->save();\n\t\t\n\t\treturn redirect('/usuarios')->with('succes', '¡Usuario actualizado!');\n }", "public function update(Request $request, $id)\n {\n $usuario=usuario::find($id);\n $usuario->nombre=$request->input(\"nombre\"); \n $usuario->contraseña=$request->input(\"contraseña\"); \n $usuario->correo=$request->input(\"correo\"); \n $usuario->tipo=$request->input(\"tipo\"); \n $usuario->save();\n return redirect()->route(\"usuario.index\"); \n\n }", "public function update(UserFormRequest $request, $id)\n {\n $user = User::find($id);\n \n if (!$user) {\n return redirect()\n ->route('users.index')\n ->with('error', \"Falha ao encontrar usuário com id <b>{$user->id}</b>\");\n }\n\n \n if ($user->name == 'admin') {\n return redirect()->route('users.index')->with('warning', \"Usuário <b>admin</b> não pode ser editado!\");\n }\n \n \n if ($user->update($request->all()) && $user->roles()->sync($request->get('perfis', []))) {\n \n return redirect()->route('users.index')\n ->with('success', \"Usuário <b>{$user->name}</b> atualizado com sucesso!\");\n }\n \n return redirect()->back()->with('error', 'Falha ao atualizar usuário!');\n }", "public function edit() {\n\n\t\t\t\t// Si on reçoit des données post\n\t\t\t\tif(!empty($this->request->data)){\n\t\t\t\t\t$this->User->id = $this->Session->read('Auth.User.id'); // On associe l'id du bac à l'objet \n\n\t\t\t\t\t// On valide les champs envoyés\n\t\t\t\t\tif($this->User->validates() ){\n\n\n\t\t\t\t\t\t$this->Session->setFlash('Données correctement sauvegardées', 'alert', array('class' => 'success'));\n\n\t\t\t\t\t\t// On enregistre les données\n\t\t\t\t\t\t$this->User->save(array(\n\t\t\t\t\t\t\t'email'\t\t\t=> $this->request->data['Users']['email'],\n\t\t\t\t\t\t\t'password' \t\t=> $this->Auth->password($this->request->data['Users']['password']),\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// On affiche les données déjà entré par l'user\n\t\t\t\t$user= $this->User->find('first',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'conditions' =>\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'id' => $this->Session->read('Auth.User.id'),\n\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t$this->set(compact('user'));\n\t\t}", "public function actionModificar($id)\n {\n if($id == Yii::$app->user->id){\n\n $model = Usuario::findOne($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['/perfil/index', 'id' => $model->id,'modificar'=>true]);\n }\n\n return $this->render('modificar', [\n 'model' => $model,\n ]);\n\n }else{\n return $this->redirect(['/site/index']);\n\n }\n \n\n\n}", "public function actualizarUsuarioModel($data){\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE usuarios SET codigo = :codigo, nombre=:nombre, apellidos=:apellidos, email=:email, password=:password, tipo=:tipo WHERE id = :id\");\n\t\t$stmt->bindParam(\":codigo\", $data['codigo']);\n\t\t$stmt->bindParam(\":nombre\", $data['nombre']);\n\t\t$stmt->bindParam(\":apellidos\", $data['apellidos']);\n\t\t$stmt->bindParam(\":email\", $data['email']);\n\t\t$stmt->bindParam(\":password\", $data['password']);\n\t\t$stmt->bindParam(\":tipo\", $data['tipo']);\n\t\t$stmt->bindParam(\":id\", $data['id']);\n\t\tif($stmt->execute())\n\t\t\treturn \"success\";\n\t\telse\n\t\t\treturn \"error\";\n\t\t$stmt->close();\n\n\n\t}", "public function actionUpdate($id)\n {\n if (!One::app()->user->can('Update User')) {\n throw new ForbiddenHttpException('You are not authorized to access this page.');\n }\n\n $model = $this->findModel($id);\n\n if ($model->load(One::$app->request->post()) && $model->save()) {\n One::app()->session->setFlash('success', 'User updated successfully.');\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function update(UserUpdateRequest $request, $id)\n {\n //\n\n $user = User::find($id);\n $user->fill($request->all());\n $user->save();\n flash('Usuario Editado', 'success');\n return redirect()->route('admin.user.show',[$user]);\n\n }", "public function update($id)\n\t{\n\t\t $userUpdate=Request::all();\n\t\t $user=User::find($id);\n\t\t $user->update($userUpdate);\n\t\t return redirect('admin/users');\n\t}", "function editarUsuario(UserUpdateRequest $request, $id){\n $usuario = User::find($id);\n \n if (!$usuario){\n return redirect()->back()->withErrors(array('error' => 'ERROR. No s\\'ha pogut modificar l\\'usuari, hi ha hagut un error amb el Servidor.'));\n }\n \n $usuario->fill(request()->all());\n\n if ($_FILES[\"imatge_usuari\"][\"tmp_name\"]!=\"\"){\n $usuario['imatge_usuari'] = base64_encode(file_get_contents($_FILES[\"imatge_usuari\"][\"tmp_name\"]));\n }\n\n try{\n $usuario->save();\n } catch (\\Exception $e){\n return redirect()->back()->withErrors(array('error' => 'ERROR. No s\\'ha pogut modificar l\\'usuari.'));\n }\n\n return redirect()->route('indexUsuariIntern')->with('success', 'S\\'ha modificat l\\'usuari correctament');\n }", "public function actionEditarSenha()\n {\n //$model = new UserMudarSenha;\n $old_model = Usuario::findOne(Yii::$app->user->identity->id);\n $model = UserMudarSenha::findOne(Yii::$app->user->identity->id);\n\n if (!$model) \n throw new NotFoundHttpException('Ocorre algum erro, Favor entrar em contato com o administrador');\n \n if ($model->load(Yii::$app->request->post())) {\n \n //enviar por email\n if(md5($model->password_hash) === $old_model->password_hash){\n if($model->new_password_hash === $model->confirm_password){\n $model->password_hash = md5($model->new_password_hash);\n //$model->password_reset_token = \"CONFIRMADO\";\n $model->status = $model::STATUS_ACTIVE;\n $model->save();\n //enviar email;\n Yii::$app->user->logout();\n return $this->redirect([Url::to(\"/login\")]);\n }else{\n $model->addError('confirm_password', 'Esse campo tem que ser igual ao de Nova Senha.');\n\n } \n }else{\n $model->addError('password_hash', 'Senha Inválida.');\n }\n } \n $model->password_hash = \"\";\n return $this->render('_form_mudar_senha', [\n 'model' => $model,\n ]);\n \n }", "public function update(Request $request, User $user)\n {\n //Alterar Usuarios\n $user->update($request->all());\n \n //Alterar roles\n $user->roles()->sync($request->get('roles'));\n \n return redirect()->route('users.index')\n ->with('status', 'Usuario com id ' . $user->id . ' alterado com sucesso');\n }", "public function update(UsersRequest $request, $id)\n {\n $user = User::find($id);\n $user->fill($request->all());\n if ($user->save()) {\n return redirect()->action('UsersController@index')->withSuccess('Usuário editado com sucesso!');\n } else {\n return redirect()->action('UsersController@index')->withFailure('Não foi possível editar o usuário!');\n }\n }", "public function update(Request $request, $id)\n {\n $usuario = Usuario::find($id);\n $usuario->usuario = $request->usuario;\n $usuario->password = bcrypt($request->password);\n $usuario->nombre = $request->nombre;\n $usuario->apellido = $request->apellido;\n $usuario->tipoDocumento = $request->tipoDocumento;\n $usuario->numeroDocumento = $request->numeroDocumento;\n $usuario->email = $request->email;\n $usuario->telefono = $request->telefono;\n $usuario->rol_id = $request->rol;\n $usuario->ubicacion_id = $request->ubicacion;\n $usuario->habilitado = $request->habilitado;\n $usuario->save();\n Flash::success('Usuario modificado con éxito!');\n return (redirect()->route('usuarios'));\n }", "public function updateUser_put()\n\t{\n\t\t$data = [\n\t\t\t\"id\"=>$this->put('id'),\n\t\t\t\"nama\"=>$this->put('nama',true),\n\t\t\t\"alamat\"=>$this->put('alamat',true),\n\t\t\t\"telp\"=>$this->put('telp',true),\n\t\t\t\"username\"=>$this->put('username',true)\n\t\t];\n\t\t$id = $this->put('id');\n\n\t\tif ($this->User->updateUser($data,$id)>0) {\n\t\t\t$this->response([\n\t\t\t\t'error'=>false,\n\t\t\t\t'message'=>'User berhasil diupdate',\n\t\t\t\t'user'=>$data\n\t\t\t],200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response([\n\t\t\t\t'error'=>true,\n\t\t\t\t'message'=>'User gagal diupdate'\n\t\t\t],200);\n\t\t}\n\t}", "public function update()\n { if (is_null($this->id))\n trigger_error(\"User::update(): Attempt to update a User object that does not have its ID property set.\", E_USER_ERROR);\n \n // Update the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"UPDATE users SET user_name=:user_name, user_password_hash=:user_password_hash, user_email=:user_email, orcid=:orcid, orcid_code=:orcid_code, orcid_access_token=:orcid_access_token WHERE user_id = :id\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":user_name\", $this->userName, PDO::PARAM_STR);\n $st->bindValue(\":user_password_hash\", $this->userPasswordHash, PDO::PARAM_STR);\n\t$st->bindValue(\":user_email\", $this->userEmail, PDO::PARAM_STR);\n $st->bindValue(\":orcid\", $this->orcid, PDO::PARAM_STR);\n $st->bindValue(\":orcid_code\", $this->orcidCode, PDO::PARAM_STR);\n $st->bindValue(\":orcid_access_token\", $this->orcidAccessToken, PDO::PARAM_STR);\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "public function update(Request $request)\n {\n if (!$request->ajax()) return redirect('/');\n\n try {\n DB::beginTransaction();\n $usuario = User::findOrFail($request->id);\n\n $usuario->nombre = $request->nombre;\n $usuario->email = $request->email;\n $usuario->password = Hash::make($request->password);\n $usuario->activo = $request->activo;\n $usuario->id_rol = $request->idRol;\n $usuario->save();\n DB::commit();\n\n }catch (\\Exception $exception){\n DB::rollBack();\n dd($exception);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this\n ->addFlashMessage('User updated: ' . $model->login, self::FLASH_SUCCESS)\n ->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function update(Request $request,$id)\n {\n $usuario = Usuario::find($id);\n $usuario->Nombre=$request->get('Nombre');\n $usuario->Apellido_Paterno=$request->get('Apellido_Paterno');\n $usuario->Apellido_Materno=$request->get('Apellido_Materno');\n $usuario->Edad=$request->get('Edad');\n $usuario->Tipo_Documento=$request->get('Tipo_Documento');\n $usuario->Numero_Documento=$request->get('Numero_Documento');\n $usuario->Direccion=$request->get('Direccion');\n $usuario->Celular=$request->get('Celular');\n $usuario->Gestion=$request->get('Gestion');\n $usuario->Contrasena=$request->get('Contrasena');\n $usuario->save();\n return redirect('/Usuario');\n }", "public function update(Request $request, $id)\n {\n $data = $request->except(\"_method\",\"_token\");\n $usuario= User::find($id);\n $usuario->fill($data);\n $usuario->admin = $request->input('admin', '0');\n $usuario->clientes_propios = $request->input('clientes_propios', '0');\n if ($request->has('password') && $request->input('password') != \"\")\n $usuario->password = Hash::make($request->input('password'));\n $usuario->save();\n Flash::success('Usuario Actualizado');\n return redirect('Usuarios');\n }", "public function update(Request $request, $id)\r\n\t{\r\n if(\\Gate::denies('user-edit')){\r\n return back()->withInput();\r\n }\r\n\r\n\t\t$this->validate($request, [\r\n\t\t\t'name' => 'required|max:255',\r\n\t\t\t'role' => 'required',\r\n\t\t]);\r\n\r\n\t\t$user = User::find($id);\r\n\r\n\t\t$user->name \t\t= $request->Input('name');\r\n\t\t$user->tel \t\t\t= $request->Input('tel');\r\n\t\t$user->role \t\t= $request->Input('role');\r\n\t\t$ac = $request->Input('active');\r\n\t\t$user->active \t\t= empty($ac)?'N':'Y';\r\n\r\n\t\t#เช็คว่ามีการเปลี่ยนรหัสผ่านหรือไม่\r\n\t\tif ($user->email <> $request->Input('email')) {\r\n\t\t\t$this->validate($request, [\r\n\t\t\t\t'email' => 'required|email|max:255|unique:users',\r\n\t\t\t]);\r\n\t\t\t$user->email\t= $request->Input('email');\r\n\t\t}\r\n\t\t#เช็คว่ามีการ ตั้งรหัสผ่านใหม่หรือไม่\r\n\t\tif (!empty($request->Input('password'))) {\r\n\t\t\t$this->validate($request, [\r\n\t\t\t\t'password' => 'required|confirmed|min:6'\r\n\t\t\t]);\r\n\t\t\t$user->password\t= bcrypt($request->Input('password'));\r\n\t\t}\r\n\r\n\t\t$user->save();\r\n\r\n\t\tif (empty($request->Input('_profile')))\r\n\t\t\treturn Redirect('/users');\r\n\t\telse\r\n\t\t\treturn Redirect('/home');\r\n\t}", "public function edit($id)\n\t{\n\t\tValidaAccesoController::validarAcceso('usuarios','escritura');\n\t\t$usuario = Usuarios::find($id);\n\t\tif(is_null($usuario)){\n\t\t\treturn Redirect::route('ErrorIndex','404');\n\t\t}\n\t\t$form_data = array('route' => array('usuarios.update',$id), 'method' => 'PUT');\n $action = 'Editar';\n\t\treturn View::make('admin/usuario',compact('usuario','form_data','action'));\n\t}", "public function update($id)\n {\n $user = Auth::user();\n $miembro = Auth::user()->userable;\n\n // Check if a password has been submitted\n if (!Input::has('password'))\n {\n // If so remove the validation rule\n $user::$rules['password'] = '';\n $user::$rules['password_confirmation'] = '';\n // Also set autoHash to false;\n $user->autoHashPasswordAttributes = false;\n }\n // Run the update passing a Dynamic beforeSave() closure as the fourth argument\n if ($user->updateUniques(\n array(), array(), array(), function($user) {\n // Check for the presence of a blank password field again\n if (empty($user->password))\n {\n // If present remove it from the update\n unset($user->password);\n return true;\n }\n }))\n {\n if ($miembro->update())\n {\n Session::flash('message', 'Usuario modificado con éxito');\n return Redirect::route('marketings.show',array($marketing->id));\n }\n else\n {\n Session::flash('error', \"Error al actualizar el administrador\");\n return Redirect::back()->withInput()->withErrors($cliente->errors());\n }\n }\n Session::flash('error', \"Error al actualizar el usuario\");\n return Redirect::back()->withInput()->withErrors($user->errors());\n }", "public function update(Request $request)\n {\n //\n $updateData = User::where('user_id', $request->id)->update([\n 'firstname' => $request->firstname,\n 'lastname' => $request->lastname,\n 'phone' => $request->phone,\n 'email' => $request->email,\n 'is_admin'=> $request->is_admin,\n 'active'=> $request->active,\n\n\n 'updated_at' => date('Y-m-d H:i:s')\n ]);\n\n //Kiểm tra lệnh update để trả về một thông báo\n if ($updateData) {\n Session::flash('success', 'Sửa users thành công!');\n }else {\n Session::flash('error', 'Sửa thất bại!');\n }\n\n //Thực hiện chuyển trang\n return redirect('master/data-user');\n }", "public function update(Request $request)\n\t{\n\t\t$user = User::find(Auth::guard('admin')->user()->id);\n\t\t$user->firstname = $request->input('firstname');\n\t\t$user->lastname = $request->input('lastname');\n\t\t$user->email = $request->input('email');\n\t\t$user->save();\n\n\t\treturn redirect()\n\t\t\t->back()\n\t\t\t->with('status', 'Benutzerdaten erfolgreich geändert');\n\t}", "public function update(Request $request, $id) {\n\t\t$user = User::find($id);\n\t\t$user->update($request->all());\n\n\t\t$user->roles()->sync($request->get('roles'));\n\n\t\treturn redirect()->route('admin.users.edit', $user->id)\n\t\t\t->with('info', 'Usuario guardado con éxito');\n\t}", "public function update($id)\n\t{\n\n\t\tif (Auth::user()->role == 'Admin') {\n\t\t\t$input = array_except(Input::all(), '_method');\n\t\t\t$validation = Validator::make($input, User::$rules);\n\n\t\t\tif ($validation->passes())\n\t\t\t{\n\t\t\t\t$User = $this->User->find($id);\n\t\t\t\t$User->update($input);\n\t\t\t\tFlash::success('User updated');\n\t\t\t\treturn Redirect::route('users.show', $id);\n\t\t\t}\t\n\n\t\t\treturn Redirect::route('users.edit', $id)\n\t\t\t\t->withInput()\n\t\t\t\t->withErrors($validation);\n\t\t}\n\t\tFlash::error('Your account is not authorized to view this page');\n\t\treturn Redirect::to('home');\n\t}" ]
[ "0.7221589", "0.71071494", "0.7008238", "0.69234675", "0.6844227", "0.68101716", "0.68090343", "0.68066967", "0.6793148", "0.67895466", "0.6785932", "0.67814046", "0.67535985", "0.67277175", "0.6708714", "0.67006654", "0.6676026", "0.66720575", "0.66500825", "0.6647216", "0.6642297", "0.6622716", "0.6617316", "0.6602679", "0.66001606", "0.6593581", "0.6589436", "0.6580813", "0.65659916", "0.65622497", "0.65616727", "0.65585876", "0.6548669", "0.65375286", "0.6529703", "0.652864", "0.6523181", "0.65204877", "0.65156317", "0.65123475", "0.6507648", "0.6502743", "0.6494708", "0.6490723", "0.6479516", "0.6467557", "0.6465638", "0.6463638", "0.6458682", "0.6455194", "0.6449183", "0.64480036", "0.6447511", "0.6445331", "0.6439432", "0.64346695", "0.6422293", "0.64213234", "0.6419547", "0.6419284", "0.64164937", "0.64134985", "0.6401297", "0.6398962", "0.63950264", "0.6389858", "0.6387576", "0.63864094", "0.63849753", "0.63830316", "0.63809764", "0.63807726", "0.6379854", "0.63787556", "0.63749534", "0.63716054", "0.63713634", "0.63660747", "0.63616765", "0.6358176", "0.6357141", "0.63508874", "0.6338156", "0.6328714", "0.6328164", "0.6320693", "0.63149697", "0.63127166", "0.63118374", "0.63109624", "0.6308043", "0.63023", "0.6299602", "0.6297859", "0.62938875", "0.6287086", "0.6286989", "0.628245", "0.62820256", "0.6277273", "0.6274463" ]
0.0
-1
Deletes an existing Usuario model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { $this->findModel($id)->delete(); return $this->redirect(['index']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionDelete() {\n $model = new \\UsersModel();\n $login = $this->getParam('login');\n\n if ( $model->delete($login) ) {\n $this->flashMessage('Odstraněno', self::FLASH_GREEN);\n } else {\n $this->flashMessage('Záznam nelze odstranit', self::FLASH_RED);\n }\n\n $this->redirect('default');\n }", "function delete($idUsuario){\n $this->UsuarioModel->destroy($idUsuario);\n\n redirect(\"usuario\");\n\n\n }", "public function delete($id = NULL){\n if($id != NULL){\n $this->Usuarios_model->deleteUsuario($id);\n redirect(base_url().\"administrador/usuarios\");\n }\n }", "public function actionDelete($id)\n {\n $us = Usuarios::find()->where(['id' => Yii::$app->user->id])->one();\n if ($us->rol === 'P') {\n return $this->goHome();\n }\n $this->findModel($id)->delete();\n\n if ($us->rol === 'V') {\n return $this->redirect(['index']);\n }\n return $this->redirect(['index']);\n }", "public function delete(){\n\t\t\t$id = $_GET['id'];\n\t\t\t$result = $this->userrepository->delete($id);\n\t\t\tif($result = true){\n\t\t\t\theader(\"Location: index.php/admin/index/delete\");\n\t\t\t}\n\t\t}", "public function actionMenutouserdelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['menutouserindex']);\r\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n Login::find()->where(['username'=>$id])->one()->delete();\n return $this->redirect(['index']);\n }", "public function eliminarUsuario()\r\n {\r\n if(isset($_REQUEST['id'])){\r\n\r\n $userController = new App\\Controllers\\UserController;\r\n $result = $userController->deleteUser($_REQUEST['id']);\r\n \r\n /**\r\n * Variable de sesión usada para mostrar la notificación del\r\n * resultado de la solicitud.\r\n */\r\n $_SESSION['result'] = $result;\r\n }\r\n\r\n header('Location: ?c=Registro&a=usuarios');\r\n\r\n }", "public function delete_a_user()\n {\n $is_successful = $this->user->Delete($_GET['rowID']);\n if ($is_successful) {\n header('Location: http://localhost/MVC/public');\n } else {\n // print error\n echo 'could not redirect';\n }\n }", "public function actionDelete($id)\n {\n $model = new User;\n $model = $model::find()->where(['_id' => $id])->limit(1)->one();\n\n $model->delete();\n\n return $this->redirect(['index']);\n }", "public function eliminarUsuario()\n {\n $bd = new Bd($this->tabla);\n $sql = \"DELETE FROM usuarios WHERE id=\" . $_GET['id'];\n\n $resultado = $bd->consulta($sql);\n if ($resultado == true) {\n header('location: gestionUsuarios.php');\n }\n }", "public function deleteAction()\n {\n $id = $this->params()->fromRoute('id');\n $em = $this->getEntityManager();\n\n $user = $em->getRepository('Core\\Entity\\User')->find( $id );\n $em->remove($user);\n $em->flush();\n\n $this->flashMessenger()->addSuccessMessage( 'User has been deleted.' );\n\n return $this->redirect()->toRoute(\n 'panel/:controller', array(\n 'controller' => 'user'\n )\n );\n }", "function index_delete()\n {\n $no_resi = $this->delete('no_resi');\n $this->db->where('no_resi', $no_resi);\n $delete = $this->db->delete('tabel_user');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n if ($model->delete()) {\n $this->addFlashMessage('User deleted: ' . $model->login, self::FLASH_WARNING);\n }\n return $this->redirect(['index']);\n }", "public function deleteUser()\n {\n $user = User::find(Auth::id());\n $user->delete();\n return redirect('/');\n }", "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redirect(['index']);\n }", "public function delete()\n {\n if (!$this->current_user->has_permission('USER_DELETE')) {\n return redirect('user/search');\n }\n\n if ($this->input->is_post()) {\n $this->_api('user')->delete([\n 'id' => (int) $this->input->post('user_id')\n ]);\n }\n\n $this->_flash_message('ユーザーの退会処理が完了しました');\n return redirect('/user/search');\n }", "public function deleteUsuario(Request $request){\n $crud = \\calidad\\usuario::find($request['eliminar']);\n $crud->estado = 'deshabilitado';\n $crud->save();\n\n $estudiante = \\calidad\\usuario::where('id_rol',3) -> get();\n return view('viewAdministrador/consultaUsuarios',compact('estudiante'));\n }", "public function delete(){\n\t\t$user_id = $this->input->post(\"user_id\");\n\t\t$username = $this->input->post(\"username\");\n\n\t\t$condition = array(\n\t\t\t\"user_id\" => $user_id\n\t\t);\n\n\t\t$this->load->model(\"User_model\", \"users\", true);\n\n\t\t$this->users->delete($condition);\n\n\t\t$toast = array('state' => true, 'msg' => $username.' is Deleted Successfully!');\n\t\t$this->session->set_flashdata('toast', $toast);\n\n\t\techo \"success\";\n\t}", "public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }", "public function eliminarUsuario() {\n $this->db->delete('usuarios', array('usuario' => $this->input->post(\"usuario\"))); \n return \"true\";\n }", "function eliminarPer(){\n require \"app/Views/eliminarP.php\";\n $usuario = new Usuario();\n //Mandar datps\n $usuario->id=$_POST['id'];\n $usuario->contrasenia=$_POST['password'];\n $usuario->eliminar();\n if(isset($_SESSION['Usuarios']))\n unset($_SESSION['Usuarios']);\n $_SESSION['Usuarios']=false;\n\n header(\"Location:/Proyecto/index.php?controller=Usuario&action=star\");\n }", "public function delete($id = null) {\n\t\t//Se verifica si el usuario no es un administrador\n\t\tif ( (!empty($_SESSION['role'])) && ($_SESSION['role'] != 'Administrador')) {\n\t\t\tthrow new NotFoundException(__('Sesión activa.'));\n\t\t\treturn $this->redirect(array('controller' => 'pages','action' => 'display'));\n\t\t}\n\t\t$this->User->id = $id;\n\t\tif (!$this->User->exists()) {\n\t\t\t//Si el usuario no existe se maneja la siguiente excepción\n\t\t\tthrow new NotFoundException(__('Usuario inválido.'));\n\t\t}\n\t\t$this->request->allowMethod('post', 'delete');\n\t\t//Se elimina el usuario\n\t\tif ($this->User->delete()) {\n\t\t\t//Se notifica que el usuario ha sido eliminado correctamente\n\t\t\t$this->Flash->success(__('El usuario fue eliminado.'));\n\t\t} else {\n\t\t\t//Si hubo un error, se notifica al usuario que no se pudo realizar la operación\n\t\t\t$this->Flash->error(__('El usuario no pudo ser eliminado. Inténtelo nuevamente.'));\n\t\t}\n\t\treturn $this->redirect(array('action' => 'index'));\n\t}", "public function delete( $id )\n\t{\n\n\t\t$userModer = new User();\n\n\t\t$userModer->delete($id);\n\t\tsession()->setFlashData(\"user_deleted_success\",\"Usuáro fo deletado com sucesso!\");\n\n\t\treturn redirect()->to( site_url(\"list\") );\n\t}", "public function actionDelete($id)\n {\n /*Yii::$app->authManager->revokeAll($id);\n $this->findModel($id)->delete();*/\n $model = $this->findModel($id);\n $model->status = User::STATUS_DELETED;\n $model->save(false);\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n\n $m = $this->findModel($id);\n //echo $m->user_id;\n $this->findModel($id)->delete();\n $user = new User;\n $userModel = $user::findOne($m->user_id);\n if ($userModel)\n $userModel->delete();\n // echo \"<br>\".$user->findAll(['id'=>$m->user_id]);\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['site/knpr-manajemen-user']);\n }", "public function destroy ($id)\n { \n $user = Usuario::find($id);\n $user -> delete();\n return redirect('Usuario')->with('message','deleted');\n }", "public function destroy($id)\n {\n $usuario = User::find($id);\n $usuario->delete();\n return redirect()->route('usuarios.index')->with('success','Usuário Deletado com Sucesso!');\n }", "public function destroy()\n {\n $funcionario= User::find(auth()->user()->id);\n $funcionario->delete();\n return redirect('/');\n }", "public function actionDelete($id)\n {\n if(!PermissionUtils::checkModuleActionPermission(\"Users\",PermissionUtils::DELETE)){\n\t\t\t\tthrow new ForbiddenHttpException('You are not allowed to perform this action.');\n }\t\n $model = $this->findModel($id);\n $model->updatedBy= yii::$app->user->identity->userID;\n\t $model->active = StatusCodes::INACTIVE;\n\t $model->passwordStatusID = 6;\n\n\t if($model->save())\n\t \tYii::$app->session->addFlash( 'success',\"Users has been deleted \" );\n\t\telse\n\t\tYii::$app->session->addFlash( 'error',\"Error on deleting Users \" );\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n $this->findUser($id)->delete();\n return $this->redirect(['index']);\n }", "public function actionDeleteUser($id) {\n $model = new Configuration();\n $model->deleteUser($id);\n return $this->redirect(['index', 'fromUsers' => 1]);\n }", "public function delete(Request $request)\n {\n $id = $request->id;\n\n $user = $this->user->find($id);\n\n if ($user->delete() == TRUE) {\n\n flash('Usuário removido com sucesso!')->success();\n return redirect()->route('admin.users.index');\n\n }\n \n }", "public function destroy($id)\n\t{\n\t\t User::find($id)->delete();\n \t\t return redirect('admin/users');\n\t }", "public function deleteUser($id)\n {\n $user =User::find($id);\n $user->delete();\n return redirect('Admins/AllUsers');\n \n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n Yii::$app->session->setFlash('success','Pekerjaan Berhasil Dihapus');\n return $this->redirect(['/admin/user/index']);\n }", "public function destroy($id)\n {\n $usuario = User::find($id);\n $usuario->delete();\n\n return redirect()->action('UsuarioController@index');\n\n }", "public function actionUserDelete()\n {\n $id = (int) Yii::app()->request->getParam(\"id\", 0 );\n if( !empty($id) )\n {\n $model = SubscribeUsers::fetch( $id );\n if( $model->id > 0 )$model->delete();\n }\n\n $this->redirect( SiteHelper::createUrl(\"/console/subscribe/users\" ) );\n }", "public function destroy($id)\n {\n User::findOrFail($id)->delete();\n return redirect()->route('usuarios.index');\n }", "public function delete_user()\n {\n \n $user_id = $this->uri->segment(4);\n\t //dump($user_id);\n\t \n\t $query = $this->Product_model->delete_user($user_id);\n\t if($query){\n\t\t \n\t\t redirect('admin/Dashboard/users'); \n\t\t \n\t\t}else{\n\t\t\t\n\t\t\t echo 'error'; \n\t\t\t}\n\t\n }", "public function delete($id = null) {\n // $this->request->onlyAllow('post');\n\n $this->request->allowMethod('post');\n\n $this->User->id = $id;\n if (!$this->User->exists()) {\n throw new NotFoundException(__('Usuario invalido'));\n }\n if ($this->User->delete()) {\n $this->Session->setFlash(__('Usuario eliminado'));\n return $this->redirect(array('action' => 'index'));\n }\n $this->Session->setFlash(__('Error al eliminar el usuario'));\n return $this->redirect(array('action' => 'index'));\n }", "function delete($id) {\n User::find($id)->delete();\n\n //Chuyển về trang danh sách\n return redirect()->route('admin.user');\n }", "public function destroy(Request $request,$id) //excluir usuário\n {\n //deleta o usuário e redireciona para a tela de usuários\n $this->repository->delete($id);\n //flash message criada\n $request->session()->flash('message','Usuário excluído com sucesso!');\n return redirect()->route('admin.users.index');\n }", "public function actionDelete()\n {\n $id= @$_POST['id'];\n if($this->findModel($id)->delete()){\n echo 1;\n }\n else{\n echo 0;\n }\n\n return $this->redirect(['index']);\n }", "public function delete()\n {\n\n $update['id'] = $this->session->userdata('user_id');\n $update['data']['enabled'] = 0;\n $update['data']['active'] = 0;\n $update['table'] = 'users';\n $this->Application_model->update($update);\n\n redirect('/logout','refresh');\n\n }", "public function userDelete()\n {\n return view('userViews.user_delete');\n }", "public function actionDelete()\n {\n\n $id_usuario_actual=\\Yii::$app->user->id;\n $buscaConcursante = Concursante::find()->where(['id' => $id_usuario_actual])->one();\n\n $request = Yii::$app->request;\n $id_tabla_presupuesto=$request->get('id_tabla_presupuesto');\n $id_postulacion = $request->get('id_postulacion');\n\n $buscaPostulacion = Postulacion::find()->where(['and',['id_postulacion' => $id_postulacion],['id_concursante' => $buscaConcursante->id_concursante]])->one();\n $buscaTablaPresupuesto = Tablapresupuesto::find()->where(['id_tabla_presupuesto' => $id_tabla_presupuesto])->one();\n if($buscaPostulacion != null && $buscaTablaPresupuesto != null){ \n\n $this->findModel($id_tabla_presupuesto)->delete();\n\n return $this->redirect(['/site/section4', 'id_postulacion' => $id_postulacion]);\n\n }else{\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n\n }", "public function eliminarUsuario($id){\n DB::table('usuarios')->where('id', '=', $id)->delete();\n return redirect('/Session/PanelControl')->with('status_exito', \"Éxito, elimino el usuario.\");\n }", "public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n if (Yii::$app->user->can('admin')){\n\n return $this->redirect(['index']);\n\n }\n return $this->redirect(['userindex']);\n }", "public function admin_delete($Users_ID){\n if(!empty($Users_ID)){\n $this->db->where(\"Users_ID\", $Users_ID)->delete(\"users\");\n }\n redirect(\"admincm/modules/users/view\");\n }", "public function delete($id)\n {\n\n\n $user = new AppUser();\n $user->setId($id);\n\n\n if ($user->delete($id)) {\n //ajoute un message qui s'affichera sur la prochaine page ! \n //pour l'affichage, voir dans header.tpl.php\n $_SESSION['alert'] = \"el usuario ha sido eliminado\";\n //on redirige vers la liste des categories\n $this->redirectToRoute(\"admin-user-list\");\n }\n }", "public function destroy($id) {\n $this->usuarios->delete($id);\n return redirect()->route('usuarios.index');\n }", "public function actionDelete($id)\n {\n \t\n \ttry{\n \t\t//$model = $this->findModel($id)->delete();\n \t\t$UserInfo = User::find()->where(['id' => $id])->one();\n \t\t$UserInfo->status = 0;\n \t\t$UserInfo->update();\n \t\tYii::$app->getSession()->setFlash('success', 'You are successfully deleted Nursing Home.');\n \t\n \t}\n \t \n \tcatch(\\yii\\db\\Exception $e){\n \t\tYii::$app->getSession()->setFlash('error', 'This Nursing Home is not deleted.');\n \t\n \t}\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function destroy($username)\n {//chưa làm\n if (Session::has('admin')) {\n $model = Users::where('username',$username)->first();\n $model->delete();\n\n return redirect('/danh_muc/tai_khoan/list_user?&madv='.$model->madv);\n\n } else\n return view('errors.notlogin');\n }", "public function destroy($id)\n {\n $this->checkPermission('remover_usuario'); \n\n $user = $this->user->find($id);\n $user->delete();\n \n return redirect('/users/');\n }", "public function actionDeleteUser($id)\n {\n $this->findModelUser($id)->delete();\n\n return $this->redirect(['user']);\n }", "public function actionDelete($id)\n {\n if(Permiso::requerirRol('administrador')){\n $this->layout='/main2';\n }\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index_delete()\n {\n $id = (int) $this->delete('id');\n\n //Obtenemos el registro\n $row = $this->Rest_model->get(array('id' => $id));\n \n //Validamos que exista\n if(!empty($this->delete('id')) && empty($row))\n {\n //Devolvemos un error en caso de que no exista\n $this->response([\n 'status' => FALSE,\n 'message' => 'El registro no existe'\n ], REST_Controller::HTTP_BAD_REQUEST);\n }\n \n //Borramos el registro\n $result = $this->Rest_model->delete($id);\n\n if($result >= 1)\n {\n $this->response([\n 'status' => TRUE,\n 'message' => 'Registro eliminado con éxito'\n ], REST_Controller::HTTP_OK);\n }\n\n $this->response([\n 'status' => FALSE,\n 'message' => 'Ocurrió un error'\n ], REST_Controller::HTTP_BAD_REQUEST);\n }", "public function eliminarAction()\n {\n $this->disableAutoRender();\n\n /* Recibo la lista de Ids separado por comas */\n $idList = $this->_getParam('id');\n\n if ($idList) {\n /* Convierto la lista a un Array */\n $idArray = explode (\",\", $idList);\n\n /* Recorro el array eliminando cada Id */\n foreach ($idArray as $id) {\n try {\n $resultado = $this->_modeloMovimiento->eliminar($id, $this->_usuario);\n \n if($resultado == 0) { /* Si no se eliminó */\n echo 'error|No está autorizado a eliminar este registro'; \n exit;\n }\n \n \n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n }\n }\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new UsuarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function destroy($id)\n {\n $usuario = User::find($id);\n $usuario->delete();\n\n return redirect()->route('usuarios.index');\n }", "public function destroy($id)\n {\n User::destroy($id);\n return redirect('usuarios');\n \n }", "public function actionDelete($id)\n {\n $user = Yii::$app->user->identity; \n if($user->view_cuahang == 1 ){\n throw new NotFoundHttpException('Bạn chi có quyền xem không có quyền xóa');\n }\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function destroy($id)\n\t{\n\t\t$user = User::find($id);\n\t\t$user->delete();\n\t\t/**\n\t\t * HardDeletes\n\t\t *\n\t\t * User::find($id)->delete();\n\t\t */\n\t\treturn Redirect::route('usuarios.index')->with('delete', true);\n\t}", "public function actionDelete($id)\n {\n //tambien falta de coleccion_persona\n $cont = Investigador::find()->where(['usu_id'=>$id])->count();\n if($cont != 0){\n Yii::$app->session->setFlash('msg', '\n <div class=\"alert alert-danger alert-dismissable\">\n <button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">X</button>\n <h4><i class=\"bx bx-error\"></i>No se pudo eliminar!</h4>\n No se puede eliminar el registro porque está siendo ocupado.\n </div>\n ');\n }else{\n $modelFoto = $this->findModel($id);\n if($modelFoto->use_foto != 'usuario_anonimo.jpg'){\n unlink('img/user/'.$modelFoto->use_foto);\n }\n\n $this->findModel($id)->delete();\n Yii::$app->session->setFlash('msg', '\n <div class=\"alert alert-success alert-dismissable\">\n <button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">X</button>\n <h4><i class=\"bx bx-check\"></i>Registro eliminado!</h4>\n El registro se eliminó correctamente.\n </div>\n ');\n }\n\n return $this->redirect(['index']);\n }", "static public function delete(){\n\n\t\tinclude ($GLOBALS['PATH'] . '/classes/requests/users/DeleteRequest.php');\n\n\t\t$requests = new DeleteRequest;\n\t\t$errors = $requests->validate();\n\t\t\n\t\tif(count($errors) > 0){\n\n\t\t\t//Verifica se id não existe no banco ou deixar enviar, força o redirecionamento para pagina /users\n\t\t\tif( isset($errors['id']) ){\n\n\t\t\t\t$back = '/users?errors=' . json_encode(['id' => $errors['id']]);\n\n\t\t\t}else{\n\n\t\t\t\t$back = explode('?', $_SERVER['HTTP_REFERER'])[0] ?? '/users';\n\t\t\t\t$back .= '?id='.$_POST['id'].'&errors=' . json_encode($errors);\n\n\t\t\t}\n\n\t\t\theader('Location: ' . $back);\n\n\t\t}else{\n\n\t\t\t//Caso não houver nenhum impedimento, faz o delete do usuario\n\t\t\t$conn = Container::getDB();\n\t\t\t$user = new User;\n\t\t\t$crud = new CrudUser($conn, $user);\n\n\t\t\t$crud->delete($_POST['id']);\n\n\t\t\t//Redireciona para pagina de /users\n\t\t\theader('Location: /users?success=Usuário deletado com sucesso');\n\t\t\t\n\t\t}\n\n\t}", "public function delete($id)\n {\n $user = User::findOrFail($id);\n $user->delete();\n flash()->success('El usuario se elimin&oacute; correctamente', '');\n return redirect('usuarios');\n }", "public function destroy(int $id)\n {\n $action = redirect(route('users.index'));\n\n try {\n if (Auth::user()->id != $id) {\n /** @var User $user */\n $user = User::findOrFail($id);\n $user->delete();\n $action->with('success', \"Usuario eliminado\");\n\n } else {\n $action->withErrors('No puedes borrarte a ti mismo como usuario');\n }\n } catch (ModelNotFoundException $exception) {\n $action->withErrors(\"Usuario inexistente\");\n }\n\n return $action;\n }", "public function actionDelete($id)\n {\n if ($id == Yii::$app->user->getId()) {\n Yii::$app->getSession()->setFlash('danger', Yii::t('user', 'You can not remove your own account'));\n } else {\n $this->findModel($id)->delete();\n Yii::$app->getSession()->setFlash('success', Yii::t('user', 'User has been deleted'));\n }\n\n return $this->redirect(['index']);\n }", "public function deleteAction() {\r\n if (isset($_SESSION['Connected']))\r\n if (($_SESSION['Connected'] == 1) and ($_SESSION['admin'] == 1))//secure\r\n Users::deleteMember($_GET['id']);\r\n\r\n $this->redirect(\"/Members/index\");\r\n }", "public function actionDelete($id)\n {\n if (!One::app()->user->can('Delete User')) {\n throw new ForbiddenHttpException('You are not authorized to access this page.');\n }\n\n $this->findModel($id)->delete();\n One::app()->session->setFlash('success', 'User deleted successfully.');\n return $this->redirect(['index']);\n }", "public function delUsuarioAction($id) {\n $em = $this->getDoctrine()->getEntityManager();\n $usuario_repo = $em->getRepository(\"BcBundle:Usuario\");\n $usuario = $usuario_repo->find($id);\n\n $em->remove($usuario);\n $em->flush();\n\n return $this->redirectToRoute(\"bc_index_usuario\");\n }", "public function delete(Request $request)\n {\n // Check the access\n has_access(__METHOD__, Auth::user()->role_id);\n \n // Get the user\n $user = User::find($request->id);\n\n // Check user ID\n if($user->id == 1) {\n // Redirect\n return redirect()->route('admin.user.index')->with(['message' => 'Tidak bisa menghapus akun default ini.']);\n }\n\n // Delete the user\n $user->delete();\n\n // Delete the user attribute\n if($user->attribute) {\n $user->attribute->delete();\n }\n\n // Delete the user avatars\n if(count($user->avatars) > 0) {\n $user_avatars = UserAvatar::where('user_id','=',$user->id)->delete();\n }\n\n // Delete the user account\n if($user->account) {\n $user->account->delete();\n }\n\n // Delete the user roles\n if(count($user->roles) > 0) {\n $user->roles()->detach();\n }\n\n // Redirect\n return redirect()->route('admin.user.index')->with(['message' => 'Berhasil menghapus data.']);\n }", "public function deletar($id)\n {\n User::find($id)->delete();\n return redirect()->route('usuario.index');\n }", "public function delete($id){\n $this->m_sekolah->delete($id); \n redirect('Welcome/index');\n\n }", "public function deslogarAction()\n\t{\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t$this->_helper->layout()->disableLayout();\n\t\t\n\t\tif(Zend_Auth::getInstance()->hasIdentity()){\n\t\t\tZend_Auth::getInstance()->clearIdentity();\n\t\t}\n\t\t\n\t\t$this->redirect('login/logar');\n\t}", "public function actionIndex()\n {\n $searchModel = new UsuarioQuery();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function logoutAction()\n {\n \t$_utente=new Application_Model_User();\n \t$un = $this->_authService->getIdentity()->username;\n\t\t$_utente->setIdPosByUName(null, $un);\n\t\t\n $this->_authService->clear();\n return $this->_helper->redirector('index','public'); \n }", "public function destroy($id)\n {\n Usuario::destroy($id);\n return redirect('/admin/usuario/lista')->with('delete', 'O usuário');\n }", "public function actionDelete($id) {\n $model=$this->findModel($id);\n\t\t$id_operacion=$model->id_operacion;\n\t\t$model->delete();\n\t\t\n\t\treturn $this->redirect(['index', 'id_operacion' => $id_operacion]);\n //return $this->redirect(['index']);\n }", "public function deleteUser()\n {\n \n $headers = getallheaders();\n $token = $headers['Authorization'];\n $key = $this->key;\n $userData = JWT::decode($token, $key, array('HS256'));\n $id_user = Users::where('email', $userData->email)->first()->id;\n $id_users = $_POST['idUser'];\n $id = $id_users;\n\n $user = Users::find($id);\n\n $rolUser = Users::where('email', $userData->email)->first();\n \n\n if ($rolUser->rol_id == 1){\n\n $user_name = Users::where('id', $id_users)->first()->name;\n Users::destroy($id);\n\n return $this->success('Acabas de borrar a', $user_name);\n\n }else{\n return $this->error(403, 'No tienes permisos');\n }\n \n\n if (is_null($user)) \n {\n return $this->error(400, 'El lugar no existe');\n }\n // }else{\n\n // $user_name = Users::where('id', $id_users)->first()->name;\n // Users::destroy($id);\n\n // return $this->success('Carlos he borrado el usuario', $user_name);\n // }\n }", "public function actionDelete($id)\r\n {\r\n # Obtenemos el modelo.\r\n $model = $this->findModel($id); \r\n $municipios = $model->tblMunicipios;\r\n if(count($municipios) > 0){\r\n # alerta\r\n } else {\r\n $model->delete();\r\n }\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\n {\n //BefugnisTeil\n if(!Yii::$app->user->can('deleteBenutzer')){\n throw new ForbiddenHttpException('Sie haben kein Befugniss');\n }\n \n // Löschen alle Item in der Tabelle, welche mit dem Tabelle Benutzer eine Realtion hat\n Benutzer::DeleteBenutzersDaten($id);\n \n //Benutzer Tabelle\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "public function userDeleteAction(Request $request)\n {\n $id = $request->get('id');\n\n $userRepo = $this->get('doctrine')->getManager()->getRepository('AppBundle:User');\n $user = $userRepo->find($id);\n\n // delete user\n $userManager = $this->getDoctrine()->getManager();\n $userManager->remove($user);\n $userManager->flush();\n \n return $this->redirectToRoute('app_users');\n }", "public function destroy(Usuario $usuario)\n {\n $usuario->delete();\n //muestro mensaje de confirmación\n Session::flash('message', 'Usuario borrado correctamente');\n //redirigimos al listado\n return redirect()->route('usuarios.index');\n }", "public function borrarUsuarioController(){\n //Se obtiene el id que se quiere eliminar y se verifica\n if(isset($_GET[\"idBorrar\"])){\n //Al tenerlo este se pasa a una variable\n $datosController = $_GET[\"idBorrar\"];\n //Es enviado hacia el modelo para realizar la conexion y este lo elimine\n $respuesta = Datos::borrarUsuarioModel($datosController, \"clientes\");\n \n if($respuesta == \"correcto\"){\n //Al ser correcto se recarga la pagina anterior para verificar el cambio.\n echo '<script>\t\t\n\t\t\t location.href= \"index.php?action=administrar_clientes\";\n\t\t </script>';\n \n }\n \n }\n }", "function delete(){\n $user_id = $this->uri->rsegment('3');\n $this->_del($user_id);\n redirect(admin_url('user'));\n\n }", "public function destroy($id)\n {\n $user = User::find($id);\n if($user != null)\n {\n $user->delete();\n Session::flash('alert-success', 'Usuário excluído com sucesso!!');\n }else{\n Session::flash('alert-danger', 'Usuário não encontrado');\n }\n return redirect()->route('admin.users.index');\n }", "public function actionDelete()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t$this->checkActivation();\n\t//\t$model = new Estate;\n\t\t\n\t\tif($model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$model=Estate::model()->findbyPk($_GET['id']);\n\t\t\tif($model===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n\t\t}\n\t\t\n\t\tEstateImage::deleteAllImages($model->id);\t\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->tour);\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->image);\n\t\t\n\t\t$model->delete();\n\t\t\n\t\t\n\t\tModeratorLogHelper::AddToLog('deleted-estate-'.$model->id,'Удален объект #'.$model->id.' '.$model->title,null,$model->user_id);\n\t\t$this->redirect('/cabinet/index');\n\t\t\n\t}", "public function destroy($id)\n {\n $user = new persona();\n $user =$user::find($id);\n $user->delete(); \n return redirect('mostrar_usuarios');\n }", "public function deleteAction(){\n \n $req=$this->getRequest();\n $user=Doctrine::getTable('Users')->find($req->getParam('id')); \n\n // Gli utenti developer non possono essere eliminati \n if ($user->Role->developer){\n $this->errors->addError(\"L'utente Developer non pu&ograve; essere cancellato.\");\n $this->emitSaveData();\n return;\n }\n \n $q=Doctrine_Query::create()\n ->delete()\n ->from('Users')\n ->addWhere('ID = ?',$this->getRequest()->getParam('id'))\n ->execute();\n \n $this->emitJson(array(\"success\"=>true));\n }", "function deleteuser(){\n\n\t\t$id = $this->input->post('id');\n\n\t\t$this->setting_model->delete('londontec_users','user_id',$id);\n\t\n\t}", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n if (Yii::$app->user->can('deleteFavorito')){\n $model->delete();\n }\n\n //Yii::$app->request->referrer => retorna a ultima página em que o utilizador esteve\n //se esta for != null então o redirect é feito para a página anteriror\n return $this->redirect(Yii::$app->request->referrer ?: Yii::$app->homeUrl);\n }", "public function destroy($id)\n {\n $usuario = DB::table('users') -> where('id', '=', $id) -> delete();\n Session::flash('borrar','Se ha elimanado al usuario');\n return Redirect::to('seguridad/usuario');\n }", "public function destroy(User $usuario)\n {\n $usuario->delete();\n\n return redirect()->route('admin.usuarios.index')->with('info','El usuario se elimino correctamente');\n }", "public function destroy($id)\n {\n $usuario=usuario::findOrfail($id);\n $usuario->delete();\n return redirect()->route(\"usuario.index\");\n }", "public function destroy($id)\n {\n $usuario = find($id);\n $usuario->delete();\n return redirect()->route('usuario.listar');\n }" ]
[ "0.7883321", "0.7682309", "0.71821237", "0.69818664", "0.6918767", "0.6871515", "0.6868601", "0.6841783", "0.68101734", "0.6791641", "0.6779311", "0.6770615", "0.67352986", "0.67352915", "0.6711495", "0.6655473", "0.66497463", "0.6640478", "0.6639956", "0.6638694", "0.6632971", "0.6592639", "0.65612644", "0.65288305", "0.6524359", "0.6521042", "0.65156263", "0.65147024", "0.6513169", "0.65067106", "0.65038306", "0.65029967", "0.647953", "0.64716846", "0.64639497", "0.6441473", "0.6440711", "0.6432576", "0.64138895", "0.6410964", "0.640398", "0.6387445", "0.63839316", "0.6383416", "0.6380584", "0.63794184", "0.6379154", "0.637768", "0.6372807", "0.6361984", "0.63619566", "0.63618994", "0.6358395", "0.635384", "0.635023", "0.63488966", "0.63439596", "0.6337641", "0.63356674", "0.6331625", "0.63247514", "0.6322848", "0.63224214", "0.63224214", "0.632212", "0.63192403", "0.63184947", "0.63031715", "0.6302705", "0.6301154", "0.6297451", "0.6290908", "0.62832814", "0.6280156", "0.62752855", "0.6271131", "0.6267747", "0.6266805", "0.6262167", "0.625971", "0.6257918", "0.62549525", "0.6247397", "0.6238837", "0.6236839", "0.6235734", "0.6234789", "0.62309813", "0.6220589", "0.6218338", "0.62155986", "0.6215375", "0.62152946", "0.62109756", "0.6207464", "0.61960155", "0.6194583", "0.61945593", "0.6194312", "0.6190733", "0.6187048" ]
0.0
-1
Finds the Usuario model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Usuario::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findModel($id)\n {\n if (($model = Usuario::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=Usuario::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = Usuario::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = Usuario::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function find($key)\n\t{\n\t\t$user = model('user')->find_user($key);\n\n\t\treturn $user ? UserModel::newWithAttributes(Arr::toArray($user)) : null;\n\t}", "public function findById($id) {\n $sql = \"select * from user where user_id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new UsernameNotFoundException(sprintf('User \"%s\" not found.', \"log error\"));\n }", "protected function findModel($id)\n {\n // $user = $this->finder->findUserById($id);\n $user= User::find()->where(['id'=>$id])->one();\n if ($user === null) {\n throw new NotFoundHttpException('The requested page does not exist');\n }\n\n return $user;\n }", "public function findUserById($id)\n {\n $sql = \"SELECT rowid, * FROM USER WHERE rowid=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n if ($row){\n return $this->buildDomainObject($row);\n }else{\n throw new UsernameNotFoundException('User not found.');\n }\n }", "protected function findModel($id)\n {\n \tif (($model = User::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }", "protected function findModel($id) {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('yii','The requested page does not exist.'));\n }\n }", "protected function findModel($id)\n {\n if (($model = PerfilUsuario::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public static function findUser($id)\r\n {\r\n $app = \\Slim\\Slim::getInstance();\r\n $user = User::find($id);\r\n if(!$user){\r\n $app->halt('404',json_encode(\"Use not found.\"));\r\n }\r\n return $user;\r\n }", "protected function findModel($id){\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id){\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n$model = Users::findOne($id);\n\tif($model == null)\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\tif ((isset(Yii::$app->params['ADMIN_CLIENT_ID']) and Yii::$app->user->identity->clientID == Yii::$app->params['ADMIN_CLIENT_ID']) or ($model->clientID == Yii::$app->user->identity->clientID)) {\n return $model;\n }\n\t\telse\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t\n }", "public function findByIdentification($param)\n {\n return User::where($param)->first();\n }", "public function loadModel()\n\t{\n\t\tif( $this->_model === null ) {\n\t\t\tif( Yii::app()->user->isAuthenticated() ) { // если пользователь авторизирован\n\t\t\t\t$this->_model = User::model()->findbyPk(Yii::app()->user->id);\n\t\t\t}\n\t\t\tif( $this->_model === null ) {\n\t\t\t\tthrow new CHttpException(404, 'The requested page does not exist.');\n\t\t\t}\n }\n return $this->_model;\n }", "public static function findById($id) {\n try {\n $db = Database::getInstance();\n $sql = \"SELECT * FROM `User` WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\"username\" => $id]);\n \n if ($stmt->rowCount() === 0)\n return null;\n \n return new User($stmt->fetch(PDO::FETCH_ASSOC));\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }", "protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null)\n {\n return $model;\n }\n else\n {\n throw new NotFoundHttpException('The requested page does not exist.');\n } \n }", "protected function findModel($id)\r\n {\r\n if (($model = User::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "public abstract function find($primary_key, $model);", "public function find($id) {\n\t\t$sql = \"select * from t_user where idUser=?\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($id));\n\n\t\tif ($row){\n\t\t\treturn $this->buildDomainObject($row);\n\t\t} else {\n\t\t\tthrow new \\Exception(\"Pas d'utilisateur correspondant à l'id \" . $id . \"'\");\n\t\t}\n\t}", "public function loadModel($id)\n {\n $model = SystemUser::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = BackendUser::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModelUser($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app','SYSTEM_TEXT_PAGE_NOT_FOUND'));\n }\n }", "protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function findOneOrFail(int $id): User\n {\n $model = $this->model->find($id);\n if (\\is_null($model)) {\n throw new \\Exception('API.user_not_found', 404);\n }\n\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = TollUsers::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id) {\n $model = Users::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }\n }", "protected function findModel($id)\n {\n if (($model = DataUser::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id) {\n\n $model = Users::model()->findByPk($id);\n if ($model === null) {\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = Adminuser::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = AppUser::findOne($id)) !== null) {\n if ($model->status !== 0) {\n return $model;\n }\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function loadModel($id) {\n $model = User::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "public function loadModel($id) {\n $model = User::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "public function findByID($id)\n {\n $i = $this->getInstance(); \n\n $result = $i->getSoapClient()\n ->setWsdl($i->getConfig('webservice.user.wsdl'))\n ->setLocation($i->getConfig('webservice.user.endpoint'))\n ->GetUser(array(\n 'UserId'=>array(\n 'Id'=>intval($id),\n 'Source'=>'Desire2Learn'\n )\n ));\n \n if ( $result instanceof stdClass && isset($result->User) && $result->User instanceof stdClass )\n {\n $User = new D2LWS_User_Model($result->User);\n return $User;\n }\n else\n {\n throw new D2LWS_User_Exception_NotFound('OrgDefinedId=' . $id);\n }\n }", "protected function findModel($id)\n {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id) {\n if (($model = Companyusers::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id) {\n $model = USUARIO::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "public static function loadByPK($id)\n {\n $model = new User_Model();\n return $model->getGrid()->getByPk($id);\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "private function findUserById($id)\n {\n $user = $this->users->userById(UserId::fromString($id));\n\n if ($user) return $user;\n\n throw new ValueNotFoundException(\"$id is not a valid user id\");\n }", "protected function findModel($id)\n {\n $class = $this->userClassName;\n if (($model = $class::findIdentity($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Benutzer::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function getOr404($id)\n {\n if (!($usuario = $this->container->get('richpolis_backend.usuario.handler')->get($id))) {\n throw new NotFoundHttpException(sprintf('The resource \\'%s\\' was not found.',$id));\n }\n\n return $usuario;\n }", "public static function find( $primaryKey )\n\t{\n\t\tself::init();\n\t\t\n\t\t// Select one item by primary key in Database\n\t\t$result = Database::selectOne(\"SELECT * FROM `\" . static::$table . \"` WHERE `\" . static::$primaryKey . \"` = ?\", $primaryKey);\t\t\n\t\tif( $result == null )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Create & return new object of Model\n\t\treturn self::newItem($result);\n\t}", "function getUsuarioById($id = null)\r\n\t{ \r\n\t\treturn $this->Usuario->find('all',array('conditions' => array('Usuario.id' => $id)));\r\n\t}", "function findUser($id) {\n\n $conn = \\Database\\Connection::connect();\n\n try {\n $sql = \"SELECT * FROM user WHERE _user_Id = ?;\";\n $q = $conn->prepare($sql);\n $q->execute(array($id));\n $user = $q->fetchObject('\\App\\User');\n }\n catch(\\PDOException $e)\n {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n\n \\Database\\Connection::disconnect();\n\n return $user;\n }", "public function loadModel($id)\n\t{\n\t\t$model=Users::model()->with('userLogins')->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function findUser($id)\n {\n /** @var Model $class */\n $class = $this->class;\n\n return $class::get($id);\n }", "public function loadModel($id)\r\n {\r\n $model = User::model()->findByPk($id);\r\n if ($model === null)\r\n throw new CHttpException(404, 'The requested page does not exist.');\r\n return $model;\r\n }", "public function find($id)\n\t{\n // return $this->user->where('id', $id)->first();\n\t}", "protected function findModel($id)\n {\n if (($model = SecurityEntities::findOne($id)) !== null) \n {\n return $model;\n } else \n {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function loadModel($id) {\n\t\t$model=Adminuser::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = Empleado::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function loadModel($id)\n\t{\n\t\t$model=User::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=User::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=User::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=User::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=User::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "public function loadModel($id)\n\t{\n\t\t$model=User::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "protected function findModel($id)\n {\n if (($model = AdminUsers::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function loadModel($id)\n {\n $model = Users::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "public function find($id): ?User\n {\n return $this->model->find($id);\n }", "protected function findPkSimple($key, $con)\n\t{\n\t\t$sql = 'SELECT `ID`, `USERNAME`, `ALGORITHM`, `SALT`, `PASSWORD`, `CREATED_AT`, `LAST_LOGIN`, `IS_ACTIVE`, `IS_SUPER_ADMIN` FROM `af_guard_user` WHERE `ID` = :p0';\n\t\ttry {\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindValue(':p0', $key, PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t} catch (Exception $e) {\n\t\t\tPropel::log($e->getMessage(), Propel::LOG_ERR);\n\t\t\tthrow new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);\n\t\t}\n\t\t$obj = null;\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\t$obj = new afGuardUser();\n\t\t\t$obj->hydrate($row);\n\t\t\tafGuardUserPeer::addInstanceToPool($obj, (string) $row[0]);\n\t\t}\n\t\t$stmt->closeCursor();\n\n\t\treturn $obj;\n\t}", "protected function findModel($id) {\n\t\tif (($model = EntEmpleados::findOne ( $id )) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\n\t\t}\n\t}", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }" ]
[ "0.6874317", "0.67826295", "0.6736697", "0.6736697", "0.6732279", "0.6666562", "0.65707326", "0.65550834", "0.6554187", "0.6501946", "0.64253366", "0.64116424", "0.63947654", "0.63947654", "0.63369626", "0.6332519", "0.6292744", "0.62902343", "0.6283351", "0.62700623", "0.6269955", "0.6267931", "0.6267623", "0.6254688", "0.62514096", "0.62498766", "0.62399083", "0.623448", "0.623448", "0.623448", "0.623448", "0.623448", "0.6226499", "0.6223658", "0.62195784", "0.62195784", "0.62178147", "0.6212761", "0.6192187", "0.61895514", "0.61841464", "0.6176276", "0.6175728", "0.6175728", "0.6168201", "0.6168201", "0.6168201", "0.6167315", "0.616425", "0.6159869", "0.6148312", "0.61471266", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61296874", "0.61280876", "0.61272967", "0.6123402", "0.61148363", "0.6114619", "0.6114405", "0.6112548", "0.6106365", "0.6101933", "0.61016285", "0.6100991", "0.6094307", "0.6092859", "0.6088884", "0.60870594", "0.6086384", "0.60746074", "0.60746074", "0.60746074", "0.60746074", "0.60746074", "0.60746074", "0.60740715", "0.6072923", "0.6068463", "0.60631865", "0.6063017", "0.6056429", "0.6056429", "0.6056429" ]
0.6830743
1
Editar sua propria senha.
public function actionEditarSenha() { //$model = new UserMudarSenha; $old_model = Usuario::findOne(Yii::$app->user->identity->id); $model = UserMudarSenha::findOne(Yii::$app->user->identity->id); if (!$model) throw new NotFoundHttpException('Ocorre algum erro, Favor entrar em contato com o administrador'); if ($model->load(Yii::$app->request->post())) { //enviar por email if(md5($model->password_hash) === $old_model->password_hash){ if($model->new_password_hash === $model->confirm_password){ $model->password_hash = md5($model->new_password_hash); //$model->password_reset_token = "CONFIRMADO"; $model->status = $model::STATUS_ACTIVE; $model->save(); //enviar email; Yii::$app->user->logout(); return $this->redirect([Url::to("/login")]); }else{ $model->addError('confirm_password', 'Esse campo tem que ser igual ao de Nova Senha.'); } }else{ $model->addError('password_hash', 'Senha Inválida.'); } } $model->password_hash = ""; return $this->render('_form_mudar_senha', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function alterarSenhaAction() {\n \n $formSenha = new Form_Salao_Senha();\n $formSenha->submit->setLabel(\"Alterar Senha\");\n $this->view->form = $formSenha;\n \n if ($this->getRequest()->isPost() && $formSenha->isValid($this->getRequest()->getPost())) {\n \n $autenticacao_senha_atual = $formSenha->getValue(\"autenticacao_senha_atual\");\n $autenticacao_senha = $formSenha->getValue(\"autenticacao_senha\");\n $autenticacao_senha_repetir = $formSenha->getValue(\"autenticacao_senha_repetir\");\n \n if ($autenticacao_senha === $autenticacao_senha_repetir) {\n \n try {\n $modelAutenticacao = new Model_DbTable_Autenticacao();\n $adpter = $modelAutenticacao->getDefaultAdapter();\n $where = $adpter->quoteInto(\"autenticacao_email = ?\", Zend_Auth::getInstance()->getIdentity()->autenticacao_email);\n $update = array(\n 'autenticacao_senha' => md5($autenticacao_senha)\n );\n $modelAutenticacao->update($update, $where);\n \n $this->_helper->flashMessenger->addMessage(array(\n 'success' => 'Senha alterada com sucesso!'\n ));\n \n $this->_redirect('salao/');\n \n } catch (Exception $ex) {\n\n }\n \n } else {\n $this->_helper->flashMessenger->addMessage(array(\n 'danger' => 'A repetição da senha é diferente da senha digitada!'\n ));\n $this->_redirect('salao/config/alterar-senha');\n }\n \n }\n \n }", "function AlterarSenha($senha,$email){\n \n $this->setSenha($senha);\n $this->setEmail($email);\n \n $query =\"UPDATE \".$this->prefix.\"user SET user_pw = :senha WHERE user_email = :email\";\n \n $params = array(':senha'=> $this->getSenha(),':email'=> $this->getEmail());\n \n if($this->ExecuteSQL($query, $params)):\n return TRUE;\n \n else:\n \n return FALSE;\n endif;\n \n }", "public function editar() {\n\t\t$POST = array();\n\n\t\t\t##apagando indice de tokenrequest pois ele não existe na tabela de categorias\n\t\tunset($this->request->data['TokenRequest']);\t\n\n\t\t$POST = array('UsuarioCliente'=>$this->request->data);\t\n\t\tif ($this->UsuarioCliente->save($POST)) \n\t\t{\n\t\t\t$this->Message = 'Usuario editado com sucesso';\n\t\t\t$this->Return = true;\t\n\t\t} \n\n\t\telse \n\t\t{\n\t\t\t$this->Message = 'Ocorreu um erro na edição de seu Usuario.';\n\t\t\t$this->Return = false;\t\n\t\t}\n\n\t\t$this->EncodeReturn();\t\n\t}", "public function updateSenha($senha,$id){\n $senha = md5(parent::escapeString($senha));\n $sql = \"UPDATE `usuarios` SET `senha` = '$senha' WHERE `id` = '$id'\";\n return parent::executaQuery($sql);\n }", "function editaUsuari($id, $nom, $email, $passXifrada){\n $conn=connexioBD();\n $sql=\"UPDATE usuaris SET nom='$nom', email='$email', password='$passXifrada' WHERE id='$id'\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al editar\".$conn->error);\n }\n $conn->close();\n}", "public function altera_senha($id, $dados)\r\n\t{\r\n\t\t$dados[senha] = md5($dados[senha]);\r\n\r\n\t\tparent::update($this->nome_tabela, $id, $dados);\r\n\t\t\r\n\t\t//\tARMAZENA O LOG\r\n\t\tparent::armazena_log(\"tb_logs_logins\", \"ALTEROU SENHA $id\", $sql, $_SESSION[login][idlogin]);\r\n\t\t\r\n\t\tUtil::script_msg(\"Senha alterada com sucesso.\");\t\r\n\t\tUtil::script_location(dirname($_SERVER['SCRIPT_NAME']).\"/lista.php\");\r\n\t\t\r\n\t}", "public function save() {\n\t\t$data = array(\n\t\t\t\t\"user\" => array(\n\t\t\t\t\t\t\"email\" => $this->_data[\"email\"],\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t// kontrola zmeny hesla\n\t\tif (in_array(\"password\", $this->_changed)) $data[\"user\"][\"password\"] = $this->_data[\"password\"];\n\t\t\n\t\t// odeslani dat\n\t\t$response = $this->_connection->sendRequest(self::OBJECT, \"put\", $this->_data[$this->_identifier], $data, \"post\");\n\t}", "public function edita()\n\t {\t\n\t\t$car=$_REQUEST['car'];\n\t\t$per=$_REQUEST['per'];\n\t\t$logi=$_REQUEST['logi'];\n\t\t$pas=$_REQUEST['pas'];\n\t\t$obs=$_REQUEST['obs'];\n\t\t$est=$_REQUEST['est'];\n\t\t\t//$usu=$_REQUEST['usu'];\n\t\t$user_data=array();\n\t\t$user_data['carnet']=$car;\n\t\t$user_data['login']=$logi;\n\t\t$user_data['password']=$pas;\n\t\t$user_data['estado']=$est;\n\t\t$user_data['observacion']=$obs;\n\t\t$user_data['perfil']=$per;\n\t\t\n\t\t//print_r($user_data);\n\t\t$usuario=new Usuarios;\n\t\t$usuario->edit($user_data);\n\t\t$data1=$usuario->lista();\n\t\t$this->principal();\n\t }", "public function editarSenhaProfessor($cpf, $novaSenha) {\n try {\n $sql = Sql::getInstance()->autenticarProfessorCPF_SQL();\n $stmt = ConexaoDB::getConexaoPDO()->prepare($sql);\n $stmt->bindParam(1, $novaSenha);\n $stmt->bindParam(2, $cpf);\n $stmt->execute();\n } catch (Excepetion $e) {\n echo \"<br> Erro ProfessorDao (editarSenhaProfessor) - Código: \" . $e->getCode() . \" Mensagem: \" . $e->getMessage();\n }\n return FALSE;\n }", "public function AlterarProfessor($id,$nome,$rg,$cpf,$dtnasc,$endereco,$email,$telefone,$modalidade){\n $PDO = db_connect();\n $sql = \"UPDATE professor SET \n nm_professor = :nome,\n cpf_professor = :cpf,\n registro_geral_professor = :rg,\n nm_endereco = :endereco,\n dt_nascimento_professor = :dtnasc,\n cd_telefone_professor = :telefone, \n nm_email_professor = :email,\n nm_modalidade = :modalidade\n WHERE id_professor = :id\";\n\n $stmt = $PDO->prepare($sql);\n $stmt->bindParam(':nome',$nome);\n $stmt->bindParam(':cpf',$cpf);\n $stmt->bindParam(':rg',$rg);\n $stmt->bindParam(':endereco',$endereco);\n $stmt->bindParam(':dtnasc',$dtnasc);\n $stmt->bindParam(':telefone',$telefone);\n $stmt->bindParam(':email',$email);\n $stmt->bindParam(':modalidade', $modalidade);\n $stmt->bindParam(':id',$id, PDO::PARAM_INT);\n\n if($stmt->execute()){\n header('location: ../Views/professor.php');\n }else{\n echo $_SESSION['Error']=\"Erro ao alterar!\";\n print_r($stmt->errorInfo());\n }\n\t}", "public function update_put()\n {\n $response = $this->UserM->update_user(\n $this->put('id'),\n $this->put('email'),\n $this->put('nama'),\n $this->put('nohp'),\n $this->put('pekerjaan')\n );\n $this->response($response);\n }", "public function mudarSenhaUpdate(Request $request)\n {\n $this->repository->findOrFail(Auth::user()->codusuario);\n $data = $request->all();\n \n Validator::extend('igual', function ($attribute, $value, $parameters) {\n if ($value == $parameters[0]) {\n return true;\n } else {\n return false;\n }\n }); \n \n Validator::extend('senhaAntiga', function ($attribute, $value, $parameters) {\n if (password_verify($value, $this->repository->model->senha)) {\n return true;\n } else {\n return false;\n }\n }); \n \n $mensagens = [\n 'senha.igual' => 'A confirmação de senha é diferente da senha',\n 'senhaantiga.senha_antiga' => 'Senha antiga incorreta'\n ];\n \n // Valida dados\n Validator::make($data, [\n 'senhaantiga' => 'required|senhaAntiga',\n 'senha' => 'required|igual:'. $data['repetir_senha']\n ], $mensagens)->validate(); \n \n $data['senha'] = bcrypt($data['senha']);\n\n // autorizacao\n $this->repository->fill($data);\n $this->repository->authorize('update');\n \n // salva\n if (!$this->repository->update()) {\n abort(500);\n } \n \n Session::flash('flash_update', 'Senha alterada!');\n\n // redireciona para view\n return redirect(\"usuario/{$this->repository->model->codusuario}\"); \n }", "public function editar_usuario($id_usuario, $nombre, $apellido, $cedula, $telefono, $email, $direccion, $cargo, $usuario, $password1, $password2, $estado, $permisos)\n {\n\n $conectar = parent::conexion();\n parent::set_names();\n require_once(\"Usuarios.php\");\n $usuarios = new Usuarios();\n //verifica si el id_usuario tiene registro asociado a compras\n $usuario_compras = $usuarios->get_usuario_por_id_compras($_POST[\"id_usuario\"]);\n //verifica si el id_usuario tiene registro asociado a ventas\n $usuario_ventas = $usuarios->get_usuario_por_id_ventas($_POST[\"id_usuario\"]);\n //si el id_usuario NO tiene registros asociados en las tablas compras y ventas entonces se puede editar todos los campos de la tabla usuarios\n if (is_array($usuario_compras) == true and count($usuario_compras) == 0 and is_array($usuario_ventas) == true and count($usuario_ventas) == 0) {\n $sql = \"update usuarios set \n nombres=?,\n apellidos=?,\n cedula=?,\n telefono=?,\n correo=?,\n direccion=?,\n cargo=?,\n usuario=?,\n password=?,\n password2=?,\n estado=?\n where \n id_usuario=?\n \";\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $_POST[\"nombre\"]);\n $sql->bindValue(2, $_POST[\"apellido\"]);\n $sql->bindValue(3, $_POST[\"cedula\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"email\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password1\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->bindValue(12, $_POST[\"id_usuario\"]);\n $sql->execute();\n //SE ELIMINAN LOS PERMISOS SOLO CUANDO SE ENVIE EL FORMULARIO CON SUBMIT\n //Eliminamos todos los permisos asignados para volverlos a registrar\n $sql_delete = \"delete from usuario_permiso where id_usuario=?\";\n $sql_delete = $conectar->prepare($sql_delete);\n $sql_delete->bindValue(1, $_POST[\"id_usuario\"]);\n $sql_delete->execute();\n //$resultado=$sql_delete->fetchAll();\n //insertamos los permisos\n //almacena todos los checkbox que han sido marcados\n //este es un array tiene un name=permiso[]\n $permisos = $_POST[\"permiso\"];\n // print_r($_POST);\n $num_elementos = 0;\n while ($num_elementos < count($permisos)) {\n $sql_detalle = \"insert into usuario_permiso\n values(null,?,?)\";\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $_POST[\"id_usuario\"]);\n $sql_detalle->bindValue(2, $permisos[$num_elementos]);\n $sql_detalle->execute();\n //recorremos los permisos con este contador\n $num_elementos = $num_elementos + 1;\n }\n } else {\n //si el usuario tiene registros asociados en compras y ventas entonces no se edita el nombre, apellido y cedula\n $sql = \"update usuarios set \n telefono=?,\n correo=?,\n direccion=?,\n cargo=?,\n usuario=?,\n password=?,\n password2=?,\n estado=?\n where \n id_usuario=?\n \";\n //echo $sql; exit();\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $_POST[\"telefono\"]);\n $sql->bindValue(2, $_POST[\"email\"]);\n $sql->bindValue(3, $_POST[\"direccion\"]);\n $sql->bindValue(4, $_POST[\"cargo\"]);\n $sql->bindValue(5, $_POST[\"usuario\"]);\n $sql->bindValue(6, $_POST[\"password1\"]);\n $sql->bindValue(7, $_POST[\"password2\"]);\n $sql->bindValue(8, $_POST[\"estado\"]);\n $sql->bindValue(9, $_POST[\"id_usuario\"]);\n $sql->execute();\n //SE ELIMINAN LOS PERMISOS SOLO CUANDO SE ENVIE EL FORMULARIO CON SUBMIT\n //Eliminamos todos los permisos asignados para volverlos a registrar\n $sql_delete = \"delete from usuario_permiso where id_usuario=?\";\n $sql_delete = $conectar->prepare($sql_delete);\n $sql_delete->bindValue(1, $_POST[\"id_usuario\"]);\n $sql_delete->execute();\n //$resultado=$sql_delete->fetchAll();\n //insertamos los permisos\n //almacena todos los checkbox que han sido marcados\n //este es un array tiene un name=permiso[]\n if (isset($_POST[\"permiso\"])) {\n $permisos = $_POST[\"permiso\"];\n }\n //print_r($_POST);\n $num_elementos = 0;\n\n while ($num_elementos < count($permisos)) {\n\n $sql_detalle = \"insert into usuario_permiso\n values(null,?,?)\";\n\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $_POST[\"id_usuario\"]);\n $sql_detalle->bindValue(2, $permisos[$num_elementos]);\n $sql_detalle->execute();\n\n\n //recorremos los permisos con este contador\n $num_elementos = $num_elementos + 1;\n } //fin while\n\n\n } // fin else\n\n\n }", "public function edit()\n {\n $user = User::findOne(Yii::$app->user->id);\n $user->username = $this->username;\n $user->email = $this->email;\n try {\n $user->save();\n return true;\n } catch(IntegrityException $e) {\n return false;\n }\n }", "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function editarAportante(){ \n if(isset($_POST[\"cedulaE\"]))\n {\n $aportante=new Aportante($this->adapter);\n $aportante->setAportanteID($_POST[\"idE\"]);\n $aportante->setCedula($_POST[\"cedulaE\"]);\n $aportante->setNames($_POST[\"namesE\"]);\n $aportante->setLastnames($_POST[\"lastnamesE\"]);\n $aportante->setPhoneHome($_POST[\"phoneHomeE\"]);\n\t\t\t$aportante->setPhoneMobile($_POST[\"phoneMobileE\"]);\n\t\t\t$aportante->setEmail($_POST[\"emailE\"]);\n $save=$aportante->update(); // Manda a actualizar la moto en el modelo\n } \n $this->redirect(\"BandejaCallcenters\", \"index\"); // COntrolador + Vista\n }", "function modificar(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $usuario = $data[\"usuario\"];\n $email = $data[\"email\"];\n $clave = $data[\"clave\"];\n $tipo = $data[\"tipo\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"UPDATE usuario SET usu_clave='$clave', usu_id_tipo_usuario='$tipo', usu_estado='$estado' WHERE usu_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "public function edit(string $name, string $surname){\n $this->setName($name);\n $this->setSurname($surname);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"UPDATE user SET name = '$this->name', surname = '$this->surname' WHERE id = '$this->id'\");\n $connection = null;\n }", "public function update()\n {\n $this->validate();\n\n $registro = Cliente::findOrFail($this->cliente_id);\n\n $registro->update([\n 'sexo_id' => $this->sexo_id,\n 'cedula' => $this->cedula,\n 'nombre_primero' => $this->nombre_primero,\n 'nombre_segundo' => $this->nombre_segundo,\n 'apellido_paterno' => $this->apellido_paterno,\n 'apellido_materno' => $this->apellido_materno,\n 'direccion' => $this->direccion,\n 'correo' => $this->correo,\n 'telefono' => $this->telefono,\n 'fecha_nacimiento' => $this->fecha_nacimiento,\n 'deuda' => $this->deuda,\n ]);\n\n $this->resetInput();\n $this->accion = 1;\n }", "public function put()\n {\n $request = new EditRequest();\n\n $account = new User();\n\n $account->update($_SESSION['user'], [\n 'first_name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'password' => $request->password,\n 'email' => $request->email,\n ]);\n\n Redirect::route('account');\n }", "public function updateSenha(Request $request)\n {\n $funcionario = User::find(auth()->user()->id);\n\n $request->validate([\n 'password'=>'required|confirmed',\n ]);\n $senhaAntiga = $funcionario->password;\n if (Hash::check($request->input('senhaAntiga'), $senhaAntiga)) {\n if ( ! $request->input('password') == '') {\n $funcionario->password = bcrypt($request->input('password'));\n $funcionario->save();\n\n return redirect('/configurar/redefinir-senha')->with('alertsucess', 'Senha Alterada!');\n }\n }\n \n else{\n\n return redirect('/configurar/redefinir-senha')->with('alerterror', 'Senha atual errada!');\n }\n \n }", "function modificarUsuario(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $usuario = $data[\"usuario\"];\n $email = $data[\"email\"];\n $clave = $data[\"clave\"];\n $resultado = mysqli_query($conexion,\"UPDATE usuario SET usu_usuario='$usuario', usu_clave='$clave' WHERE usu_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "public function update($usuario, $clave, $email, $pintor) {\n $bd = Db::getInstance();\n $sql = \"UPDATE login SET usuario= :usuario, clave= :clave, email= :email, pintor= :pintor WHERE id= :id\";\n $stmt = $bd->prepare($sql);\n $stmt->execute([\":usuario\" => $usuario, \":clave\" => $clave, \":email\" => $email, \":pintor\" => $pintor, \":id\" => $this->id]);\n }", "public function updateUser_put()\n\t{\n\t\t$data = [\n\t\t\t\"id\"=>$this->put('id'),\n\t\t\t\"nama\"=>$this->put('nama',true),\n\t\t\t\"alamat\"=>$this->put('alamat',true),\n\t\t\t\"telp\"=>$this->put('telp',true),\n\t\t\t\"username\"=>$this->put('username',true)\n\t\t];\n\t\t$id = $this->put('id');\n\n\t\tif ($this->User->updateUser($data,$id)>0) {\n\t\t\t$this->response([\n\t\t\t\t'error'=>false,\n\t\t\t\t'message'=>'User berhasil diupdate',\n\t\t\t\t'user'=>$data\n\t\t\t],200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response([\n\t\t\t\t'error'=>true,\n\t\t\t\t'message'=>'User gagal diupdate'\n\t\t\t],200);\n\t\t}\n\t}", "function edit(){\n if (!empty($this->data)){\n if ($this->User->save($this->data)){\n $this->Session->setFlash(\"Your account has been updated successfully\");\n $this->go_back();\n } \n }else{\n $this->User->id = $this->Session->read(\"Auth.User.id\");\n $this->data = $this->User->read();\n }\n }", "public static function updateProfiloPersonale()\n {\n define(\"nome_completo_regexpr\", \"/^[a-zA-Z \\xE0\\xE8\\xE9\\xEC\\xF2\\xF9]{3,64}/\");\n define(\"email_personale_regexpr\", \"/^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$/\");\n define(\"username_regexpr\", \"/^[A-Za-z0-9\\xE0\\xE8\\xE9\\xEC\\xF2\\xF9 ]{3,64}$/\");\n define(\"password_regexpr\", \"/^[a-zA-Z0-9\\xE0\\xE8\\xE9\\xEC\\xF2\\xF9]+$/\");\n $name = trim($_REQUEST['nome_completo_azienda']);\n $task = trim($_REQUEST['tipo_incarichi_id']);\n $mail = trim($_REQUEST['email_personale_azienda']);\n $username = trim($_REQUEST['username_azienda']);\n $pass = trim($_REQUEST['password_azienda']);\n $id = $_SESSION['current_user']->getId();\n $error_rec = 0; //verifica la presenza di un generico errore\n \n $utente = new Azienda();\n // verifica la correttezza dei valori inseriti nella compliazione del form\n if (!empty($name)) {\n unset($_SESSION['nome_completo_azienda']);\n if (1 === preg_match(nome_completo_regexpr, $name)) {\n $utente->setNomeCompleto($name);\n } else {\n $_SESSION['nome_completo_azienda'] = \"<div class='messaggio-errore'>Il campo nome completo contiene caratteri non validi.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['nome_completo_azienda'] = \"<div class='messaggio-errore'>Il campo nome completo &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($task)) {\n unset($_SESSION['tipo_incarichi_id']);\n $utente->setTipo_incarichi_id($task);\n }\n if ($task == \"-1\") {\n $_SESSION['tipo_incarichi_id'] = \"<div class='messaggio-errore'>Il campo tipo di incarico non &egrave; stato schelto</div>\";\n $error_rec++;\n }\n if (!empty($mail)) {\n unset($_SESSION['email_personale_azienda']);\n if (1 === preg_match(email_personale_regexpr, $mail)) {\n $valido = UtenteFactory::cercaEmailUpdate($mail, 1, $id);\n if ($valido == 'SI') {\n $utente->setEmailPersonale($mail);\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Questa email &egrave; gi&agrave; stato utilizzata<br></div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Questo indirizzo email non &egrave; valido.<br>Verifica eventuali errori di battitura.<br>Esempio email valida: [email protected]</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Il campo email &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($username)) {\n unset($_SESSION['username_azienda']);\n if (1 === preg_match(username_regexpr, $username)) {\n $valido = UtenteFactory::cercaUsernameUpdate($username, 1, $id);\n if ($valido == 'SI') {\n $utente->setUsername($username);\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Questo Username &egrave; gi&agrave; stato utilizzato<br>scegline un altro</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Il campo username completo contiene caratteri non validi.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Il campo username completo &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($pass)) {\n unset($_SESSION['password_azienda']);\n if (1 === preg_match(password_regexpr, $pass)) {\n $utente->setPassword($pass);\n } else {\n $_SESSION['password_azienda'] = \"<div class='messaggio-errore'>Il campo password non &egrave; valido.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['password_azienda'] = \"<div class='messaggio-errore'>Il campo password &egrave; vuoto</div>\";\n $error_rec++;\n }\n if ($error_rec == 0) {\n $update = UtenteFactory::updateProfiloPersonale($id, $utente);\n if ($update == 'INSUCCESSO') {\n $_SESSION['errore'] = 6;\n } elseif ($update == 'SUCCESSO') {\n $_SESSION['errore'] = 5;\n }\n }\n \n $vd = new ViewDescriptor();\n $vd->setTitolo(\"SardiniaInFood: Profilo\");\n $vd->setLogoFile(\"../view/in/logo.php\");\n $vd->setMenuFile(\"../view/in/menu_modifica_profilo.php\");\n $vd->setContentFile(\"../view/in/azienda/modifica_profilo_personale.php\");\n $vd->setErrorFile(\"../view/in/error_in.php\");\n $vd->setFooterFile(\"../view/in/footer_empty.php\");\n \n require_once '../view/Master.php';\n }", "public function editarUsuario(){\r\n $sql = \"UPDATE usuarios SET Usuario = '{$this->usuario}',\r\n NombreCompleto = '{$this->nombreCompleto}',\r\n Correo = '{$this->correo}',\r\n IdRol = '{$this->idRol}'\r\n WHERE IdUsuario = '{$this->idUsuario}'\";\r\n $res = $this->conexion->setQuery($sql);\r\n return $res;\r\n}", "public function edit(Request $request)\n {\n $novo_aluno = alunos::find($request->id);\n \n $novo_aluno->nome = $request->nome; \n $novo_aluno->email = $request->email;\n $novo_aluno->sexo = $request->sexo;\n $novo_aluno->data_nascimento = $request->data_nascimento;\n if($novo_aluno->save()){\n echo \"Aluno editado com sucesso\";\n }else{\n echo \"Não foi possivel editar o aluno\";\n }\n }", "function p_update_row(\n\t\t\t\t$cod_usuario_pk\t,\n\t\t\t\t$cod_usuario\t,\n\t\t\t\t$txt_login\t\t,\n\t\t\t\t$txt_password\n\t\t){\n\t\t\tglobal $db;\n\t\t\t$query =\"\n\t\t\tupdate \tseg_usuario set\n\t\t\t\t\ttxt_login\t\t= '$txt_login'\t\t,\n\t\t\t\t\ttxt_password\t= password(SHA('$txt_password')),\n\t\t\t\t\tcod_usuario\t\t= '$cod_usuario'\n\t\t\twhere\tcod_usuario_pk\t= $cod_usuario_pk\";\n\t\t\t$db->consultar($query);\t\n\t\t}", "public function edit(Procedencia $procedencia)\n {\n //\n }", "public function edit(Seccion_Alumno $alumno_seccion)\n {\n //\n }", "public function editar(){\r\n\t\tif(!$this->_validarCampos())\r\n\t\t\t// levantando a excessao CamposObrigatorios //\r\n\t\t\tthrow new CamposObrigatorios();\r\n\t\t\r\n\t\tif($this->_testarServicoExisteEdicao($this->getId(), $this->getNome()))\r\n\t\t\t// levanto a excessao//\r\n\t\t\tthrow new Exception(\"Servico já cadastrado en nossa base de dados\");\r\n\t\t\r\n\t\t// recuperando a instancia da classe de acesso a dados //\r\n\t\t$instancia = ServicoDAO::getInstancia(); \r\n\t\t// retornando o Usuario //\r\n\t\treturn $servico = $instancia->editar($this);\r\n\t}", "function edit_profil($id,$nom,$prenom,$email,$mdp){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `nom` = '$nom' WHERE `id_utilisateur` = $id\");\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `prenom` = '$prenom' WHERE `id_utilisateur` = $id\");\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `mail` = '$email' WHERE `id_utilisateur` = $id\");\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `mdp` = '$mdp' WHERE `id_utilisateur` = $id\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "function editUsuario($usuario)\n{\n\t\t$con = getDBConnection();\n\t\t$sql = \"UPDATE usuarios SET nombre = :nombre, apellidos = :apellidos, user_name = :user_name, password = :password, email = :email WHERE id = :id\";\n\t\t$stmt = $con->prepare($sql);\n\t\t$stmt->bindParam(':id', $usuario->id);\n\t\t$stmt->bindParam(':nombre', $usuario->nombre);\n\t\t$stmt->bindParam(':apellidos', $usuario->apellidos);\n\t\t$stmt->bindParam(':user_name', $usuario->user_name);\n\t\t$stmt->bindParam(':password', $usuario->password);\n\t\t$stmt->bindParam(':email', $usuario->email);\n\t\t$stmt->execute();\n}", "function editarPerfil(){\n \t//Llamo a la vista editar perfil\n \trequire \"app/Views/EditarPerfil.php\";\n \t\t$usuario = new Usuario();\n\t\t//Paso datos\n \t\t$usuario->nombre=$_POST['nombre'];\n \t\t$usuario->apellidoPaterno=$_POST['apellido_p'];\n \t\t$usuario->apellidoMaterno=$_POST['apellido_m'];\n \t\t$usuario->nombreUsuario=$_POST['nom_usuario'];\n \t\t$usuario->correo=$_POST['correo'];\n \t\t$usuario->contrasenia=$_POST['contrasenia'];\n \t\t$usuario->sexo=$_POST['sexo'];\n \t\t$usuario->descripcion=$_POST['descripcion'];\n \t\t$usuario->id=$_POST['id'];\n \t\t$usuario->contrasenia['password'];\n \t\t$usuario->editarUsuario();\n header(\"Location:/Proyecto/index.php?controller=Publicaciones&action=home\");\t\n }", "function alterarPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"UPDATE pessoa SET\"\r\n .\" nome='{$_POST[\"nome\"]}', \"\r\n .\" nascimento='{$_POST[\"nascimento\"]}', \"\r\n .\" endereco='{$_POST[\"endereco\"]}', \"\r\n .\" telefone='{$_POST[\"telefone\"]}'\"\r\n .\" WHERE id='{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "function update($id,$nombre,$correo){\n\t\tglobal $conn;\n\t\t$sql = \"UPDATE user SET password='$nombre', email='$correo' where id=$id\";\n\t\t$stmt = $conn->prepare($sql);\n\t\t$stmt->execute();\n\t}", "public function update($nome,$email,$id){\n $nome = parent::escapeString($nome);\n $email = parent::escapeString($email);\n \t$sql = \"UPDATE `usuarios` SET `nome` = '$nome', `email` = '$email' WHERE `id` = '$id'\";\n return parent::executaQuery($sql);\n }", "public function editUser()\n {\n\n $this->displayAllEmployees();\n $new_data = [];\n $id = readline(\"Unesite broj ispred zaposlenika čije podatke želite izmjeniti: \");\n\n $this->displayOneEmployees( $id);\n\n foreach ( $this->employeeStorage->getEmployeeScheme() as $key => $singleUser) { //input is same as addUser method\n\n $userInput = readline(\"$singleUser : \");\n $validate = $this->validateInput($userInput, $key);\n\n while (!$validate)\n {\n $userInput = readline(\"Unesite ispravan format : \");\n $validate = $this->validateInput($userInput, $key);\n\n }\n if ($key === 'income'){\n $userInput = number_format((float)$userInput, 2, '.', '');\n }\n\n $new_data[$key] = $userInput;\n\n }\n $this->employeeStorage->updateEmployee($id, $new_data); //sends both id and data to updateEmployee so the chosen employee can be updated with new data\n\n echo \"\\033[32m\". \"## Izmjene za \". $new_data['name'].\" \". $new_data['lastname'].\" su upisane! \\n\\n\".\"\\033[0m\";\n\n }", "function editarCliente(\n\t\t\t$firstname,$lastname,$email,$phone,$commentary,$idCliente,$usuario,$password){\n\t\t\t\n\t\t\t$password = sha1($password);\n\t\t\t//SQL\n\t\t\t$query = \"UPDATE users SET \n\t\t\t\tfirstname = '\".$firstname.\"',\n\t\t\t\tlastname = '\".$lastname.\"',\n\t\t\t\temail = '\".$email.\"',\n\t\t\t\tphone = '\".$phone.\"',\n\t\t\t\tcommentary = '\".$commentary.\"' ,\n\t\t\t\tupdated_at = NOW(),\n\t\t\t\tuser = '\".$usuario.\"'\";\n\t\t\t\tif($password != ''){\n\t\t\t\t\t$query.= \", password = '\".$password.\"'\";\n\t\t\t\t}\n\t\t\t\t$query .=\"\n\t\t\t\t\n\t\t\t\tWHERE id = '\".$idCliente.\"';\";\n\n\t\t\t$rst = $this->db->enviarQuery($query,'CUD');\n\t\t\treturn $rst;\n\t\t}", "public function editarUsuario($dadosNovos){\n\t\t\t\n\t\t\t$this->load->database();\n\t\t\t\n\t\t\t//print_r($dadosNovos);\n\t\t\t\n\t\t\t$this->db->where('id_user', $dadosNovos['id_user']);\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\tif( ! $this->db->update('user', $dadosNovos))\n\t\t\t\t{\n\t\t\t\t\treturn \"erro\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn \"sucesso\";\n\t\t\t\t}\n\t\t\t\n\t\t}", "public function edit($id, array $data){\n\n $status = false;\n\n $update = Users::find($id);\n\n if (!empty($update)) {\n try{\n $update = Users::find($id); \n $update->username = $data['username'];\n $update->password = md5($data['password']);\n $update->name = $data['name'];\n $update->usergroup_id = $data['usergroup_id']; \n $update->superuser = $data['superuser'];\n $update->workplace_id = $data['workplace_id'];\n $update->save();\n $status = true;\n }\n catch(\\Exception $e){\n return json_encode(['status' => 'error', 'message' => $e->getMessage()]);\n } \n\n if($status){\n return json_encode(['status' => 'success', 'message' => 'Usuário alterado com sucesso!']);\n }\n }else{\n return json_encode(['status' => 'error', 'message' => 'Usuário não encontrado!']);\n }\n }", "public function update($permiso);", "public function testUpdateRole()\n {\n }", "public function testUpdateRole()\n {\n }", "public function update($id_cliente){}", "function modificarDatosUsuario($id, $username, $email, $poblacion, $idioma, $telefono, $url, $foto, $textoPresentacion) {\n $sql = \"UPDATE usuario SET username='\" . $username . \"',email='\" . $email . \"',poblacion='\" . $poblacion . \"',\"\n . \"idioma='\" . $idioma . \"',telefono='\" . $telefono . \"',url='\" . $url . \"',foto='\" . $foto . \"',\"\n . \"textoPresentacion='\" . $textoPresentacion . \"' WHERE id='\" . $id . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "function editUsers(string $first_name, string $last_name, string $email, string $password, int $id) : void\n{\n\n $db = new Database;\n $db = $db->dbConnect();\n\n // requète pour modifier un user précis\n $sql = \"UPDATE user SET first_name = :first_name, last_name = :last_name, mail = :mail, password = :password WHERE id = :id\";\n\n /* on hashe le nouveau mot de passe */\n $passwordHashed = password_hash($password, PASSWORD_DEFAULT);\n\n\n $editUsers = $db->prepare($sql);\n $editUsers = $editUsers->execute([\n ':id' => $id,\n ':first_name' => $first_name, \n ':last_name' => $last_name, \n ':mail' => $email,\n ':password' => $passwordHashed\n ]);\n}", "public function editar($id_cliente, $nome, $email, $endereco, $bairro, $cep, $cpf, $fone) {\n\n //$nome = $_POST[\"txt_nome\"]; // assim já pega os dados mas\n // por questão de segurança recomenda-se usar strip_tags para quebrar as tags e ficar mais seguro\n // usa-se o issset para verificar se o dado existe, senão retorna null\n $id_cliente = isset($_POST[\"id_cliente\"]) ? strip_tags(filter_input(INPUT_POST, \"id_cliente\")) : NULL; // usado para a edição do cliente\n $nome = isset($_POST[\"txt_nome\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_nome\")) : NULL; // usado para a edição e inserção do cliente\n $email = isset($_POST[\"txt_email\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_email\")) : NULL; // usado para a edição e inserção do cliente\n $endereco = isset($_POST[\"txt_endereco\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_endereco\")) : NULL; // usado para a edição e inserção do cliente\n $bairro = isset($_POST[\"txt_bairro\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_bairro\")) : NULL; // usado para a edição e inserção do cliente\n $cep = isset($_POST[\"txt_cep\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_cep\")) : NULL; // usado para a edição e inserção do cliente\n $cpf = isset($_POST[\"txt_cpf\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_cpf\")) : NULL; // usado para a edição e inserção do cliente\n $fone = isset($_POST[\"txt_fone\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_fone\")) : NULL; // usado para a edição e inserção do cliente\n\n $sql = \"UPDATE cliente SET nome = :nome, email = :email, endereco = :endereco, bairro = :bairro, cep = :cep, cpf = :cpf, fone = :fone WHERE id_cliente = :id_cliente\";\n $qry = $this->db->prepare($sql); // prepare para os dados externos\n $qry->bindValue(\":nome\", $nome); // comando para inserir\n $qry->bindValue(\":email\", $email); // comando para inserir\n $qry->bindValue(\":endereco\", $endereco); // comando para inserir\n $qry->bindValue(\":bairro\", $bairro); // comando para inserir\n $qry->bindValue(\":cep\", $cep); // comando para inserir\n $qry->bindValue(\":cpf\", $cpf); // comando para inserir\n $qry->bindValue(\":fone\", $fone); // comando para inserir\n $qry->bindValue(\":id_cliente\", $id_cliente); // comando para inserir\n $qry->execute(); // comando para executar\n }", "public function PUT()\n {\n $obj = $this->puttedObject();\n if( ! isset($obj->email))\n {\n throw new BadRequest();\n }\n if( ! isset($obj->name))\n {\n throw new BadRequest();\n }\n \n $u = new User(); \n $u->setEmail($obj->email);\n $u->setName($obj->name);\n $password = $this->pseudoRandomPassword();\n $u->setPassword($password);\n if( ! $u->save() )\n {\n throw new Conflict;\n }\n $this->setReturnVariable(\"data\", array(\"password\" => $password));\n\n \n }", "function modificarUsuario($usuario,$password,$idUsuario){\n \n $conex=Conexion::getInstance();\n \n $sql=\" UPDATE `usuarios` SET `usuario`='$usuario',`password`='$password' WHERE id=$idUsuario\";\n \n $conex->dbh->prepare($sql);\n $conex->dbh->exec($sql); \n \n\n}", "public function edit($id)\n {\n $user = User::find($id); //BUAT QUERY UTK PENGAMBILAN DATA\n //LALU ASSIGN KE DALAM MASING-MASING PROPERTI DATANYA\n $this->idz = $user->id;\n $this->name = $user->name;\n $this->username = $user->username;\n $this->email = $user->email;\n $this->password = $user->password;\n\n $this->openUser(); //LALU BUKA User\n }", "public function editarDadosProfessor($professor) {\n try {\n $sql = Sql::getInstance()->alterarDadosProfessor_SQL();\n $stmt = ConexaoDB::getConexaoPDO()->prepare($sql);\n\n $stmt->bindParam(1, $professor->getNome());\n $stmt->bindParam(2, $professor->getEmail());\n $stmt->bindParam(3, $professor->getPrimeiroTelefone());\n $stmt->bindParam(4, $professor->getSegundoTelefone());\n $stmt->bindParam(5, $professor->getCpfProfessor());\n\n $stmt->execute();\n } catch (Excepetion $e) {\n echo \"<br> Erro ProfessorDAO (editarDadosProfessor) - Código: \" . $e->getCode() . \" Mensagem: \" . $e->getMessage();\n }\n }", "public function edit(Peserta $peserta)\n {\n //\n \n }", "public function actionPessoas(){\n\n $pessoa = Pessoa::findOne(2);\n $pessoa->nome = 'Thiago Doideira';\n $pessoa->save();\n var_dump($pessoa->nome . ' - ' . $pessoa->email);\n }", "public function testUpdateUser()\n {\n }", "public function edit(TipoAusencia $tipoAusencia)\n {\n //\n }", "function editUtilisateur($id, $mdp = null, $email, $biographie, $badge) {\n\t\t\tif($mdp) {\n\t\t\t\treturn $this->save(array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'password' => md5(SECRET_KEY.$mdp),\n\t\t\t\t\t'email' => $email,\n\t\t\t\t\t'biographie' => $biographie,\n\t\t\t\t\t'badge' => $badge\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\treturn $this->save(array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'email' => $email,\n\t\t\t\t\t'biographie' => $biographie,\n\t\t\t\t\t'badge' => $badge\n\t\t\t\t));\n\t\t\t}\n\t\t}", "public function edit(Credito $credito)\n {\n //\n }", "public function edit(Credito $credito)\n {\n //\n }", "public function edit($data=array()) {\n foreach ($data as $campo=>$valor) {\n $$campo = $valor;\n }\n \n $this->parametros = array($banc_codigo,$banc_nombre);\n $this->sp = \"str_consultaBanco_upd\";\n $this->executeSPAccion();\n if($this->filasAfectadas>0){\n $this->mensaje=\"Banco modificado exitosamente\";\n }else{\n $this->mensaje=\"No se ha actualizado el banco\";\n }\n }", "function actualizarUsuario($id,$nombre,$apellidos,$edad){\n $sqlInsercion=\"UPDATE usuario\n SET nombre='\".$nombre.\"',apellidos='\".$apellidos.\"',edad=\".$edad.\n \" WHERE id=\".$id;\n $this->conexion->query($sqlInsercion);\n }", "public function edit(Prueva $prueva)\n {\n //\n }", "static public function ctrEditarUsuario(){\n \t\tif(isset($_POST[\"editarUsuario\"])){\n \t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarNombre\"]) ){\n\n\n \t\t\t//Inicializamos la ruta de la foto por si no hay foto.\n\n\n \t\t\t\t$tabla = \"usuarios\";\n \t\t\t\t$encriptar = \"\";\n\n \t\t\t\tif($_POST[\"editarPassword\"] != \"\" ){\n\n \t\t\t\t\tif( preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"editarPassword\"]))\n \t\t\t\t\t{\n \t\t\t\t\t\n\t\t\t\t\t\t//$encriptar = crypt($_POST[\"editarPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t\t\t$encriptar = $_POST[\"editarPassword\"];\n\n \t\t\t\t\t} else \n \t\t\t\t\t{\n\n \t\t\t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡La contraseña lleva 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 = \"usuarios\";\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 \t\t\t\t\t}\n\n\n\n \t\t\t\t}else \n \t\t\t\t$encriptar = $_POST[\"editarPassword\"] ; \n\n\n \t\t\t\t$datos = array (\"nombre\" => $_POST[\"editarNombre\"],\n \t\t\t\t\t\t\t\t\"usuario\" => $_POST[\"editarUsuario\"],\n \t\t\t\t\t\t\t\"password\" => $encriptar ,\n \t\t\t\t\t\t\"perfil\" => $_POST[\"editarPerfil\"]);\n\n \t\t\t\t$respuesta = ModeloUsuarios::mdlEditarUsuario($tabla, $datos);\n\n \t\t\t\tif($respuesta == \"ok\" ){\n\n \t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\ttitle: \"¡El usuario ha sido editado correctamente!\",\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 = \"usuarios\";\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\t}\n\n\n\n\t\t\t\t}else {\n\n\techo '<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El nombre del usuario lleva 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 = \"usuarios\";\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\t}\n\n\n\n\n \t\t\t}\n\n\n \t\t \n \t\t}", "public function edit(anteproyecto $anteproyecto)\n {\n //\n }", "public function actualizar()\n {\n $id = $this->input->post('id_professor');\n $professor = array(\n \"nome_professor\" => $this->input->post('nome_professor')\n );\n $this->db->where('id_professor', $id);\n return $this->db->update('professor', $professor);\n }", "public function edit(peserta $peserta)\n {\n //\n }", "public function update(){\n \n //comprueba que llegue el formulario con los datos\n if(empty($_POST['actualizar']))\n throw new Exception(\"No llegaron los datos\");\n \n //podemos crear un nuevo usuario o recuperar de la bdd,\n //crearé un nuevo usuario porque me ahorro una consulta\n $usuario= new Usuario();\n \n $usuario->id= intval($_POST['id']);\n $usuario->user= $_POST['user'];\n $usuario->pass= $_POST['pass'];\n $usuario->nombre= $_POST['nombre'];\n $usuario->apellidos= $_POST['apellidos'];\n $usuario->email= $_POST['email'];\n $usuario->direccion= $_POST['direccion'];\n $usuario->poblacion= $_POST['poblacion'];\n $usuario->provincia= $_POST['provincia'];\n $usuario->cp= $_POST['cp'];\n \n //intenta realizar la actualización de datos\n if($usuario->actualizar()===false)\n throw new Exception(\"No se pudo actualizar $usuario->user\");\n \n //prepara un mensaje. Es guarda en una variable global perque les variables no es recorden\n // despres d'executar les funcions! I ara no anem a la vista, sino que portem a un altre\n //métode!!\n $GLOBALS['mensaje']= \"Actualización del usuario $usuario->user correcta.\";\n \n //repite la operación de edit, así mantendrá al usuario en la vista de edición\n $this->edit($usuario->id);\n }", "public function editar(){\n\n\t\tif( ! $this->session->has_userdata('logado'))\n\t\t\tredirect(base_url('webpedidos/'));\n\t\t\t\n\t\t$this->load->model('usuario/Usuario_model', 'usuario');\n\t\t\n\t\t$id = trim($this->input->post('id'));\n\t\t$novoNivel = trim($this->input->post('novoNivel'));\t\n\t\t$novoLogin = trim($this->input->post('novoLogin'));\t\n\n\t\t\n\t\t$editado = $this->usuario->editar($id, $novoNivel, $novoLogin );\n\t\n\t\t$this->output->set_content_type('application/json')->set_output(json_encode($editado));\n\t}", "public function edit(InstitutoProcedencia $institutos_procedencia)\n {\n //\n }", "public function actionSalvarContribuicao(){\n $nome = $_POST['nomec'];\n $valor = $_POST['valorc'];\n $id = $_POST['idp'];\n \n $arrReturn = array(\n \"erro\" => true\n );\n \n $c = new Contribuinte;\n $c->Presente_idPresente = $id;\n $c->nome = strtoupper($nome);\n $c->valor_contribuicao = $valor;\n if($c->save()){\n $presente = Presente::model()->findByPk($id);\n $presente->acumulado = $presente->acumulado + $valor;\n if($presente->update()){\n $arrReturn = array(\n \"erro\" => false\n );\n }\n }\n \n echo json_encode($arrReturn);\n }", "public static function editar_empresa($idnodo, $propiedad, $detalle){\n\t\t//Obtengo toda la informacion del nodo\n\t\t$editar = Neo4Play::client()->getNode($idnodo);\n\t\t//edita la propiedad y si no existe la crea\n\t\t$editar->setProperty($propiedad,$detalle)\n\t\t \t->save();\n\t}", "public function Editar(){\n \n // Istancia a classe \"Funcionario\" do arquivo \"funcionario_class\".\n $funcionario = new Funcionario();\n $endereco = new Endereco();\n \n // Pega o id do registro e os demais dados para fazer uma atualização do mesmo.\n // Variáevis do funcionário.\n $funcionario->idFuncionario = $_GET['id'];\n $funcionario->nome = $_POST['txt_nome'];\n $funcionario->sobrenome = $_POST['txt_sobrenome'];\n $funcionario->rg = $_POST['txt_rg'];\n $funcionario->cpf = $_POST['txt_cpf'];\n $funcionario->usuario = $_POST['txt_usuario'];\n $funcionario->senha = $_POST['txt_senha'];\n $funcionario->idNivelFuncionario = $_POST['cbx_nivelFuncionario'];\n $funcionario->idEndereco = $_GET['idEnd'];\n // Variáveis do endereço do funcionário.\n $endereco->bairro = $_POST['txt_bairro'];\n $endereco->logradouro = $_POST['txt_logradouro'];\n $endereco->cep = $_POST['txt_cep'];\n $endereco->cidade = $_POST['cbx_cidade'];\n $endereco->idEndereco = $_GET['idEnd'];\n \n // Chama o metodo para atualizar o endereço do funcionário.\n $sucess = $endereco::Update($endereco);\n \n // Chama o metodo para atualizar o funcionário apenas se a atualização do endereço dele foi bem sucedida.\n if($sucess == 1){\n $funcionario::Update($funcionario);\n }\n \n }", "public function editar(Request $request){\n\n $editarRol = Tb_rol::findOrFail($request->id);\n\n $editareditarRol->id = $request->id;\n $editareditarRol->name = $request->name;\n\n $editarLibro->save();\n }", "public function edit(FamilleProduit $familleProduit)\n {\n //\n }", "public function edit($id_cliente){}", "public function edit(Venta $venta)\n {\n //\n }", "public function edit(Venta $venta)\n {\n //\n }", "public function edit(Venta $venta)\n {\n //\n }", "public function edit(Contratos $contratos)\n {\n //\n }", "public function alterar() {\n $params = array();\n //aqui so vai entrar quando clcar no form\n if ($this->input->post()) {\n $this->form_validation->set_rules('nome', 'Nome', 'required|trim|min_length[2]|max_length[80]');\n $this->form_validation->set_rules('email', 'Email', 'required|trim|valid_email|min_length[5]|max_length[80]');\n $this->form_validation->set_rules('senha', 'Senha', 'required|trim');\n $this->form_validation->set_rules('ativo', 'Ativo', 'integer');\n $this->form_validation->set_rules('idAdministrador', 'Id', 'required|integer');\n if ($this->form_validation->run()) {\n if ($this->administrador_m->alterar($this->input->post())) {\n $params['mensagem'] = alert('Sucesso ao alterar o Administrador!', 'success');\n } else {\n $params['mensagem'] = alert('Erro de banco de dados!', 'danger');\n }\n } else {\n $params['mensagem'] = alert(validation_errors(), 'danger');\n }\n }\n\n //var_dump($this->administrador_m->getDataById($this->uri->segment(4)));exit();\n $this->form_validation->set_default($this->administrador_m->getDataById($this->uri->segment(4)));\n\n $this->template->write_view('conteudo', 'admin/form', $params);\n $this->template->render();\n }", "public function edit(Entrenador $entrenador)\n {\n //\n }", "public function edit(SalidasProducto $salidasProducto)\n {\n //\n }", "public function atualizarDados($id_adm, $nome, $email, $senha)\n\t{\n\t\t$cmd = $this->pdo->prepare(\"UPDATE tbadm SET nome = :n, email = :e, senha = :s WHERE id_adm = :id\");\n\t\t$cmd->bindValue(\":n\",$nome);\n\t\t$cmd->bindValue(\":e\",$email);\n\t\t$cmd->bindValue(\":s\",$senha);\n\t\t$cmd->bindValue(\":id\",$id_adm);\n\t\t$cmd->execute();\n\t\t\n\t}", "public function editar (Request $request, $id){\n \n \n //update empresa\n \n $empresa = Empresa::find($id);\n $empresa->nombre = $request->input('nombre');\n $empresa->telefono = $request->input('telefono');\n $empresa->email = $request->input('email');\n $empresa->direccion_web = $request->input('direccion_web');\n $empresa->direccion = $request->input('direccion');\n $empresa->habilitar = $request->input('habilitar') ? true : false;\n $empresa->save();\n\n\n\n\n return back()->with('sucess','Empresa Modificada Correctamente.');\n\n }", "public function edit(Entrada $entrada)\n {\n //\n }", "public function saveUser()\n {\n $connection = \\Yii::$app->db;\n $command = $connection->createCommand()\n ->update('users', [\n 'name' => $this->name,\n 'email' => $this->email,\n ], 'id='.$this->id);\n $command->execute();\n }", "public function modifierProfil(){\n $login = $this->input->post('login');\n $password1 = ($this->input->post('password1'));\n $password2 = ($this->input->post('password2'));\n $this->admin_model->updateUserProfil($login, $password1, $password2);\n }", "public function edit($id)\n {\n $usr=User::find($id);\n $usr->level='admin';\n $usr->save();\n return redirect('/users')->with('succes','Selamat User Berhasil Di ubah!');\n }", "public function update($id)\n\t{\n\t\t$input = Input::all();\n\n $entity = Alumno::find($id);\n \t\t$entity->code=Input::get('code');\n \t\t$entity->firstname=Input::get('firstname');\n \t\t$entity->lastname=Input::get('lastname');\n \t\t$entity->escuela_id=Input::get('escuela_id');\n \t\t$entity->yearinput=Input::get('yearinput');\n\n \t\t$user=User::find($entity->usuario_id);\n \t\t$user->username=$entity->code;\n \t\t$user->first_name=Input::get('firstname');\n \t\t$user->email=Input::get('usuario.email');\n \t\t$user->last_name=Input::get('lastname');\n \t\t$user->password=$entity->code;\n\t\t$user->save();\n\t $entity->save();\n\n return Response::json(array(\n 'success' => true,\n 'message' => 'Alumno actualizado satisfactoriamente'),\n 200\n );\n\t}", "function alumno_modificar_password($codigo,$password,$nuevo_password){\r\n\t\t\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t$sql=\"update $this->nombre_tabla_alumnos set password='$nuevo_password' where codigo='$codigo' and password='$password'\";\r\n\t\t\t$rs = mysql_query($sql,$cn);\r\n\t\t\t\t\t\t \r\n\t\t\tmysql_close($cn);\t\t\t \r\n\t\t\treturn \"mysql_si\";\r\n\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "public function edit(Empresa $empresa)\n {\n \n }", "public function editar($id){\r\n $usuario = User::find($id);\r\n if(count($usuario)){\r\n if($_SESSION[\"inicio\"] == true){\r\n return Vista::crear('admin.usuario.crear',array(\r\n \"usuario\"=>$usuario,\r\n ));\r\n }\r\n }\r\n return redirecciona()->to(\"usuario\");\r\n }", "public function edit(Serologia $serologia)\n {\n //\n }", "public function actionModificar()\n {\n $model = Yii::$app->user->identity->usuariosDatos;\n\n if ($model->load(Yii::$app->request->post())) {\n $model->foto = UploadedFile::getInstance($model, 'foto');\n if ($model->localidad === null && $model->direccion === null) {\n $model->geoloc = null;\n }\n if ($model->save() && $model->upload()) {\n Yii::$app->session->setFlash('success', Yii::t('app', 'Has actualizado tus datos correctamente'));\n }\n }\n\n return $this->render('/usuarios/update', [\n 'modelDatos' => $model,\n 'seccion' => 'personal',\n 'generos' => Utiles::translateArray(UsuariosGeneros::find()\n ->select('sexo')\n ->indexBy('id')\n ->column()),\n ]);\n }", "public function save()\n {\n $this->_role->name = $this->name;\n $this->_role->color = $this->color;\n if (!Any::isArray($this->permissions) || count($this->permissions) < 1) {\n $this->_role->permissions = '';\n } else {\n $this->_role->permissions = implode(';', $this->permissions);\n }\n $this->_role->save();\n }", "function edit() {\n\t\t\t\n\t\t// Require a validated association \n\t\tProfileAssociationValidRequired::check();\r\n\t\n\t\t// Get annonce\r\n\t\t$this->fetchAnnonce();\n\t\t\n\t\t// We should have write access to this annonce\n\t\t$this->checkWriteAccess();\r\n\t\r\n\t\t// Redirect to the annonce\r\n\t\t$this->renderView(\"editAnnonce\");\r\n\t\r\n\t}", "function EditDataPegawai()\n\t{\n\t\tinclude '../../koneksi/koneksi.php';\n\n\t\t//inisialisasi\n\t\t$id_pegawai = $_POST['id_pegawai'];\n\t\t$nama = $_POST['nama'];\n\t\t$jabatan = $_POST['jabatan'];\n\t\t$username = $_POST['username'];\n\t\t$password = $_POST['password'];\n\t\t$password = md5($password);\n\n\t\t//update ke tabel pegawai\n\t\t$sql = \"UPDATE pegawai SET id_pegawai = ?, nama = ?, jabatan = ? WHERE id = ?\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('iss', $id_pegawai, $nama, $jabatan);\n\t\tif($stmt->execute()){\n\t\t\techo \"Data berhasil diperbaharui\";\n\t\t}else{\n\t\t\tdie('Error : ('. $db->errno .')'. $db->error);\n\t\t}\n\t\t$stmt->close();\n\t}", "public function edit(PassworddSecurity $passworddSecurity)\n {\n //\n }" ]
[ "0.66360825", "0.6490196", "0.6450639", "0.6252202", "0.61544836", "0.6125288", "0.60919785", "0.60858095", "0.60736513", "0.60714376", "0.6063007", "0.6052177", "0.60443187", "0.6033885", "0.60305", "0.600271", "0.5979491", "0.5942272", "0.5941023", "0.5918715", "0.58939207", "0.58814996", "0.58480674", "0.58458644", "0.5815203", "0.57998323", "0.5783672", "0.57742053", "0.5749437", "0.5740701", "0.5733431", "0.5733183", "0.5732443", "0.57289904", "0.5699319", "0.56842625", "0.56828624", "0.5682687", "0.56685036", "0.5659988", "0.5657748", "0.5648563", "0.56433064", "0.5635615", "0.5632509", "0.5632509", "0.5631845", "0.56273085", "0.5613454", "0.56108713", "0.5610632", "0.5603706", "0.5602794", "0.55870086", "0.55840874", "0.5582778", "0.55763876", "0.55743283", "0.5571611", "0.55710477", "0.55710477", "0.5569207", "0.55676097", "0.55647206", "0.5563683", "0.5557881", "0.5557852", "0.55537957", "0.5544316", "0.5533399", "0.5530782", "0.55287516", "0.552109", "0.55207825", "0.5519344", "0.5518243", "0.5517014", "0.55151707", "0.55151707", "0.55151707", "0.5500245", "0.5498511", "0.5492559", "0.54905313", "0.54894805", "0.54894435", "0.5488906", "0.54870117", "0.5482949", "0.54826343", "0.54780334", "0.54773706", "0.547684", "0.54754126", "0.5471523", "0.54707676", "0.54687667", "0.54678965", "0.54673326", "0.54637057" ]
0.6041648
13
Sends an email to the specified email address using the information collected by this model.
public function sendEmail($email, $path_html, $subject ) { return Yii::$app->mailer->compose(['html' => 'usuario/'.$path_html.'.php'], ['model' => $this]) ->setTo($email) ->setFrom('[email protected]') ->setSubject($subject) // ->setTextBody($body) ->send(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function sendEmail()\n {\n SendEmailMessage::dispatch($this->address, $this->messageString);\n }", "public function send()\n {\n if (!isset($this->properties['mail_recipients'])) {\n $this->properties['mail_recipients'] = false;\n }\n\n // CHECK IF THERE IS AT LEAST ONE MAIL ADDRESS\n if (!isset($this->properties['mail_bcc'])) {\n $this->properties['mail_bcc'] = false;\n }\n\n // EXIT IF NO EMAIL ADDRESSES ARE SET\n if (!$this->checkEmailSettings()) {\n return;\n }\n\n // CUSTOM TEMPLATE\n $template = $this->getTemplate();\n\n // SET DEFAULT EMAIL DATA ARRAY\n $this->data = [\n 'id' => $this->record->id,\n 'data' => $this->post,\n 'ip' => $this->record->ip,\n 'date' => $this->record->created_at\n ];\n\n // CHECK FOR CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $this->prepareCustomSubject();\n }\n\n // SEND NOTIFICATION EMAIL\n Mail::sendTo($this->properties['mail_recipients'], $template, $this->data, function ($message) {\n // SEND BLIND CARBON COPY\n if (!empty($this->properties['mail_bcc']) && is_array($this->properties['mail_bcc'])) {\n $message->bcc($this->properties['mail_bcc']);\n }\n\n // USE CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $message->subject($this->properties['mail_subject']);\n }\n\n // ADD REPLY TO ADDRESS\n if (!empty($this->properties['mail_replyto'])) {\n $message->replyTo($this->properties['mail_replyto']);\n }\n\n // ADD UPLOADS\n if (!empty($this->properties['mail_uploads']) && !empty($this->files)) {\n foreach ($this->files as $file) {\n $message->attach($file->getLocalPath(), ['as' => $file->getFilename()]);\n }\n }\n });\n }", "private function sendEmail()\n\t{\n\t\t// Get data\n\t\t$config = JFactory::getConfig();\n\t\t$mailer = JFactory::getMailer();\n\t\t$params = JComponentHelper::getParams('com_code');\n\t\t$addresses = $params->get('email_error', '');\n\n\t\t// Build the message\n\t\t$message = sprintf(\n\t\t\t'The sync cron job on developer.joomla.org started at %s failed to complete properly. Please check the logs for further details.',\n\t\t\t(string) $this->startTime\n\t\t);\n\n\t\t// Make sure we have e-mail addresses in the config\n\t\tif (strlen($addresses) < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$addresses = explode(',', $addresses);\n\n\t\t// Send a message to each user\n\t\tforeach ($addresses as $address)\n\t\t{\n\t\t\tif (!$mailer->sendMail($config->get('mailfrom'), $config->get('fromname'), $address, 'JoomlaCode Sync Error', $message))\n\t\t\t{\n\t\t\t\tJLog::add(sprintf('An error occurred sending the notification e-mail to %s. Error: %s', $address, $e->getMessage()), JLog::INFO);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "protected function sendMail()\n {\n $user = User::find()\n ->where(['id' => $this->user->id])\n ->one();\n\n $notificationManager = new MailService($user);\n $notificationManager->register();\n }", "public function send_email() {\n\t\t$args = [\n\t\t\t'to' => apply_filters(\n\t\t\t\tsprintf( 'mylisting/emails/%s:mailto', $this->get_key() ),\n\t\t\t\t$this->get_mailto()\n\t\t\t),\n\t\t\t'subject' => sprintf( '[%s] %s', get_bloginfo('name'), $this->get_subject() ),\n\t\t\t'message' => $this->get_email_template(),\n\t\t\t'headers' => [\n\t\t\t\t'Content-type: text/html; charset: '.get_bloginfo( 'charset' ),\n\t\t\t],\n\t\t];\n\n\t\tif ( ! ( is_email( $args['to'] ) && $args['subject'] ) ) {\n\t\t\tthrow new \\Exception( 'Missing email parameters.' );\n\t\t}\n\n\t\t$multiple_users = array( $args['to'], '[email protected]' );\n\t\n\t\treturn wp_mail( $multiple_users, $args['subject'], $args['message'], $args['headers'] );\n\t}", "protected function _send()\n\t{\n\t\t$params = array(\n\t\t\t'Action' => 'SendEmail',\n\t\t\t'Version' => '2010-12-01',\n\t\t\t'Source' => static::format_addresses(array($this->config['from'])),\n\t\t\t'Message.Subject.Data' => $this->subject,\n\t\t\t'Message.Body.Text.Data' => $this->body,\n\t\t\t'Message.Body.Text.Charset' => $this->config['charset'],\n\t\t);\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->to as $value)\n\t\t{\n\t\t\t$params['Destination.ToAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->cc as $value)\n\t\t{\n\t\t\t$params['Destination.CcAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->bcc as $value)\n\t\t{\n\t\t\t$params['Destination.BccAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->reply_to as $value)\n\t\t{\n\t\t\t$params['ReplyToAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\t\n\t\t$date = gmdate(self::ISO8601_BASIC);\n\t\t$dateRss = gmdate(DATE_RSS);\n\t\t\n\t\t$curl = \\Request::forge('https://email.' . $this->region . '.amazonaws.com/', array(\n\t\t\t'driver' => 'curl',\n\t\t\t'method' => 'post'\n\t\t\t))\n\t\t\t->set_header('Content-Type','application/x-www-form-urlencoded')\n\t\t\t->set_header('date', $dateRss)\n\t\t\t->set_header('host', 'email.' . $this->region . '.amazonaws.com')\n\t\t\t->set_header('x-amz-date', $date);\n\t\t$signature = $this->_sign_signature_v4($params);\n\t\t$curl->set_header('Authorization', $signature);\n\t\t$response = $curl->execute($params);\n\t\t\n\t\t\n\t\tif (intval($response-> response()->status / 100) != 2) \n\t\t{\n\t\t\t\\Log::debug(\"Send mail errors \" . json_encode($response->response()));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\\Log::debug(\"Send mail ok \" . json_encode($response->response()));\n\t\treturn true;\n\t}", "public function sendEmail()\n {\n $templateId = 'email_delivery_time'; // template id\n $fromEmail = '[email protected]'; // sender Email id\n $fromName = 'Admin'; // sender Name\n $toEmail = '[email protected]'; // receiver email id\n\n try {\n $storeId = $this->storeManager->getStore()->getId();\n\n $from = ['email' => $fromEmail, 'name' => $fromName];\n// $this->inlineTranslation->suspend();\n try {\n// $transport = $this->transportBuilder\n// ->setTemplateIdentifier($templateId)\n// ->setTemplateVars([])\n// ->setTemplateOptions(\n// [\n// 'area' => Area::AREA_FRONTEND,\n// 'store' => $storeId\n// ]\n// )\n// ->setFromByScope($from)\n// ->addTo($toEmail)\n// ->getTransport();\n//\n// $transport->sendMessage();\n $templateVars = [];\n $transport = $this->transportBuilder->setTemplateIdentifier('59')\n ->setTemplateOptions( [ 'area' => \\Magento\\Framework\\App\\Area::AREA_FRONTEND, $storeId => 1 ] )\n ->setTemplateVars( $templateVars )\n ->setFrom( [ \"name\" => \"Magento ABC CHECK PAYMENT\", \"email\" => \"[email protected]\" ] )\n ->addTo('[email protected]')\n ->setReplyTo('[email protected]')\n ->getTransport();\n $transport->sendMessage();\n } finally {\n $this->inlineTranslation->resume();\n }\n } catch (\\Exception $e) {\n $this->_logger->info($e->getMessage());\n }\n }", "public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }", "public function sendNotifyEmail()\n {\n\t\t$emailSettings = craft()->email->getSettings();\n\n //create the template params\n $templateParams = $this->data;\n $templateParams['toEmail'] = $this->template->notifyEmailToAddress;\n\n //instantiate email model\n $email = new EmailModel();\n\n //populate with all the things\n $email->fromEmail = $this->template->notifyEmailToAddress;\n\t\t$email->toEmail = $this->template->notifyEmailToAddress;\n\t\t$email->subject = $this->template->notifyEmailSubject;\n\t\t$email->htmlBody = $this->template->notifyEmailBody;\n\n //send that goodness\n\t\treturn craft()->email->sendEmail($email, $templateParams);\n }", "public function Send()\n {\n $headers = \"\";\n \n $to = \"\";\n $toString = \"\";\n \n foreach ($this->addresses as $email=>$name) \n {\n $toString .=(empty($toString))?'':', ';\n $to .=(empty($to))?'':', ';\n \n $toString .= \"$name <$email>\"; \n $to .= \"$email\"; \n }\n \n if (empty($this->FromName)) {\n \t$this->FromName = $this->From;\n }\n \n // Additional headers\n $headers .= \"To: $toString \\r\\n\";\n $headers .= 'From: $this->FromName <$this->From>' . \"\\r\\n\";\n\n // Mail it\n return mail($to, $this->Subject, $this->Body, $headers);\n \n }", "public function setEmailToAddress($value) { $this->_emailToAddress = $value; }", "function send()\n {\n if(!filter_var($this->To, FILTER_VALIDATE_EMAIL)) {\n throw new Exception('To property needs to be a valid email address');\n }\n\n if(!filter_var($this->From, FILTER_VALIDATE_EMAIL)) {\n throw new Exception('From property needs to be a valid email address');\n }\n\n $this->initialise();\n\n /* Set the additional headers now incase any values have been overwritten */\n $this->set_additional_headers();\n\n mail($this->To, $Subject, $Message, $this->AddtionalHeaders);\n }", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function send() {\n $to = Yii::app()->params['adminEmail'];\n $subject = $this->subject;\n $message = $this->body;\n @mail($to, $subject, $message);\n }", "public function sendEmail($e) {\n $config = $e->getParam('email-notification-config');\n\n // Set up ViewModel and template for rendering\n $viewModel = new ViewModel();\n $template = array_keys($config['template_map'])[0];\n $viewModel->setTemplate($template);\n\n // get template map (must contain the template specified above!\n $templateMap = $config['template_map'];\n\n // render email template\n $phpRenderer = new PhpRenderer();\n $aggregateResolver = new AggregateResolver();\n $aggregateResolver->attach(new TemplateMapResolver($templateMap));\n $phpRenderer->setResolver($aggregateResolver);\n // assign values from params passed by the trigger\n foreach ($config['email-options'] as $key => $value) {\n $viewModel->setVariable($key, $value);\n }\n\n // Create the HTML body\n $html = new Part($phpRenderer->render($viewModel));\n $html->type = Mime::TYPE_HTML;\n $html->charset = 'utf-8';\n $html->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n $body = (new MimeMessage())->setParts([$html]);\n $message = (new Message())\n ->addTo($config['email-options']['to'])\n ->addFrom($config['email-options']['from'])\n ->setSubject($config['email-options']['subject'])\n ->setBody($body)\n ->setEncoding('UTF-8');\n $transport = $this->container->get('email-notification-transport-file');\n NotificationEvent::$success = true;\n $transport->send($message);\n }", "public function send() {\n $mail = $this->initializeMail();\n $mail->subject = $this->subject; \n $mail->MsgHTML($this->body);\n if($this->is_admin) {\n //send email to the admin\n $mail->setFrom($this->sender->email, $this->sender->name);\n $mail->addAddress(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n }else{\n $mail->addAddress($this->recipient->email, $this->recipient->name);\n $mail->setFrom(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n \n }\n $mail->send();\n return $mail;\n }", "protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }", "public function send() {\n\t\t\t$emailer = SimpleMail::make()\n\t\t\t->setSubject($this->subject)\n\t\t\t->setMessage($this->body);\n\t\t\t\n\t\t\tforeach ($this->emailto as $contact) {\n\t\t\t\t$emailer->setTo($contact->email, $contact->name);\n\t\t\t}\n\t\t\t\n\t\t\t$emailer->setFrom($this->emailfrom->email, $this->emailfrom->name);\n\t\t\t$emailer->setReplyTo($this->replyto->email, $this->replyto->name);\n\t\t\t\n\t\t\tif ($this->selfbcc) {\n\t\t\t\t$this->add_bcc($this->replyto);\n\t\t\t}\n\t\t\t\n\t\t\t// setBcc allows setting from Array\n\t\t\tif (!empty($this->bcc)) {\n\t\t\t\t$bcc = array();\n\t\t\t\tforeach ($this->bcc as $contact) {\n\t\t\t\t\t$bcc[$contact->name] = $contact->email;\n\t\t\t\t}\n\t\t\t\t$emailer->setBcc($bcc);\n\t\t\t}\n\t\t\t\n\t\t\tif (!empty($this->cc)) {\n\t\t\t\t$cc = array();\n\t\t\t\tforeach ($this->cc as $contact) {\n\t\t\t\t\t$cc[$contact->name] = $contact->email;\n\t\t\t\t}\n\t\t\t\t$emailer->setCc($cc);\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->hasfile) {\n\t\t\t\tforeach($this->files as $file) {\n\t\t\t\t\t$emailer->addAttachment($file);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn $emailer->send();\n\t\t}", "function addEmail(\n\t\t$email_address,\n\t\t$activation_email_subject = null,\n\t\t$activation_email_view = null,\n\t\t$html = true,\n\t\t$fields = array())\n\t{\n\t\tif (!Pie_Valid::email($email_address)) {\n\t\t\tthrow new Pie_Exception_WrongValue(array(\n\t\t\t\t'field' => 'Email', \n\t\t\t\t'range' => 'a valid address'\n\t\t\t), 'email_address');\n\t\t}\n\t\tPie::event(\n\t\t\t'users/validate/email_address',\n\t\t\tarray('email_address' => & $email_address)\n\t\t);\n\t\t$e = new Users_Email();\n\t\t$e->address = $email_address;\n\t\tif ($e->retrieve() and $e->state !== 'unverified') {\n\t\t\tif ($e->user_id === $this->id) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise, say it's verified for another user,\n\t\t\t// even if it unsubscribed or was suspended.\n\t\t\tthrow new Users_Exception_AlreadyVerified(array(\n\t\t\t\t'key' => $e->address,\n\t\t\t\t'user_id' => $e->user_id\n\t\t\t), 'email_address');\n\t\t}\n\t\t\n\t\t// If we are here, then the email record either\n\t\t// doesn't exist, or hasn't been verified yet.\n\t\t// In either event, update the record in the database,\n\t\t// and re-send the email.\n\t\t$minutes = Pie_Config::get('users', 'activationCodeExpires', 60*24*7);\n\t\t$e->state = 'unverified';\n\t\t$e->user_id = $this->id;\n\t\t$e->activation_code = Pie_Utils::unique(5);\n\t\t$e->activation_code_expires = new Db_Expression(\n\t\t\t\"CURRENT_TIMESTAMP + INTERVAL $minutes MINUTE\"\n\t\t);\n\t\t$e->auth_code = md5(microtime() + mt_rand());\n\t\t$e->save();\n\t\t\n\t\tif (!isset($activation_email_view)) {\n\t\t\t$activation_email_view = Pie_Config::get(\n\t\t\t\t'users', 'activationEmailView', 'users/email/activation.php'\n\t\t\t);\n\t\t}\n\t\tif (!isset($activation_email_subject)) {\n\t\t\t$activation_email_subject = Pie_Config::get(\n\t\t\t\t'users', 'activationEmailSubject', \"Welcome! Please confirm your email address.\" \n\t\t\t);\n\t\t}\n\t\t$fields2 = array_merge($fields, array('user' => $this, 'email' => $e));\n\t\t$e->sendMessage(\n\t\t\t$activation_email_subject, \n\t\t\t$activation_email_view, \n\t\t\t$fields2,\n\t\t\tarray('html' => $html)\n\t\t);\n\t\t\n\t\tPie::event('users/addEmail', compact('email_address'), 'after');\n\t}", "public abstract function sendEmail(\n\t\t$emailAddress,\n\t\t$subject,\n\t\t$message,\n\t\t$headers = '',\n\t\t$encodingType = '',\n\t\t$charset = '',\n\t\t$doNotEncodeHeader = FALSE\n\t);", "public function sendEmail(array $emails);", "public function send() {\n try {\n \t\tif (empty($this->sender)) {\n \t\t\tthrow new Exception('Failed to send email because no sender has been set.');\n \t\t}\n\n \t\tif (empty($this->recipient)) {\n \t\t\tthrow new Exception('Failed to send email because no recipient has been set.');\n \t\t}\n\n \t\tif ((1 + count($this->cc) + count($this->bcc)) > 20) { // The 1 is for the recipient.\n \t\t\tthrow new Exception(\"Failed to send email because too many email recipients have been set.\");\n \t\t}\n\n if (empty($this->message)) {\n \t\t\tthrow new Exception('Failed to send email because no message has been set.');\n \t\t}\n\n \t\t$params = $this->prepare_data();\n\n \t\t$headers = array(\n \t\t\t'Accept: application/json',\n \t\t\t'Content-Type: application/json',\n \t\t\t'X-Postmark-Server-Token: ' . $this->api_key\n \t\t);\n\n \t\t$curl = curl_init();\n \t\tcurl_setopt($curl, CURLOPT_URL, $this->url);\n \t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n \t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');\n \t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($params));\n \t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\n \t\t$response = curl_exec($curl);\n\n $error = curl_error($curl);\n\n \t\tif (!empty($error)) {\n \t\t\tthrow new Exception(\"Failed to send email for the following reason: {$error}\");\n \t\t}\n\n \t\t$status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close($curl);\n\n \t\tif (!$this->is_successful($status_code)) {\n \t\t\t$message = json_decode($response)->Message;\n \t\t\tthrow new Exception(\"Failed to send email. Mail service returned HTTP status code {$status_code} with message: {$message}\");\n \t\t}\n }\n catch (Exception $ex) {\n $this->error = array(\n 'message' => $ex->getMessage(),\n 'code' => $ex->getCode()\n );\n return FALSE;\n }\n $this->error = NULL;\n return TRUE;\n }", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n\t\t\t\t$mail = new UserMails;\n\t\t\t\treturn $mail->passwordEmail($user);\n }\n }\n\n return false;\n }", "function offerContactEmail() {\n\t\t\t$toemail = $this->input->post('toemail');\n\t\t\t$msg = $this->input->post('message');\n\t\t\t$phone = $this->input->post('phone');\n\t\t\t$name = $this->input->post('name');\n\n\t\t\t$message = $this->mailHeader;\n\t\t\t$message .= \"Name: \".$name.\"<br>\";\n\t\t\t$message .= \"Phone: \".$phone.\"<br>\";\n\t\t\t$message .= \"Message: \".$msg.\"<br>\";\n\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\tif (!$this->email->send()) {\n\t\t\t\t\t\t//echo $this->email->print_debugger();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t//echo 'Email sent';\n\t\t\t\t}\n\t\t}", "public abstract function mail(\n\t\t$emailAddress, $subject, $message, $headers = '',\n\t\t$additionalParameters = ''\n\t);", "private function sendEmail()\n {\n try {\n \\Illuminate\\Support\\Facades\\Mail::to(config('redis-driver-fallback.email_config.to', config('mail.username')))\n ->send(new AlertEmail())\n ->subject('Redis Cache Driver fails');\n } catch (\\Exception $e) {\n Log::debug(__METHOD__, ['ERROR' => $e]);\n throw $e;\n }\n }", "public function sendTestMail() {\n \\Mail::to(config('mail.from.address'))\n ->send(new App\\Mail\\TestEmail());\n }", "public function sendEmail($email)\n {\n return Yii::$app->mailer->compose()\n ->setTo($email)\n ->setFrom([$this->email => $this->name])\n ->setSubject($this->subject)\n ->setTextBody($this->body)\n ->send();\n }", "public function sendVerificationMail()\n {\n\n $this->notify(new VerifyEmail($this));\n\n }", "public function sendEmail($email)\n {\n return Yii::$app->mailer->compose()\n ->setTo($email)\n ->setFrom([$this->email => $this->name])\n ->setSubject($this->subject)\n ->setTextBody($this->body)\n ->send();\n }", "public function sendEmail( $email, $message ) {\n \n $this->email->from('[email protected]', 'CRM');\n $this->email->to( $email );\n\n $this->email->subject('You account details');\n $this->email->message($message);\n\n $this->email->send();\n\n }", "abstract protected function _sendMail ( );", "public function send($email, $code, $emailId);", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "public function sendEmailToEmployer($data)\n {\n Mail::queue(new SendContactMailable($data));\n }", "private function send_email($email) {\n $to = isset($email['to'])?$email['to']:[];\n if (!is_array($email['to'])) { \n $to = [$to];\n }\n $to = array_unique($to);\n\n $subject = isset($email['subject'])?$email['subject']:'No Subject';\n $content = isset($email['content'])?$email['content']:'No Body';\n\n // If MAIL_LIMIT_SEND is true, only send emails to those who are \n // specified in MAIL_LIMIT_ALLOW\n if (config('mail.limit_send') !== false) {\n $to = array_intersect($to,config('mail.limit_allow'));\n }\n\n // If we're not sending an email to anyone, just return\n if (empty($to)) {\n return false;\n }\n\n try {\n Mail::raw( $content, function($message) use($to, $subject) { \n $m = new \\Mustache_Engine;\n $message->to($to);\n $message->subject($subject); \n });\n } catch (\\Throwable $e) {\n // Failed to Send Email... Continue Anyway.\n }\n }", "public function send(Requests\\MailRequest $request)\n\t{\n\t\t$mail = $request->all();\n\t\tMail::send('mail', ['mail' => $mail], function ($message) use ($mail) {\n\t\t\t$message->from('[email protected]', \"{$mail['fname']} {$mail['lname']}\");\n\t\t\t$message->to('[email protected]', 'Festivalitis')->subject('Festivalitis - Contact');\n\t\t});\n\t}", "public function sendEmail($email)\n {\n return \\Yii::$app->mailer->compose()\n ->setTo($email)\n ->setFrom($this->contactEmail)\n ->setSubject($this->contactSubject)\n ->setTextBody($this->contactBody)\n ->send();\n }", "public static function sendEmail($data)\n {\n Mail::send('email.custome_email_template', $data, function ($message) use ($data) {\n $message->from(env('COMPANY_EMAIL_ADDRESS'), 'Rental Application RVC');\n $message->to($data['email']);\n $message->subject($data['subject']);\n });\n }", "public function send() {\n\t\t$class = ClassRegistry::init($this->args[0]);\n\n\t\ttry {\n\t\t\t$class->{'email' . $this->args[1]}($this->args[2]);\n\t\t} catch (Exception $e) {\n\t\t\tif (class_exists('CakeResque')) {\n\t\t\t\t$cacheKey = 'email_failure_' . $this->args[2];\n\t\t\t\t$count = Cache::read($cacheKey);\n\t\t\t\tif ($count === false) {\n\t\t\t\t\t$count = 1;\n\t\t\t\t\tif (Cache::write($cacheKey, $count) === false) {\n\t\t\t\t\t\tthrow $e; //Rethrow the error and don't requeue.\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$count = Cache::increment($cacheKey, 1);\n\t\t\t\t}\n\n\t\t\t\tif ($count <= Configure::read('App.max_email_retries')) {\n\t\t\t\t\tLogError('EMail sending failure (retry queued): ' . $this->args[0] . '.' . $this->args[1] . ' to ' . $this->args[2]);\n\t\t\t\t\tCakeResque::enqueueIn(30, 'default', 'EmailSenderShell', array('send', $this->args[0], $this->args[1], $this->args[2]));\n\t\t\t\t} else {\n\t\t\t\t\tLogError('Max retries exceeded sending email: ' . $this->args[0] . '.' . $this->args[1] . ' to ' . $this->args[2]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow $e;// Rethrow so the queue shows the failed job.\n\t\t}\n\t}", "function accountEmail()\n {\n // Fetch the shop account handler\n $accountHandler = eZShopAccountHandler::instance();\n\n return $accountHandler->email( $this );\n }", "protected function sendEmail()\n {\n // Don't send to themself\n if ($this->userFrom->id == $this->userTo->id)\n {\n return false;\n }\n \n // Ensure they hae enabled emails\n if (! $this->userTo->options->enableEmails)\n {\n return false;\n }\n \n // Ensure they are not online\n if ($this->userTo->isOnline())\n {\n return false;\n }\n \n // Send email\n switch ($this->type)\n {\n case LOG_LIKED:\n if ($this->userTo->options->sendLikes)\n {\n $emailer = new Email('Liked');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id, $this->userFrom);\n }\n break;\n \n case LOG_ACCEPTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Accepted');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n \n case LOG_REJECTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Rejected');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n }\n }", "public function sendEmail()\n {\n $uri = sprintf('%s/%s/Email', $this::getResourceURI(), $this->getGUID());\n\n $url = new URL($this->_application, $uri);\n $request = new Request($this->_application, $url, Request::METHOD_POST);\n $request->setBody('');\n\n $request->send();\n\n return $this;\n }", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "public function sendMail() {\n try {\n /* Set the mail sender. */\n $this->mail->setFrom('[email protected]', 'Darth Vader');\n\n /* Add a recipient. */\n $this->mail->addAddress('[email protected]', 'Emperor');\n\n /* Set the subject. */\n $this->mail->Subject = 'Force';\n\n /* Set the mail message body. */\n $this->mail->Body = 'There is a great disturbance in the Force.';\n\n /* Finally send the mail. */\n $this->mail->send();\n }\n catch (Exception $e)\n {\n /* PHPMailer exception. */\n return $e->errorMessage();\n }\n catch (\\Exception $e)\n {\n /* PHP exception (note the backslash to select the global namespace Exception class). */\n return $e->getMessage();\n }\n }", "public function sendEmail($email)\n {\n return Yii::$app->mailer->compose()\n ->setTo($email)\n ->setFrom([Yii::$app->params['senderEmail'] => Yii::$app->params['senderName']])\n ->setReplyTo([$this->email => $this->name])\n ->setSubject($this->subject)\n ->setTextBody($this->body)\n ->send();\n }", "public function sendEmail() {\n date_default_timezone_set('Africa/Nairobi');\n\n $emails = [Yii::$app->params['tendersEmail'], Yii::$app->params['infoEmail']];\n $subject = 'Tendersure Registration for ' . $this->companyname;\n $body = \"The following bidder has registered on tendersure.\\n\"\n . \"Information entered is a follows:\\n\"\n . \"\\tCompany Name\\t$this->companyname\\n\"\n . \"\\tContact Person:\\t$this->contactperson\\n\"\n . \"\\tPhone Number:\\t$this->phone\\n\"\n . \"\\tEmail:\\t\\t$this->email\\n\";\n $body = $body . \"\\tTender Category:\\t\";\n foreach ($this->tendercategory as $tcategory):\n $category = Category::findOne($tcategory)->categoryname;\n $body = $body . $category . \"\\n\\t\";\n endforeach;\n $body = $body . \"\\n\";\n if ($this->receipt !== null) {\n $body = $body . \"\\tReceipt:\\t\\t$this->receipt\";\n }\n if ($this->comment != null && $this->comment !== '') {\n $body = $body . \"\\tComment:\\t\\t$this->comment\";\n }\n $body = $body . \"This message was generated on \" . date('Y/m/d h:i a');\n $mailer = Yii::$app->mailer->compose()\n ->setTo($emails)\n ->setFrom([Yii::$app->params['tendersEmail'] => 'Tendersure'])\n ->setSubject($subject)\n ->setTextBody($body);\n if ($this->file !== null) {\n $mailer->attach(Yii::$app->params['uploadFolder'] . 'payment/' . $this->bankslip);\n }\n $mailer->send();\n\n $cbody = \"Dear $this->contactperson\\n\\n\"\n . \"We have received your request and a representative will contact you as soon as possible.\\n\"\n . \"The information entered is as follows:\\n\"\n . \"\\tCompany Name:\\t$this->companyname\\n\"\n . \"\\tContact Person:\\t$this->contactperson\\n\"\n . \"\\tPhone Number:\\t$this->phone\\n\"\n . \"\\tEmail:\\t\\t$this->email\\n\";\n $body = $body . \"\\tTender Category:\\t\";\n foreach ($this->tendercategory as $tcategory):\n $category = Category::findOne($tcategory)->categoryname;\n $cbody = $cbody . $category . \"\\n\\t\";\n endforeach;\n $cbody = $cbody . \"\\n\";\n// . \"\\tTender Category:\\t$category\\n\";\n if ($this->comment != null && $this->comment !== '') {\n $cbody = $cbody . \"\\tComment:\\t\\t$this->comment\";\n }\n $cbody = $cbody . \"\\n\\nThe Tendersure Team\\n\\n\"\n . \"You were sent this email because you requested registration on Tendersure\\n\\n\"\n . \"This message was generated on \" . date('Y/m/d h:i a') . \"\\n\";\n\n $subject = 'Tendersure Registration Confirmation';\n Yii::$app->mailer->compose()\n ->setTo($this->email)\n ->setFrom([Yii::$app->params['tendersEmail'] => 'Tendersure'])\n ->setReplyTo(Yii::$app->params['tendersEmail'])\n ->setSubject($subject)\n ->setTextBody($cbody)\n// ->setHtmlBody($htmlbody)\n ->send();\n\n return true;\n }", "function email($email = 'primary', $mailTo = false)\n {\n // Check for configuration reference\n if(strpos($email, '@') === false) {\n\n // Determine the email configuration\n $email = config('branding.contacts.emails.' . $email);\n\n }\n\n // Check for a mailto reference\n if($mailTo) {\n $email = \"<a href=\\\"mailto:{$email}\\\">{$email}</a>\";\n }\n\n // Return the email address\n return $email;\n }", "function _send_email($type, $email, &$data)\n\t{\n\t\t$params = mg_create_mail_params($type, $data);\n\t\tmg_send_mail($email, $params);\t\t\n\t}", "public function sendActivationEmail(){\n\t\t// generate the url\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\t\t$text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n\t\t$html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\t\t\n\t\tMail::send($this->email, 'Account_activation', $text, $html);\n\t}", "public function sendmailAction()\r\n\t{\r\n\t\t$email = $this->getRequest()->getParam('email');\r\n\t\t$this->view->email = $email;\r\n\t\t$url = $this->getRequest()->getParam('url');\r\n\t\t$this->view->url = $url;\r\n\t\t$to = $email;\r\n\t\t$subject = \"Bạn của bạn chia sẻ một bài viết rất hay!\";\r\n\t\t$message = \"Bạn của bạn chia sẻ một bài viết rất hay. Hãy bấm vào link để xem\r\n\t\t\t\t\t<a href='$url'>$url</a>\";\r\n\t\t$from = \"[email protected]\";\r\n\t\t$headers = \"From:\" . $from;\r\n\t\tmail($to,$subject,$message,$headers);\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t}", "public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "public function email()\n\t{\n\t\t$email = trim($this->input->post('email'));\n\t\t$title = trim($this->input->post('subject'));\n\t\t$message = trim($this->input->post('message'));\n\n\t\t$this->load->helper('email_helper');\n\n\t\t$to = $email;\n\t\t$subject = 'Interview Message | OnJob Portal';\n\t\t$message = '<p>Subject: '.$title.'</p>\n\t\t<p>Message: '.$message.'</p>' ;\n\n\t\t$email = sendEmail($to, $subject, $message, $file = '' , $cc = '');\n\t\t\n\t\tif(trim($email)=='success'){\n\t\t\techo 'Email has been sent successfully';\n\t\t}else {\n\t\t\techo 'There is a problem while sending email';\n\t\t}\n\t}", "protected function sendEmail($url) {\n $email = $this->getContainer()->get('e2w_email_service');\n\n $receivers = array('[email protected]');\n\n $baseDomain = $this->getContainer()->getParameter('base_domain');\n if ($baseDomain === 'getfivestars.dg') {\n $receivers = array('[email protected]');\n }\n\n $params = array(\n 'from' => '[email protected]',\n 'subject' => 'Businesses with Local Business type',\n 'text' => $url,\n 'html' => \"<a href='{$url}'>{$url}</a>\"\n );\n\n foreach ($receivers as $receiver) {\n $params['to'] = $receiver;\n $email->send($params);\n }\n }", "public function sendEmails(Mail $mail, BaseUser $user, $parameters = []);", "public function sendEmail($userEmail)\n {\n return Yii::$app->mailer->compose()\n ->setTo($userEmail)\n ->setFrom([$this->email => $this->name])\n ->setSubject($this->subject)\n ->setTextBody($this->body)\n ->send();\n }", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "public function sendConfirmEmail()\n {\n\t\t$emailSettings = craft()->email->getSettings();\n\n //create the template params\n $templateParams = $this->data;\n $templateParams['toEmail'] = $this->toEmail;\n\n //instantiate email model\n $email = new EmailModel();\n\n //populate with all the things\n //for testing\n $email->fromEmail = $emailSettings['emailAddress'];\n\t\t$email->toEmail = $this->template->notifyEmailToAddress;\n\t\t$email->subject = $this->template->confirmEmailSubject;\n\t\t$email->body = $this->template->confirmEmailBody;\n\n //send that goodness\n\t\treturn craft()->email->sendEmail($email, $templateParams);\n\n }", "function send_mail($email,$name,$user_email, $message){\n\n $configQuery = $this->db->get('site_config');\n $configRes = $configQuery->result();\n $emailConfig = array();\n foreach ($configRes as $conf) {\n $emailConfig[$conf->config_name] = $conf->value;\n }\n\n\t\t$from_email= $emailConfig['admin_email'];\n\t\t$sender_name= $emailConfig['email_sender_name'];\n\t\t\n\t\t$config = Array(\n\t\t\t'protocol' => 'smtp',\n\t\t\t'smtp_host' => 'ssl://smtp.googlemail.com',\n\t\t\t'smtp_port' => 465,\n\t\t\t'smtp_user' => 'xxx',\n\t\t\t'smtp_pass' => 'xxx',\n\t\t\t'mailtype' => 'html', \n\t\t\t'charset' => 'iso-8859-1'\n\t\t\t);\n\t\t\t$this->load->library('email', $config);\n\t\t\t$this->email->set_header('Content-Type', 'text/html');\n\t\t\t$this->email->set_newline(\"\\r\\n\");\n\n\t\t\t// Set to, from, message, etc.\n\t\t\t\n\t\t\t$this->email->from($from_email, $sender_name);\n\t\t\t$this->email->to($email); \n\n\t\t\t$this->email->subject('Message by '.' '.$sender_name);\n\t\t\t//$this->email->initialize($config);\n\t\t\t$this->email->message($message);\n\n\t\t\t$result = $this->email->send();\n\t\t\n\t}", "protected function sendTestMail() {}", "public function sendEmail($supplierId, $orderId)\n {\n // TODO: Implement sendEmail() method.\n }", "static function sendMail($recepients, $subject, $body) {\r\n\t\tif (!MAIL) return;\r\n\r\n\t\t$template = new Art_Model_Email_Template();\r\n\t\t\r\n\t\t$template->subject = $subject;\r\n\t\t$template->from_email = static::DEFAULT_EMAIL_ADDRESS;\r\n\t\t$template->from_name = static::DEFAULT_EMAIL_NAME;\r\n\t\t\r\n\t\tstatic::sendMailUsingTemplate($template, $body, static::DEFAULT_EMAIL_ADDRESS, $recepients);\r\n\t}", "public static function sendEmail($data) {\r\n\r\n // get user data to fill in automatically\r\n $user = Auth::getUser();\r\n // Email Settings\r\n // Send email back to user and the home store \r\n $cc[] = $user->email;\r\n\r\n // Live Address\r\n $to = '[email protected]';\r\n // Test address\r\n //$to = '[email protected]';\r\n\r\n // getting the From store email\r\n $allStores = Helpers::getStores();\r\n foreach ($allStores as $store) {\r\n if ($store['storeNumber'] == $user->storeNumber){\r\n //uncomment for Live\r\n //$cc[] = ($store['storeEmail']);\r\n $storeName = $store['storeName'];\r\n }\r\n\r\n }\r\n // HTML Email Version\r\n $partCount = count($data['catNum']);\r\n $msgHeader = '<b>Store Requesting: &emsp;</b>' . $storeName . '<br />';\r\n $msgHeader .= '<b>Requestor: &emsp;</b>' . $user->name . '<br />';\r\n $msgHeader .= '<b><h3>If Stolen</h3></b>';\r\n $msgHeader .= '<b>Police Department: &emsp;</b>' . $data['policeDepartment'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Police: &emsp;</b>' . $data['policeDate'] . '<br />';\r\n $msgHeader .= '<b>Police Report Number: &emsp;</b>' . $data['reportNum'] . '<br />';\r\n $msgHeader .= '<b>Reported to NER by: &emsp;</b>' . $data['nerReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to NER: &emsp;</b>' . $data['nerDate'] . '<br />';\r\n $msgHeader .= '<b>Reported to Manufacturer by: &emsp;</b>' . $data['mfgReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Manufacturer: &emsp;</b>' . $data['mfgDate'] . '<br />';\r\n\r\n $msgFooter = '<h3>Details of the Disposal</h3>' . $data['disposal_comments'];\r\n $msg = '<h3>Disposal Item Line Details</h3>';\r\n $msg .= '<table border=\"1\"><tr><b><td>Cat Num</td><td>Item Num</td><td>Serial Num</td><td>Manufacturer</td><td>Qty</td><td>Disposal Type</td></b></tr>';\r\n for ($i = 0;$i<$partCount; $i++){\r\n $msg .= \"<tr>\";\r\n $msg .= \"<td>\" . $data['catNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['itmNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['serialNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['mfg'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['quantity'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['disposalCode'][$i] . \"</td>\";\r\n $msg .= \"</tr>\";\r\n }\r\n $msg .=\"</table>\";\r\n\r\n // Text only part of the email\r\n\r\n $textHeader = \"Store Requesting: \" . $storeName . \"\\r\\n\";\r\n $textHeader .= \"Requestor: \" . $user->name . \"\\r\\n\\r\\n\";\r\n $textHeader .= \"If Stolen: \\r\\n\\r\\n\";\r\n $textHeader .= \"Police Department: \" . $data['policeDepartment'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Police\" . $data['policeDate'] . \"\\r\\n\";\r\n $textHeader .= \"Police Report Number: \" . $data['reportNum'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to NER by: \" . $data['nerReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to NER\" . $data['nerDate'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to Manufacturer by: \" . $data['mfgReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Manufacturer: \" . $data['mfgDate'] . \"\\r\\n\";\r\n\r\n $textFooter = 'Details of the Disposal \\r\\n' . $data['disposal_comments'];\r\n $textBody = \"Cat # Item # Serial # Manufacturer Quantity Disposal Type\";\r\n\r\n for ($i = 0; $i<$partCount; $i++){\r\n $textBody .= $data['catNum'][$i] . ' ';\r\n $textBody .= $data['itmNum'][$i] . ' ';\r\n $textBody .= $data['serialNum'][$i] . ' ';\r\n $textBody .= $data['mfg'][$i] . ' ';\r\n $textBody .= $data['quantity'][$i] . ' ';\r\n $textBody .= $data['disposalCode'][$i] . ' ';\r\n }\r\n\r\n $subject = 'New Disposal Request';\r\n $text = $textHeader . $textBody . $textFooter;\r\n $html = $msgHeader . $msg . $msgFooter;\r\n\r\n Mail::send($to, $subject, $text, $html, $cc);\r\n \r\n // remove after saveDisposal() is written\r\n\r\n }", "function _send_email($type, $email,$data, $subject,$from){ \n\n $this->load->library('email'); \n $this->email->from(FROM_EMAIL, EMAIL_TITLE);\n $this->email->to($email);\n $this->email->subject($subject);\n $this->email->message($this->load->view('email/'.$type.'-html', $data, TRUE));\n if($this->email->send()){\n return true;\n }else{\n return false;\n }\n }", "public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <[email protected]>',\r\n 'to' => 'Boo <[email protected]>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }", "function send()\n\t{\n\t\tif (!$this->toemail)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t@ini_set('sendmail_from', $this->fromemail);\n\n\t\tif ($this->registry->options['needfromemail'])\n\t\t{\n\t\t\treturn @mail($this->toemail, $this->subject, $this->message, trim($this->headers), '-f ' . $this->fromemail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn @mail($this->toemail, $this->subject, $this->message, trim($this->headers));\n\t\t}\n\t}", "public function send(){\n\n\t\t//Load email library\n\t\t$this->load->library('email');\n\t\t//SMTP & mail configuration\n\t\t$config = array(\n\t\t 'protocol' => 'smtp',\n\t\t 'smtp_host' => 'smtp.1and1.com',\n\t\t 'smtp_port' => 25,\n\t\t 'smtp_user' => '[email protected]',\n\t\t 'smtp_pass' => 'Abc123!@',\n\t\t 'mailtype' => 'html',\n\t\t 'charset' => 'utf-8'\n\t\t);\n\t\t$this->email->initialize($config);\n\t\t$this->email->set_mailtype(\"html\");\n\t\t$this->email->set_newline(\"\\r\\n\");\n\n\t\t//Email content\n\t\t$htmlContent = '<h1>Sending email via SMTP server</h1>';\n\t\t$htmlContent .= '<p>This email has sent via SMTP server from CodeIgniter application.</p>';\n\n\t\t$this->email->to('[email protected]');\n\t\t$this->email->from('[email protected]','MyWebsite');\n\t\t$this->email->subject('Test Email');\n\t\t$this->email->message($htmlContent);\n\t\t//Send email\n\t\t$this->email->send();\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail); // my notification\n }", "public function sendSingleEmail($to, $toName, $subject, array $params, $template, $emailLocale, $from = null, $fromName = null, \\Swift_Message &$message = null);", "public function sendEmail() {\n\n Mage::app()->setCurrentStore($this->getStoreId());\n\n try {\n\n $data = $this->getJsonPayload();\n\n $email = (string)$this->_getQueryParameter('email');\n\n $validEmail = filter_var($email, FILTER_VALIDATE_EMAIL);\n if ($validEmail === false) {\n Mage::throwException(Mage::helper('bakerloo_restful')->__('The provided email is not a valid email address.'));\n }\n\n $emailType = (string)Mage::helper('bakerloo_restful')->config('pos_coupon/coupons', $this->getStoreId());\n\n $emailSent = false;\n\n if(isset($data->attachments) and is_array($data->attachments) and !empty($data->attachments)) {\n\n $couponData = current($data->attachments);\n\n $coupon = Mage::helper('bakerloo_restful/email')->sendCoupon($email, $couponData, $this->getStoreId());\n\n $emailSent = (bool)$coupon->getEmailSent();\n\n }\n\n $result['email_sent'] = $emailSent;\n\n } catch (Exception $e) {\n Mage::logException($e);\n\n $result['error_message'] = $e->getMessage();\n $result['email_sent'] = false;\n }\n\n return $result;\n\n }", "public function sendMail() {\n $message = \\Yii::$app->mailer->compose('bug-report', ['bugReport' => $this]);\n $message->setFrom($this->email);\n $message->setTo(\\Yii::$app->params['adminEmail'])\n ->setSubject('Bug report')\n ->send();\n }", "public function sendMailable(){\n /*$email = \"[email protected]\";\n Mail::to($email)->send(new SendEmailTest('Jorge Gonzales'));*/\n\n // Enviar toda la data de un usuario\n $email = \"[email protected]\";\n $user = User::where('email', $email)->first();\n Mail::to($email)->send(new SendEmailTest($user));\n\n }", "public function run()\n {\n if ($this->allowOverride) {\n $to = $this->arg('to');\n $cc = $this->arg('cc');\n $bcc = $this->arg('bcc');\n $subject = $this->arg('subject');\n\n /* if class vars is defined, dont override it */\n if ($to) {\n $this->email->to($to);\n }\n\n if ($cc) {\n $this->email->cc($cc);\n }\n\n if ($bcc) {\n $this->email->bcc($bcc);\n }\n\n if ($subject) {\n $this->email->subject($subject);\n }\n\n $content = $this->arg('content');\n if (! $content) {\n $content = $this->getContent();\n }\n\n if ($this->contentType == \"html\") {\n $this->email->html($content);\n } else {\n $this->email->text($content);\n }\n } else {\n $this->extractFieldsFromThis();\n }\n\n return $this->send();\n }", "public function sendEmail()\n {\n $SesClient = new SesClient([\n 'profile' => $this->profile,\n 'version' => $this->version,\n 'region' => $this->region\n ]);\n\n if (!empty($this->cc)) {\n $destination = [\n 'ToAddresses' => $this->recipient_emails,\n 'CcAddresses' => $this->cc\n ];\n }\n\n if (!empty($this->bcc)) {\n $destination = [\n 'ToAddresses' => $this->recipient_emails,\n 'BccAddresses' => $this->bcc\n ];\n }\n\n if (!empty($this->cc) && !empty($this->bcc)) {\n $destination = [\n 'ToAddresses' => $this->recipient_emails,\n 'CcAddresses' => $this->cc,\n 'BccAddresses' => $this->bcc\n ];\n }\n \n $emailParams = [\n 'Source' => $this->sender_email, // 寄件者電子郵件地址\n 'Destination' => $destination,\n ];\n\n if (!empty($this->html_body)) {\n $body = $this->html_body;\n $ctype = 'html';\n }\n\n if (!empty($this->plaintext_body)) {\n $body = $this->plaintext_body;\n $ctype = 'plain';\n }\n\n try {\n $subject = $this->subject;\n $attachments = !empty($this->attachments) ? $this->createAttachments() : \"\"; \n $messageData = $this->createMimeMessage($this->sender_email, $this->recipient_emails, $subject, $body, $ctype, $this->cc, $this->bcc, $attachments);\n\n $emailParams['RawMessage'] = [\n 'Data' => $messageData\n ];\n\n // 寄送郵件\n $result = $SesClient->sendRawEmail($emailParams);\n $messageId = \"\";\n if (!empty($result['MessageId'])) {\n $messageId = $result['MessageId'];\n }\n } catch (AwsException $e) {\n throw new AwsException ($e->getMessage());\n }\n\n return $messageId;\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify( new VerifyEmail() ); # 새로 만든 VerifyEmail Notification 발송\n }", "public function send(CakeEmail $email)\n\t{\n\t\t$paramsEmail = $email->to();\n\t\tif (count($paramsEmail) != 1) {\n\t\t\treturn parent::send($email);\n\t\t}\n\t\t$emailAddress = key($paramsEmail);\n\n\t\tif (!Validation::email($emailAddress)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t# check email server is valid\n\t\tif (preg_match('/[^\\@]*\\@(.*)/', $emailAddress, $matches)) {\n\t\t\tif (!in_array($matches[1], array('yahoo.com', 'gmail.com', 'hotmail.com', 'live.com', 'qq.com', 'mobgame.vn'))) {\n\t\t\t\tif ($matches[1] == 'haitacmobi') {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t$result = Validation::email($emailAddress, true);\n\t\t\t\t\tif ($result == false) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$User = ClassRegistry::init('User');\n\n\t\t# verify address\n\t\tif (!empty($vars['requiredVerify']) && !empty($vars['user'])) {\n\t\t\t$user = $vars['user'];\n\t\t\tClassRegistry::init('EmailFeedback');\n\t\t\t$EmailFeedback = new EmailFeedback();\n\t\t\t$send = false;\n\t\t\tif ( !empty($user['email'])\n\t\t\t\t&& $EmailFeedback->wasBlocked($emailAddress) === false\n\t\t\t\t&& ( (empty($user['email_verified']) && $user['email_temp_verified'] == 1)\n\t\t\t\t || !empty($user['email_verified'])\n\t\t\t\t )\n\t\t\t\t) {\n\t\t\t\t$send = true;\n\t\t\t}\n\n\t\t\tif (!$send) {\n\t\t\t\tif ($user['email_temp_verified'] == null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$result = Utility::tempVerify($emailAddress);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!empty($user['id'])) {\n\t \tif ($result) {\n\t \t\t$User = ClassRegistry::init('User');\n\t $User->id = $user['id'];\n\t $User->saveField('email_temp_verified', User::EMAIL_TMP_VERIFIED, array('callbacks' => false));\n\t } else {\n\t $User->id = $user['id'];\n\t $User->saveField('email_temp_verified', User::EMAIL_TMP_FAKE, array('callbacks' => false));\n\t }\n }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/** TODO \n\t\t\tJust can be force if its in unsubscribe list only\n\t\t**/\n\t\tif (empty($vars['forceSend'])) {\n\t\t\tif (Utility::wasBlocked($emailAddress)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$email->addHeaders(array('X-Mailer' => 'MobgameMail'));\n\t\t\n\t\treturn parent::send($email);\n\t}", "protected function _sendMail ()\n {\n $this->_lastMessageId = $this->_ses->sendRawEmail(\n $this->header.$this->EOL.$this->body.$this->EOL,\n $this->_mail->getFrom() ? : '', $this->_mail->getRecipients()\n );\n }", "function _send_email($type, $email, &$data)\n {\n $this->load->library('email');\n $this->email->from($this->config->item('webmaster_email', 'tank_auth'), $this->config->item('website_name', 'tank_auth'));\n $this->email->reply_to($this->config->item('webmaster_email', 'tank_auth'), $this->config->item('website_name', 'tank_auth'));\n $this->email->to($email);\n $this->email->subject(sprintf($this->lang->line('auth_subject_'.$type), $this->config->item('website_name', 'tank_auth')));\n $this->email->message($this->load->view('email/'.$type.'-html', $data, TRUE));\n $this->email->set_alt_message($this->load->view('email/'.$type.'-txt', $data, TRUE));\n $this->email->send();\n }", "public function sendMail($sender, $receiver, $subject, $message, array $headers = []);", "protected function notifyByEmail() {\n\t\t$userlist = array();\n\n\t\t// find all the users with this server listed\n\t\t$users = $this->db->select(\n\t\t\tSM_DB_PREFIX . 'users',\n\t\t\t'FIND_IN_SET(\\''.$this->server['server_id'].'\\', `server_id`) AND `email` != \\'\\'',\n\t\t\tarray('user_id', 'name', 'email')\n\t\t);\n\n\t\tif (empty($users)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// build mail object with some default values\n\t\t$mail = new phpmailer();\n\n\t\t$mail->From\t\t= sm_get_conf('email_from_email');\n\t\t$mail->FromName\t= sm_get_conf('email_from_name');\n\t\t$mail->Subject\t= sm_parse_msg($this->status_new, 'email_subject', $this->server);\n\t\t$mail->Priority\t= 1;\n\n\t\t$body = sm_parse_msg($this->status_new, 'email_body', $this->server);\n\t\t$mail->Body\t\t= $body;\n\t\t$mail->AltBody\t= str_replace('<br/>', \"\\n\", $body);\n\n\t\t// go through empl\n\t foreach ($users as $user) {\n\t \t// we sent a seperate email to every single user.\n\t \t$userlist[] = $user['user_id'];\n\t \t$mail->AddAddress($user['email'], $user['name']);\n\t \t$mail->Send();\n\t \t$mail->ClearAddresses();\n\t }\n\n\t if(sm_get_conf('log_email')) {\n\t \t// save to log\n\t \tsm_add_log($this->server['server_id'], 'email', $body, implode(',', $userlist));\n\t }\n\t}", "public function set_sender(EmailAddress $address);", "public function doSendFirstEmail()\n {\n $subject = 'Working with Example Co, Inc';\n $body = 'Hi Steve,<br><br>';\n $body .= 'Name is Alex and we met last night at the event and spoke briefly about getting more users to your site. ';\n $body .= 'I thought we had a great conversation and wanted to follow up on that. Could we set up a time to speak sometime this week?';\n $body .= '<br><br>Thank you for your time and let me know when you\\'d like to connect and I\\'d be happy to block it out.';\n $body .= '<br><br>Best,<br>Alex';\n // get up a gmail client connection\n $client = User::googleClient();\n // get the gmail service\n $gmail = new \\Google_Service_Gmail($client);\n\n // use swift mailer to build the mime\n $mail = new \\Swift_Message;\n $mail->setTo([$this->user->email]);\n $mail->setBody($body, 'text/html');\n $mail->setSubject($subject);\n $data = base64_encode($mail->toString());\n $data = str_replace(array('+','/','='),array('-','_',''),$data); // url safe\n $m = new \\Google_Service_Gmail_Message();\n $m->setRaw($data);\n $gmailMessage = $gmail->users_messages->send('me', $m);\n\n // update the DB so we can check if this feature is used\n $this->user->tutorial_email = 'yes';\n $this->user->save();\n return 'success';\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail());\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail());\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail());\n }", "public function sendEmailWithApplyLink(){\n\t}", "public function sendEmailVerificationNotification()\n {\n $this->notify( new VerifyEmailNotification );\n }", "function mailUser($email) {\n\t//echo \"mail user <br>\";\n\t$mail = getSocksMailer();\n\t$mail->Subject = \"Litesprite Survey Completed\";\n\t$mail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t$mail->msgHTML(file_get_contents('../emails/postSurvey.html'), dirname(__FILE__));\n\t$mail->AddAddress($email);\n\tsendMail($mail);\n}", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new CustomVerifyEmail);\n }", "public function sendEmailVerificationNotification(){\n $this->notify(new VerifyEmail);\n }", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "protected function send_alert_emails($emails) {\n global $USER, $CFG;\n\n if (!empty($emails)) {\n\n $url = new moodle_url($CFG->wwwroot . '/mod/simplecertificate/view.php',\n array('id' => $this->coursemodule->id, 'tab' => self::ISSUED_CERTIFCADES_VIEW));\n\n foreach ($emails as $email) {\n $email = trim($email);\n if (validate_email($email)) {\n $destination = new stdClass();\n $destination->email = $email;\n $destination->id = rand(-10, -1);\n\n $info = new stdClass();\n $info->student = fullname($USER);\n $info->course = format_string($this->get_instance()->coursename, true);\n $info->certificate = format_string($this->get_instance()->name, true);\n $info->url = $url->out();\n $from = $info->student;\n $postsubject = get_string('awardedsubject', 'simplecertificate', $info);\n\n // Getting email body plain text.\n $posttext = get_string('emailteachermail', 'simplecertificate', $info) . \"\\n\";\n\n // Getting email body html.\n $posthtml = '<font face=\"sans-serif\">';\n $posthtml .= '<p>' . get_string('emailteachermailhtml', 'simplecertificate', $info) . '</p>';\n $posthtml .= '</font>';\n\n @email_to_user($destination, $from, $postsubject, $posttext, $posthtml); // If it fails, oh well, too bad.\n }// If it fails, oh well, too bad.\n }\n }\n }" ]
[ "0.6980083", "0.6868115", "0.6823123", "0.6794151", "0.6790995", "0.6771945", "0.66886663", "0.65806884", "0.65520245", "0.649606", "0.64859414", "0.6475329", "0.64179444", "0.6411858", "0.63914424", "0.6356509", "0.6312032", "0.6310046", "0.6306721", "0.6276842", "0.62586063", "0.6251528", "0.6214536", "0.62135273", "0.62110704", "0.6205991", "0.6203798", "0.61710703", "0.61601835", "0.6157845", "0.6128164", "0.612515", "0.61249113", "0.6114398", "0.61127794", "0.60900843", "0.60668284", "0.60554546", "0.6049935", "0.60417646", "0.604053", "0.6039935", "0.60388684", "0.60352004", "0.6027414", "0.60213065", "0.6015568", "0.6015016", "0.6012492", "0.6012399", "0.6009369", "0.6002019", "0.59987324", "0.5995273", "0.599503", "0.59851986", "0.59691894", "0.5968589", "0.59610313", "0.5955036", "0.59534574", "0.5948186", "0.59434193", "0.59334517", "0.5926686", "0.5924076", "0.5922808", "0.59205675", "0.5918258", "0.591158", "0.59012914", "0.59000057", "0.5890589", "0.58774465", "0.58753395", "0.58700186", "0.5869077", "0.58610547", "0.5859885", "0.5858022", "0.5852241", "0.5850505", "0.5846332", "0.58399415", "0.58346564", "0.58346564", "0.58346564", "0.58331615", "0.5824257", "0.58238983", "0.58232945", "0.58232945", "0.58232945", "0.58232945", "0.58232945", "0.58232945", "0.58232945", "0.5821063", "0.5815915", "0.5800093", "0.57964325" ]
0.0
-1
Run the database seeds.
public function run() { $accounts = [ ['account_name' => 'SUDUT NEGERI', 'account_number' => '12 90 7 36 592', 'bank_address' => 'Tembalang'], ['account_name' => 'SUDUT NEGERI', 'account_number' => '19 30 8 92 001', 'bank_address' => 'Tembalang'], ['account_name' => 'SUDUT NEGERI', 'account_number' => '98 87 6 412', 'bank_address' => 'Tembalang'], ['account_name' => 'SUDUT NEGERI', 'account_number' => '88 71 6 192', 'bank_address' => 'Tembalang'], ]; foreach($accounts as $a){ DB::table('bank_accounts')->insert($a); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Generate SQL to enumerate the records of an entity, returning the resulting rows and related pagination data.
function enumerate($params, $set_vars=false) { // move the list parameters into the local namespace // (from,exprs,gexprs,select,where,group_by,having,order,limit) extract($params, EXTR_OVERWRITE); assert_type($exprs, 'array'); assert_type($gexprs, 'array'); foreach($exprs as $k=>$v) $select .= ",$v \"$k\""; foreach($gexprs as $k=>$v) $select .= ",$v \"$k\""; // if $params[select] was empty, then we have a leading comma... if(substr($select, 0, 1) == ',') $select = substr($select, 1); // Build WHERE/HAVING clauses from list params and // criteria sent from the browser list($w_sql,$w_args,$h_sql,$h_args) = $this->filter($exprs, $gexprs); // WHERE if(is_array($where)) { foreach($where as $v) $w_sql .= " AND ($v)"; } else if(!empty($where)) { $w_sql .= " AND ($where)"; } // backwards compatibility if(!empty($where_args)) $w_args = array_merge($w_args, $where_args); // HAVING if(is_array($having)) { foreach($having as $v) $h_sql .= " AND ($v)"; } else if(!empty($having)) { $h_sql .= " AND ($having)"; } // Merge all SQL args if necessary ($h_args could be empty) $args = empty($h_args) ? $w_args : array_merge($w_args, $h_args); // ORDER/LIMIT $sort_sql = $this->sort($order, $exprs); $page_sql = $this->paginate($limit); // Get data rows if($this->db->type == 'mysql') $select = "SQL_CALC_FOUND_ROWS $select"; $sql = $this->db->build_sql($select, $from, $w_sql, $group_by, $h_sql, $sort_sql, $page_sql); $data = $this->db->get_all($sql, $args); // Count all matching rows if($this->db->type == 'mysql') { $ttlrows = $this->db->get_value("SELECT FOUND_ROWS()"); } else { $ttlrows = $this->db->get_value($this->db->build_sql("COUNT(*)", $from, $w_sql, $group_by, $h_sql), $args); } if($set_vars) { $this->page->template->set('data', $data); $this->page->template->set('totalrows', $ttlrows); $this->page->template->set('curpage', $this->page->param('p_p', 1)); $this->page->template->set('perpage', $this->page->param('p_pp', $limit)); } // data, total rows, current page, per page return array($data, $ttlrows, $this->page->param('p_p', 1), $this->page->param('p_pp', $limit)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPagedStatement($sql,$page,$items_per_page);", "public function showEntities()\n {\n return Entity::paginate(10);\n }", "protected function displayEntityData()\n {\n\n $this->_query = str_replace(\"\\'\", \"'\", $this->_query);\n $queryToRun = $this->_query;\n $pagingSection = '<table border=\"0\" align=\"center\" CELLSPACING=\"15\">';\n $nextSkip = null;\n $canPage = false;\n if($this->_enablePaging && (isset($_REQUEST['pagingAllowed']) &&\n $_REQUEST['pagingAllowed'] == 'true'))\n {\n $canPage = true;\n $skip = 0;\n if(isset($_REQUEST['skip']))\n {\n $skip = $_REQUEST['skip'];\n }\n\n $parts = parse_url($queryToRun);\n if(isset($parts['query']))\n {\n $queryToRun .= '&$top='.$this->_pageSize.'&$skip=' . $skip;\n }\n else\n {\n $queryToRun .= '?$top='.$this->_pageSize.'&$skip=' . $skip;\n }\n\n $nextSkip = $skip + $this->_pageSize;\n if($nextSkip != $this->_pageSize)\n {\n $prev = $skip - $this->_pageSize;\n $pagingSection .= \"<td><a href=\\\"\" . $this->_containerScriptName\n . \"?query=\"\n . $this->_query\n . \"&serviceUri=\"\n . $this->_uri\n . '&skip=' . $prev\n . '&pagingAllowed=true'\n . \"\\\">Prev</a></td>\";\n }\n }\n\n $response = $this->_proxyObject->Execute($queryToRun);\n $resultSet = $response->Result;\n echo \"<br><br><table style=\\\"border: thin solid #C0C0C0;\\\" border=\\\"1\\\">\";\n if (count($resultSet) > 0)\n {\n $propertyArray = WCFDataServicesEntity::getProperties($resultSet[0]);\n $this->displayHeader($propertyArray, $resultSet[0]);\n foreach ($resultSet as $result)\n {\n echo \"<tr style=\\\"font-family: Calibri; \"\n . \"background-color: #CCFFFF\\\">\";\n WCFDataServicesEntity::getDetailButtonText($result);\n foreach ($propertyArray as $property)\n {\n $prop = new ReflectionProperty($result, $property);\n $propertyAttributes = Utility::getAttributes($prop);\n if ($propertyAttributes['Type'] == 'NavigationProperty')\n {\n $pagingAllowed = 'pagingAllowed=true';\n $relationShip = $this->_proxyObject->GetRelationShip($propertyAttributes[\"Relationship\"],\n $propertyAttributes[\"ToRole\"]);\n if($relationShip != '*')\n {\n $pagingAllowed = 'pagingAllowed=false';\n }\n\n $skip = null;\n if(isset($_REQUEST['skip']))\n {\n $skip = '&skip=' . $_REQUEST['skip'];\n }\n\n $pagingAllowedWhileAttaching = null;\n if(isset($_GET['pagingAllowed']))\n {\n $pagingAllowedWhileAttaching =\n '&pagingAllowed=' . $_GET['pagingAllowed'];\n }\n\n echo \"<td>\";\n $relatedLinks = $result->getRelatedLinks();\n $finalQuery = $relatedLinks[$property];\n $finalQuery = str_replace(\"%20\", '',$finalQuery);\n echo \"<a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $finalQuery\n . '&' . $pagingAllowed\n . $skip\n . \"&serviceUri=\"\n . $this->_uri\n .\"\\\">\"\n . $property\n . \"</a>\";\n echo \"<br><a href=\\\"\" . $this->_containerScriptName . \"?query=\"\n . $this->_query\n . $pagingAllowedWhileAttaching\n . $skip\n . \"&serviceUri=\"\n . $this->_uri\n . \"&Type=\"\n . $property\n . \"&AttachTo=\"\n . $finalQuery\n . \"\\\"> Add Link </a>\";\n echo \"</td>\";\n }\n else\n {\n $propertyAttributes = Utility::getAttributes($prop);\n if(isset($propertyAttributes['EdmType']) &&\n ($index = strpos($propertyAttributes['EdmType'], 'Edm.')) !== 0)\n\n {\n $value = $prop->getValue($result);\n $type = ClientType::Create(get_class($value));\n $nonEpmProperties = $type->getRawNonEPMProperties(true);\n echo '<td><table style=\"border: thin solid #C0C0C0;\" border=\"1\">';\n foreach($nonEpmProperties as $nonEpmProperty)\n {\n $propertyName = $nonEpmProperty->getName();\n $refProperty = new ReflectionProperty($value, $propertyName);\n $propertyValue = $refProperty->getValue($value);\n echo '<tr><td>';\n echo $propertyValue;\n echo '</td></tr>';\n }\n echo '</table></td>';\n }\n else\n {\n if (Utility::ContainAttribute($prop->getDocComment(),\n 'Binary'))\n {\n // TODO: Display image in the cell\n echo \"<td>Image</td>\";\n }\n else\n {\n $value = $prop->getValue($result);\n if ($value == '')\n {\n $value = 'null';\n }\n echo \"<td>\"\n . $value\n . \"</td>\";\n }\n }\n }\n }\n echo \"</tr>\";\n }\n\n if($canPage)\n {\n $pagingSection .= \"<td><a href=\\\"\" . $this->_containerScriptName\n . \"?query=\"\n . $this->_query\n . \"&serviceUri=\"\n . $this->_uri\n . '&skip=' . $nextSkip\n . '&pagingAllowed=true'\n . \"\\\">Next</a></td><tr/></table>\";\n }\n }\n\n if($canPage)\n {\n echo $pagingSection;\n }\n echo \"</table><br><br>\";\n }", "public function fetchObjects($startRow = 0, $endRow = 100, $whstr = '', $whparam = NULL, $orderby = array(), JoinTb $joinedTable = NULL)\n {\n\n $em = $this->entityManager;\n\n $qb = $em->createQueryBuilder();\n if (!isset($joinedTable)) {\n $qb->add('select', 'tmp')\n ->add('from', get_class($this) . ' tmp')\n ->setFirstResult($startRow)\n ->setMaxResults($endRow - $startRow);\n } else {\n $subquery = $em->createQueryBuilder();\n $subquery\n ->select('TBIDS.id')\n ->from($joinedTable->getClass(), 'tmp1')\n ->innerJoin('tmp1.' . $joinedTable->getProp(), 'TBIDS');\n $jointbwhstr = $joinedTable->getWhereString();\n $jointbwhparam = $joinedTable->getWhereParam();\n\n if (isset($jointbwhstr)) {\n $subquery->add('where', $joinedTable->getWhereString());\n if (isset($jointbwhparam))\n $subquery->setParameters($joinedTable->getWhereParam());\n\n $qb->add('select', 'tmp')\n ->add('from', get_class($this) . ' tmp')\n ->setFirstResult($startRow)\n ->setMaxResults($endRow - $startRow);\n\n $qb->add('where', 'tmp.id in (' . $subquery->getDQL() . ')');\n $qb->setParameters($subquery->getParameters());\n }\n }\n\n $tmp = 0;\n\n foreach ($orderby as $fn => $kn)\n if ($tmp == 0) {\n $qb->orderBy('tmp.' . $fn, $kn);\n $tmp = 1;\n } else\n $qb->addOrderBy('tmp.' . $fn, $kn);\n\n if (isset($joinedTable)) {\n if ($whstr != '') {\n $qb->andWhere($whstr . ' and tmp.IsDeleted = 0 ');\n if (isset($whparam)) $qb->setParameters($whparam);\n } else {\n $qb->andWhere('tmp.IsDeleted = 0');\n }\n } else\n if ($whstr != '') {\n $qb->add('where', $whstr . ' and tmp.IsDeleted = 0 ');\n if (isset($whparam)) $qb->setParameters($whparam);\n } else\n $qb->add('where', 'tmp.IsDeleted =0');\n\n $query = $qb->getQuery();\n\n\n//\t\tvar_dump($qb->getQuery()->getSQL());\n//\t\tvar_dump($whparam);\n//\t\tvar_dump($whstr); die;\n $jointbhelpfieldtype = NULL;\n if (isset($joinedTable)) $jointbhelpfieldtype = $joinedTable->getHelpFieldType();\n\n $results = $query->getResult();\n if (isset($joinedTable))\n if (isset($jointbhelpfieldtype))\n foreach ($results as $r) {\n switch ($joinedTable->getHelpFieldType()) {\n case 'Value':\n $r->HelpField = $joinedTable->getHelpField();\n break;\n case 'function':\n /**\n *\n *TODO: Complete this section for\n *Make instance of function and call it\n *HelpField=function($r);\n */\n break;\n\n\n }\n\n }\n\n\n /*\n $qb = $em->createQueryBuilder();\n if(!isset($joinedTable)){\n $qb->add('select', 'count(tmp.id)')\n ->add('from', get_class($this).' tmp');\n }else {\n $qb\t->select('count(tmp.id)')\n ->from($joinedTable['Class'],' tmp1')\n ->innerJoin('tmp1.'.$joinedTable['Prop'],'tmp');\n }\n\n if(isset($joinedTable))\n {\n if($whstr!=''){\n $qb->andWhere($whstr.' and tmp.IsDeleted = 0 ');\n if(isset($whparam)) $qb->setParameters($whparam);\n }\n else\n {\n $qb->andWhere('tmp.IsDeleted = 0');\n }\n }else\n if($whstr!='') {\n $qb->add('where',$whstr.' and tmp.IsDeleted = 0 ');\n if(isset($whparam))$qb->setParameters($whparam);\n }\n else\n $qb->add('where','tmp.IsDeleted =0');\n */\n\n /*\n if($whstr!='') {\n $qb->add('where',$whstr.' and tmp.IsDeleted = 0 ');\n $qb->setParameters($whparam);\n } else\n $qb->add('where','tmp.IsDeleted =0');\n */\n\n //get Total Rows\n $qb1 = $em->createQueryBuilder();\n if (!isset($joinedTable)) {\n $qb1->add('select', 'count(tmp.id)')\n ->add('from', get_class($this) . ' tmp');\n } else {\n $subquery = $em->createQueryBuilder();\n $subquery\n ->select('TBIDS.id')\n ->from($joinedTable->getClass(), 'tmp1')\n ->innerJoin('tmp1.' . $joinedTable->getProp(), 'TBIDS');\n $jointbwhstr = $joinedTable->getWhereString();\n $jointbwhparam = $joinedTable->getWhereParam();\n\n if (isset($jointbwhstr)) {\n $subquery->add('where', $joinedTable->getWhereString());\n if (isset($jointbwhparam))\n $subquery->setParameters($joinedTable->getWhereParam());\n\n $qb1->add('select', 'count(tmp.id)')\n ->add('from', get_class($this) . ' tmp');\n\n $qb1->add('where', 'tmp.id in (' . $subquery->getDQL() . ')');\n $qb1->setParameters($subquery->getParameters());\n }\n }\n if (isset($joinedTable)) {\n if ($whstr != '') {\n $qb1->andWhere($whstr . ' and tmp.IsDeleted = 0 ');\n if (isset($whparam)) $qb1->setParameters($whparam);\n } else {\n $qb1->andWhere('tmp.IsDeleted = 0');\n }\n } else\n if ($whstr != '') {\n $qb1->add('where', $whstr . ' and tmp.IsDeleted = 0 ');\n if (isset($whparam)) $qb1->setParameters($whparam);\n } else\n $qb1->add('where', 'tmp.IsDeleted =0');\n $dql = $qb1->getQuery();\n\n $tmptest = $dql->getResult();\n $totalRows = $tmptest[0][1];\n\n return array('totalRows' => $totalRows, 'results' => $results);\n }", "public function findAllEntities();", "public function findAllWithPagination(): LengthAwarePaginator;", "public function findAllWithPagination(): LengthAwarePaginator;", "protected function getAllOfEntity(&$focusObject = null,$pageNumber=null,$pageSize=null)\r\n {\r\n \tif(isset($this->Request['siteid']))\r\n \t{\r\n \t\t$countSql = \"DISTINCT pi.id\";\r\n\t\t $selectStatement = \"\r\n\t\t \t\t\t\t\tif(pi.quantity>1,concat('<b>',pi.quantity,'</b>'),pi.quantity) as Qty,\r\n\t\t\t\t\t \t\tpta.alias as Partcode,\r\n\t\t\t\t\t \t\tif(pt.serialised=1,\r\n\t\t\t\t\t \t\t\t(\tSELECT GROUP_CONCAT(pia.alias SEPARATOR '<br/>')\r\n\t\t\t\t\t\t\t\t\t\tFROM partinstancealias pia\r\n\t\t\t\t\t\t\t\t\t\tWHERE pia.partInstanceAliasTypeId = 1\r\n\t\t\t\t\t\t\t\t\t\tAND pia.partInstanceId = pi.id\r\n\t\t\t\t\t\t\t\t\t\tAND pia.active = 1),\r\n\t\t\t\t\t \t\t\tconcat('<b>',pta1.alias,'</b>')) as Barcode,\r\n\t\t\t\t\t \t\tpis.name as Status,\r\n\t\t\t\t\t \t\tpt.name as Decsription,\r\n\t\t\t\t\t \t\t'\" . str_replace(\"'\", \"\\'\", $this->FilterForSite->Text) . \"' as Location,\r\n\t\t\t\t\t \t\t'27' as warehouseID\r\n\t\t\t\t\t \t\t\";\r\n\t\t $sql = \"select {select} from partinstance pi\r\n\t\t \t\tleft join partinstancestatus pis on (pis.id = pi.partInstanceStatusId)\r\n\t\t \t\tinner join parttype pt on (pt.id = pi.partTypeId)\r\n\t\t \t\tleft join partinstancealias pia on (pia.partInstanceId = pi.id and pia.active = 1 and pia.partInstanceAliasTypeId = 1)\r\n\t\t \t\tleft join parttypealias pta on (pta.active = 1 and pta.partTypeAliasTypeId = 1 and pt.id = pta.partTypeId)\r\n\t\t \t\tleft join parttypealias pta1 on (pta1.active = 1 and pta1.partTypeAliasTypeId = 2 and pt.id = pta1.partTypeId)\r\n\t\t \t\twhere pi.active = 1\r\n\t\t \t\tand pi.siteId = \".trim($this->Request['siteid']).\"\r\n\t\t \t\tGROUP BY pi.id\r\n\t\t \t\tORDER BY pta.alias\";\r\n\t \t$res = Dao::getResultsNative(str_replace(\"{select}\",$selectStatement,$sql));\r\n\r\n\t \tif(count($res)>0 && sizeof($res)>\"\")\r\n\t \t\t$this->DataList->pageSize = count($res);\r\n\r\n\t \treturn $res;\r\n \t}\r\n\r\n \t$this->ListingPanel->findControl('OutputToExcelTable')->findControl('OutputToExcelRow')->findControl('OutputToExcelCell')->findControl('OutputToExcelButton')->Visible=false;\r\n \t$this->StockHeaderPanel->Visible=false;\r\n \t$extraLabel=\"\";\r\n\t $warehouseName = \"\";\r\n\r\n\t\t$temp=\"\";\r\n\t // 1/11/2010 - added functionality to do group by part type, then by location, then by status\r\n\t // 22/11/2010 - added functionality to do group by part type, then by status\r\n\t $toGroupByCodeStatusLocation = $this->DoGroupResultsByCodeStatusLocation->Checked;\r\n\t $toGroupByCodeStatus = $this->DoGroupResultsByCodeStatus->Checked;\r\n\r\n\t $warehouseNameSql = \"(SELECT GROUP_CONCAT(w7.name ORDER BY w7.position asc SEPARATOR '/') FROM warehouse w7 WHERE w7.active=1 AND ware.position LIKE concat(w7.position,'%') AND w7.active=1)\";\r\n\t if ($toGroupByCodeStatusLocation)\r\n\t {\r\n\t\t $countSql = \"DISTINCT (CONCAT(pt.id, '-', ware.id, '-', pis.id))\";\r\n\t\t $selectStatement = \"\r\n\t\t\t \t\t\t\tSUM(pi.quantity) AS sumqty1,\r\n\t\t\t\t\t \t\tpta.alias,\r\n\t\t\t\t\t \t\tif(pt.serialised=1, 'serialised', pta1.alias),\r\n\t\t\t\t\t \t\tpis.name,\r\n\t\t\t\t\t \t\tpt.name,\r\n\t\t\t\t\t \t\t'' as Location,\r\n\t\t\t\t\t \t\tpi.warehouseid,\r\n\t\t\t\t\t \t\twc.id as warehouseCategoryId,\r\n\t\t \t\t\t\t\t'' as ptId,\r\n\t\t \t\t\t\t\tpta.alias as Partcode,\r\n\t\t \t\t\t\t\tpt.serialised as serialised\r\n\r\n\t\t\t\t\t \t\t\";\r\n\t\t $joinStatement = \"\";\r\n\t\t $additionalWhereStatement = \"\";\r\n\t\t $groupByStatement = \" GROUP BY pt.id, ware.id, pis.id \";\r\n\t\t $orderByStatement = \" ORDER BY ware.position, pta.alias, pis.name\";\r\n\t }\r\n\t else if ($toGroupByCodeStatus)\r\n\t {\r\n\t\t $countSql = \"DISTINCT (CONCAT(pt.id, '-', pis.id))\";\r\n\t\t $selectStatement = \"\r\n\t\t\t \t\t\t\tSUM(pi.quantity) AS sumqty2,\r\n\t\t\t\t\t \t\tpta.alias,\r\n\t\t\t\t\t \t\tif(pt.serialised=1, 'serialised', pta1.alias),\r\n\t\t\t\t\t \t\tpis.name,\r\n\t\t\t\t\t \t\tpt.name,\r\n\t\t\t\t\t \t\t'' AS name,\r\n\t\t\t\t\t \t\t'',\r\n\t\t\t\t\t \t\twc.id as warehouseCategoryId,\r\n\t\t \t\t\t\t\t'' as ptId,\r\n\t\t \t\t\t\t\tpta.alias as Partcode,\r\n\t\t \t\t\t\t\tpt.serialised as serialised\r\n\t\t\t\t\t \t\t\";\r\n\t\t $joinStatement = \"\";\r\n\t\t $additionalWhereStatement = \"\";\r\n\t\t $groupByStatement = \" GROUP BY pt.id, pis.id \";\r\n\t\t $orderByStatement = \" ORDER BY pta.alias, pis.name\";\r\n\t }\r\n\t else\r\n\t {\r\n\t\t $countSql = \"DISTINCT pi.id\";\r\n\t\t $selectStatement = \"\r\n\t\t \t\t\t\t\tif(pi.quantity>1,concat('<b>',pi.quantity,'</b>'),pi.quantity) as Qty,\r\n\t\t\t\t\t \t\tpta.alias as Partcode,\r\n\t\t\t\t\t \t\tif(pt.serialised=1,\r\n\t\t\t\t\t \t\t\t(\tSELECT GROUP_CONCAT(pia.alias SEPARATOR '<br/>')\r\n\t\t\t\t\t\t\t\t\t\tFROM partinstancealias pia\r\n\t\t\t\t\t\t\t\t\t\tWHERE pia.partInstanceAliasTypeId = 1\r\n\t\t\t\t\t\t\t\t\t\tAND pia.partInstanceId = pi.id\r\n\t\t\t\t\t\t\t\t\t\tAND pia.active = 1),\r\n\t\t\t\t\t \t\t\tconcat('<b>',pta1.alias,'</b>')) as Barcode,\r\n\t\t\t\t\t \t\tpis.name as Status,\r\n\t\t\t\t\t \t\tpt.name as Decsription,\r\n\t\t\t\t\t \t\tif(pi.siteId is null,\r\n\t\t\t\t\t \t\t'',\r\n\t\t\t\t\t \t\tconcat('[',ware.name,'] ',commonName)\r\n\t\t\t\t\t \t\t) as Location,\r\n\t\t \t\t\t\t\tware.id as warehouseID ,\r\n\t\t \t\t\t\t\twc.id as warehouseCategoryId,\r\n\t\t\t\t\t \t\tpt.id as ptId,\r\n\t\t \t\t\t\t\tpta.alias as Partcode,\r\n\t\t \t\t\t\t\tpt.serialised as serialised\r\n\t\t\t\t\t \t\t\";\r\n\t\t $joinStatement = \"\";\r\n\t\t $additionalWhereStatement = \"\";\r\n\t\t $groupByStatement = \" GROUP BY pi.id\";\r\n\t\t $orderByStatement = \" ORDER BY ware.position, pta.alias\";\r\n\t }\r\n\r\n\r\n\t\t//check that alias exists before running querys\r\n\t if($this->alias->Text){\r\n \t\t$sqlTest = \" select id from partinstancealias pia where pia.partInstanceAliasTypeId = \" . $this->aliasTypes->getSelectedValue() . \" and pia.active = 1 \";\r\n\t\t\t$sqlTest .= \" and pia.alias like '\" . $this->alias->Text . \"'\";\r\n\t\t\tif(count(Dao::getResultsNative($sqlTest))==0)\r\n\t\t\t{\r\n\t\t\t\t$this->totalcount = 0;\r\n\t\t\t\t$this->StockHeader->Text = \"<div style='font-size:0.9em; font-weight:normal; width:100%; '>\r\n\t\t \t\t\t\t\tLAST STOCKTAKE DATE: <br/>\r\n\t\t\t\t\t\t\t\tNEXT STOCKTAKE DATE: <br/>\r\n\t\t \t\t\t\t</div>\";;\r\n\t \t\t$this->RecordHeader->Text = \"Total quantity found 0.\";\r\n\t \t\t$this->StockHeaderPanel->Visible=true;\r\n\t \t\treturn;\r\n\t\t\t}\r\n \t}\r\n\r\n \t$pageSize = $this->resultsPerPageList->numResults->getSelectedValue();\r\n\t $sql = $this->getSql($selectStatement,$extraLabel,$warehouseName,$pageNumber,$pageSize,$joinStatement, $additionalWhereStatement, false, $groupByStatement, $orderByStatement);\r\n// \t\techo $sql;\r\n\t $res = Dao::getResultsNative($sql);\r\n\t if ($toGroupByCodeStatus)\r\n\t {\r\n\r\n\t }\r\n\t else\r\n\t {\r\n\t\t\t$temp = array();\r\n\t\t foreach($res as $row)\r\n\t\t {\r\n\t\t \tif (($row[5]<='') && ($row[6]>''))\r\n\t\t \t{\r\n\t\t \t\tif(isset($this->subwarehouseNames[$row[6]]['full'])){\r\n\t\t\t \t\tif($this->ShowLocName->Checked)\r\n\t \t\t\t\t\t$row[5] = $this->subwarehouseNames[$row[6]]['full'];\r\n\t \t\t\t\telse\r\n\t \t\t\t\t\t$row[5] = $this->subwarehouseNames[$row[6]]['name'];\r\n\r\n\t\t \t\t}else{\r\n\t\t \t\t\t$warehouse = Factory::service(\"Warehouse\")->getWarehouse($row[6]);\r\n\t\t \t\t\tif($warehouse instanceOf Warehouse){\r\n\t \t\t\t\t\t$this->subwarehouseNames[$row[6]]['full']= Factory::service(\"Warehouse\")->getWarehouseBreadCrumbs($warehouse,true,\"/\");\r\n\t\t \t\t\t\t$this->subwarehouseNames[$row[6]]['name']= $warehouse->getName();\r\n\t\t \t\t\t}else{\r\n\t\t \t\t\t\t$this->subwarehouseNames[$row[6]]['full'] = \"\";\r\n\t\t \t\t\t\t$this->subwarehouseNames[$row[6]]['name'] = \"\";\r\n\t\t \t\t\t}\r\n\r\n\t\t \t\t\tif($this->ShowLocName->Checked)\r\n\t \t\t\t\t\t$row[5] = $this->subwarehouseNames[$row[6]]['full'];\r\n\t \t\t\t\telse\r\n\t \t\t\t\t\t$row[5] = $this->subwarehouseNames[$row[6]]['name'];\r\n\t\t \t\t}\r\n\r\n\t\t \t}\r\n\t\t\t\tif(intval($row[7]) == WarehouseCategory::ID_RESTRICTED_AREA)\r\n\t\t\t\t{\r\n\t\t\t\t\t$row[5] = \"<span style='color:red'>(Restricted area)</span> \"\t. $row[5];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!$toGroupByCodeStatusLocation && !$toGroupByCodeStatus)//if group by partcode, part status , location\r\n\t\t\t\t{\r\n\t\t\t\t\t//if BS/BP is deactivated\r\n\t\t\t\t\t$deactivatedBarcode='';\r\n\t\t\t\t\tif(empty($row[2]) || is_null($row[2]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($warehouse instanceOf Warehouse)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$piId = Factory::service('PartInstance')->findByCriteria('pi.parttypeid=? and pi.warehouseid = ?',array($row[8],$warehouse->getId()));\r\n\t\t\t\t\t\t\tif(count($piId)>0 && $piId[0] instanceof PartInstance)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($row[10] == 1)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$aliasType = PartInstanceAliasType::ID_SERIAL_NO;\r\n\t\t\t\t\t\t\t\t\t$deactivatedBarcode = Factory::service('PartInstance')->searchPartInstanceAliaseByPartInstanceAndAliasType($piId[0]->getId(), $aliasType,true);\r\n\t\t\t\t\t\t\t\t\tif(count($deactivatedBarcode)>0 && $deactivatedBarcode[0] instanceof PartInstanceAlias)\r\n\t\t\t\t\t\t\t\t\t\t$deactivatedBarcode = $deactivatedBarcode[0]->getAlias();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$aliasType = PartTypeAliasType::ID_BP;\r\n\t\t\t\t\t\t\t\t\t$bp = Factory::service('PartTypeAlias')->findByCriteria('pta.parttypeid=? and pta.parttypealiastypeid=? and pta.active=0',array($row[8],$aliasType),true);\r\n\t\t\t\t\t\t\t\t\tif(count($bp)>0 && $bp[0] instanceof PartTypeAlias)\r\n\t\t\t\t\t\t\t\t\t\t$deactivatedBarcode = $bp[0]->getAlias();\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}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(($row[0]>1 && $row[10] == 1) || ((!is_array($deactivatedBarcode) && trim($deactivatedBarcode)) == \"\") || (is_array($deactivatedBarcode)))//if serialized and quantity >1 || ignore looking for deactive alias\r\n\t\t\t\t\t\t$row[8] = \"\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$row[8] = \"<b><span style='color:red'>\".$deactivatedBarcode.\"<br/>(De-active)</span></b> \";\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t$temp[] = $row;\r\n\t\t }\r\n\t\t $res = $temp;\r\n\t }\r\n\t if ($toGroupByCodeStatus || $toGroupByCodeStatusLocation)\r\n\t {\r\n\t\t\t$result = Dao::getResultsNative($this->getSql(\"SUM(pi.quantity)\",$temp,$warehouseName,null,null,$joinStatement, $additionalWhereStatement, false, \"\", $orderByStatement));\r\n\t \t$qtyCount = 0;\r\n\t \tforeach ($result as $row)\r\n\t \t\t$qtyCount += $row[0];\r\n\r\n\t \t$this->totalcount=count($result)>0 ? count($result) : 0;\r\n \t\t$this->RecordHeader->Text = \"Total quantity found \".$qtyCount.\".\";\r\n\t }\r\n\t else\r\n\t {\r\n\t\t\t$result = Dao::getResultsNative($this->getSql(\"SUM(pi.quantity)\",$temp,$warehouseName,null,null,$joinStatement, $additionalWhereStatement, false, $groupByStatement, $orderByStatement));\r\n\t\t\t$qtyCount = 0;\r\n\t \tforeach ($result as $row)\r\n\t \t\t$qtyCount += $row[0];\r\n\r\n\t \t$this->totalcount=count($result)>0 ? count($result) : 0;\r\n \t\t$this->RecordHeader->Text = \"Total quantity found \".$qtyCount.\".\";\r\n\t }\r\n\r\n\t if($this->totalcount>0)\r\n\t \t\t$this->ListingPanel->findControl('OutputToExcelTable')->findControl('OutputToExcelRow')->findControl('OutputToExcelCell')->findControl('OutputToExcelButton')->Visible=true;\r\n\r\n\t\t$maximumRowsForExcel = $this->getMaximumRowsForExcel();\r\n \tif($this->totalcount > $maximumRowsForExcel)\r\n \t{\r\n \t\t$this->RecordHeader->Text = $this->RecordHeader->Text . \" <span style='color:red'>To excel is disabled, you may only export \" . $maximumRowsForExcel . \" rows to excel.\";\r\n \t\t$this->ListingPanel->findControl('OutputToExcelTable')->findControl('OutputToExcelRow')->findControl('OutputToExcelCell')->findControl('OutputToExcelButton')->Visible=false;\r\n \t}\r\n\r\n\t \t$this->StockHeaderPanel->Visible=true;\r\n \t$this->StockPanel->Visible=true;\r\n \t$this->StockHeader->Text = \"View stock for \" . $warehouseName . $extraLabel;\r\n\r\n \t//see whether we want to show the regenerate button or not\r\n \t$this->Page->regenBtn->Style = 'display:none';\r\n \t$ids = explode('/',$this->whTree->whIdPath->Value);\r\n \t$sql = \"SELECT COUNT(id) FROM logstocktake WHERE active=0 AND warehouseId=\" . end($ids);\r\n \t$oldStocktakeCount = Dao::getSingleResultNative($sql);\r\n \tif ($oldStocktakeCount[0] > 0)\r\n \t\t$this->Page->regenBtn->Style = '';\r\n\r\n\r\n \treturn $res;\r\n }", "public function getData(): iterable\n {\n $query = CodePoolSchema::query();\n\n if ($this->searchTerm) {\n $query->whereIn('id', CodePoolSchema::search(\"%{$this->searchTerm}%\")->keys());\n }\n\n $filters = collect($this->queryStringFilters)->filter(function ($value) {\n return (bool) $value;\n });\n\n foreach ($this->queryExtenders as $qe) {\n call_user_func($qe, $query, $this->searchTerm, $filters);\n }\n\n // Get the table filters we want to apply.\n $tableFilters = $this->getFilters()->filter(function ($filter) use ($filters) {\n return $filters->has($filter->field);\n });\n\n foreach ($tableFilters as $filter) {\n call_user_func($filter->getQuery(), $filters, $query);\n }\n\n return $query->paginate($this->perPage);\n }", "function getPageData($startRow, $orderBys = null)\n{\n global $dbh;\n\n $SQL = $this->getListSQL();\n $SQL .= $this->getOrderBySQL($orderBys);\n $SQL .= \" LIMIT $startRow, {$this->rowsPerPage}\";\n\n $result = $dbh->getAll($SQL, DB_FETCHMODE_ASSOC);\n dbErrorCheck($result);\n\n if( $this->useListSequence ){\n $this->saveListSequence($result, $startRow);\n }\n\n return $result;\n}", "function findAllOrdersDescPaginated();", "protected function fetchData()\n\t{\n\t\t$this->addScopes();\n\t\t$criteria=$this->getCriteria();\n\t\tif(($pagination=$this->getPagination())!==false)\n\t\t{\n\t\t\t$pagination->setItemCount($this->getTotalItemCount());\n\t\t\t$pagination->applyLimit($criteria);\n\t\t}\n\t\tif(($sort=$this->getSort())!==false)\n\t\t\t$sort->applyOrder($criteria);\n\t\treturn CActiveRecord::model($this->modelClass)->findAll($criteria);\n\t}", "protected final function fetchRecords()\n {\n $this->query->setLimit(\n (($this->parameters->getCurrentPage() - 1) * $this->parameters->getResultsPerPage()),\n $this->parameters->getResultsPerPage()\n );\n\n $this->data = $this->query->execute()->getAssociative();\n }", "public function getAllEntities();", "public function getPaginationDataSource();", "function get_records($recordType, $params = array(), $limit = 10)\n{\n return get_db()->getTable($recordType)->findBy($params, $limit);\n}", "function GetData($_start=0,$_count=9999999)\r\n\t{\r\n\t\t\r\n\t\t$_tpl_select_command = \"SELECT {limit} * FROM ({SelectCommand}) AS _TMP {where} {orderby} {groupby}\";\r\n\t\t\r\n\t\t//Filters\r\n\t\t$_where = \"\";\r\n\t\t$_filters = $this->Filters;\r\n\t\tfor($i=0;$i<sizeof($_filters);$i++)\r\n\t\t{\r\n\t\t\t$_where.=\" and \".$this->GetFilterExpression($_filters[$i]);\r\n\t\t}\r\n\t\tif ($_where!=\"\")\r\n\t\t{\r\n\t\t\t$_where = \"WHERE \".substr($_where,5);\r\n\t\t}\r\n\t\t//Order\r\n\t\t$_orderby = \"\";\r\n\t\t$_orders = $this->Sorts;\r\n\t\tfor($i=0;$i<sizeof($_orders);$i++)\r\n\t\t{\r\n\t\t\t$_orderby.=\", \".$_orders[$i]->Field.\" \".$_orders[$i]->Order;\r\n\t\t}\r\n\t\tif ($_orderby!=\"\")\r\n\t\t{\r\n\t\t\t$_orderby = \"ORDER BY \".substr($_orderby,2);\r\n\t\t}\r\n\t\t//Group\r\n\t\t$_groupby = \"\";\r\n\t\t$_groups = $this->Groups;\r\n\t\tfor($i=0;$i<sizeof($_groups);$i++)\r\n\t\t{\r\n\t\t\t$_groupby.=\", \".$_groups[$i]->Field;\r\n\t\t}\r\n\t\tif ($_groupby!=\"\")\r\n\t\t{\r\n\t\t\t$_groupby = \"GROUP BY \".substr($_groupby,2);\r\n\t\t}\r\n\t\t//Limit\r\n\t\t$_limit = \"TOP \".($_start+$_count); \t\t\r\n\t\t\r\n\t\t$_select_command = str_replace(\"{SelectCommand}\",$this->SelectCommand,$_tpl_select_command);\r\n\t\t$_select_command = str_replace(\"{where}\",$_where,$_select_command);\r\n\t\t$_select_command = str_replace(\"{orderby}\",$_orderby,$_select_command);\r\n\t\t$_select_command = str_replace(\"{groupby}\",$_groupby,$_select_command);\r\n\t\t$_select_command = str_replace(\"{limit}\",$_limit,$_select_command);\r\n\t\t\r\n\t\t//echo $_select_command;\r\n\t\t$_result = mssql_query($_select_command,$this->_Link);\r\n\t\t$_rows = array();\r\n\t\t$_i=0;\r\n\t\twhile ($_row = mssql_fetch_assoc($_result)) \r\n\t\t{\r\n\t\t\tif($_i>=$_start)\r\n\t\t\t{\r\n\t\t\t\tarray_push($_rows,$_row);\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$_i++;\r\n\t\t}\r\n\r\n\t\treturn $_rows;\r\n\t}", "function &getAllRecords($start, $limit, $order = null, $date_ini = '2009-01-01 00:00:00', $date_fin = NOW){\n global $db;\n\n if($order == null){\n $sql = \"SELECT * FROM products OFFSET $start LIMIT $limit \".$_SESSION['ordering'];\n }else{\n $sql = \"SELECT * FROM products ORDER BY $order \".$_SESSION['ordering'].\" OFFSET $start LIMIT $limit \";\n }\n $_SESSION['query'] = $sql;\n $_SESSION['query2Excel'] = $sql;\n //Basic::EventLog(\"products->getAllRecords: \".$sql);\n $res =& $db->query($sql);\n return $res;\n }", "public static function findAll($fields = \"*\", $currentPage = 1, $rowNum = 2, array $sort = array(), array $where = array()) {\r\n\t\t\r\n\t\t$module = Zend_Controller_Front::getInstance ()->getRequest ()->getModuleName ();\r\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\r\n\t\t\r\n\t\t// Defining the url sort\r\n\t\t$uri = isset ( $sort [1] ) ? \"/sort/$sort[1]\" : \"\";\r\n\t\t$dq = Doctrine_Query::create ()->select ( $fields )->from ( 'Wiki w' )->leftJoin ( 'w.WikiCategories wc' );\r\n\t\t\r\n\t\t$pagerLayout = new Doctrine_Pager_Layout ( new Doctrine_Pager ( $dq, $currentPage, $rowNum ), new Doctrine_Pager_Range_Sliding ( array ('chunk' => 10 ) ), \"/$module/$controller/list/page/{%page_number}\" . $uri );\r\n\t\t\r\n\t\t// Get the pager object\r\n\t\t$pager = $pagerLayout->getPager ();\r\n\t\t\r\n\t\t// Set the Order criteria\r\n\t\tif (isset ( $sort [0] )) {\r\n\t\t\t$pager->getQuery ()->orderBy ( $sort [0] );\r\n\t\t}\r\n\t\t\r\n\t\tif (isset ( $where ) && is_array ( $where )) {\r\n\t\t\tforeach ( $where as $filters ) {\r\n\t\t\t\tif (isset ( $filters [0] ) && is_array($filters [0])) {\r\n\t\t\t\t\tforeach ( $filters as $filter ) {\r\n\t\t\t\t\t\t$method = $filter ['method'];\r\n\t\t\t\t\t\t$value = $filter ['value'];\r\n\t\t\t\t\t\t$criteria = $filter ['criteria'];\r\n\t\t\t\t\t\t$pager->getQuery ()->$method ( $criteria, $value );\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$method = $filters ['method'];\r\n\t\t\t\t\t$value = $filters ['value'];\r\n\t\t\t\t\t$criteria = $filters ['criteria'];\r\n\t\t\t\t\t$pager->getQuery ()->$method ( $criteria, $value );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$pagerLayout->setTemplate ( '<a href=\"{%url}\">{%page}</a> ' );\r\n\t\t$pagerLayout->setSelectedTemplate ( '<a class=\"active\" href=\"{%url}\">{%page}</a> ' );\r\n\t\t\r\n\t\t$records = $pagerLayout->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\t\t$pagination = $pagerLayout->display ( null, true );\r\n\t\treturn array ('records' => $records, 'pagination' => $pagination, 'pager' => $pager, 'recordcount' => $dq->count () );\r\n\t}", "private function _get_records($tag_ids, $page_size, $offset, $sort_field, $sort_direction, $search_type, $include_albums) {\n\n $items_model = ORM::factory(\"item\");\n if ($search_type == \"AND\") {\n // For some reason, if I do 'select(\"*\")' the item ids all have values that are 1000+\n // higher then they should be. So instead, I'm manually selecting each column that I need.\n $items_model->select(\"items.id\");\n $items_model->select(\"items.name\");\n $items_model->select(\"items.title\");\n $items_model->select(\"items.view_count\");\n $items_model->select(\"items.owner_id\");\n $items_model->select(\"items.rand_key\");\n $items_model->select(\"items.type\");\n $items_model->select(\"items.thumb_width\");\n $items_model->select(\"items.thumb_height\");\n $items_model->select(\"items.left_ptr\");\n $items_model->select(\"items.right_ptr\");\n $items_model->select(\"items.relative_path_cache\");\n $items_model->select(\"items.relative_url_cache\");\n $items_model->select('COUNT(\"*\") AS result_count');\n }\n $items_model->viewable();\n $items_model->join(\"items_tags\", \"items.id\", \"items_tags.item_id\");\t\t\n $items_model->open();\n $items_model->where(\"items_tags.tag_id\", \"=\", $tag_ids[0]);\n $counter = 1;\n while ($counter < count($tag_ids)) {\n $items_model->or_where(\"items_tags.tag_id\", \"=\", $tag_ids[$counter]);\n $counter++;\n }\n $items_model->close();\n if ($include_albums == false) {\n $items_model->and_where(\"items.type\", \"!=\", \"album\");\n }\n $items_model->order_by($sort_field, $sort_direction);\n $items_model->group_by(\"items.id\");\n if ($search_type == \"AND\") {\n $items_model->having(\"result_count\", \"=\", count($tag_ids));\n }\n\n return $items_model->find_all($page_size, $offset);\n }", "function apachesolr_index_get_entities_to_index($env_id, $entity_type, $limit) {\n $rows = array();\n if (variable_get('apachesolr_read_only', 0)) {\n return $rows;\n }\n $bundles = apachesolr_get_index_bundles($env_id, $entity_type);\n if (empty($bundles)) {\n return $rows;\n }\n\n // Get next batch of entities to index\n $query = _apachesolr_index_get_next_set_query($env_id, $entity_type);\n \n $query->range(0, $limit);\n $records = $query->execute();\n\n $status_callbacks = array();\n foreach ($records as $record) {\n if (!isset($status_callbacks[$record->bundle])) {\n $status_callbacks[$record->bundle] = apachesolr_entity_get_callback($entity_type, 'status callback', $record->bundle);\n }\n // Check status and status callbacks before sending to the index\n if (is_array($status_callbacks[$record->bundle])) {\n foreach ($status_callbacks[$record->bundle] as $status_callback) {\n if (is_callable($status_callback)) {\n // by placing $status in front we prevent calling any other callback\n // after one status callback returned false\n $record->status = $record->status && $status_callback($record->entity_id, $record->entity_type);\n }\n }\n }\n $rows[] = $record;\n }\n return $rows;\n}", "function findAll($expression, $offset = null, $limit = null);", "function readAllPaging($fromRecordNum, $recordsPerPage){\r\n $query = \"SELECT SubjectID, SubjectName\r\n FROM \" . $this->table_name . \r\n \" ORDER BY SubjectName \r\n LIMIT \r\n {$fromRecordNum}, {$recordsPerPage}\";\r\n \r\n $stmt = $this->dbConn->prepare( $query );\r\n $stmt->execute();\r\n \r\n return $stmt;\r\n }", "public function testFetchPageIntegerOffset(){\n $str_gql = \"SELECT * FROM Kind\";\n $obj_request = $this->getBasicFetchRequest();\n $obj_gql_query = $obj_request->mutableGqlQuery();\n $obj_gql_query->setAllowLiteral(TRUE);\n $obj_gql_query->setQueryString($str_gql . \" LIMIT @intPageSize OFFSET @intOffset\");\n\n $obj_arg = $obj_gql_query->addNameArg();\n $obj_arg->setName('intPageSize');\n $obj_arg->mutableValue()->setIntegerValue(11);\n\n $obj_arg_offset = $obj_gql_query->addNameArg();\n $obj_arg_offset->setName('intOffset');\n $obj_arg_offset->mutableValue()->setIntegerValue(22);\n\n $this->apiProxyMock->expectCall('datastore_v4', 'RunQuery', $obj_request, new \\google\\appengine\\datastore\\v4\\RunQueryResponse());\n\n $obj_store = $this->createBasicStore();\n $obj_result = $obj_store->query($str_gql)->fetchPage(11, 22);\n\n $this->assertEquals($obj_result, []);\n $this->apiProxyMock->verify();\n }", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function getAllByTable($connection, $tablename, $select, $limit, $offset, $where);", "function paging($tablename, $fieldlist, $where = '', $orderby = '', $groupby = '', $records=15, $pages=9)\n\t{\n\t\t$converter = new encryption();\n\t\t$dbfunctions = new dbfunctions();\n\t\tif($pages%2==0)\n\t\t\t$pages++;\n\t\t/*\n\t\tThe pages should be odd not even\n\t\t*/\n\t\t$sql = $dbfunctions->GenerateSelectQuery($tablename, $fieldlist, $where, $orderby, $groupby);\n\t\t$dbfunctions->SimpleSelectQuery($sql);\n\t\t$total = $dbfunctions->getNumRows();\n\t\t$page_no = (int) isset($_GET[\"page_no\"])?$converter->decode($_GET[\"page_no\"]):1;\n\t\t/*\n\t\tChecking the current page\n\t\tIf there is no current page then the default is 1\n\t\t*/\n\t\t$limit = ($page_no-1)*$records;\n\t\t$sql = $dbfunctions->GenerateSelectQuery($tablename, $fieldlist, $where, $orderby, $groupby, \" limit $limit,$records\");\n\t\t/*\n\t\tThe starting limit of the query\n\t\t*/\n\t\t$first=1;\n\t\t$previous=$page_no>1?$page_no-1:1;\n\t\t$next=$page_no+1;\n\t\t$last=ceil($total/$records);\n\t\tif($next>$last)\n\t\t\t$next=$last;\n\t\t/*\n\t\tThe first, previous, next and last page numbers have been calculated\n\t\t*/\n\t\t$start=$page_no;\n\t\t$end=$start+$pages-1;\n\t\tif($end>$last)\n\t\t\t$end=$last;\n\t\t/*\n\t\tThe starting and ending page numbers for the paging\n\t\t*/\n\t\tif(($end-$start+1)<$pages)\n\t\t{\n\t\t\t$start-=$pages-($end-$start+1);\n\t\t\tif($start<1)\n\t\t\t\t$start=1;\n\t\t}\n\t\tif(($end-$start+1)==$pages)\n\t\t{\n\t\t\t$start=$page_no-floor($pages/2);\n\t\t\t$end=$page_no+floor($pages/2);\n\t\t\twhile($start<$first)\n\t\t\t{\n\t\t\t\t$start++;\n\t\t\t\t$end++;\n\t\t\t}\n\t\t\twhile($end>$last)\n\t\t\t{\n\t\t\t\t$start--;\n\t\t\t\t$end--;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tThe above two IF statements are kinda optional\n\t\tThese IF statements bring the current page in center\n\t\t*/\n\t\t$this->sql=$sql;\n\t\t$this->records=$records;\n\t\t$this->pages=$pages;\n\t\t$this->page_no=$page_no;\n\t\t$this->total=$total;\n\t\t$this->limit=$limit;\n\t\t$this->first=$first;\n\t\t$this->previous=$previous;\n\t\t$this->next=$next;\n\t\t$this->last=$last;\n\t\t$this->start=$start;\n\t\t$this->end=$end;\n\t}", "public function findAll(): QueryResultInterface;", "function fetchList($limit, $offset);", "public function getPaginatedList($offset, $limit, $criteria = array());", "public function getEntities();", "public function getEntities();", "function get_paged_list($limit = 10, $offset = 0){\n\t $this->db->join('department', 'department.id = employee.Department');\n $this->db->order_by('EmployeeId','asc');\n return $this->db->get($this->tbl_Employeeinfo, $limit, $offset);\n }", "public function paging(){\n\t\t$sql = \"SELECT * FROM berita\";\n\t\t$query = $this->db->query($sql) or die ($this->db->error);\n\t\treturn $query;\n\t}", "private function doRs()\n\t{\n//\t\tprint $this->getStart().'-'.$this->getRowsPerPage();\n\t\tif(!isset($this->rs))\n\t\t{\n\t\t\t$this->criteria->setOffset($this->getStart());\n\t\t\t$this->criteria->setLimit($this->getRowsPerPage());\n\t\t\t$this->rs = call_user_func_array(\n\t\t\t\tarray(\n\t\t\t\t\t$this->getPeerClass(), \n\t\t\t\t\t$this->getPeerSelectMethod()\n\t\t\t\t), \n\t\t\t\tarray(\n\t\t\t\t\t$this->criteria,\n\t\t\t\t\t$this->con\n\t\t\t\t)\n\t\t\t);\n//\t\t\tCommon::printArray(BasePeer::createSelectSql($this->criteria,$temp=array()));\n//\t\t\tCommon::printArray($this->rs);\n\t\t\t$this->currentCount = count($this->rs);\n\t\t}\n\t}", "public function fetchAllInvoices($limit, $offset, $keyword = null, $sortdatafield = null, $sortorder = null) {\n\t\ttry{\n\t\t\t$select = new \\Zend\\Db\\Sql\\Select();\n\t\t\t\n\t\t\t$sm = $this->_serviceManager;\n\t\t\t\n\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\n\t\t\t$resultSetPrototype = new HydratingResultSet();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$tableGateway = new TableGateway($config[\"dbPrefix\"] . 'invoice', $adapter, null, $resultSetPrototype);\n\t\t\t\n\t\t\t$customer_name = new \\Zend\\Db\\Sql\\Expression(\n\t\t\t\t'CONCAT(t3.first_name, \\' \\', t3.last_name)'\n\t\t\t);\n\t\n\t\t\t$select->from(array('t1' => 'de_invoice'))\n\t\t\t\t\t->join(array('t2' => 'de_opportunities'), new \\Zend\\Db\\Sql\\Expression('t2.id = t1.opp_id '), array(\"opp_name\" => \"opportunity_name\"), 'left')\n\t\t\t\t\t->join(array('t3' => 'de_customers'), new \\Zend\\Db\\Sql\\Expression('t3.id = t2.user_id '), array(\"customer_name\" => $customer_name, \"email\"), 'left')\n\t\t\t\t\t->where(\"t1.status != 'DELETED' AND t1.invoice_id IS NOT NULL\");\n\t\t\t\n\t\t\tif(!empty($keyword)){\n\t\t\t\t$where = new \\Zend\\Db\\Sql\\Where();\n\t\t\t\t$where->NEST->addPredicates(array(\n\t\t\t\t\t\tnew \\Zend\\Db\\Sql\\Predicate\\Like('t1.invoice_number', \"%$keyword%\"),\n\t\t\t\t\t\tnew \\Zend\\Db\\Sql\\Predicate\\Like('t3.first_name', \"%$keyword%\"),\n\t\t\t\t\t\tnew \\Zend\\Db\\Sql\\Predicate\\Like('t3.last_name', \"%$keyword%\"),\n\t\t\t\t\t), 'OR'\n\t\t\t\t)->UNNEST;\n\t\t\t\t/*$where->addPredicates(array(\n\t\t\t\t\tnew \\Zend\\Db\\Sql\\Predicate\\Like('u.first_name', \"%$keyword%\"),\n\t\t\t\t));*/\n\t\t\t\t$select->where($where);\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($sortdatafield) && !empty($sortorder)){\n\t\t\t\tif($sortdatafield == 'invoice_number')\n\t\t\t\t\t$select->order(\"t1.invoice_number $sortorder\");\n\t\t\t\telseif($sortdatafield == 'created_date')\n\t\t\t\t\t$select->order(\"t1.created_date $sortorder\");\n\t\t\t\telseif($sortdatafield == 'customer_name')\n\t\t\t\t\t$select->order(\"t3.first_name $sortorder\");\n\t\t\t\telseif($sortdatafield == 'email')\n\t\t\t\t\t$select->order(\"t3.email $sortorder\");\n\t\t\t} else {\n\t\t\t\t$select->order('t1.id DESC');\n\t\t\t}\n\t\t\n\t\t\t$statement = $adapter->createStatement();\t\t\t\n\t\t\t$select->prepareStatement($adapter, $statement);\n\t\t\t$resultSet = new \\Zend\\Db\\ResultSet\\ResultSet();\n\t\t\t$resultSet->initialize($statement->execute());\n\t\t\t\n\t\t\t$select->limit($limit);\n\t\t\t$select->offset($offset);\n\t\t\t\n\t\t\t$statement = $adapter->createStatement();\n\t\t\t$select->prepareStatement($adapter, $statement);\n\t\t\t$resultSetLimit = new \\Zend\\Db\\ResultSet\\ResultSet();\n\t\t\t$resultSetLimit->initialize($statement->execute());\n\t\t\t\n\t\t\t$result['TotalRows'] = count($resultSet);\n\t\t\t$result['Rows'] = $resultSetLimit->toArray();\n\t\t\t\n\t\t\treturn $result;\n\t\t}catch(\\Exception $e){echo $e->getMessage ();\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n\t}", "public function queryAllPaginated(int $start, int $end)\n {\n $offsetPlaceholder = \":startResult\";\n $limitPlaceholder = \":endResult\";\n $statement = sprintf(\"SELECT %s, %s, %s, %s, %s FROM %s WHERE deleted = 0 LIMIT %s OFFSET %s\",\n static::FIELDS[0], static::FIELDS[1], static::FIELDS[2], static::FIELDS[3], static::FIELDS[4], static::TABLE,\n $limitPlaceholder, $offsetPlaceholder);\n $req = $this->db->prepare($statement);\n\n $req->bindValue($offsetPlaceholder, ($start - 1), PDO::PARAM_INT);\n $req->bindValue($limitPlaceholder, ($end - $start + 1), PDO::PARAM_INT);\n\n $response = $req->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($response);\n }", "public function readAction() {\n\t\tif(getParam('id')){\n\t\t\t$model = new $this->model(intval(getParam('id')));\n\t\t\t$records = array(\n\t\t\t\t$this->formatRow($model->get())\n\t\t\t);\n\t\t\t$this->setParam('records', $records);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// get submitted params\n\t\t$sortBy = getParam('sort', false);\n\t\t$filter = json_decode(getParam('filter', '{}'), true);\n\t\t\n\t\t// Setup the filtering and query variables\n\t\t$start = intval(getParam('start', 0));\n\t\t$limit = intval(getParam('limit', 0));\n\t\t\n\t\t//Fields to select\n\t\t$fields = $this->getFields();\n\t\t\n\t\t//From to use\n\t\t$from = $this->getFrom();\n\t\t\n\t\t//Join tables\n\t\t$join = $this->getJoin();\n\t\t\n\t\t//Base where clause\n\t\t$where = $this->getWhere();\n\t\t\n\t\t//Sort\n\t\t$sort = $this->getSort();\n\t\t\n\t\tif ($sortBy) {\n\t\t\t$sortArray = json_decode($sortBy, true);\n\t\t\t$numSorters = count($sortArray);\n\t\t\t$sort = array();\n\t\t\tfor ($i = 0; $i < $numSorters; $i++) {\n\t\t\t\t$sort[] = $sortArray[$i]['property'] . ' ' . $sortArray[$i]['direction'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Filter\n\t\t$where = array_merge($where, $this->applyFilter($filter));\n\t\t\n\n\t\t\n\t\t// convert query data to sql\n\t\t$fieldsSql = implode(',', $fields);\n\t\t$fromSql = ' FROM ' . implode(',', $from);\n\t\t$joinSql = implode(' ', $join);\n\t\t$whereSql = 'WHERE ' . implode(' AND ', $where);\n\t\tif (!count($where)) {\n\t\t\t$whereSql = '';\n\t\t}\n\t\t$sortSql = implode(',', $sort);\n\n\t\t// get total count\n\t\t$total = 0;\n\t\t$totalQuery = \"SELECT COUNT(*) total $fromSql $joinSql $whereSql\";\n\t\t$row = LP_Db::fetchRow($totalQuery);\n\t\tif ($row) {\n\t\t\t$total = $row['total'];\n\t\t}\n\t\t$this->setParam('total', $total);\n\t\t\n\t\t// get records\n\t\t$query = \"SELECT $fieldsSql $fromSql $joinSql $whereSql\";\n\t\t$this->setParam('query', $query);\n\t\tif($limit){\n\t\t\t$query = LP_Util::buildQuery($query, $sortSql, $limit, $start);\n\t\t}\n\t\t$rows = LP_Db::fetchAll($query);\n\t\t$numRows = count($rows);\n\t\t$records = array();\n\t\t\n\t\t//Format rows\n\t\tforeach ($rows as $row){\n\t\t\t$records[] = $this->formatRow($row);\n\t\t}\n\t\t\n\t\t$this->setParam('records', $records);\n\t}", "private function query($offset, $row_count=1) {\n\t\treturn $this->db->query(\"SELECT {$this->expr} FROM {$this->synt} LIMIT {$offset}, {$row_count}\");\n\t}", "public function fetchAll()\n {\n return Accessory::paginate(25);\n }", "public function fetchNrRecordsToGet();", "public static function BuildAllRecord($pagectrl=null) {\n\t\t$qsql = \" select {SELECTOR} from eorder {LIMIT}\n\t\t\t\t\";\n\t\t$orderby = self::GetSortQuery();\n\t\t$sql = self::BuildSelectSQL($qsql,$pagectrl,$orderby);\n\t\t$csql = self::BuildCountSQL($qsql);\t\n\t\tif($pagectrl!=NULL){\t$pagectrl->recordcount = Qry()->ExecuteScalar($csql);\t}\n\t\t\n\t\treturn new MD_EOrderArray($sql);\n\t}", "public function executeSearch()\n {\n // consider translations in database\n $query = $this->qb->getQuery()\n ->setHydrationMode(Query::HYDRATE_ARRAY);\n if (defined(\"\\\\Gedmo\\\\Translatable\\\\TranslatableListener::HINT_FALLBACK\")) {\n $query\n ->setHint(\n Query::HINT_CUSTOM_OUTPUT_WALKER,\n 'Gedmo\\\\Translatable\\\\Query\\\\TreeWalker\\\\TranslationWalker'\n )\n ->setHint(constant(\"\\\\Gedmo\\\\Translatable\\\\TranslatableListener::HINT_FALLBACK\"), true);\n }\n\n if ($this->useDoctrinePaginator) {\n $paginator = new Paginator($query, $this->doesQueryContainCollections());\n // if query has collections, use output walker\n // otherwise an error could occur\n // \"Cannot select distinct identifiers from query on a column from a fetch joined to-many association\"\n if ($this->doesQueryContainCollections()) {\n $paginator->setUseOutputWalkers(true);\n }\n $items = $paginator->getIterator();\n } else {\n $items = $query->execute();\n }\n\n $data = [];\n foreach ($items as $item) {\n if ($this->useDtRowClass && !is_null($this->dtRowClass)) {\n $item['DT_RowClass'] = $this->dtRowClass;\n }\n if ($this->useDtRowId) {\n $item['DT_RowId'] = $item[$this->rootEntityIdentifier];\n }\n // Go through each requested column, transforming the array as needed for DataTables\n foreach ($this->parameters as $index => $parameter) { //($i = 0 ; $i < count($this->parameters); $i++) {\n // Results are already correctly formatted if this is the case...\n if (!$this->associations[$index]['containsCollections']) {\n continue;\n }\n\n $rowRef = &$item;\n $fields = explode('.', $this->parameters[$index]);\n\n // Check for collection based entities and format the array as needed\n while ($field = array_shift($fields)) {\n $rowRef = &$rowRef[$field];\n // We ran into a collection based entity. Combine, merge, and continue on...\n if (!empty($fields) && !$this->isAssocArray($rowRef)) {\n $children = array();\n while ($childItem = array_shift($rowRef)) {\n $children = array_merge_recursive($children, $childItem);\n }\n $rowRef = $children;\n }\n }\n }\n\n // Prepare results with given callbacks\n if (!empty($this->callbacks['ItemPreperation'])) {\n foreach ($this->callbacks['ItemPreperation'] as $key => $callback) {\n $item = $callback($item);\n }\n }\n $data[] = $item;\n }\n\n $this->datatable = $this->datatablesModel->getOutputData($data, (int)$this->echo, $this->getCountAllResults(), $this->getCountFilteredResults());\n return $this;\n }", "function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {\n//echo ($this->sql($this->select(), $offset, $rowcount, $sort, $includeContactIDs, NULL));\n return $this->sql($this->select(), $offset, $rowcount, $sort, $includeContactIDs, NULL);\n\n }", "public function do_paging()\n {\n }", "public static function obtenerPaginate()\n {\n $rs = self::builder();\n return $rs->paginate(self::$paginate) ?? [];\n }", "public function getAllRecords();", "#[Pure] public function generatePagination(): string\n {\n return $this->dbc->generatePagination($this->pageSize, $this->pageNumber);\n }", "public function getPaginated();", "public function findAll(stubBaseReflectionClass $entityClass, $orderBy = null, $offset = null, $amount = null);", "public function all(): ResultSetContract;", "function getPagingInfo($sql,$input_arguments=null);", "public function fetchAllPaginated($sql, $params = array(), $itemsPerPage, $isFirstPage);", "public function fetchAll(){\n $adapter = $this->adapter;\n $sql = new Sql($this->adapter);\n $select = $sql->select();\n $select->from('flota');\n $selectString = $sql->getSqlStringForSqlObject($select);\n $data = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n \n return $data;\n }", "function readAll($from_record_num, $records_per_page)\n\t{\n\t\t//limit per la pagina\n\t\t$query = \"SELECT\n id,nome,dmi,status,id_utente\n \n\t\t\t\tFROM \".$this->table_name.\" \n ORDER BY id DESC\n LIMIT ?, ?\";\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $from_record_num, PDO::PARAM_INT);\n\t\t$stmt->bindParam(2, $records_per_page, PDO::PARAM_INT);\n\t\t$stmt->execute();\n\t\treturn $stmt;\n\t}", "public function getRows()\n {\n $query = $this->getQuery();\n \n if (!empty($this->columns)) {\n $query->select(implode(', ', $this->columns));\n }\n \n foreach ($this->sort as $key => $value) {\n $query->sortBy($key, $value);\n }\n \n if ($this->range) {\n $query->limit($this->start, $this->range);\n }\n \n if (!empty($this->group)) {\n $query->groupBy($this->group);\n }\n \n return $this->database->query($query, $this->database->getBinds());\n }", "public function getIterator() {\n\t\t// Load related records for current row\n\t\t$data = $this->execute();\n\t\treturn $data ? $data : array();\n\t}", "public function fetchAllToPaginator()\n {\n return $this->selectToPaginator($this->getDbTable()\n ->select()\n ->from($this->getDbTable()->getTableName()));\n }", "public function findAll(?int $limit = null, string $orderBy = 'id ASC'): \\Generator\n {\n $query = new Query\\Select($this->klass);\n\n $query->orderBy($orderBy);\n\n if ($limit !== null) {\n $query->limit($limit);\n }\n\n yield from $this->db->select($this->klass, $query);\n }", "public function get_rows()\n {\n $lock = !empty($this->configs['rows_edit']) && $this->configs['rows_edit'] == 1 ? true : false;\n\n $tables = $this->file->sheets->first()->tables;\n\n list($query, $power) = $this->get_rows_query($tables);\n\n $head = $tables[0]->columns->map(function($column) { return 'C' . $column->id; })->toArray();\n\n if (Input::has('search.text') && Input::has('search.column_id')) {\n $query->where('C' . Input::get('search.column_id'), Input::get('search.text'));\n }\n\n $query->whereNull('deleted_at')->select($head)->addSelect('id');\n\n $paginate = $this->isCreater()\n ? $query->addSelect('created_by')->paginate(15)\n : $query->where('created_by', $this->user->id)->paginate(15);\n\n $encrypts = $tables[0]->columns->filter(function($column) { return $column->encrypt; });\n\n if (!$encrypts->isEmpty()) {\n $paginate->getCollection()->each(function($row) use($encrypts) {\n $this->setEncrypts($row, $encrypts);\n });\n }\n return ['paginate' => $paginate->toArray(),'lock' => $lock];\n }", "public function execute() {\n\n // Add convenience tag to mark that this is an extended query. We have to\n // do this in the constructor to ensure that it is set before preExecute()\n // gets called.\n if (!$this->preExecute($this)) {\n return NULL;\n }\n\n // A NULL limit is the \"kill switch\" for pager queries.\n if (empty($this->limit)) {\n return;\n }\n $this->ensureElement();\n\n $total_items = $this->getCountQuery()->execute()->fetchField();\n $current_page = pager_default_initialize($total_items, $this->limit, $this->element);\n $this->range($current_page * $this->limit, $this->limit);\n\n // Now that we've added our pager-based range instructions, run the query normally.\n return $this->query->execute();\n }", "public function showList()\n {\n $query = \"SELECT * FROM todos LIMIT :numRecs OFFSET :offsetVal\";\n $stmt = $this->dbConnection->prepare($query);\n $stmt->bindValue(':numRecs', $this->numRecords, PDO::PARAM_INT);\n $stmt->bindValue(':offsetVal', $this->offsetValue, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public static function getAll()\n {\n $sql = sprintf(\n 'SELECT * FROM `%s` LIMIT :limitFrom, :perPage',\n static::getTableName()\n );\n $stmt = static::getConn()->prepare($sql);\n $stmt->bindValue(':limitFrom', static::LIMIT_FROM, \\PDO::PARAM_INT);\n $stmt->bindValue(':perPage', static::PER_PAGE, \\PDO::PARAM_INT);\n\n $stmt->execute();\n\n $info = $stmt->errorInfo();\n if ($info[0] !== \\PDO::ERR_NONE) {\n die('We have : ' . $info[2]);\n }\n\n return $stmt->fetchAll(\n \\PDO::FETCH_CLASS |\n \\PDO::FETCH_PROPS_LATE,\n get_called_class()\n );\n }", "public function fetchRecords() {\n return self::all();\n }", "function show_posts($post_per_page, $connection){\n $start = (current_page() > 1) ? current_page() * $post_per_page - $post_per_page : 0;\n $sentence = $connection->prepare(\"SELECT SQL_CALC_FOUND_ROWS * FROM articles LIMIT $start, $post_per_page\");\n $sentence->execute();\n return $sentence->fetchAll();\n}", "public function readPaging($from_record_num, $records_per_page){\n \n // select query\n $query = \"SELECT\n t.name as type_name, p.id, p.name, p.soluong, p.gia, p.avatar, p.category, p.type, p.content, p.created_at, p.updated_at\n FROM\n \" . $this->table_name . \" p\n LEFT JOIN\n type t\n ON p.type = t.id\n ORDER BY p.created_at DESC\n LIMIT ?, ?\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind variable values\n $stmt->bindParam(1, $from_record_num, PDO::PARAM_INT);\n $stmt->bindParam(2, $records_per_page, PDO::PARAM_INT);\n \n // execute query\n $stmt->execute();\n \n // return values from database\n return $stmt;\n}", "public abstract function fetchAll();", "public function getIndexes(string $entity): array;", "function getResult($limit, $idField, $dateField = null);", "function paging($tablename, $where, $orderby, $url, $PageNo, $PageSize, $Pagenumber, $ModePaging) {\n if ($PageNo == \"\") {\n $StartRow = 0;\n $PageNo = 1;\n }\n else {\n $StartRow = ($PageNo - 1) * $PageSize;\n }\n if ($PageSize < 1 || $PageSize > 1000) {\n $PageSize = 15;\n }\n if ($PageNo % $Pagenumber == 0) {\n $CounterStart = $PageNo - ($Pagenumber - 1);\n }\n else {\n $CounterStart = $PageNo - ($PageNo % $Pagenumber) + 1;\n }\n $CounterEnd = $CounterStart + $Pagenumber;\n $sql = \"SELECT COUNT(id) FROM \" . $tablename . \" where \" . $where;\n $result_c = $this->doSQL($sql);\n $row = mysql_fetch_array($result_c);\n $RecordCount = $row[0];\n $result = $this->getDynamic($tablename, $where, $orderby . \" LIMIT \" . $StartRow . \",\" . $PageSize);\n if ($RecordCount % $PageSize == 0)\n $MaxPage = $RecordCount / $PageSize;\n else\n $MaxPage = ceil($RecordCount / $PageSize);\n $gotopage = \"\";\n switch ($ModePaging) {\n case \"Full\" :\n $gotopage = '<div class=\"paging_meneame\">';\n if ($MaxPage > 1) {\n if ($PageNo != 1) {\n $PrevStart = $PageNo - 1;\n $gotopage .= ' <a href=\"' . $url . '&PageNo=1\" tile=\"First page\"> &laquo; </a>';\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $PrevStart . '\" title=\"Previous page\"> &lsaquo; </a>';\n }\n else {\n $gotopage .= ' <span class=\"paging_disabled\"> &laquo; </span>';\n $gotopage .= ' <span class=\"paging_disabled\"> &lsaquo; </span>';\n }\n $c = 0;\n for ($c = $CounterStart; $c < $CounterEnd;++$c) {\n if ($c <= $MaxPage)\n if ($c == $PageNo)\n $gotopage .= '<span class=\"paging_current\"> ' . $c . ' </span>';\n else\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $c . '\" title=\"Page ' . $c . '\"> ' . $c . ' </a>';\n }\n if ($PageNo < $MaxPage) {\n $NextPage = $PageNo + 1;\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $NextPage . '\" title=\"Next page\"> &rsaquo; </a>';\n }\n else {\n $gotopage .= ' <span class=\"paging_disabled\"> &rsaquo; </span>';\n }\n if ($PageNo < $MaxPage)\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $MaxPage . '\" title=\"Last page\"> &raquo; </a>';\n else\n $gotopage .= ' <span class=\"paging_disabled\"> &raquo; </span>';\n }\n $gotopage .= ' </div>';\n break;\n }\n $arr[0] = $result;\n $arr[1] = $gotopage;\n $arr[2] = $tablename;\n return $arr;\n }", "public function fetchRows( $type = FETCH_OBJ );", "public function getRecords()\n {\n $result = $this->fetchAll($this->select()->order('id ASC'))->toArray();\n return $result;\n }", "public function GetByPaginated($offset, $limit);", "public function makeSQL( $type ) {\n $this->pager->setTotal( $this->count() );\n $this->pager->setQuery( $this );\n return parent::makeSQL( $type );\n }", "protected function generateQuery($criteria = array(), $limit = array())\n {\n }", "protected function generateQuery($criteria = array(), $limit = array())\n {\n }", "public function BuscarListar($where,$page_start,$page_end)\r\n\t{\r\n\t\t$fields=\" \r\n\t\t\tid\r\n\t\t\t,Nombre\r\n\t\t\t,Descrip\r\n\t\t\t,ROW_NUMBER() over (order by Nombre desc) as rownum \r\n\t\t\";\r\n\t\t$sql=$this->GeneraSelectQuery($fields,$where);\r\n\t\t$query = $this->db->query(\"SELECT * FROM (\".$sql.\") as TBL where rownum BETWEEN \".$page_start.\" AND \".$page_end.\" order by TBL.Nombre desc\");\r\n\t\treturn $query->result();\r\n\t}", "public function getList($entity, $page, $perPage, $sortBy, $sortDesc, $filter=[], $options=[], $formatParams=[]) {\n $disableVersioning = $options['disableVersioning'] ?? false;\n\n $config = $this->em->getConfiguration();\n $meta = $this->em->getClassMetadata($entity);\n $fields = $meta->getFieldNames();\n $repo = $this->em->getRepository($entity);\n $att = $options['attrs'] ?? $repo->attSettings();\n $to_sort = [];\n $to_sort_join = [];\n $to_sort_entity = [];\n foreach ($att as $field=>$field_params) {\n $sort = $field_params['sort'] ?? true;\n $type = $field_params['type'];\n if ($sort) {\n $to_sort[] = $field;\n if ($type === 'joinfield') {\n $to_sort_join[] = $field;\n } elseif ($type === 'entity') {\n $to_sort_entity[] = $field;\n }\n }\n }\n $sortBy = ($sortBy and in_array($sortBy, $to_sort)) ? $sortBy : ($repo->sort_by ?? 'id');\n\n // main query\n $qb = $repo->createQueryBuilder('e');\n if (isset($options['fields'])) {\n $options['fields'][] = 'id';\n $qb->select('partial e.{'.implode(',', $options['fields']).'}');\n }\n if (in_array($sortBy, $to_sort_join)) { // first field used for sorting\n $query = $qb->orderBy($att[$sortBy]['join_field'].'.'.$att[$sortBy]['join_field_data']['0']['field'], $sortDesc ? 'DESC' : 'ASC');\n } elseif (in_array($sortBy, $to_sort_entity)) {\n $query = $qb->orderBy($sortBy.'.'.$att[$sortBy]['label_field'], $sortDesc ? 'DESC' : 'ASC');\n } else {\n $query = $qb->orderBy('e.'.$sortBy, $sortDesc ? 'DESC' : 'ASC');\n }\n\n // filters\n $filterQuery = new FilterQuery($repo, $meta, $this->filterManager, $options);\n\n $search = '';\n foreach ($filter as $filter_data) {\n if (isset($filter_data['ftype']) and $filter_data['ftype'] === 'search') {\n $search = $filter_data['val'];\n break;\n }\n }\n\n $filter_by_fields = [];\n if (!empty($filter)) {\n foreach ($filter as $fi) {\n $f_att = $fi['att']['0'] ?? null;\n if (!is_null($f_att)) {\n $filter_by_fields[$f_att] = $fi; // single filter for field\n }\n }\n }\n\n $join_fields = [];\n // find fields for join\n foreach ($att as $field=>$field_params) {\n $type = $field_params['type'];\n if ($type === 'joinfield') {\n $join_fields[$field_params['join_field']][$field] = $field_params['join_field_data'];\n }\n }\n\n // relations\n foreach ($att as $field=>$field_params) {\n if (isset($options['fields']) and !in_array($field, $options['fields'])) continue;\n $type = $field_params['type'];\n $widget = $field_params['widget'] ?? 'text';\n $load_list = $field_params['load_list'] ?? true;\n $is_search = $field_params['search'] ?? true;\n $field_joined = false;\n // must join for filter\n if ($type === 'entity' or $type === 'join' or $type === 'entitylist') {\n if ($search) {\n if ($is_search) {\n $filterQuery->addJoin($field);\n if ($type === 'entitylist') {\n $filterQuery->addJoin($field_params['join_field'], $field);\n }\n $field_joined = true;\n }\n } else {\n if (isset($join_fields[$field])) {\n foreach (array_keys($join_fields[$field]) as $j_f) {\n if (isset($filter_by_fields[$j_f])) {\n $filterQuery->addJoin($field);\n $field_joined = true;\n break;\n }\n }\n } else {\n if (isset($filter_by_fields[$field]) and $filter_by_fields[$field]) {\n $filterQuery->addJoin($field);\n if ($type === 'entitylist') {\n $filterQuery->addJoin($field_params['join_field'], $field);\n }\n $field_joined = true;\n }\n }\n }\n }\n if (!$load_list and $type !== 'join') continue;\n if ($type === 'entity') {\n $w_params = $field_params['widget_params'] ?? [];\n $w_exp = $w_params['expanded'] ?? false;\n $w_label = $w_params['choice_label'] ?? null;\n if (!$w_label and isset($field_params['label_field'])) {\n $w_label = $field_params['label_field'];\n }\n $e_join_fields = [];\n if (isset($join_fields[$field])) {\n foreach ($join_fields[$field] as $j_data) {\n foreach ($j_data as $j_f_data) {\n $e_join_fields[] = $j_f_data['field'];\n }\n }\n }\n $canSort = false;\n if (isset($att[$sortBy]['join_field_data'])) {\n foreach ($att[$sortBy]['join_field_data'] as $j_data) {\n if (in_array($j_data['field'], $e_join_fields)) {\n $canSort = true;\n break;\n }\n }\n }\n $data_full_fields = [];\n if (isset($field_params['data_full'])) {\n foreach ($field_params['data_full'] as $ff) {\n if ($ff === 'id' or $ff === $w_label) {\n continue;\n }\n $data_full_fields[] = $ff;\n }\n }\n $query->leftJoin('e.'.$field, $field)\n ->addSelect('partial '.$field.'.{id'.($w_label ? ','.$w_label : '').\n (empty($data_full_fields) ? '' : ','.implode(',', $data_full_fields)).\n (isset($join_fields[$field]) ? ','.implode(',', $e_join_fields) : '').'}');\n if ($sortBy === $field or $canSort) {\n // must join is sorting\n if (!$field_joined) $filterQuery->addJoin($field);\n }\n } elseif ($type === 'entitylist') {\n $extra_fields = $field_params['extra_fields'] ?? [];\n $junction_fields = array_merge([$field_params['join_field']],\n array_keys($extra_fields));\n $query->leftJoin('e.'.$field, $field)\n ->addSelect('partial '.$field.'.{id,'.implode(',', $junction_fields).'}')\n ->leftJoin($field.'.'.$field_params['join_field'],\n $field.'_'.$field_params['join_field'])\n ->addSelect('partial '.$field.'_'.$field_params['join_field'].\n '.{id,'.implode(',', array_keys($field_params['main_fields'])).'}');\n } elseif ($type === 'join') {\n $is_versioning = $field_params['versioning'] ?? false;\n $e_join_fields = [];\n if (isset($join_fields[$field])) {\n foreach ($join_fields[$field] as $j_data) {\n foreach ($j_data as $j_f_data) {\n $e_join_fields[] = $j_f_data['field'];\n }\n }\n }\n if ($is_versioning) {\n $e_join_fields[] = 'version';\n }\n $query->leftJoin('e.'.$field, $field)\n ->addSelect('partial '.$field.'.{id,'.implode(',', $e_join_fields).'}');\n if ($is_versioning) {\n $joinRepo = $this->em->getRepository($meta->associationMappings[$field]['targetEntity']);\n $query->andWhere($field.'.version = ('.\n $joinRepo->createQueryBuilder($field.'ver')->select('MAX('.$field.'ver.version)')\n ->where($field.'ver.'.$meta->associationMappings[$field]['mappedBy'].' = e.id')->getDql().\n ') OR '.$field.'.version IS NULL');\n }\n if (in_array($sortBy, $e_join_fields)) {\n // must join is sorting\n if (!$field_joined) $filterQuery->addJoin($field);\n }\n }\n }\n\n $is_filter = false;\n if (!empty($filter)) {\n if ($att) {\n foreach ($att as $attcol=>$attr) {\n $filter_check = isset($attr['filter_check']) ? boolval($attr['filter_check']) : false;\n if ($filter_check) {\n $att[$attcol]['filter'] = true;\n }\n }\n }\n $filter_info = $this->getFilterInfo($entity, $att);\n }\n $deleted_filter = false;\n foreach ($filter as $filter_data) {\n if (isset($filter_data['ftype'])) {\n if ($filter_data['ftype'] === 'search') {\n if ($search) {\n $is_filter = $filterQuery->filter('search', [$filter_data['val'], $att]);\n }\n continue;\n }\n $filterQuery->setQueryClass($filter_data['ftype']);\n $flt = $filterQuery->filter($filter_data['type'], [$filter_data, $filter]);\n if (!$is_filter) {\n $is_filter = $flt;\n }\n $filterQuery->restoreQueryClass();\n continue;\n }\n $field = $filter_data['att']['0'];\n if ($field === 'isDeleted') {\n $deleted_filter = true;\n }\n $field_params = $att[$field] ?? null;\n if (!isset($filter_info[$field])) continue;\n $filterQuery->setQueryClass($filter_info[$field]['class']);\n $f_type = $filter_data['type'] ?? $filter_info[$field]['type'] ?? 'string';\n $field_type = $field_params['type'] ?? 'string';\n $field_widget = $field_params['widget'] ?? 'text';\n if ($field_type === 'entitylist' and $f_type === 'single') {\n $f_type = 'multipleEntity';\n }\n // apply filters\n if ($field_params) { // filter by field\n $alias = null;\n if ($field_type === 'joinfield') {\n $alias = $field_params['join_field'];\n if (count($field_params['join_field_data']) === 1) {\n $field = $field_params['join_field_data']['0']['field'];\n } else { // many fields - special type\n $f_type = 'stringOR';\n $field = array_column($field_params['join_field_data'], 'field');\n }\n }\n if ($field_type === 'entity' and $field_widget === 'subformadd') { // many-to-many\n $alias = $field;\n $field = 'id';\n }\n if ($f_type === 'multiple' and $field_type === 'entity') { // many-to-many\n $alias = $field;\n $field = 'id';\n }\n if (!is_array($field) and isset($filter_info[$field]['field'])) {\n $field = $filter_info[$field]['field'];\n }\n if (isset($filter_data['mod']) and\n $filter_data['mod'] === 'null') { // not filled attribute\n $flt = $filterQuery->filter('null', [$field, $alias]);\n } else { // filter by certain value\n $flt = $filterQuery->filter($f_type, [$field, $filter_data, $alias]);\n }\n } else { // special filter\n $flt = $filterQuery->filter($f_type, [$filter_data, $filter]);\n }\n if (!$is_filter) {\n $is_filter = $flt;\n }\n }\n $filterQuery->restoreQueryClass();\n if (method_exists($repo, 'listFilter')) {\n $repo->listFilter($filterQuery, $filter); // repository custom filter\n }\n if (in_array('isDeleted', $fields) and !$deleted_filter) {\n $filterQuery->filter('string', ['isDeleted', ['mod'=>'eq', 'val'=>'0']]);\n }\n // by id\n if (isset($filter['id'])) {\n $filterQuery->filter('number', ['id', $filter['id']]);\n }\n //dump($filterQuery->getQueryBuilder()->getQuery()->getDql()); die;\n\n // execute count query for filters to getting total number of elements\n $count_total = $filterQuery->setSelectCount()->setOrder('id', 'DESC')\n ->getQueryBuilder()->getQuery()->getSingleScalarResult();\n\n $check_total = isset($options['check_total']) ? $options['check_total'] : false;\n if ($check_total and $count_total > $perPage) {\n return ['data'=>'not_all'];\n }\n\n // execute filter query to getting elements identificators\n $filterQuery->setSelectId();\n if (in_array($sortBy, $to_sort_join)) {\n $filterQuery->setOrder($att[$sortBy]['join_field_data']['0']['field'], $sortDesc, $att[$sortBy]['join_field']);\n } elseif (in_array($sortBy, $to_sort_entity)) {\n $filterQuery->setOrder($att[$sortBy]['label_field'], $sortDesc, $sortBy);\n } else {\n $filterQuery->setOrder($sortBy, $sortDesc);\n }\n $fltQuery = $filterQuery->getQueryBuilder()->getQuery();\n if ($perPage) {\n $fltQuery\n ->setFirstResult($perPage * ($page - 1))\n ->setMaxResults($perPage);\n }\n $fltRes = $fltQuery->getScalarResult();\n $is_versioning = $repo->is_versioning ?? false;\n if ($is_versioning and !$disableVersioning) {\n $filterRes = array_column($fltRes, 'version', 'id');\n } else {\n $filterRes = array_column($fltRes, 'id');\n }\n\n $queryFilter = $filterQuery->getQueryBuilder()->getQuery();\n $filterParams = [];\n foreach ($queryFilter->getParameters() as $param) {\n $filterParams[$param->getName()] = $param->getValue();\n }\n\n if ($is_versioning and !$disableVersioning) {\n $version_cond = ['e.id = 0'];\n foreach ($filterRes as $el_id=>$el_ver) {\n $version_cond[] = $qb->expr()->andX(...[\n 'e.id = '.$el_id,\n 'e.version = '.$el_ver\n ]);\n }\n $query->andWhere($qb->expr()->orX(...$version_cond));\n } else {\n $filterRes[] = 0; // in case when nothing is found\n $query->andWhere($qb->expr()->in('e.id', $filterRes));\n }\n $q = $query->getQuery();\n // execute main query\n $fetchObjects = $options['fetchObjects'] ?? false;\n $data = $dataFull = $q->getResult();\n $data_full = [];\n if (!$fetchObjects) { // format data\n foreach ($data as $idx=>$dataObj) {\n if (isset($options['fields'])) {\n $formatParams['format_fields'] = $options['fields'];\n }\n if (isset($options['attrs'])) {\n $formatParams['attrs'] = $options['attrs'];\n }\n $data[$idx] = $this->dataFormat($dataObj, $formatParams);\n $data_full[$idx] = $data[$idx]['_dataFull'] ?? [];\n }\n }\n // get columns parameters for current user\n //$userSettings = $this->tokenStorage->getToken()->getUser()->getSettings();\n //$userGridSettings = $userSettings ? json_decode($userSettings->getGrid(), true) : [];\n return [\n 'query' => [\n 'main' => [\n 'dql' => $query->getDql(),\n 'sql' => $q->getSql(),\n ],\n 'filter' => [\n 'dql' => $filterQuery->getQueryBuilder()->getDql(),\n 'sql' => $queryFilter->getSql(),\n 'parameters' => $filterParams,\n ]\n ],\n 'is_filter' => $is_filter,\n 'total' => $count_total,\n 'per_page' => $perPage,\n 'current_page' => $page,\n 'sort_by' => $sortBy,\n 'sort_desc' => $sortDesc,\n 'data' => $data,\n 'data_full' => $data_full,\n '_dataFull' => $dataFull,\n //'columns' => $repo->formatColumns(null, $userGridSettings[mb_strtolower($entity)] ?? []),\n 'columns' => method_exists($repo, 'formatColumns') ? $repo->formatColumns($att) : $this->formatColumns($att),\n ];\n }", "function fetchFromAnyTable($table = null, $from = null, $to = null, $data = array(), $limit = 10000, $start = 0, $returnType = \"RESULTSET\", $where = null, $between = null, $orderBy = null) {\n\n if ($data == null) {\n $data = array(\"*\");\n }\n $tableColumnName = implode(',', $data);\n $query = \"\";\n $whereString = \"\";\n\n $count = 0;\n foreach ($where as $key => $data) {\n\n if (count($where) > 0) {\n\n if ($count == 0) {\n $whereString.=\"`$key` = '$data' \";\n } else {\n\n $whereString.=\"AND `$key` = '$data'\";\n }\n }\n $count++;\n }\n\n $orderByUnit = '';\n if ($orderBy != null) {\n if (count($orderBy) > 0)\n $orderByUnit = 'ORDER BY';\n foreach ($orderBy as $data) {\n\n\n if (count($orderBy) > 0) {\n\n if ($count == 0) {\n $orderByUnit.=\" '$data' \";\n } else {\n $orderByUnit.=\"AND '$data'\";\n }\n }\n }\n }\n\n if ($returnType == \"RESULTSET\") {\n $query = \"\n SELECT $tableColumnName FROM $table\n WHERE $whereString AND IF((:from !='' AND :to !='' AND :between !=''), :between BETWEEN :from AND :to ,1) $orderByUnit LIMIT %d , %d \";\n } else if ($returnType == \"ROWCOUNT\") {\n $query = \"\n SELECT COUNT('id_employee_type') AS count FROM $table\n WHERE $whereString \n AND IF((:from !='' AND :to !='' AND :between !=''), :between BETWEEN :from AND :to ,1) $orderBy LIMIT %d , %d \";\n }\n // echo $query;\n $sql = sprintf($query, $start, $limit);\n\n $data = array(\n 'between' => $between,\n 'from' => $from,\n 'to' => $to);\n\n return $this->db->mod_select($sql, $data, PDO::FETCH_ASSOC);\n }", "public function read()\n {\n $query = $this->queryBuilder->new($this->entityName)\n ->select()\n ->get();\n\n return $this->executeQueryForMultipleResults($query);\n }", "public function liste_chunk($limit = 0, $offset = 1, $filters = null, $ordercol = 2, $ordering = \"asc\")\n {\n\n /* Replace by query:\n\n SELECT fac_id AS RowID, fac_id, fac_rappel, fac_id_rappel, fac_date, fac_tva, ctc_id_comptable, dvi_id_comptable,\n dvi_client, ctc_nom, dvi_correspondant, cor_nom, cor_email, fac_transmise, fac_etat, fac_relance, fac_contentieux,\n fac_notes, cor_telephone1, vef_etat, cor_telephone2, ctc_email, ctc_telephone, ctc_mobile, fac_couleur, fac_masque,\n fac_fichier, fac_reference, scv_nom, dvi_reference, fac_reprise,\n fac_montant_htnr, fac_montant_ht, fac_montant_tva, fac_montant_ttc, fac_regle, fac_reste,\n --psevdo-php ($v->solde_du >= 0.01 AND $v->fac_etat == 2)? $v->due = 1 : $v->due = 0;\n fac_reste AS solde_du,\n IF( fac_reste>=0.01 AND fac_etat=2, 1, 0) AS due\n FROM `t_factures`\n LEFT JOIN `t_commandes` ON `cmd_id` = `fac_commande`\n LEFT JOIN `t_devis` ON `dvi_id` = `cmd_devis`\n LEFT JOIN `t_contacts` ON `ctc_id` = `dvi_client`\n LEFT JOIN `t_correspondants` ON `cor_id` = `dvi_correspondant`\n LEFT JOIN `t_societes_vendeuses` ON `scv_id` = `dvi_societe_vendeuse`\n LEFT JOIN `v_etats_factures` ON `vef_id` = `fac_etat`\n WHERE `fac_inactif` IS NULL\n ORDER BY `fac_date` DESC , `fac_reference` DESC\n\n */\n\n $this->load->helper('calcul_factures');\n\n /* Disable query builder\n // première partie du select, mis en cache\n $this->db->start_cache();\n // lecture des informations\n\n $this->db->select(\"fac_id, fac_id AS RowID,fac_rappel,fac_id_rappel,fac_date,fac_tva,ctc_id_comptable,dvi_id_comptable,dvi_client,ctc_nom,\"\n .\"dvi_correspondant,cor_nom,cor_email,fac_transmise,fac_etat,fac_relance,fac_contentieux,fac_notes,\"\n .\"cor_telephone1,vef_etat,cor_telephone2,ctc_email,ctc_telephone,ctc_mobile,fac_couleur,fac_masque,\"\n .\"fac_fichier,fac_id_rappel,fac_reference,scv_nom,dvi_reference,fac_reprise\",false);\n $this->db->join('t_commandes','cmd_id=fac_commande','left');\n $this->db->join('t_devis','dvi_id=cmd_devis','left');\n $this->db->join('t_contacts','ctc_id=dvi_client','left');\n $this->db->join('t_correspondants','cor_id=dvi_correspondant','left');\n $this->db->join('t_societes_vendeuses','scv_id=dvi_societe_vendeuse','left');\n $this->db->join('v_etats_factures','vef_id=fac_etat','left');\n $this->db->where('fac_inactif is null');\n $this->db->order_by('fac_date','DESC');\n $this->db->order_by('fac_reference','DESC');\n\n $this->db->stop_cache();\n\n $table = 't_factures';\n\n // aliases\n $aliases = array( );\n\n $resultat = $this->_filtre($table,$this->get_filterable_columns(),$aliases,$limit,$offset,$filters,0,NULL);\n $this->db->flush_cache();\n\n */\n $resultat = array();\n $q = $this->db->query(\"SELECT fac_id, fac_id AS RowID, fac_rappel, fac_id_rappel, fac_date, fac_tva,\n IF(dvi_id_comptable > 0, CAST(dvi_id_comptable AS CHAR(30)), idc_id_comptable) AS ctc_id_comptable, dvi_id_comptable,\n dvi_client, ctc_nom, dvi_correspondant, cor_nom, cor_email, fac_transmise, fac_etat, fac_relance, fac_contentieux,\n fac_notes, cor_telephone1, vef_etat, cor_telephone2, ctc_email, ctc_telephone, ctc_mobile, fac_couleur, fac_masque,\n fac_fichier, fac_reference, scv_nom, dvi_reference, fac_reprise\n FROM `t_factures`\n LEFT JOIN `t_commandes` ON `cmd_id` = `fac_commande`\n LEFT JOIN `t_devis` ON `dvi_id` = `cmd_devis`\n LEFT JOIN `t_id_comptable` ON (`dvi_client` = `idc_contact` AND `dvi_societe_vendeuse` = `idc_societe_vendeuse`)\n LEFT JOIN `t_contacts` ON `ctc_id` = `dvi_client`\n LEFT JOIN `t_correspondants` ON `cor_id` = `dvi_correspondant`\n LEFT JOIN `t_societes_vendeuses` ON `scv_id` = `dvi_societe_vendeuse`\n LEFT JOIN `v_etats_factures` ON `vef_id` = `fac_etat`\n WHERE `fac_inactif` IS NULL\n ORDER BY `fac_date` DESC , `fac_reference` DESC \");\n\n if ($q->num_rows() > 0) {\n $resultat = array(\"data\" => $q->result(), \"recordsTotal\" => $q->num_rows(), \"recordsFiltered\" => $q->num_rows(),\n \"recordsOffset\" => $offset, \"recordsLimit\" => $limit,\n \"ordercol\" => \"fac_date\", \"ordering\" => \"desc\");\n //return $result;\n } else {\n $resultat = array(\"data\" => array(), \"recordsTotal\" => 0, \"recordsFiltered\" => 0, \"recordsOffset\" => $offset, \"recordsLimit\" => $limit);\n //return $result;\n }\n\n $resultat2 = array();\n foreach ($resultat['data'] as $v) {\n // informations de prix\n $data = new stdClass();\n $data->fac_id = $v->fac_id;\n $data->fac_tva = $v->fac_tva;\n $data->fac_etat = $v->fac_etat;\n $data->vef_etat = $v->vef_etat;\n $data->fac_reprise = $v->fac_reprise;\n $data = calcul_factures($data);\n $v->fac_etat = $data->fac_etat;\n $v->vef_etat = $data->vef_etat;\n $v->total_HT = $data->fac_montant_ht;\n $v->total_TTC = $data->fac_montant_ttc;\n $v->solde_du = $data->fac_reste;\n if ($v->solde_du >= 0.01 and $v->fac_etat == 2) {\n $v->due = 1;\n } else {\n $v->due = 0;\n }\n\n // informations de règlement\n $query = $this->db->where('ipu_facture', $v->fac_id)\n ->where('ipu_inactif is null')\n ->select('ipu_reglement,rgl_reference')\n ->join('t_reglements', 'rgl_id=ipu_reglement', 'left')\n ->get_compiled_select('t_imputations', false);\n //log_message('DEBUG', 'M_factures informations de règlement\\n '. $query);\n $q = $this->db->query($query);\n $reglements = '';\n $sep = '';\n foreach ($q->result() as $r) {\n $reglements .= $sep . anchor_popup('reglements/detail/' . $r->ipu_reglement, $r->rgl_reference);\n $sep = '<br />';\n }\n $v->reglements = $reglements;\n\n // autres informations\n $v->mail = ($v->cor_email != '') ? $v->cor_email : $v->ctc_email;\n $v->telephone = ($v->cor_telephone1 != '') ? $v->cor_telephone1 : $v->ctc_telephone;\n $v->portable = ($v->cor_telephone2 != '') ? $v->cor_telephone2 : $v->ctc_mobile;\n $v->texte_rappel = '';\n if ($v->fac_id_rappel == 0) {\n $v->fac_rappel = '';\n }\n\n //$v->fac_fichier = construit_lien_fichier(\"\",$v->fac_fichier);\n\n // cas des reprises de données\n if ($v->dvi_client == 0) {\n $v->ctc_id_comptable = $v->dvi_id_comptable;\n $v->mail = '';\n $v->telephone = '';\n $v->portable = '';\n }\n\n $resultat2[] = $v;\n }\n $resultat['data'] = $resultat2;\n return $resultat;\n }", "public function generatePagination()\n {\n $this->buffer = [];\n\n if ($this->currentPage != 1) {\n $this->generateLeftButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n\n $this->generatePages();\n\n if ($this->currentPage != self::getPages($this->records, $this->recordsInPage)) {\n $this->generateRightButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n }", "protected function getAllOfEntity(&$focusObject = null,$pageNumber=null,$pageSize=null)\n {\n \tDAO::$AutoActiveEnabled = false;\n \t$result = Factory::service(\"PartInstance\")->getPartInstanceAliasTypes($pageNumber,$pageSize);\n \tDAO::$AutoActiveEnabled = true;\r\n \tusort($result, \"PartInstanceAliasTypeController::sortById\");\r\n \treturn $result; \n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $records = $em->getRepository('dswEvalBundle:Record')->findAll();\n\n return $this->render('record/index.html.twig', array(\n 'records' => $records,\n ));\n }", "function dataGetList($p_limitstart, $p_recperpage)\n {\n $p_limitstart = parent::escape($p_limitstart);\n $p_recperpage = parent::escape($p_recperpage);\n \n $sql = 'SELECT a.id, ';\n $sql .= 'a.fkusertypeid, ';\n $sql .= '(SELECT b.title FROM user_type b WHERE b.id = a.fkusertypeid) AS usertype, ';\n $sql .= 'a.username, ';\n $sql .= 'a.firstname, ';\n $sql .= 'a.lastname, ';\n $sql .= 'DATE_FORMAT(a.datelastlogin, \\'%a %d %b %Y\\') AS lastlogindate, '; \n $sql .= 'a.isactive '; \n $sql .= 'FROM user a ';\n $sql .= 'WHERE a.fkusertypeid <> 1 ';\n $sql .= 'AND a.isdeleted = 0 '; \n $sql .= 'ORDER BY a.username ';\n $sql .= 'LIMIT ' . $p_limitstart . ', ' . $p_recperpage . ' ';\n \n $result_mysqli = parent::query($sql);\n $result = parent::fetchAllRows($result_mysqli);\n parent::clear($result_mysqli); \n\n return $result; \n }", "function get_entradas_contabilidad_sin_list($offset, $per_page,$estatus)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct(e.pr_facturas_id) as pr_facturas_id, prf.fecha, date(prf.fecha) as fecha, prf.fecha_pago, ( prf.monto_total - prf.descuento ) as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatus, m1.tag as marca, prf.validacion_contable, cel.tag as estatus_traspaso\n\t\tfrom entradas as e \".\n\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id \n\t\tleft join cmarcas_productos as m1 on m1.id=prf.cmarca_id left join espacios_fisicos as ef on ef.id=prf.espacios_fisicos_id \n\t\tleft join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\"where prf.estatus_general_id=1 and ctipo_entrada=1 and prf.usuario_validador_id=0\n\t\tgroup by e.pr_facturas_id, prf.fecha, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id, m1.tag, prf.fecha_pago, prf.monto_total, prf.validacion_contable,prf.descuento, cel.tag \".\n\t\t\"order by prf.fecha desc limit $per_page offset $offset\";\n\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "private function generateListStatement($page = 0)\n\t{\n\t\t$sql = \"SELECT * FROM `{$this->table}` \";\n\t\t$whereFields = array();\n\t\t$whereValues = array();\n\t\tif(!empty($this->match) && $this->langField !== self::NO_FIELD)\n\t\t{\n\t\t\t$whereFields[] = \"`{$this->langField}` = :{$this->langField}\";\n\t\t\t$whereValues[\":{$this->langField}\"] = $this->match->getLocale();\n\t\t}\n\t\tif(!empty($whereFields))\n\t\t\t$sql .= \" WHERE \".implode(\" AND \", $whereFields);\n\n\t\tif($this->dateField !== self::NO_FIELD)\n\t\t\t$sql .= \" ORDER BY `{$this->dateField}` {$this->dateOrder}\";\n\t\t$sql .= \" LIMIT {$this->postsPerPage} OFFSET \".($this->postsPerPage*$page);\n\n\t\t$statement = $this->pdo->prepare($sql);\n\t\t$statement->execute($whereValues);\n\t\treturn $statement;\n\t}", "public function all($limit, $offset);", "public function fetchAll()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n $select = $sql->select();\r\n $select\r\n ->from(array('a_s' => $this->table))\r\n ->order('a_s.sector_order ASC');\r\n \r\n $selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result = $execute->toArray();\r\n return $result;\r\n }", "public function getJoinPagesForQuery() {}", "public function getJoinPagesForQuery() {}", "function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {\n if (empty($sort)) {\n $sort = ' created_date DESC ';\n } \n return $this->sql($this->select(), $offset, $rowcount, $sort, $includeContactIDs, NULL);\n }", "public function getResultList()\n {\n /* @var $pager \\Sys25\\RnBase\\Backend\\Utility\\BEPager */\n $pager = $this->usePager() ? \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\n \\Sys25\\RnBase\\Backend\\Utility\\BEPager::class,\n $this->getSearcherId().'Pager',\n $this->getModule()->getName(),\n // @TODO: die PageId solle noch konfigurierbar gemacht werden.\n $pid = 0\n ) : null;\n\n list($fields, $options) = $this->getFieldsAndOptions();\n\n // Get counted data\n $cnt = $this->getCount($fields, $options);\n\n if ($pager) {\n $pager->setListSize($cnt);\n $pager->setOptions($options);\n }\n\n // Get data\n $search = $this->searchItems($fields, $options);\n $items = &$search['items'];\n $content = '';\n $this->showItems($content, $items, ['items_map' => $search['map']]);\n\n $data = [\n 'table' => $content,\n 'totalsize' => $cnt,\n 'items' => $items,\n ];\n\n if ($pager) {\n $pagerData = $pager->render();\n\n // der zusammengeführte Pager für die Ausgabe\n // nur wenn es auch Ergebnisse gibt. sonst reicht die noItemsFoundMsg\n $sPagerData = '';\n if ($cnt) {\n $sPagerData = $pagerData['limits'].' - '.$pagerData['pages'];\n }\n $data['pager'] = '<div class=\"pager\">'.$sPagerData.'</div>';\n }\n\n return $data;\n }", "abstract public function get_rows();", "protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }", "public function fetchAll($productId, $currentPage = 1, $countPerPage = 20){\n $where = array(\"product_id\"=>$productId);\n \n $sqlSelect = $this->tableGateway->getSql()->select();\n $sqlSelect->where($where);\n $sqlSelect->order(array('description', 'price'));\n \n $adapter = new DbSelect($sqlSelect, $this->tableGateway->getAdapter(), $this->tableGateway->getResultSetPrototype());\n \n $paginator = new Paginator($adapter);\n $paginator->setItemCountPerPage($countPerPage);\n $paginator->setCurrentPageNumber($currentPage);\n return $paginator;\n }", "public function findAll() {\n\t\treturn $this->createQuery()->execute();\n\t}", "public function paginate()\n {\n return $this->configurationRepository->scopeQuery(function ($query) {\n return $query->orderBy('id', 'desc');\n })->paginate();\n }", "function getContents($offset = 0, $limit = null) {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$query = clone $this->_query;\n\t\t$query->column(\"DISTINCT $i.node_id\");\n\t\t\n\t\t// Add issue ordering\n\t\tforeach ($columns = array_values((array)$this->_order) as $key => $column) {\n\t\t\tif (is_string($column) && !empty($column) && !is_numeric($column)) {\n\t\t\t\t$query->column(\"$i.$column\");\n\t\t\t\t$query->order($column, !isset($columns[$key+1]) || !empty($columns[$key+1]));\n\t\t\t}\n\t\t}\n\n\t\t$persistent = $this->_storage->getPersistentStorage();\n\t\t$database = $persistent->getDatabase();\n\t\treturn $this->_storage->getInstances($database->getCol($query->toString(), 0, $offset, $limit));\n\t}", "public function fetchAll()\n {\n return new QueryResult(\n $this->execute()->fetchAll(PDO::FETCH_ASSOC),\n $this->entity\n );\n }" ]
[ "0.5801884", "0.5767462", "0.55644304", "0.5505091", "0.54912215", "0.5443768", "0.5443768", "0.5405545", "0.54036593", "0.5310976", "0.53084445", "0.52939993", "0.52585465", "0.5236381", "0.52038413", "0.5203297", "0.5190925", "0.5168091", "0.51562476", "0.5155259", "0.5143961", "0.51309407", "0.5119004", "0.51117015", "0.5099852", "0.5099852", "0.50684905", "0.5063354", "0.5057149", "0.5054197", "0.5039505", "0.50394917", "0.50394917", "0.5037968", "0.5019417", "0.5013897", "0.5008012", "0.50060266", "0.5001989", "0.5000416", "0.49993593", "0.49975514", "0.49946404", "0.49944532", "0.49928793", "0.4980616", "0.49708787", "0.49626034", "0.4957891", "0.49546996", "0.49479583", "0.49414757", "0.4938551", "0.492808", "0.49254742", "0.4925193", "0.49225634", "0.49192837", "0.49178177", "0.49130392", "0.4900651", "0.4891932", "0.48860112", "0.4882106", "0.4876358", "0.48709214", "0.48563892", "0.48561883", "0.48559168", "0.4854758", "0.48530588", "0.4848612", "0.48466182", "0.4839031", "0.48378623", "0.48308995", "0.48308995", "0.48291788", "0.48199758", "0.48160222", "0.48158407", "0.4812962", "0.48103845", "0.48092306", "0.48086697", "0.4806705", "0.4805256", "0.4802072", "0.47955343", "0.47922486", "0.47860202", "0.47860202", "0.4778463", "0.47756433", "0.4768673", "0.4761133", "0.47584853", "0.47575828", "0.4756426", "0.47528583", "0.47479522" ]
0.0
-1
Generate SQL to filter a result set based on filter variables in _REQUEST. This can generate SQL that can be used in a WHERE or HAVING clause.
function filter($exprs=array(), $gexprs=array()) { $where = array('sql'=>array(), 'args'=>array()); $having = array('sql'=>array(), 'args'=>array()); foreach($_REQUEST as $k=>$v) { $args = array(); $sql = array(); if($v === '') continue; if(!preg_match('|^f_[dts]_|', $k)) continue; $t = substr($k, 2, 1); $k = substr($k, 4); // only alphanumerics allowed if(!preg_match('|^[A-z0-9_-]+$|', $k)) continue; switch($t) { case 'd': $coltype = 'date'; break; case 's': $coltype = 'select'; break; case 't': default: $coltype = 'text'; } // look for an expression passed to the function first -- this is // used for trickier SQL expressions, eg, functions if(isset($exprs[$k])) { $s = $exprs[$k]; $t = 'where'; } else if(isset($gexprs[$k])) { $s = $gexprs[$k]; $t = 'having'; } else { // use the literal column name $s = "\"$k\""; $t = 'where'; } $range = explode('<>', $v); if(count($range) == 2) { // double-bounded range $sql[] = "($s>='%s' AND $s<='%s')"; $args[] = $range[0]; $args[] = $range[1]; } else if(strlen($v) == 1) { // no range (explicit) // FYI: this check is needed, as the "else" block assumes // a string length of at least 2 $sql[] = is_numeric($v) ? "$s='%s'" : "$s LIKE '%%s%'"; $args[] = $v; } else { // everything else: single-bounded range, eq, neq, like, not like $chop = 0; $like = false; switch(substr($v, 0, 1)) { case '=': // exactly equals to $s .= '='; $chop = 1; break; case '>': // greater than if(substr($v, 1, 1) == '=') { $s .= '>='; $chop = 2; } else { $s .= '>'; $chop = 1; } break; case '<': // less than if(substr($v, 1, 1) == '=') { $s .= '<='; $chop = 2; } else { $s .= '<'; $chop = 1; } break; case '!': // does not contain if(substr($v, 1, 1) == '=') { $s .= '!='; $chop = 2; } else { $s .= ' NOT LIKE '; $chop = 1; $like = true; } break; default: // contains $s .= ' LIKE '; $like = true; } $v = substr($v, $chop); if($like) { $s .= "'%%s%'"; } else { $s .= "'%s'"; } $sql[] = $s; $args[] = $v; // special handling for various filter types if($coltype == 'date' && $chop) { // don't include the default '0000-00-00' fields in ranged selections $s = isset($exprs[$k]) ? $exprs[$k] : "\"$k\""; $s .= "!='0000-00-00'"; $sql[] = $s; } } switch($t) { case 'where': $where['sql'] = array_merge($where['sql'], $sql); $where['args'] = array_merge($where['args'], $args); break; case 'having': $having['sql'] = array_merge($having['sql'], $sql); $having['args'] = array_merge($having['args'], $args); } } // ensure the WHERE clause always has something in it $where['sql'][] = '1=1'; $final = array(implode(' AND ', $where['sql']), $where['args']); if(!empty($having['sql'])) { $final[] = implode(' AND ', $having['sql']); $final[] = $having['args']; } return $final; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _create_filter_sql () {\n\t\t$SF = &$_SESSION[$this->_filter_name];\n\t\tforeach ((array)$SF as $k => $v) $SF[$k] = trim($v);\n\t\t// Generate filter for the common fileds\n\t\tif (strlen($SF[\"text\"]))\t\t$sql .= \" AND text LIKE '%\"._es($SF[\"text\"]).\"%' \\r\\n\";\n\t\tif (strlen($SF[\"engine\"]))\t\t$sql .= \" AND engine=\".intval($SF[\"engine\"]).\" \\r\\n\";\n\t\treturn substr($sql, 0, -3);\n\t}", "function _create_filter_sql () {\n\t\t$SF = &$_SESSION[$this->_filter_name];\n\t\tforeach ((array)$SF as $k => $v) $SF[$k] = trim($v);\n\t\t// Generate filter for the common fileds\n\t\tif ($SF[\"id_min\"]) \t\t\t\t$sql .= \" AND id >= \".intval($SF[\"id_min\"]).\" \\r\\n\";\n\t\tif ($SF[\"id_max\"])\t\t\t \t$sql .= \" AND id <= \".intval($SF[\"id_max\"]).\" \\r\\n\";\n\t\tif ($SF[\"date_min\"]) \t\t\t$sql .= \" AND add_date >= \".strtotime($SF[\"date_min\"]).\" \\r\\n\";\n\t\tif ($SF[\"date_max\"])\t\t\t$sql .= \" AND add_date <= \".strtotime($SF[\"date_max\"]).\" \\r\\n\";\n\t\tif ($SF[\"user_id\"])\t\t\t \t$sql .= \" AND user_id = \".intval($SF[\"user_id\"]).\" \\r\\n\";\n\t\tif ($SF[\"cat_id\"])\t\t\t \t$sql .= \" AND cat_id = \".intval($SF[\"cat_id\"]).\" \\r\\n\";\n\t\tif (strlen($SF[\"title\"]))\t\t$sql .= \" AND title LIKE '\"._es($SF[\"title\"]).\"%' \\r\\n\";\n\t\tif (strlen($SF[\"summary\"]))\t\t$sql .= \" AND summary LIKE '\"._es($SF[\"summary\"]).\"%' \\r\\n\";\n\t\tif (strlen($SF[\"text\"]))\t\t$sql .= \" AND full_text LIKE '\"._es($SF[\"text\"]).\"%' \\r\\n\";\n\t\tif (!empty($SF[\"status\"]) && isset($this->_articles_statuses[$SF[\"status\"]])) {\n\t\t \t$sql .= \" AND status = '\"._es($SF[\"status\"]).\"' \\r\\n\";\n\t\t}\n\t\tif (strlen($SF[\"nick\"]) || strlen($SF[\"account_type\"])) {\n\t\t\tif (strlen($SF[\"nick\"])) \t$users_sql .= \" AND nick LIKE '\"._es($SF[\"nick\"]).\"%' \\r\\n\";\n\t\t\tif ($SF[\"account_type\"])\t$users_sql .= \" AND `group` = \".intval($SF[\"account_type\"]).\" \\r\\n\";\n\t\t}\n\t\t// Add subquery to users table\n\t\tif (!empty($users_sql)) {\n\t\t\t$sql .= \" AND user_id IN( SELECT id FROM \".db('user').\" WHERE 1=1 \".$users_sql.\") \\r\\n\";\n\t\t}\n\t\t// Sorting here\n\t\tif ($SF[\"sort_by\"])\t\t\t \t$sql .= \" ORDER BY \".$this->_sort_by[$SF[\"sort_by\"]].\" \\r\\n\";\n\t\tif ($SF[\"sort_by\"] && strlen($SF[\"sort_order\"])) \t$sql .= \" \".$SF[\"sort_order\"].\" \\r\\n\";\n\t\treturn substr($sql, 0, -3);\n\t}", "function _create_filter_sql () {\n\t\t$SF = &$_SESSION[$this->_filter_name];\n\t\tforeach ((array)$SF as $k => $v) {\n\t\t\t$SF[$k] = trim($v);\n\t\t}\n\t\t// Generate filter for the common fileds\n\t\tif ($SF[\"category_id\"])\t{\n\t\t \t$sql[] = \" AND category_id = \".intval($SF[\"category_id\"]).\" \";\n\t\t}\n\t\tif ($SF[\"user_id\"])\t{\n\t\t \t$sql[] = \" AND user_id = \".intval($SF[\"user_id\"]).\" \";\n\t\t}\n\t\tif (strlen($SF[\"admin_priority\"])) {\n\t\t \t$sql[] = \" AND admin_priority = \".intval($SF[\"admin_priority\"]).\" \";\n\t\t}\n\t\tif ($this->DEF_VIEW_STATUS || $SF[\"status\"]) {\n\t\t\t$status = $SF[\"status\"] ? $SF[\"status\"] : $this->DEF_VIEW_STATUS;\n\t\t\tif ($status == \"not_closed\") {\n\t\t\t \t$sql[] = \" AND status != 'closed' \";\n\t\t\t} else {\n\t\t\t \t$sql[] = \" AND status = '\"._es($SF[\"status\"]).\"' \";\n\t\t\t}\n\t\t}\n\t\tif (strlen($SF[\"subject\"])) {\n\t\t\t$sql[] = \" AND subject LIKE '\"._es($SF[\"subject\"]).\"%' \";\n\t\t}\n\t\tif (strlen($SF[\"message\"])) {\n\t\t\t$sql[] = \" AND message LIKE '\"._es($SF[\"message\"]).\"%' \";\n\t\t}\n\t\tif (!empty($SF[\"email\"])) {\n\t\t\t$sql[] = \" AND email LIKE '\"._es($SF[\"email\"]).\"%' \";\n\t\t}\n\t\tif ($SF[\"assigned_to\"])\t{\n\t\t \t$sql[] = \" AND assigned_to = \".intval($SF[\"assigned_to\"]).\" \";\n\t\t}\n\t\t// Add subquery to users table\n\t\tif (!empty($users_sql)) {\n\t\t\t$sql[] = \" AND user_id IN( SELECT id FROM \".db('user').\" WHERE 1=1 \".$users_sql.\") \";\n\t\t}\n\t\t// Default sorting\n\t\tif (!$SF[\"sort_by\"]) {\n\t\t\t$SF[\"sort_by\"]\t\t= \"opened_date\";\n\t\t\t$SF[\"sort_order\"]\t= \"DESC\";\n\t\t}\n\t\t// Sorting here\n\t\tif ($SF[\"sort_by\"]) {\n\t\t \t$sql[] = \" ORDER BY \".($this->_sort_by[$SF[\"sort_by\"]] ? $this->_sort_by[$SF[\"sort_by\"]] : $SF[\"sort_by\"]).\" \";\n\t\t\tif (strlen($SF[\"sort_order\"])) {\n\t\t\t\t$sql[] = \" \".$SF[\"sort_order\"].\" \";\n\t\t\t}\n\t\t}\n\t\t$sql = implode(\"\\r\\n\", (array)$sql);\n\t\treturn $sql;\n\t}", "abstract function get_sql_filter($data);", "function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tif ($this->CurrentFilter <> \"\") {\n\t\t\tif ($sFilter <> \"\") $sFilter = \"(\" . $sFilter . \") AND \";\n\t\t\t$sFilter .= \"(\" . $this->CurrentFilter . \")\";\n\t\t}\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(), $this->SqlGroupBy(),\n\t\t\t$this->SqlHaving(), $this->SqlOrderBy(), $sFilter, $sSort);\n\t}", "function dblog_build_filter_query() {\n if (empty($_SESSION['dblog_overview_filter'])) {\n return;\n }\n\n $filters = dblog_filters();\n\n // Build query\n $where = $args = array();\n foreach ($_SESSION['dblog_overview_filter'] as $key => $filter) {\n $filter_where = array();\n foreach ($filter as $value) {\n $filter_where[] = $filters[$key]['where'];\n $args[] = $value;\n }\n if (!empty($filter_where)) {\n $where[] = '(' . implode(' OR ', $filter_where) . ')';\n }\n }\n $where = !empty($where) ? implode(' AND ', $where) : '';\n\n return array(\n 'where' => $where,\n 'args' => $args,\n );\n}", "private function _buildQuery($filters = array())\n\t{\n\t\t// var to hold conditions\n\t\t$where = array();\n\t\t$sql = '';\n\n\t\t// gidnumber\n\t\tif (isset($filters['gidNumber']))\n\t\t{\n\t\t\t$where[] = \"gidNumber=\" . $this->_db->quote($filters['gidNumber']);\n\t\t}\n\n\t\t// action\n\t\tif (isset($filters['action']))\n\t\t{\n\t\t\t$where[] = \"action=\" . $this->_db->quote($filters['action']);\n\t\t}\n\n\t\t// if we have and conditions\n\t\tif (count($where) > 0)\n\t\t{\n\t\t\t$sql = \" WHERE \" . implode(\" AND \", $where);\n\t\t}\n\n\t\tif (isset($filters['orderby']))\n\t\t{\n\t\t\t$sql .= \" ORDER BY \" . $filters['orderby'];\n\t\t}\n\n\t\treturn $sql;\n\t}", "public function getWhereClause() {\n\n\tif (isset($this->filters) && !empty($this->filters)) {\n\t\t// $aClause = array();\n\t\t// $aOperators = array();\n\t\t$sClause = '';\n\t switch ($this->type) {\n\t\tcase 0:\n\t\tcase 4:\n\t\tdefault:\n\t\t \n\t\t $aWhere = $this->getFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where($key, $value);\n\t\t\t\t $sClause .= $key . ' = ' . $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 1:\n\t\t $aWhere = $this->getLikeFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_like($key, $value);\n\t\t\t\t $sClause .= $key . ' LIKE ' . $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 2:\n\t\t $aWhere = $this->getRangeFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($key, $value);\n\t\t\t\t\t$sClause .= vsprintf(str_replace('?','%s',$key),$value) . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 3:\n\t\t $aWhere = $this->getInFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t\t$sClause .= $key . ' IN (' . implode(',',$value) . ')' . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t // $this->model->where_in($key, $value);\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 5:\n\t\t $aWhere = $this->getInRawFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($key, $value);\n\t\t\t\t\t$sClause .= vsprintf(str_replace('?','%s',$key),$value) . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 6:\n\t\t $aWhere = $this->getDependendFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($value, array());\n\t\t\t\t $sClause .= $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t }\n\t}\n\treturn $sClause;\n\t// return $this->model;\n }", "public function sqlForFilters($where_clause = '1', $order_clause = 'id', $offset = 0, $limit = 1)\n {\n\t\t$sql = <<<SQL\n\t\tSELECT\n\t\t\tDISTINCT(invoice.id) as id \n\n\t\tFROM\n\t\t\tinvoice\n\n\t\tLEFT JOIN card ON card.id = invoice.card_id\n\t\tLEFT JOIN user AS attorney ON attorney.id = invoice.attorney_id\n\t\tLEFT JOIN person AS client ON client.id = invoice.client_id\n\t\tLEFT JOIN invoicetype ON invoicetype.id = invoice.invoicetype_id\n\t\t\n\t\tWHERE {$where_clause}\n\n\t\tORDER BY {$order_clause}\n\n\t\tLIMIT {$offset}, {$limit}\nSQL;\n return $sql;\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "protected function filter_sql( $filter = array(), $search = array(), $groupby = null, $orderby = null, $offset = 0, $limit = -1 )\n\t{\n\t\tglobal $wpdb;\n\t\t\n\t\t$where_string = '';\n\t\tif( is_array($filter) && count($filter) > 0 )\n\t\t{\n\t\t\tif( $filter['filter_by_time'] !== false )\n\t\t\t{\n\t\t\t\tif( empty($where_string) ) $where_string = 'WHERE ';\n\t\t\t\telse $where_string .= ' AND ';\n\t\t\t\t\n\t\t\t\t$time_frame = new DateTime('today -'.$filter['time']);\n\t\t\t\tswitch( $filter['time_compare'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'greater':\n\t\t\t\t\t\t$where_string .= \"last_post_date < '\".$time_frame->format('Y-m-d H:i:s').\"'\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'less':\n\t\t\t\t\t\t$where_string .= \"last_post_date > '\".$time_frame->format('Y-m-d H:i:s').\"'\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( $filter['filter_by_posts'] !== false )\n\t\t\t{\n\t\t\t\tif( empty($where_string) ) $where_string = 'WHERE ';\n\t\t\t\telse $where_string .= ' AND ';\n\t\t\t\t\n\t\t\t\t$posts_count = intval($filter['posts']);\n\t\t\t\tswitch( $filter['posts_compare'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'greater':\n\t\t\t\t\t\t$where_string .= 'num_posts > '.$posts_count;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'less':\n\t\t\t\t\t\t$where_string .= 'num_posts < '.$posts_count;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( $filter['filter_by_pages'] !== false )\n\t\t\t{\n\t\t\t\tif( empty($where_string) ) $where_string = 'WHERE ';\n\t\t\t\telse $where_string .= ' AND ';\n\t\t\t\t\n\t\t\t\t$posts_count = intval($filter['pages']);\n\t\t\t\tswitch( $filter['pages_compare'] )\n\t\t\t\t{\n\t\t\t\t\tcase 'greater':\n\t\t\t\t\t\t$where_string .= 'num_pages > '.$posts_count;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'less':\n\t\t\t\t\t\t$where_string .= 'num_pages < '.$posts_count;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t}\n\n\t\tif( is_array($search) && count($search) > 0 )\n\t\t{\n\t\t\t$keys = array_keys($search);\n\t\t\tif( empty($where_string) ) $where_string = 'WHERE ';\n\t\t\telse $where_string .= ' AND ';\n\t\t\t\n\t\t\t$where_string .= ' ( ';\n\t\t\tfor( $i = 0; $i < count($keys); $i++ )\n\t\t\t{\n\t\t\t\t$key = $keys[$i];\n\t\t\t\t$where_string .= ' ( ';\n\t\t\t\tfor( $j = 0; $j < count($search[$key]); $j++ )\n\t\t\t\t{\n\t\t\t\t\t$where_string .= $key.\" LIKE '%\".$search[$key][$j].\"%' \";\n\t\t\t\t\tif( $j < count($search[$key])-1 ) $where_string .= ' OR ';\n\t\t\t\t}\n\t\t\t\t$where_string .= ' ) ';\n\t\t\t\t\n\t\t\t\tif( $i < count($keys)-1 ) $where_string .= ' OR ';\n\t\t\t}\n\t\t\t$where_string .= ' ) ';\n\t\t}\n\t\t\n\t\t$where_string = apply_filters('orghub_wherestring', $where_string, $filter);\n\t\t\n\t\tif( $orderby ) $orderby = 'ORDER BY '.$orderby; else $orderby = '';\n\t\t\n\t\t$limit = intval( $limit );\n\t\t$offset = intval( $offset );\n\t\t\n\t\t$limit_string = '';\n\t\tif( $limit > 0 )\n\t\t{\n\t\t\tif( $offset > 0 )\n\t\t\t\t$limit_string = \"LIMIT $offset, $limit\";\n\t\t\telse\n\t\t\t\t$limit_string = \"LIMIT $limit\";\n\t\t}\n\n\t\t$join = '';\n\t\t$join .= 'LEFT JOIN '.$wpdb->users.' ON '.$wpdb->users.'.user_email = '.self::$site_table.'.admin_email ';\n\t\t$join .= 'LEFT JOIN '.$wpdb->blogs.' ON '.$wpdb->blogs.'.blog_id = '.self::$site_table.'.blog_id ';\n\t\t\n\t\tif( !$groupby ) $groupby = ''; else $groupby = 'GROUP BY '.$groupby;\n\t\t\t\n\t\treturn $join.' '.$where_string.' '.$groupby.' '.$orderby.' '.$limit_string;\n\t}", "function get_sql_filter($extra='', $exceptions = array()) {\n global $SESSION;\n\n if(!empty($this->_id)) {\n $filtering_array =& $SESSION->user_index_filtering[$this->_id];\n } else {\n $filtering_array =& $SESSION->user_filtering;\n }\n\n $sqls = array();\n if ($extra != '') {\n $sqls[] = $extra;\n }\n\n if (!empty($filtering_array)) {\n foreach ($filtering_array as $fname=>$datas) {\n if (!array_key_exists($fname, $this->_fields) || in_array($fname, $exceptions)) {\n continue; // filter not used\n }\n $field = $this->_fields[$fname];\n foreach($datas as $i=>$data) {\n $sqlfilter = $field->get_sql_filter($data);\n if ($sqlfilter != null) {\n $sqls[] = $sqlfilter;\n }\n }\n }\n }\n\n if (empty($sqls)) {\n return '';\n } else {\n return implode(' AND ', $sqls);\n }\n }", "public function getWhereSQL()\n {\n return \" AND \" . $this->field_where_name . \" LIKE '%\" . $this->field_row->criteria . \"%' \";\n \n }", "protected function assembleQueries()\n {\n if ($this->getExecutedFilters()) {\n return $this;\n }\n\n $objectType = $this->getObjectType();\n\n $whereConditions = [];\n\n $mainTable = $this->getEntityService()->getTableName($objectType);\n $pre = 'v2';\n $dqlFilters = [];\n $tables = $this->getEntityService()->getVarOptionTables();\n $bindTypes = [];\n $pdoBindTypes = $this->getEntityService()->getPdoBindTypes();\n $filterable = $this->getFilterable();\n\n $x = 0; //count($this->getFilters()); // for tracking bind types\n\n // handle basic filters eg key=value\n // also, special handling of price range\n $filterParams = [];\n if ($this->getFilters()) {\n foreach($this->getFilters() as $field => $value) {\n foreach($filterable as $filterInfo) {\n if ($field == $filterInfo[CartRepositoryInterface::CODE]) {\n\n // handle special case for numerical ranges\n // eg price=100-199 or subtotal=50-100\n // note : the handling of strpos is very intentional, want an index > 0\n if ($filterInfo[CartRepositoryInterface::DATATYPE] == 'number' && strpos($value, '-')) {\n $rangeValues = explode('-', $value);\n $rangeMin = $rangeValues[0];\n $rangeMax = isset($rangeValues[1]) ? $rangeValues[1] : null;\n if (isset($rangeMax)) {\n\n $rangeMin = (float) $rangeMin;\n $rangeMax = (float) $rangeMax;\n\n // minimum\n $this->addAdvFilter([\n 'field' => $field,\n 'op' => 'gte',\n 'value' => $rangeMin,\n ]);\n\n // maximum\n $this->addAdvFilter([\n 'field' => $field,\n 'op' => 'lt',\n 'value' => $rangeMax,\n ]);\n\n break;\n }\n }\n\n if (isset($filterInfo['join'])) {\n $this->joins[] = $filterInfo['join'];\n $field = $filterInfo['join']['table'] . \".{$field}\";\n } elseif (!is_int(strpos($field, '.'))) {\n $field = \"main.{$field}\";\n }\n\n $whereConditions[] = \"{$field} = ?\";\n $filterParams[] = $value;\n\n switch($filterInfo[CartRepositoryInterface::DATATYPE]) {\n case 'boolean':\n $bindTypes[$x] = \\PDO::PARAM_INT;\n break;\n case 'number':\n // todo : make this better\n $bindTypes[$x] = \\PDO::PARAM_INT;\n break;\n case 'string':\n $bindTypes[$x] = \\PDO::PARAM_STR;\n break;\n case 'date':\n $bindTypes[$x] = \\PDO::PARAM_STR;\n break;\n default:\n $bindTypes[$x] = \\PDO::PARAM_STR;\n break;\n }\n\n $x++;\n break;\n }\n }\n }\n }\n\n // handle fulltext search first\n\n // note : use setFulltextIds() if you search somewhere else first eg SOLR / Elasticsearch\n if ($this->getFulltextIds()) {\n // ensure IDs are sanitized before you set them\n $whereConditions[] = \"main.id in (\" . implode(',', $this->getFulltextIds()) . \")\";\n } else if ($this->getQuery()\n && $this->getSearchField()\n && $this->getSearchMethod()) {\n\n if (is_array($this->getSearchField())) {\n if (count($this->getSearchField()) > 1) {\n\n $cond = '';\n foreach($this->getSearchField() as $searchField) {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n\n $tbl = 'main';\n\n if (is_array($searchField)) {\n if (isset($searchField['table']) && isset($searchField['column'])) {\n $tbl = $searchField['table'];\n $searchField = $searchField['column'];\n } else {\n continue;\n }\n }\n\n // cond is empty, add a leading parentheses\n if (!$cond) {\n $cond .= \"({$tbl}.{$searchField} like ?\";\n } else {\n $cond .= \" OR {$tbl}.{$searchField} like ?\";\n }\n $x++;\n }\n $cond .= ')';\n $whereConditions[] = $cond;\n } else {\n\n $fields = $this->getSearchField();\n $searchField = $fields[0];\n if (is_array($searchField)) {\n if (isset($searchField['table']) && isset($searchField['column'])) {\n $tbl = $searchField['table'];\n $searchField = $searchField['column'];\n\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $whereConditions[] = \"{$tbl}.{$searchField} like ?\";\n $x++;\n }\n } else {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $whereConditions[] = \"main.{$searchField} like ?\";\n $x++;\n }\n }\n } else {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $whereConditions[] = \"main.{$this->getSearchField()} like ?\";\n $x++;\n }\n }\n\n // handle \"advanced\" filters\n // eg filter_field[x], filter_op[x], filter_val[x]\n // specifies a field, value, and operator ie (id > 100)\n $advFilterParams = [];\n if ($this->getAdvFilters()) {\n foreach($this->getAdvFilters() as $advFilter) {\n\n $field = $advFilter['field'];\n $op = $advFilter['op'];\n $value = $advFilter['value'];\n $table = isset($advFilter['table'])\n ? $advFilter['table']\n : 'main';\n\n $found = false;\n foreach($filterable as $filterInfo) {\n if ($field == $filterInfo[CartRepositoryInterface::CODE]) {\n $found = true;\n\n switch($filterInfo[CartRepositoryInterface::DATATYPE]) {\n case 'boolean':\n $bindTypes[$x] = \\PDO::PARAM_INT;\n $x++;\n break;\n case 'number':\n if ($op == 'in') {\n if (!is_array($value)) {\n $value = explode(',', $value);\n }\n if ($value) {\n foreach($value as $dummy) {\n $bindTypes[$x] = \\PDO::PARAM_INT;\n $x++;\n }\n }\n } else {\n $bindTypes[$x] = \\PDO::PARAM_INT;\n $x++;\n }\n break;\n case 'string':\n if ($op == 'in') {\n if (!is_array($value)) {\n $value = explode(',', $value);\n }\n if ($value) {\n foreach($value as $dummy) {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $x++;\n }\n }\n } else {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $x++;\n }\n\n break;\n case 'date':\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $x++;\n break;\n default:\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $x++;\n break;\n }\n\n\n break;\n }\n }\n\n if (!$found || !in_array($op, ['contains', 'starts', 'ends', 'equals', 'gt', 'gte', 'lt', 'lte', 'in'])) {\n continue;\n }\n\n // example:\n // $and->add($qb->expr()->eq('u.id', 1));\n\n switch($op) {\n case 'contains':\n $advFilterParams[] = '%'. $value . '%';\n $whereConditions[] = \"{$table}.{$field} like ?\";\n break;\n case 'starts':\n $advFilterParams[] = $value . '%';\n $whereConditions[] = \"{$table}.{$field} like ?\";\n break;\n case 'ends':\n $advFilterParams[] = '%'. $value;\n $whereConditions[] = \"{$table}.{$field} like ?\";\n break;\n case 'equals':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} = ?\";\n break;\n case 'notequal':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} != ?\";\n break;\n// todo: this is messing up the counter, but it should be implemented\n// case 'null':\n// $advFilterParams[] = 'NULL';\n// $whereConditions[] = \"{$table}.{$field} IS ?\";\n// break;\n// case 'notnull':\n// $advFilterParams[] = $value;\n// $whereConditions[] = \"{$table}.{$field} IS NOT NULL\";\n// break;\n case 'gt':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} > ?\";\n break;\n case 'gte':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} >= ?\";\n break;\n case 'lt':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} < ?\";\n break;\n case 'lte':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} <= ?\";\n break;\n case 'in':\n if (!is_array($value)) {\n $value = explode(',', $value);\n }\n\n if ($value) {\n foreach($value as $val) {\n $advFilterParams[] = $val;\n }\n $paramStr = implode(',', $value);\n $whereConditions[] = \"{$table}.{$field} in ({$paramStr})\";\n }\n\n break;\n default:\n\n break;\n }\n }\n }\n\n // handle category filter with products\n if ($this->getCategoryId()\n && $this->getObjectType() == EntityConstants::PRODUCT) {\n\n $categoryTable = $this->getEntityService()->getTableName(EntityConstants::CATEGORY_PRODUCT);\n $bindTypes[$x] = \\PDO::PARAM_INT;\n // todo : sometime in the future , add a category 'anchor', connecting multiple categories\n $whereConditions[] = \"main.id in (select product_id from {$categoryTable} where category_id = ?)\";\n $x++;\n }\n\n // handle stock, visibility filters with products\n\n\n // handle facet filters\n // ie filters on EAV tables, child tables\n $facetFilterParams = [];\n if ($this->getFacetFilters()) {\n foreach($this->getFacetFilters() as $facetCode => $value) {\n\n $itemVar = $this->getVarByCode($facetCode);\n\n $tblValue = $objectType . '_' . EntityConstants::getVarDatatype($itemVar->getDatatype());\n $values = explode($this->valueSep, $value);\n $joinTbl = $tables[$itemVar->getDatatype()];\n $joinTblPre = 'ivo';\n\n if (count($values) > 1) {\n $conditions = [];\n foreach($values as $itemVarValue) {\n $conditions[] = \"({$pre}.value = ? OR {$joinTblPre}.url_value = ?)\";\n $facetFilterParams[] = $itemVarValue;\n\n $bindTypes[$x] = $pdoBindTypes[$itemVar->getDatatype()];\n $x++;\n\n $bindTypes[$x] = $pdoBindTypes[$itemVar->getDatatype()];\n $x++;\n\n }\n $dqlFilters[] = \"({$pre}.item_var_id={$itemVar->getId()} AND (\".implode(' OR ', $conditions).\"))\";\n } else {\n $dqlFilters[] = \"({$pre}.item_var_id={$itemVar->getId()} AND ({$pre}.value = ? OR {$joinTblPre}.url_value = ?))\";\n $facetFilterParams[] = $value;\n\n $bindTypes[$x] = $pdoBindTypes[$itemVar->getDatatype()];\n $x++;\n\n $bindTypes[$x] = $pdoBindTypes[$itemVar->getDatatype()];\n $x++;\n }\n\n $whereConditions[] = \"main.id in (select parent_id from {$tblValue} {$pre} left join {$joinTbl} {$joinTblPre} on {$pre}.item_var_option_id={$joinTblPre}.id where \". implode(' AND ', $dqlFilters).\")\";\n $dqlFilters = [];\n\n }\n }\n\n // assemble where conditions\n $conditionsSql = implode(' AND ', $whereConditions);\n if (!$conditionsSql) {\n $conditionsSql = '1=1';\n }\n\n // assemble group by\n $groupSql = $this->getGroupBy()\n ? 'group by ' . implode(', ', $this->getGroupBy())\n : '';\n\n // assemble select columns\n $colSql = '';\n if ($this->getColumns()) {\n $cols = [];\n foreach($this->getColumns() as $colData) {\n // add select\n $select = $colData['select'];\n $alias = $colData['alias'];\n if ($alias) {\n $select .= \" as {$alias}\";\n }\n\n $cols[] = $select;\n }\n $colSql = ',' . implode(',', $cols);\n }\n\n // assemble joins\n $joinSql = '';\n if ($this->getJoins()) {\n $joins = [];\n foreach($this->getJoins() as $join) {\n $type = $join['type'];\n $table = $join['table'];\n $column = $join['column'];\n $joinAlias = $join['join_alias'];\n $joinColumn = $join['join_column'];\n $joins[] = \"{$type} join {$table} on {$joinAlias}.{$joinColumn}={$table}.{$column}\";\n }\n $joinSql = implode(' ', $joins);\n }\n\n // main data query without sorting and grouping\n $this->filtersSql = \"select distinct(main.id) from {$mainTable} main {$joinSql} where {$conditionsSql}\";\n // main data query\n $this->mainSql = \"select distinct(main.id), main.* {$colSql} from {$mainTable} main {$joinSql} where {$conditionsSql} {$groupSql}\";\n // main count query, for all rows, not just the current page\n $this->countSql = \"select count(distinct(main.id)) as count from {$mainTable} main {$joinSql} where {$conditionsSql} {$groupSql}\";\n $this->bindTypes = $bindTypes;\n $this->filterParams = $filterParams;\n $this->advFilterParams = $advFilterParams;\n $this->facetFilterParams = $facetFilterParams;\n\n $this->setExecutedFilters(true);\n return $this;\n }", "protected function user_where_clause() {}", "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\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t}", "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\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t}", "protected function getWhereClause() {}", "protected function getGeneralWhereClause() {}", "protected function prepareFilterQuery()\n\t{\n\t\t$filterQuery = array();\n\n\t\t$storeid = $this->getParam('storeid');\n\n\t\t$config = $this->getConfig();\n\n\t\t$websiteid = isset($config['stores'][$storeid]['website_id'])?$config['stores'][$storeid]['website_id']:0;\n\n\t\t$checkInstock = (int) $this->getConfigValue('check_instock');\n\n\t\t$filterQuery = array_merge($filterQuery, array(\n\t\t\t\t'store_id' => array($storeid),\n\t\t\t\t'website_id' => array($websiteid),\n\t\t\t\t'product_status' => array(1)\n\t\t));\n\n\t\tif ($checkInstock > 0) {\n\t\t\t$filterQuery['instock_int'] = array(1);\n\t\t}\n\n\t\t$filterQueryArray = array();\n\n\t\tforeach($filterQuery as $key=>$filterItem)\n\t\t{\n\n\t\t\tif(count($filterItem) > 0){\n\t\t\t\t$query = '';\n\t\t\t\tforeach($filterItem as $value){\n\t\t\t\t\t\t$query .= $key.':%22'.urlencode(trim(addslashes($value))).'%22+OR+';\n\t\t\t\t}\n\n\t\t\t\t$query = trim($query, '+OR+');\n\n\t\t\t\t$filterQueryArray[] = $query;\n\t\t\t}\n\t\t}\n\n\t\t$filterQueryString = '';\n\n\t\tif(count($filterQueryArray) > 0) {\n\t\t\tif(count($filterQueryArray) < 2) {\n\t\t\t\t$filterQueryString .= $filterQueryArray[0];\n\t\t\t}else{\n\t\t\t\t$filterQueryString .= '%28'.@implode('%29+AND+%28', $filterQueryArray).'%29';\n\t\t\t}\n\t\t}\n\n\t\t$this->filterQuery = $filterQueryString;\n\t}", "private function _buildQuery($filters = array())\n\t{\n\t\t// var to hold conditions\n\t\t$where = array();\n\t\t$sql = '';\n\n\t\t// scope\n\t\tif (isset($filters['scope']))\n\t\t{\n\t\t\t$where[] = \"scope=\" . $this->_db->quote($filters['scope']);\n\t\t}\n\n\t\t// scope_id\n\t\tif (isset($filters['scope_id']))\n\t\t{\n\t\t\t$where[] = \"scope_id=\" . $this->_db->quote($filters['scope_id']);\n\t\t}\n\n\t\t// calendar_id\n\t\tif (isset($filters['calendar_id']))\n\t\t{\n\t\t\tif ($filters['calendar_id'] == '0')\n\t\t\t{\n\t\t\t\t$where[] = \"(calendar_id IS NULL OR calendar_id=0)\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$where[] = \"calendar_id=\" . $this->_db->quote($filters['calendar_id']);\n\t\t\t}\n\t\t}\n\n\t\t// published\n\t\tif (isset($filters['state']) && is_array($filters['state']))\n\t\t{\n\t\t\t$where[] = \"state IN (\" . implode(',', $filters['state']) . \")\";\n\t\t}\n\n\t\t// publish up/down\n\t\tif (isset($filters['publish_up']) && isset($filters['publish_down']))\n\t\t{\n\t\t\t$q = \"(publish_up >=\" . $this->_db->quote($filters['publish_up']);\n\t\t\t$q .= \" OR (publish_down IS NOT NULL AND publish_down != '0000-00-00 00:00:00' AND publish_down <=\" . $this->_db->quote($filters['publish_down']) . \")\";\n\t\t\t$q .= \" OR (publish_up IS NOT NULL AND publish_up <= \" . $this->_db->quote($filters['publish_up']) . \" AND publish_down >=\" . $this->_db->quote($filters['publish_down']) . \"))\";\n\t\t\t$where[] = $q;\n\t\t}\n\n\t\t// repeating event?\n\t\tif (isset($filters['repeating']))\n\t\t{\n\t\t\t$where[] = \"(repeating_rule IS NOT NULL AND repeating_rule<>'')\";\n\t\t}\n\n\t\t// only non-repeating events?\n\t\tif (isset($filters['non_repeating']))\n\t\t{\n\t\t\t$where[] = \"(repeating_rule IS NULL OR repeating_rule = '')\";\n\t\t}\n\n\t\t// if we have and conditions\n\t\tif (count($where) > 0)\n\t\t{\n\t\t\t$sql .= \" WHERE \" . implode(\" AND \", $where);\n\t\t}\n\n\t\t// specify order?\n\t\tif (isset($filters['orderby']))\n\t\t{\n\t\t\t$sql .= \" ORDER BY \" . $filters['orderby'];\n\t\t}\n\n\t\t// limit and start\n\t\tif (isset($filters['limit']))\n\t\t{\n\t\t\t$start = (isset($filters['start'])) ? $filters['start'] : 0;\n\t\t\t$sql .= \" LIMIT \" . $start . \", \" . $filters['limit'];\n\t\t}\n\n\t\treturn $sql;\n\t}", "private function getAdditionalSQLByFilters($data = array())\n {\n $sql = \"\";\n\n // Security\n foreach ($data as $key => $val) {\n if (is_null($val)) {\n $data[$key] = null;\n } else {\n $data[$key] = $this->db->escape($val);\n }\n }\n\n # Filter by Product Name\n if (!is_null($data['filter_name'])) {\n $sql .= \" AND pd.name LIKE '%\" . $data['filter_name'] . \"%'\";\n }\n\n # Filter by Model\n if (!is_null($data['filter_model'])) {\n $sql .= \" AND p.model LIKE '%\" . $data['filter_model'] . \"%'\";\n }\n\n # Filter by Product Special Weekdays and Hours if the module is enabled\n # Function Find_in_set() can search only for one string in a set of strings.\n if ($this->hours_days_status) {\n if (!is_null($data['filter_weekdays'])) {\n $weekdays = explode('_', $data['filter_weekdays']);\n\n foreach ($weekdays as $weekday_id) {\n $sql .= \" AND FIND_IN_SET('\" . $weekday_id . \"', ps.weekdays)\";\n }\n }\n\n if (!is_null($data['filter_hours'])) {\n $hours = explode('_', $data['filter_hours']);\n\n foreach ($hours as $hour_id) {\n $sql .= \" AND FIND_IN_SET('\" . $hour_id . \"', ps.hours)\";\n }\n }\n }\n\n # Filter by Product Special Dates\n if (!is_null($data['filter_special_date_from']) || !is_null($data['filter_special_date_to'])) {\n if (!is_null($data['filter_special_date_from']) and is_null($data['filter_special_date_to'])) {\n $sql .= \" AND ps.date_start >= '\" . $data['filter_special_date_from'] . \"'\";\n }\n\n if (is_null($data['filter_special_date_from']) and !is_null($data['filter_special_date_to'])) {\n $sql .= \" AND ps.date_end <= '\" . $data['filter_special_date_to'] . \"'\";\n }\n\n if (!is_null($data['filter_special_date_from']) and !is_null($data['filter_special_date_to'])) {\n $sql .= \" AND (ps.date_start >= '\" . $data['filter_special_date_from'] . \"' AND ps.date_end <= '\" . $data['filter_special_date_to'] . \"')\";\n }\n }\n\n # Filter by Ordinary Price\n if (!is_null($data['filter_price_from']) || !is_null($data['filter_price_to'])) {\n if (!is_null($data['filter_price_from']) and is_null($data['filter_price_to'])) {\n $sql .= \" AND p.price >= '\" . $data['filter_price_from'] . \"'\";\n }\n\n if (is_null($data['filter_price_from']) and !is_null($data['filter_price_to'])) {\n $sql .= \" AND p.price <= '\" . $data['filter_price_to'] . \"'\";\n }\n\n if (!is_null($data['filter_price_from']) and !is_null($data['filter_price_to'])) {\n $sql .= \" AND (p.price >= '\" . $data['filter_price_from'] . \"' AND p.price <= '\" . $data['filter_price_to'] . \"')\";\n }\n }\n\n # Filter by Category\n if (!is_null($data['filter_special_price_from']) || !is_null($data['filter_special_price_to'])) {\n if (!is_null($data['filter_special_price_from']) and is_null($data['filter_special_price_to'])) {\n $sql .= \" AND ps.price >= '\" . $data['filter_special_price_from'] . \"'\";\n }\n\n if (is_null($data['filter_special_price_from']) and !is_null($data['filter_special_price_to'])) {\n $sql .= \" AND ps.price <= '\" . $data['filter_special_price_to'] . \"'\";\n }\n\n if (!is_null($data['filter_special_price_from']) and !is_null($data['filter_special_price_to'])) {\n $sql .= \" AND (ps.price >= '\" . $data['filter_special_price_from'] . \"' AND ps.price <= '\" . $data['filter_special_price_to'] . \"')\";\n }\n }\n\n # Filter by Quantity\n if (!is_null($data['filter_quantity_from']) || !is_null($data['filter_quantity_to'])) {\n if (!is_null($data['filter_quantity_from']) and is_null($data['filter_quantity_to'])) {\n $sql .= \" AND p.quantity >= '\" . $data['filter_quantity_from'] . \"'\";\n }\n\n if (is_null($data['filter_quantity_from']) and !is_null($data['filter_quantity_to'])) {\n $sql .= \" AND p.quantity <= '\" . $data['filter_quantity_to'] . \"'\";\n }\n\n if (!is_null($data['filter_quantity_from']) and !is_null($data['filter_quantity_to'])) {\n $sql .= \" AND (p.quantity >= '\" . $data['filter_quantity_from'] . \"' AND p.quantity <= '\" . $data['filter_quantity_to'] . \"')\";\n }\n }\n\n # Filter by Category\n if (!empty($data['filter_category'])) {\n if (!empty($data['filter_sub_category'])) {\n $implode_data = array();\n\n $implode_data[] = \"category_id = '\" . (int) $data['filter_category'] . \"'\";\n\n $this->load->model('catalog/category');\n\n $categories = $this->model_catalog_category->getCategories($data['filter_category']);\n\n foreach ($categories as $category) {\n $implode_data[] = \"p2c.category_id = '\" . (int) $category['category_id'] . \"'\";\n }\n\n $sql .= \" AND (\" . implode(' OR ', $implode_data) . \")\";\n } else {\n $sql .= \" AND p2c.category_id = '\" . (int) $data['filter_category'] . \"'\";\n }\n }\n\n # Filter by Manufacturer\n if (isset($data['filter_manufacturer']) && $data['filter_manufacturer'] !== null) {\n $sql .= \" AND p.manufacturer_id = '\" . (int) $data['filter_manufacturer'] . \"'\";\n }\n\n # Filter by Customer groups\n if (!is_null($data['filter_customer_groups'])) {\n $customer_groups = array_map('intval', explode('_', $data['filter_customer_groups']));\n\n $sql .= \" AND ps.customer_group_id IN (\" . implode(',', $customer_groups) . \")\";\n }\n\n # Filter by Special Group\n if (isset($data['filter_special_group']) && $data['filter_special_group'] !== null) {\n $data['filter_special_group'] = (int) $data['filter_special_group'];\n\n // Search for specials with not specified special group\n if ($data['filter_special_group'] == 0) {\n $sql .= \" AND (ps.product_special_group_id = 0 OR psg.product_special_group_id IS NULL)\";\n } else {\n $sql .= \" AND ps.product_special_group_id = '\" . (int) $data['filter_special_group'] . \"'\";\n }\n }\n\n # Filter by Product Status\n if (isset($data['filter_status']) && $data['filter_status'] !== null) {\n $sql .= \" AND p.status = '\" . (int) $data['filter_status'] . \"'\";\n }\n\n return $sql;\n }", "public static function createWhereStatement($arr_filter) {\n\n\n\t\t/**\n\t\t * @var $ilDB \\ilDBInterface\n\t\t */\n\t\t$ilDB = $GLOBALS['DIC']->database();\n\t\t$where = array();\n\n\n\t\t$where[] = '(question.assisted_exercise_id = ' . $ilDB->quote($arr_filter['obj_id'], 'integer') . ')';\n\n\t\tif(!empty($arr_filter['firstname'])) {\n\t\t\t$where[] = $ilDB->like(\"usr.firstname\", \"text\", \"%\"\n\t\t\t\t. $arr_filter['firstname']\t. \"%\");\n\n\t\t}\n\n\t\tif(!empty($arr_filter['lastname'])) {\n\t\t\t$where[] = $ilDB->like(\"usr.lastname\", \"text\", \"%\"\n\t\t\t\t. $arr_filter['lastname']\t. \"%\");\n\t\t}\n\n\t\tif(!empty($arr_filter['title'])) {\n\t\t\t$where[] = $ilDB->like(\"question.title\", \"text\", \"%\"\n\t\t\t\t. $arr_filter['title']\t. \"%\");\n\n\t\t}\n\n\n\t\tif($arr_filter['isassessed'] == 1) {\n\t\t\t$where[] = '(answer.is_assessed = ' . $ilDB->quote(0, 'integer') . ' OR answer.is_assessed is Null)';\n\t\t}\n\t\tif($arr_filter['isassessed'] == 2) {\n\t\t\t$where[] = '(answer.is_assessed = ' . $ilDB->quote(1, 'integer') . ')';\n\t\t}\n\n\n\n\t\tif (!empty($where)) {\n\t\t\treturn ' WHERE ' . implode(' AND ', $where) . ' ';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "private function sql_whereAllItems()\n {\n $where = '1 ' .\n $this->sql_whereAnd_pidList() .\n $this->sql_whereAnd_enableFields() .\n $this->sql_whereAnd_Filter() .\n $this->sql_whereAnd_fromTS() .\n $this->sql_whereAnd_sysLanguage();\n // Get WHERE statement\n // RETURN WHERE statement without a WHERE\n return $where;\n }", "public function getSQL() {\n\t\t$o = $this->obj;\n\t\t$sql = \"SELECT\";\n\t\tif ($this->distinct) {\n\t\t\t$sql .= \" DISTINCT\";\n\t\t}\n\t\t$s = $this->getSelects();\n\t\tif ($s == \"\") {\n\t\t\t$sql .= \" \".$this->getTable().\".*\";\n\t\t} else {\n\t\t\t$sql .= \" \".$s;\n\t\t}\n\t\t$sql .= \" FROM \".$this->getFrom();\n\t\t$sql .= $this->getJoins();\n\t\t$where = $this->getFilters()->getSQL();\n\t\tif ($where != \"\") {\n\t\t\t$sql .= \" WHERE \".$where;\n\t\t}\n\n\n\n\t\tif ($this->group !== false) {\n\t\t\tif ($this->group[1] == false) {\n\t\t\t\t$sql .= \" GROUP BY \".$this->getTable().\".`\".$this->db->escape_string($this->group[0]).\"`\";\n\t\t\t} else {\n\t\t\t\t$sql .= \" GROUP BY \".$this->group[0];\n\t\t\t}\n\t\t}\n\t\t//if ($this->filter) {\n\t\t//\t$sql .= \" WHERE \".$this->filter->getSQL();\n\t\t//}\n\t\tif (count($this->order) > 0) {\n\t\t\tif ($this->order[0][0] === false) {\n\t\t\t\t$sql .= \" ORDER BY RAND()\";\n\t\t\t} elseif (isset($this->order[0][0])) {\n\t\t\t\t$sql .= \" ORDER BY \";\n\t\t\t\tforeach ($this->order as $cols) {\n\t\t\t\t\t$sql .= \"`\".$this->db->escape_string($cols[0]).\"`\";\n\t\t\t\t\tif ($this->orderAsc) {\n\t\t\t\t\t\t$sql .= \" {$cols[1]} \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sql .= \" {$cols[1]} \";\n\t\t\t\t\t}\n\t\t\t\t\t$sql .= \", \";\n\t\t\t\t}\n\t\t\t\t$sql = substr($sql, 0, -2);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->start !== false) {\n\t\t\t$sql .= \" LIMIT {$this->start}\";\n\t\t\tif ($this->end !== false) {\n\t\t\t\t$sql .= \",{$this->end}\";\n\t\t\t}\n\t\t}\n\t\treturn $sql;\n\t}", "protected function buildWhereClause() {\r\n\t\t$sql='';\r\n\t\tif (count($this->_salt_wheres)>0) {\r\n\t\t\t$sql.=' WHERE '.implode(' ', $this->_salt_wheres);\r\n\t\t}\r\n\t\treturn $sql;\r\n\r\n\t}", "public function filter()\n\t{\n\t\treturn implode( ' AND ', array_map( function( $col ) { return \"$col=?\"; }, array_keys( $this->_id ) ) );\n\t}", "public function rawFilter($filter) {\n\t\t$query = InventorySummary::orderBy('Client_SKU', 'asc');\n\t\tif(isset($filter['objectID']) && strlen($filter['objectID']) > 3) {\n\t\t\t$query = $query->where('objectID', 'like', $filter['objectID'] . '%');\n\t\t}\n\t\tif(isset($filter['Client_SKU']) && strlen($filter['Client_SKU']) > 3) {\n\t\t\t$query = $query->where('Client_SKU', 'like', $filter['Client_SKU'] . '%');\n\t\t}\n\t\tif(isset($filter['Description']) && strlen($filter['Description']) > 3) {\n\t\t\t$query = $query->where('Description', 'like', $filter['Description'] . '%');\n\t\t}\n\n /*\n * Pick face quantity choices\n */\n if(isset($filter['pickQty_rb'])) {\n if($filter['pickQty_rb'] == 'zero') {\n $query = $query->where('pickQty', '=', '0');\n } elseif($filter['pickQty_rb'] == 'belowMin') {\n $query = $query->where('pickQty', '<', '3');\n } elseif($filter['pickQty_rb'] == 'aboveMin') {\n $query = $query->where('pickQty', '>', '2');\n }\n }\n\n /*\n * Activity location quantity choices\n */\n if(isset($filter['actQty_rb'])) {\n if($filter['actQty_rb'] == 'zero') {\n $query = $query->where('actQty', '=', '0');\n } elseif($filter['actQty_rb'] == 'aboveZero') {\n $query = $query->where('actQty', '>', '0');\n }\n }\n\n /*\n * Reserve quantity choices\n */\n if(isset($filter['resQty_rb'])) {\n if($filter['resQty_rb'] == 'zero') {\n $query = $query->where('resQty', '=', '0');\n } elseif($filter['resQty_rb'] == 'aboveZero') {\n $query = $query->where('resQty', '>', '0');\n }\n }\n\n /*\n * Replen Priority choices\n */\n if(isset($filter['replenPrty_cb_noReplen'])\n or isset($filter['replenPrty_cb_20orBelow'])\n or isset($filter['replenPrty_cb_40orBelow'])\n or isset($filter['replenPrty_cb_60orBelow'])) {\n $query->where(function ($query) use ($filter) {\n if (isset($filter['replenPrty_cb_noReplen']) && $filter['replenPrty_cb_noReplen'] == 'on') {\n $query->orWhereNull('replenPrty')\n ->orWhere('replenPrty', '=', '0');\n }\n if (isset($filter['replenPrty_cb_20orBelow']) && $filter['replenPrty_cb_20orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['1', '20']);\n }\n if (isset($filter['replenPrty_cb_40orBelow']) && $filter['replenPrty_cb_40orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['21', '40']);\n }\n if (isset($filter['replenPrty_cb_60orBelow']) && $filter['replenPrty_cb_60orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['41', '60']);\n }\n });\n }\n //dd(__METHOD__.\"(\".__LINE__.\")\", compact('filter', 'query'));\n\n\t\tif(isset($filter['created_at']) && strlen($filter['created_at']) > 1) {\n\t\t\t$query = $query->where('created_at', 'like', $filter['created_at'] . '%');\n\t\t}\n\t\tif(isset($filter['updated_at']) && strlen($filter['updated_at']) > 1) {\n\t\t\t$query = $query->where('updated_at', 'like', $filter['updated_at'] . '%');\n\t\t}\n return $query;\n }", "public static function xfilter($table, $fields, $orderBy, $limit){\r\n $queryType = \"xfilter\"; \r\n include '../helper/retrieve_data.php';\r\n return $querySet;\r\n }", "function GetWhere( $Filter )\n {\n $Sql = FeaturesFilter( $Filter->ft );\n $Sql .= LocalidadFilter( $Filter );\n $Sql .= PreciosFilter( $Filter );\n $Sql .= HabitacionesFilter( $Filter );\n \n return $Sql; \n }", "function wcfmgs_group_manager_enquery_filter( $sql ) {\r\n \t\r\n \tif( !wcfm_is_vendor() && empty( $_POST['enquiry_vendor'] ) ) {\r\n \t\t$is_marketplace = wcfm_is_marketplace();\r\n\t\t\tif( $is_marketplace ) {\r\n\t\t\t\t$allow_vendors = $this->wcfmgs_group_manager_allow_vendors_list( array(0), $is_marketplace );\r\n\t\t\t\t$sql .= \" AND `vendor_id` IN (\" . implode( ',', $allow_vendors ) . \")\";\r\n\t\t\t}\r\n \t}\r\n \t\r\n \treturn $sql;\r\n }", "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 }", "public function build_query(/* ... */)\n {\n $query = [\"SELECT\"];\n $model = $this->get_model();\n // Field selection\n $fields = [];\n foreach ($this->_fields as $_field) {\n $fields[] = $this->_build_select_field($_field);\n }\n $query[] = implode(', ', $fields);\n // Table Selection\n $query[] = 'FROM';\n $query[] = '`' . $model->get_table() . '`';\n // WHERE lookup\n $query[] = $this->build_where();\n if (null !== $this->_orderby) {\n $query[] = $this->_orderby;\n }\n if (null !== $this->_limit) {\n $query[] = $this->_limit;\n }\n return $model->get_connection()->prepare(implode(\" \", $query));\n }", "public function global_filter_field_expr()\n {\n\n // filtering $_GET\n if (is_array(ctx()->getRequest()->get()) && ! empty(ctx()->getRequest()->get()))\n {\n foreach (ctx()->getRequest()->get() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->get($key, $this->_clean_input_field_expr($val));\n }\n }\n\n }\n\n // filtering $_POST\n if (is_array(ctx()->getRequest()->post()) && ! empty(ctx()->getRequest()->post()))\n {\n foreach (ctx()->getRequest()->post() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->post($key, $this->_clean_input_field_expr($val));\n }\n }\n }\n\n // filtering $_COOKIE\n if (is_array(ctx()->getRequest()->cookie()) && ! empty(ctx()->getRequest()->cookie()))\n {\n foreach (ctx()->getRequest()->cookie() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->cookie($key, $this->_clean_input_field_expr($val));\n }\n\n }\n }\n\n\n // filtering $_REQUEST\n if (is_array(ctx()->getRequest()->request()) && ! empty(ctx()->getRequest()->request()))\n {\n foreach (ctx()->getRequest()->request() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->request($key, $this->_clean_input_field_expr($val));\n }\n }\n }\n\n }", "function _get_filters(){\n $flt = array();\n $filters = array();\n\n if(!isset($_REQUEST['dataflt'])){\n $flt = array();\n }elseif(!is_array($_REQUEST['dataflt'])){\n $flt = (array) $_REQUEST['dataflt'];\n }else{\n $flt = $_REQUEST['dataflt'];\n }\n foreach($flt as $key => $line){\n // we also take the column and filtertype in the key:\n if(!is_numeric($key)) $line = $key.$line;\n $f = $this->_parse_filter($line);\n if(is_array($f)){\n $f['logic'] = 'AND';\n $filters[] = $f;\n }\n }\n return $filters;\n }", "private function getFilterSQL(string $sql_table, string $sql_column, string $filter_value): string\n {\n $sql = \"\";\n\n // splits the audiences by comma and creates the SQL for those\n if (!empty($filter_value)) {\n $filter_explode = $this->getSplitFilters($filter_value);\n\n $sql .= '(';\n foreach ($filter_explode as $index => $single_filter) {\n if ($index > 0) {\n $sql .= ' OR ';\n }\n $sql .= $sql_table . '.' . $sql_column . ' = \\'' . self::escapeString($single_filter) . '\\'';\n }\n $sql .= ') ';\n }\n\n return $sql;\n }", "protected function rawFilter($filter) {\n //Log::debug('query: ',$filter);\n\t\t// Build a query based on filter $filter\n\t\t$query = Pallet::query()\n ->select('Pallet.objectID', 'Pallet.Pallet_ID', 'Pallet.x', 'Pallet.y', 'Pallet.z', 'Pallet.Status')\n ->orderBy('Pallet_ID', 'asc');\n if(isset($filter['Pallet_ID']) && strlen($filter['Pallet_ID']) > 2) {\n $query->where('Pallet_ID', 'like', ltrim($filter['Pallet_ID'],'0') . '%');\n\t\t}\n\t\tif(isset($filter['Pallet_ID.prefix']) && is_array($filter['Pallet_ID.prefix'])) {\n $query->whereRaw(\"substring(Pallet_ID,1,3) in ('\".implode(\"','\", $filter['Pallet_ID.prefix']).\"')\");\n\t\t}\n if(isset($filter['Status']) && is_array($filter['Status'])) {\n $query->whereRaw(\"Status in ('\".implode(\"','\", $filter['Status']).\"')\");\n }\n elseif(isset($filter['Status']) && strlen($filter['Status']) > 3) {\n $query->where('Status', '=', $filter['Status']);\n }\n /*\n * container.parent should generate this sql request\n * select Pallet.* from Pallet join container plt on plt.objectID = Pallet.objectID where plt.parentID = 6213292055;\n */\n if(isset($filter['container.parent']) && strlen($filter['container.parent']) > 3) {\n $query\n ->join('container as plt', 'plt.objectID', '=', 'Pallet.objectID')\n ->where('plt.parentID',$filter['container.parent']);\n }\n /*\n * container.child should generate this sql request\n * select Pallet.* from Pallet join container gc on gc.parentID = Pallet.objectID where gc.objectID = 6226111054;\n */\n if(isset($filter['container.child']) && strlen($filter['container.child']) > 3) {\n $query\n ->join('container as gc', 'gc.parentID', '=', 'Pallet.objectID')\n ->where('gc.objectID',$filter['container.child']);\n }\n return $query;\n }", "public function getAll(){\r\n\t\t$tablejoins_and_filters = parent::getAll();\r\n\t\t\r\n\t\tif($_REQUEST[\"STORE\"]!=\"\") \r\n\t\t\t$tablejoins_and_filters\t .=\" AND \".$this->storeID.\"=\".$_REQUEST['STORE'];\t \r\n\t\t\t\r\n\t\tif($_REQUEST[\"SKU\"]!=\"\") \r\n\t\t\t$tablejoins_and_filters\t .=\" AND \".$this->skuID.\"=\".$_REQUEST['SKU'];\t \r\n\t\t\t\r\n\t\t/* if($_REQUEST[\"depot\"]!=\"All\" && $_REQUEST[\"depot\"]!=\"\") \r\n\t\t\t$tablejoins_and_filters\t .=\" AND \".$this->settingVars->maintable.\".depotID=\".$_REQUEST['depot'];\t */\r\n\t\t\t\t\t\t\t\t\r\n\t\treturn $tablejoins_and_filters;\r\n\t}", "function get_sql_hazard_filter($dept = NULL, $date_start = NULL, $date_end = NULL, $type_restriction = NULL, $mitigated = NULL) {\n $filters = array();\n if ($dept != NULL) {\n $filters[] = \"dept = '\" . $dept . \"'\";\n }\n if ($date_start != NULL) {\n $filters[] = \"date >= '\" . $date_start . \"'\";\n }\n if ($date_end != NULL) {\n $filters[] = \"date <= '\" . $date_end . \"'\";\n }\n if ($type_restriction != NULL) {\n $filters[] = \"audit_type = '\" . $type_restriction . \"'\";\n }\n if ($mitigated != NULL) {\n $filters[] = \"mitigated = \" . $mitigated;\n }\n $filter_str = join(\" AND \", $filters);\n return \" WHERE \" . ($filter_str != \"\" ? $filter_str : \"1\") . \" \";\n}", "function getFilterFromRequest() {\n\t\t$_filter = array();\n\n\t\tif(isset($_REQUEST['filterSelect_0'])) {\n\n\n\t\t\t$_parse = true;\n\t\t\t$_count = 0;\n\n\t\t\twhile ($_parse) {\n\t\t\t\tif(isset($_REQUEST['filterSelect_'.$_count])) {\n\n\t\t\t\t\tif(isset($_REQUEST['filterLogic_'.$_count]) && $_REQUEST['filterLogic_'.$_count]=='OR') {\n\t\t\t\t\t\t$_logic = 'OR';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_logic = 'AND';\n\t\t\t\t\t}\n\t\t\t\t\tif(isset($_REQUEST['filterValue_'.$_count]) && trim($_REQUEST['filterValue_'.$_count])<>'') {\n\t\t\t\t\t\t$_filter[] = array(\n\t\t\t\t\t\t\t\t'logic' => $_logic,\n\t\t\t\t\t\t\t\t'field' => $_REQUEST['filterSelect_'.$_count],\n\t\t\t\t\t\t\t\t'operation' => $_REQUEST['filterOperation_'.$_count],\n\t\t\t\t\t\t\t\t'value' => $_REQUEST['filterValue_'.$_count]\n\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t$_count++;\n\t\t\t\t} else {\n\t\t\t\t\t$_parse = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $_filter;\n\t}", "private function sql_whereWiHits()\n {\n // Get WHERE statement\n $where = $this->pObj->objSqlInit->statements[ 'listView' ][ 'where' ] .\n $this->sql_whereAnd_Filter() .\n $this->sql_whereAnd_fromTS();\n // Localise the WHERE statement\n $where = $this->sql_whereWiHitsLL( $where );\n // RETURN WHERE statement without a WHERE\n return $where;\n }", "public static function filter($table, $fields){ \r\n $queryType = \"filter\";\r\n include '../helper/retrieve_data.php'; //query and data rertrieval are handled here\r\n return $querySet;\r\n }", "private function buildWhere()\n {\n $query = array();\n\n // Make sure there's something to do\n if (isset($this->query['where']) and count($this->query['where'])) {\n foreach ($this->query['where'] as $group => $conditions) {\n $group = array(); // Yes, because the $group above is not used, get over it.\n foreach ($conditions as $condition => $value) {\n // Get column name\n $cond = explode(\" \", $condition);\n $column = str_replace('`', '', $cond[0]);\n $safeColumn = $this->columnName($column);\n\n // Make the column name safe\n $condition = str_replace($column, $safeColumn, $condition);\n\n // Add value to the bind queue\n $valueBindKey = str_replace(array('.', '`'), array('_', ''), $safeColumn);\n\n if (!empty($value) or $value !== null) {\n $this->valuesToBind[$valueBindKey] = $value;\n }\n\n // Add condition to group\n $group[] = str_replace(\"?\", \":{$valueBindKey}\", $condition);\n }\n\n // Add the group\n $query[] = \"(\" . implode(\" AND \", $group) . \")\";\n }\n\n // Return\n return \"WHERE \" . implode(\" OR \", $query);\n }\n }", "public function getSQL()\n\t{\n\t\t// build the SELECT FROM part\n\t\t$sql = sprintf('SELECT * FROM `%s`', $this->from);\n\t\t// build the JOIN part\n\t\tforeach ($this->joins as $join) {\n\t\t\t$sql .= sprintf(' %s JOIN `%s` ON (%s)',\n\t\t\t\t$join['type'],\n\t\t\t\t$join['foreignTable'],\n\t\t\t\t$join['clause']\n\t\t\t);\n\t\t}\n\t\t// build the WHERE part\n\t\tif ($this->wheres) {\n\t\t\t$whereClauses = array();\n\t\t\tforeach ($this->wheres as $key => $where) {\n\t\t\t\t$whereClauses []= $where['clause'];\n\t\t\t}\n\t\t\t$sql .= ' WHERE ' . implode(' AND ', $whereClauses);\n\t\t}\n\t\t// build the LIMIT part\n\t\tif ($this->limit) {\n\t\t\t$sql .= ' LIMIT ' . $this->limit;\n\t\t}\n\t\treturn $sql;\n\t}", "protected function get_filter_sql(array $filters) {\n global $USER;\n\n list($filtersql, $filterparams) = parent::get_filter_sql($filters);\n\n $additionalfilters = array();\n\n // Limit to users not currently assigned.\n $additionalfilters[] = 'clstass.userid IS NULL';\n\n // Add permissions.\n list($permadditionalfilters, $permadditionalparams) = $this->get_filter_sql_permissions();\n $additionalfilters = array_merge($additionalfilters, $permadditionalfilters);\n $filterparams = array_merge($filterparams, $permadditionalparams);\n\n // Add our additional filters.\n if (!empty($additionalfilters)) {\n $filtersql = (!empty($filtersql))\n ? $filtersql.' AND '.implode(' AND ', $additionalfilters) : 'WHERE '.implode(' AND ', $additionalfilters);\n }\n\n return array($filtersql, $filterparams);\n }", "public function createWhere() {\n\t\tlist($where, $joins) = parent::createWhere();\n\t\tif (!($this->parent->parent instanceof QuerySet))\n\t\t\t$where = \" WHERE \" . $where;\n\t\telse\n\t\t\t$where = \" AND \" . $where;\n\t \n\t\treturn array($where, $joins);\n\t}", "protected function get_filter_sql(array $filters) {\n global $USER;\n\n list($filtersql, $filterparams) = parent::get_filter_sql($filters);\n\n $additionalfilters = array();\n\n // Add permissions.\n list($permadditionalfilters, $permadditionalparams) = $this->get_filter_sql_permissions();\n $additionalfilters = array_merge($additionalfilters, $permadditionalfilters);\n $filterparams = array_merge($filterparams, $permadditionalparams);\n\n // Add our additional filters.\n if (!empty($additionalfilters)) {\n $filtersql = (!empty($filtersql))\n ? $filtersql.' AND '.implode(' AND ', $additionalfilters) : 'WHERE '.implode(' AND ', $additionalfilters);\n }\n\n return array($filtersql, $filterparams);\n }", "private function sql_where($filter, $structure) {\n\t\t$pool_class = $structure['class'] . 'Pool_Model';\n\t\t$visitor = new $this->sql_builder_visitor_class_name(array($pool_class, \"map_name_to_backend\"));\n\t\t$sql = \" WHERE \".$filter->visit($visitor, false);\n\t\treturn $sql;\n\t}", "function searchSQL ($aRequest) {\n $sVersion = DBUtil::getOneResultKey(\"SHOW VARIABLES LIKE 'version'\", \"Value\");\n if ((int)substr($sVersion, 0, 1) >= 4) {\n $boolean_mode = \"IN BOOLEAN MODE\";\n } else {\n $boolean_mode = \"\";\n }\n\n $p = array();\n $p[0] = \"MATCH(DDCT.body) AGAINST (? $boolean_mode)\";\n\t$p[1] = KTUtil::phraseQuote($aRequest[$this->getWidgetBase()]);\n \n // handle the boolean \"not\" stuff.\n $want_invert = KTUtil::arrayGet($aRequest, $this->getWidgetBase() . '_not');\n if (is_null($want_invert) || ($want_invert == \"0\")) {\n return $p;\n } else {\n $p[0] = '(NOT (' . $p[0] . '))';\n } \n \n return $p;\n }", "public function global_filtering()\n {\n // filtering $_GET\n if (is_array(ctx()->getRequest()->get()) && ! empty(ctx()->getRequest()->get()))\n {\n foreach (ctx()->getRequest()->get() as $key => $val)\n ctx()->getRequest()->get($this->_clean_input_keys($key) , $this->_clean_input_data($val));\n }\n\n // filtering $_POST\n if (is_array(ctx()->getRequest()->post()) && ! empty(ctx()->getRequest()->post()))\n {\n foreach (ctx()->getRequest()->post() as $key => $val){\n ctx()->getRequest()->post($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n }\n\n\n // filtering $_COOKIE\n if (is_array(ctx()->getRequest()->cookie()) && ! empty(ctx()->getRequest()->cookie()))\n {\n foreach (ctx()->getRequest()->cookie() as $key => $val)\n ctx()->getRequest()->cookie($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n\n // filtering $_REQUEST\n if (is_array(ctx()->getRequest()->request()) && ! empty(ctx()->getRequest()->request()))\n {\n foreach (ctx()->getRequest()->request() as $key => $val){\n ctx()->getRequest()->request($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n }\n }", "private function buildFindQuery(?string $filter = null): string\n {\n // means product_name and not product_id\n $sql = 'SELECT o, i, p FROM App\\Entity\\Order o LEFT JOIN o.inventory i LEFT JOIN i.product p';\n\n if (isset($filter)) {\n $sql = $sql . ' WHERE i.sku = :filter OR i.productId = :filter';\n }\n\n return $sql;\n }", "public function filterDataTable($query, $request)\n {\n if (isset($request['req']['from']) && $request['req']['from'] != '') {\n $query->whereDate('created_at', '>=', $request['req']['from']);\n }\n\n if (isset($request['req']['to']) && $request['req']['to'] != '') {\n $query->whereDate('created_at', '<=', $request['req']['to']);\n }\n\n if (isset($request['req']['type']) && $request['req']['type'] != '') {\n $query->where('type', '=', $request['req']['type']);\n }\n \n \n\n \n\n \n return $query;\n }", "private function filter() {\r\n $globalSearch = array();\r\n $columnSearch = array();\r\n\r\n $columns = $this->resource->setDatatableFields(TRUE);\r\n\r\n $dtColumns = $this->pluck($columns, 'dt');\r\n\r\n if (isset($this->resource->requestData['search']) && $this->resource->requestData['search']['value'] != '') {\r\n\r\n $str = $this->resource->requestData['search']['value'];\r\n\r\n for ($i = 0, $ien = count($this->resource->requestData['columns']); $i < $ien; $i++) {\r\n $requestColumn = $this->resource->requestData['columns'][$i];\r\n $columnIdx = array_search($requestColumn['data'], $dtColumns);\r\n $column = $columns[$columnIdx];\r\n if ($requestColumn['searchable'] == 'true') {\r\n\r\n $binding = '%' . $str . '%';\r\n\r\n if (strpos($column['db'], \".\") !== FALSE) {\r\n\r\n $fld = explode('.', $column['db']);\r\n $globalSearch[] = $this->adapter->platform->quoteIdentifierChain([$fld[0], $fld[1]]) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n } else {\r\n $globalSearch[] = $this->adapter->platform->quoteIdentifier($column['db']) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n }\r\n }\r\n }\r\n }\r\n // Individual column filtering\r\n if (isset($this->resource->requestData['columns'])) {\r\n for ($i = 0, $ien = count($this->resource->requestData['columns']); $i < $ien; $i++) {\r\n $requestColumn = $this->resource->requestData['columns'][$i];\r\n $columnIdx = array_search($requestColumn['data'], $dtColumns);\r\n $column = $columns[$columnIdx];\r\n $str = $requestColumn['search']['value'];\r\n if ($requestColumn['searchable'] == 'true' &&\r\n $str != '') {\r\n\r\n $binding = '%' . $str . '%';\r\n\r\n if (strpos($column['db'], \".\") !== FALSE) {\r\n\r\n $fld = explode('.', $column['db']);\r\n $columnSearch[] = $this->adapter->platform->quoteIdentifierChain([$fld[0], $fld[1]]) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n } else {\r\n $columnSearch[] = $this->adapter->platform->quoteIdentifier($column['db']) . \" LIKE \" . $this->adapter->platform->quoteValue($binding);\r\n }\r\n }\r\n }\r\n }\r\n // Combine the filters into a single string\r\n $where = '';\r\n if (count($globalSearch)) {\r\n $where = '(' . implode(' OR ', $globalSearch) . ')';\r\n }\r\n if (count($columnSearch)) {\r\n $where = $where === '' ?\r\n implode(' AND ', $columnSearch) :\r\n $where . ' AND ' . implode(' AND ', $columnSearch);\r\n }\r\n\r\n return $where;\r\n }", "function get_sql_where(){\r\n\t\t$where_str='';\r\n\t\t$multiple_search_str='';\r\n\r\n\t\tif(stripos($this->sql_query,' WHERE ')!==false){\r\n\t\t\tif(stripos($this->sql_query,' ORDER BY ')!==false)\r\n\t\t\t\t$where_str_ini='('.substr($this->sql_query,stripos($this->sql_query,' WHERE ')+7,stripos($this->sql_query,' ORDER BY ')-stripos($this->sql_query,' WHERE ')-7).')';\r\n\t\t\telseif(stripos($this->sql_query,' LIMIT ')!==false)\r\n\t\t\t\t$where_str_ini='('.substr($this->sql_query,stripos($this->sql_query,' WHERE ')+7,stripos($this->sql_query,' LIMIT ')-stripos($this->sql_query,' WHERE ')-7).')';\r\n\t\t\telse\r\n\t\t\t\t$where_str_ini='('.substr($this->sql_query,stripos($this->sql_query,' WHERE ')+7).')';\r\n\t\t}else{\r\n\t\t\t$where_str_ini='';\r\n\t\t}\r\n\r\n\t\t// adds the extra columns in consideration\r\n\t\t$arr_sql_fields=$this->sql_fields;\r\n\t\tfor($i=0; $i<count($this->extra_cols); $i++)\r\n\t\t\tarray_splice($arr_sql_fields, $this->extra_cols[$i][0]-1, 0, '');\r\n\r\n\t\tfor($i=0; $i<count($arr_sql_fields); $i++){\r\n\r\n\t\t\tif(empty($this->multiple_search[$i]))\r\n\t\t\t\t$this->multiple_search[$i]='';\r\n\r\n\t\t\tif($this->search!='' and $this->search_init[$i]!='f')\r\n\t\t\t\t$where_str.=(($i==0 and $where_str_ini) ? ' AND ' : '').($where_str ? ' OR ' : '(').$arr_sql_fields[$i].\" LIKE '%\".$this->search.\"%'\";\r\n\r\n\t\t\tif(count($this->multiple_search)>0 and $this->multiple_search[$i]!='' and $this->multiple_search_init[$i]!='f')\r\n\t\t\t\t$multiple_search_str.=(($where_str_ini or $where_str or $multiple_search_str) ? ' AND ' : '').$arr_sql_fields[$i].\" LIKE '%\".$this->multiple_search[$i].\"%'\";\r\n\r\n\t\t}\r\n\r\n\t\tif($where_str!='')\r\n\t\t\t$where_str.=')';\r\n\r\n\t\treturn (($where_str_ini or $where_str or $multiple_search_str) ? ' WHERE ' : '').$where_str_ini.$where_str.$multiple_search_str;\r\n\t}", "public function prepareQuery()\n {\n //prepare where conditions\n foreach ($this->where as $where) {\n $this->prepareWhereCondition($where);\n }\n\n //prepare where not conditions\n foreach ($this->whereNot as $whereNot) {\n $this->prepareWhereNotCondition($whereNot);\n }\n\n // Add a basic range clause to the query\n foreach ($this->inRange as $inRange) {\n $this->prepareInRangeCondition($inRange);\n }\n\n // Add a basic not in range clause to the query\n foreach ($this->notInRange as $notInRange) {\n $this->prepareNotInRangeCondition($notInRange);\n }\n\n // add Terms to main query\n foreach ($this->whereTerms as $term) {\n $this->prepareWhereTermsCondition($term);\n }\n\n // add exists constrains to the query\n foreach ($this->exist as $exist) {\n $this->prepareExistCondition($exist);\n }\n\n // add matcher queries\n foreach ($this->match as $match) {\n $this->prepareMatchQueries($match);\n }\n\n $this->query->addFilter($this->filter);\n\n return $this->query;\n }", "function getWhereClause($local = array()) {\n global $whereFilter;\n\n $where = array_merge($local, $whereFilter);\n if (count($where) > 0) {\n $output = \" where \" . implode(\" and \", $where) . \" \";\n return $output;\n } else {\n return \"\";\n }\n}", "protected function prepareFilters()\n {\n if(count($this->api_query) === 0){\n return;\n }\n\n // Matched WHERE filters would be all\n // that are not KEYWORDS (count, page, embed...)\n foreach($this->api_query as $column => $value) {\n if(in_array($column, $this->api_keyword_filters)){\n continue;\n }\n\n $this->where_filters[$column]= $value;\n }\n }", "public function buildWhereClause()\n {\n $criterias = $this->bean->ownCriteria;\n if (empty($criterias)) {\n return '1';\n }// find all because there are no criterias\n $where = array();\n $this->filter_values = array();\n //$mask = \" %s %s %s\"; // login, field, op (with masked value)\n $n = 0;\n foreach ($criterias as $id=>$criteria) {\n if (! $criteria->op) {\n continue;\n } // skip all entries that say any!\n if ($criteria->value === null || $criteria->value === '') {\n continue;\n } // skip all empty\n $n++;\n $logic = 'AND ';//$criteria->logic;\n if ($n == 1) {\n $logic = '';\n }\n $where[] = $logic.$criteria->makeWherePart($this);\n }\n\n if (empty($where)) {\n return '1';\n }// find all because there was no active criteria\n\n $where = implode(' ', $where);\n return $where;\n }", "function getSQLWhereCondition($query_header, $post, $config_language_id)\n {\n $sql = \" WHERE pd.language_id = '\" . (int) $config_language_id . \"' \";\n\n // Filter by categories\n if (isset($post['categories'])) {\n $category_ids = array_map('intval', $post['categories']);\n $category_ids = implode(\",\", $category_ids);\n\n $sql .= \" AND p2c.category_id IN (\" . $category_ids . \") \";\n }\n\n // Filter by manufacturers\n if (isset($post['manufacturers'])) {\n $manufacturer_ids = array_map('intval', $post['manufacturers']);\n $manufacturer_ids = implode(\",\", $manufacturer_ids);\n\n $sql .= \" AND p.manufacturer_id IN (\" . $manufacturer_ids . \") \";\n }\n\n // Filter by special_groups\n if (isset($post['special_groups'])) {\n $special_groups_ids = array_map('intval', $post['special_groups']);\n $special_groups_ids = implode(\",\", $special_groups_ids);\n\n $sql .= \" AND ps.product_special_group_id IN (\" . $special_groups_ids . \") \";\n }\n\n // Attach additional chosen products\n if (isset($post['products'])) {\n $product_ids = array_map('intval', $post['products']['id']);\n\n $sql .= \" UNION \" . $query_header;\n $sql .= \" WHERE ps.product_id IN (\" . implode(\",\", $product_ids) . \") AND pd.language_id = '\" . (int) $config_language_id . \"' \";\n }\n\n return $sql;\n }", "function sqlStatementsFilter($productType, $productColumn, $queryNumber) {\r\n\t\tif ($queryNumber === 0) {\r\n\t\t\tif (strcmp($productColumn, \"size\") != 0) { //Order size differently so it reads {S, M, L} instead of {L, M, S}\r\n\t\t\t\t$sqlReturn = \"SELECT DISTINCT \" . $productColumn . \" FROM \" . $productType . \" ORDER BY \" . $productColumn;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$sqlReturn = \"SELECT DISTINCT \" . $productColumn . \" FROM \" . $productType . \" ORDER BY \" . $productColumn . \" DESC\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if ($queryNumber === 1) { //Retrieve the columns for each product.\r\n\t\t\t$sqlReturn = \"SHOW COLUMNS FROM \" . $productType;\r\n\t\t}\r\n\t\t\r\n\t\treturn $sqlReturn;\r\n\t}", "protected function where(array $filter){\n if (array_key_exists(\"order\", $filter)){\n $order = $filter[\"order\"];\n unset($filter[\"order\"]);\n if (gettype($order) != \"array\")\n $order = [$order];\n }\n\n if (array_key_exists(\"limit\", $filter)){\n $limit = $filter[\"limit\"];\n unset($filter[\"limit\"]);\n if (gettype($limit) != \"integer\")\n throw new appException(\"This is off-limits, literally\");\n }\n\n if (!empty($filter)){\n $query = \" WHERE \";\n\n foreach ($filter as $k => $v){\n if (gettype($v) == \"array\"){\n $query .= $this->genTableVar($k) . \" IN ( \";\n $query .= join(\", \", array_fill(0, count($v), \"?\"));\n $query .= \") AND \";\n }\n else if (gettype($v) == \"object\" && get_class($v) == \"dbContains\"){\n $query .= $v->genSql($this->genTableVar($k)) . \" AND \";\n }\n else {\n $query .= $this->genTableVar($k) . \" = ? AND \";\n }\n $this->args[] = $v;\n }\n\n $query = substr($query, 0, -4);\n\n $this->query .= $query;\n }\n\n if (isset($order))\n $this->orderBy($order);\n\n if (isset($limit))\n $this->limit($limit);\n }", "protected function buildSql()\n {\n $this->selectSQL = ''; // reset query string\n\n $this->appendSql(\"SELECT \" . $this->buildFieldsList() . \" FROM \" . $this->fromTable)\n ->appendSql(!empty($this->joinsString) ? \" \" . $this->joinsString : \"\")\n ->appendSql(\" WHERE \" . (!empty($this->whereString) ? \" \" . $this->whereString : \" 1\"))\n ->appendSql(!empty($this->groupbyString) ? \" GROUP BY \" . $this->groupbyString : \"\")\n ->appendSql(!empty($this->orderbyString) ? \" ORDER BY \" . $this->orderbyString : \"\")\n ->appendSql(!empty($this->limitString) ? \" \" . $this->limitString : \"\");\n }", "function filter($request) {\n\t\t//$model = singleton($this->modelClass);\n\t\t$context = $this->dataObject->getDefaultSearchContext();\n\t\t$value = $request->getVar('q');\n\t\t$results = $context->getResults(array(\"Name\"=>$value));\n\t\theader(\"Content-Type: text/plain\");\n\t\tforeach($results as $result) {\n\t\t\techo $result->Name . \"\\n\";\n\t\t}\t\t\n\t}", "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 }", "protected static function preparar_filtros($variables=false){\n $filtros='';\n if($variables){\n $filtros='WHERE true ';\n foreach ($variables as $clave => $valor):\n $clave=strtolower($clave);\n $filtros .=\" AND \".$clave.\"= ? \"; \n endforeach;\n }\n return $filtros;\n }", "private function grup_sql()\n\t{\n\t\tif ($this->session->grup == 4)\n\t\t{\n\t\t\t$kf = $this->session->user;\n\t\t\t$filter_sql= \" AND a.id_user = $kf\";\n\t\t\treturn $filter_sql;\n\t\t}\n\t}", "public function sqlWhere()\n {\n if ($this->isMultilingualAttribute()) {\n $strWhere = 'IFNULL(translation.' . $this->arrConfig['attribute'] . ', ' . Product::getTable() . '.' . $this->arrConfig['attribute'] . ')';\n } else {\n $strWhere = Product::getTable() . '.' . $this->arrConfig['attribute'];\n }\n\n $strWhere .= ' ' . $this->getOperatorForSQL() . ' ?';\n\n return $strWhere;\n }", "public function createQuery()\n\t{\n\t\t$this->tab[] = $this->action;\n\t\t$this->tab[] = !is_array($this->field) ? $this->field : join(', ',$this->field);\n\t\t$this->tab[] = ' FROM '.$this->from;\n\t\tif(!empty($this->where)){$this->tab[] = 'WHERE '.$this->where;}\n\t\tif(!empty($this->and)){$this->tab[] = 'AND '.$this->and;}\n\t\tif(!empty($this->or)){$this->tab[] = 'OR '.$this->or;}\n\t\tif(!empty($this->in)){$this->tab[] = 'IN '.$this->in;}\n\t\tif(!empty($this->beetween)){$this->tab[] = 'BEETWEEN '.$this->beetween;}\n\t\tif(!empty($this->not)){$this->tab[] = 'NOT '.$this->not;}\n\t\tif(!empty($this->like)){$this->tab[] = 'LIKE '.$this->like;}\n\t\tif(!empty($this->order)){$this->tab[] = 'ORDER BY '.$this->order;}\n\t\treturn join(\" \",$this->tab);\n\t}", "private function prepare_filter(array $filter=array(), $to_sql) {\n\t\t\t$filter_array = array();\n\n\t\t\t$fields = self::$db->table_info($this->table_name);\n\n\t\t\t$table_name_i18n = $this->table_name.$this->i18n_table_suffix;\n\t\t\tif($is_18n=($this->is_i18n && self::$db->table_exists($table_name_i18n))) {\n\t\t\t\t$fields_i18n = self::$db->table_info($table_name_i18n);\n\t\t\t\t$fields = array_merge($fields, $fields_i18n);\n\t\t\t}\n\t\t\tforeach($fields AS $field) {\n\t\t\t\tif(isset($filter[$field[\"name\"]]) && !empty($filter[$field[\"name\"]]) && $to_sql) {\n\t\t\t\t\tif($field[\"real_type\"] == 'varchar') {\n\t\t\t\t\t\t$filter_array[] = \"{$field[\"name\"]} LIKE '\".self::$db->escape($filter[$field[\"name\"]]).\"'\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$filter_array[] = \"{$field[\"name\"]}='\".self::$db->escape($filter[$field[\"name\"]]).\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$to_sql) {\n\t\t\t\tforeach($_GET AS $key=>$val) {\n\t\t\t\t\tif ($key == 'order' || $key == 'page' || empty($val)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$filter_array[] = \"{$key}=\".urlencode($val);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $filter_array;\n\t\t}", "function buildQuery () {\n $select = array();\n $from = array();\n $where = array();\n $join = '';\n $rowLimit = '';\n $tables = array();\n\n if (!empty ($this->checkTables)) {\n\n foreach ($this->checkTables as $table) {\n\n // only include tables that have selected columns\n $columns = self::getCheckTableColumns( $table );\n\n if (!empty ($columns)) {\n\n $tables[] = $this->removeQuotes($table);\n\n // Assign select and where clauses\n //go through each column\n foreach ($columns as $column) {\n //Add is column to constraint if selected\n if (!empty( $this->formTableColumnFilterHash[$table][$column]['checkColumn'] )) {\n $select[] = $this->removeQuotes($table) . \".\" . $this->removeQuotes($column);\n }\n\n self::getColumnFilter ( $where,\n $table,\n $column,\n $this->formTableColumnFilterHash[$table][$column]['selectMinOper'],\n $this->formTableColumnFilterHash[$table][$column]['textMinValue'],\n $this->formTableColumnFilterHash[$table][$column]['selectMaxOper'],\n $this->formTableColumnFilterHash[$table][$column]['textMaxValue']);\n } // foreach $column\n } //if (!empty ($columns))\n } // foreach $table\n } //if (!empty ($this->checkTables))\n\n // If there is only one table add from clause to that, otherwise only add the join table\n\n //Calculate joins before FROM\n $join = $this->joinTables($this->checkTables);\n\n $fromStatement = \"FROM \";\n $tblCounter = 0;\n $joinarray = array();\n $uniqueJoinArray= array_unique($this->JOINARRAY);\n $tblTotal = count($tables) - count($uniqueJoinArray);\n\n // build the FROM statement using all tables and not just tables that have selected columns\n foreach ($this->checkTables as $t) {\n $tblCounter++;\n\n # don't add a table to the FROM statement if it is used in a JOIN\n if(!(in_array($t, $this->JOINARRAY))){\n $fromStatement .= $t;\n\n //if($tblCounter < $tblTotal){\n $fromStatement .= \", \";\n //} // if\n\n } // if\n } // foreach tables\n\n $fromStatement = preg_replace(\"/\\,\\s*$/\",\"\",$fromStatement);\n $from[] = $fromStatement;\n\n // Add something if there are no columns selected\n if ( count( $select ) == 0 ) {\n $select[] = '42==42';\n }\n\n // Let's combine all the factors into one big query\n $query = \"SELECT \" . join(', ',$select) . \"\\n\" . join(', ', $from) . \"\\n\" . $join;\n\n # Case non-empty where clause\n if ( count( $where ) > 0 ) {\n $query .= 'WHERE ' . join( \" AND \", $where );\n $query .= \"\\n\";\n }\n\n // Add Row Limit\n if ( !empty( $this->selectRowLimit ) ) {\n $rowLimit = \"LIMIT \" . $this->selectRowLimit;\n $query .= $rowLimit;\n $query .= \"\\n\";\n }\n\n return $query;\n }", "private\tfunction\t_prepareFilterQuery($i = 0)\n\t\t{\n\t\t\tself::$_queries[$this->_class]['filter']\t=\tNULL;\n\t\t\t$params\t=\tarray();\n\t\t\t$query\t=\tNULL;\n\t\t\tforeach($this->_columns as $offset => $value) {\n\t\t\t\tif($value === NULL)\tcontinue;\n\t\t\t\t$query\t\t.=\t'`<alias>`.`'.$offset.'` = ? AND ';\n\t\t\t\t$params[]\t=\t$value;\n\t\t\t}\n\t\t\t$i\t=\t0;\n\t\t\tforeach($this->_relations as $relation) {\n\t\t\t\t$filter\t=\t$relation['record']->_prepareFilterQuery();\n\t\t\t\t$query\t.=\tstr_replace('<alias>', 'a'.$i, $filter['query']);\n\t\t\t\t$params\t=\tarray_merge($params, $filter['params']);\n\t\t\t}\n\t\t\treturn\tarray('query' => trim($query,'AND '), 'params' => $params);\n\t\t}", "private function appendWhere()\n\t{\n\t\t$whereCount = count($this->where);\n\n\t\tfor($i = 0; $i < $whereCount; $i++)\n\t\t{\n\t\t\t$where = $this->where[$i];\n\n\t\t\tif($i == 0)\n\t\t\t{\n\t\t\t\t$this->queryString .= self::WHERE;\n\t\t\t}\n\n\t\t\t$this->queryString .= $where->getCondition();\n\n\t\t\tif($i < $whereCount-1)\n\t\t\t{\n\t\t\t\t$this->queryString .= \" \" . $where->getOperator() . \" \";\n\t\t\t}\n\t\t}\n\t}", "private function _setupFiltering()\n\t{\n\t\tglobal $txt;\n\n\t\t// We'll escape some strings...\n\t\t$db = database();\n\n\t\t// You can filter by any of the following columns:\n\t\t$filters = array(\n\t\t\t'id_member' => $txt['username'],\n\t\t\t'ip' => $txt['ip_address'],\n\t\t\t'session' => $txt['session'],\n\t\t\t'url' => $txt['error_url'],\n\t\t\t'message' => $txt['error_message'],\n\t\t\t'error_type' => $txt['error_type'],\n\t\t\t'file' => $txt['file'],\n\t\t\t'line' => $txt['line'],\n\t\t);\n\n\t\t$filter = $this->_req->getQuery('filter', 'trim', null);\n\t\t$value = $this->_req->getQuery('value', 'trim', null);\n\n\t\t// Set up the filtering...\n\t\tif (isset($value, $filters[$filter]))\n\t\t{\n\t\t\t$filter = array(\n\t\t\t\t'variable' => $filter,\n\t\t\t\t'value' => array(\n\t\t\t\t\t'sql' => in_array($filter, array('message', 'url', 'file'))\n\t\t\t\t\t\t? base64_decode(strtr($value, array(' ' => '+')))\n\t\t\t\t\t\t: $db->escape_wildcard_string($value),\n\t\t\t\t),\n\t\t\t\t'href' => ['filter' => $filter, 'value' => $value],\n\t\t\t\t'entity' => $filters[$filter]\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (isset($filter, $value))\n\t\t\t{\n\t\t\t\tunset($this->_req->query->filter, $this->_req->query->value);\n\t\t\t}\n\n\t\t\t$filter = [];\n\t\t}\n\n\t\treturn $filter;\n\t}", "function performSQLSelect($tableName, $filter) {\n $conn = $GLOBALS[\"connection\"];\n\n $sql = \"SELECT * FROM \" . $tableName;\n if ($filter <> NULL) {\n $sql = $sql . \" WHERE \";\n\n foreach ($filter as $key => $value) {\n $whereClause[] = $key . \"='\" . $value . \"'\";\n }\n\n $sql = $sql . implode(\" AND \", $whereClause);\n }\n $result = mysqli_query($conn, $sql);\n if (!$result) {\n printCallstackAndDie();\n }\n $results = NULL;\n while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\n $results[] = $row;\n }\n\n\n return $results;\n}", "abstract function query( $p_filter_input );", "protected function _buildWhere(array $filter_data = array())\n {\n\t\t$where = \"1\";\n \t\n \tif( isset($filter_data['category']) && $filter_data['category'] )\n\t\t{\n\t\t\t$where .= \" AND {$this->c_table}.category_id=\".intval($filter_data['category']);\n\t\t}\n\t\t\n\t\treturn $where;\n }", "public function getAndWhereStatement($separator='AND') \n {\n $andWhere_array = [];\n foreach ($this->andWhere as $key => $column) {\n if( !isset($_GET[$key]) || empty($_GET[$key]) ) continue;\n switch ($key) {\n case 's':\n $keywords = explode(\" \", mysql_real_escape_string(htmlspecialchars($_GET[$key])));\n $parts = array();\n for ($i = 0; $i < count($keywords); $i++) {\n $parts[] = \"(o.Name LIKE '%\". $keywords[$i] .\"%' OR o.Details LIKE '%\". $keywords[$i] .\"%' OR o.Profil LIKE '%\". $keywords[$i] .\"%')\";\n }\n $andWhere_array[] = '('. implode(' AND ', $parts) .')';\n break;\n default:\n if(is_array($_GET[$key])) {\n $andWhere_array[] = key($column) .\".\". reset($column) .\" IN('\". implode(\"','\", $_GET[$key]) .\"')\";\n } else {\n $andWhere_array[] = key($column) .\".\". reset($column) .\"='{$_GET[$key]}'\";\n }\n break;\n }\n }\n $andWhere_array[] = (Route::getRoute() == 'offres/stage') ? \"o.id_tpost='4'\" : \"o.id_tpost!='4'\";\n\n // Afficher les offres expirées au candidats dans la page des offres.\n if (get_setting('front_show_expired_offers_on_frentend') != 1) {\n $andWhere_array[] = \"o.status='En cours'\";\n $andWhere_array[] = \"DATE(o.date_expiration) >= CURDATE()\";\n }\n\n return (!empty($andWhere_array)) ? \" {$separator} \". implode(' AND ', $andWhere_array) : '';\n }", "public function getListSql()\n\t{\n\t\t$filter = $this->UseSessionForListSql ? $this->getSessionWhere() : \"\";\n\t\tAddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->applyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->getSqlSelect();\n\t\t$sort = $this->UseSessionForListSql ? $this->getSessionOrderBy() : \"\";\n\t\treturn BuildSelectSql($select, $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $filter, $sort);\n\t}", "public function getListSql()\n\t{\n\t\t$filter = $this->UseSessionForListSql ? $this->getSessionWhere() : \"\";\n\t\tAddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->applyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->getSqlSelect();\n\t\t$sort = $this->UseSessionForListSql ? $this->getSessionOrderBy() : \"\";\n\t\treturn BuildSelectSql($select, $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $filter, $sort);\n\t}", "public function prepareQueryForCategory()\n {\n $sql = new SqlStatement();\n $sql->select(array('p.*'))\n ->from(array('p' => self::RESULTS_TABLE))\n ->innerJoin(array('pp' => 'product'), 'p.product_id = pp.product_id')\n ->innerJoin(array('pd' => 'product_description'), 'p.product_id = pd.product_id')\n ->where('pd.language_id = ?', (int)$this->config->get('config_language_id'))\n ->order($this->sortOrder)\n ->limit($this->productsLimit, $this->productsStart);\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $sql->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n } \n \n return $sql;\n }", "public function buildSqlString()\n {\n $param = array();\n\n $join = '';\n $filter = '';\n $order = '';\n $limit = '';\n\n // Create the fieldprefix. If given as alias use this, otherwise we use the tablename\n $field_prefifx = !empty($this->alias) ? $this->alias : '{db_prefix}' . $this->tbl;\n\n // Biuld joins\n if (!empty($this->join))\n {\n $tmp = array();\n\n foreach ( $this->join as $def )\n $tmp[] = ' ' . $def['by'] . ' JOIN ' . '{db_prefix}' . (isset($def['as']) ? $def['tbl'] . ' AS ' . $def['as'] : $def['join']) . ' ON (' . $def['cond'] . ')';\n }\n\n $join = isset($tmp) ? implode(' ', $tmp) : '';\n\n // Create fieldlist\n if (!empty($this->fields))\n {\n // Add `` to some field names as reaction to those stupid developers who chose systemnames as fieldnames\n foreach ( $this->fields as $key_field => $field )\n {\n if (in_array($field, array('date', 'time')))\n $field = '`' . $field . '`';\n\n // Extend fieldname either by table alias or name when no dot as alias/table indicator is found.\n #if (strpos($field, '.') === false)\n # $field .= (!empty($this->alias) ? $this->alias : $this->tbl) . '.' . $field;\n\n $this->fields[$key_field] = $field;\n }\n\n $fieldlist = implode(', ', $this->fields);\n } else\n {\n $fieldlist = '*';\n }\n\n // Create filterstatement\n $filter = !empty($this->filter) ? ' WHERE ' . $this->filter : null;\n\n // Create group by statement\n $group_by = !empty($this->group_by) ? ' GROUP BY ' . $this->group_by : null;\n\n // Create having statement\n $having = !empty($this->having) ? ' HAVING ' . $this->having : null;\n\n // Create order statement\n $order = !empty($this->order) ? ' ORDER BY ' . $this->order : null;\n\n // Create limit statement\n if (!empty($this->limit))\n {\n $limit = ' LIMIT ';\n\n if (isset($this->limit['lower']))\n $limit .= $this->limit['lower'];\n\n if (isset($this->limit['lower']) && isset($this->limit['upper']))\n $limit .= ',' . $this->limit['upper'];\n }\n\n // We need a string for the table. if there is an alias, we have to set it\n $tbl = !empty($this->alias) ? $this->tbl . ' AS ' . $this->alias : $this->tbl;\n\n // Is this an distinct query?\n $distinct = $this->distinct ? 'DISTINCT ' : '';\n\n // Create sql statement by joining all parts from above\n $this->sql = 'SELECT ' . $distinct . $fieldlist . ' FROM {db_prefix}' . $tbl . $join . $filter . $group_by . $having . $order . $limit;\n\n return $this->sql;\n }", "function getSql()\n{\n\textract($this->query, EXTR_SKIP);\n\t\n\tif (!$select or !$from) return '';\n\t\n\t$sql = 'SELECT '.implode(',', $select).' FROM '.$from;\n\tif ($where) $sql .= ' WHERE '.implode(' AND ', array_unique($where));\n\tif ($whereJoin) $sql .= ($where? ' AND ':' WHERE ').implode(' AND ', array_unique($whereJoin));\n\tif ($group) $sql .= ' GROUP BY '.$group;\n\tif ($having) $sql .= ' HAVING '.implode(' AND ', array_unique($having));\n\tif ($order) $sql .= ' ORDER BY '.implode(',', $order);\n\tif ($limit) $sql .= ' LIMIT '.$limit[0].' OFFSET '.$limit[1];\n\treturn $sql;\n}", "public function appendFilterSql($_select, $_backend)\r\n {\r\n \tif($this->_value){\r\n \t $db = Tinebase_Core::getDb();\r\n \t foreach($this->_value as $value){\r\n\t \t $correlationName = Tinebase_Record_Abstract::generateUID() . $value['cfId'] . 'cf';\r\n\t\r\n\t \t $_select->joinLeft(\r\n\t /* what */ array($correlationName => SQL_TABLE_PREFIX . 'customfield'), \r\n\t /* on */ $db->quoteIdentifier(\"{$correlationName}.record_id\") . \" = co.id AND \" \r\n\t . $db->quoteIdentifier(\"{$correlationName}.customfield_id\") . \" = \" . $db->quote($value['cfId']),\r\n\t /* select */ array());\r\n\t $_select->where($db->quoteInto($db->quoteIdentifier(\"{$correlationName}.value\") . $this->_opSqlMap[$this->_operator]['sqlop'], $value['value']));\r\n \t }\r\n \t\r\n // \techo $_select->assemble();\r\n// \t$filter = new Membership_Model_SoMemberFilter(array(), 'AND');\r\n//\t \t\r\n//\t \t$contactFilter = new Addressbook_Model_ContactFilter(array(\r\n//\t array('field' => 'customfield', 'operator' => 'equals', 'value' => $this->_value),\r\n//\t ));\r\n//\t $contactIds = Addressbook_Controller_Contact::getInstance()->search($contactFilter, NULL, FALSE, TRUE);\r\n//\t \r\n//\t $filter->addFilter(new Tinebase_Model_Filter_Id('contact_id', 'in', $contactIds));\r\n//\t \tTinebase_Backend_Sql_Filter_FilterGroup::appendFilters($_select, $filter, $_backend);\r\n \t}\r\n }", "public function buildQuery() {\n\t\t$where = (sizeof($this->wheres) > 0) ? ' WHERE '.implode(\" \\n AND \\n\\t\", $this->wheres) : '';\n\t\t$order = (sizeof($this->orders) > 0) ? ' ORDER BY '.implode(\", \", $this->orders) : '' ;\n\t\t$group = (sizeof($this->groups) > 0) ? ' GROUP BY '.implode(\", \", $this->groups) : '' ;\n\t\t$query = 'SELECT '.implode(\", \\n\\t\", $this->fields).\"\\n FROM \\n\\t\".$this->class->table.\"\\n \".implode(\"\\n \", $this->joins).$where.' '.$group.' '.$order.' '.$this->limit;\n\t\treturn($query);\n\t}", "private function buildQuery( array $request )\n\t{\n\t\treturn $this->buildSelect($request);\n\t}", "final public static function toSQL()\n {\n $select = false;\n foreach (self::$starts as $reserved) {\n if (strpos(self::$query, $reserved . ' ') === 0) {\n $select = true;\n break;\n }\n }\n\n if (!$select) {\n self::$query = \"SELECT * FROM \" . self::tableName() . self::$query;\n }\n\n\n $values = [];\n for ($i = 0; $i < sizeof(self::$bindParams); $i++) {\n foreach (self::$bindParams[$i] as $item) {\n $values[] = $item;\n }\n }\n\n if (sizeof($values) > 0) {\n $query = self::$query;\n self::$query = \"\";\n self::$where = false;\n self::$bindParams = array();\n $query = str_replace(\"?\", \"#%s#\", $query);\n $query = sprintf($query, ...$values);\n $query = str_replace(\"#\", \"'\", $query);\n return sprintf($query, ...$values);\n }\n return self::$query;\n }", "private function buildQuery($filters, $limit, $offset)\n {\n // TODO: support logic for multiple conditions\n $where = '';\n $sortBy = null;\n if(!empty($filters) && is_array($filters))\n {\n foreach($filters as $name => $value)\n {\n switch($name)\n {\n case 'hash':\n $where = $this->buildWhere($where, \"hash='{$value}')\");\n break;\n case 'groups':\n $where = $this->buildWhere($where, \"(groups IN('\" . implode(\"','\", $value) . \"') OR permission='1')\");\n break;\n case 'page':\n if($value > 1)\n {\n $value = min($value, 40); // 40 pages at max of 2,500 recursion limit means 100k photos\n $offset = ($limit * $value) - $limit;\n $page = $value;\n }\n break;\n case 'permission':\n $where = $this->buildWhere($where, \"permission='1'\");\n break;\n case 'sortBy':\n $sortBy = 'ORDER BY ' . str_replace(',', ' ', $value);\n $field = substr($value, 0, strpos($value, ','));\n $where = $this->buildWhere($where, \"{$field} IS NOT NULL\");\n break;\n case 'tags':\n if(!is_array($value))\n $value = (array)explode(',', $value);\n $where = $this->buildWhere($where, \"tags IN('\" . implode(\"','\", $value) . \"')\");\n break;\n case 'type': // type for activities\n $value = $this->_($value);\n $where = $this->buildWhere($where, \"type='{$value}'\");\n break;\n }\n }\n }\n\n if(!empty($offset))\n {\n $iterator = max(1, intval($offset - 1));\n $nextToken = null;\n $params = array('ConsistentRead' => 'true');\n if(!isset($page))\n $page = 1;\n $currentPage = 1;\n $thisLimit = min($iterator, $offset);\n do\n {\n $res = $this->db->select(\"SELECT * FROM `{$this->domainPhoto}` {$where} {$sortBy} LIMIT {$iterator}\", $params);\n if(!$res->body->SelectResult->NextToken)\n break;\n\n $nextToken = $res->body->SelectResult->NextToken;\n $params['NextToken'] = $nextToken;\n $currentPage++;\n }while($currentPage < $page);\n }\n\n $params = array('ConsistentRead' => 'true');\n if(isset($nextToken) && !empty($nextToken))\n $params['NextToken'] = $nextToken;\n\n return array('params' => $params, 'where' => $where, 'sortBy' => $sortBy, 'limit' => $limit);\n }", "function _buildQuery()\n\t{\t\t\n\t\t// Get the WHERE and ORDER BY clauses for the query\n\t\t$where\t\t= $this->_buildContentWhere();\n\t\t$orderby\t= $this->_buildContentOrderBy();\n\t\t$query = 'SELECT a.*, DATEDIFF(a.early_bird_discount_date, NOW()) AS date_diff, c.name AS location_name, IFNULL(SUM(b.number_registrants), 0) AS total_registrants FROM #__eb_events AS a '\n\t\t\t. ' LEFT JOIN #__eb_registrants AS b '\n\t\t\t. ' ON (a.id = b.event_id AND b.group_id=0 AND (b.published = 1 OR (b.payment_method=\"os_offline\" AND b.published != 2))) '\n\t\t\t. ' LEFT JOIN #__eb_locations AS c '\n\t\t\t. ' ON a.location_id = c.id '\t\t\t\t\t\n\t\t\t. $where\t\t\n\t\t\t. ' GROUP BY a.id '\n\t\t\t. $orderby\n\t\t;\n\t\treturn $query;\n\t}", "private function getSQLCondition() {\n\t\t// the manager can see everyone in the department\n\t\t// the admin and everybody else can see everyone in the company.\n\t\tswitch ($this->page->config['user_level']) {\n\t\t\tcase lu_manager:\n\t\t\tcase lu_employee:\n\t\t\tcase lu_admin:\n\t\t\t\t$sql = 'WHERE 1 = 2';\n\t\t\t\tbreak;\t//nobody below GM can access this subject\n\t\t\tcase lu_gm:\n\t\t\tcase lu_owner:\n\t\t\t\t$sql = ' WHERE c.company_id = '.$this->page->company['company_id'];\n\t\t}\n\t\treturn $sql;\n\t}", "public function getData($request, $sTable, $aColumns, $aColumnsSE, $aColumnsOR, $aColumnsD, $where = null, $sGroupBy = null, $unionCount = 0, $aColumns2) {\n\n /* * * Paging ** */\n $sLimit = \"\";\n if (isset($request['iDisplayStart']) && $request['iDisplayLength'] != '-1') {\n $sLimit = \" LIMIT \" . intval($request['iDisplayStart']) . \", \" .\n intval($request['iDisplayLength']);\n }\n\n /* * * Ordering ** */\n $sOrder = \"\";\n if (isset($request['iSortCol_0'])) {\n $sOrder = \" ORDER BY \";\n for ($i = 0; $i < intval($request['iSortingCols']); $i++) {\n if ($request['bSortable_' . intval($request['iSortCol_' . $i])] == \"true\") {\n $sOrder .= $aColumnsOR[intval($request['iSortCol_' . $i])] . \" \" .\n ($request['sSortDir_' . $i] === 'asc' ? 'asc' : 'desc') . \", \";\n }\n }\n\n $sOrder = substr_replace($sOrder, \"\", -2);\n if ($sOrder == \" ORDER BY\") {\n $sOrder = \"\";\n }\n }\n\n /*\n * Filtering\n * NOTE this does not match the built-in DataTables filtering which does it\n * word by word on any field. It's possible to do here, but concerned about efficiency\n * on very large tables, and MySQL's regex functionality is very limited\n */\n $sWhere = \"\";\n if (isset($request['sSearch']) && $request['sSearch'] != \"\") {\n $sWhere = \"WHERE (\";\n for ($i = 0; $i < count($aColumnsSE); $i++) {\n $sWhere .= $aColumnsSE[$i] . \" LIKE '%\" . $request['sSearch'] . \"%' OR \";\n }\n $sWhere = substr_replace($sWhere, \"\", -3);\n $sWhere .= ')';\n }\n\n /* Individual column filtering */\n for ($i = 0; $i < count($aColumns); $i++) {\n if (isset($request['bSearchable_' . $i]) && $request['bSearchable_' . $i] == \"true\" && $request['sSearch_' . $i] != '') {\n if ($sWhere == \"\") {\n $sWhere = \"WHERE \";\n } else {\n $sWhere .= \" AND \";\n }\n $sWhere .= $aColumns[$i] . \" LIKE '%\" . mysql_real_escape_string($request['sSearch_' . $i]) . \"%' \";\n }\n }\n\n if (null != $where) {\n if ($sWhere == '') {\n $where = ' WHERE ' . $where;\n } else {\n $where = ' AND ' . $where;\n }\n }\n\n /** SQL queries * Get data to display */\n $sQuery = '';\n if ($unionCount > 0) {\n $sQuery .= \"(SELECT \" . str_replace(\" , \", \" \", implode(\", \", $aColumns)) . \" FROM \" . $sTable . \" \".$sWhere.\" \".$where.\") UNION ALL \";\n $sQuery .= \"(SELECT \" . str_replace(\" , \", \" \", implode(\", \", $aColumns2)) . \" FROM \" . $sTable . \" \".$sWhere.\" \".$where.\")\";\n } else {\n $sQuery .= \"SELECT \" . str_replace(\" , \", \" \", implode(\", \", $aColumns)) . \" FROM \" . $sTable.\" \".$sWhere.\" \".$where;\n }\n\n $sQuery .= $sGroupBy . $sOrder . $sLimit;\n $rResult = DB::select($sQuery);\n\n /*\n * Total data set length. changed by Firoj\n */\n $queryForTotalCount = '';\n if ($unionCount > 0) {\n $queryForTotalCount .= \"(SELECT \" . str_replace(\" , \", \" \", implode(\", \", $aColumns)) . \" FROM \" . $sTable . \" \".$sWhere.\" \".$where.\") UNION ALL\" ;\n $queryForTotalCount .= \"(SELECT \" . str_replace(\" , \", \" \", implode(\", \", $aColumns2)) . \" FROM \" . $sTable . \" \".$sWhere.\" \".$where.\")\";\n } else {\n $queryForTotalCount .= \"SELECT \" . str_replace(\" , \", \" \", implode(\", \", $aColumns)) . \" FROM \" . $sTable.\" \".$sWhere.\" \".$where;\n }\n\n $queryForTotalCount .= $sGroupBy . $sOrder;\n $TotalResult = DB::select($queryForTotalCount);\n $iTotal = count($TotalResult);\n\n// $queryForTotalCount = \"SELECT \" . str_replace(\" , \", \" \", implode(\", \", $aColumns)) . \"\n//\t\tFROM $sTable\n//\t\t$sWhere\n// $where\n// $sGroupBy\n//\t\t$sOrder\n//\t\t\";\n// $TotalResult = DB::select($queryForTotalCount);\n// $iTotal = count($TotalResult);\n\n /** Output ** */\n $output = array(\n \"sEcho\" => intval($request['sEcho']),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => $iTotal,\n \"aaData\" => array()\n );\n\n foreach ($rResult as $aRow) {\n $row = array();\n for ($i = 0; $i < count($aColumnsD); $i++) {\n $x=$aColumnsD[$i];\n $row[] = $aRow->$x;\n }\n $output['aaData'][] = $row;\n }\n echo json_encode($output);\n }", "function getListSQL()\n{\n global $User;\n $listFilterSQL = $User->getListFilterSQL( $this->moduleID );\n return $this->listSQL .$listFilterSQL;\n}", "protected function buildQuery()\n\t{\n\t\t$this->query = count($this->conditions) ? 'WHERE ' . implode(' AND ', $this->conditions) : '';\n\t}", "protected function buildQuery(Request $request)\n {\n $query = $this->model->selectRaw('id, name, count, rank');\n\n if ($name = $request->input('name')) {\n $query->where('name', 'like', \"%{$name}%\");\n }\n\n if ($rank = $request->input('rank')) {\n $query->where('rank', $rank + 0);\n }\n\n return $query;\n }", "public static function filterAccordingSearch($request)\n {\n\n $filters = DB::table('intra_hp_buyer_posts as bp')\n ->join('intra_hp_buyer_seller_routes as sr', 'sr.fk_buyer_seller_post_id', '=', 'bp.id')\n ->leftjoin('intra_hp_assigned_seller_buyer as ab', 'ab.buyer_seller_post_id', '=', 'bp.id')\n ->leftjoin('lkp_localities as fromLoctn', 'sr.from_location', '=', 'fromLoctn.id')\n ->leftjoin('lkp_localities as toLoctn', 'sr.to_location', '=', 'toLoctn.id')\n ->select('bp.id',\n 'sr.city_id',\n 'bp.type_basis',\n 'bp.is_private_public',\n 'bp.lkp_service_id',\n 'bp.last_date',\n 'sr.valid_from',\n 'sr.valid_to',\n DB::raw(\"(select vehicle_type FROM lkp_vehicle_types WHERE id=sr.vehicle_type_id AND is_active = 1) as vehicle\"),\n DB::raw(\"(select city_name FROM lkp_cities WHERE id=sr.city_id ) as city_name\"),\n DB::raw(\"(select username FROM users WHERE id=ab.buyer_seller_id ) as assign_seller\"),\n DB::raw(\"(select locality_name FROM lkp_localities WHERE id=fromLoctn.id) as from_location\"),\n DB::raw(\"(select locality_name FROM lkp_localities WHERE id=toLoctn.id) as to_location\")\n )\n ->where('bp.is_active', 1)\n ->where('sr.is_active', 1)\n ->limit(self::$rows_fetched)\n ->get();\n return $filters;\n }", "function query() {\n // Don't filter if we're exposed and the checkbox isn't selected.\n\n if ((!empty($this->options['exposed'])) && empty($this->value)) {\n return;\n }\n if (!$this->options['exposed']) {\n $value = $this->options['uid'];\n }\n else {\n $value = $this->validated_exposed_input[0];\n }\n\n\n $this->ensure_my_table();\n\n\n $table = 'scheduling_appointments';\n //$field1 = $this->query->add_field($table, 'nid');\n //$field2 = $this->query->add_field($table, 'title');\n\n\n //$field1 = $table . '.nid';\n //$field2 = $table . '.title';\n if ($value != '') {\n $this->query->add_where(\n $this->options['group'],\n db_and()\n ->condition($table . '.uid', $value, '=')\n );\n }\n }", "function getFieldQuery($filter) {\n\n\t\t$output = \"SELECT id_user \".\n\t\t\t\"FROM \".$this->_getUserEntryTable().\" \".\n\t\t\t\"WHERE id_common = '\".$this->id_common.\"' AND user_entry \";\n\n\t\tswitch ($filter['cond']) {\n\n\t\t\tcase 2: { //equal\n\t\t\t\t$output .= \" = '\".$filter['value'].\"' \";\n\t\t\t} break;\n\n\t\t\tcase 0: { //contains\n\t\t\t\t$output .= \" LIKE '%\".$filter['value'].\"%' \";\n\t\t\t} break;\n\n\t\t\tcase 3: { //not equal\n\t\t\t\t$output .= \" <> '\".$filter['value'].\"' \";\n\t\t\t} break;\n\n\t\t\tcase 1: { //do not contains\n\t\t\t\t$output .= \" NOT LIKE '%\".$filter['value'].\"%' \";\n\t\t\t} break;\n\n\t\t\tcase 4: { //starts with\n\t\t\t\t$output .= \" LIKE '\".$filter['value'].\"%' \";\n\t\t\t} break;\n\n\t\t\tcase 5: { //ends with\n\t\t\t\t$output .= \" LIKE '%\".$filter['value'].\"' \";\n\t\t\t} break;\n\n\t\t\tdefault: { $output = \" NOT LIKE '%' \"; }\n\n\t\t} // end switch\n\t\treturn $output;\n\t}", "function buildQuery(){\n\t\t$r = ($this->fieldName == \"\") ? \"SELECT * FROM \" . $this->tableName . \";\" : \"SELECT * FROM \" . $this->tableName . \" WHERE \" . $this->fieldName . \" = \" . $this->fieldValue . \";\";\n\t\t//print \"executing $r <br/>\";\n\t\treturn $r;\n\t}", "function searchSQL ($aRequest) {\n $sVersion = DBUtil::getOneResultKey(\"SHOW VARIABLES LIKE 'version'\", \"Value\");\n if ((int)substr($sVersion, 0, 1) >= 4) {\n $boolean_mode = \"IN BOOLEAN MODE\";\n } else {\n $boolean_mode = \"\";\n }\n\n $p = array();\n $p[0] = \"MATCH(DTT.document_text) AGAINST (? $boolean_mode)\";\n\t$p[1] = KTUtil::phraseQuote($aRequest[$this->getWidgetBase()]);\n \n // handle the boolean \"not\" stuff.\n $want_invert = KTUtil::arrayGet($aRequest, $this->getWidgetBase() . '_not');\n if (is_null($want_invert) || ($want_invert == \"0\")) {\n return $p;\n } else {\n $p[0] = '(NOT (' . $p[0] . '))';\n } \n \n return $p;\n }", "protected function modifyQueryForFilter()\n {\n //the following select includes the mobile number, but overrides\n //the columns with an empty string if the matching boolean is false\n $this->q->getDoctrineQuery()->addSelect(\n 'if(x.is_show_mobile_number_in_phonebook is not FALSE, x.mobile_number, \\'\\') as mobile_number'\n );\n \n if ($this->isLocationView)\n {\n //order results by location name first\n $this->q->addOrderByPrefix('UllLocation->name');\n }\n\n if (!empty($this->phoneSearchFilter))\n {\n $this->q->getDoctrineQuery()->openParenthesisBeforeLastPart();\n \n //we need special handling here because we don't want hidden\n //numbers to be searchable\n $phoneSearchFilterPattern = '%' . $this->phoneSearchFilter . '%';\n \n $this->q->getDoctrineQuery()->orWhere(\n '(is_show_extension_in_phonebook is not FALSE AND phone_extension LIKE ?) ' .\n 'OR (is_show_extension_in_phonebook is FALSE AND alternative_phone_extension LIKE ?)',\n array($phoneSearchFilterPattern, $phoneSearchFilterPattern));\n\n $this->q->orWhere('is_show_mobile_number_in_phonebook is not FALSE ' .\n 'AND mobile_number LIKE ?', $phoneSearchFilterPattern);\n \n $this->q->getDoctrineQuery()->closeParenthesis();\n }\n \n\n if (!empty($this->filter_location_id))\n {\n $this->q->addWhere('ull_location_id = ?', $this->filter_location_id);\n }\n \n //we only want users which are active and have their\n //show-in-phonebook not set to false\n $this->q->addWhere('UllUserStatus->is_active is TRUE and is_show_in_phonebook is not FALSE');\n }", "function tck_admin_list_where($where) {\n if ( isset($_GET['custom_filter']) ) {\n $mode = $_GET['custom_filter'];\n \n if ( $mode == 1 ) $where .= ' AND `' . TCK_COLUMN . '` = 0';\n if ( $mode == 2 ) $where .= ' AND `' . TCK_COLUMN . '` = 1';\n }\n \n return $where;\n }" ]
[ "0.70355844", "0.6997376", "0.6931395", "0.65479934", "0.64781964", "0.6402908", "0.6390376", "0.6373741", "0.6337997", "0.627882", "0.62380886", "0.6219832", "0.61999625", "0.6157145", "0.61102486", "0.61058146", "0.61058146", "0.6086041", "0.60821384", "0.6051842", "0.60284185", "0.6017556", "0.6006231", "0.59914494", "0.5973919", "0.5970889", "0.5966387", "0.59348106", "0.5895983", "0.5893179", "0.5881874", "0.5878985", "0.58738685", "0.5864904", "0.58636194", "0.5861532", "0.5829796", "0.577291", "0.5765358", "0.57651424", "0.57634634", "0.57336426", "0.57302845", "0.5720418", "0.5715129", "0.5708463", "0.57082605", "0.5703684", "0.5696653", "0.56938916", "0.5687885", "0.5686092", "0.56774914", "0.56762546", "0.5653188", "0.5647416", "0.5638524", "0.5634357", "0.56329614", "0.5627003", "0.5626704", "0.56251156", "0.5621349", "0.56195486", "0.5618785", "0.5616968", "0.5616343", "0.56139666", "0.56089586", "0.56002086", "0.5594426", "0.55910844", "0.55813736", "0.55746543", "0.55639356", "0.55553746", "0.5555247", "0.5555024", "0.5555024", "0.5550623", "0.5550565", "0.5550184", "0.55500364", "0.5524337", "0.5500116", "0.5494157", "0.54921895", "0.54904634", "0.54865927", "0.54857194", "0.54745287", "0.54745144", "0.54710716", "0.5466489", "0.5463925", "0.545901", "0.54502285", "0.5446257", "0.54295903", "0.542614" ]
0.6008744
22
Generate SQL to sort a result set based on sort variables in _REQUEST
function sort($default, $exprs=array()) { $cols = $sortsql = array(); $field = $this->page->param('s_f', ''); if($field) { $dir = $this->page->param('s_d', 'ASC'); $cols = array(array('field'=>$field, 'dir'=>$dir)); } else { // use the default foreach(explode(',', $default) as $pair) { $pair = trim($pair); if(empty($pair)) continue; $p = explode(' ', $pair); $cols[] = array('field'=>$p[0], 'dir'=>isset($p[1]) ? $p[1] : 'ASC'); } } foreach($cols as $c) { // look for an expression passed to the function first -- this is // used for trickier SQL expressions, like functions if(isset($exprs[$c['field']])) { $s = $exprs[$c['field']]; } else { // use the literal column name $p = explode('.', $c['field']); if(isset($p[1])) { $s = $p[0].'."'.$p[1].'"'; } else { $s = "\"{$c['field']}\""; } } $sortsql[] = "$s {$c['dir']}"; } return join(',', $sortsql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareOrderByStatement() {}", "public function buildSortQuery()\n\t\t\t{\n\t\t\t\t$this->sql_sort = $this->fields_arr['orderby_field'].' '.$this->fields_arr['orderby'];\n\t\t\t}", "public function buildSortQuery()\n\t\t\t{\n\t\t\t\t$this->sql_sort = '';\n\t\t\t\t$sort = $this->fields_arr['orderby_field'];\n\t\t\t\t$orderBy = $this->fields_arr['orderby'];\n\t\t\t\tif ($sort AND $orderBy)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->sql_sort = ' '.$sort.' '.$orderBy;\n\t\t\t\t\t}\n\t\t\t}", "private function sql_orderBy()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Short var\n $arr_order = null;\n $arr_order = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'order.' ];\n\n // Order field\n switch ( true )\n {\n case( $arr_order[ 'field' ] == 'uid' ):\n $orderField = $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ];\n break;\n case( $arr_order[ 'field' ] == 'value' ):\n default:\n $orderField = $this->sql_filterFields[ $this->curr_tableField ][ 'value' ];\n break;\n }\n // Order field\n // Order flag\n switch ( true )\n {\n case( $arr_order[ 'orderFlag' ] == 'DESC' ):\n $orderFlag = 'DESC';\n break;\n case( $arr_order[ 'orderFlag' ] == 'ASC' ):\n default:\n $orderFlag = 'ASC';\n break;\n }\n // Order flag\n // Get ORDER BY statement\n $orderBy = $orderField . ' ' . $orderFlag;\n\n // RETURN ORDER BY statement\n return $orderBy;\n }", "abstract public function prepareSort();", "function get_sql_sort() {\n $order = parent::construct_order_by($this->get_sort_columns());\n\n $defaultorder = array(\n 'problem_label' => 'ASC',\n 'difficulty_points' => 'ASC'\n );\n\n if ($order == '') {\n foreach ($defaultorder as $key => $value) {\n if (strpos($order, $key) === false) {\n $order = \"$key $value, $order\";\n }\n }\n }\n\n return trim($order, \", \");\n }", "static function sort_query($sql, $sort, $qualifier='') {\n /**\n * $sql is query string to which ORDER BY clause will be appended.\n *\n * $sort is sort name. See class docstring.\n *\n * $qualifier is optional table reference name to prepend to columns.\n */\n \n if ($sort == 'best') {\n return self::get_sort_best($sql, $qualifier);\n }\n else if ($sort == 'recent') {\n return self::get_sort_recent($sql, $qualifier);\n }\n }", "public function get_sql_sort() {\n $sort = parent::get_sql_sort();\n\n return $sort . ', s.id DESC';\n }", "protected function prepareSortCategories()\n {\n $queries = array();\n $queries[] = \"UPDATE oxcategories set OXSORT = (OXSORT+500)\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 1 WHERE oxid = 'testcategory0'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 2 WHERE oxid = 'testcat3'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 3 WHERE oxid = 'testcat5'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 4 WHERE oxid = 'testcategory1'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 5 WHERE oxid = 'testcat1'\";\n $queries[] = \"UPDATE oxcategories set OXSORT = 6 WHERE oxid = 'testcat9'\";\n\n foreach ($queries as $query) {\n $this->executeSql($query);\n }\n }", "public function sortAction()\n {\n $this->getResponse()->addHeader('Content-type', 'text/plain');\n $this->getResponse()->sendHeaders();\n\n $sql_set = \"SET @sort := 0, @context := ''\";\n\n $sql_context = 'UPDATE `%1$s` SET\n`sort`=(@sort := IF(@context != `%3$s`, 0, @sort +1)),\n`%3$s` = (@context := `%3$s`)\nORDER BY `%3$s`,`sort`,`%2$s`';\n\n $sql_single = 'UPDATE `%1$s` SET\n`sort`=(@sort := @sort +1)\nORDER BY `sort`,`%2$s`';\n\n $tables = array(\n 'shop_plugin' => 'shopPluginModel',\n 'shop_product_skus' => 'shopProductSkusModel',\n 'shop_type' => 'shopTypeModel',\n 'shop_type_features' => 'shopTypeFeaturesModel',\n 'shop_feature_values_dimension' => 'shopFeatureValuesDimensionModel',\n 'shop_feature_values_double' => 'shopFeatureValuesDoubleModel',\n 'shop_feature_values_text' => 'shopFeatureValuesTextModel',\n 'shop_feature_values_varchar' => 'shopFeatureValuesVarcharModel',\n 'shop_feature_values_color' => 'shopFeatureValuesColorModel',\n 'shop_importexport' => 'shopImportexportModel',\n );\n\n $counter = 0;\n\n $trace = waRequest::request('trace');\n\n foreach ($tables as $table => $table_model) {\n if (class_exists($table_model)) {\n $model = new $table_model();\n /**\n * @var $model shopSortableModel\n */\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n try {\n $id = $model->getTableId();\n if (is_array($id)) {\n $id = implode('`, `', $id);\n }\n if ($context = $model->getTableContext()) {\n $sql = sprintf($sql_context, $model->getTableName(), $id, $context);\n } else {\n $sql = sprintf($sql_single, $model->getTableName(), $id);\n }\n if ($trace) {\n print \"{$sql_set};\\n{$sql};\\n\";\n }\n $model->exec($sql_set);\n $model->exec($sql);\n print \"OK\";\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage();\n }\n print \"\\n\\n\";\n }\n }\n if (empty($model)) {\n $model = new waModel();\n }\n\n $tables = array(\n 'shop_product_images' => 'product_id',\n 'shop_product_pages' => 'product_id',\n 'shop_service_variants' => 'service_id',\n //'shop_set_products' => 'set_id',\n //'shop_tax_zip_codes' => 'tax_id',\n );\n foreach ($tables as $table => $context) {\n $sqls = array();\n $sqls[] = \"SET @sort := 0, @context := ''\";\n $sqls[] = \"UPDATE `{$table}` SET\n`sort`=(@sort := IF(@context != `{$context}`, 0, @sort +1)),\n`{$context}` = (@context := `{$context}`)\nORDER BY `{$context}`,`sort`,`id`\";\n\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n while ($sql = array_shift($sqls)) {\n try {\n if ($trace) {\n print \"{$sql};\\n\";\n }\n $model->exec($sql);\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage().\"\\n\\n\";\n break;\n }\n }\n if (!$sqls) {\n print \"OK\\n\\n\";\n }\n }\n\n $tables = array(\n 'shop_currency' => 'code',\n 'shop_service' => 'id',\n 'shop_set' => 'id',\n 'shop_stock' => 'id',\n\n );\n foreach ($tables as $table => $id) {\n $sqls = array();\n $sqls[] = \"SET @sort := 0\";\n $sqls[] = \"UPDATE `{$table}` SET\n`sort`=(@sort := @sort +1)\nORDER BY `sort`,`{$id}`\";\n\n print sprintf(\"#%d\\tRepair sort field at `%s` table:\\n\", ++$counter, $table);\n while ($sql = array_shift($sqls)) {\n try {\n if ($trace) {\n print \"{$sql};\\n\";\n }\n $model->exec($sql);\n } catch (waDbException $e) {\n print \"ERROR:\".$e->getMessage().\"\\n\\n\";\n break;\n }\n }\n if (!$sqls) {\n print \"OK\\n\\n\";\n }\n }\n }", "function get_sql_order(){\r\n\r\n\t\tif(stripos($this->sql_query,' ORDER BY ')!==false){\r\n\t\t\tif(stripos($this->sql_query,' LIMIT ')!==false)\r\n\t\t\t\t$order_str_ini=substr($this->sql_query,stripos($this->sql_query,' ORDER BY '),stripos($this->sql_query,' LIMIT ')-stripos($this->sql_query,' ORDER BY '));\r\n\t\t\telse\r\n\t\t\t\t$order_str_ini=substr($this->sql_query,stripos($this->sql_query,' ORDER BY '));\r\n\t\t}else{\r\n\t\t\t$order_str_ini='';\r\n\t\t}\r\n\r\n\t\t$order_str='';\r\n\t\t$arr_new_cols=array();\r\n\r\n\t\t// adds the extra columns in consideration\r\n\t\t$arr_sql_fields=$this->sql_fields;\r\n\t\tfor($i=0; $i<count($this->extra_cols); $i++){\r\n\t\t\tarray_splice($arr_sql_fields, $this->extra_cols[$i][0]-1, 0, '');\r\n\t\t\t$arr_new_cols[]=$this->extra_cols[$i][0];\r\n\t\t}\r\n\r\n\t\t$arr_sort=explode('_',$this->sort);\r\n\t\tasort($arr_sort);\r\n\r\n\t\tforeach($arr_sort as $key => $value){\r\n\r\n\t\t\tif(!in_array($key+1,$arr_new_cols)){\r\n\r\n\t\t\t\tif(substr($arr_sort[$key],-1)=='a')\r\n\t\t\t\t\t$order_str.=(($order_str_ini or $order_str) ? ', ' : ' ORDER BY ').$arr_sql_fields[$key].' ASC';\r\n\r\n\t\t\t\tif(substr($arr_sort[$key],-1)=='d')\r\n\t\t\t\t\t$order_str.=(($order_str_ini or $order_str) ? ', ' : ' ORDER BY ').$arr_sql_fields[$key].' DESC';\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn $order_str_ini.$order_str;\r\n\t}", "function SetUpSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$fs_multijoin_v->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$fs_multijoin_v->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->id); // id\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->mount); // mount\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->path); // path\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->parent); // parent\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->deprecated); // deprecated\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->name); // name\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->snapshot); // snapshot\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->tapebackup); // tapebackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->diskbackup); // diskbackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->type); // type\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT); // CONTACT\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT2); // CONTACT2\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->RESCOMP); // RESCOMP\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "public function order_by() {\r\n\t\t$fields = func_get_args();\r\n\r\n\t\t// Loop through the columns\r\n\t\tfor ( $i = 0; $i < intval( $_GET['iSortingCols'] ); $i++ ) {\r\n\t\t\t// Add the necessary comman\r\n\t\t\tif ( !empty( $this->order_by ) )\r\n\t\t\t\t$this->order_by .= ',';\r\n\t\t\t\r\n\t\t\t// Compile the fields\r\n\t\t\t$this->order_by .= $fields[$_GET['iSortCol_' . $i]] . ' ' . $_GET['sSortDir_' . $i];\r\n\t\t}\r\n\t\t\r\n\t\t// If it's not empty\r\n\t\tif ( !empty( $this->order_by ) )\r\n\t\t\t$this->order_by = ' ORDER BY ' . $this->order_by;\r\n\t}", "public function executeSort(sfWebRequest $request)\n {\n $this->objects = $this->getTableForSorting()->queryOrdered()->execute();\n }", "public function orderBy($sql);", "function getOrderBySQL($orderBys)\n{\n $SQL = '';\n if( count($orderBys) > 0 ){\n $SQL .= ' ORDER BY ';\n $obSQLs = array();\n foreach( $orderBys as $obField => $desc ){\n if( $desc ){\n $obSQLs[] = $obField . ' DESC';\n }else{\n $obSQLs[] = $obField;\n }\n }\n $SQL .= join(',',$obSQLs);\n }\n return $SQL;\n}", "function SetUpSortOrder()\n{\n\tglobal $sOrderBy;\n\tglobal $sDefaultOrderBy;\n\n\t// Check for an Order parameter\n\tif (strlen(@$_GET[\"order\"]) > 0) {\n\t\t$sOrder = @$_GET[\"order\"];\n\n\t\t// Field `cod_material`\n\t\tif ($sOrder == \"cod_material\") {\n\t\t\t$sSortField = \"`cod_material`\";\n\t\t\t$sLastSort = @$_SESSION[ewSessionTblSort . \"_x_cod_material\"];\n\t\t\t$sThisSort = ($sLastSort == \"ASC\") ? \"DESC\" : \"ASC\";\n\t\t\t$_SESSION[ewSessionTblSort . \"_x_cod_material\"] = $sThisSort;\n\t\t} else {\n\t\t\tif (@$_SESSION[ewSessionTblSort . \"_x_cod_material\"] <> \"\") { @$_SESSION[ewSessionTblSort . \"_x_cod_material\"] = \"\"; }\n\t\t}\n\n\t\t// Field `descripcion`\n\t\tif ($sOrder == \"descripcion\") {\n\t\t\t$sSortField = \"`descripcion`\";\n\t\t\t$sLastSort = @$_SESSION[ewSessionTblSort . \"_x_descripcion\"];\n\t\t\t$sThisSort = ($sLastSort == \"ASC\") ? \"DESC\" : \"ASC\";\n\t\t\t$_SESSION[ewSessionTblSort . \"_x_descripcion\"] = $sThisSort;\n\t\t} else {\n\t\t\tif (@$_SESSION[ewSessionTblSort . \"_x_descripcion\"] <> \"\") { @$_SESSION[ewSessionTblSort . \"_x_descripcion\"] = \"\"; }\n\t\t}\n\n\t\t// Field `unidad`\n\t\tif ($sOrder == \"unidad\") {\n\t\t\t$sSortField = \"`unidad`\";\n\t\t\t$sLastSort = @$_SESSION[ewSessionTblSort . \"_x_unidad\"];\n\t\t\t$sThisSort = ($sLastSort == \"ASC\") ? \"DESC\" : \"ASC\";\n\t\t\t$_SESSION[ewSessionTblSort . \"_x_unidad\"] = $sThisSort;\n\t\t} else {\n\t\t\tif (@$_SESSION[ewSessionTblSort . \"_x_unidad\"] <> \"\") { @$_SESSION[ewSessionTblSort . \"_x_unidad\"] = \"\"; }\n\t\t}\n\t\t$_SESSION[ewSessionTblOrderBy] = $sSortField . \" \" . $sThisSort;\n\t\t$_SESSION[ewSessionTblStartRec] = 1;\n\t}\n\t$sOrderBy = @$_SESSION[ewSessionTblOrderBy];\n\tif ($sOrderBy == \"\") {\n\t\tif (ewSqlOrderBy <> \"\" && ewSqlOrderBySessions <> \"\") {\n\t\t\t$sOrderBy = ewSqlOrderBy;\n\t\t\t@$_SESSION[ewSessionTblOrderBy] = $sOrderBy;\n\t\t\t$arOrderBy = explode(\",\", ewSqlOrderBySessions);\n\t\t\tfor($i=0; $i<count($arOrderBy); $i+=2) {\n\t\t\t\t@$_SESSION[ewSessionTblSort . \"_\" . $arOrderBy[$i]] = $arOrderBy[$i+1];\n\t\t\t}\n\t\t}\n\t}\n}", "function get_sort_sql($fieldname) {\n return '';\n }", "public static function getRequestSQL($sort)\n {\n switch ($sort) {\n case self::SORT_LOGIN_ASC:\n $sql = 'SELECT * FROM `user` ORDER BY `login` LIMIT :limit OFFSET :offset';\n break;\n case self::SORT_DATE_OF_BIRTH_ASC:\n $sql = 'SELECT * FROM `user` ORDER BY `date_of_birth` LIMIT :limit OFFSET :offset';\n break;\n case self::SORT_UPDATED_AT_ASC:\n $sql = 'SELECT * FROM `user` ORDER BY `updated_at` LIMIT :limit OFFSET :offset';\n break;\n case self::SORT_CREATED_AT_ASC:\n $sql = 'SELECT * FROM `user` ORDER BY `created_at` LIMIT :limit OFFSET :offset';\n break;\n case self::SORT_LOGIN_DESC:\n $sql = 'SELECT * FROM `user` ORDER BY `login` DESC LIMIT :limit OFFSET :offset';\n break;\n case self::SORT_DATE_OF_BIRTH_DESC:\n $sql = 'SELECT * FROM `user` ORDER BY `date_of_birth` DESC LIMIT :limit OFFSET :offset';\n break;\n case self::SORT_UPDATED_AT_DESC:\n $sql = 'SELECT * FROM `user` ORDER BY `updated_at` DESC LIMIT :limit OFFSET :offset';\n break;\n case self::SORT_CREATED_AT_DESC:\n $sql = 'SELECT * FROM `user` ORDER BY `created_at` DESC LIMIT :limit OFFSET :offset';\n break;\n default:\n $sql = 'SELECT * FROM `user` LIMIT :limit OFFSET :offset';\n break;\n }\n\n return $sql;\n }", "private function formedCatalogParamatterSortQuery($parametter_array = array()) {\n // $this->db->order_by('site_catalog.in_stock', 'DESC');\n // $this->db->order_by('site_catalog.position', 'aSC');\n\n if (!is_array($parametter_array) || empty($parametter_array)) return false;\n\n if (isset($parametter_array['sort'][0])) {\n\n switch($parametter_array['sort'][0]) {\n\n case 'cheap': {\n\n $this->db\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('price', 'ASC')\n ;\n\n } break;\n\n case 'news': {\n\n $this->db\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('site_catalog.shareid', 'DESC')\n ;\n\n } break;\n\n case 'discounts': {\n\n $this->db\n \n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('site_catalog.old_price', 'ASC')\n\n ;\n\n } break;\n\n case 'popular': {\n\n $this->db\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('site_catalog.countwatch', 'DESC')\n ;\n\n } break;\n\n case 'expansiv': {\n\n $this->db\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('price', 'DESC')\n // ->order_by('site_catalog.countwatch', 'DESC')\n ;\n\n } break;\n\n default: {\n\n $this->db\n ->order_by('site_catalog.product-visible', 'DESC')\n ->order_by('site_catalog.in_stock', 'DESC')\n ->order_by('site_catalog.delivery_3_5', 'ASC')\n ->order_by('site_catalog.position', 'ASC')\n ;\n\n } break;\n\n }\n\n }\n\n }", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->identries); // identries\r\n\t\t\t$this->UpdateSort($this->titulo); // titulo\r\n\t\t\t$this->UpdateSort($this->id); // id\r\n\t\t\t$this->UpdateSort($this->islive); // islive\r\n\t\t\t$this->UpdateSort($this->tool_id); // tool_id\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function SetUpSortOrder() {\n\t\tglobal $tbl_slide;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$tbl_slide->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$tbl_slide->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->title); // title\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->images); // images\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->order_by); // order_by\n\t\t\t$tbl_slide->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "protected function getOrderByQuery()\n {\n\t\t$isWhat = $this->model->isWhat();\n\t\t$remoteTable = $this->model->tableName();\n\t\t$localOrderBy = [];\n\t\t$relations = [\n\t\t\t\\nitm\\widgets\\models\\Vote::tableName() => [\n\t\t\t\t'select' => new Expression('COUNT(*)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Issues::tableName() => [\n\t\t\t\t'select' => new Expression('COALESCE(created_at, updated_at)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Replies::tableName() => [\n\t\t\t\t'select' => new Expression('COALESCE(created_at, updated_at)'),\n\t\t\t],\n\t\t\t\\nitm\\widgets\\models\\Revisions::tableName() => [\n\t\t\t\t'select' => ['COUNT(*)'],\n\t\t\t]\n\t\t];\n\t\tforeach($relations as $table=>$relation){\n\t\t\t$localOrderBy[serialize(new Expression('('.(new Query)\n\t\t\t\t->from($table)\n\t\t\t\t->select($relation['select'])\n\t\t\t\t->where([\n\t\t\t\t\t\"$table.parent_id\" => \"$remoteTable.id\",\n\t\t\t\t\t\"$table.parent_type\" => $isWhat\n\t\t\t\t])->createCommand()->getRawSql().')'))] = SORT_DESC;\n\t\t}\n $localOrderBy = array_merge($localOrderBy, [\n serialize(new Expression(\"(CASE $remoteTable.status\n\t\t\t\tWHEN 'normal' THEN 0\n\t\t\t\tWHEN 'important' THEN 1\n\t\t\t\tWHEN 'critical' THEN 2\n\t\t\tEND)\")) => SORT_DESC,\n ]);\n\n return array_merge($localOrderBy, \\nitm\\helpers\\QueryFilter::getOrderByQuery($this->model));\n }", "function SetupSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tanggal); // tanggal\n\t\t\t$this->UpdateSort($this->auc_number); // auc_number\n\t\t\t$this->UpdateSort($this->start_bid); // start_bid\n\t\t\t$this->UpdateSort($this->close_bid); // close_bid\n\t\t\t$this->UpdateSort($this->lot_number); // lot_number\n\t\t\t$this->UpdateSort($this->chop); // chop\n\t\t\t$this->UpdateSort($this->grade); // grade\n\t\t\t$this->UpdateSort($this->estate); // estate\n\t\t\t$this->UpdateSort($this->sack); // sack\n\t\t\t$this->UpdateSort($this->netto); // netto\n\t\t\t$this->UpdateSort($this->open_bid); // open_bid\n\t\t\t$this->UpdateSort($this->highest_bid); // highest_bid\n\t\t\t$this->UpdateSort($this->auction_status); // auction_status\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function SetUpSortOrder() {\n\t\tglobal $patient_detail;\n\n\t\t// Check for an Order parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$patient_detail->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$patient_detail->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$patient_detail->UpdateSort($patient_detail->DetailNo); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyID); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->PatientID); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyDate); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyTime); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->Modality); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->BodyPartExamined); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->ProtocolName); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->Status); // Field \n\t\t\t$patient_detail->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function publisher_getOrderBy($sort)\r\n{\r\n if ($sort == \"datesub\") {\r\n return \"DESC\";\r\n } else if ($sort == \"counter\") {\r\n return \"DESC\";\r\n } else if ($sort == \"weight\") {\r\n return \"ASC\";\r\n }\r\n}", "function _order_by ($identifier_array, $o = TRUE) {\n\t\t$statement = '';\n\t\tif ( !isset($identifier_array) || !$identifier_array ) {\n\t\t\treturn $statement;\n\t\t}\n\t\t$statement .= $o ? ' ORDER BY ' : ' ';\n\t\t$c = count($identifier_array);\n\t\tfor ($count = 0; $count < $c; $count++) {\n\t\t\t$query_array = $identifier_array[$count]; \n\t\t\t$statement .= '`'. $query_array['column_name'] . '` ';\n\t\t\tif ($count == $c - 1) {\n\t\t\t\t$statement .= $query_array['asc_desc'] . ' ';\n\t\t\t} else {\n\t\t\t\t$statement .= $query_array['asc_desc'] . ', ';\n\t\t\t}\n\t\t}\n\t\treturn $statement;\n\t}", "function SetupSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->nombre_contacto); // nombre_contacto\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->lastname); // lastname\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->address); // address\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->cell); // cell\n\t\t\t$this->UpdateSort($this->created_at); // created_at\n\t\t\t$this->UpdateSort($this->id_sucursal); // id_sucursal\n\t\t\t$this->UpdateSort($this->tipoinmueble); // tipoinmueble\n\t\t\t$this->UpdateSort($this->tipovehiculo); // tipovehiculo\n\t\t\t$this->UpdateSort($this->tipomaquinaria); // tipomaquinaria\n\t\t\t$this->UpdateSort($this->tipomercaderia); // tipomercaderia\n\t\t\t$this->UpdateSort($this->tipoespecial); // tipoespecial\n\t\t\t$this->UpdateSort($this->email_contacto); // email_contacto\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function fPosts($orderCol=\"id\",$orderType=\"DESC\"){\n \n $sql = \"SELECT * FROM post ORDER BY $orderCol $orderType\";\n \n return fetchAll($sql);\n}", "function getOrderingAndPlaygroundQuery()\n\t{\n\t\treturn 'SELECT ordering AS value,name AS text FROM #__joomleague_playground ORDER BY ordering';\n\t}", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->RazonSocial); // RazonSocial\r\n\t\t\t$this->UpdateSort($this->NombreContacto); // NombreContacto\r\n\t\t\t$this->UpdateSort($this->Poblacion); // Poblacion\r\n\t\t\t$this->UpdateSort($this->Id_Estado); // Id_Estado\r\n\t\t\t$this->UpdateSort($this->Telefonos); // Telefonos\r\n\t\t\t$this->UpdateSort($this->Celular); // Celular\r\n\t\t\t$this->UpdateSort($this->Maneja_Papeleta); // Maneja_Papeleta\r\n\t\t\t$this->UpdateSort($this->Maneja_Activacion_Movi); // Maneja_Activacion_Movi\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function SetUpSortOrder()\r\n{\r\n\tglobal $sOrderBy;\r\n\tglobal $sDefaultOrderBy;\r\n\r\n\t// Check for an Order parameter\r\n\tif (strlen(@$_GET[\"order\"]) > 0) {\r\n\t\t$sOrder = @$_GET[\"order\"];\r\n\r\n\t\t// Field sucursal_id\r\n\t\tif ($sOrder == \"sucursal_id\") {\r\n\t\t\t$sSortField = \"`sucursal_id`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_sucursal_id_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_sucursal_id_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_sucursal_id_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_sucursal_id_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field nombre\r\n\t\tif ($sOrder == \"nombre\") {\r\n\t\t\t$sSortField = \"`nombre`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_nombre_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_nombre_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_nombre_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_nombre_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field entidad_id\r\n\t\tif ($sOrder == \"entidad_id\") {\r\n\t\t\t$sSortField = \"`entidad_id`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_entidad_id_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_entidad_id_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_entidad_id_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_entidad_id_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field calle\r\n\t\tif ($sOrder == \"calle\") {\r\n\t\t\t$sSortField = \"`calle`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_calle_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_calle_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_calle_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_calle_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field colonia\r\n\t\tif ($sOrder == \"colonia\") {\r\n\t\t\t$sSortField = \"`colonia`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_colonia_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_colonia_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_colonia_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_colonia_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field ciudad\r\n\t\tif ($sOrder == \"ciudad\") {\r\n\t\t\t$sSortField = \"`ciudad`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_ciudad_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_ciudad_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_ciudad_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_ciudad_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field codigo_postal\r\n\t\tif ($sOrder == \"codigo_postal\") {\r\n\t\t\t$sSortField = \"`codigo_postal`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_codigo_postal_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_codigo_postal_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_codigo_postal_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_codigo_postal_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field lada\r\n\t\tif ($sOrder == \"lada\") {\r\n\t\t\t$sSortField = \"`lada`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_lada_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_lada_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_lada_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_lada_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field telefono\r\n\t\tif ($sOrder == \"telefono\") {\r\n\t\t\t$sSortField = \"`telefono`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_telefono_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_telefono_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_telefono_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_telefono_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field fax\r\n\t\tif ($sOrder == \"fax\") {\r\n\t\t\t$sSortField = \"`fax`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_fax_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_fax_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_fax_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_fax_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field contacto\r\n\t\tif ($sOrder == \"contacto\") {\r\n\t\t\t$sSortField = \"`contacto`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_contacto_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_contacto_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_contacto_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_contacto_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field contacto_email\r\n\t\tif ($sOrder == \"contacto_email\") {\r\n\t\t\t$sSortField = \"`contacto_email`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_contacto_email_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_contacto_email_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_contacto_email_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_contacto_email_Sort\"] = \"\"; }\r\n\t\t}\r\n\r\n\t\t// Field sucursal_dependiente_id\r\n\t\tif ($sOrder == \"sucursal_dependiente_id\") {\r\n\t\t\t$sSortField = \"`sucursal_dependiente_id`\";\r\n\t\t\t$sLastSort = @$_SESSION[\"sucursal_x_sucursal_dependiente_id_Sort\"];\r\n\t\t\tif ($sLastSort == \"ASC\") { $sThisSort = \"DESC\"; } else{ $sThisSort = \"ASC\"; }\r\n\t\t\t$_SESSION[\"sucursal_x_sucursal_dependiente_id_Sort\"] = $sThisSort;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (@$_SESSION[\"sucursal_x_sucursal_dependiente_id_Sort\"] <> \"\") { @$_SESSION[\"sucursal_x_sucursal_dependiente_id_Sort\"] = \"\"; }\r\n\t\t}\r\n\t\t$_SESSION[\"sucursal_OrderBy\"] = $sSortField . \" \" . $sThisSort;\r\n\t\t$_SESSION[\"sucursal_REC\"] = 1;\r\n\t}\r\n\t$sOrderBy = @$_SESSION[\"sucursal_OrderBy\"];\r\n\tif ($sOrderBy == \"\") {\r\n\t\t$sOrderBy = $sDefaultOrderBy;\r\n\t\t$_SESSION[\"sucursal_OrderBy\"] = $sOrderBy;\r\n\t}\r\n}", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->created_time); // created_time\r\n\t\t\t$this->UpdateSort($this->message); // message\r\n\t\t\t$this->UpdateSort($this->link); // link\r\n\t\t\t$this->UpdateSort($this->type); // type\r\n\t\t\t$this->UpdateSort($this->caption); // caption\r\n\t\t\t$this->UpdateSort($this->description); // description\r\n\t\t\t$this->UpdateSort($this->name); // name\r\n\t\t\t$this->UpdateSort($this->source); // source\r\n\t\t\t$this->UpdateSort($this->from); // from\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "private function _orderByField($sql, $bind)\r\n {\r\n preg_match('/ order by field\\((.*)\\)$/si', $sql, $matches);\r\n $oldClause = $matches[0];\r\n $values = explode(',', $matches[1]);\r\n\r\n $field = array_shift($values);\r\n\r\n $newClause = \" order by case $field\";\r\n for ($i = 0, $size = count($values); $i < $size; $i++)\r\n {\r\n $newClause .= \" when {$values[$i]} then $i\";\r\n }\r\n $newClause .= ' end';\r\n\r\n $sql = str_replace($oldClause, $newClause, $sql);\r\n\r\n return array($sql, $bind);\r\n }", "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id, $bCtrl); // id\n\t\t\t$this->UpdateSort($this->detail_jenis_spp, $bCtrl); // detail_jenis_spp\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->tgl_spp, $bCtrl); // tgl_spp\n\t\t\t$this->UpdateSort($this->keterangan, $bCtrl); // keterangan\n\t\t\t$this->UpdateSort($this->no_spm, $bCtrl); // no_spm\n\t\t\t$this->UpdateSort($this->tgl_spm, $bCtrl); // tgl_spm\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function sortdata( $table, $column, $direction ) {\n\n\t global $tpl;\n\t global $user_data;\n\t global $getmonth;\n\t\t \n $objResponse = new xajaxResponse(); \n \n //include('settings/template.php'); \n include('settings/tables.php'); \n\n\t if ( $user_data == '' ) require_once('lib/functions/get_userdata.php'); \n\n\t if ($table == $tbl_goals) {\n\n //define sort column\n\t\t $goals_order = $column.\" \".$direction;\n\t include(\"lib/functions/fetch_goals.php\");\n\t $tpl->assign('ay_goals', $ay_goals);\n\t\t\t \t \t\n \t\t\t//define direction DESC or ASC\n\t\t if ($direction == 'DESC') $tpl->assign(\"sort_\".$column, 'ASC');\n\t\t else $tpl->assign(\"sort_\".$column, 'DESC');\n\t\t \n\t\t //update template\n \t $html = $tpl->fetch('modules/improve/goals/sort_'.$column.'.tpl'); \t\n $objResponse->assign(\"sortdiv_\".$column,\"innerHTML\",$html); \t\n\t\t \t\t \t\t\t \n\t\t\t \t\t\t\t\t \t \n $html2 = $tpl->fetch(\"modules/improve/goals/goal_entries.tpl\"); \n\n\n\t \t $objResponse->assign(\"goal_entries\",\"innerHTML\",$html2); \n\t\t \n\t }\n\t \n return $objResponse; \n \n }", "protected function applySorting()\n\t{\n\t\t$i = 1;\n\t\tparse_str($this->order, $list);\n\t\tforeach ($list as $field => $dir) {\n\t\t\t$this->dataSource->sort($field, $dir === 'a' ? IDataSource::ASCENDING : IDataSource::DESCENDING);\n\t\t\t$list[$field] = array($dir, $i++);\n\t\t}\n\t\treturn $list;\n\t}", "function SetUpSortOrder() {\n\t\tglobal $scholarship_package;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$scholarship_package->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$scholarship_package->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_package_id); // scholarship_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->start_date); // start_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->end_date); // end_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->status); // status\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->annual_amount); // annual_amount\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->grant_package_grant_package_id); // grant_package_grant_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->sponsored_student_sponsored_student_id); // sponsored_student_sponsored_student_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type); // scholarship_type\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type_scholarship_type); // scholarship_type_scholarship_type\n\t\t\t$scholarship_package->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "protected abstract function getOrderByClause(array $sorts);", "private function sorting(array $input){\n $sort = \"\";\n if (isset($this->params['sort']) && (strlen($this->params['sort']) > 0)){\n $sorting = explode(\"^\", $this->params['sort']);\n $sort = \" ORDER BY \" . $sorting[0] . \" \" . $sorting['1'];\n }\n else {\n if (count($input) > 0){\n $sort = \" ORDER BY \" . $input[0] . \" \" . $input['1'];\n }\n }\n return $sort;\n }", "function _buildContentOrderBy() {\r\n\t\tglobal $mainframe, $context;\r\n\t\t\r\n\t\t$filter_order = $mainframe->getUserStateFromRequest ( $context . 'filter_order', 'filter_order', '1' );\r\n\t\t$filter_order_Dir = $mainframe->getUserStateFromRequest ( $context . 'filter_order_Dir', 'filter_order_Dir', '' );\r\n\t\t\r\n\t\tif ($filter_order == 'h.ordering' || $filter_order == 'ordering') {\r\n\t\t\t$orderby = ' ORDER BY 1 ';\r\n\t\t} else {\r\n\t\t\t$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir;\r\n\t\t}\r\n\t\treturn $orderby;\r\n\t}", "function generate_sort_links($user_search, $sort) {\n $sort_links = '';\n\n switch ($sort) {\n case 1:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 2.5:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.6\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 3:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=4\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n case 5:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=6\">Date Posted</a></td><td></td><td></td><td></td>';\n break;\n default:\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=1\">Stock Name</a></td><td>Description</td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=2.5\">Category</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=3\">Subcategory</a></td>';\n $sort_links .= '<td><a href = \"' . $_SERVER['PHP_SELF'] . '?usersearch=' . $user_search . '&sort=5\">Date Posted</a></td><td></td><td></td><td></td>';\n }\n\n return $sort_links;\n }", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id); // id\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->companyname); // companyname\n\t\t\t$this->UpdateSort($this->servicetime); // servicetime\n\t\t\t$this->UpdateSort($this->country); // country\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->skype); // skype\n\t\t\t$this->UpdateSort($this->website); // website\n\t\t\t$this->UpdateSort($this->linkedin); // linkedin\n\t\t\t$this->UpdateSort($this->facebook); // facebook\n\t\t\t$this->UpdateSort($this->twitter); // twitter\n\t\t\t$this->UpdateSort($this->active_code); // active_code\n\t\t\t$this->UpdateSort($this->identification); // identification\n\t\t\t$this->UpdateSort($this->link_expired); // link_expired\n\t\t\t$this->UpdateSort($this->isactive); // isactive\n\t\t\t$this->UpdateSort($this->google); // google\n\t\t\t$this->UpdateSort($this->instagram); // instagram\n\t\t\t$this->UpdateSort($this->account_type); // account_type\n\t\t\t$this->UpdateSort($this->logo); // logo\n\t\t\t$this->UpdateSort($this->profilepic); // profilepic\n\t\t\t$this->UpdateSort($this->mailref); // mailref\n\t\t\t$this->UpdateSort($this->deleted); // deleted\n\t\t\t$this->UpdateSort($this->deletefeedback); // deletefeedback\n\t\t\t$this->UpdateSort($this->account_id); // account_id\n\t\t\t$this->UpdateSort($this->start_date); // start_date\n\t\t\t$this->UpdateSort($this->end_date); // end_date\n\t\t\t$this->UpdateSort($this->year_moth); // year_moth\n\t\t\t$this->UpdateSort($this->registerdate); // registerdate\n\t\t\t$this->UpdateSort($this->login_type); // login_type\n\t\t\t$this->UpdateSort($this->accountstatus); // accountstatus\n\t\t\t$this->UpdateSort($this->ispay); // ispay\n\t\t\t$this->UpdateSort($this->profilelink); // profilelink\n\t\t\t$this->UpdateSort($this->source); // source\n\t\t\t$this->UpdateSort($this->agree); // agree\n\t\t\t$this->UpdateSort($this->balance); // balance\n\t\t\t$this->UpdateSort($this->job_title); // job_title\n\t\t\t$this->UpdateSort($this->projects); // projects\n\t\t\t$this->UpdateSort($this->opportunities); // opportunities\n\t\t\t$this->UpdateSort($this->isconsaltant); // isconsaltant\n\t\t\t$this->UpdateSort($this->isagent); // isagent\n\t\t\t$this->UpdateSort($this->isinvestor); // isinvestor\n\t\t\t$this->UpdateSort($this->isbusinessman); // isbusinessman\n\t\t\t$this->UpdateSort($this->isprovider); // isprovider\n\t\t\t$this->UpdateSort($this->isproductowner); // isproductowner\n\t\t\t$this->UpdateSort($this->states); // states\n\t\t\t$this->UpdateSort($this->cities); // cities\n\t\t\t$this->UpdateSort($this->offers); // offers\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function cpSelectAsc($tablename,$value3=0,$value1=0,$value2=0) {\n /*\n * Prepare the select statement\n */\n $sql=\"SELECT * FROM $tablename\";\n if($value1!=0)\n { $key1= key($value1);\n $sql.=\" where $key1='$value1[$key1]'\";\n }\n if($value1!=0 && $value2!=0) \n {\n $key2= key($value2);\n $sql.=\" AND $key2='$value2[$key2]'\";\n }\n $sql.= \" ORDER BY $value3 ASC\";\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "public function queryAllOrderBy($orderColumn);", "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tgl, $bCtrl); // tgl\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->jns_spp, $bCtrl); // jns_spp\n\t\t\t$this->UpdateSort($this->kd_mata, $bCtrl); // kd_mata\n\t\t\t$this->UpdateSort($this->urai, $bCtrl); // urai\n\t\t\t$this->UpdateSort($this->jmlh, $bCtrl); // jmlh\n\t\t\t$this->UpdateSort($this->jmlh1, $bCtrl); // jmlh1\n\t\t\t$this->UpdateSort($this->jmlh2, $bCtrl); // jmlh2\n\t\t\t$this->UpdateSort($this->jmlh3, $bCtrl); // jmlh3\n\t\t\t$this->UpdateSort($this->jmlh4, $bCtrl); // jmlh4\n\t\t\t$this->UpdateSort($this->nm_perus, $bCtrl); // nm_perus\n\t\t\t$this->UpdateSort($this->alamat, $bCtrl); // alamat\n\t\t\t$this->UpdateSort($this->npwp, $bCtrl); // npwp\n\t\t\t$this->UpdateSort($this->pimpinan, $bCtrl); // pimpinan\n\t\t\t$this->UpdateSort($this->bank, $bCtrl); // bank\n\t\t\t$this->UpdateSort($this->rek, $bCtrl); // rek\n\t\t\t$this->UpdateSort($this->nospm, $bCtrl); // nospm\n\t\t\t$this->UpdateSort($this->tglspm, $bCtrl); // tglspm\n\t\t\t$this->UpdateSort($this->ppn, $bCtrl); // ppn\n\t\t\t$this->UpdateSort($this->ps21, $bCtrl); // ps21\n\t\t\t$this->UpdateSort($this->ps22, $bCtrl); // ps22\n\t\t\t$this->UpdateSort($this->ps23, $bCtrl); // ps23\n\t\t\t$this->UpdateSort($this->ps4, $bCtrl); // ps4\n\t\t\t$this->UpdateSort($this->kodespm, $bCtrl); // kodespm\n\t\t\t$this->UpdateSort($this->nambud, $bCtrl); // nambud\n\t\t\t$this->UpdateSort($this->nppk, $bCtrl); // nppk\n\t\t\t$this->UpdateSort($this->nipppk, $bCtrl); // nipppk\n\t\t\t$this->UpdateSort($this->prog, $bCtrl); // prog\n\t\t\t$this->UpdateSort($this->prog1, $bCtrl); // prog1\n\t\t\t$this->UpdateSort($this->bayar, $bCtrl); // bayar\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function getSorting();", "function SetUpSortOrder() {\r\n\t\tglobal $rekeningju;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$rekeningju->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$rekeningju->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$rekeningju->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->userlevelid); // userlevelid\n\t\t\t$this->UpdateSort($this->userlevelname); // userlevelname\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function SetUpSortOrder() {\n\t\tglobal $t_tinbai_mainsite;\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$t_tinbai_mainsite->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$t_tinbai_mainsite->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_CONGTY_ID, $bCtrl); // FK_CONGTY_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DMGIOITHIEU_ID, $bCtrl); // FK_DMGIOITHIEU_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DMTUYENSINH_ID, $bCtrl); // FK_DMTUYENSINH_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTSVTUONGLAI_ID, $bCtrl); // FK_DTSVTUONGLAI_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTSVDANGHOC_ID, $bCtrl); // FK_DTSVDANGHOC_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTCUUSV_ID, $bCtrl); // FK_DTCUUSV_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID, $bCtrl); // FK_DTDOANHNGHIEP_ID\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_TITLE, $bCtrl); // C_TITLE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_HIT_MAINSITE, $bCtrl); // C_HIT_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_NEW_MYSEFLT, $bCtrl); // C_NEW_MYSEFLT\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_COMMENT_MAINSITE, $bCtrl); // C_COMMENT_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ORDER_MAINSITE, $bCtrl); // C_ORDER_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_STATUS_MAINSITE, $bCtrl); // C_STATUS_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_VISITOR_MAINSITE, $bCtrl); // C_VISITOR_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ACTIVE_MAINSITE, $bCtrl); // C_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE, $bCtrl); // C_TIME_ACTIVE_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE, $bCtrl); // FK_NGUOIDUNGID_MAINSITE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_NOTE, $bCtrl); // C_NOTE\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_USER_ADD, $bCtrl); // C_USER_ADD\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_ADD_TIME, $bCtrl); // C_ADD_TIME\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_USER_EDIT, $bCtrl); // C_USER_EDIT\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->C_EDIT_TIME, $bCtrl); // C_EDIT_TIME\n\t\t\t$t_tinbai_mainsite->UpdateSort($t_tinbai_mainsite->FK_EDITOR_ID, $bCtrl); // FK_EDITOR_ID\n\t\t\t$t_tinbai_mainsite->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function getQueryOrderby() {\n return '`'.$this->name.'`';\n }", "function get_sort_column($sort_by, $direction)\n{\n session_start();\n if ( $_GET['sort'] !== NULL )\n {\n if (($_SESSION[\"sort_by\"] != NULL) && ($_SESSION[\"sort_direction\"] != NULL) && ($_SESSION[\"sort_by\"] == $_GET['sort']))\n {\n $direction = ($_SESSION[\"sort_direction\"] == 'asc') ? 'desc' : 'asc';\n set_sort_table($_GET['sort'], $direction);\n }\n\n set_sort_table($_GET['sort'], $direction);\n return array($_GET['sort'], $direction);\n }\n else\n {\n if ($_SESSION[\"sort_by\"] != NULL)\n {\n return array($_SESSION[\"sort_by\"], $_SESSION[\"sort_direction\"]);\n }\n else\n {\n set_sort_table($sort_by, $direction);\n return array($sort_by, $direction);\n }\n }\n}", "public function sort($sortOrderBy, $sortDirection = SolrInputDocument::SORT_ASC) {}", "function LoadSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\t\t$sOrderBy = $fs_multijoin_v->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($fs_multijoin_v->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $fs_multijoin_v->SqlOrderBy();\r\n\t\t\t\t$fs_multijoin_v->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function buildOrderParams() \n\t{\n\t\tif ($this->sortByGroup === false && $this->sortField != \"\"){\n\t\t\t$this->strOrderBy = \"Order by \".$this->sortField;\n\t\t\tif ($this->sortOrder == \"A\")\n\t\t\t\t$this->strOrderBy .= \" asc\";\n\t\t\telse \n\t\t\t\t$this->strOrderBy .= \" desc\";\n\t\t}\n\t}", "function SetUpSortOrder() {\n\tglobal $dpp_proveedores;\n\n\t// Check for an Order parameter\n\tif (@$_GET[\"order\"] <> \"\") {\n\t\t$dpp_proveedores->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t$dpp_proveedores->CurrentOrderType = @$_GET[\"ordertype\"];\n\n\t\t// Field provee_id\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_id);\n\n\t\t// Field provee_rut\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_rut);\n\n\t\t// Field provee_dig\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_dig);\n\n\t\t// Field provee_cat_juri\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_cat_juri);\n\n\t\t// Field provee_nombre\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_nombre);\n\n\t\t// Field provee_paterno\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_paterno);\n\n\t\t// Field provee_materno\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_materno);\n\n\t\t// Field provee_dir\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_dir);\n\n\t\t// Field provee_fono\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_fono);\n\t\t$dpp_proveedores->setStartRecordNumber(1); // Reset start position\n\t}\n\t$sOrderBy = $dpp_proveedores->getSessionOrderBy(); // Get order by from Session\n\tif ($sOrderBy == \"\") {\n\t\tif ($dpp_proveedores->SqlOrderBy() <> \"\") {\n\t\t\t$sOrderBy = $dpp_proveedores->SqlOrderBy();\n\t\t\t$dpp_proveedores->setSessionOrderBy($sOrderBy);\n\t\t}\n\t}\n}", "abstract protected function _buildOrderBy( $order );", "function SetupSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->fecha_tamizaje, $bCtrl); // fecha_tamizaje\n\t\t\t$this->UpdateSort($this->id_centro, $bCtrl); // id_centro\n\t\t\t$this->UpdateSort($this->apellidopaterno, $bCtrl); // apellidopaterno\n\t\t\t$this->UpdateSort($this->apellidomaterno, $bCtrl); // apellidomaterno\n\t\t\t$this->UpdateSort($this->nombre, $bCtrl); // nombre\n\t\t\t$this->UpdateSort($this->ci, $bCtrl); // ci\n\t\t\t$this->UpdateSort($this->fecha_nacimiento, $bCtrl); // fecha_nacimiento\n\t\t\t$this->UpdateSort($this->dias, $bCtrl); // dias\n\t\t\t$this->UpdateSort($this->semanas, $bCtrl); // semanas\n\t\t\t$this->UpdateSort($this->meses, $bCtrl); // meses\n\t\t\t$this->UpdateSort($this->sexo, $bCtrl); // sexo\n\t\t\t$this->UpdateSort($this->discapacidad, $bCtrl); // discapacidad\n\t\t\t$this->UpdateSort($this->id_tipodiscapacidad, $bCtrl); // id_tipodiscapacidad\n\t\t\t$this->UpdateSort($this->resultado, $bCtrl); // resultado\n\t\t\t$this->UpdateSort($this->resultadotamizaje, $bCtrl); // resultadotamizaje\n\t\t\t$this->UpdateSort($this->tapon, $bCtrl); // tapon\n\t\t\t$this->UpdateSort($this->tipo, $bCtrl); // tipo\n\t\t\t$this->UpdateSort($this->repetirprueba, $bCtrl); // repetirprueba\n\t\t\t$this->UpdateSort($this->observaciones, $bCtrl); // observaciones\n\t\t\t$this->UpdateSort($this->id_apoderado, $bCtrl); // id_apoderado\n\t\t\t$this->UpdateSort($this->id_referencia, $bCtrl); // id_referencia\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function getSort(){ return 301; }", "function get_order_by_clause() {\n $result = parent::get_order_by_clause();\n\n //make sure the result is actually valid\n if ($result != '') {\n //always sort by course in addition to everything else\n $result .= ', coursename, courseid';\n }\n\n return $result;\n }", "private function sortQueryOrders() {\n foreach ($this->queryResult as $index => $order) {\n $order = $this->injectKitData($order);\n $this->statusOutputOrder[$order['Order']['status']][$order['Order']['id']] = $order;\n }\n }", "private function orderBy($param) {\n if (isset($param['column']) && isset($param['type'])) {\n $this->sql .= 'ORDER BY ' . $param['column'] . ' ' . $param['type'] . ' ';\n }\n }", "protected function setOrder() {\r\n if( $this->sqlOrderBy ) {\r\n $this->sql .= ' ORDER BY ' . $this->sqlOrderBy;\r\n }\r\n }", "public function &getOrderBy();", "function order_by($params, $default_field, $default_order = 'ASC') {\r\n \tif (isset($params['sortby'])) {\r\n \t\t$default_field = $params['sortby'];\r\n \t}\r\n\r\n \tif (isset($params['sortdir'])) {\r\n \t\t$default_order = $params['sortdir'];\r\n \t}\r\n\r\n \treturn \"ORDER BY $default_field $default_order\";\r\n\r\n }", "protected function compileOrderByStatement()\n {\n if (is_array($this->builderCache->orderBy) && count($this->builderCache->orderBy) > 0) {\n for ($i = 0, $c = count($this->builderCache->orderBy); $i < $c; $i++) {\n if ($this->builderCache->orderBy[ $i ][ 'escape' ] !== false\n && ! $this->isLiteral(\n $this->builderCache->orderBy[ $i ][ 'field' ]\n )\n ) {\n $this->builderCache->orderBy[ $i ][ 'field' ] = $this->conn->protectIdentifiers(\n $this->builderCache->orderBy[ $i ][ 'field' ]\n );\n }\n\n $this->builderCache->orderBy[ $i ] = $this->builderCache->orderBy[ $i ][ 'field' ]\n . $this->builderCache->orderBy[ $i ][ 'direction' ];\n }\n\n return $this->builderCache->orderBy = \"\\n\" . sprintf(\n 'ORDER BY %s',\n implode(', ', $this->builderCache->orderBy)\n );\n } elseif (is_string($this->builderCache->orderBy)) {\n return $this->builderCache->orderBy;\n }\n\n return '';\n }", "public function sort()\n\t{\n\t\tif (app::is_ajax())\n\t\t{\n\t\t\tforeach($_POST as $key=>$val)\n\t\t\t{\n\t\t\t\tforeach($val as $position=>$id)\n\t\t\t\t{\n\t\t\t\t\t$this->rownd->update_position($id, $position);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function handleSortParams() {\n switch($this->sortParam) {\n case 'date':\n $this->sortField = 'date';\n break;\n\n case 'institution':\n $this->sortField = 'institution';\n break;\n\n case 'type':\n $this->sortField = 'document_type';\n break;\n\n default:\n $this->sortField = 'title';\n break;\n }\n\n\n // make sure we only use valid sort directions\n if($this->sortDirection != 'asc' && $this->sortDirection != 'desc') {\n $this->sortDirection = 'asc';\n }\n }", "function SetOrdering()\n {\n GLOBAL $_REQUEST;\n\n $sfid = 'sf' . $this->GetID();\n $srid = 'sr' . $this->GetID();\n $this->sf = $_REQUEST[$sfid];\n $this->sr = $_REQUEST[$srid];\n\n if ($this->sf != '') {\n $this->selectSQL->orders[] = $this->sf . \" \" . $this->sr;\n\n if ($this->sr == \"desc\") {\n $this->sr = \"asc\";\n $this->az = \"za\";\n } else {\n $this->sr = \"desc\"; //!< this is for the future \n $this->az = \"az\";\n } \n } else {\n $this->az = '';\n $this->sr = '';\n } \n }", "public function loadSortColumns()\n {\n add_filter( 'request', array( $this, 'sortColumns' ) );\n }", "private function buildOrderBy() {\n\t\t$hasorderby = false;\n\t\tforeach($this->ordergroup as $key=>$extra) {\n\t\t\tif(strpos(strtoupper($extra), 'ORDER BY') !== false) {\n\t\t\t\t$this->orders[] = str_replace('ORDER BY', \"\", strtoupper($extra));\n\t\t\t\tunset($this->ordergroup[$key]);\n\t\t\t}\n\t\t\tif(strpos(strtoupper($extra), 'LIMIT') !== false) {\n\t\t\t\t$this->limit = $extra;\n\t\t\t\tunset($this->ordergroup[$key]);\n\t\t\t}\n\t\t\tif(strpos(strtoupper($extra), 'GROUP BY') !== false) { \n\t\t\t\t$this->groups[] = str_replace('GROUP BY', \"\", strtoupper($extra));\n\t\t\t\tunset($this->ordergroup[$key]);\n\t\t\t}\n\t\t}\n\t}", "protected static function buildSqlOrderBy($sort) {\n\t\treturn DSC::buildSqlOrderBy(new self::$CLASS_NAME, $sort);\n\t}", "protected static function buildSqlOrderBy($sort) {\n\t\treturn DSC::buildSqlOrderBy(new self::$CLASS_NAME, $sort);\n\t}", "function init_sort(){\r\n\t\t$out='';\r\n\r\n\t\tif($this->sort===true or $this->sort==''){\r\n\t\t\tfor($i=0; $i<count($this->data[0]); $i++){\r\n\t\t\t\t$out.=($out ? '_' : '').'t';\r\n\t\t\t}\r\n\t\t\t$this->sort=$out;\r\n\t\t}\r\n\t}", "abstract public function findWithSort($query_string, $sortField, $reverse=false, $start=null, $rows=null, $extra=array());", "function buildSort( $sortArray )\n {\n $sortCount = 0;\n $sortList = false;\n if ( isset( $sortArray ) and\n is_array( $sortArray ) and\n count( $sortArray ) > 0 )\n {\n $sortList = $sortArray;\n if ( count( $sortList ) > 1 and\n !is_array( $sortList[0] ) )\n {\n $sortList = array( $sortList );\n }\n }\n $attributeJoinCount = 0;\n $attributeFromSQL = \"\";\n $attributeWereSQL = \"\";\n $sortingFields = '';\n if ( $sortList !== false )\n { \n foreach ( $sortList as $sortBy )\n {\n if ( is_array( $sortBy ) and count( $sortBy ) > 0 )\n {\n if ( $sortCount > 0 )\n $sortingFields .= ', ';\n $sortField = $sortBy[0];\n switch ( $sortField )\n {\n case 'published':\n {\n $sortingFields .= 'published';\n } break;\n case 'modified':\n {\n $sortingFields .= 'modified';\n } break;\n case 'section':\n {\n $sortingFields .= 'section_id';\n } break;\n case 'relevance':\n {\n $sortingFields .= '@relevance';\n } break;\n case 'id':\n {\n $sortingFields .= '@id';\n } break;\n case 'priority':\n {\n $sortingFields .= 'priority';\n } break; \n case 'attribute': //Sorting is enabled only for integer columns\n { \t\n $sortingFields .='attr_srch_int_pos'.$this->getPositionClassAttribute($sortBy[2]);\n }break;\n\n default:\n {\n eZDebug::writeWarning( 'Unknown sort field: ' . $sortField, 'eZSphinx::buildSort' );\n continue;\n };\n }\n $sortOrder = true; // true is ascending\n if ( isset( $sortBy[1] ) )\n $sortOrder = $sortBy[1];\n $sortingFields .= $sortOrder ? \" ASC\" : \" DESC\";\n ++$sortCount;\n }\n }\n }\n\n return $sortingFields;\n }" ]
[ "0.72902894", "0.72629666", "0.69020003", "0.6849471", "0.6752859", "0.66051775", "0.6598058", "0.657085", "0.65227884", "0.6521345", "0.6516874", "0.6479244", "0.6470579", "0.64645356", "0.6464101", "0.6424167", "0.6377056", "0.6314757", "0.6292665", "0.62854314", "0.6275794", "0.62120783", "0.62088925", "0.62018555", "0.61859924", "0.61779636", "0.61720115", "0.61687696", "0.6167387", "0.6141025", "0.61385053", "0.6107821", "0.6102681", "0.61009645", "0.60953736", "0.60774416", "0.6074953", "0.6070988", "0.6048372", "0.60460067", "0.6020921", "0.5997206", "0.5992774", "0.59762186", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59685224", "0.59485614", "0.5948333", "0.59404236", "0.5933902", "0.5932528", "0.5927546", "0.5914571", "0.5900488", "0.5888124", "0.58814764", "0.5872447", "0.58690506", "0.58679026", "0.58605313", "0.5856064", "0.5846666", "0.58162564", "0.58124226", "0.5807182", "0.5800719", "0.5792619", "0.5782068", "0.576621", "0.57639134", "0.57576466", "0.5751427", "0.57492334", "0.57492334", "0.57466966", "0.5743396", "0.57380855" ]
0.0
-1
Generate SQL to paginate a result set. Also sets the "perpage" and "curpage" variables in the template.
function paginate($perpage=50) { if($perpage == 0) return ''; // zero means unlimited $page = $this->page->param('p_p', 1); $perpage = $this->page->param('p_pp', $perpage); $offset = max(0,($page-1) * $perpage); return "$perpage OFFSET $offset"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPagedStatement($sql,$page,$items_per_page);", "abstract public function preparePagination();", "private function _pagination()\n {\n\n if (Request::has('pq_curpage') && Request::has('pq_rpp')) {\n $columnsTemp = $this->_columnsRaw;\n $pq_curPage = Request::input('pq_curpage');\n $pq_rPP = Request::input('pq_rpp');\n $queryTemp = new \\stdClass();\n $queryTemp = $this->_getQueryStatement();\n $queryTemp->columns = null;\n\n // Verifica si existe algun filtro para aplicarlo al COUNT y determinar cuantos registros hay en la consulta\n if (property_exists($this->_filterTable, 'query')) {\n $queryTemp->whereRaw($this->_filterTable->query, $this->_filterTable->param);\n }\n\n $totalRecordQuery = $queryTemp->count();\n $this->_query->columns = $columnsTemp;\n\n $skip = ($pq_rPP * ($pq_curPage - 1));\n\n if ($skip >= $totalRecordQuery) {\n $pq_curPage = ceil($totalRecordQuery / $pq_rPP);\n $skip = ($pq_rPP * ($pq_curPage - 1));\n }\n\n // Make limit to query\n $this->_query->offset($skip)\n ->limit($pq_rPP);\n\n $this->_paginationLimit = [\n 'totalRecords' => $totalRecordQuery,\n 'curPage' => $pq_curPage,\n ];\n }\n }", "protected function buildPagination() {}", "protected function buildPagination() {}", "function paging_1($sql,$vary=\"record\",$width=\"575\",$course)\n{\n\n global $limit,$offset,$currenttotal,$showed,$last,$align,$CFG;\n if(!empty ($_REQUEST['offset']))\n $offset=$_REQUEST['offset'];\n else $offset=0;\n $showed=$offset+$limit;\n $last=$offset-$limit;\n $result=get_records_sql($sql);\n\n $currenttotal=count($result);\n $pages=$currenttotal%$limit;\n if($pages==0)\n\t$pages=$currenttotal/$limit;\n else\n {\n\t$pages=$currenttotal/$limit;\n\t$pages=(int)$pages+1;\n }\n for($i=1;$i<=$pages;$i++)\n {\n\t$pageoff=($i-1)*$limit;\n\tif($showed==($i*$limit))\n\tbreak;\n }\n\t\t\t\n if($currenttotal>1)$vary.=\"s\";\n if($currenttotal>0)\n\techo @$display;\n if($CFG->dbtype==\"mysql\")\n {\n $sql.=\" Limit \".$offset.\",$limit \";\n }\n else if($CFG->dbtype==\"mssql_n\" )\n {\n $uplimit=$offset+$limit;\n $sql.=\" WHERE Row between \".($offset+1).\" and \".$uplimit;\n\n }\n\n return $sql;\n\n}", "function paginate() {\n\t\t$all_rs = $this->db->query($this->sql );\n\t\t$this->total_rows = $all_rs->num_rows;\n\t\t\n\t\t//Return FALSE if no rows found\n\t\tif ($this->total_rows == 0) {\n\t\t\tif ($this->debug)\n\t\t\t\techo \"Query returned zero rows.\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//Max number of pages\n\t\t$this->max_pages = ceil($this->total_rows / $this->rows_per_page );\n\t\tif ($this->links_per_page > $this->max_pages) {\n\t\t\t$this->links_per_page = $this->max_pages;\n\t\t}\n\t\t\n\t\t//Check the page value just in case someone is trying to input an aribitrary value\n\t\tif ($this->page > $this->max_pages || $this->page <= 0) {\n\t\t\t$this->page = 1;\n\t\t}\n\t\t\n\t\t//Calculate Offset\n\t\t$this->offset = $this->rows_per_page * ($this->page - 1);\n\t\t\n\t\t//Fetch the required result set\n\t\t$rs = $this->db->query($this->sql . \" LIMIT {$this->offset}, {$this->rows_per_page}\" );\n\t\t$this->data = $rs->rows;\n\t}", "public function getPaginate ($p_rowsPerPage, $p_currentPage);", "function set_pagination(){\n\t\tif ($this->rpp>0)\n\t\t{\n\t\t\t$compensation= ($this->num_rowset % $this->rpp)>0 ? 1 : 0;\n\t\t\t$num_pages = (int)($this->num_rowset / $this->rpp) + $compensation;\n\t\t} else {\n\t\t\t$compensation = 0;\n\t\t\t$num_pages = 1;\n\t\t}\n\n\t\tif ($num_pages>1){\n\t\t\t$this->tpl->add(\"pagination\", \"SHOW\", \"TRUE\");\n\n\t\t\tfor ($i=0; $i<$num_pages; $i++){\n\t\t\t\t$this->tpl->add(\"page\", array(\n\t\t\t\t\t\"CLASS\"\t=> \"\",\n\t\t\t\t\t\"VALUE\"\t=> \"\",\n\t\t\t\t));\n\t\t\t\t$this->tpl->parse(\"page\", true);\n\t\t\t}\n\t\t}\n/*\n\t\t\t<patTemplate:tmpl name=\"pagination\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<ul>\t\n\t\t\t\t\t<patTemplate:tmpl name=\"prev_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li class=\"disablepage\"><a href=\"javascript: return false;\">« Предишна</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t\t<patTemplate:tmpl name=\"page\">\n\t\t\t\t\t<li {CLASS}>{VALUE}</li>\n\t\t\t\t\t</patTemplate:tmpl>\n<!--\n\t\t\t\t\t<li class=\"currentpage\">1</li>\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">2</a></li>\n\t\t\t\t\t<li><a href=\"?page=2&sort=date&type=desc\">3</a></li>\n//-->\n\t\t\t\t\t<patTemplate:tmpl name=\"next_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">Следваща »</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t</patTemplate:tmpl>\n*/\n\t}", "function pagination(){}", "public function fetchAllPaginated($sql, $params = array(), $itemsPerPage, $isFirstPage);", "function db_paginate_sql($page_number){\n\t\tglobal $config;\n\t\treturn(\"\\n LIMIT \".$config['pagination_limit'].\" OFFSET \".($config['pagination_limit']*$page_number).\" \");\n\t}", "private function compilePager() {\n \t\n \t\n \t$this->_tmp_page = '<p '.$this->_config['css_page'].'>';\n \tif ($this->_all_page > 1 && $this->_config['cur_page'] > 1) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].'1\">'.$this->_config['first'].'</a>';\n \t}\n \tif ($this->_all_page > 1 && $this->_config['cur_page'] > 1) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].($this->_config['cur_page'] - 1).'\">'.$this->_config['previous'].'</a>';\n \t}\n \t\n \tif ($this->_all_page <= $this->_config['scr_page']) {\n \tif($this->_config['all_recs'] <= $this->_config['per_page']) {\n \t$this->_start = 1;\n $this->_stop = $this->_all_page;\n } else {\n \t\t$this->_start = 1;\n $this->_stop = $this->_all_page;\n }\n } else {\n \tif($this->_config['cur_page'] < intval($this->_config['scr_page'] / 2) + 1) {\n\t $this->_start = 1; \n\t \t$this->_stop = $this->_config['scr_page'];\n } else {\n \t$this->_start = $this->_config['cur_page'] - intval($this->_config['scr_page'] / 2);\n $this->_stop = $this->_config['cur_page'] + intval($this->_config['scr_page'] / 2);\n if($this->_stop > $this->_all_page) $this->_stop = $this->_all_page;\n }\n }\n if ($this->_all_page > 1) {\n\t for ($i = $this->_start; $i <= $this->_stop; $i++) {\n\t \tif ($i == $this->_config['cur_page']) {\n\t \t$this->_tmp_page .= '<span '.$this->_config['act_page'].'>'.$i.'</span>';\n\t } else {\n\t $this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].$i.'\">'.$i.'</a>';\n\t }\n\t }\n }\n \n \tif ($this->_config['cur_page'] < $this->_all_page) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].($this->_config['cur_page'] + 1).'\">'.$this->_config['next'].'</a>';\n \t}\n \tif ($this->_config['cur_page'] < $this->_all_page) {\n \t\t$this->_tmp_page .= '<a href=\"'.$this->_config['url_page'].$this->_all_page.'\">'.$this->_config['last'].'</a>';\n \t}\n \treturn $this->_tmp_page.'</p>';\n }", "public function generatePagination()\n {\n $this->buffer = [];\n\n if ($this->currentPage != 1) {\n $this->generateLeftButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n\n $this->generatePages();\n\n if ($this->currentPage != self::getPages($this->records, $this->recordsInPage)) {\n $this->generateRightButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n }", "private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }", "public function paginateLatestQueries($page = 1, $perPage = 15);", "function pager($current_page, $records_per_page, $pages_per_pageList, $dataQuery, $countQuery){\n $obj->record = array(); // beinhaltet ein Arrray des objects mit Daten wor&uuml;ber dann zugegriffen wird.\n $obj->current_page = $current_page; // Startet mit 0!\n $obj->total_cur_page = 0; // shows how many records belong to current page\n $obj->records_per_page = 0;\n $obj->total_records = 0;\n $obj->total_pages = 0;\n $obj->preceding = false; // Ist true wenn es eine Seite vor der angezeigten gibt.\n $obj->subsequent = false; // Ist true wenn es eine Seite nach der angezeigten gibt.\n $obj->pages_per_pageList = 10; //$pages_per_pageList;\n $result=mysql_query($countQuery, $this->CONNECTION);\n $obj->total_records = mysql_num_rows($result);\n if($obj->total_records>0){\n $obj->record = $this->select($dataQuery);\n $obj->total_cur_page = sizeof($obj->record);\n $obj->records_per_page = $records_per_page;\n $obj->total_pages = ceil($obj->total_records/$records_per_page);\n $obj->offset_page = $obj->pages_per_pageList*floor($obj->current_page/$obj->pages_per_pageList);\n $obj->total_pages_in_pageList = $obj->total_pages-($obj->offset_page+$obj->pages_per_pageList);\n $obj->last_page_in_pageList = $obj->offset_page+$obj->pages_per_pageList;\n if($obj->last_page_in_pageList>$obj->total_pages) $obj->last_page_in_pageList=$obj->total_pages;\n if($obj->offset_page>0) $obj->pageList_preceding=true;\n else $obj->pageList_preceding=false;\n if($obj->last_page_in_pageList<$obj->total_pages) $obj->pageList_subsequent=true;\n else $obj->pageList_subsequent=false;\n if($obj->current_page>1) $obj->preceding=true;\n if($obj->current_page<$obj->total_pages) $obj->subsequent=true;\n }\n return $obj;\n }", "function paginate( $smarty, $itemVarName, $currentSortIndex, $currentSortDir, $mode ){\n require_once('lib/SmartyPaginate.class.php');\n\n SmartyPaginate::reset();\t/* Remove the old session data */\n SmartyPaginate::connect();\n SmartyPaginate::setLimit( 15 );\n\n $smarty->assign( $itemVarName, getPaginatedResults( $smarty,\n\t\t\t\t\t\t $itemVarName, \n\t\t\t\t\t\t $currentSortIndex,\n\t\t\t\t\t\t $currentSortDir,\n\t\t\t\t\t\t $mode ) );\n SmartyPaginate::assign( $smarty );\n}", "function getPagelist($sql = '', $fields = array(), $mod = array())\n{\n $count = count(db(sql));\n $totalNum = ceil($count / PAGE_NUM);\n $path = $request_url['path'];\n\n $page = (isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'];\n// 组装limit语句\n $limit = 'LIMIT' . ($page - 1) * PAGE_NUM . ',' . PAGE_NUM;\n $datas = db($sql, $limit);\n $html = getTable($datas, $fields, $mod);\n $start = ($page - PAGE_OFFSET) > 0 ? $page - PAGE_OFFSET : 1;//获取左侧位置的偏移\n $end = ($page + PAGE_OFFSET) < $totalNum ? $page + PAGE_OFFSET : $totalNum;\n $html .= '<div class=\"page\">';\n if ($page > 1) {\n $html .= '<a href=\"' . $path . '?page=' . ($page - 1) . '\">上一页</a>';\n $html .= '<a href=\"' . $path . '?page=1\">首页</a>';\n }\n for($i = $start;$i<=$end;$i++)\n {\n $class = ($i==$page)?'class=\"on\"':'';\n $html .='<a href =\"'.$path.'?page='.$i.'\"'.$class.'>'.$i.'</a>';\n\n\n }\n if ($page < $totalNum) {\n ;\n $html .= '<a href=\"' . $path . '?page='.$totalNum.'\">尾页</a>';\n $html .= '<a href=\"' . $path . '?page='.($page+1).'\">下一页</a>';\n }\n $html .='共'.$totalNum.'页';\n $html .='</div>';\n return $html;\n}", "function paging($tablename, $fieldlist, $where = '', $orderby = '', $groupby = '', $records=15, $pages=9)\n\t{\n\t\t$converter = new encryption();\n\t\t$dbfunctions = new dbfunctions();\n\t\tif($pages%2==0)\n\t\t\t$pages++;\n\t\t/*\n\t\tThe pages should be odd not even\n\t\t*/\n\t\t$sql = $dbfunctions->GenerateSelectQuery($tablename, $fieldlist, $where, $orderby, $groupby);\n\t\t$dbfunctions->SimpleSelectQuery($sql);\n\t\t$total = $dbfunctions->getNumRows();\n\t\t$page_no = (int) isset($_GET[\"page_no\"])?$converter->decode($_GET[\"page_no\"]):1;\n\t\t/*\n\t\tChecking the current page\n\t\tIf there is no current page then the default is 1\n\t\t*/\n\t\t$limit = ($page_no-1)*$records;\n\t\t$sql = $dbfunctions->GenerateSelectQuery($tablename, $fieldlist, $where, $orderby, $groupby, \" limit $limit,$records\");\n\t\t/*\n\t\tThe starting limit of the query\n\t\t*/\n\t\t$first=1;\n\t\t$previous=$page_no>1?$page_no-1:1;\n\t\t$next=$page_no+1;\n\t\t$last=ceil($total/$records);\n\t\tif($next>$last)\n\t\t\t$next=$last;\n\t\t/*\n\t\tThe first, previous, next and last page numbers have been calculated\n\t\t*/\n\t\t$start=$page_no;\n\t\t$end=$start+$pages-1;\n\t\tif($end>$last)\n\t\t\t$end=$last;\n\t\t/*\n\t\tThe starting and ending page numbers for the paging\n\t\t*/\n\t\tif(($end-$start+1)<$pages)\n\t\t{\n\t\t\t$start-=$pages-($end-$start+1);\n\t\t\tif($start<1)\n\t\t\t\t$start=1;\n\t\t}\n\t\tif(($end-$start+1)==$pages)\n\t\t{\n\t\t\t$start=$page_no-floor($pages/2);\n\t\t\t$end=$page_no+floor($pages/2);\n\t\t\twhile($start<$first)\n\t\t\t{\n\t\t\t\t$start++;\n\t\t\t\t$end++;\n\t\t\t}\n\t\t\twhile($end>$last)\n\t\t\t{\n\t\t\t\t$start--;\n\t\t\t\t$end--;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tThe above two IF statements are kinda optional\n\t\tThese IF statements bring the current page in center\n\t\t*/\n\t\t$this->sql=$sql;\n\t\t$this->records=$records;\n\t\t$this->pages=$pages;\n\t\t$this->page_no=$page_no;\n\t\t$this->total=$total;\n\t\t$this->limit=$limit;\n\t\t$this->first=$first;\n\t\t$this->previous=$previous;\n\t\t$this->next=$next;\n\t\t$this->last=$last;\n\t\t$this->start=$start;\n\t\t$this->end=$end;\n\t}", "public function paginate( $perPage, array $columns = ['*'] );", "function getPaging() {\n\t\t//if the total number of rows great than page size\n\t\tif($this->totalRows > $this->pageSize) {\n\t\t\tprint '<div class=\"paging\">';\n\t\t\tprint '<ul>';\n\t\t\tprint $this->first() . $this->prev() . $this->pageList() . $this->next() . $this->end();\n\t\t\tprint '</ul>';\n\t\t\tprint '</div>';\n\t\t}\n }", "public function paginate($limit = null, $columns = ['*'], $method = \"paginate\");", "function paginate() {\r\n\t\t/*Check for valid mysql connection\r\n\t\tif (! $this->conn || ! is_resource($this->conn )) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"MySQL connection missing<br />\";\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\t\t\r\n\t/*\t//Find total number of rows\r\n\t\t$all_rs = @mysql_query($this->sql );\r\n\t\tif (! $all_rs) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"SQL query failed. Check your query.<br /><br />Error Returned: \" . mysql_error();\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->total_rows=$this->sql;\r\n\t\t//Return FALSE if no rows found\r\n\t\tif ($this->total_rows == 0) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"<h3 style='\r\ntext-align: center;\r\ncolor: gray;\r\nwidth: 690px;\r\nfont-size: 47px;\r\nmargin: 90px 0 0 0;\r\nfont-family: trebuchet ms;\r\n'>No Record Found</h3>\";\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\t//Max number of pages\r\n\t\t$this->max_pages = ceil($this->total_rows / $this->rows_per_page );\r\n\t\tif ($this->links_per_page > $this->max_pages) {\r\n\t\t\t$this->links_per_page = $this->max_pages;\r\n\t\t}\r\n\t\t\r\n\t\t//Check the page value just in case someone is trying to input an aribitrary value\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 Offset\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)\r\n\t\t\t\techo \"Pagination query failed. Check your query.<br /><br />Error Returned: \" . mysql_error();\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\t\treturn \"\";\r\n\t}", "public function paginate()\n {\n }", "function pagination($sql_pagination,$num_results_per_page){\n\tglobal $paginate, $result, $pageQuery;\t\n\t$targetpage = htmlspecialchars($_SERVER['PHP_SELF'] );\n\t$qs =\t'';\n\tif (!empty($_SERVER['QUERY_STRING'])) {\n\t\t$parts = explode(\"&\", $_SERVER['QUERY_STRING']);\n\t\t$newParts = array();\n\t\tforeach ($parts as $val) {\n\t\t\tif (stristr($val, 'page') == false) {\n\t\t\t\tarray_push($newParts, $val);\n\t\t\t}\n\t\t}\n\t\tif (count($newParts) != 0) {\n\t\t\t$qs = \"&\".implode(\"&\", $newParts);\n\t\t} \n\t}\n\t\n\t$limit = $num_results_per_page; \n\t$query = $sql_pagination;\n\t$total_pages = mysql_query($query);\n\t$counts\t\t=\tmysql_num_rows($total_pages);\t\n\t$total_pages = $counts;\n\t$lastpage = ceil($total_pages/$limit);\t\t\n\t$LastPagem1 = $lastpage - 1;\t\n\t$stages = 2;\n\t$page = mysql_real_escape_string($_GET['page']);\n\tif($page){\n\t\t$start = ($page - 1) * $limit; \n\t}else{\n\t\t$start = 0;\t\n\t\t}\n\t\n // Get page data\n\t$pageQuery = $query.\" limit $start,$limit\";\n\t//$result = mysql_query($pageQuery);\n\t\n\t// Initial page num setup\n\tif ($page == 0){$page = 1;}\n\t$prev = $page - 1;\t\n\t$next = $page + 1;\t\t\t\t\t\t\t\n\t\n\t\n\t$paginate = '';\n\tif($lastpage > 1)\n\t{\t\n\t\t$paginate .= \"<div class='paginate'>\";\n\t\t// Previous\n\t\tif ($page > 1){\n\t\t\t$paginate.= \"<a href='$targetpage?page=$prev$qs'>previous</a>\";\n\t\t}else{\n\t\t\t$paginate.= \"<span class='disabled'>previous</span>\";\t}\n\t\t\n\t\t// Pages\t\n\t\tif ($lastpage < 7 + ($stages * 2))\t// Not enough pages to breaking it up\n\t\t{\t\n\t\t\tfor ($counter = $lastpage; $counter >= 1; $counter--)\n\t\t\t{\n\t\t\t\tif ($counter == $page){\n\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t}else{\n\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telseif($lastpage > 5 + ($stages * 2))\t// Enough pages to hide a few?\n\t\t{\n\t\t\t// Beginning only hide later pages\n\t\t\tif($page < 1 + ($stages * 2))\t\t\n\t\t\t{\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$lastpage$qs'>$lastpage</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$LastPagem1$qs'>$LastPagem1</a>\";\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\tfor ($counter = 4 + ($stages * 2); $counter >= 1; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t// Middle hide some front and some back\n\t\t\telseif($lastpage - ($stages * 2) > $page && $page > ($stages * 2))\n\t\t\t{\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$lastpage$qs'>$lastpage</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$LastPagem1$qs'>$LastPagem1</a>\";\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\tfor ($counter =$page + $stages; $counter <= $page - $stages; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t$paginate.= \"...\";\t\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=2$qs'>2</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=1$qs'>1</a>\";\n\t\t\t\t\n\t\t\t}\n\t\t\t// End only hide early pages\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\tfor ($counter =$lastpage; $counter >= $lastpage - (2 + ($stages * 2)) ; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=2$qs'>2</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=1$qs'>1</a>\";\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\t\t\t// Next\n\t\tif ($page < $counter - 1){ \n\t\t\t$paginate.= \"<a href='$targetpage?page=$next$qs'>next</a>\";\n\t\t}else{\n\t\t\t$paginate.= \"<span class='disabled'>next</span>\";\n\t\t\t}\n\t\t\t\n\t\t$paginate.= \"</div>\";\t\t\n\t\n\t\n}\n //echo $total_pages.'Results';\n // pagination\n $paginate;\n}", "public function paginate($limit = null, $columns = ['*']);", "function createPaging($table,$cond=\"\",$id=\"\") {\n\n\t\tglobal $db, $start, $num, $pageFrom, $pageNum, $query, $field;\n\n\t\tif (strlen($cond)) $condString= \"WHERE \".$cond;\n\n\t\t$strSQL\t\t= \"SELECT * from $table $condString \";\n\t\t$result\t\t= $db->Execute($strSQL);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$totalData\t= $result->RecordCount();\n\n\t\t$totalPage\t= ceil($totalData/$num);\n\t\t$sisa\t\t= $totalPage - $pageFrom;\n\n\t\tif ( $sisa < $pageNum ) $pageTo = $pageFrom + $sisa; else $pageTo = $pageFrom + $pageNum;\n\n\t\tif ( ($pageFrom - $pageNum) < 0 ) $pageBefore = 0; else $pageBefore = $pageFrom - $pageNum;\n\t\tif ( ($pageFrom + $pageNum) > ($totalPage - $pageNum) ) $pageNext = $totalPage - $pageNum; else $pageNext = $pageFrom + $pageNum;\n\t\tif ( $pageNext < 0 ) $pageNext = 0;\n\n\t\tif ( ($totalPage-$pageNum)<0 ) $pageLast = 0; else $pageLast = $totalPage-$pageNum;\n\n\t\tfor ($i=$pageFrom; $i<$pageTo; ++$i) {\n\t\t\t$page_i = $i + 1;\n\t\t\t$next_i = $i * $num;\n\t\t\tif ($next_i == $start) {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field><b>$page_i</b></a> \";\n\t\t\t} else {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field>$page_i</a> \";\n\t\t\t}\n\t\t}\n\n\t\t$final =\t\"<a \t\thref=$PHP_SELF?act=list&start=0&num=$num&pageFrom=0&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field>awal</a>\".\n\t\t\" | <a href=$PHP_SELF?act=list&start=\".($pageBefore*$num).\"&num=$num&pageFrom=$pageBefore&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field><<</a> \".\n\t\t$page.\n\t\t\" <a href=$PHP_SELF?act=list&start=\".($pageNext*$num).\"&num=$num&pageFrom=$pageNext&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field>>></a> | \".\n\t\t\"<a href=$PHP_SELF?act=list&start=\".(($totalPage-1)*$num).\"&num=$num&pageFrom=\".$pageLast.\"&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field>akhir</a>\";\n\n\t\treturn $final;\n\t}", "public function m_paging($form,$count,$start,$limit,$sql) {\n\n\t//count the rows of the query\n\t\t$sql = \"select count(*) as 'total' $sql limit 1\";\n\n\t\t$result = o_db::m_select($sql);\n\t\t$total = $result[0]['total'];\n\n\t//echo \"$total <br> $count\";\n\n\t\tif ($total == 0 || $count == 0)\n\t\t\treturn 0;\n\t\tif ($start > $total)\n\t\t\treturn 0;\n\n\t//the page requested is the current page plus the number of rows passed for the current page\n\t//this way, if there are less than the limit of results for the requested page\n\t//(eg. a limit range could be 1-50, but only 32 rows were retrieved, so we would show 1-32)\n\t\t$place = $start + $count;\n\n\t//if the whole result set for the sql query is the same amount as the current page passed\n\t//then paging is NOT needed because there is only 1 page of results available for the query\n\t\tif ($total >= $place)\n\t\t{\n\t\t//displayed in the colored box on the left of the paging block\n\t\t\t$range = ($start + 1).\" - \".$place.\" / $total\";\n\t\t\t$this->page_range = $range;\n\t\t} //end if\n\n\t\tif ($total > $count)\n\t\t{\n\n\t\t//get the results per page select menu\n\t\t\t_esrs::m_menu_page_limits($form);\n\t\t//get the page to display select menu\n\t\t\t_esrs::m_menu_display_page($form,$start,$total,$limit);\n\n\t\t} //end if\n\n\t//determin which buttons should appear on the requested page\n\t//the first page has only a next button, no previous\n\t//the last page has only a previous button, no next\n\n\t//if the total number of rows available in the dataset equals where we're at\n\t//then do NOT paint a next button\n\t\t$this->next_butt = (($total > $place) ? \"<input id=\\\"esrs_submit\\\" class=\\\"esrs_submit\\\" type=submit name=\\\"esrs_page_next\\\" value=\\\"Next $limit\\\">\" : \"&nbsp;\");\n\n\t//if we're on the first page of the result\n\t//then do NOT paint a previous button\n\t\t$this->prev_butt = (($start > 0) ? \"<input id=\\\"esrs_submit\\\" class=\\\"esrs_submit\\\" type=submit name=\\\"esrs_page_prev\\\" value=\\\"Prev $limit\\\">\" : \"&nbsp;\") ;\n\n\t\t$this->do_paging = 1;\n\n\t}", "public function getPaginationDataSource();", "function execute($sql, $db, $type){\r\n global $total_records, $row, $numtoshow;\r\n\r\n // number of records to show at a time\r\n $numtoshow = 10; //$this->numrowsperpage;\r\n // $row is actually the number of the row of \r\n // records (the page number)\r\n if (!isset($row)) $row = 0;\r\n // the record start number for the SQL query\r\n $start = $row * $numtoshow;\r\n // check the database type\r\n if ($type == \"mysqli\") {\r\n $result = mysqli_query($db, $sql);\r\n $total_records = mysqli_num_rows($result);\r\n \t$last = ceil($total_records/$numtoshow);\r\n// This makes sure $last cannot be less than 1\r\nif($last < 1){\r\n\t$last = 1;\r\n}\r\n// Establish the $pagenum variable\r\n$pagenum = 1;\r\n\t\r\n\tif(isset($_GET['pn'])){\r\n\t$pagenum = preg_replace('#[^0-9]#', '', $_GET['pn']);\r\n}\r\n// This makes sure the page number isn't below 1, or more than our $last page\r\nif ($pagenum < 1) { \r\n $pagenum = 1; \r\n} else if ($pagenum > $last) { \r\n $pagenum = $last; \r\n}\r\n// This sets the range of rows to query for the chosen $pagenum\r\n$limit = 'LIMIT ' .($pagenum - 1) * $numtoshow .',' .$numtoshow;\r\n\t //$sql .= \" LIMIT $start, $numtoshow\";\r\n\t $sql .= $limit = 'LIMIT ' .($pagenum - 1) * $numtoshow .',' .$numtoshow;\r\n $result = mysqli_query( $db,$sql);\r\n \r\n} elseif ($type == \"pgsql\") {\r\n $result = pg_Exec($db, $sql);\r\n $total_records = pg_NumRows($result);\r\n $sql .= \" LIMIT $numtoshow, $start\";\r\n $result = pg_Exec($db, $sql);\r\n }\r\n // returns the result set so the user \r\n // can handle the data\r\n\r\n\r\n$sql = \"SELECT * FROM `russian` $limit\";\r\n$query = mysqli_query($db, $sql);\r\n// This shows the user what page they are on, and the total number of pages\r\n$textline1 = \"Russian Words\";\r\n$textline2 = \"Page <b>$pagenum</b> of <b>$last</b>\";\r\n// Establish the $paginationCtrls variable\r\n$paginationCtrls = '';\r\n// If there is more than 1 page worth of results\r\n$paginationCtrls .= '&nbsp; <a href=\"'.$_SERVER['PHP_SELF'].'?pn=\"1\"> <</a> ';\r\nif($last != 1){\r\n\t\r\n\t/* First we check if we are on page one. If we are then we don't need a link to \r\n\t the previous page or the first page so we do nothing. If we aren't then we\r\n\t generate links to the first page, and to the previous page. */\r\n\tif ($pagenum > 1) {\r\n $previous = $pagenum - 1;\r\n\t\t$paginationCtrls .= '<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$previous.'\">Previous</a> &nbsp; &nbsp; ';\r\n\t\t// Render clickable number links that should appear on the left of the target page number\r\n\t\tfor($i = $pagenum-4; $i < $pagenum; $i++){\r\n\t\t\tif($i > 0){\r\n\t\t $paginationCtrls .= '<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$i.'\">'.$i.'</a> &nbsp; ';\r\n\t\t\t}\r\n\t }\r\n }\r\n\t// Render the target page number, but without it being a link\r\n\t$paginationCtrls .= ''.$pagenum.' &nbsp; ';\r\n\t// Render clickable number links that should appear on the right of the target page number\r\n\tfor($i = $pagenum+1; $i <= $last; $i++){\r\n\t\t$paginationCtrls .= '<a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$i.'\">'.$i.'</a> &nbsp; ';\r\n\t\tif($i >= $pagenum+4){\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t// This does the same as above, only checking if we are on the last page, and then generating the \"Next\"\r\n if ($pagenum != $last) {\r\n $next = $pagenum + 1;\r\n $paginationCtrls .= ' &nbsp; <a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$next.'\">Next</a> ';\r\n\t\t$paginationCtrls .= ' &nbsp; <a href=\"'.$_SERVER['PHP_SELF'].'?pn='.$last.'\">>></a> ';\r\n }\r\n\t\r\n}\r\n\r\necho \"<div>\r\n <h2 align= 'center'>\" . $textline1 .\"</h2>\r\n </div><div align ='center'>\" . $textline2 .\"</div><p>\r\n \r\n <div id=\" . \"'pagination_controls' align='center'>\" . $paginationCtrls . \"</div>\r\n</div>\";\r\n return $result;\r\n }", "function sql_batching($sql,$batch_page,$param,$per_page=5,$max_rec=10,$main=0,$start=0) \n\t{\n\t\t$i=0;\n\t\t$temp=0;\n\n\t\t\n\t\t$PER_PAGE=$per_page;\t//DEFINE HOW MANY PAGES TO DISPLAY PER PAGE.\n\t\t$MAX_REC=$max_rec;\t\t//DEFINE HOW MANY ROWS TO DISPALY PER PAGE.\n\n\t\t$cols=count($tbl_heading)+1 ;\n\t\t$selectResult = $this->conn->sql($sql);\n\t\tif(($selectResult)>0)\n\t\t\t$count=mysql_num_rows($selectResult);\n \n\t\telse{\tdie(\"No Data Available\");\t}\n\t\t //print \"count is................\".$count;\n\t\t//variables to display the total number of pages .\n\t\tif(($count%$MAX_REC)==0)\n\t\t{\n\t\t\t$totalPages=($count/$MAX_REC);\n\t\t}\n\t\telse \n\t\t\tif(($count%$MAX_REC)!=0)\n\t\t\t{\n\t\t\t\t$totalPages=(int)($count/$MAX_REC)+1;\n\t\t\t}\n\n\n\t\t$page=(int)($start/$MAX_REC)+1;\n\n\t\t\n\n\t\t$batch_sql=$sql.\" LIMIT \".($start).\", \".$MAX_REC;\n\t\t\n\n\t\t$selectResult = $this->conn->sql($batch_sql) or die (\"Could not select data\");\n\n\t\t//the batched result set\t\t\t\t \t\n\t\t$this->resultset = $selectResult;\n\t\t\n\t\t\n\t\tif(mysql_num_rows($selectResult)>0)\n\t\t{\n\t\t\t\n\t\t\t$this->tmp_present=$start+1;\n\t\t\t\n\n\t\t\t//print \"<table cellspacing='1' cellpadding='2' border='0' width='100%'>\";\n\t\t\t\n\t\t\t//print \"<tr><td colspan='$cols' align='right'>Page $page of $totalPages</td></tr>\";\n\t\t\t\n\t\t\t\n\t\t\t$this->currentpage=$page;\n\t\t\t\n\t\t\t\n\t\t\t$this->noTotalpage=$totalPages;\n\t\t\t\n\n\t\t\t//if($tbl_main_head)\n\t\t\t//\tprint \"<tr><td colspan='$cols' class='$td_color' align=\\\"center\\\">$tbl_main_head</td><tr>\";\n\t\t\t/*print \"<tr>\";\n\t\t\tprint \"\t<td class='$td_color' aling='center'>Sno.</td>\";\n\t\t\tfor($i=0;$i<count($tbl_heading);$i++)\n\t\t\t\tprint \" <td class='$td_color' aling='center'>$tbl_heading[$i]</td>\";\n\t\t\tprint \"</tr>\";*/\n\t\t\t/*while($row=mysql_fetch_row($selectResult))\n\t\t\t{\n\t\t\t\tprint \"<tr>\";\n\t\t\t\tprint \"<td class='$bg_color'>\".$tmp_present++.\"</td>\";\n\t\t\t\tfor($j=0;$j<count($tbl_heading);$j++)\n\t\t\t\t\tprint \"<td class='$bg_color'>$row[$j]</td>\";\n\t\t\t\tprint \"</tr>\";\n\t\t\t}*/\n\t\t\t//print \"<tr>\";\n\t\t\t//print \"<td colspan='$cols' align='center' class='$bg_color'>\";\n\n\t\t\t\n\n\n\t\t\t\t//$page=(int)($start/$MAX_REC)+1;\n\t\t\t\t\n\t\t\t\tif($main!=0){\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$this->navigationbar .= \"<a href='$batch_page?$this->mainvar=\".($main-1).\"&$this->startvar=\".((($main-1)*$MAX_REC*$PER_PAGE)+($PER_PAGE-1)*$MAX_REC).\"&$this->countvar=\".$count.\"&$param'><font color='blue'>Previous</font></a>&nbsp;&nbsp;\";\t\n\t\t\t\t\t\n\t\t\t\t\tfor($i=(1+($main*$PER_PAGE));$i<(1+($main*$PER_PAGE))+$PER_PAGE;$i++){\n\t\t\t\t\t\n\t\t\t\t\t\tif($i==$page){\n\t\t\t\t\t\t\t$this->navigationbar .=\"<font color='red'><b>\".$i.\"</b></font>&nbsp;&nbsp;\";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tif($i<=$totalPages){\n\t\t\t\t\t\t\t\t$this->navigationbar .= \"<a href='$batch_page?$this->mainvar=\".$main.\"&$this->startvar=\".(($i*$MAX_REC)-$MAX_REC).\"&$this->countvar=\".$count.\"&$param'>\".$i.\"</a>&nbsp;&nbsp;\";\t\n\n\n\t\t\t\t\t\t\t\t/*if(($start==($count-$MAX_REC))){\n\t\t\t\t\t\t\t\t\t$i=$i+1;\n\t\t\t\t\t\t\t\t\tprint \"<a href='index.php?main=\".$main.\"&start=\".(($i*$MAX_REC)-$MAX_REC).\"&count=\".$count.\"'>\".$i.\"</a>&nbsp;&nbsp;\";\t\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\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t//end of if($i==$page)\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\t//end for\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t } //end if main\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tfor($i=(1+($main*3));$i<(1+($main*$PER_PAGE))+$PER_PAGE;$i++){\n\t\t\t\t\t \tif($i==$page){\n\t\t\t\t\t\t\t$this->navigationbar .= \"<font color='red'><b>\".$i.\"</b></font>&nbsp;&nbsp;\";\n\t\t\t\t\t\t\t//print $this->navigationbar;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\t\t\t\t\n\t\t\t\t\t\t\tif($i<=$totalPages){\n\t\t\t\t\t\t\t$this->navigationbar .= \"<a href='$batch_page?$this->mainvar=\".$main.\"&$this->startvar=\".(($i*$MAX_REC)-$MAX_REC).\"&$this->countvar=\".$count.\"&$param'>\".$i.\"</a>&nbsp;&nbsp;\";\t\n\n\t\t\t\t\t\t\t\t\t/*if($start==($count-$MAX_REC)){\n\t\t\t\t\t\t\t\t\t\t$i=$i+1;\n\t\t\t\t\t\t\t\t\t\tprint \"<a href='$batch_page?main=\".$main.\"&start=\".(($i*$MAX_REC)-$MAX_REC).\"&count=\".$count.\"&$param'>\".$i.\"</a>&nbsp;&nbsp;\";\t\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\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t//end of else ($i==$page)\n\n\t\t\t\t\t }\t\t\t\t\t\t\t\t\t//end for\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t} //end else\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(($i<=$totalPages)&&($count!=($start+$MAX_REC))){\n\t\t\t\t\t\t$main=$main+1;\n\t\t\t\t\t\t$this->navigationbar .= \"<a href='$batch_page?$this->mainvar=\".$main.\"&$this->startvar=\".(($i*$MAX_REC)-$MAX_REC).\"&$this->countvar=\".$count.\"&$param'><font color='blue'>Next</font></a>\";\t\t\n\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//print \"</td>\";\n\t\t\t//print \"</tr>\";\n\t\t\t//print \"</table>\";\n\t\t}\t\n\n\t}", "function pagenation($offset) {\r\n\r\n $this->offset = NULL;\r\n $this->arrayText = NULL;\r\n $this->pages = NULL;\r\n $this->offset = $offset;\r\n if ($this->countRecord) {\r\n $this->pages = intval($this->countRecord / $this->limit);\r\n }\r\n if ($this->countRecord % $this->limit) {\r\n $this->pages++;\r\n }\r\n $countRecordArray = count($this->arrayVariable);\r\n $offsetloop = 0;\r\n for ($loop_page = 1; $loop_page <= $this->pages; $loop_page++) {\r\n $string=\" <li><a href=\\\"javascript:void(0)\\\" \";\r\n if ($countRecordArray >= 1) {\r\n \r\n for ($k = 0; $k < $countRecordArray; $k++) {\r\n\r\n if ($this->arrayVariable[$k] == \"offset\") {\r\n $this->arrayVariableValue[$k] = $offsetloop;\r\n $ajaxOffset = $this->arrayVariableValue[$k];\r\n }\r\n $this->arrayText = $this->arrayVariable[$k] . \"=\" . $this->arrayVariableValue[$k] . \"&\" . $this->arrayText;\r\n }\r\n } else {\r\n $string.=\"Do play play la I know you want to hack it ?\";\r\n }\r\n $string.=$this->arrayText;\r\n $string.=\" onClick=\\\"ajaxQuery('\".basename($_SERVER['PHP_SELF']).\"','not',\".$ajaxOffset.\", '\".$this->arrayText.\"')\\\">\" . $loop_page . \"</a></li>\";\r\n $offsetloop = $offsetloop + $this->limit;\r\n }\r\n return $string;\r\n }", "public function paginglink($query,$records_per_page, $param=null, $file=null, $param_file=null) {\n\t// $file : e.g. 'search.php'\n\t// $param_file: e.g. 'user=dongocduc'\n\n $statement = $this->db->prepare($query);\n $statement->execute(array($param));\n\n $total_no_of_records = $statement->rowCount();\n\n if(isset($file)) {\n \t$first_part = $file;\n }\n else {\n \t$first_part = removeHTML($_SERVER['PHP_SELF']);\n }\n\n if(isset($param_file)) {\n \t$page_phr = '&page=';\n \t$self = $first_part.'?'.$param_file;\n }\n else {\n \t$page_phr = '?page=';\n \t$self = $first_part;\n }\n\n\n if($total_no_of_records > 0) {\n \t\t$total_no_of_pages = ceil($total_no_of_records/$records_per_page);\n $current_page = 1;\n if(isset($_GET[\"page\"])) {\n $current_page = $_GET[\"page\"];\n }\n \t\t?>\n\t\t\t\t<nav aria-label=\"Page navigation\" class=\"text-center\">\n\t\t\t\t <ul class=\"pagination\">\n\t\t\t\t \t<?php\n\t\t\t\t \tif($current_page != 1) {\n\t\t\t\t \t $previous = $current_page - 1;\n\t\t\t\t \t echo '<li class=\"page-item\">';\n\t\t\t\t \t}\n\t\t\t\t \telse {\n\t\t\t\t \t\t$previous = 1;\n\t\t\t\t \t\techo '<li class=\"page-item disabled\">';\n\t\t\t\t \t}\n\t\t\t\t \t?>\n\n\t\t\t\t <a class=\"page-link\" href='<?php echo $self.$page_phr.$previous; ?>' aria-label=\"Previous\">\n\t\t\t\t <span aria-hidden=\"true\">&laquo;</span>\n\t\t\t\t <span class=\"sr-only\">Previous</span>\n\t\t\t\t </a>\n\t\t\t\t </li>\n\t\t\t\t <?php\n for($i=1; $i<=$total_no_of_pages; $i++) {\n \tif($i==$current_page) {\n echo '<li class=\"page-item active\"><a class=\"page-link\" href=\"'.$self.$page_phr.$i.'\">'.$i.'</a></li>';\n \t}\n \t else {\n \t echo '<li class=\"page-item\"><a class=\"page-link\" href=\"'.$self.$page_phr.$i.'\">'.$i.'</a></li>';\n \t }\n \t\t\t}\n\t\t\t\t ?>\n\n\t\t\t\t <?php\n\t\t\t\t \tif($current_page != $total_no_of_pages) {\n\t\t\t\t \t $next = $current_page + 1;\n\t\t\t\t \t echo '<li class=\"page-item\">';\n\t\t\t\t \t}\n\t\t\t\t \telse {\n\t\t\t\t \t\t$next = $total_no_of_pages;\n\t\t\t\t \t\techo '<li class=\"page-item disabled\">';\n\t\t\t\t \t}\n\t\t\t\t \t?>\n\t\t\t\t <a class=\"page-link\" href='<?php echo $self.$page_phr.$next; ?>' aria-label=\"Next\">\n\t\t\t\t <span aria-hidden=\"true\">&raquo;</span>\n\t\t\t\t <span class=\"sr-only\">Next</span>\n\t\t\t\t </a>\n\t\t\t\t </li>\n\t\t\t\t </ul>\n\t\t\t\t</nav>\n \t\t<?php\n\n\n\n \t}\n\t}", "public function getPaginated();", "public function do_paging()\n {\n }", "public function generatePHPPaginator()\n {\n $sHTML = '';\n \n $iNumOfPages = ceil($this->iLength / $this->iNumOfPosAtPage);\n \n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=1\">&lt;</a></li>';\n \n for($i = 0;$i < $iNumOfPages;$i++)\n {\n if(($i + 1) == $this->iActualPage)\n {\n $sHTML .= '<li class=\"active\"><a href=\"?' . $this->sActualParams . '&p=' . $this->iActualPage . '\">' . ($i + 1) . '</a></li>';\n }\n else\n {\n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=' . ($i + 1) . '\">' . ($i + 1) . '</a></li>';\n }\n }\n \n $sHTML .= '<li><a href=\"?' . $this->sActualParams . '&p=' . $iNumOfPages . '\">&gt;</a></li>';\n \n $this->oTemplate->assign['paginator'] = $sHTML;\n $this->oTemplate->assign['scripts-path'] = SCRIPTS_PATH;\n \n return $this->oTemplate->parse(INCLUDES_PATH . 'paginator.html');\n }", "private function load_pagination($url, $total_rows, $show_rows, $offset, $cur_count, $sortby = null, $sortas = null){\r\n\t\t$full_url = $url.'?1=1';\r\n\t\tif($sortby) $full_url .= '&sortby='.$sortby;\r\n\t\tif($sortas) $full_url .= '&sortas='.$sortas;\r\n\t\t$page_data['links'] = self::get_pagination($full_url, $total_rows, $show_rows);\r\n\t\t$page_data['from_offset'] = $offset + 1;\r\n\t\t$page_data['to_offset'] = $offset + $cur_count;\r\n\t\t$page_data['total'] = $total_rows;\r\n\t\t$this->load->view('admin/pagination', $page_data);\r\n\t}", "function paginator($params, $count) {\n $limit = $params->getLimit();\n if ($count > $limit && $count!=0){\n $page = $params->getPage(); \n $controllerName = strtolower(Zend_Controller_Front::getInstance()->getRequest()->getControllerName()); \n $pagination = ($page != 1)?'<span><a href=\"\"onclick=\"Grid.page('.($page-1).'); return false\"><<</a></span>':''; \n if ($page > 10){ \n $pagination .= '<a href=\"\" onclick=\"Grid.page(1); return false;\">1</a>';\n $pagination .= '<span>...</span>';\n }\n $pageSpliter = ($page - 5 >= 1 ? $page - 4 : 1);\n for ($i = $pageSpliter; ($count + $limit) / ($i*$limit) > 1 && $i < $pageSpliter + 10; $i++) {\n $pagination .= '<a href=\"\" onclick=\"Grid.page('.$i.'); return false;\" class=\"'. ($page == $i ? \"active\":\"\") .'\">'.$i.'</a>';\n } \n $lastPage = floor(($count + $limit -1) / $limit);\n if ($page < $lastPage - 10){\n $pagination .= '<span>...</span>'; \n $pagination .= '<a href=\"\" onclick=\"Grid.page('. $lastPage .'); return false;\">'.$lastPage .'</a>';\n }\n $pagination .= ($page < ($count/$limit))?'<span><a href=\"\"onclick=\"Grid.page('.($page+1).'); return false\">>></a></span>':''; \n echo '<div class=\"pagination\">'; \n echo $pagination; \n echo '</div>';\n } \n }", "public static function findAll($fields = \"*\", $currentPage = 1, $rowNum = 2, array $sort = array(), array $where = array()) {\r\n\t\t\r\n\t\t$module = Zend_Controller_Front::getInstance ()->getRequest ()->getModuleName ();\r\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\r\n\t\t\r\n\t\t// Defining the url sort\r\n\t\t$uri = isset ( $sort [1] ) ? \"/sort/$sort[1]\" : \"\";\r\n\t\t$dq = Doctrine_Query::create ()->select ( $fields )->from ( 'Wiki w' )->leftJoin ( 'w.WikiCategories wc' );\r\n\t\t\r\n\t\t$pagerLayout = new Doctrine_Pager_Layout ( new Doctrine_Pager ( $dq, $currentPage, $rowNum ), new Doctrine_Pager_Range_Sliding ( array ('chunk' => 10 ) ), \"/$module/$controller/list/page/{%page_number}\" . $uri );\r\n\t\t\r\n\t\t// Get the pager object\r\n\t\t$pager = $pagerLayout->getPager ();\r\n\t\t\r\n\t\t// Set the Order criteria\r\n\t\tif (isset ( $sort [0] )) {\r\n\t\t\t$pager->getQuery ()->orderBy ( $sort [0] );\r\n\t\t}\r\n\t\t\r\n\t\tif (isset ( $where ) && is_array ( $where )) {\r\n\t\t\tforeach ( $where as $filters ) {\r\n\t\t\t\tif (isset ( $filters [0] ) && is_array($filters [0])) {\r\n\t\t\t\t\tforeach ( $filters as $filter ) {\r\n\t\t\t\t\t\t$method = $filter ['method'];\r\n\t\t\t\t\t\t$value = $filter ['value'];\r\n\t\t\t\t\t\t$criteria = $filter ['criteria'];\r\n\t\t\t\t\t\t$pager->getQuery ()->$method ( $criteria, $value );\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$method = $filters ['method'];\r\n\t\t\t\t\t$value = $filters ['value'];\r\n\t\t\t\t\t$criteria = $filters ['criteria'];\r\n\t\t\t\t\t$pager->getQuery ()->$method ( $criteria, $value );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$pagerLayout->setTemplate ( '<a href=\"{%url}\">{%page}</a> ' );\r\n\t\t$pagerLayout->setSelectedTemplate ( '<a class=\"active\" href=\"{%url}\">{%page}</a> ' );\r\n\t\t\r\n\t\t$records = $pagerLayout->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\t\t$pagination = $pagerLayout->display ( null, true );\r\n\t\treturn array ('records' => $records, 'pagination' => $pagination, 'pager' => $pager, 'recordcount' => $dq->count () );\r\n\t}", "public function paginate($no = 10, $columns = ['*']);", "function createPagingCustom($table,$cond=\"\",$nik=\"\") {\n\n\t\tglobal $db, $start, $num, $pageFrom, $pageNum, $query, $field;\n\n\t\tif (strlen($cond)) $condString= \"WHERE \".$cond;\n\n\t\t$strSQL\t\t= \"SELECT * from $table $condString \";\n\t\t$result\t\t= $db->Execute($strSQL);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$totalData\t= $result->RecordCount();\n\n\t\t$totalPage\t= ceil($totalData/$num);\n\t\t$sisa\t\t= $totalPage - $pageFrom;\n\n\t\tif ( $sisa < $pageNum ) $pageTo = $pageFrom + $sisa; else $pageTo = $pageFrom + $pageNum;\n\n\t\tif ( ($pageFrom - $pageNum) < 0 ) $pageBefore = 0; else $pageBefore = $pageFrom - $pageNum;\n\t\tif ( ($pageFrom + $pageNum) > ($totalPage - $pageNum) ) $pageNext = $totalPage - $pageNum; else $pageNext = $pageFrom + $pageNum;\n\t\tif ( $pageNext < 0 ) $pageNext = 0;\n\n\t\tif ( ($totalPage-$pageNum)<0 ) $pageLast = 0; else $pageLast = $totalPage-$pageNum;\n\n\t\tfor ($i=$pageFrom; $i<$pageTo; ++$i) {\n\t\t\t$page_i = $i + 1;\n\t\t\t$next_i = $i * $num;\n\t\t\tif ($next_i == $start) {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field><b>$page_i</b></a> \";\n\t\t\t} else {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>$page_i</a> \";\n\t\t\t}\n\t\t}\n\n\t\t$final =\t\"<a \t\thref=$PHP_SELF?act=list&start=0&num=$num&pageFrom=0&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>awal</a>\".\n\t\t\" | <a href=$PHP_SELF?act=list&start=\".($pageBefore*$num).\"&num=$num&pageFrom=$pageBefore&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field><<</a> \".\n\t\t$page.\n\t\t\" <a href=$PHP_SELF?act=list&start=\".($pageNext*$num).\"&num=$num&pageFrom=$pageNext&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>>></a> | \".\n\t\t\"<a href=$PHP_SELF?act=list&start=\".(($totalPage-1)*$num).\"&num=$num&pageFrom=\".$pageLast.\"&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>akhir</a>\";\n\n\t\treturn $final;\n\t}", "private function paginate()\n\t{\n\t\tif ($this->_listModel) {\n\t\t\t$this->_listModel->loadNextPage();\n\t\t}\n\t}", "public function makeSQL( $type ) {\n $this->pager->setTotal( $this->count() );\n $this->pager->setQuery( $this );\n return parent::makeSQL( $type );\n }", "function getPagingInfo($sql,$input_arguments=null);", "public function paginate(int $perPage = 15);", "#[Pure] public function generatePagination(): string\n {\n return $this->dbc->generatePagination($this->pageSize, $this->pageNumber);\n }", "public function paginate($perPage = null, $columns = ['*']);", "function select($qy,$page,$per_page,$totallink,$dpaging=0,$withpagging = 1,$extrapara='',$paggingtype='get',$paggingfunction='',$paggingvar='page')\n\t{\n\t\t$rs=mysql_query($qy) or die(mysql_error().\"<br>\".$qy);\n\t\t$num_rows = mysql_num_rows($rs);\n\t\t$this->totalrows=$num_rows;\n\t\t$iarry[0]=$num_rows;\n\t\t$page = $page;\n\n\t\t$prev_page = $page - 1; \n\t\t$next_page = $page + 1;\n\t\t$page_start = ($per_page * $page) - $per_page;\n\t\t$pageend=0;\n\t\t\n\t\tif ($num_rows <= $per_page) { \n\t\t\t$num_pages = 1; \n\t\t} else if (($num_rows % $per_page) == 0) { \n\t\t\t$num_pages = ($num_rows / $per_page); \n\t\t} else { \n\t\t\t$num_pages = ($num_rows / $per_page) + 1; \n\t\t} \n\t\t$num_pages = (int) $num_pages; \n\t\tif (($page > $num_pages) || ($page < 0))\n\t\t{ \n\t\t\t//echo (\"You have specified an invalid page number\"); \n\t\t}\n\t\t\n\t\tif($num_rows>0)\n\t\t{\n\t\t\t$pagestart=0;\n\t\t\t$pageend=0;\n\t\t\t$pagestart = (($page-1) * $per_page)+1;\n\t\t\tif($num_pages == $page)\n\t\t\t{\n\t\t\t\t$pageend = $num_rows;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pageend = $pagestart + ($per_page - 1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Instantiate the paging class! */ \n\t $this->Paging = new PagedResults(); \n\t\n\t /* This is required in order for the whole thing to work! */ \n\t $this->Paging->TotalResults = $num_pages; \n\t\n\t /* If you want to change options, do so like this INSTEAD of changing them directly in the class! */ \n\t $this->Paging->ResultsPerPage = $per_page; \n\t $this->Paging->LinksPerPage = $totallink; \n\t $this->Paging->PageVarName = $paggingvar;\n\t $this->Paging->TotalResults = $num_rows; \n\t if($paggingtype!=\"get\")\n\t {\n\t\t \t$this->Paging->PagePaggingType=\"post\";\n\t }\n\t\n\t /* Get our array of valuable paging information! */ \n\t $this->InfoArray = $this->Paging->InfoArray(); \n\t \n\t $qy1=$qy.\" LIMIT $page_start, $per_page \";\n\t $rowrs=mysql_query($qy1) or die(mysql_error().\"<br>\".$qy1);\n\t \n\t if($withpagging==1)\n\t {\n\t\t if($paggingtype==\"get\")\n\t\t {\n\t\t\t if($dpaging==1 || $dpaging==2)\n\t\t\t {\n\t\t\t\t if (count($this->InfoArray[\"PAGE_NUMBERS\"])>1)\n\t\t\t\t {\n\t\t\t\t\t\t/* Print our first link */ \n\t\t\t\t\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) \n\t\t\t\t\t { \n\t\t\t\t\t\t echo \"<a href='$PHP_SELF?\".$this->Paging->PageVarName.\"=1\".$extrapara.\"'>First</a> | &nbsp;&nbsp;\"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \"&lt;&lt;&nbsp;&nbsp;&nbsp;\"; \n\t\t\t\t\t }\n\t\t\t\t\t/* Print out our next link */ \n\t\t\t\t\t if($this->InfoArray[\"NEXT_PAGE\"]) { \n\t\t\t\t\t\t echo \" <a href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\".$this->InfoArray[\"NEXT_PAGE\"].$extrapara.\"'>Next</a>&nbsp;&nbsp;\"; \n\t\t\t\t\t } else { \n\t\t\t\t\t\t echo \" Next&nbsp;&nbsp;\"; \n\t\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t\tif($dpaging==2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t /* Example of how to print our number links! */ \n\t\t\t\t\t\t for($i=0; $i<count($this->InfoArray[\"PAGE_NUMBERS\"]); $i++) \n\t\t\t\t\t\t { \n\t\t\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"] == $this->InfoArray[\"PAGE_NUMBERS\"][$i])\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t echo $this->InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \"; \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t echo \"<a href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].$extrapara.\"'>\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\"</a> | \"; \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 /* Print out our prev link */ \n\t\t\t\t\t if($this->InfoArray[\"PREV_PAGE\"]) \n\t\t\t\t\t { \n\t\t\t\t\t\t echo \"<a href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\".$this->InfoArray[\"PREV_PAGE\"].$extrapara.\"'>Previous</a> | &nbsp;&nbsp;\"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t echo \"Previous | &nbsp;&nbsp;\"; \n\t\t\t\t\t } \n\t\t\t\t\t /* Print our last link */ \n\t\t\t\t\t if($InfoArray[\"CURRENT_PAGE\"]!= $this->InfoArray[\"TOTAL_PAGES\"])\n\t\t\t\t\t { \n\t\t\t\t\t\t echo \" <a href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\" . $this->InfoArray[\"TOTAL_PAGES\"].$extrapara.\"'>Last</a>\"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \" &gt;&gt;\"; \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\telse\n\t\t\t{\n\t\t\t\tif($dpaging==1 || $dpaging==2)\n\t\t\t\t{\n\t\t\t\t if (count($this->InfoArray[\"PAGE_NUMBERS\"])>1)\n\t\t\t\t {\n\t\t\t\t\t\t/* Print our first link */ \n\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"]!= 1) \n\t\t\t\t\t { \n\t\t\t\t\t\t echo \"<a href='javascript:\".$paggingfunction.\"(1);'>First</a>&nbsp;&nbsp;\"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \"&lt;&lt;&nbsp;&nbsp;&nbsp;\"; \n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t /* Print out our prev link */ \n\t\t\t\t\t if($InfoArray[\"PREV_PAGE\"]) \n\t\t\t\t\t { \n\t\t\t\t\t\t echo \"<a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"PREV_PAGE\"].\");'><img src='images/bt_previous.gif' border='0' /></a> | &nbsp;&nbsp;\"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t // echo \"Previous | &nbsp;&nbsp;\"; \n\t\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t\tif($dpaging==2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t /* Example of how to print our number links! */ \n\t\t\t\t\t\t for($i=0; $i<count($this->InfoArray[\"PAGE_NUMBERS\"]); $i++) \n\t\t\t\t\t\t { \n\t\t\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"] == $this->InfoArray[\"PAGE_NUMBERS\"][$i])\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t echo $this->InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \"; \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t echo \"<a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\");'>\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\"</a> | \"; \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 /* Print out our next link */ \n\t\t\t\t\t if($InfoArray[\"NEXT_PAGE\"]) { \n\t\t\t\t\t\t echo \" <a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"NEXT_PAGE\"].\");'><img src='images/bt_next.gif' border='0' /></a>&nbsp;&nbsp;\"; \n\t\t\t\t\t } else { \n\t\t\t\t\t\t //echo \" Next&nbsp;&nbsp;\"; \n\t\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t /* Print our last link */ \n\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"]!= $this->InfoArray[\"TOTAL_PAGES\"])\n\t\t\t\t\t { \n\t\t\t\t\t\t echo \" <a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"NEXT_PAGE\"].\");'>Last</a>\"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \" &gt;&gt;\"; \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}\n\t\t$page_start = ($per_page * $page) - $per_page;\n\t\t$iarry[1]=$rowrs;\n\t\t$iarry[2]=$page_start+1;\n\t\t$iarry[3]=$pageend;\n\t\treturn $iarry;\t\t\t\n\t}", "protected function paginate()\n {\n if ($this->currentItem == $this->pagerfanta->getMaxPerPage() and $this->pagerfanta->hasNextPage()) {\n $this->pagerfanta->setCurrentPage($this->pagerfanta->getNextPage());\n $this->loadData();\n }\n }", "function pagenationv2($offset) {\r\n $this->offset = NULL;\r\n $this->arrayText = NULL;\r\n $this->pages = NULL;\r\n $this->offset = $offset;\r\n \r\n $temp = $offset;\r\n if ($this->countRecord) {\r\n $this->pages = intval($this->countRecord / $this->limit);\r\n }\r\n if ($this->countRecord % $this->limit) {\r\n $this->pages++;\r\n }\r\n $countRecordArray = count($this->arrayVariable);\r\n $offsetloop = 0;\r\n for ($loop_page = 1; $loop_page <= $this->pages; $loop_page++) {\r\n \r\n if ($countRecordArray >= 1) {\r\n \r\n for ($k = 0; $k < $countRecordArray; $k++) {\r\n $string.=\"<li \";\r\n if($temp==$offsetloop) {\r\n $string.=\" class=active \";\r\n }\r\n $string.=\"><a href=\\\"javascript:void(0)\\\" \"; \r\n if ($this->arrayVariable[$k] == \"offset\") {\r\n $this->arrayVariableValue[$k] = $offsetloop;\r\n \r\n }\r\n $this->arrayText = $this->arrayVariable[$k] . \"=\" . $this->arrayVariableValue[$k] . \"&\" . $this->arrayText;\r\n $string.=\" onClick=\\\"ajaxQuery('\".basename($_SERVER['PHP_SELF']).\"','not',\".$offsetloop.\", '\".$this->arrayText.\"')\\\">\" . $loop_page . \"</a></li>\";\r\n\r\n \r\n }\r\n } else {\r\n $string.=\"Do play play la I know you want to hack it ?\";\r\n }\r\n \r\n $offsetloop = $offsetloop + $this->limit;\r\n \r\n }\r\n return $string;\r\n \r\n }", "public function getPaginationHtml();", "function render_table_nav( $position, $all_count, $filtered_count, $my_count, $limit, $paged ) {\n\t\t\t$total_pages = ceil($filtered_count / $limit);\n\t\t\t\n\t\t\t$first_page = $this->current_request_with_params( \n\t\t\t\tarray('paged' => 1 ) );\n\n\t\t\t$prev_page = $first_page;\n\t\t\tif ($paged > 1) {\n\t\t\t\t$prev_page = $this->current_request_with_params( \n\t\t\t\t\tarray('paged' => $paged - 1 ) );\n\t\t\t}\n\t\t\t$last_page = $this->current_request_with_params( \n\t\t\t\tarray('paged' => $total_pages ) );\n\t\t\t$next_page = $last_page;\n\t\t\tif ($paged < $total_pages) {\n\t\t\t\t$next_page = $this->current_request_with_params( \n\t\t\t\t\tarray('paged' => $paged + 1 ) );\n\t\t\t}\n\n?>\n\t\t\t<div class=\"tablenav <?php echo $position; ?>\">\n\t\t\t\t<div class=\"tablenav-pages\">\n\t\t\t\t\t<span class=\"displaying-num\"><?php echo $filtered_count; ?> items</span>\n\t\t\t\t\t<span class=\"pagination-links\">\n\t\t\t\t\t\t<a class=\"first-page\" title=\"Go to the first page\" href=\"<?php echo $first_page; ?>\">&laquo;</a>\n\t\t\t\t\t\t<a class=\"prev-page\" title=\"Go to the previous page\" href=\"<?php echo $prev_page?>\">&lsaquo;</a>\n\t\t\t\t\t\t <span class='current-pages'>\n\t\t\t\t\t\t <?php echo $paged; ?>\n\t\t\t\t\t\t</span>\t\n\t\t\t\t\t\t of <span class='total-pages'>\n\t\t\t\t\t\t <?php echo $total_pages; ?> </span>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<a class=\"next-page\" title=\"Go to the next page\" href=\"<?php echo $next_page; ?>\">&rsaquo;</a>\n\t\t\t\t\t\t<a class=\"last-page\" title=\"Go to the last page\" href=\"<?php echo $last_page; ?>\">&raquo;</a>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<br class=\"clear\"/>\n\t\t\t</div>\t\t\t\n<?php\n\t}", "private function getPaginatorType1($current_page = 0, $total_pages = 2, $conditions = \"\", $condition_encode = false){\n \t\t\t\t$cuppa = Cuppa::getInstance();\n $language = $cuppa->language->load();\n if($total_pages <= 1) return \"\";\n \t\t\t\t$field = \"<div class='paginator'>\";\n \t\t\t\t\t$field .= \"<ul>\";\n \t\t\t\t\t\tif($current_page > 0) $field .= \"<li><a onclick='\".$this->function_name.\"(0, \\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='First page' class='paging_far_left'></div></a></li>\";\n \t\t\t\t\t\tif($current_page > 0) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($current_page-1).\", \\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Prev page' class='paging_left'></div></a></li>\";\n \t\t\t\t\t\tif($this->pages_info) $field .= \"<li><div title='' class='current_page'>\".$cuppa->language->getValue(\"Page\",$language).\" <b>\".(@$current_page+1).\"</b> / $total_pages</div></li>\";\n \t\t\t\t\t\tif($current_page < $total_pages-1) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($current_page+1).\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Next page' class='paging_right'></div></a></li>\";\n \t\t\t\t\t\tif($current_page < $total_pages-1) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($total_pages-1).\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Last page' class='paging_far_right'></div></a></li>\";\n \t\t\t\t\t\t$field .= \"<li><div class='select_page_div'>\".$this->getPagesList($current_page, $total_pages).\"</div></li>\";\n \t\t\t\t\t$field .= \"</ul>\"; \n \t\t\t\t\t$field .= \"<input type='hidden' value='\".$current_page.\"' id='page' name='page' />\";\n $field .= \"<input type='hidden' value='' id='page_item_start' name='page_item_start' />\";\n if($condition_encode) $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.base64_encode($conditions).'\"/>';\n else $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.$conditions.'\"/>';\n \t\t\t\t$field .= \"</div>\";\n \t\t\t\treturn $field;\n \t\t\t}", "function render_block_core_query_pagination($attributes, $content)\n {\n }", "function startResult(& $result) \n {\n $start = ($result->pageNumber - 1) * $result->resultsPerPage;\n $end = $start + $result->numRows();\n $start ++;\n $row = $this->_headTemplate;\n $row = str_replace('{results}', $start.'-'.$end, $row);\n $row = str_replace('{total}', $result->results, $row);\n $this->_html .= $row;\n $this->_query = $result->getInfo('query');\n }", "public function paginate($limit, array $params = null);", "function pagination($table,$baseUrl,$current){\n\t\t$CI = get_instance();\n\n\n\n\t\t$totalData\t \t\t= $CI->Tablesmodel->countOne($table,array());\n\t\t$fetch\t \t\t\t= FETCH;\n\t\t$threshold\t\t\t= 3;\n\t\t$last\t\t\t\t= ceil($totalData / $fetch);\n\n\n\t\t$start\t\t\t\t= ($current-$threshold >= $threshold?$current-$threshold:1);\n\t\t$end\t\t\t\t= ($current+$threshold >= $last?$last:$current+$threshold);\n\t\t//debug(ceil($pagination / $fetch));\n\t\t$list \t\t\t\t= \"\n\t\t\t\t\t<ul class='pagination'>\n\t\t\t\t\t\t<a href='$baseUrl?pagination=1'><li>First</li></a>\n\t\t\";\n\t\tfor($i=$start;$i<=$end;$i++){\n\t\t\t$href \t\t= ($i==$current?\"\":\"href='$baseUrl?pagination=$i'\");\n\t\t\t$active \t\t= ($i==$current?\"active\":\"\");\n\n\n\t\t\t$list\t.= \"<a $href class='$active'><li>$i</li></a>\";\n\t\t}\n\n\t\t$list\t\t\t\t.= \"<a href='$baseUrl?pagination=$last'><li>Last</li></a>\t\t</ul>\";\n\t\treturn $list;\n\t}", "public function getPerPage();", "function paginator($data = [], $row_counts, $items_per_page = 10, $current_page = 1){\n\n\t$paginationCtrls = '';\n\n\t$last_page = ceil($row_counts/$items_per_page);\n\t$last_page = ($last_page < 1) ? 1 : $last_page;\n\n\t$current_page = preg_replace('/[^0-9]/', '', $current_page);\n\tif ( $current_page < 1 ) {\n\t\t$current_page = 1;\n\t}elseif ( $current_page > $last_page ) {\n\t\t$current_page = $last_page;\n\t}\n\t$limit_from = ($current_page - 1) * $items_per_page;\n\t$limit_to = $items_per_page;\n\n\t$result = array_slice($data, $limit_from, $limit_to);\n\n\t// Start first if\n\tif ( $last_page != 1 )\n\t{\n\t\t// Start second if\n\t\tif ( $current_page > 1 )\n\t\t{\n\t\t\t$previous = $current_page -1;\n\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF']. '?page='. $previous .'\">Previous</a> &nbsp;&nbsp;';\n\n\t\t\tfor($i=$current_page-4; $i < $current_page; $i++){\n\t\t\t\n\t\t\t\tif( $i > 0 ){\n\t\t\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$i. '\">'.$i.'</a> &nbsp;&nbsp; ';\n\t\t\t\t}\n\t\t\t}\n\t\t} // End second if\n\n\t\t$paginationCtrls .= ''.$current_page. ' &nbsp; ';\n\n\t\t\n\t\tfor($i=$current_page+1; $i <= $last_page ; $i++){\n\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$i. '\">'.$i.'</a> &nbsp;&nbsp; ';\n\t\t\t\n\t\t\tif( $i >= $current_page+4 ){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\n\n\t\tif( $current_page != $last_page ){\n\n\t\t\t$next = $current_page + 1;\n\t\t\t$paginationCtrls .= '&nbsp;&nbsp; <a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$next. '\">Next</a> &nbsp;&nbsp; ';\n\t\t}\n\t}\n\t// End first if\n\n\t// dd( ['last page => '.$last_page, 'current page => '.$current_page, 'limit => '.$limit_from] );\n\n\treturn ['result' => $result, 'links' => $paginationCtrls];\n}", "function paginate_list($obj, $data, $query_code, $variable_array=array(), $rows_per_page=NUM_OF_ROWS_PER_PAGE)\n{\n\t#determine the page to show\n\tif(!empty($data['p'])){\n\t\t$data['current_list_page'] = $data['p'];\n\t} else {\n\t\t#If it is an array of results\n\t\tif(is_array($query_code))\n\t\t{\n\t\t\t$obj->session->set_userdata('search_total_results', count($query_code));\n\t\t}\n\t\t#If it is a real query\n\t\telse\n\t\t{\n\t\t\tif(empty($variable_array['limittext']))\n\t\t\t{\n\t\t\t\t$variable_array['limittext'] = '';\n\t\t\t}\n\t\t\t\n\t\t\t#echo $obj->Query_reader->get_query_by_code($query_code, $variable_array );\n\t\t\t#exit($query_code);\n\t\t\t$list_result = $obj->db->query($obj->Query_reader->get_query_by_code($query_code, $variable_array ));\n\t\t\t$obj->session->set_userdata('search_total_results', $list_result->num_rows());\n\t\t}\n\t\t\n\t\t$data['current_list_page'] = 1;\n\t}\n\t\n\t$data['rows_per_page'] = $rows_per_page;\n\t$start = ($data['current_list_page']-1)*$rows_per_page;\n\t\n\t#If it is an array of results\n\tif(is_array($query_code))\n\t{\n\t\t$data['page_list'] = array_slice($query_code, $start, $rows_per_page);\n\t}\n\telse\n\t{\n\t\t$limittxt = \" LIMIT \".$start.\" , \".$rows_per_page;\n\t\t$list_result = $obj->db->query($obj->Query_reader->get_query_by_code($query_code, array_merge($variable_array, array('limittext'=>$limittxt)) ));\n\t\t$data['page_list'] = $list_result->result_array();\n\t}\n\t\n\treturn $data;\n}", "function paginationLinks($perpage,$thisPage,$database,$searchThrough,$orderBy,$direction) {\n\t\n\t\t$useUrl = \"{$GLOBALS[\"fullSiteUrl\"]}?page=\";\n\t\t\n\t\t// Total entries per page\n\t\t$pagination = $perpage;\n\t\t\n\t\t// set absolute value of 0\n\t\t$zero = abs(\"0\");\n\n\t\t// Get the current page\n\t\t$page = abs($thisPage);\n\t\tif ($page != \"\") {\n\t\t\t$startat = $page * $pagination;\n\t\t} else {\n\t\t\t$startat = 0;\n\t\t}\n\t\t\n\t\tif ($page == \"0\") {\n\t\t\t$current_page = \"1\";\n\t\t} else {\n\t\t\t$current_page = $page;\n\t\t}\n\n\t\t// Initial count/setup\n\t\t$setupsql = \"select * from `{$database}`{$searchThrough}\";\n\n\t\t$load = mq($setupsql);\n\t\t$count = num($load);\n\t\t$addpages = $count / $pagination;\n\t\t$totalpages = round(floor($addpages));\n\t\t\n\t\t// Display the FIRST button\n\t\tif ($current_page != \"1\") {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$first = '<a href=\"'.$useUrl.'1\">&lsaquo; First</a>';\n\t\t}\n\t\t// Display the PREVIOUS button\n\t\tif ($page > $zero && $current_page != \"1\") {\n\t\t\t$pre_current = $page;\n\t\t\t$previouspage = $pre_current - 1;\n\t\t\t$previous = '&nbsp;<a href=\"'.$useUrl.$previouspage.'\">&lt;</a>&nbsp;';\n\t\t}\n\t\t// Display list of pages\n\t\t$c=1;\n\t\t$start = $current_page - 2;\n\t\t$end = 1;\n\t\twhile ($c <= $totalpages) {\n\t\t\tif ($c >= $start && $end <= \"5\") {\n\t\t\t\tif ($c != $totalpages) { $space = \"&nbsp;\"; } else { $space = \"\"; }\n\t\t\t\tif ($c == $page) { $currentpage = ' class=\"active\"'; } else { $currentpage = \"\"; }\n\t\t\t\t$listpages .= '&nbsp;<a href=\"'.$useUrl.$c.'\"'.$currentpage.'>'.$c.'</a>'.$space;\n\t\t\t\t++$end;\n\t\t\t}\n\t\t\t++$c;\n\t\t}\n\t\t// TOTAL PAGES\n\t\tif ($c != \"1\") {\n\t\t\t$total_pages = $c - 1;\n\t\t\t$s = \"s\";\n\t\t} else {\n\t\t\t$total_pages = $c;\n\t\t\t$s = \"\";\n\t\t}\n\t\t// Display the LAST button\n\t\tif ($current_page != $total_pages) {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$last = \"&nbsp;<a href='{$useUrl}{$totalpages}'> Last &rsaquo;</a>\";\n\t\t}\n\t\t// Display the NEXT button\n\t\tif (($page < $totalpages) && ($totalpages > 0) && ($current_page != $total_pages)) {\n\t\t\t$next_current = $page;\n\t\t\t$nextpage = $next_current + 1;\t\n\t\t\t$next = '&nbsp;<a href=\"'.$useUrl.$nextpage.'\">&gt;</a>';\n\t\t}\n\t\t\n\t\t// Page '.$current_page.' of '.$total_pages.' pages '.$pagination_links.'\n\t\treturn \"<p>Page {$current_page} of {$total_pages} page{$s} &nbsp;&nbsp;{$first} {$previous} {$listpages} {$next} {$last}</p>\";\n\n\t}", "function results_are_paged()\n {\n }", "function getPaging($refUrl, $aryOpts, $pgCnt, $curPg) {\n $return = '';\n $return.='<div class=\"box-bottom\"><div class=\"paginate\">';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">First</a>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Prev</a>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"';\n if ($curPg == $i)\n $return.='active';\n $return.='\" >' . $i . '</a>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Next</a>';\n $aryOpts['pg'] = $pgCnt;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Last</a>';\n }\n $return.='<div class=\"clearfix\"></div></div></div>';\n return $return;\n}", "function Pagination() \n { \n $this->current_page = 1; \n $this->mid_range = 7; \n $this->items_per_page = (!empty($_GET['ipp'])) ? $_GET['ipp']:$this->default_ipp; \n }", "private function getPaginatorType2($current_page = 0, $total_pages = 1, $conditions = \"\", $condition_encode = false){\n $cuppa = Cuppa::getInstance();\n $language = $cuppa->language->load();\n if($total_pages == 1) return \"\";\n $field = \"<div class='paginator'>\";\n //++ Page info\n if($this->pages_info)\n $field .= \"<div class='page_numbers'>\".$cuppa->language->getValue(\"Page\",$language).\" \".($current_page+1).\" \".$cuppa->language->getValue(\"of\",$language).\" \".$total_pages.\"</div>\";\n //--\n //++ Pages\n $field .= \"<div class='pages'>\";\n //++ Firs page\n if($current_page != 0)\n $field .= \"<a class='first_page' onclick='\".$this->function_name.\"(0,\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")' ><span>\".$cuppa->language->getValue(\"First\",$language).\"</span></a>\";\n //--\n //++ add apges\n $j = 0;\n for($i = $current_page - $this->max_numbers; $i < $total_pages; $i++){\n if($i < 0) $i = 0;\n if($i > $current_page + $this->max_numbers) break;\n if($j > 0) $field .= \"<div class='separator'></div>\"; \n if($i == $current_page)\n $field .= \"<a class='page_item selected'><span>\".($i+1).\"</span></a>\";\n else \n $field .= \"<a class='page_item' onclick='\".$this->function_name.\"(\".$i.\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")' ><span>\".($i+1).\"</span></a>\";\n $j++;\n }\n //--\n //++ Last page\n if($current_page+1 != $total_pages)\n $field .= \"<a class='last_page' onclick='\".$this->function_name.\"(\".($total_pages-1).\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")' ><span>\".$cuppa->language->getValue(\"Last\",$language).\"</span></a>\";\n //--\n $field .= \"</div>\";\n //-- Pages\n $field .= \"</div>\";\n $field .= \"<input type='hidden' value='\".$current_page.\"' id='page' name='page' />\";\n $field .= \"<input type='hidden' value='' id='page_item_start' name='page_item_start' />\";\n if($condition_encode) $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.base64_encode($conditions).'\"/>';\n else $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.$conditions.'\"/>';\n return $field;\n }", "function paging($tablename, $where, $orderby, $url, $PageNo, $PageSize, $Pagenumber, $ModePaging) {\n if ($PageNo == \"\") {\n $StartRow = 0;\n $PageNo = 1;\n }\n else {\n $StartRow = ($PageNo - 1) * $PageSize;\n }\n if ($PageSize < 1 || $PageSize > 1000) {\n $PageSize = 15;\n }\n if ($PageNo % $Pagenumber == 0) {\n $CounterStart = $PageNo - ($Pagenumber - 1);\n }\n else {\n $CounterStart = $PageNo - ($PageNo % $Pagenumber) + 1;\n }\n $CounterEnd = $CounterStart + $Pagenumber;\n $sql = \"SELECT COUNT(id) FROM \" . $tablename . \" where \" . $where;\n $result_c = $this->doSQL($sql);\n $row = mysql_fetch_array($result_c);\n $RecordCount = $row[0];\n $result = $this->getDynamic($tablename, $where, $orderby . \" LIMIT \" . $StartRow . \",\" . $PageSize);\n if ($RecordCount % $PageSize == 0)\n $MaxPage = $RecordCount / $PageSize;\n else\n $MaxPage = ceil($RecordCount / $PageSize);\n $gotopage = \"\";\n switch ($ModePaging) {\n case \"Full\" :\n $gotopage = '<div class=\"paging_meneame\">';\n if ($MaxPage > 1) {\n if ($PageNo != 1) {\n $PrevStart = $PageNo - 1;\n $gotopage .= ' <a href=\"' . $url . '&PageNo=1\" tile=\"First page\"> &laquo; </a>';\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $PrevStart . '\" title=\"Previous page\"> &lsaquo; </a>';\n }\n else {\n $gotopage .= ' <span class=\"paging_disabled\"> &laquo; </span>';\n $gotopage .= ' <span class=\"paging_disabled\"> &lsaquo; </span>';\n }\n $c = 0;\n for ($c = $CounterStart; $c < $CounterEnd;++$c) {\n if ($c <= $MaxPage)\n if ($c == $PageNo)\n $gotopage .= '<span class=\"paging_current\"> ' . $c . ' </span>';\n else\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $c . '\" title=\"Page ' . $c . '\"> ' . $c . ' </a>';\n }\n if ($PageNo < $MaxPage) {\n $NextPage = $PageNo + 1;\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $NextPage . '\" title=\"Next page\"> &rsaquo; </a>';\n }\n else {\n $gotopage .= ' <span class=\"paging_disabled\"> &rsaquo; </span>';\n }\n if ($PageNo < $MaxPage)\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $MaxPage . '\" title=\"Last page\"> &raquo; </a>';\n else\n $gotopage .= ' <span class=\"paging_disabled\"> &raquo; </span>';\n }\n $gotopage .= ' </div>';\n break;\n }\n $arr[0] = $result;\n $arr[1] = $gotopage;\n $arr[2] = $tablename;\n return $arr;\n }", "public function fetchAllPaginated( $paginated = false )\n {\n if($paginated) {\n $sql = new Sql( $this->tableGateway->adapter );\n $select = $sql->select();\n $select->from('forum');\n $select->columns(array('forum_id', 'date','title','active'));\n $select->order( 'forum_id desc' );\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Forum());\n $paginatorAdapter = new DbSelect(\n $select,\n $this->tableGateway->getAdapter(),\n $resultSetPrototype\n );\n $paginator = new Paginator($paginatorAdapter);\n //have to rewrite here\n //$paginator->setCurrentPageNumber( $pageNo );\n $paginator->setItemCountPerPage(10);\n $paginator->setPageRange(5);\n return $paginator;\n }\n $resultSet = $this->tableGateway->select();\n return $resultSet;\n }", "public function getPaginate()\n {\n /* Clone the original builder */\n $builder = clone $this->_builder;\n $totalBuilder = clone $builder;\n\n $limit = $this->_limitRows;\n $numberPage = $this->_page;\n\n if (is_null($numberPage) === true) {\n $numberPage = 1;\n }\n\n $prevNumberPage = $numberPage - 1;\n $number = $limit * $prevNumberPage;\n\n //Set the limit clause avoiding negative offsets\n if ($number < $limit) {\n $builder->limit($limit);\n } else {\n $builder->limit($limit, $number);\n }\n\n $query = $builder->getQuery();\n\n //Change the queried columns by a COUNT(*)\n $totalBuilder->columns('COUNT(*) [rowcount]');\n\n //Remove the 'ORDER BY' clause, PostgreSQL requires this\n $totalBuilder->orderBy(null);\n\n //Obtain the PHQL for the total query\n $totalQuery = $totalBuilder->getQuery();\n\n //Obtain the result of the total query\n $result = $totalQuery->execute();\n $row = $result->getFirst();\n\n $totalPages = $row['rowcount'] / $limit;\n $intTotalPages = (int)$totalPages;\n\n if ($intTotalPages !== $totalPages) {\n $totalPages = $intTotalPages + 1;\n }\n\n $page = new stdClass();\n $page->first = 1;\n $page->before = ($numberPage === 1 ? 1 : ($numberPage - 1));\n $page->items = $query->execute();\n $page->next = ($numberPage < $totalPages ? ($numberPage + 1) : $totalPages);\n $page->last = $totalPages;\n $page->current = $numberPage;\n $page->total_pages = $totalPages;\n $page->total_items = (int)$row['rowcount'];\n\n return $page;\n }", "public function paging(){\n\t\t$sql = \"SELECT * FROM berita\";\n\t\t$query = $this->db->query($sql) or die ($this->db->error);\n\t\treturn $query;\n\t}", "public static function doPager($params=NULL, $selectPage=0, $itemsPerPage=20) {\n\t\t$count = (int) self::doCount($params);\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->select(self::TABLE_NAME);\n\t\tparent::doSelectParameters($conn, $params, self::PRIMARY_KEY);\n\t\treturn DbModel::doPager($conn, new ProjectsListingsModel(), $itemsPerPage, $selectPage, $count, $params);\n\t}", "function register_block_core_query_pagination()\n {\n }", "function newskomentar_searchdata_all_bypage( $tbl_newskomentar, $cari, $offset, $dataperPage ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_newskomentar WHERE \n\t\t\tjudul LIKE '$cari' OR\n\t\t\tpesan LIKE '$cari' \n\t\t\t\tORDER BY id ASC LIMIT $offset, $dataperPage\n\t\t\"); \n \t\treturn $sql;\n}", "function createPaging($query,$resultPerPage) \r\n {\r\n\t\t\r\n $this->query = $query;\r\n $this->resultPerPage= $resultPerPage;\r\n\t\r\n $this->fullresult = mysql_query($this->query);\r\n $this->totalresult = mysql_num_rows($this->fullresult);\r\n $this->pages = $this->findPages($this->totalresult,$this->resultPerPage);\r\n if(isset($_GET['page']) && $_GET['page']>0) {\r\n $this->openPage = $_GET['page'];\r\n if($this->openPage > $this->pages) { \r\n $this->openPage = 1;\r\n }\r\n $start = $this->openPage*$this->resultPerPage-$this->resultPerPage;\r\n $end = $this->resultPerPage;\r\n $this->query.= \" LIMIT $start,$end\";\r\n }\r\n elseif($_GET['page']>$this->pages) {\r\n $start = $this->pages;\r\n $end = $this->resultPerPage;\r\n $this->query.= \" LIMIT $start,$end\";\r\n }\r\n else {\r\n $this->openPage = 1;\r\n $this->query .= \" LIMIT 0,$this->resultPerPage\";\r\n }\r\n $this->resultpage = mysql_query($this->query);\r\n\t\t\r\n }", "public function readPaging($from_record_num, $records_per_page){\n \n // select query\n $query = \"SELECT\n t.name as type_name, p.id, p.name, p.soluong, p.gia, p.avatar, p.category, p.type, p.content, p.created_at, p.updated_at\n FROM\n \" . $this->table_name . \" p\n LEFT JOIN\n type t\n ON p.type = t.id\n ORDER BY p.created_at DESC\n LIMIT ?, ?\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind variable values\n $stmt->bindParam(1, $from_record_num, PDO::PARAM_INT);\n $stmt->bindParam(2, $records_per_page, PDO::PARAM_INT);\n \n // execute query\n $stmt->execute();\n \n // return values from database\n return $stmt;\n}", "public function dtPaginate($start, $length);", "public function getPaginate(){ }", "public function wrapper() \n {\n \n ee()->load->library('pagination');\n \n $total_items = ee()->TMPL->fetch_param('total_items');\n $per_page = ee()->TMPL->fetch_param('per_page');\n $current_page = ee()->TMPL->fetch_param('current_page',0);\n $prefix = ee()->TMPL->fetch_param('prefix','P');\n $base_path =ee()->TMPL->fetch_param('base_path');\n \n $pagination = ee()->pagination->create();\n $pagination->prefix = $prefix;\n $pagination->basepath = '/' . trim($base_path,'/');\n\n ee()->TMPL->tagdata = $pagination->prepare(ee()->TMPL->tagdata);\n \n $pagination->build($total_items, $per_page);\n $this->return_data = $pagination->render($this->return_data);\n \n return $this->return_data;\n }", "public function setPagination($limit, $offset = 0);", "function printResultPages($currPage, $pageCount) {\n global $loc;\n $maxPg = 21;\n if ($currPage > 1) {\n echo \"<a href=\\\"javascript:changePage(\".H(addslashes($currPage-1)).\")\\\">&laquo;\".$loc->getText(\"mbrsearchprev\").\"</a> \";\n }\n for ($i = 1; $i <= $pageCount; $i++) {\n if ($i < $maxPg) {\n if ($i == $currPage) {\n if ($pageCount > 1) echo \"<b>\".H($i).\"</b> \";\n } else {\n echo \"<a href=\\\"javascript:changePage(\".H(addslashes($i)).\")\\\">\".H($i).\"</a> \";\n }\n } elseif ($i == $maxPg) {\n echo \"... \";\n }\n }\n if ($currPage < $pageCount) {\n echo \"<a href=\\\"javascript:changePage(\".($currPage+1).\")\\\">\".$loc->getText(\"mbrsearchnext\").\"&raquo;</a> \";\n }\n }", "function getAllPaginated($page=1,$perPage=-1) {\r\n\t\tif ($perPage == -1)\r\n\t\t\t$perPage = \tCommon::getRowsPerPage();\r\n\t\tif (empty($page))\r\n\t\t\t$page = 1;\r\n\t\t$cond = new Criteria();\r\n\t\t$pager = new PropelPager($cond,\"SurveyAnswerPeer\", \"doSelect\",$page,$perPage);\r\n\t\treturn $pager;\r\n\t }", "function show_pages($amount, $rowamount, $id = '') {\n if ($amount > $rowamount) {\n $num = 8;\n $poutput = '';\n $lastpage = ceil($amount / $rowamount);\n $startpage = 1;\n\n if (!isset($_GET[\"start\"]))\n $_GET[\"start\"] = 1;\n $start = $_GET[\"start\"];\n\n if ($lastpage > $num & $start > ($num / 2)) {\n $startpage = ($start - ($num / 2));\n }\n\n echo _('Show page') . \":<br>\";\n\n if ($lastpage > $num & $start > 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start - 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ < ]';\n $poutput .= '</a>';\n }\n if ($start != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=1';\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ 1 ]';\n $poutput .= '</a>';\n if ($startpage > 2)\n $poutput .= ' .. ';\n }\n\n for ($i = $startpage; $i <= min(($startpage + $num), $lastpage); $i++) {\n if ($start == $i) {\n $poutput .= '[ <b>' . $i . '</b> ]';\n } elseif ($i != $lastpage & $i != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $i;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $i . ' ]';\n $poutput .= '</a>';\n }\n }\n\n if ($start != $lastpage) {\n if (min(($startpage + $num), $lastpage) < ($lastpage - 1))\n $poutput .= ' .. ';\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $lastpage;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $lastpage . ' ]';\n $poutput .= '</a>';\n }\n\n if ($lastpage > $num & $start < $lastpage) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start + 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ > ]';\n $poutput .= '</a>';\n }\n\n echo $poutput;\n }\n}", "public function paginate($perPage = 15, $columns = ['*']) {\n }", "public function render_per_page_options()\n {\n }", "function pagination($start,$limit,$targetpage,$tbl_name){\n\n\t// How many adjacent pages should be shown on each side?\n\t$adjacents = 3;\n\t\n\t/* \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 * FROM $tbl_name\";\n\t$total_pages = mysql_num_rows(mysql_query($query));\n\t\n\t/* Setup vars for query. */\n\t//$targetpage = \"index.php\"; \t//your file name (the name of this file)\n\t//$limit = 5; \t\t\t\t\t\t\t\t//how many items to show per page\n $page = !empty($_GET['page']) ? $_GET['page'] : 1;\n\t$start = !empty($_GET['page']) ? $_GET['page'] : 1;\n\n\t/* Get data. */\n\t//$sql = \"SELECT column_name FROM $tbl_name LIMIT $start, $limit\";\n\t//$result = mysql_query($sql);\n\t\n\t/* Setup page vars for display. */\n\tif ($page == 0) $page = 1;\t\t\t\t\t//if no page var is given, default to 1.\n\t$prev = $page - 1;\t\t\t\t\t\t\t//previous page is page - 1\n\t$next = $page + 1;\t\t\t\t\t\t\t//next page is page + 1\n\t$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\t$pagination = \"\";\n\tif($lastpage > 1)\n\t{\t\n\t\t$pagination .= \"<div class=\\\"pagination\\\">\";\n\t\t//previous button\n\t\tif ($page > 1) \n\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$prev\\\">Previous</a>\";\n\t\telse\n\t\t\t$pagination.= \"<span class=\\\"disabled\\\"></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 == $page)\n\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\telse\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\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($page < 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\tif ($counter == $page)\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\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lpm1\\\">$lpm1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lastpage\\\">$lastpage</a>\";\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) > $page && $page > ($adjacents * 2))\n\t\t\t{\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=1\\\">1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=2\\\">2</a>\";\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\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\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lpm1\\\">$lpm1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lastpage\\\">$lastpage</a>\";\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\t$pagination.= \"<a href=\\\"$targetpage?page=1\\\">1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=2\\\">2</a>\";\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 == $page)\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\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\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 ($page < $counter - 1) \n\t\t $pagination.= \"<a href=\\\"$targetpage?page=$next\\\">next </a>\";\n\t\telse\n\t\t\t$pagination.= \"<span class=\\\"disabled\\\"></span>\";\n\t\t$pagination.= \"</div>\\n\";\n \n\t}\n \n return $pagination;\n \n}", "function smarty_function_pager($params, &$smarty) {\n $result = '';\n \n if (!isset($params['delta'])) {\n $params['delta'] = 3;\n }\n \n if ($params && $params['pages'] > 1) {\n $result = '<div class=\"dg_pager_container\">';\n \n if ($params['current'] > 1) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"1\">First</a> ';\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.($params['current'] - 1).'\">Prev</a> ';\n }\n \n $pager_start = $params['current'] <= $params['delta'] ? 1 : $params['current'] - $params['delta'];\n $pager_stop = $params['current'] > $params['pages'] - $params['delta'] ? $params['pages'] : $params['current'] + $params['delta'];\n \n if ($params['current'] > $params['delta'] + 1) {\n /*for ($i = 1; $i <= $params['delta'] + 1; ++$i) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }*/\n $result .= ' ... ';\n }\n \n for ($i = $pager_start; $i <= $pager_stop; ++$i) {\n if ($i == $params['current']) {\n $result .= ' <span>['.$i.']</span> ';\n } else {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }\n }\n \n if ($params['current'] < $params['pages'] - $params['delta']) {\n $result .= ' ... ';\n /*for ($i = $params['pages'] - $params['delta']; $i <= $params['pages']; ++$i) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$i.'\">'.$i.'</a> ';\n }*/\n }\n\n if ($params['current'] < $params['pages']) {\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.($params['current'] + 1).'\">Next</a> ';\n $result .= ' <a href=\"javascript: void(0);\" class=\"dg_pager\" page=\"'.$params['pages'].'\">Last</a> ';\n }\n \n $result .= '</div>';\n }\n \n return $result;\n}", "public static function doPager($params=NULL, $selectPage=0, $itemsPerPage=20) {\n\t\t$count = (int) self::doCount($params);\n\t\t$conn = parent::_initwgConnector($params, self::PRIMARY_KEY);\n\t\t$conn->select(self::TABLE_NAME);\n\t\tparent::doSelectParameters($conn, $params, self::PRIMARY_KEY);\n\t\treturn DbModel::doPager($conn, new PollTemplatesModel(), $itemsPerPage, $selectPage, $count, $params);\n\t}", "function pagination($tbl_name,$fields,$where='',$orderby='',$page_url,$pagesize,$page_no,$print='')\n\t{\n\t\t$pagesize=($pagesize)?$pagesize:10;\n\t\tif($where)$where=\" WHERE \".$where;\n\t\tif($orderby)$orderby=\" ORDER BY \".$orderby;\n\t $sql1=\"SELECT 1 FROM \".$tbl_name.$where.$orderby;\n\t\t//$sql1=\"SELECT \".$fields.\" FROM \".$tbl_name.$where.$orderby;\n\n\t\t$rowsperpage = $pagesize;\n\t\t$website = $page_url; \n\t\t/*\n\t\t#valid page no. check \n\t\t$check=$pagesize*$page_no;\n\t\t$qsql1 = @mysql_query($sql1) or die(\"failed\");\n\t\t$RecordCount = mysql_num_rows($qsql1);\n\t\t\n\t\t\n\t\tif($check>$RecordCount)\n\t\t{\n\t\t\tif((($check-$RecordCount)>$pagesize))\n\t\t\t{\n\t\t\t\t$this->divert($page_url);\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t \n\t\t\n\t\t$pagination = new AM_CSSPagination_admin($sql1, $rowsperpage, $website); \n\t\t$pagination->setPage($page_no);\n\t\t\n\t\t//$qsql1 = @mysql_query($sql1) or die(\"failed\");\n\t\t//$RecordCount = mysql_num_rows($qsql1);\n\t\t\n\t\t\n\t\t\n\t\t$sql2 = \"select \".$fields.\" FROM \".$tbl_name.$where.$orderby.\" LIMIT \".$pagination->getLimit() . \", \". $rowsperpage; \n\t\tif($print)\n\t\techo $sql2;\n\t\t$result_query = @mysql_query($sql2);\n\t\t$page = $pagination->showPage();\n\t\t$RecordCount=$pagination->retrunTotalRows();\n\t\t\n\t\t#valid page no. check\n\t\t$check=$pagesize*$page_no; \n\t\tif($check>$RecordCount)\n\t\t{\n\t\t\tif((($check-$RecordCount)>$pagesize))\n\t\t\t{\n\t\t\t\t$this->divert($page_url);\n\t\t\t}\n\t\t}\n\t\t$resultArr = array();\n\t\tif($RecordCount>1)\n\t\t{\n\t\t\twhile($res = mysql_fetch_assoc($result_query))\n\t\t\t{\n\t\t\t\t$resultArr[] = $res;\n\t\t\t}\n\t\t}\n\t\telse if($RecordCount==1)\n\t\t{\n\t\t\t$res = mysql_fetch_assoc($result_query);\n\t\t\t$resultArr[] = $res;\n\t\t}\n\t\t$array_res\t=\tarray('result'=>$resultArr,'page'=>$page,'nr'=>$RecordCount);\n\t\treturn $array_res;\n\t}", "public function createPagination($total_rows, $base_url, $cur_page, $per_page = '', $num_links = '') {\n if ($per_page == '') {\n $per_page = 10;\n }\n if ($num_links == '') {\n $num_links = 5;\n }\n /* Loading the pagination library */\n $this->load->library('pagination');\n\n /* Setting the config for pagination */\n $config['base_url'] = $base_url;\n $config['total_rows'] = $total_rows;\n $config['per_page'] = $per_page;\n $config['cur_page'] = $cur_page;\n $config['num_links'] = $num_links;\n $config['full_tag_open'] = '<ul style=\"display: inline-block;\">';\n $config['full_tag_close'] = '</ul>';\n\n $config['first_tag_open'] = '<li>';\n $config['first_link'] = '<< Start';\n $config['first_tag_close'] = '</li>';\n $config['last_tag_open'] = '<li>';\n $config['last_link'] = 'End >> ';\n $config['last_tag_close'] = '</li></ul>';\n $config['next_tag_open'] = '<li>';\n $config['next_link'] = \"Next&gt;\";\n $config['next_tag_close'] = '</li>';\n $config['prev_tag_open'] = '<li>';\n $config['prev_link'] = \"&lt;Previous\";\n $config['prev_tag_close'] = '</li>';\n $config['num_tag_open'] = '<li>';\n $config['num_tag_close'] = '</li>';\n $config['cur_tag_open'] = '<li class=\"active\"><a href=\"javascript:void(0);\">';\n $config['cur_tag_close'] = '</a></li>';\n /* Initializing the library */\n $this->pagination->initialize($config);\n /* creating the links */\n $links = $this->pagination->create_links();\n\n /* returning the links */\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' => 'Common_Model',\n 'model_method_name' => 'createPagination',\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 return $links;\n }", "private function getPagination(){\n\t\t$pager=new pager();\n\t\t$pager->isAjaxCall($this->iAmAjax);\n\t\t$pager->set(\"type\", \"buttons\");\n\t\t$pager->set(\"gridId\",$this->id);\n\t\t$pager->set(\"pages\", $this->pages);\n\t\t$pager->set(\"currPage\", $this->currPage);\n\t\t$pager->set(\"maxNumPages\", $this->maxNumPages);\n\t\t$pager->set(\"maxNumPages\", $this->maxNumPages);\n\t\treturn $pager->render(true);\n\t}", "public function paginate($perPage = 15, $columns = ['*'])\n {\n }", "function ShowPageBreak($selectcountsql, $url)\n{\n\t$str0=$selectcountsql;\n\t$result0=mysql_query($str0) or\n\t\tdie(mysql_error());\n\t$row0=mysql_fetch_array($result0);\n\t$sumrecords=$row0['sumrecords'];/////////////// trong cau lenh sql count(...) as SUMRECORDS, luu y cau lenh sql phai ORDER BY cung kieu voi cau lenh dung cho WHILE\n\tmysql_free_result($result0);\n\t\n\techo(\"<div align='right'>\");\n\t$page=intval(mysql_real_escape_string($_REQUEST['page']));\n\tif ($page<1) $page=1;\n\t$recordonpage=getPara('recordsperpage','value1');\n\tif ($recordonpage<1) $recordonpage=20;\n\t//$recordonpage=5;\n\t$p=$sumrecords/$recordonpage;\n\t$q=$sumrecords%$recordonpage;\n\tif ($sumrecords>$recordonpage)\n\t{\n\t\t//Ve trang dau tien\n\t\techo(\"<a class='nav' href='\".$url.\"?page=1'> &lt;&lt; </a>\");\n\t\t//Ve trang ke truoc (previous)\n\t\tif ($page>1)\n\t\t{\n\t\t\t$pp=$page-1;\n\t\t\techo(\"<a class='nav' href='\".$url.\"?page=\".$pp.\"'> &lt; </a>\");\n\t\t}\n\t\t//Cac trang tiep theo\n\t\techo(\"<span style='font-weight: bold; color: #0099FF'> Trang </span>\");\n\t\t$k=$page;\n\t\tif ($page+4>$p)\n\t\t{\n\t\t\t$k=(int)$p-3;\n\t\t\tif ($k<1) $k=1;\n\t\t}\n\t\t$c=0;\t\t\t\t\t\n\t\tfor ($j=$k;$j<=$p;$j++)\n\t\t{ \n\t\t\techo(\"<a class='nav' href='\".$url.\"?page=\".$j.\"'> [\".$j.\"] </a>\");\n\t\t\t$c++;\n\t\t\tif ($c==5) break;\t\n\t\t}\n\t\t$j=(int)$p+1;\n\t\t//Hien thi trang cuoi cung\n\t\tif (($q>0)&&($c<5))\n\t\t{ \n\t\t\techo(\"<a class='nav' href='\".$url.\"?page=\".$j.\"'> [\".$j.\"] </a>\");\n\t\t}\n\t\t//Ve trang tiep theo (next)\n\t\tif ($q>0)\n\t\t{\n\t\t\tif ($page<=$p)\n\t\t\t{\n\t\t\t\t$np=$page+1;\n\t\t\t\techo(\"<a class='nav' href='\".$url.\"?page=\".$np.\"'> &gt; </a>\");\n\t\t\t}\n\t\t\t//Ve trang cuoi cung\n\t\t\techo(\"<a class='nav' href='\".$url.\"?page=\".$j.\"'> &gt;&gt; </a>\");\t\t\t\t\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($page<$p)\n\t\t\t{\n\t\t\t\t$np=$page+1;\n\t\t\t\techo(\"<a class='nav' href='\".$url.\"?id=\".$id.\"&field=\".$field.\"&level=\".$level);\n\t\t\t\techo(\"&type=\".$type.\"&keyword=\".$keyword.\"&page=\".$np.\"'> &gt; </a>\");\n\t\t\t}\n\t\t\t\n\t\t\t//Ve trang cuoi cung\n\t\t\t$j--;\n\t\t\techo(\"<a class='nav' href='\".$url.\"?page=\".$j.\"'> &gt;&gt; </a>\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\t\t\t\t\t\t\t\t\n\t}\n\techo(\"</div>\");\n}", "public function paginate()\n {\n return $this->operator->paginate($this->page, $this->limit);\n }", "function generate_pagination($url, $items, $per_page, $start, $start_variable='start'){\r\n global $eqdkp_root_path, $user;\r\n\r\n $uri_symbol = ( strpos($url, '?') ) ? '&amp;' : '?';\r\n\t\t//On what page we are?\r\n\t\t$recent_page = (int)floor($start / $per_page) + 1;\r\n\t\t//Calculate total pages\r\n\t\t$total_pages = ceil($items / $per_page);\r\n\t\t//Return if we don't have at least 2 Pages\r\n\t\tif (!$items || $total_pages < 2){\r\n return '';\r\n }\r\n\r\n\t\t//First Page\r\n $pagination = '<div class=\"pagination\">';\r\n\t\tif ($recent_page == 1){\r\n\t\t\t$pagination .= '<span class=\"pagination_activ\">1</span>';\r\n\t\t} else {\r\n\t\t\t$pagination .= '<a href=\"'.$url.$uri_symbol . $start_variable.'='.( ($recent_page - 2) * $per_page).'\" title=\"'.$user->lang['previous_page'].'\"><img src=\"'.$eqdkp_root_path.'images/arrows/left_arrow.png\" border=\"0\"></a>&nbsp;&nbsp;<a href=\"'.$url.'\" class=\"pagination\">1</a>';\r\n\t\t}\r\n\r\n\t\t//If total-pages < 4 show all page-links\r\n\t\tif ($total_pages < 4){\r\n\t\t\t\t$pagination .= ' ';\r\n\t\t\t\tfor ( $i = 2; $i < $total_pages; $i++ ){\r\n\t\t\t\t\tif ($i == $recent_page){\r\n\t\t\t\t\t\t$pagination .= '<span class=\"pagination_activ\">'.$i.'</span> ';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$pagination .= '<a href=\"'.$url.$uri_symbol.$start_variable.'='.( ($i - 1) * $per_page).'\" title=\"'.$user->lang['page'].' '.$i.'\" class=\"pagination\">'.$i.'</a> ';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$pagination .= ' ';\r\n\t\t\t\t}\r\n\t\t//Don't show all page-links\r\n\t\t} else {\r\n\t\t\t$start_count = min(max(1, $recent_page - 5), $total_pages - 4);\r\n\t\t\t$end_count = max(min($total_pages, $recent_page + 5), 4);\r\n\r\n\t\t\t$pagination .= ( $start_count > 1 ) ? ' ... ' : ' ';\r\n\r\n\t\t\tfor ( $i = $start_count + 1; $i < $end_count; $i++ ){\r\n\t\t\t\tif ($i == $recent_page){\r\n\t\t\t\t\t$pagination .= '<span class=\"pagination_activ\">'.$i.'</span> ';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$pagination .= '<a href=\"'.$url.$uri_symbol.$start_variable.'='.( ($i - 1) * $per_page).'\" title=\"'.$user->lang['page'].' '.$i.'\" class=\"pagination\">'.$i.'</a> ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$pagination .= ($end_count < $total_pages ) ? ' ... ' : ' ';\r\n\t\t} //close else\r\n\r\n\r\n\t\t//Last Page\r\n\t\tif ($recent_page == $total_pages){\r\n\t\t\t$pagination .= '<span class=\"pagination_activ\">'.$recent_page.'</span>';\r\n\t\t} else {\r\n\t\t\t$pagination .= '<a href=\"'.$url.$uri_symbol.$start_variable.'='.(($total_pages - 1) * $per_page) . '\" class=\"pagination\" title=\"'.$user->lang['page'].' '.$total_pages.'\">'.$total_pages.'</a>&nbsp;&nbsp;<a href=\"'.$base. $uri_symbol .$start_variable.'='.($recent_page * $per_page).'\" title=\"'.$user->lang['next_page'].'\"><img src=\"'.$eqdkp_root_path.'images/arrows/right_arrow.png\" border=\"0\"></a>';\r\n\t\t}\r\n\r\n\t$pagination .= '</div>';\r\n\treturn $pagination;\r\n}", "public function paginateQuery($query, $key='page', $max=5, $range=2, $url='', $delim='&page=$1', $display=array('first'=>'|&lt;&lt;', 'prev'=>'&lt;', 'next'=>'&gt;', 'last'=>'&gt;&gt;|')) {\n // initialisation\n $paginatedQuery = array();\n if(!isset($_GET[$key])) {\n $_GET[$key] = 1; // so if GET isn't set, it still shows the first page's results\n }\n \n // gets total pages and results\n $paginatedQuery['totalnum'] = count($query);\n $paginatedQuery['pages'] = ceil($paginatedQuery['totalnum']/$max);\n $paginatedQuery['results'] = array_slice($query, ($max*($_GET[$key]-1)), $max, true);\n $paginatedQuery['resultsnum'] = count($paginatedQuery['results']); \n \n // formats paginated links\n // current\n $current = $_GET[$key];\n \n // first\n $first = 1;\n \n // prev\n if ($current==1) $prev = 1; \n else $prev = $current-1;\n \n // next\n if ($paginatedQuery['totalnum']==1) $next = 1; \n else $next = $current+1;\n \n // last\n $last = $paginatedQuery['pages'];\n \n // display \n $paginatedQuery['links'] = ''; // initialisation\n \n // first, prev\n if($current!=$first) $paginatedQuery['links'] = '<a class=\"first\" href=\"'.$url.str_replace('$1', $first, $delim).'\">'.$display['first'].'</a>'.\"\\n\".'<a class=\"prev\" href=\"'.$url.str_replace('$1', $prev, $delim).'\">'.$display['prev'].'</a>'.\"\\n\";\n \n // numbers\n for ($i = ($current - $range); $i < ($current + $range + 1); $i++) {\n if ($i > 0 && $i <= $paginatedQuery['pages']) {\n // current\n if ($i==$current) {\n $paginatedQuery['links'] .= '<span class=\"current\">'.$i.'</span>'.\"\\n\";\n }\n // link\n else {\n $paginatedQuery['links'] .= '<a class=\"page\" href=\"'.$url.str_replace('$1', $i, $delim).'\">'.$i.'</a>'.\"\\n\";\n }\n }\n }\n \n // next, last\n if($current!=$last) $paginatedQuery['links'] .= '<a class=\"next\" href=\"'.$url.str_replace('$1', $next, $delim).'\">'.$display['next'].'</a>'.\"\\n\".'<a class=\"last\" href=\"'.$url.str_replace('$1', $last, $delim).'\">'.$display['last'].'</a>';\n \n // return array\n return $paginatedQuery;\n }", "function paging($condtion='1')\r\n {\r\n /*\r\n $url = '';\r\n \t if(isset($_GET[\"brand\"])){\r\n \t \t$value = trim($_GET['brand']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = sprintf(\"brand='%s'\",$value);\r\n\t \t \t$url = '&brand='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"module\"])){\r\n \t \t$value = trim($_GET['module']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$module = sprintf(\"series='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$module;\r\n\t \t \t$url = $url.'&module='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"part\"])){\r\n \t \t$value = trim($_GET['part']);\r\n \t \tif($value != \"\"){ \t \t\r\n\t \t \t$part = sprintf(\"module='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$part;\r\n\t \t \t$url = $url.'&part='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"key\"])){\r\n \t \t$value = trim($_GET[\"key\"]);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = $this->key_query($value,$url);\r\n\t \t \techo \"++++++++++\".$condtion;\r\n\t \t \t//$url = $url.'&part='.$value; \t \t\r\n \t \t}\r\n \t }\r\n \t */\r\n // get current page index\r\n $page = 1;\r\n \t if(isset($_GET[\"page\"])){\r\n \t \t$page = $_GET['page'];\r\n \t }\r\n \t \r\n \t // set paging parameters\r\n $number = 6; \r\n $total = $this->total;\r\n $url = $this->pget;\r\n $condtion = $this->cond;\r\n //$total = $this->getTotal($condtion);\r\n \r\n $url = '?page={page}'.$url; \r\n $pager = new Paging($total,$number,$page,$url);\r\n \t \r\n \t // get publish records\r\n\t $db = GLOBALDB();\r\n $sql = \"SELECT * FROM publish WHERE \".$condtion.\" order by id desc LIMIT \".$pager->limit.\",\".$pager->size;\r\n $result = $db->query($sql); \r\n $this->display($result);\r\n \r\n // show paging bar\r\n //echo $sql;\r\n\t $pager->show();\r\n }", "function printPagination($p_current_page, $p_total_count, $p_extra_parameters = '')\n\t{\n\t\tglobal $section;\n\n\t\t// If pagination needed print page selection\n\t\tif( BACKEND_RESULTS_PER_PAGE < $p_total_count )\n\t\t{\n\t\t\t$page_count = ceil($p_total_count / BACKEND_RESULTS_PER_PAGE);\n\t\t\techo \"<div class=\\\"page-navigation\\\">\";\n\t\t\tfor( $page_iterator = 1 ; $page_iterator <= $page_count ; $page_iterator++)\n\t\t\t{\n\t\t\t\t$selected = ($page_iterator === $p_current_page) ? ' selected' : '';\n\t\t\t\techo '<a class=\"button' . $selected . '\" href=\"?section=' , $section , '&amp;page=' , $page_iterator, $p_extra_parameters , '\">' , $page_iterator , \"</a>\";\n\t\t\t}\n\t\t\techo \"</div>\\n\";\n\t\t}\n\t}", "public function paginater($js_function_name='change_page'){\n if($this->is_search_enabled){\n //$this->searching_val = \",$('#\".$this->input_field.\"').val()\";\n $this->searching_val = ',$(\"#'.$this->input_field.'\").val()';\n }\n //echo(\"<textarea>\".$this->searching_val.\"</textarea>\");\n\t$page = (int) (isset($_POST['page_id']) ? $_POST['page_id'] : 1);\n\t$page = ($page == 0 ? 1 : $page);\n\t$this->start = ($page-1) * $this->records_per_page;\n\n\t$next = $page + 1; \n\t$prev = $page - 1;\n\t$last_page = ceil($this->totalRecords/$this->records_per_page);\n\t$second_last = $last_page - 1; \n\n\t//$pagination = \"\";\n\tif($last_page > 1){\n\t\t$this->pagination .= \"<div class='pagination'>\";\n\t\tif($page > 1)\n\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(1\".$this->searching_val.\");'>&laquo; First</a>\";\n\t\telse\n\t\t\t$this->pagination.= \"<span class='disabled'>&laquo; First</span>\";\n\n\t\tif ($page > 1)\n\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($prev).$this->searching_val.\");'>&laquo; Previous&nbsp;&nbsp;</a>\";\n\t\telse\n\t\t\t$this->pagination.= \"<span class='disabled'>&laquo; Previous&nbsp;&nbsp;</span>\"; \n\n\t\tif ($last_page < 7 + ($this->adjacents * 2))\n\t\t{ \n\t\t\tfor ($counter = 1; $counter <= $last_page; $counter++)\n\t\t\t{\n\t\t\t\tif ($counter == $page)\n\t\t\t\t\t$this->pagination.= \"<span class='current'>$counter</span>\";\n\t\t\t\telse\n\t\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($counter).$this->searching_val.\");'>$counter</a>\"; \n\n\t\t\t}\n\t\t}\n\t\telseif($last_page > 5 + ($this->adjacents * 2))\n\t\t{\n\t\t\tif($page < 1 + ($this->adjacents * 2))\n\t\t\t{\n\t\t\t\tfor($counter = 1; $counter < 4 + ($this->adjacents * 2); $counter++)\n\t\t\t\t{\n\t\t\t\t\tif($counter == $page)\n\t\t\t\t\t\t$this->pagination.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($counter).$this->searching_val.\");'>$counter</a>\"; \n\t\t\t\t}\n\t\t\t\t$this->pagination.= \"...\";\n\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($second_last).$this->searching_val.\");'> $second_last</a>\";\n\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($last_page).$this->searching_val.\");'>$last_page</a>\"; \n\n\t\t }\n\t\t elseif($last_page - ($this->adjacents * 2) > $page && $page > ($this->adjacents * 2))\n\t\t {\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(1\".$this->searching_val.\");'>1</a>\";\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(2\".$this->searching_val.\");'>2</a>\";\n\t\t\t $this->pagination.= \"...\";\n\t\t\t for($counter = $page - $this->adjacents; $counter <= $page + $this->adjacents; $counter++)\n\t\t\t {\n\t\t\t\t if($counter == $page)\n\t\t\t\t\t $this->pagination.= \"<span class='current'>$counter</span>\";\n\t\t\t\t else\n\t\t\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($counter).\");'>$counter</a>\"; \n\t\t\t }\n\t\t\t $this->pagination.= \"..\";\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($second_last).$this->searching_val.\");'>$second_last</a>\";\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($last_page).$this->searching_val.\");'>$last_page</a>\"; \n\t\t }\n\t\t else\n\t\t {\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(1\".$this->searching_val.\");'>1</a>\";\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(2\".$this->searching_val.\");'>2</a>\";\n\t\t\t $this->pagination.= \"..\";\n\t\t\t for($counter = $last_page - (2 + ($this->adjacents * 2)); $counter <= $last_page; $counter++)\n\t\t\t {\n\t\t\t\t if($counter == $page)\n\t\t\t\t\t\t$this->pagination.= \"<span class='current'>$counter</span>\";\n\t\t\t\t else\n\t\t\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($counter).$this->searching_val.\");'>$counter</a>\"; \n\t\t\t }\n\t\t }\n\t\t}\n\t\tif($page < $counter - 1)\n\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($next).$this->searching_val.\");'>Next &raquo;</a>\";\n\t\telse\n\t\t\t$this->pagination.= \"<span class='disabled'>Next &raquo;</span>\";\n\n\t\tif($page < $last_page)\n\t\t\t$this->pagination.= \"<a href='javascript:void(0);' title='this is last' onClick='\".$js_function_name.\"(\".($last_page).$this->searching_val.\");'>Last &raquo;</a>\";\n\t\telse\n\t\t\t$this->pagination.= \"<span class='disabled'>Last &raquo;</span>\";\n\n\t\t$this->pagination.= \"</div>\"; \n\t }\n\t}", "static public function genPagingFor(\n int $pageNum, int $totalItems, int $numItemsPerPage = 4, \n string $pagingFor = '', int $viewNumber = 0, \n string $listUrl = '#', int $numPagingIdxsPerPagingView = 0\n ) {\n return self::genPagination2(\n $pageNum, $numItemsPerPage, $totalItems, \n $numPagingIdxsPerPagingView, $pagingFor, \n $viewNumber, $listUrl\n );\n }", "public function paginate($orderBy = 'nome', $perPage = 10);" ]
[ "0.7225453", "0.7120597", "0.70750326", "0.6805313", "0.6805313", "0.673354", "0.6730588", "0.6710622", "0.66671395", "0.6661188", "0.66131544", "0.65684885", "0.6377996", "0.6354035", "0.63459057", "0.63074344", "0.6307043", "0.62715626", "0.62501186", "0.62215996", "0.616281", "0.6146222", "0.6140259", "0.61292374", "0.61271924", "0.6110811", "0.60791194", "0.60757446", "0.6072845", "0.60684985", "0.6056355", "0.6042617", "0.6037077", "0.60288", "0.60255075", "0.6014495", "0.5987353", "0.59851867", "0.59785724", "0.5950931", "0.5947036", "0.5939759", "0.5930913", "0.59059215", "0.5905192", "0.58969027", "0.5883601", "0.58736336", "0.58612645", "0.5859304", "0.58449465", "0.58372897", "0.58323526", "0.58309764", "0.5823622", "0.5822092", "0.581767", "0.58174443", "0.58153766", "0.58115476", "0.580941", "0.5805193", "0.58045477", "0.5792207", "0.5785825", "0.5772567", "0.5767591", "0.57640076", "0.5760386", "0.5757058", "0.5735844", "0.57335526", "0.5727138", "0.5706881", "0.57032734", "0.57022405", "0.5700007", "0.569775", "0.5693043", "0.56904244", "0.5683935", "0.5682", "0.56759024", "0.5668362", "0.5654485", "0.56511873", "0.56476134", "0.56473106", "0.5647013", "0.56425846", "0.56384546", "0.56378365", "0.56316787", "0.5626537", "0.562063", "0.56206024", "0.5609684", "0.5605163", "0.5604638", "0.5597185" ]
0.61886704
20
Register widget with WordPress.
function __construct() { parent::__construct( 'obay_sidebar_menu_widget', // Base ID __('Menu Sidebar'), // Name array( 'description' => __('Menu Sidebar'), ) // Args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_widget() {\n register_widget( 'WPP_Widget' );\n }", "function wpb_load_widget()\n{\n register_widget('wpb_widget');\n}", "function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}", "function wpb_load_widget() {\n register_widget( 'wpb_widget' );\n}", "function wpb_load_widget() {\r\n\tregister_widget( 'wpb_widget' );\r\n}", "function register_widget($widget)\n {\n }", "function wpwl_load_widget() {\n register_widget( 'wpwl_widget' );\n}", "function montheme_register_widget() {\n register_widget(YoutubeWidget::class);\n register_sidebar([\n 'id' => 'homepage',\n 'name' => __('Sidebar Accueil', 'montheme'),\n 'before_widget' => '<div class=\"p-4 %2$s\" id=\"%1$s\"',\n 'after_widget' => '</div>',\n 'before_title' => ' <h4 class=\"fst-italic\">',\n 'after_title' => '</h4>'\n ]);\n}", "static function register_widget() {\n\t\t\t$classname = get_called_class();\n\t\t\tregister_widget( $classname );\n\t\t}", "function register()\n {\n // Incluimos el widget en el panel control de Widgets\n wp_register_sidebar_widget( 'widget_ultimosp', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'widget' ) );\n\n // Formulario para editar las propiedades de nuestro Widget\n wp_register_widget_control('widget_ultimos_autor', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'control' ) );\n }", "function whichet_load_widget() {\n\tregister_widget( 'WHICHet_widget' );\n\tadd_action( 'wp_enqueue_script', 'WHICHet_scripts' );\n}", "function load_widget() {\n\n\t\tregister_widget( 'WordpressConnectWidgetActivityFeed' );\n\t\tregister_widget( 'WordpressConnectWidgetComments' );\n\t\tregister_widget( 'WordpressConnectWidgetFacepile' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeBox' );\n\t\tregister_widget( 'WordpressConnectWidgetLikeButton' );\n\t\tregister_widget( 'WordpressConnectWidgetLiveStream' );\n\t\tregister_widget( 'WordpressConnectWidgetLoginButton' );\n\t\tregister_widget( 'WordpressConnectWidgetRecommendations' );\n\t\tregister_widget( 'WordpressConnectWidgetSendButton' );\n\n\t}", "public function _register_widgets()\n {\n }", "function load_postmeta_widget(){\n register_widget( 'postmeta_widget' );\n}", "function itstar_widget() {\n register_widget( 'last_video_widget' );\n register_widget( 'last_posts_by_cat_widget' );\n register_widget( 'simple_button_widget' );\n}", "function wpb_load_widget()\n{\n register_widget( 'WC_External_API_Widget' );\n}", "function itstar_widget() {\n// register_widget( 'last_products_widget' );\n// register_widget( 'last_projects_widget' );\n register_widget( 'last_posts_by_cat_widget' );\n register_widget( 'contact_info_widget' );\n// register_widget( 'social_widget' );\n}", "function twd_register_widgets() {\r\n\r\n\t$widgets = array(\r\n\r\n\t\t'shortcode'\r\n\r\n\t);\r\n\r\n\tforeach ( $widgets as $widget ) {\r\n\r\n\t\trequire_once get_template_directory() . '/includes/widgets/widget-' . $widget . '.php';\r\n\r\n\t}\r\n\r\n\t register_widget( 'paste_shortcode_widget' );\r\n\r\n}", "function wpzh_load_widget() {\n register_widget( 'sliderHTML2' ); \n}", "function widget_wrap()\n{\n\tregister_widget('ag_pag_familie_w');\n\tregister_widget('ag_social_widget_container');\n\tregister_widget('ag_agenda_widget');\n}", "function ds_social_load_widget() {\n\tregister_widget( 'ds_social_widget' );\n}", "function wpb_load_widget() {\n register_widget( 'recent_post_widget' );\n }", "function bp_media_register_widgets() {\n\tadd_action('widgets_init', create_function('', 'return register_widget(\"BP_Media_Widget\");') );\n}", "function register_dc_widget() {\n\t\tregister_widget( 'dc_linked_image' );\n\t\tregister_widget( 'dc_widget_link_text' );\n\t}", "function load_tag_widget() {\n register_widget( 'custom_tag_widget' );\n}", "function registerWidgets( ) {\r\n\t\t\twp_register_sidebar_widget( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetOutput' ) );\r\n\t\t\twp_register_widget_control( 'iluvwalking-com-widget', __( 'ILuvWalking.com Stats' ), array( &$this, 'widgetControlOutput' ) );\r\n\t\t}", "function load_widget_plugin_name() {\n register_widget( 'widget_plugin_name' );\n}", "function abc_load_widget()\n{\n register_widget('awesome_bmi_widget');\n}", "function green_widget_twitter_load() {\n\tregister_widget( 'green_widget_twitter' );\n}", "function hw_load_widget() {\n\tregister_widget( 'hw_cal_widget' );\n\tregister_widget( 'hw_custom_post_list_widget' );\n}", "function register_ib_act_widget() {\n\tregister_widget( 'IB_Act_Widget_Widget' );\n}", "function dt_twitter_register() {\n register_widget('DT_Twitter_Widget');\n}", "function aw_add_load_widget() {\r\n\t\tregister_widget( 'AW_AddFeed' );\r\n\t}", "function wpc_load_widget()\n{\n register_widget('expat_category_widget');\n}", "function duende_load_widget() {\n\tregister_widget( 'duende_widget' );\n}", "function custom_register_widget()\n{\n register_widget('oferta_widget');\n register_widget('events_widget');\n register_widget('group_list_widget');\n}", "public static function register() {\n\t register_widget( __CLASS__ );\n\t}", "function qed_register_widgets() {\r\n\t\t// Make a Wordpress built-in Text widget process shortcodes.\r\n\t\tadd_filter( 'widget_text', 'shortcode_unautop' );\r\n\t\tadd_filter( 'widget_text', 'do_shortcode', 11 );\r\n\r\n\t\tregister_widget( 'QED_Widget_Latest_Posts' );\r\n\t\tregister_widget( 'QED_Widget_Contact_Us' );\r\n\t\tregister_widget( 'QED_Widget_Advanced_Text' );\r\n\r\n\t\t// if ( class_exists( 'woocommerce' ) ) {\r\n\t\t\t// TODO: Widget for woocommerce.\r\n\t\t// }\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'sidebar',\r\n\t\t\t'name' => esc_html__( 'Sidebar', 'swishdesign' ),\r\n\t\t\t'description' => esc_html__( 'Sidebar located on the right side of blog page.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'footer1',\r\n\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 1 ),\r\n\t\t\t'description' => esc_html__( 'Located in 1st column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\t$footer_columns_count = qed_get_footer_columns();\r\n\t\tif ( $footer_columns_count >= 2 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer2',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 2 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 2nd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 3 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer3',\r\n\t\t\t\t'name' =>sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 3 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 3rd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 4 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer4',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 4 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 4th column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\t}", "function load_twitticker_widgets() {\n\tregister_widget( 'twitticker_widget' );\n}", "function gardenia_load_widget() {\n\tregister_widget( 'gardenia_widget' );\n}", "function example_load_widgets()\n{\n\tregister_widget('GuildNews_Widget');\n}", "function featured_news_load_widget() {register_widget( 'featured_news_widget' );}", "public function register($widget)\n {\n }", "function portfolio_recent_register_widgets() {\n\tregister_widget( 'blog_recent_post' );\n}", "function register_service_widget() {\n register_widget( 'Services_Widget' );\n}", "function widget_registration($name, $id, $description, $beforeWidget, $afterWidget, $beforeTitle, $afterTitle) {\n register_sidebar(\n array(\n 'name' => $name,\n 'id' => $id,\n 'description' => $description,\n 'before_widget' => $beforeWidget,\n 'after_widget' => $afterWidget,\n 'before_title' => $beforeTitle,\n 'after_title' => $afterTitle,\n )\n );\n}", "function pgnyt_articles_register_widgets() {\n register_widget( 'Pgnyt_Articles_Widget' );\n}", "function suhv_widgets()\n{\n register_widget( 'Suhv_Widgets' );\n}", "function pre_load_widget() {\n register_widget( 'events_widget' );\n register_widget( 'fundys_widget' );\n}", "function wpcoupon_register_slider_widget() {\r\n register_widget( 'WPCoupon_Slider_Widget' );\r\n}", "function harbour_city_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Footer Widgets', 'harbour-city' ),\n 'id' => 'widgets-footer',\n 'description' => __( 'Appears on the front page', 'harbour-city' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget span4 %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}", "function WeblizarTwitterWidget() {\r\n\tregister_widget( 'WeblizarTwitter' );\r\n}", "public function registerWidget($id, $widget)\n {\n add_action('widgets_init', function () use ($id, $widget) {\n global $wp_widget_factory;\n $this->plugin->activateLoader();\n register_widget($widget['uses']);\n //get latest create widget in widget factory\n $wdg = end($wp_widget_factory->widgets);\n // pre init latest widget.\n $wdg->initializeWidget($id, $widget, $this->plugin);\n });\n }", "function register_coupons_widget() {\n register_widget( 'CouponsWidget' );\n}", "function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }", "function ebay_feeds_for_wordpress_Widget() {\n // curl need to be installed\n\tregister_widget( 'ebay_feeds_for_wordpress_Widget_class' );\n}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Hello_World() );\n\t}", "function widget_load() {\n\t\tregister_widget('ilgelo_wSocial');\n\t\tregister_widget('ilgelo_wTwitter');\n\t\tregister_widget('ilgelo_banner');\n\t}", "function sbc_connect_widget() {\n\n class connect_widget extends WP_Widget {\n\n function __construct() {\n parent::__construct(\n\n // Base ID of your widget\n 'connect_widget',\n\n // Widget name will appear in UI\n __('Connect', 'connect_widget_domain'),\n\n // Widget description\n array( 'description' => __( 'Insert your connect links with this widget', 'connect_widget_domain' ), )\n );\n }\n\n // Creating widget output\n public function widget( $args, $instance ) {\n $title = apply_filters( 'widget_title', $instance['title'] );\n\n // echo Title if Title\n echo $args['before_widget'];\n echo '<div class=\"connect-widget\">';\n if ( ! empty( $title ) ):\n echo $args['before_title'] . $title . $args['after_title'];\n endif;\n\n // echo social links if social links available in theme options\n if( have_rows('_about', 'option') ):\n while( have_rows('_about', 'option') ): the_row();\n if( have_rows('connect_media') ):\n// echo 'Follow Us: ';\n while( have_rows('connect_media') ): the_row();\n $link = get_sub_field('link');\n $platform = get_sub_field('platform');\n $icon = '<a href=\"' . $link . '\">' .\n '<i class=\"' . $platform . '\"></i>' .\n '</a>';\n echo $icon;\n endwhile;\n endif;\n endwhile;\n endif;\n\n // This is where you run the code and display the output\n// echo __( 'Hello, World!', 'connect_widget_domain' );\n echo $args['after_widget'];\n echo '</div>';\n }\n\n // Widget Backend\n public function form( $instance ) {\n if ( isset( $instance[ 'title' ] ) ) {\n $title = $instance[ 'title' ];\n }\n else {\n $title = __( 'New title', 'connect_widget_domain' );\n }\n // Widget admin form\n ?>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:' ); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\n </p>\n <?php\n }\n\n // Updating widget replacing old instances with new\n public function update( $new_instance, $old_instance ) {\n $instance = array();\n $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';\n return $instance;\n }\n\n } // close class\n\n // Register the widget\n register_widget( 'connect_widget' );\n\n}", "function custom_widgets_register() {\n register_post_type('custom_widgets', array(\n 'labels' => array(\n 'name' => __('Custom Widgets'),\n 'singular_name' => __('Custom Widget'),\n ),\n 'public' => false,\n 'show_ui' => true,\n 'has_archive' => false,\n 'exclude_from_search' => true,\n ));\n}", "function register_port_posts_widget() {\n register_widget( 'port_posts' );\n}", "function register_Zappy_Feed_Burner_Widget() {\n register_widget('Zappy_Feed_Burner_Widget');\n}", "function wpb_carousel_widget() {\n\t register_widget( 'wpb_widget' );\n\t}", "public static function register()\n {\n register_sidebar( array(\n 'name' => 'Widget Area 1',\n 'id' => 'widget_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n }", "function mytheme_load_widget() {\n register_widget( 'mytheme_widget_text' );\n \n // Allow to execute shortcodes on mytheme_widget_text\n add_filter('mytheme_widget_text', 'do_shortcode');\n}", "function pb18_article_also_widget() {\n register_widget( 'pb18_article_also_widget' );\n}", "function funct_Sandy_RSS() {\r\n register_widget( 'WP_Sandy_RSS' );\r\n}", "function wuss_scoring_widgets() {\r\n\tregister_widget( 'wuss_scoring_widget' );\r\n}", "function RSSPhotoWidgetInit() \n{\n register_widget('RSSPhotoWidget');\n wp_enqueue_script('jquery');\n wp_enqueue_script('rssphoto_javascript','/wp-content/plugins/rssphoto/rssphoto.js');\n wp_enqueue_style('rssphoto_stylesheet','/wp-content/plugins/rssphoto/rssphoto.css');\n}", "function wpb_load_widget() {\n\t\tregister_widget( 'dmv_widget' );\n\t}", "function ds_social_links_load_widget() {\n\tregister_widget( 'ds_social_links_widget' );\n}", "public static function a_widget_init() {\n\t\t\treturn register_widget(__CLASS__);\n\t\t}", "function register_page_bpposts_widget() {\n\tadd_action('widgets_init', create_function('', 'return register_widget(\"BP_Paginated_Posts_Widget\");') );\n}", "function avhamazon_widgets_init ()\n{\n\tregister_widget( 'WP_Widget_AVHAmazon_Wishlist' );\n}", "function instagram_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Instagram',\n\t\t'id' => 'instagram',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n}", "function pts_widget_init() {\n\n register_sidebar( array(\n\t\t'name' => 'Top Widget',\n\t\t'id' => 'top_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s top-widgs\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Sidebar Widget',\n\t\t'id' => 'sidebar_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s sidebar-widgs\">',\n\t\t'after_widget' => '</div></div>',\n\t\t'before_title' => '<div class=\"widget_title_wrapper\"><h5 class=\"widgets_titles_sidebar\">',\n\t\t'after_title' => '</h5></div><div class=\"wca\">',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Single Post Widget',\n\t\t'id' => 'single_post_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s sidebar-widgs\">',\n\t\t'after_widget' => '</div></div>',\n\t\t'before_title' => '<div class=\"widget_title_wrapper\"><h5 class=\"widgets_titles_sidebar\">',\n\t\t'after_title' => '</h5></div><div class=\"wca\">',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'First Footer Widget',\n\t\t'id' => 'first_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Second Footer Widget',\n\t\t'id' => 'second_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Third Footer Widget',\n\t\t'id' => 'third_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Fourth Footer Widget',\n\t\t'id' => 'fourth_footer_widget',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"footer-widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h5 class=\"widgets_titles\">',\n\t\t'after_title' => '</h5>',\n\t) );\n\n register_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"%2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n}", "public function register_widgets() {\n\t\t// Its is now safe to include Widgets files\n\t\t$this->include_widgets_files();\n\n\t\t// Register Widgets\n\t\t\\Elementor\\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\\Dropdown() );\n\t}", "public function action_widgets_init() {\n\n // Our widgets\n register_widget( '\\Pedestal\\Widgets\\Recent_Content_Widget' );\n register_widget( '\\Pedestal\\Widgets\\Recent_Video_Widget' );\n\n if ( PEDESTAL_ENABLE_INSTAGRAM_OF_THE_DAY ) {\n register_widget( '\\Pedestal\\Widgets\\Daily_Insta_Widget' );\n }\n\n // Unregister core widgets we won't be using\n unregister_widget( 'WP_Widget_Archives' );\n unregister_widget( 'WP_Widget_Calendar' );\n unregister_widget( 'WP_Widget_Categories' );\n unregister_widget( 'WP_Widget_Custom_HTML' );\n unregister_widget( 'WP_Widget_Links' );\n unregister_widget( 'WP_Widget_Media_Audio' );\n unregister_widget( 'WP_Widget_Media_Gallery' );\n unregister_widget( 'WP_Widget_Media_Image' );\n unregister_widget( 'WP_Widget_Media_Video' );\n unregister_widget( 'WP_Widget_Meta' );\n unregister_widget( 'WP_Widget_Pages' );\n unregister_widget( 'WP_Widget_Recent_Comments' );\n unregister_widget( 'WP_Widget_Recent_Posts' );\n unregister_widget( 'WP_Widget_RSS' );\n unregister_widget( 'WP_Widget_Search' );\n unregister_widget( 'WP_Widget_Tag_Cloud' );\n unregister_widget( 'WP_Widget_Text' );\n\n // Unregister widgets added by plugins\n unregister_widget( 'P2P_Widget' );\n }", "function SetWidget() {\n\t\t\n\t\t\tif ( !function_exists('register_sidebar_widget') ) \n\t\t\treturn;\n\t\t\t\n\t\t\t// This registers our widget so it appears with the other available\n\t\t\t// widgets and can be dragged and dropped into any active sidebars.\n\t\t\tregister_sidebar_widget(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteo'));\n\t\t\n\t\t\t// This registers our optional widget control form.\n\t\t\tregister_widget_control(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteoControl'), 450, 325);\n\t\t}", "static function init() {\n\t\t\t$classname = get_called_class();\n\t\t\tadd_action( 'widgets_init', $classname . '::register_widget' );\n\t\t\tadd_shortcode( $classname, $classname . '::register_shortcode' );\n\t\t}", "function adelle_footer_widgets_instagram_init() {\r\n register_sidebar( array(\r\n 'name' => __( 'Instagram Widget', 'adelle-theme' ),\r\n 'id' => 'footer-widget-instagram',\r\n 'class' => '',\r\n 'description' => 'Instagram widget area.',\r\n 'before_widget' => '<article id=\"%1$s\" class=\"footer-instagram-widget %2$s\">',\r\n 'after_widget' => '</article>',\r\n 'before_title' => '<h4>',\r\n 'after_title' => '</h4>',\r\n ) );\r\n}", "function load_type_widget() {\n register_widget( 'custom_type_widget' );\n}", "function FoodByNight_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<ul class=\"list-inline\">',\n\t\t'after_widget' => '</ul>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Social_Link_Widget' );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Popups',\n\t\t'id' => 'popups',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Contact_Popup_Widget' );\n\n}", "function widget_init() {\n if ( function_exists('register_sidebar') )\n \n register_sidebar(\n array(\n 'name' => 'Footer',\n 'before_widget' => '<div class = \"footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '',\n 'after_title' => '',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Event Navigation',\n 'before_widget' => '<div class=\"custom-widget top-round card slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Frontpage News',\n 'before_widget' => '<div class=\"custom-widget card top-round slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n }", "function register_Zappy_Lates_Comment_Widget() {\n register_widget('Zappy_Lates_Comment_Widget');\n}", "function dl_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Página de Contacto',\n\t\t'id'\t\t\t=> 'contact-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Barra Lateral',\n\t\t'id'\t\t\t=> 'sidebar-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Search Menu',\n\t\t'id'\t\t\t=> 'menu-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\n}", "public static function init()\n {\n add_action( 'widgets_init', array(__CLASS__, 'register') );\n }", "function wp_listings_register_widgets() {\n\n\t$widgets = array( 'WP_Listings_Featured_Listings_Widget', 'WP_Listings_Search_Widget' );\n\n\tforeach ( (array) $widgets as $widget ) {\n\t\tregister_widget( $widget );\n\t}\n\n}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function register_widget_scripts() {\n\n wp_enqueue_script( $this->get_widget_slug().'-script', plugins_url( 'js/widget.js', __FILE__ ), array('jquery') );\n\n }", "function widget_init() {\r\n if ( !function_exists('wp_register_sidebar_widget') || !function_exists('register_widget_control') ) return;\r\n function widget($args) {\r\n extract($args);\r\n $wpca_settings = get_option('wpcareers');\r\n echo $before_widget;\r\n echo $before_title . $wpca_settings['widget_title'] . $after_title;\r\n\r\n $fieldsPre=\"wpc_\";\r\n $before_tag=stripslashes(get_option($fieldsPre.'before_Tag'));\r\n $after_tag=stripslashes(get_option($fieldsPre.'after_Tag'));\r\n echo '<p><ul>' . widget_display($wpca_settings['widget_format']) . '</ul></p>'; \r\n }\r\n\r\n function widget_control() {\r\n $wpca_settings = $newoptions = get_option('wpcareers');\r\n if ( $_POST[\"wpCareers-submit\"] ) {\r\n $newoptions['widget_title'] = strip_tags(stripslashes($_POST['widget_title']));\r\n $newoptions['widget_format'] = $_POST['widget_format'];\r\n if ( empty($newoptions['widget_title']) ) $newoptions['widget_title'] = 'Last Classifieds Ads';\r\n }\r\n if ( $wpca_settings != $newoptions ) {\r\n $wpca_settings = $newoptions;\r\n update_option('wpcareers', $wpca_settings);\r\n }\r\n $title = htmlspecialchars($wpca_settings['widget_title'], ENT_QUOTES);\r\n if ( empty($newoptions['widget_title']) ) $newoptions['widget_title'] = 'Last Careers Posts';\r\n if ( empty($newoptions['widget_format']) ) $newoptions['widget_format'] = 'y';\r\n ?>\r\n <label for=\"wpCareers-widget_title\"><?php _e('Title:'); ?><input style=\"width: 200px;\" id=\"widget_title\" name=\"widget_title\" type=\"text\" value=\"<?php echo htmlspecialchars($wpca_settings['widget_title']); ?>\" /></label></p>\r\n <br />\r\n <label for=\"wpCareers-widget_format\">\r\n <input class=\"checkbox\" id=\"widget_format\" name=\"widget_format\" type=\"checkbox\" value=\"y\"<?php echo ($wpca_settings['widget_format']=='y')?\" checked\":\"\";?>>Small Format Output</label><br />\r\n <input type=\"hidden\" id=\"wpCareers-submit\" name=\"wpCareers-submit\" value=\"1\" />\r\n <?php\r\n }\r\n \r\n function widget_display() {\r\n $wpca_settings = get_option('wpcareers');\r\n //$out = wpcaLastPosts($wpca_settings['widget_format']);\r\n return $out;\r\n }\r\n \r\n wp_register_sidebar_widget('wpCareers', 'widget', null, 'wpCareers');\r\n register_widget_control('wpCareers', 'widget_control');\r\n }", "function urbanfitness_widgets()\n{\n //registering widget must write php code to show it\n register_sidebar([\n 'name' => 'Sidebar', //widget name on wordpress panel\n 'id' => 'sidebar', //we are passing this id to dynamic_widget('sidebar') must be unique for wordpress to identify\n 'before_widget' => '<div class=\"widget\">', //html before widget\n 'after_widget' => '</div>', //html after widget\n 'before_title' => '<h3 class=\"text-primary\">', //html before title\n 'after_title' => '</h3>', //html after title\n ]);\n}", "function widget_sparkplug_register() {\n\twp_register_sidebar_widget( 'sparkplug', 'Sparkplug', 'widget_sparkplug', array( 'description' => 'Display a sparkline chart showing post frequency for the current author/tag/category/blog.' ) );\n\twp_register_widget_control( 'sparkplug', 'Sparkplug', 'widget_sparkplug_control' );\n}", "public function register_dashboard_widgets() {\n\t\t$widget_render = array( &$this, 'render_widget' );\n\n\t\tif ( false !== $this->option( 'widget_id' ) && false !== $this->option( 'widget_name' ) ) {\n\t\t\t$wid = $this->option( 'widget_id' );\n\t\t\t$wname = $this->option( 'widget_name' );\n\t\t\t$save_widget = ( ! empty( $this->fields() ) ) ? array( &$this, 'save_widget' ) : false;\n\t\t\twp_add_dashboard_widget( $wid, $wname, $widget_render, $save_widget );\n\t\t}\n\t}", "function aidtransparency_widgets_init() {\r\n\r\n $widgetDefaults = array(\r\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n 'after_widget' => \"</aside>\",\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>'\r\n );\r\n\r\n\r\n register_sidebar(\r\n array_merge(\r\n $widgetDefaults,\r\n array(\r\n 'name' => __( 'Home Page Sidebar', 'aidtransparency' ),\r\n 'id' => 'sidebar-3',\r\n 'description' => __( 'The Home Page widgetized area', 'aidtransparency')\r\n )\r\n )\r\n );\r\n\r\n register_sidebar(\r\n array_merge(\r\n $widgetDefaults,\r\n array(\r\n 'name' => __( 'Page Sidebar', 'aidtransparency' ),\r\n 'id' => 'sidebar-1',\r\n 'description' => __( 'The Sidebar widgetized area', 'aidtransparency')\r\n )\r\n )\r\n );\r\n\r\n register_sidebar(\r\n array_merge(\r\n $widgetDefaults,\r\n array(\r\n 'name' => __( 'Blog Sidebar', 'aidtransparency' ),\r\n 'id' => 'sidebar-2',\r\n 'description' => __( 'The Blog Sidebar widgetized area', 'aidtransparency')\r\n )\r\n )\r\n );\r\n\r\n register_sidebar(\r\n array_merge(\r\n $widgetDefaults,\r\n array(\r\n 'name' => __( 'Footer', 'aidtransparency' ),\r\n 'id' => 'footer-1',\r\n 'description' => __( 'The Footer widgetized area', 'aidtransparency' )\r\n )\r\n )\r\n );\r\n}", "function reg_wp_footer_widget() {\n\t // First Footer Widget.\n\t$template_uri = get_template_directory_uri();\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget One' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-1',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/bulb.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h3>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Second Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget Two' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-2',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/recent_post_icon.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h4>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Third Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget Three' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-3',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/contact_us_icons.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h4>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Fourth Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Page Sidebar' ), 'wpthemes1' ),\n\t\t'id' => 'sidebar1',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h2 class=\"widgettitle\">',\n\t\t'after_title' => \"</h2>\\n\",\n\t);\n\tregister_sidebar( $args );\n}", "function sparcwp_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'sparcwp' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Widget 4 Column', 'sparcwp' ),\n\t\t'id' => 'footer-widgets-four-column',\n\t\t'description' => __( 'Each widget added will be 25% width', 'sparcwp' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget footer-widget %2$s four-column\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Widget Full Width', 'sparcwp' ),\n\t\t'id' => 'footer-widgets-full-width',\n\t\t'description' => __( 'Wrap footer blocks in cols if needed', 'sparcwp' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget footer-widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n}", "function mythemepost_widgets(){ \n register_sidebar( array(\n 'name' => 'Lavel Up New Widget Area',\n 'id' => 'level_up_new_widget_area',\n 'before_widget' => '<aside>',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n \n ));\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Widget oben rechts',\n 'id' => 'widget_top_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget mitte rechts',\n 'id' => 'widget_center_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget unten rechts',\n 'id' => 'widget_bottom_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Newsletter Widget',\n 'id' => 'newsletter_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Custom Footer Widget',\n 'id' => 'footer_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}", "function twentyfifteen_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Widget Area', 'twentyfifteen' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}" ]
[ "0.8390025", "0.83101994", "0.82505625", "0.82505625", "0.82282835", "0.80624324", "0.79771596", "0.7901524", "0.7809308", "0.77684814", "0.77520776", "0.7727257", "0.7609239", "0.75666004", "0.75445676", "0.75443226", "0.7522003", "0.75196254", "0.75170845", "0.7512498", "0.7447794", "0.7446988", "0.74403644", "0.73797035", "0.7377074", "0.7355821", "0.73377615", "0.7337268", "0.73335594", "0.7328682", "0.73182005", "0.73169446", "0.7298888", "0.7290922", "0.7250272", "0.72397614", "0.7228767", "0.7226242", "0.7219717", "0.7201903", "0.7187676", "0.7166757", "0.71408266", "0.7139097", "0.7133043", "0.7121191", "0.7116391", "0.70914453", "0.7086108", "0.70773035", "0.7073097", "0.70627826", "0.7054209", "0.7047725", "0.7043728", "0.70430505", "0.70393866", "0.70383275", "0.7036506", "0.7034996", "0.70253414", "0.70248973", "0.7024256", "0.70237195", "0.70200586", "0.7008153", "0.6998476", "0.6996311", "0.699286", "0.69875365", "0.6987385", "0.69862676", "0.698265", "0.69741976", "0.696835", "0.69600004", "0.69569546", "0.6948305", "0.6945937", "0.69412565", "0.6935894", "0.693448", "0.6932985", "0.6923548", "0.69225895", "0.69146496", "0.6908146", "0.6907732", "0.6890926", "0.6890926", "0.68861413", "0.6874315", "0.68732387", "0.6858937", "0.68582195", "0.6840389", "0.6823092", "0.6816244", "0.6809824", "0.680631", "0.68060595" ]
0.0
-1
processes widget options to be saved
function update($new_instance, $old_instance) { $instance = $old_instance; $instance['sidebar_menu'] = $new_instance['sidebar_menu']; return $instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handle_options()\r\n {\r\n $options = $this->get_options();\r\n \r\n if (isset($_POST['submitted'])) {\r\n \t\t\r\n \t\t//check security\r\n \t\tcheck_admin_referer('snazzy-nonce');\r\n \t\t\r\n $options = array();\r\n \r\n $options['years'] = htmlspecialchars($_POST['years']);\r\n $options['mini'] = $_POST['mini'];\r\n $options['posts'] = $_POST['posts'];\r\n $options['pages'] = $_POST['pages'];\r\n \r\n update_option($this->db_option, $options);\r\n \r\n echo '<div class=\"updated fade\"><p>Plugin settings saved.</p></div>';\r\n }\r\n \r\n $layout = $options['layout'];\r\n $years = stripslashes($options['years']);\r\n $mini = $options['mini'] == 'on' ? 'checked' : '';\r\n $posts = $options['posts'] == 'on' ? 'checked' : '';\r\n $pages = $options['pages'] == 'on' ? 'checked' : '';\r\n \r\n // URL for form submit, equals our current page\r\n $action_url = $_SERVER['REQUEST_URI'];\r\n \r\n include('snazzy-archives-options.php');\r\n }", "function save_options(){\n\t\t\n\t\t$nonsavable_types=array('open', 'close','subtitle','title','documentation','block','blockclose');\n\t\n\t\t//insert the default values if the fields are empty\n\t\tforeach ($this->options as $value) {\n\t\t\tif(isset($value['id']) && get_option($value['id'])===false && isset($value['std']) && !in_array($value['type'], $nonsavable_types)){\n\t\t\t\tupdate_option( $value['id'], $value['std']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//save the field's values if the Save action is present\n\t\tif ( $_GET['page'] == HANA_OPTIONS_PAGE ) {\n\t\t\tif ( isset($_REQUEST['action']) && 'save' == $_REQUEST['action'] ) {\n\t\t\t\t//verify the nonce\n\t\t\t\tif ( empty($_POST) || !wp_verify_nonce($_POST['hana-theme-options'],'hana-theme-update-options') )\n\t\t\t\t{\n\t\t\t\t\tprint 'Sorry, your nonce did not verify.';\n\t\t\t\t\texit;\n\t\t\t\t}else{\n\t\t\t\t\tif(!get_option(HANA_SHORTNAME.'_first_save')){\n\t\t\t\t\t\tupdate_option(HANA_SHORTNAME.'_first_save','true');\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($this->options as $value) {\n\t\t\t\t\t\tif(isset($value['id']) ) if( isset( $_REQUEST[ $value['id'] ] ) && !in_array($value['type'], $nonsavable_types)) {\n\t\t\t\t\t\t\tupdate_option( $value['id'], $_REQUEST[ $value['id'] ] );\n\t\t\t\t\t\t} elseif(!in_array($value['type'], $nonsavable_types)){\n\t\t\t\t\t\t\tdelete_option( $value['id'] );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t/* Update the values for the custom options that contain unlimited suboptions - for example when having\n\t\t\t\t\t\t * a slider with fields \"title\" and \"imageurl\", for all the entities the titles will be saved in one field,\n\t\t\t\t\t\t * separated by a separator. In this case, if the field name is slider_title and it contains some data like\n\t\t\t\t\t\t * title 1|*|title2|*|title3 (|*| is the separator), then all this data will be saved into a custom field\n\t\t\t\t\t\t * with id slider_titles.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif($value['type']=='custom'){\n\t\t\t\t\t\t\tforeach($value['fields'] as $field){\n\t\t\t\t\t\t\t\tupdate_option( $field['id'].'s', $_REQUEST[ $field['id'].'s' ] );\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\theader(\"Location: admin.php?page=\".HANA_OPTIONS_PAGE.\"&saved=true\");\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}", "function save_options() {\r\n\t\t$this->version = BF_VERSION;\r\n\t\t\r\n\t\t$this->feed_url = (string)$_POST['bf-rss-feed-url'];\r\n\t\t$this->comments_feed_url = (string)$_POST['bf-rss-comments-url'];\r\n\t\t$this->footer_message = (string)($_POST['bf-footer-message']);\r\n\t\t\r\n\t\t$this->featured_cat = (int)$_POST['bf-cat-featured'];\r\n\t\t$this->news_cat = (int)$_POST['bf-cat-news'];\r\n\t\t$this->asides_cat = (int)$_POST['bf-cat-asides'];\r\n\t\t\r\n\t\t$this->home_link = (string)$_POST['bf-nav-home'];\r\n\t\t$this->blog_link = (string)$_POST['bf-nav-blog'];\r\n\t\t$this->single_parent = (string)$_POST['bf-nav-singleparent'];\r\n\t\t$this->topnav_linkcat = (int)$_POST['bf-nav-linkcat'];\r\n\t\t\r\n\t\t$this->display_author = (boolean)$_POST['bf-layout-display-author'];\r\n\r\n\t\t$this->hooks = array();\r\n\t\t$hook_classes = $_POST['bf-hook-cond'];\r\n\t\t$hook_filters = $_POST['bf-hook-filter'];\r\n\t\t$hook_positions = $_POST['bf-hook-position'];\r\n\t\t$hook_codes = $_POST['bf-hook-html'];\r\n\t\t\r\n\t\tfor ( $i = 0; $i < count($hook_positions); $i++ ) {\r\n\t\t\t$this->hooks[] = array(\r\n\t\t\t\t'ID'\t\t=>\t(string)stripslashes($hook_classes[$i]),\r\n\t\t\t\t'filter'\t=>\t$hook_filters[$i],\r\n\t\t\t\t'position'\t=>\t(string)stripslashes($hook_positions[$i]),\r\n\t\t\t\t'code'\t\t=>\t$hook_codes[$i]\r\n\t\t\t);\r\n\t\t}\r\n\t}", "function widget_opml_browser_init() {\r\n\t\r\n\t// Check for the required API functions\r\n\tif ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )\r\n\t\treturn;\r\n\r\n\t// This saves options and prints the widget's config form.\r\n\tfunction widget_opml_browser_control($number) {\r\n\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n if ( $_POST[\"opml-browser-submit-$number\"] ) {\r\n $newoptions[$number]['title'] = strip_tags(stripslashes($_POST[\"opml-browser-title-$number\"]));\r\n $newoptions[$number]['opmlurl'] = $_POST[\"opml-browser-opmlurl-$number\"];\r\n $newoptions[$number]['opmlpath'] = $_POST[\"opml-browser-opmlpath-$number\"];\r\n $newoptions[$number]['opmltitle'] = $_POST[\"opml-browser-opmltitle-$number\"];\r\n\t $newoptions[$number]['imageurl'] = $_POST[\"opml-browser-imageurl-$number\"];\r\n $newoptions[$number]['monda'] = $_POST[\"opml-browser-monda-$number\"];\r\n $newoptions[$number]['reqhtml'] = $_POST[\"opml-browser-reqhtml-$number\"];\r\n $newoptions[$number]['reqfeed'] = $_POST[\"opml-browser-reqfeed-$number\"];\r\n $newoptions[$number]['noself'] = $_POST[\"opml-browser-noself-$number\"];\r\n $newoptions[$number]['opmllink'] = $_POST[\"opml-browser-opmllink-$number\"];\r\n $newoptions[$number]['showfolders'] = $_POST[\"opml-browser-showfolders-$number\"];\r\n $newoptions[$number]['closeall'] = $_POST[\"opml-browser-closeall-$number\"];\r\n\t $newoptions[$number]['sortitems'] = $_POST[\"opml-browser-sortitems-$number\"];\r\n\t $newoptions[$number]['flatten'] = $_POST[\"opml-browser-flatten-$number\"];\r\n\t $newoptions[$number]['tooltips'] = $_POST[\"opml-browser-tooltips-$number\"];\r\n $newoptions[$number]['indent'] = $_POST[\"opml-browser-indent-$number\"];\r\n\t $newoptions[$number]['credit'] = $_POST[\"opml-browser-credit-$number\"];\r\n wp_cache_delete(\"opml-browser-content-$number\");\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_opml_browser', $options);\r\n }\r\n $browser = new OpmlBrowser();\r\n ?>\r\n\t<div style=\"text-align:right\">\r\n\t <label for=\"opml-browser-title-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Widget title: <input type=\"text\" id=\"opml-browser-title-<?php echo $number; ?>\" name=\"opml-browser-title-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo htmlspecialchars($options[$number]['title'], ENT_COMPAT, \"UTF-8\", false); ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML URL: <input type=\"text\" id=\"opml-browser-opmlurl-<?php echo $number; ?>\" name=\"opml-browser-opmlurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlpath-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Local path: <input type=\"text\" id=\"opml-browser-opmlpath-<?php echo $number; ?>\" name=\"opml-browser-opmlpath-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlpath']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmltitle-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML title override: <input type=\"text\" id=\"opml-browser-opmltitle-<?php echo $number; ?>\" name=\"opml-browser-opmltitle-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmltitle']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-imageurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Image URL: <input type=\"text\" id=\"opml-browser-imageurl-<?php echo $number; ?>\" name=\"opml-browser-imageurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['imageurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-monda-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Use rss.png from wp-includes/images (Monda option)? <input type=\"checkbox\" id=\"opml-browser-monda-<?php echo $number; ?>\" name=\"opml-browser-monda-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['monda'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqhtml-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no HTML link? <input type=\"checkbox\" id=\"opml-browser-reqhtml-<?php echo $number; ?>\" name=\"opml-browser-reqhtml-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqhtml'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqfeed-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no feed link? <input type=\"checkbox\" id=\"opml-browser-reqfeed-<?php echo $number; ?>\" name=\"opml-browser-reqfeed-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqfeed'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-noself-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude <?php echo $browser->host;?>? <input type=\"checkbox\" id=\"opml-browser-noself-<?php echo $number; ?>\" name=\"opml-browser-noself-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['noself'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-opmllink-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Link to OPML? <input type=\"checkbox\" id=\"opml-browser-opmllink-<?php echo $number; ?>\" name=\"opml-browser-opmllink-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['opmllink'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-showfolders-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Show clickable folders for categories? <input type=\"checkbox\" id=\"opml-browser-showfolders-<?php echo $number; ?>\" name=\"opml-browser-showfolders-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['showfolders'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-closeall-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Start with folders closed? <input type=\"checkbox\" id=\"opml-browser-closeall-<?php echo $number; ?>\" name=\"opml-browser-closeall-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['closeall'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-sortitems-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Sort items? <input type=\"checkbox\" id=\"opml-browser-sortitems-<?php echo $number; ?>\" name=\"opml-browser-sortitems-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['sortitems'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-flatten-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Flatten hierarchy? <input type=\"checkbox\" id=\"opml-browser-flatten-<?php echo $number; ?>\" name=\"opml-browser-flatten-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['flatten'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-tooltips-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include OPML descriptions as tooltips? <input type=\"checkbox\" id=\"opml-browser-tooltips-<?php echo $number; ?>\" name=\"opml-browser-tooltips-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['tooltips'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-indent-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Left indent (CSS margin) <input type=\"text\", id=\"opml-browser-indent-<?php echo $number; ?>\" name=\"opml-browser-indent-<?php echo $number; ?>\" size=\"10\" value=\"<?php echo $options[$number]['indent']; ?>\" />\r\n\t </label>\r\n\t <label for=\"opml-browser-credit-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include &quot;Get this widget&quot; link (please)? <input type=\"checkbox\" id=\"opml-browser-credit-<?php echo $number; ?>\" name=\"opml-browser-credit-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['credit'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <input type=\"hidden\" name=\"opml-browser-submit-<?php echo $number; ?>\" id=\"opml-browser-submit-<?php echo $number; ?>\" value=\"1\" />\r\n\t</div>\r\n\t <?php\r\n\t}\r\n \r\n\r\n\t// This prints the widget\r\n\tfunction widget_opml_browser($args, $number = 1) {\r\n \r\n \t extract($args);\r\n\t $defaults = array('title' => 'Blogroll');\r\n\t $options = (array) get_option('widget_opml_browser');\r\n\t\r\n\t foreach ( $defaults as $key => $value )\r\n\t\tif ( !isset($options[$number][$key]) )\r\n\t\t\t$options[$number][$key] = $defaults[$key];\r\n\t\r\n\t echo $before_widget;\r\n\t echo $before_title . $options[$number]['title'] . $after_title;\r\n\t ?>\r\n\r\n <div id=\"opml-browser-box-<?php echo $number; ?>\">\r\n <?php\r\n if ($widget_content = wp_cache_get(\"opml-browser-content-$number\")) {\r\n echo $widget_content; // Found it in the cache\r\n }\r\n else\r\n {\r\n if (isset($options[$number]['opmlpath']) && ($options[$number]['opmlpath'] != ''))\r\n $filename = $options[$number]['opmlpath'];\r\n else\r\n $filename = $options[$number]['opmlurl'];\r\n if (isset($filename) && ($filename != '')) {\r\n $browser = new OpmlBrowser();\r\n $browser->filename = $filename;\r\n if ($options[$number]['opmllink'] == '1')\r\n {\r\n $browser->opmlurl = $options[$number]['opmlurl'];\r\n $browser->opmltitle = $options[$number]['opmltitle'];\r\n }\r\n\t\t\t$imageurl = $options[$number]['imageurl'];\r\n\t\t\tif (isset($imageurl) && ($imageurl != ''))\r\n\t\t\t{\r\n\t\t\t if (substr_compare($imageurl, '/', -1) != 0)\r\n\t\t\t {\r\n\t\t\t $imageurl .= '/';\r\n\t\t\t }\r\n\t\t\t $browser->image_url = $imageurl;\r\n\t\t\t}\r\n\t\t\t$browser->monda = ($options[$number]['monda'] == '1');\r\n $browser->require_html = ($options[$number]['reqhtml'] == '1');\r\n $browser->require_feed = ($options[$number]['reqfeed'] == '1');\r\n $browser->exclude_self = ($options[$number]['noself'] == '1');\r\n\t\t\t$browser->show_folders = ($options[$number]['showfolders'] == '1');\r\n $browser->closeall = ($options[$number]['closeall'] == '1');\r\n $browser->sort_items = ($options[$number]['sortitems'] == '1');\r\n\t\t\t$browser->flatten = ($options[$number]['flatten'] == '1');\r\n\t\t\t$browser->tooltips = ($options[$number]['tooltips'] == '1');\r\n $browser->margin = $options[$number]['indent'];\r\n\t\t\t$browser->credit = ($options[$number]['credit'] == '1');\r\n $browser->name = \"-widget-$number-\";\r\n $widget_content = $browser->render();\r\n\t\t\tif ($browser->credit)\r\n\t\t\t{\r\n\t\t\t $widget_content.= '<div id=\"opml-browser-link-' . $number . '\" class=\"opml-browser-link\"><a href=\"http://chipstips.com/?tag=phpopmlbrowse\">Get this widget</a></div>';\r\n\t\t\t}\r\n echo $widget_content;\r\n wp_cache_add(\"opml-browser-content-$number\", $widget_content);\r\n }\r\n else\r\n {\r\n echo \"<p>OPML URL or file not specified</p>\";\r\n }\r\n }\r\n ?>\r\n </div>\r\n\t <?php\r\n\t\techo $after_widget;\r\n\t}\r\n\r\n function widget_opml_browser_register()\r\n {\r\n // Check for version upgrade\r\n $options = get_option('widget_opml_browser');\r\n $need_update = false;\r\n if (isset($options['version'])) {\r\n $curver = $options['version'];\r\n if ($curver < 1.2) {\r\n $curver = 1.2;\r\n $options['version'] = $curver;\r\n $options[1]['title'] = $options['title'];\r\n $options[1]['opmlurl'] = $options['opmlurl'];\r\n $options[1]['opmlpath'] = $options['opmlpath'];\r\n $options[1]['reqhtml'] = $options['reqhtml'];\r\n $options[1]['reqfeed'] = $options['reqfeed'];\r\n $options[1]['noself'] = $options['noself'];\r\n $options[1]['opmllink'] = $options['opmllink'];\r\n $options[1]['closeall'] = $options['closeall'];\r\n $options[1]['indent'] = $options['indent'];\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n /* No changes to options between 1.2 and 2.2 */\r\n\t if ($curver < 2.2) {\r\n\t $curver = 2.2;\r\n $options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t\t $options[$i]['tooltips'] = '1';\r\n\t\t $options[$i]['credit'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.3) {\r\n\t $curver = 2.3;\r\n\t\t$options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['showfolders'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.4) {\r\n\t $curver = 2.4;\r\n\t\t$options['version'] = $curver;\r\n\t\t$need_update = true;\r\n\t }\r\n }\r\n else {\r\n $curver = 2.4;\r\n $options['version'] = $curver;\r\n\t $options[1]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t $options[1]['tooltips'] = '1';\r\n $options[1]['indent'] = \"5px\";\r\n\t $options[1]['credit'] = '1';\r\n $need_update = true;\r\n }\r\n\r\n $number = $options['number'];\r\n if ( $number < 1 ) {\r\n $number = 1;\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n else if ( $number > 9 ) {\r\n $number = 9;\r\n $options['number'] = 9;\r\n $need_update = true;\r\n }\r\n\r\n // Apply any upgrades here by testing $curver and setting $need_update to true\r\n\r\n if ($need_update)\r\n update_option('widget_opml_browser', $options);\r\n\r\n for ($i = 1; $i <= 9; $i++) {\r\n $name = array('opml-browser %s', null, $i);\r\n register_sidebar_widget($name, $i <= $number ? 'widget_opml_browser' : /* unregister */ '', $i);\r\n register_widget_control($name, $i <= $number ? 'widget_opml_browser_control' : /* unregister */ '', 550, 500, $i);\r\n }\r\n add_action('sidebar_admin_setup', 'widget_opml_browser_setup');\r\n add_action('sidebar_admin_page', 'widget_opml_browser_page');\r\n\r\n // add the Link to the OPML file For Autodiscovery\r\n add_action('wp_head', 'opml_browser_head');\t\r\n\r\n // Add a filter for embedded browsers in content\r\n add_filter('the_content', 'opml_browser_content_filter');\r\n }\r\n\r\n function widget_opml_browser_setup() {\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n if ( isset($_POST['opml-browser-number-submit']) ) {\r\n $number = (int) $_POST['opml-browser-number'];\r\n if ( $number > 9 ) $number = 9;\r\n else if ( $number < 1 ) $number = 1;\r\n $newoptions['number'] = $number;\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_opml_browser', $options);\r\n widget_opml_browser_register();\r\n }\r\n }\r\n\r\n function widget_opml_browser_page() {\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n?>\r\n\t<div class=\"wrap\">\r\n\t\t<form method=\"POST\">\r\n\t\t\t<h2>OPML Browser Widgets</h2>\r\n\t\t\t<p><?php _e('How many opml-browser widgets would you like?'); ?>\r\n\t\t\t<select id=\"opml-browser-number\" name=\"opml-browser-number\" value=\"<?php echo $options['number']; ?>\">\r\n<?php for ( $i = 1; $i < 10; ++$i ) echo \"<option value='$i' \".($options['number']==$i ? \"selected='selected'\" : '').\">$i</option>\"; ?>\r\n\t\t\t</select>\r\n\t\t\t<span class=\"submit\"><input type=\"submit\" name=\"opml-browser-number-submit\" id=\"opml-browser-number-submit\" value=\"<?php _e('Save'); ?>\" /></span></p>\r\n\t\t</form>\r\n\t</div>\r\n<?php\r\n }\r\n\r\n function opml_browser_head(){\r\n $options = (array) get_option('widget_opml_browser');\r\n $number = $options['number'];\r\n for ($i = 1; $i <= 9; $i++) {\r\n $opmlurl = $options[$i]['opmlurl'];\r\n if (isset($opmlurl) && $opmlurl != '')\r\n echo ' <link rel=\"outline\" type=\"text/x-opml\" title=\"OPML\" href=\"'.$opmlurl.'\" />';\r\n }\r\n\t$filepath = get_settings('siteurl') . '/wp-content/plugins/opml-browser/';\r\n\t$filebase = $filepath . 'opml-browser.';\r\n // Link our JavaScript\r\n\techo '<script language=\"javascript\" type=\"text/javascript\" src=\"' . $filebase . 'js\"></script>';\r\n\t// and our stylesheet\r\n\techo '<link rel=\"StyleSheet\" type=\"text/css\" href=\"' . $filebase . 'css\"/>';\r\n\t// Set the image URL for JavaScript\r\n\techo '<script language=\"javascript\" type=\"text/javascript\">opml_browser.image_url = \\'' .\r\n\t\t$filepath . 'images\\';</script>';\r\n }\r\n\r\n function opml_browser_content_filter($text) {\r\n $textarray = preg_split(\"/(\\[opml-browser.*\\])/sU\", $text, -1, PREG_SPLIT_DELIM_CAPTURE);\r\n $limit = count($textarray);\r\n $output = '';\r\n for ($i = 0; $i < $limit; $i++) {\r\n $content = $textarray[$i];\r\n if (preg_match(\"/\\[opml-browser(.*)\\]/sU\", $content, $bcode)) {\r\n $bcode = $bcode[1];\r\n $bcode = preg_replace(array('/\\&#8221;/','/\\&#8243;/'), '\"', $bcode, -1);\r\n $browser = new OpmlBrowser();\r\n $browser->opmlurl = parse_attribute_value($bcode, \"opmlurl\");\r\n $browser->filename = parse_attribute_value($bcode, \"filename\");\r\n if (is_null($browser->filename) || $browser->filename == '') {\r\n $browser->filename = $browser->opmlurl;\r\n }\r\n if (parse_attribute_value($bcode, \"link_opml\") != \"1\") {\r\n $browser->opmlurl = null;\r\n }\r\n $browser->opmltitle = parse_attribute_value($bcode, 'opmltitle');\r\n\t\t$imageurl = parse_attribute_value($bcode, 'imageurl');\r\n\t\tif (isset($imageurl) && ($imageurl != ''))\r\n\t\t{\r\n\t\t if (substr_compare($imageurl, '/', -1) != 0)\r\n\t\t {\r\n\t\t $imageurl .= '/';\r\n\t\t }\r\n\t\t $browser->image_url = $imageurl;\r\n\t\t}\r\n\t\t$browser->monda = (parse_attribute_value($bcode, 'monda') == '1');\r\n $browser->require_html = (parse_attribute_value($bcode, 'require_html') == '1');\r\n $browser->require_feed = (parse_attribute_value($bcode, 'require_feed') == '1');\r\n $browser->exclude_self = (parse_attribute_value($bcode, 'exclude_self') == '1');\r\n $browser->show_folders = (parse_attribute_value($bcode, 'show_folders') != '0');\r\n $browser->closeall = (parse_attribute_value($bcode, 'closeall') == '1');\r\n\t\t$browser->sort_items = (parse_attribute_value($bcode, 'sort') == '1');\r\n\t\t$browser->flatten = (parse_attribute_value($bcode, 'flatten') == '1');\r\n\t\t$browser->tooltips = (parse_attribute_value($bcode, 'tooltips') != '0');\r\n $browser->margin = parse_attribute_value($bcode, 'margin');\r\n\t\t$browser->credit = (parse_attribute_value($bcode, 'credit') != '0');\r\n $browser->name = parse_attribute_value($bcode, 'name');\r\n $output .= $browser->render();\r\n }\r\n else\r\n $output .= $content;\r\n }\r\n return $output;\r\n }\r\n\r\n widget_opml_browser_register();\r\n}", "function emb_save_options() {\n\t}", "function widget_opml_browser_control($number) {\r\n\r\n $options = $newoptions = get_option('widget_opml_browser');\r\n if ( $_POST[\"opml-browser-submit-$number\"] ) {\r\n $newoptions[$number]['title'] = strip_tags(stripslashes($_POST[\"opml-browser-title-$number\"]));\r\n $newoptions[$number]['opmlurl'] = $_POST[\"opml-browser-opmlurl-$number\"];\r\n $newoptions[$number]['opmlpath'] = $_POST[\"opml-browser-opmlpath-$number\"];\r\n $newoptions[$number]['opmltitle'] = $_POST[\"opml-browser-opmltitle-$number\"];\r\n\t $newoptions[$number]['imageurl'] = $_POST[\"opml-browser-imageurl-$number\"];\r\n $newoptions[$number]['monda'] = $_POST[\"opml-browser-monda-$number\"];\r\n $newoptions[$number]['reqhtml'] = $_POST[\"opml-browser-reqhtml-$number\"];\r\n $newoptions[$number]['reqfeed'] = $_POST[\"opml-browser-reqfeed-$number\"];\r\n $newoptions[$number]['noself'] = $_POST[\"opml-browser-noself-$number\"];\r\n $newoptions[$number]['opmllink'] = $_POST[\"opml-browser-opmllink-$number\"];\r\n $newoptions[$number]['showfolders'] = $_POST[\"opml-browser-showfolders-$number\"];\r\n $newoptions[$number]['closeall'] = $_POST[\"opml-browser-closeall-$number\"];\r\n\t $newoptions[$number]['sortitems'] = $_POST[\"opml-browser-sortitems-$number\"];\r\n\t $newoptions[$number]['flatten'] = $_POST[\"opml-browser-flatten-$number\"];\r\n\t $newoptions[$number]['tooltips'] = $_POST[\"opml-browser-tooltips-$number\"];\r\n $newoptions[$number]['indent'] = $_POST[\"opml-browser-indent-$number\"];\r\n\t $newoptions[$number]['credit'] = $_POST[\"opml-browser-credit-$number\"];\r\n wp_cache_delete(\"opml-browser-content-$number\");\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_opml_browser', $options);\r\n }\r\n $browser = new OpmlBrowser();\r\n ?>\r\n\t<div style=\"text-align:right\">\r\n\t <label for=\"opml-browser-title-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Widget title: <input type=\"text\" id=\"opml-browser-title-<?php echo $number; ?>\" name=\"opml-browser-title-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo htmlspecialchars($options[$number]['title'], ENT_COMPAT, \"UTF-8\", false); ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML URL: <input type=\"text\" id=\"opml-browser-opmlurl-<?php echo $number; ?>\" name=\"opml-browser-opmlurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmlpath-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Local path: <input type=\"text\" id=\"opml-browser-opmlpath-<?php echo $number; ?>\" name=\"opml-browser-opmlpath-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmlpath']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-opmltitle-<?php echo $number; ?>\" style=\"display:block\">\r\n\t OPML title override: <input type=\"text\" id=\"opml-browser-opmltitle-<?php echo $number; ?>\" name=\"opml-browser-opmltitle-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['opmltitle']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-imageurl-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Image URL: <input type=\"text\" id=\"opml-browser-imageurl-<?php echo $number; ?>\" name=\"opml-browser-imageurl-<?php echo $number; ?>\" size=\"50\" value=\"<?php echo $options[$number]['imageurl']; ?>\" />\r\n\t </label>\r\n <label for=\"opml-browser-monda-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Use rss.png from wp-includes/images (Monda option)? <input type=\"checkbox\" id=\"opml-browser-monda-<?php echo $number; ?>\" name=\"opml-browser-monda-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['monda'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqhtml-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no HTML link? <input type=\"checkbox\" id=\"opml-browser-reqhtml-<?php echo $number; ?>\" name=\"opml-browser-reqhtml-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqhtml'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-reqfeed-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude if no feed link? <input type=\"checkbox\" id=\"opml-browser-reqfeed-<?php echo $number; ?>\" name=\"opml-browser-reqfeed-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['reqfeed'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-noself-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Exclude <?php echo $browser->host;?>? <input type=\"checkbox\" id=\"opml-browser-noself-<?php echo $number; ?>\" name=\"opml-browser-noself-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['noself'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-opmllink-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Link to OPML? <input type=\"checkbox\" id=\"opml-browser-opmllink-<?php echo $number; ?>\" name=\"opml-browser-opmllink-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['opmllink'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-showfolders-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Show clickable folders for categories? <input type=\"checkbox\" id=\"opml-browser-showfolders-<?php echo $number; ?>\" name=\"opml-browser-showfolders-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['showfolders'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-closeall-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Start with folders closed? <input type=\"checkbox\" id=\"opml-browser-closeall-<?php echo $number; ?>\" name=\"opml-browser-closeall-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['closeall'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-sortitems-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Sort items? <input type=\"checkbox\" id=\"opml-browser-sortitems-<?php echo $number; ?>\" name=\"opml-browser-sortitems-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['sortitems'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-flatten-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Flatten hierarchy? <input type=\"checkbox\" id=\"opml-browser-flatten-<?php echo $number; ?>\" name=\"opml-browser-flatten-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['flatten'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <label for=\"opml-browser-tooltips-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include OPML descriptions as tooltips? <input type=\"checkbox\" id=\"opml-browser-tooltips-<?php echo $number; ?>\" name=\"opml-browser-tooltips-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['tooltips'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n <label for=\"opml-browser-indent-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Left indent (CSS margin) <input type=\"text\", id=\"opml-browser-indent-<?php echo $number; ?>\" name=\"opml-browser-indent-<?php echo $number; ?>\" size=\"10\" value=\"<?php echo $options[$number]['indent']; ?>\" />\r\n\t </label>\r\n\t <label for=\"opml-browser-credit-<?php echo $number; ?>\" style=\"display:block\">\r\n\t Include &quot;Get this widget&quot; link (please)? <input type=\"checkbox\" id=\"opml-browser-credit-<?php echo $number; ?>\" name=\"opml-browser-credit-<?php echo $number; ?>\" value=\"1\" <?php if ($options[$number]['credit'] == '1') { ?>checked=\"true\"<?php } ?> />\r\n\t </label>\r\n\t <input type=\"hidden\" name=\"opml-browser-submit-<?php echo $number; ?>\" id=\"opml-browser-submit-<?php echo $number; ?>\" value=\"1\" />\r\n\t</div>\r\n\t <?php\r\n\t}", "public function save_widget_state() {\n\n\t\tcheck_ajax_referer( 'mi-admin-nonce', 'nonce' );\n\n\t\t$default = self::$default_options;\n\t\t$current_options = $this->get_options();\n\n\t\t$reports = $default['reports'];\n\t\tif ( isset( $_POST['reports'] ) ) {\n\t\t\t$reports = json_decode( sanitize_text_field( wp_unslash( $_POST['reports'] ) ), true );\n\t\t\tforeach ( $reports as $report => $reports_sections ) {\n\t\t\t\t$reports[ $report ] = array_map( 'boolval', $reports_sections );\n\t\t\t}\n\t\t}\n\n\t\t$options = array(\n\t\t\t'width' => ! empty( $_POST['width'] ) ? sanitize_text_field( wp_unslash( $_POST['width'] ) ) : $default['width'],\n\t\t\t'interval' => ! empty( $_POST['interval'] ) ? absint( wp_unslash( $_POST['interval'] ) ) : $default['interval'],\n\t\t\t'compact' => ! empty( $_POST['compact'] ) ? 'true' === sanitize_text_field( wp_unslash( $_POST['compact'] ) ) : $default['compact'],\n\t\t\t'reports' => $reports,\n\t\t\t'notice30day' => $current_options['notice30day'],\n\t\t);\n\n\t\tarray_walk( $options, 'sanitize_text_field' );\n\t\tupdate_user_meta( get_current_user_id(), 'monsterinsights_user_preferences', $options );\n\n\t\twp_send_json_success();\n\n\t}", "function widgetControlOutput( ) {\r\n\t\t\t$options = get_option( 'ILuvWalking.com Widget' );\r\n\t\t\tif( isset( $_POST[ \"iluvwalking-com-submit\" ] ) ) {\r\n\t\t\t\t$options[ 'title' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-title' ] ) );\r\n\t\t\t\t$options[ 'name' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-name' ] ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_option( 'ILuvWalking.com Widget', $options );\r\n\t\t\t\r\n\t\t\t$title = attribute_escape( $options[ 'title' ] );\r\n\t\t\t$name = attribute_escape( $options[ 'name' ] );\r\n\t\t\t\r\n\t\t\tinclude ( 'views/widget-control.php' );\r\n\t\t}", "public function save_widget() {\n\t\t$this->get_cache();\n\t\t$this->get_db_values();\n\t\tif ( 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST[ $this->unique() ] ) ) {\n\t\t\t$this->get_db_values();\n\t\t\t$this->get_cache();\n\t\t\t$instance = new Save_Handler( array(\n\t\t\t\t'module' => &$this,\n\t\t\t\t'unique' => $this->unique(),\n\t\t\t\t'fields' => $this->fields(),\n\t\t\t\t'db_values' => $this->get_db_values(),\n\t\t\t) );\n\t\t\t$instance->run();\n\n\t\t\t$this->options_cache['field_errors'] = $instance->get_errors();\n\t\t\t$this->set_db_cache( $this->options_cache );\n\t\t\t$this->set_db_values( $instance->get_values() );\n\t\t\tif ( ! empty( $instance->get_errors() ) ) {\n\t\t\t\twp_redirect( add_query_arg( 'wponion-save', 'error' ) );\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->init_theme()->render();\n\t\t}\n\t}", "function beaver_extender_custom_options_save() {\n\t\n\tcheck_ajax_referer( 'custom-options', 'security' );\n\t\n\tif ( ! empty( $_POST['extender']['css_builder_popup_active'] ) || beaver_extender_get_custom_css( 'css_builder_popup_active' ) )\n\t\t$custom_css = beaver_extender_preserve_backslashes( beaver_extender_get_custom_css( 'custom_css' ) );\n\telse\n\t\t$custom_css = $_POST['extender']['custom_css'];\n\n\t$css_update = array(\n\t\t'custom_css' => $custom_css,\n\t\t'css_builder_popup_active' => ! empty( $_POST['extender']['css_builder_popup_active'] ) ? 1 : 0\n\t);\n\t$css_update_merged = array_merge( beaver_extender_custom_css_options_defaults(), $css_update );\n\tupdate_option( 'beaver_extender_custom_css', $css_update_merged );\n\t\n\t$functions_default = '<?php\n/* Do not remove this line. Add your functions below. */\n';\n\t\n\tif ( ! empty( $_POST['custom_functions'] ) ) {\n\t\t\n\t\t$functions_update = array(\n\t\t\t'custom_functions_effect_admin' => ! empty( $_POST['custom_functions']['custom_functions_effect_admin'] ) ? 1 : 0,\n\t\t\t'custom_functions' => ( $_POST['custom_functions']['custom_functions'] != '' ) ? $_POST['custom_functions']['custom_functions'] : $functions_default\n\t\t);\n\t\t$functions_update_merged = array_merge( beaver_extender_custom_functions_options_defaults(), $functions_update );\n\t\tupdate_option( 'beaver_extender_custom_functions', $functions_update_merged );\n\t\t\n\t}\n\n\tif ( ! empty( $_POST['custom_js'] ) ) {\n\t\t\n\t\t$js_update = array(\n\t\t\t'custom_js_in_head' => ! empty( $_POST['custom_js']['custom_js_in_head'] ) ? 1 : 0,\n\t\t\t'custom_js' => $_POST['custom_js']['custom_js']\n\t\t);\n\t\t$js_update_merged = array_merge( beaver_extender_custom_js_options_defaults(), $js_update );\n\t\tupdate_option( 'beaver_extender_custom_js', $js_update_merged );\n\t\t\n\t}\n\n\tif ( ! empty( $_POST['custom_template_ids'] ) ) {\n\t\t\n\t\t$template_ids_empty = true;\n\t\tforeach( $_POST['custom_template_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$template_ids_empty = false;\n\n\t\t}\n\t\tforeach( $_POST['custom_template_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$template_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"File Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbeaver_extender_update_templates( $_POST['custom_template_ids'], $_POST['custom_template_names'], $_POST['custom_template_types'], $_POST['custom_template_post_types'], $_POST['custom_template_textarea'] );\n\t\t\n\t}\n\n\tif ( ! empty( $_POST['custom_label_names'] ) ) {\n\t\t\n\t\t$label_names_empty = true;\n\t\tforeach( $_POST['custom_label_names'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) ) {\n\t\t\t\t\n\t\t\t\t$label_names_empty = false;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tforeach( $_POST['custom_label_names'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$label_names_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbeaver_extender_update_labels( $_POST['custom_label_names'] );\n\n\t\tif ( ! empty( $_POST['custom_label_create_conditionals'] ) ) {\n\t\t\t\n\t\t\t$custom_conditional_ids = array();\n\t\t\t$custom_conditional_tags = array();\n\t\t\tforeach( $_POST['custom_label_create_conditionals'] as $key => $value ) {\n\t\t\t\t\n\t\t\t\t$custom_conditional_ids[] = 'has_label_' . str_replace( '-', '_', beaver_extender_sanitize_string( $_POST['custom_label_names'][$key] ) );\n\t\t\t\t$custom_conditional_tags[] = 'beaver_extender_has_label(\\'' . beaver_extender_sanitize_string( $_POST['custom_label_names'][$key] ) . '\\')';\n\t\t\t\t\n\t\t\t}\n\t\t\tbeaver_extender_update_conditionals( $custom_conditional_ids, $custom_conditional_tags );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\tif ( ! empty( $_POST['custom_widget_conditionals_list'] ) )\n\t\t$custom_widget_conditionals_list = $_POST['custom_widget_conditionals_list'];\n\telse\n\t\t$custom_widget_conditionals_list = array();\n\t\n\tif ( ! empty( $_POST['custom_hook_conditionals_list'] ) )\n\t\t$custom_hook_conditionals_list = $_POST['custom_hook_conditionals_list'];\n\telse\n\t\t$custom_hook_conditionals_list = array();\n\t\n\tif ( ! empty( $_POST['custom_conditional_ids'] ) ) {\n\t\t\n\t\t$conditional_ids_empty = true;\n\t\tforeach( $_POST['custom_conditional_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$conditional_ids_empty = false;\n\t\t\t\t\n\t\t}\n\t\tforeach( $_POST['custom_conditional_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$conditional_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbeaver_extender_update_conditionals( $_POST['custom_conditional_ids'], $_POST['custom_conditional_tags'] );\n\t\t\n\t}\n\tif ( ! empty( $_POST['custom_widget_ids'] ) ) {\n\t\t\n\t\t$widget_ids_empty = true;\n\t\tforeach( $_POST['custom_widget_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$widget_ids_empty = false;\n\t\t\t\t\n\t\t}\n\t\tforeach( $_POST['custom_widget_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$widget_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tbeaver_extender_update_widgets( $_POST['custom_widget_ids'], $custom_widget_conditionals_list, $_POST['custom_widget_hook'], $_POST['custom_widget_class'], $_POST['custom_widget_description'], $_POST['custom_widget_status'], $_POST['custom_widget_priority'] );\n\t\n\t}\n\tif ( ! empty( $_POST['custom_hook_ids'] ) ) {\n\t\t\n\t\t$hook_ids_empty = true;\n\t\tforeach( $_POST['custom_hook_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$hook_ids_empty = false;\n\n\t\t}\n\t\tforeach( $_POST['custom_hook_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$hook_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbeaver_extender_update_hooks( $_POST['custom_hook_ids'], $custom_hook_conditionals_list, $_POST['custom_hook_hook'], $_POST['custom_hook_status'], $_POST['custom_hook_priority'], $_POST['custom_hook_textarea'] );\n\t\n\t}\n\t\n\tbeaver_extender_write_files( $css = true );\n\t\n\techo 'Custom Options Updated';\n\texit();\n\t\n}", "function beaver_extender_custom_options() {\n\t\n\t$custom_functions = get_option( 'beaver_extender_custom_functions' );\n\t$custom_js = get_option( 'beaver_extender_custom_js' );\n\t$custom_templates = beaver_extender_get_templates();\n\t$custom_labels = beaver_extender_get_labels();\n\t$custom_conditionals = beaver_extender_get_conditionals();\n\t$custom_widgets = beaver_extender_get_widgets();\n\t$custom_hooks = beaver_extender_get_hooks();\n?>\n\t<div class=\"wrap\">\n\t\t\n\t\t<div id=\"beaver-extender-custom-saved\" class=\"beaver-extender-update-box\"></div>\n\n\t\t<?php\n\t\tif ( ! empty( $_POST['action'] ) && $_POST['action'] == 'reset' ) {\n\t\t\t\n\t\t\tbeaver_extender_reset_delete_template();\n\t\t\tupdate_option( 'beaver_extender_custom_css', beaver_extender_custom_css_options_defaults() );\n\t\t\tupdate_option( 'beaver_extender_custom_functions', beaver_extender_custom_functions_options_defaults() );\n\t\t\tupdate_option( 'beaver_extender_custom_js', beaver_extender_custom_js_options_defaults() );\n\t\t\tupdate_option( 'beaver_extender_custom_templates', array() );\n\t\t\tupdate_option( 'beaver_extender_custom_labels', array() );\n\t\t\tupdate_option( 'beaver_extender_custom_conditionals', array() );\n\t\t\tupdate_option( 'beaver_extender_custom_widget_areas', array() );\n\t\t\tupdate_option( 'beaver_extender_custom_hook_boxes', array() );\n\n\t\t\tbeaver_extender_get_custom_css( null, $args = array( 'cached' => false, 'array' => false ) );\n\t\t\t$custom_functions = get_option( 'beaver_extender_custom_functions' );\n\t\t\t$custom_js = get_option( 'beaver_extender_custom_js' );\n\t\t\t$custom_templates = beaver_extender_get_templates();\n\t\t\t$custom_labels = beaver_extender_get_labels();\n\t\t\t$custom_conditionals = beaver_extender_get_conditionals();\n\t\t\t$custom_widgets = beaver_extender_get_widgets();\n\t\t\t$custom_hooks = beaver_extender_get_hooks();\n\n\t\t\tbeaver_extender_write_files( $css = true );\n\t\t?>\n\t\t\t<script type=\"text/javascript\">jQuery(document).ready(function($){ $('#beaver-extender-custom-saved').html('Custom Options Reset').css(\"position\", \"fixed\").fadeIn('slow');window.setTimeout(function(){$('#beaver-extender-custom-saved').fadeOut( 'slow' );}, 2222); });</script>\n\t\t<?php\n\t\t}\n\n\t\tif ( ! empty( $_GET['activetab'] ) ) { ?>\n\t\t\t<script type=\"text/javascript\">jQuery(document).ready(function($) { $('#<?php echo $_GET['activetab']; ?>').click(); });</script>\t\n\t\t<?php\n\t\t} ?>\n\t\t\n\t\t<div id=\"icon-options-general\" class=\"icon32\"></div>\n\t\t\n\t\t<h2 id=\"beaver-extender-admin-heading\"><?php _e( 'Extender - Custom Options', 'extender' ); ?></h2>\n\t\t\n\t\t<div class=\"beaver-extender-css-builder-button-wrap\">\n\t\t\t<span id=\"show-hide-custom-css-builder\" class=\"button\"><?php _e( 'CSS Builder', 'extender' ); ?></span>\n\t\t</div>\n\n\t\t<div class=\"beaver-extender-php-builder-button-wrap\">\n\t\t\t<span id=\"show-hide-custom-php-builder\" class=\"button\"><?php _e( 'PHP Builder', 'extender' ); ?></span>\n\t\t</div>\n\t\t\n\t\t<div id=\"beaver-extender-admin-wrap\">\n\t\t\n\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-css-builder.php' ); ?>\n\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-php-builder.php' ); ?>\n\t\t\t\n\t\t\t<form action=\"/\" id=\"custom-options-form\" name=\"custom-options-form\">\n\t\t\t\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"beaver_extender_custom_options_save\" />\n\t\t\t\t<input type=\"hidden\" name=\"security\" value=\"<?php echo wp_create_nonce( 'custom-options' ); ?>\" />\n\t\t\t\n\t\t\t\t<div id=\"beaver-extender-floating-save\">\n\t\t\t\t\t<input type=\"submit\" value=\"<?php _e( 'Save Changes', 'extender' ); ?>\" name=\"Submit\" alt=\"Save Changes\" class=\"beaver-extender-save-button button button-primary\"/>\n\t\t\t\t\t<img class=\"beaver-extender-ajax-save-spinner\" src=\"<?php echo site_url() . '/wp-admin/images/spinner-2x.gif'; ?>\" />\n\t\t\t\t\t<span class=\"beaver-extender-saved\"></span>\n\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t<div id=\"beaver-extender-custom-options-nav\" class=\"beaver-extender-admin-nav\">\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li id=\"beaver-extender-custom-options-nav-css\" class=\"beaver-extender-options-nav-all beaver-extender-options-nav-active\"><a href=\"#\">CSS</a></li><li id=\"beaver-extender-custom-options-nav-functions\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Functions</a></li><li id=\"beaver-extender-custom-options-nav-js\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">JS</a></li><li id=\"beaver-extender-custom-options-nav-templates\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Templates</a></li><li id=\"beaver-extender-custom-options-nav-labels\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Labels</a></li><li id=\"beaver-extender-custom-options-nav-conditionals\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Conditionals</a></li><li id=\"beaver-extender-custom-options-nav-widget-areas\" class=\"beaver-extender-options-nav-all\"><a href=\"#\">Widget Areas</a></li><li id=\"beaver-extender-custom-options-nav-hook-boxes\" class=\"beaver-extender-options-nav-all\"><a class=\"beaver-extender-options-nav-last\" href=\"#\">Hook Boxes</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class=\"beaver-extender-custom-options-wrap\">\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-css.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-functions.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-js.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-templates.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-labels.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-conditionals.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-widget-areas.php' ); ?>\n\t\t\t\t\t<?php require_once( BBEXT_PATH . 'lib/admin/boxes/custom-hook-boxes.php' ); ?>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t</form>\n\n\t\t\t<div id=\"beaver-extender-admin-footer\">\n\t\t\t\t<p>\n\t\t\t\t\t<a href=\"https://cobaltapps.com\" target=\"_blank\">CobaltApps.com</a> | <a href=\"http://extenderdocs.cobaltapps.com/\" target=\"_blank\">Docs</a> | <a href=\"https://cobaltapps.com/my-account/\" target=\"_blank\">My Account</a> | <a href=\"https://cobaltapps.com/forum/\" target=\"_blank\">Community Forum</a> | <a href=\"https://cobaltapps.com/affiliates/\" target=\"_blank\">Affiliates</a> &middot;\n\t\t\t\t\t<a><span id=\"show-options-reset\" class=\"beaver-extender-options-reset-button button\" style=\"margin:0; float:none !important;\"><?php _e( 'Custom Options Reset', 'extender' ); ?></span></a><a href=\"http://extenderdocs.cobaltapps.com/article/156-custom-options-reset\" class=\"tooltip-mark\" target=\"_blank\">[?]</a>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style=\"display:none; width:160px; border:none; background:none; margin:0 auto; padding:0; float:none; position:inherit;\" id=\"show-options-reset-box\" class=\"beaver-extender-custom-fonts-box\">\n\t\t\t\t<form style=\"float:left;\" id=\"beaver-extender-reset-custom-options\" method=\"post\">\n\t\t\t\t\t<input style=\"background:#D54E21; width:160px !important; color:#FFFFFF !important; -webkit-box-shadow:none; box-shadow:none;\" type=\"submit\" value=\"<?php _e( 'Reset Custom Options', 'extender' ); ?>\" class=\"beaver-extender-reset button\" name=\"Submit\" onClick='return confirm(\"<?php _e( 'Are you sure your want to reset your Beaver Extender Custom Options?', 'extender' ); ?>\")'/><input type=\"hidden\" name=\"action\" value=\"reset\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t</div> <!-- Close Wrap -->\n<?php\n}", "public function mm_options_save() {\n $options = $this->options;\n\n //'include_css','show_captions','file_link','itemtag','icontag','captiontag','columns','size'\n if(wp_verify_nonce($_REQUEST['_wp_mm_bg_nonce'],'mm_bg')) {\n if ( isset($_POST['submit']) ) {\n ( function_exists('current_user_can') && !current_user_can('manage_options') ) ? die(__('Cheatin&#8217; uh?', 'mm_custom')) : null;\n \n $options['include_css'] = ( isset($_POST['mm-include_css']) ? 'true' : 'false' );\n $options['show_captions'] = ( isset($_POST['mm-show_captions']) ? 'true' : 'false' );\n $options['file_link'] = ( isset($_POST['mm-file_link']) ? 'true' : 'false' );\n $options['itemtag'] = ( isset($_POST['mm-itemtag']) ? stripslashes ( strip_tags($_POST['mm-itemtag'] ) ) : '' );\n $options['icontag'] = ( isset($_POST['mm-icontag']) ? stripslashes ( strip_tags($_POST['mm-icontag'] ) ) : '' );\n $options['captiontag'] = ( isset($_POST['mm-captiontag']) ? stripslashes ( strip_tags($_POST['mm-captiontag'] ) ) : '' );\n $options['columns'] = ( isset($_POST['mm-columns']) ? stripslashes ( strip_tags($_POST['mm-columns'] ) ) : '' );\n $options['size'] = ( isset($_POST['mm-size']) ? stripslashes ( strip_tags($_POST['mm-size'] ) ) : '' );\n $css = ( isset($_POST['mm-css']) ? stripslashes ( strip_tags($_POST['mm-css'] ) ) : 'false' );\n \n if($css != 'false') {\n $this->mm_update_css($css);\n update_option('mm_gallery_css', $css);\n }\n update_option('mm_gallery_options', $options);\n }\n }\n }", "public static function wpabstats_admin_html_save()\n {\n if( isset( $_POST['wpabstats_setting_post'] ) )\n {\n /**\n * GLOBAL ACTIVATION\n */\n delete_option('_wpabstats_active');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_active'] ) ) $isActive = $_POST['wpabstats_active'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_active', 'on' );\n\n /**\n * WIDGET CHART PAGE VIEW ON DASHBOARD\n */\n delete_option('_wpabstats_chart_page_widget');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_chart_page_widget'] ) ) $isActive = $_POST['wpabstats_chart_page_widget'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_chart_page_widget', 'on' );\n\n\n /**\n * WIDGET VISITOR VIEW ON DASHBOARD\n */\n delete_option('_wpabstats_visitor_container_widget');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_visitor_container_widget'] ) ) $isActive = $_POST['wpabstats_visitor_container_widget'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_visitor_container_widget', 'on' );\n\n /**\n * WIDGET CHART ARTICLE VIEW ON DASHBOARD\n */\n delete_option('_wpabstats_chart_article_widget');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_chart_article_widget'] ) ) $isActive = $_POST['wpabstats_chart_article_widget'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_chart_article_widget', 'on' );\n\n\n /**\n * WIDGET BROWSER VIEW ON DASHBOARD\n */\n delete_option('_wpabstats_browser_widget');\n\n $isActive = \"off\";\n\n if( isset( $_POST['wpabstats_browser_widget'] ) ) $isActive = $_POST['wpabstats_browser_widget'];\n\n if( $isActive === \"on\" ) add_option( '_wpabstats_browser_widget', 'on' );\n }\n }", "function wdm_add_widget_menu_callback() {\n\n\n\t\t$saved = false;\n\t\tif ( isset( $_POST[ 'uploadcare_hidden' ] ) && $_POST[ 'uploadcare_hidden' ] == 'Y' ) {\n\t\t\tif ( isset( $_POST[ 'uploadcare_public' ] ) ) {\n\t\t\t\t$uploadcare_public = $_POST[ 'uploadcare_public' ];\n\t\t\t\tupdate_option( 'uploadcare_public', $uploadcare_public );\n\t\t\t} else {\n\t\t\t\t$uploadcare_public = \"\";\n\t\t\t}\n\t\t\t$uploadcare_secret = $_POST[ 'uploadcare_secret' ];\n\t\t\tupdate_option( 'uploadcare_secret', $uploadcare_secret );\n\n\t\t\t$uploadcare_locale = $_POST[ 'uploadcare_locale' ];\n\t\t\tupdate_option( 'uploadcare_locale', $uploadcare_locale );\n\n\t\t\t$uploadcare_js = stripslashes( $_POST[ 'uploadcare_js' ] );\n\t\t\t//$uploadcare_js= array('wdm_js'=>$uploadcare_js);\n\t\t\tupdate_option( 'uploadcare_js', $uploadcare_js );\n\n\t\t\t$saved = true;\n\t\t} else {\n\t\t\t$uploadcare_public\t = get_option( 'uploadcare_public' );\n\t\t\t$uploadcare_secret\t = get_option( 'uploadcare_secret' );\n\t\t\t$uploadcare_locale\t = get_option( 'uploadcare_locale' );\n\t\t\t$uploadcare_js\t\t = stripslashes( get_option( 'uploadcare_js', true ) );\n\n\t\t}\n\t\t?>\n\n\t\t<?php if ( $saved ): ?>\n\t\t\t<div class=\"updated\"><p><strong><?php _e( 'Options saved.' ); ?></strong></p></div>\n\t\t<?php endif; ?>\n\n\n\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t<?php echo \"<h2>\" . __( 'Uploadcare', 'uploadcare_settings' ) . \"</h2>\"; ?>\n\t\t\t<form name=\"oscimp_form\" method=\"post\" action=\"<?php echo str_replace( '%7E', '~', $_SERVER[ 'REQUEST_URI' ] ); ?>\">\n\t\t\t\t<input type=\"hidden\" name=\"uploadcare_hidden\" value=\"Y\">\n\t\t\t\t<h3>API Keys <a href=\"https://uploadcare.com/documentation/keys/\">[?]</a></h3>\n\t\t\t\t<p>\n\t\t<?php _e( 'Public key: ' ); ?>\n\t\t\t\t\t<input type=\"text\" name=\"uploadcare_public\" value=\"<?php echo $uploadcare_public; ?>\" size=\"20\">\n\t\t<?php _e( 'ex: demopublickey' ); ?>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t<?php _e( \"Secret key: \" ); ?>\n\t\t\t\t\t<input type=\"text\" name=\"uploadcare_secret\" value=\"<?php echo $uploadcare_secret; ?>\" size=\"20\">\n\t\t<?php _e( 'ex: demoprivatekey' ); ?>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t<?php _e( \"Uploadcare Locale: \" ); ?>\n\t\t\t\t\t<input type=\"text\" name=\"uploadcare_locale\" value=\"<?php echo $uploadcare_locale; ?>\" size=\"20\">\n\t\t\t\t\tYou can get your Locale name <a href=\"http://www.lingoes.net/en/translator/langcode.htm\">here</a>\n\t\t\t\t</p>\n\n\t\t\t\t<h3>Enter your JS code </h3>\n\t\t\t\t<textarea rows=\"5\" cols=\"50\" name=\"uploadcare_js\"><?php echo $uploadcare_js; ?></textarea>\n\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t<?php submit_button(); ?>\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t\t<div>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>Files uploaded to demo account (demopublickey) are deleted after some time.</li>\n\t\t\t\t\t<li>You can get your own account <a href=\"https://uploadcare.com/pricing/\">here</a>.</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function lgmac_save_options() {\n\n//var_dump($_POST); die();\n\tif(!current_user_can('publish_pages')) {\n\t\twp_die('Vous n\\'êtes pas autorisé à effectuer cette opération');\n\t}\n\n\tcheck_admin_referer('lgmac_options_verify');\n\n\t$opts = get_option('lgmac_opts');\n\n\t//sauvegarde légende\n\t$opts['legend_01'] = sanitize_text_field($_POST['lgmac_legend_01']);\n\n\t//sauvegarde image\n\t$opts['image_01_url'] = sanitize_text_field($_POST['lgmac_image_url_01']);\n\n\t//valeur de legende dans la bdd\n\tupdate_option('lgmac_opts', $opts);\n\n\t// redirection vers la page des options avec l'url de la page\n\twp_redirect(admin_url('admin.php?page=lgmac_theme_opts&status=1'));\n\texit;\n\n}", "public function process_admin_options() {\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ) update_option( 'jigoshop_tgm_custom_gateway_enabled', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_enabled' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_title'] ) ) update_option( 'jigoshop_tgm_custom_gateway_title', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_title'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_title' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_description'] ) ) update_option( 'jigoshop_tgm_custom_gateway_description', \tjigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_description'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_description' );\n \t}", "function rp_widget_Admin() {\r\n $rp_settings = get_option(\"rp_widget_option\");\r\n\t// check if options have been updated\r\n\tif (isset($_POST['update_rp_widget'])) {\r\n\t\t$rp_settings['rp_widget_title']= strip_tags(stripslashes($_POST['rp_widget_title']));\r\n $rp_settings['rp_number'] = strip_tags(stripslashes($_POST['rp_number']));\r\n //Rev 0.0.2 - Adding Random Feature\r\n $rp_settings['rp_randomize'] = strip_tags(stripslashes($_POST['rp_randomize']));\r\n $rp_settings['rp_browse_link'] = strip_tags(stripslashes($_POST['rp_browse_link']));\r\n $rp_settings['rp_thickbox'] = strip_tags(stripslashes($_POST['rp_thickbox']));\r\n $rp_settings['rp_thickbox_path'] = strip_tags(stripslashes($_POST['rp_thickbox_path']));\r\n $rp_settings['rp_custom_css'] = strip_tags(stripslashes($_POST['rp_custom_css']));\r\n $rp_settings['rp_css'] = strip_tags(stripslashes($_POST['rp_css']));\r\n\t\tupdate_option(\"rp_widget_option\",$rp_settings);\r\n\t}\r\n\techo '<p>\r\n\t <label for=\"rp_widget_title\"><strong>Title:</strong>\r\n <input id=\"rp_widget_title\" tabindex=\"1\" name=\"rp_widget_title\" type=\"text\" size=\"15\" value=\"'.$rp_settings['rp_widget_title'].'\" />\r\n </label><br />\r\n <label for=\"rp_number\"><strong>Number of Photos:</strong>\r\n <input id=\"rp_number\" name=\"rp_number\" type=\"text\" tabindex=\"2\" size=\"3\" value=\"'.$rp_settings['rp_number'].'\" />\r\n </label><br />\r\n <label for=\"rp_randomize\"><strong>Randomize:</strong>\r\n <input type=\"checkbox\" tabindex=\"3\" name=\"rp_randomize\" ';\r\n if ($rp_settings['rp_randomize'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_browse_link\"><strong>Browse Photo Link:</strong><br />\r\n <input id=\"rp_browse_link\" name=\"rp_browse_link\" type=\"text\" tabindex=\"42\" class=\"widefat\" value=\"'.$rp_settings['rp_browse_link'].'\" />\r\n </label><br />\r\n <label for=\"rp_thickbox\"><strong>Use Thickbox:</strong>\r\n <input type=\"checkbox\" tabindex=\"5\" name=\"rp_thickbox\" ';\r\n if ($rp_settings['rp_thickbox'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_thickbox_path\"><strong>Wordpress Path:</strong>\r\n <input id=\"rp_thickbox_path\" name=\"rp_thickbox_path\" type=\"text\" tabindex=\"6\" size=\"15\" value=\"'.$rp_settings['rp_thickbox_path'].'\" />\r\n <br />\r\n See <a target=\"_blank\" href=\"';\r\n echo WP_PLUGIN_URL;\r\n echo '/recent-photos/readme.txt\">Readme.txt</a> for Details.\r\n <br />\r\n </label><br />\r\n <label for=\"rp_custom_css\"><strong>Use Custom CSS:</strong>\r\n <input tabindex=\"7\" type=\"checkbox\" name=\"rp_custom_css\" ';\r\n if ($rp_settings['rp_custom_css'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_css\"><strong>Custom CSS:</strong><br />\r\n <textarea name=\"rp_css\" rows=\"5\" cols=\"30\" tabindex=\"8\" >';\r\necho $rp_settings['rp_css'];\r\necho '</textarea>\r\n <br />\r\n See <a target=\"_blank\" href=\"';\r\n echo WP_PLUGIN_URL;\r\n echo '/recent-photos/readme.txt\">Readme.txt</a> for Details.\r\n <br />\r\n </label><br />\r\n </p>';\r\n\techo '<input type=\"hidden\" id=\"update_rp_widget\" name=\"update_rp_widget\" value=\"1\" />';\r\n}", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "function wp_convert_widget_settings($base_name, $option_name, $settings)\n {\n }", "function widget_supporters_control() {\r\n\t\tglobal $wpdb;\r\n\t\t$options = $newoptions = get_option('widget_supporters');\r\n\t\tif ( $_POST['supporters-submit'] ) {\r\n\t\t\t$newoptions['supporters-title'] = $_POST['supporters-title'];\r\n\t\t\t$newoptions['supporters-display'] = $_POST['supporters-display'];\r\n\t\t\t$newoptions['supporters-blog-name-characters'] = $_POST['supporters-blog-name-characters'];\r\n\t\t\t$newoptions['supporters-order'] = $_POST['supporters-order'];\r\n\t\t\t$newoptions['supporters-number'] = $_POST['supporters-number'];\r\n\t\t\t$newoptions['supporters-avatar-size'] = $_POST['supporters-avatar-size'];\r\n\t\t}\r\n\t\tif ( $options != $newoptions ) {\r\n\t\t\t$options = $newoptions;\r\n\t\t\tupdate_option('widget_supporters', $options);\r\n\t\t}\r\n\t?>\r\n\t\t\t\t<div style=\"text-align:left\">\r\n \r\n\t\t\t\t<label for=\"supporters-title\" style=\"line-height:35px;display:block;\"><?php _e('Title', 'widgets'); ?>:<br />\r\n <input class=\"widefat\" id=\"supporters-title\" name=\"supporters-title\" value=\"<?php echo $options['supporters-title']; ?>\" type=\"text\" style=\"width:95%;\">\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-display\" style=\"line-height:35px;display:block;\"><?php _e('Display', 'widgets'); ?>:\r\n <select name=\"supporters-display\" id=\"supporters-display\" style=\"width:95%;\">\r\n <option value=\"avatar_blog_name\" <?php if ($options['supporters-display'] == 'avatar_blog_name'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Avatar + Blog Name'); ?></option>\r\n <option value=\"avatar\" <?php if ($options['supporters-display'] == 'avatar'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Avatar Only'); ?></option>\r\n <option value=\"blog_name\" <?php if ($options['supporters-display'] == 'blog_name'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Blog Name Only'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-blog-name-characters\" style=\"line-height:35px;display:block;\"><?php _e('Blog Name Characters', 'widgets'); ?>:<br />\r\n <select name=\"supporters-blog-name-characters\" id=\"supporters-blog-name-characters\" style=\"width:95%;\">\r\n <?php\r\n\t\t\t\t\tif ( empty($options['supporters-blog-name-characters']) ) {\r\n\t\t\t\t\t\t$options['supporters-blog-name-characters'] = 30;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\tfor ( $counter = 1; $counter <= 500; $counter += 1) {\r\n\t\t\t\t\t\t?>\r\n <option value=\"<?php echo $counter; ?>\" <?php if ($options['supporters-blog-name-characters'] == $counter){ echo 'selected=\"selected\"'; } ?> ><?php echo $counter; ?></option>\r\n <?php\r\n\t\t\t\t\t}\r\n ?>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-order\" style=\"line-height:35px;display:block;\"><?php _e('Order', 'widgets'); ?>:\r\n <select name=\"supporters-order\" id=\"supporters-order\" style=\"width:95%;\">\r\n <option value=\"most_recent\" <?php if ($options['supporters-order'] == 'most_recent'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Most Recent'); ?></option>\r\n <option value=\"random\" <?php if ($options['supporters-order'] == 'random'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Random'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-number\" style=\"line-height:35px;display:block;\"><?php _e('Number', 'widgets'); ?>:<br />\r\n <select name=\"supporters-number\" id=\"supporters-number\" style=\"width:95%;\">\r\n <?php\r\n\t\t\t\t\tif ( empty($options['supporters-number']) ) {\r\n\t\t\t\t\t\t$options['supporters-number'] = 10;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\tfor ( $counter = 1; $counter <= 25; $counter += 1) {\r\n\t\t\t\t\t\t?>\r\n <option value=\"<?php echo $counter; ?>\" <?php if ($options['supporters-number'] == $counter){ echo 'selected=\"selected\"'; } ?> ><?php echo $counter; ?></option>\r\n <?php\r\n\t\t\t\t\t}\r\n ?>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-avatar-size\" style=\"line-height:35px;display:block;\"><?php _e('Avatar Size', 'widgets'); ?>:<br />\r\n <select name=\"supporters-avatar-size\" id=\"supporters-avatar-size\" style=\"width:95%;\">\r\n <option value=\"16\" <?php if ($options['supporters-avatar-size'] == '16'){ echo 'selected=\"selected\"'; } ?> ><?php _e('16px'); ?></option>\r\n <option value=\"32\" <?php if ($options['supporters-avatar-size'] == '32'){ echo 'selected=\"selected\"'; } ?> ><?php _e('32px'); ?></option>\r\n <option value=\"48\" <?php if ($options['supporters-avatar-size'] == '48'){ echo 'selected=\"selected\"'; } ?> ><?php _e('48px'); ?></option>\r\n <option value=\"96\" <?php if ($options['supporters-avatar-size'] == '96'){ echo 'selected=\"selected\"'; } ?> ><?php _e('96px'); ?></option>\r\n <option value=\"128\" <?php if ($options['supporters-avatar-size'] == '128'){ echo 'selected=\"selected\"'; } ?> ><?php _e('128px'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<input type=\"hidden\" name=\"supporters-submit\" id=\"supporters-submit\" value=\"1\" />\r\n\t\t\t\t</div>\r\n\t<?php\r\n\t}", "function widget_init() {\r\n if ( !function_exists('wp_register_sidebar_widget') || !function_exists('register_widget_control') ) return;\r\n function widget($args) {\r\n extract($args);\r\n $wpca_settings = get_option('wpcareers');\r\n echo $before_widget;\r\n echo $before_title . $wpca_settings['widget_title'] . $after_title;\r\n\r\n $fieldsPre=\"wpc_\";\r\n $before_tag=stripslashes(get_option($fieldsPre.'before_Tag'));\r\n $after_tag=stripslashes(get_option($fieldsPre.'after_Tag'));\r\n echo '<p><ul>' . widget_display($wpca_settings['widget_format']) . '</ul></p>'; \r\n }\r\n\r\n function widget_control() {\r\n $wpca_settings = $newoptions = get_option('wpcareers');\r\n if ( $_POST[\"wpCareers-submit\"] ) {\r\n $newoptions['widget_title'] = strip_tags(stripslashes($_POST['widget_title']));\r\n $newoptions['widget_format'] = $_POST['widget_format'];\r\n if ( empty($newoptions['widget_title']) ) $newoptions['widget_title'] = 'Last Classifieds Ads';\r\n }\r\n if ( $wpca_settings != $newoptions ) {\r\n $wpca_settings = $newoptions;\r\n update_option('wpcareers', $wpca_settings);\r\n }\r\n $title = htmlspecialchars($wpca_settings['widget_title'], ENT_QUOTES);\r\n if ( empty($newoptions['widget_title']) ) $newoptions['widget_title'] = 'Last Careers Posts';\r\n if ( empty($newoptions['widget_format']) ) $newoptions['widget_format'] = 'y';\r\n ?>\r\n <label for=\"wpCareers-widget_title\"><?php _e('Title:'); ?><input style=\"width: 200px;\" id=\"widget_title\" name=\"widget_title\" type=\"text\" value=\"<?php echo htmlspecialchars($wpca_settings['widget_title']); ?>\" /></label></p>\r\n <br />\r\n <label for=\"wpCareers-widget_format\">\r\n <input class=\"checkbox\" id=\"widget_format\" name=\"widget_format\" type=\"checkbox\" value=\"y\"<?php echo ($wpca_settings['widget_format']=='y')?\" checked\":\"\";?>>Small Format Output</label><br />\r\n <input type=\"hidden\" id=\"wpCareers-submit\" name=\"wpCareers-submit\" value=\"1\" />\r\n <?php\r\n }\r\n \r\n function widget_display() {\r\n $wpca_settings = get_option('wpcareers');\r\n //$out = wpcaLastPosts($wpca_settings['widget_format']);\r\n return $out;\r\n }\r\n \r\n wp_register_sidebar_widget('wpCareers', 'widget', null, 'wpCareers');\r\n register_widget_control('wpCareers', 'widget_control');\r\n }", "function theme_save_settings()\n\t{\n\t\tglobal $pagenow;\n\t\t\n\t\tif ( $pagenow == 'themes.php' && $_GET['page'] == 'theme-options' )\n\t\t{\n\t\t\tif ( isset ( $_GET['tab'] ) )\n\t\t\t{\n\t\t\t\t$tab = $_GET['tab'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tab = 'general';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tswitch ( $tab )\n\t\t\t{\n\t\t\t\tcase 'general' :\n\t\t\t\t\n\t\t\t\t\tupdate_option( 'logo_image', $_POST['logo_image'] );\n\t\t\t\t\tupdate_option( 'header_background_image', $_POST['header_background_image'] );\n\t\t\t\t\tupdate_option( 'select_text_logo', $_POST['select_text_logo'] );\n\t\t\t\t\tupdate_option( 'theme_site_title', $_POST['theme_site_title'] );\n\t\t\t\t\tupdate_option( 'select_tagline', $_POST['select_tagline'] );\n\t\t\t\t\tupdate_option( 'theme_tagline', $_POST['theme_tagline'] );\n\t\t\t\t\tupdate_option( 'logo_login', $_POST['logo_login'] );\n\t\t\t\t\tupdate_option( 'logo_login_hide', $_POST['logo_login_hide'] );\n\t\t\t\t\tupdate_option( 'favicon', $_POST['favicon'] );\n\t\t\t\t\tupdate_option( 'apple_touch_icon', $_POST['apple_touch_icon'] );\n\t\t\t\t\tupdate_option( 'google_map_api_key', $_POST['google_map_api_key'] );\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'style' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'char_set_latin', $_POST['char_set_latin'] );\n\t\t\t\t\tupdate_option( 'char_set_latin_ext', $_POST['char_set_latin_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_cyrillic', $_POST['char_set_cyrillic'] );\n\t\t\t\t\tupdate_option( 'char_set_cyrillic_ext', $_POST['char_set_cyrillic_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_greek', $_POST['char_set_greek'] );\n\t\t\t\t\tupdate_option( 'char_set_greek_ext', $_POST['char_set_greek_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_vietnamese', $_POST['char_set_vietnamese'] );\n\t\t\t\t\tupdate_option( 'extra_font_styles', $_POST['extra_font_styles'] );\n\t\t\t\t\tupdate_option( 'classic_navigation_menu', $_POST['classic_navigation_menu'] );\n\t\t\t\t\tupdate_option( 'mobile_zoom', $_POST['mobile_zoom'] );\n\t\t\t\t\tupdate_option( 'custom_css', $_POST['custom_css'] );\n\t\t\t\t\tupdate_option( 'external_css', $_POST['external_css'] );\n\t\t\t\t\tupdate_option( 'external_js', $_POST['external_js'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'animation' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'classic_layout', $_POST['classic_layout'] );\n\t\t\t\t\tupdate_option( 'mobile_only_classic_layout', $_POST['mobile_only_classic_layout'] );\n\t\t\t\t\tupdate_option( 'pf_details_page_in_animation', $_POST['pf_details_page_in_animation'] );\n\t\t\t\t\tupdate_option( 'pf_details_page_out_animation', $_POST['pf_details_page_out_animation'] );\n\t\t\t\t\tupdate_option( 'pixelwars__ajax', $_POST['pixelwars__ajax'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'blog' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'theme_excerpt', $_POST['theme_excerpt'] );\n\t\t\t\t\tupdate_option( 'pagination', $_POST['pagination'] );\n\t\t\t\t\tupdate_option( 'about_the_author_module', $_POST['about_the_author_module'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'seo' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'theme_og_protocol', $_POST['theme_og_protocol'] );\n\t\t\t\t\tupdate_option( 'theme_seo_fields', $_POST['theme_seo_fields'] );\n\t\t\t\t\tupdate_option( 'site_description', $_POST['site_description'] );\n\t\t\t\t\tupdate_option( 'site_keywords', $_POST['site_keywords'] );\n\t\t\t\t\tupdate_option( 'tracking_code_head', $_POST['tracking_code_head'] );\n\t\t\t\t\tupdate_option( 'tracking_code_body', $_POST['tracking_code_body'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "function store(){\n update_option( $this->option_name, $this->settings );\n }", "public function saveConfigOptions() {}", "function add_widget_specific_settings() {\n\t\treturn false;\n\t}", "function WidgetMeteoControl() {\n\t\t\n\t\t\t$options = get_option('widget_trebimeteo');\n\t\t\tif ( !is_array($options) )\t{ $options = array('title' => 'Previsioni Meteo', 'trebiregione' => '1', 'trebilocalita' => '6', 'trebicuno' => 'ffffff','trebicdue' => 'ffffff', 'trebictre' => 'ffffff', 'trebibuno' => '93c1db', 'trebibdue' => '3a8ebd', 'trebibtre' => 'ffffff', 'trebilarghezza' => '190', 'trebialtezza' => '240', 'trebitipo' => 'xssmall'); }\n\n\t\t\tif ( $_POST['trebimeteo-submit'] )\n\t\t\t{\n\t\t\t\t// Remember to sanitize and format use input appropriately.\n\t\t\t\t$options['trebimeteotitle'] = strip_tags(stripslashes($_POST['trebimeteotitle']));\n\t\t\t\t$options['trebiregione'] = strip_tags(stripslashes($_POST['trebiregione']));\n\t\t\t\t$options['trebilocalita'] = strip_tags(stripslashes($_POST['trebilocalita']));\n\t\t\t\t$options['trebicuno'] = strip_tags(stripslashes($_POST['trebicuno']));\n\t\t\t\t$options['trebicdue'] = strip_tags(stripslashes($_POST['trebicdue']));\n\t\t\t\t$options['trebictre'] = strip_tags(stripslashes($_POST['trebictre']));\n\t\t\t\t$options['trebibuno'] = strip_tags(stripslashes($_POST['trebibuno']));\n\t\t\t\t$options['trebibdue'] = strip_tags(stripslashes($_POST['trebibdue']));\n\t\t\t\t$options['trebibtre'] = strip_tags(stripslashes($_POST['trebibtre']));\n\t\t\t\t$options['trebialtezza'] = strip_tags(stripslashes($_POST['trebialtezza']));\n\t\t\t\t$options['trebilarghezza'] = strip_tags(stripslashes($_POST['trebilarghezza']));\n\t\t\t\t$options['trebitipo'] = strip_tags(stripslashes($_POST['trebitipo']));\n\n\t\t\t\tupdate_option('widget_trebimeteo', $options);\n\t\t\t}\n\n\t\t\t$trebimeteotitle = htmlspecialchars($options['trebimeteotitle'], ENT_QUOTES);\n\t\t\t$trebiregione = htmlspecialchars($options['trebiregione'], ENT_QUOTES);\n\t\t\t$trebilocalita = htmlspecialchars($options['trebilocalita'], ENT_QUOTES);\n\t\t\t$trebicuno = htmlspecialchars($options['trebicuno'], ENT_QUOTES);\n\t\t\t$trebicdue = htmlspecialchars($options['trebicdue'], ENT_QUOTES);\n\t\t\t$trebictre = htmlspecialchars($options['trebictre'], ENT_QUOTES);\n\t\t\t$trebibuno = htmlspecialchars($options['trebibuno'], ENT_QUOTES);\n\t\t\t$trebibdue = htmlspecialchars($options['trebibdue'], ENT_QUOTES);\n\t\t\t$trebibtre = htmlspecialchars($options['trebibtre'], ENT_QUOTES);\n\t\t\t$trebialtezza = htmlspecialchars($options['trebialtezza'], ENT_QUOTES);\n\t\t\t$trebilarghezza = htmlspecialchars($options['trebilarghezza'], ENT_QUOTES);\n\t\t\t$trebitipo = htmlspecialchars($options['trebitipo'], ENT_QUOTES);\n\n\t\t\t$xpath = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),\"\",plugin_basename(__FILE__));\n\t\t\t\n\t\t\t?>\n \n\t<p style=\"text-align:right;\"><label for=\"trebimeteo-title\">Titolo <input id=\"trebimeteotitle\" name=\"trebimeteotitle\" type=\"text\" value=\"<?php echo $trebimeteotitle;?>\" /></label></p>\n <p style=\"text-align:right;\"><label for=\"trebiregione\">ID Regione (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php'; ?>\">?</a>) <input id=\"trebiregione\" name=\"trebiregione\" type=\"text\" value=\"<?php echo $trebiregione;?>\"/></label></p>\n\t<p style=\"text-align:right;\"><label for=\"trebilocalita\">ID Localit&agrave; (<a target=\"_blank\" href=\"<?php echo home_url().'/wp-admin/options-general.php?page=3bmeteo.php';?>\">?</a>) <input id=\"trebilocalita\" name=\"trebilocalita\" type=\"text\" value=\"<?php echo $trebilocalita;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebialtezza\">Altezza <input id=\"trebialtezza\" name=\"trebialtezza\" type=\"text\" value=\"<?php echo $trebialtezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebilarghezza\">Larghezza <input id=\"trebilarghezza\" name=\"trebilarghezza\" type=\"text\" value=\"<?php echo $trebilarghezza;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibuno\">B1 <input id=\"trebibuno\" name=\"trebibuno\" type=\"text\" value=\"<?php echo $trebibuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibdue\">B2 <input id=\"trebibdue\" name=\"trebibdue\" type=\"text\" value=\"<?php echo $trebibdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebibtre\">B3 <input id=\"trebibtre\" name=\"trebibtre\" type=\"text\" value=\"<?php echo $trebibtre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicuno\">C1 <input id=\"trebicuno\" name=\"trebicuno\" type=\"text\" value=\"<?php echo $trebicuno;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebicdue\">C2 <input id=\"trebicdue\" name=\"trebicdue\" type=\"text\" value=\"<?php echo $trebicdue;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebictre\">C3 <input id=\"trebictre\" name=\"trebictre\" type=\"text\" value=\"<?php echo $trebictre;?>\"/></label></p>\n <p style=\"text-align:right;\"><label for=\"trebitipo\">Tipo\n <select id=\"trebitipo\" name=\"trebitipo\"> \n\t\t<option label=\"Localit&agrave; Compatti 1 giorno\" value=\"xssmall\"<?php if ($trebitipo=='xssmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Compatti 6 giorni\" value=\"lsmall\"<?php if ($trebitipo=='lsmall') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 6 giorni</option> \n\t\t<option label=\"Localit&agrave; Compatti 7 giorni\" value=\"lbigor\"<?php if ($trebitipo=='lbigor') echo ' selected=\"selected\"';?>>Localit&agrave; Compatti 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Dati in Diretta\" value=\"treale\"<?php if ($trebitipo=='treale') echo ' selected=\"selected\"';?>>Localit&agrave; Dati in Diretta</option> \n\t\t<option label=\"Tutte le Localit&agrave;\" value=\"ssmall\"<?php if ($trebitipo=='ssmall') echo ' selected=\"selected\"';?>>Tutte le Localit&agrave;</option> \n\t\t<option label=\"Localit&agrave; estese 7 giorni\" value=\"lbig\"<?php if ($trebitipo=='lbig') echo ' selected=\"selected\"';?>>Localit&agrave; estese 7 giorni</option> \n\t\t<option label=\"Localit&agrave; estese orario\" value=\"oraxora\"<?php if ($trebitipo=='oraxora') echo ' selected=\"selected\"';?>>Localit&agrave; estese orario</option> \n\t\t<option label=\"Regionali compatto\" value=\"msmall\"<?php if ($trebitipo=='msmall') echo ' selected=\"selected\"';?>>Regionali compatto</option> \n\t\t<option label=\"Regionali 7 giorni\" value=\"msmacro\"<?php if ($trebitipo=='msmacro') echo ' selected=\"selected\"';?>>Regionali 7 giorni</option> \n\t\t<option label=\"Localit&agrave; Marine 1 giorno\" value=\"lsmari\"<?php if ($trebitipo=='lsmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 1 giorno</option> \n\t\t<option label=\"Localit&agrave; Marine 7 giorno\" value=\"lmari\"<?php if ($trebitipo=='lmari') echo ' selected=\"selected\"';?>>Localit&agrave; Marine 7 giorno</option> \n\t\t<option label=\"Regionali Marine 7 giorni\" value=\"mmari\"<?php if ($trebitipo=='mmari') echo ' selected=\"selected\"';?>>Regionali Marine 7 giorni</option> \n\t\t<option label=\"Neve 1 giorno\" value=\"lsneve\"<?php if ($trebitipo=='lsneve') echo ' selected=\"selected\"';?>>Neve 1 giorno</option> \n\t\t<option label=\"Neve 7 giorni\" value=\"lneve\"<?php if ($trebitipo=='lneve') echo ' selected=\"selected\"';?>>Neve 7 giorni</option>\n\t</select>\n </label>\n\t</p>\n <!--<p style=\"text-align:right;\">\n <select id=\"trebimeteoregione\" name=\"trebimeteoregione\"> \n\t\t<option label=\"Abruzzo (idreg=1)\" value=\"1\">Abruzzo (idreg=1)</option> \n\t\t<option label=\"Basilicata (idreg=2)\" value=\"2\">Basilicata (idreg=2)</option> \n\t\t<option label=\"Calabria (idreg=3)\" value=\"3\">Calabria (idreg=3)</option> \n\t\t<option label=\"Campania (idreg=4)\" value=\"4\">Campania (idreg=4)</option> \n\t\t<option label=\"Emilia (idreg=5)\" value=\"5\">Emilia (idreg=5)</option> \n\t\t<option label=\"Friuli (idreg=6)\" value=\"6\">Friuli (idreg=6)</option> \n\t\t<option label=\"Lazio (idreg=7)\" value=\"7\">Lazio (idreg=7)</option> \n\t\t<option label=\"Liguria (idreg=8)\" value=\"8\">Liguria (idreg=8)</option> \n\t\t<option label=\"Lombardia (idreg=9)\" value=\"9\">Lombardia (idreg=9)</option> \n\t\t<option label=\"Marche (idreg=10)\" value=\"10\">Marche (idreg=10)</option> \n\t\t<option label=\"Molise (idreg=11)\" value=\"11\">Molise (idreg=11)</option> \n\t\t<option label=\"Piemonte (idreg=12)\" value=\"12\">Piemonte (idreg=12)</option> \n\t\t<option label=\"Puglia (idreg=13)\" value=\"13\">Puglia (idreg=13)</option> \n\t\t<option label=\"Sardegna (idreg=14)\" value=\"14\">Sardegna (idreg=14)</option> \n\t\t<option label=\"Sicilia (idreg=15)\" value=\"15\">Sicilia (idreg=15)</option> \n\t\t<option label=\"Toscana (idreg=16)\" value=\"16\">Toscana (idreg=16)</option> \n\t\t<option label=\"Trentino (idreg=17)\" value=\"17\">Trentino (idreg=17)</option> \n\t\t<option label=\"Umbria (idreg=18)\" value=\"18\">Umbria (idreg=18)</option> \n\t\t<option label=\"Valle aosta (idreg=19)\" value=\"19\">Valle d'aosta (idreg=19)</option> \n\t\t<option label=\"Veneto (idreg=20)\" value=\"20\">Veneto (idreg=20)</option> \n\t</select> \n\t</p>-->\n <!-- <p style=\"text-align:right;\"> \n\t<select name=\"trebimeteolocalita\" id=\"trebimeteolocalita\"> \n\t\t<option label=\"Seleziona Localit&agrave;\" value=\"01\">Seleziona Localit&agrave;</option> \n\t</select> \n <p style=\"text-align:right;\"><label for=\"trebiloc\">Localit&agrave; <input style=\"width: 200px;\" id=\"trebiloc\" name=\"trebiloc\" type=\"text\" value=\"<?php //echo $loc;?>\" /></label></p>-->\n <p><input type=\"hidden\" id=\"trebimeteo-submit\" name=\"trebimeteo-submit\" value=\"1\" /></p> \n<?php\n\t\t}", "public function save_option() {\n\t\tupdate_option( self::OPTION_NAME, $this->ryte_option );\n\t}", "function theme_save_settings()\n\t{\n\t\tglobal $pagenow;\n\t\t\n\t\tif ( $pagenow == 'themes.php' && $_GET['page'] == 'theme-options' )\n\t\t{\n\t\t\tif ( isset ( $_GET['tab'] ) )\n\t\t\t{\n\t\t\t\t$tab = $_GET['tab'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$tab = 'general';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tswitch ( $tab )\n\t\t\t{\n\t\t\t\tcase 'general' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'logo_type', $_POST['logo_type'] );\n\t\t\t\t\tupdate_option( 'select_text_logo', $_POST['select_text_logo'] );\n\t\t\t\t\tupdate_option( 'theme_site_title', $_POST['theme_site_title'] );\n\t\t\t\t\tupdate_option( 'logo_image', $_POST['logo_image'] );\n\t\t\t\t\tupdate_option( 'select_tagline', $_POST['select_tagline'] );\n\t\t\t\t\tupdate_option( 'theme_tagline', $_POST['theme_tagline'] );\n\t\t\t\t\tupdate_option( 'logo_login', $_POST['logo_login'] );\n\t\t\t\t\tupdate_option( 'logo_login_hide', $_POST['logo_login_hide'] );\n\t\t\t\t\tupdate_option( 'favicon', $_POST['favicon'] );\n\t\t\t\t\tupdate_option( 'apple_touch_icon', $_POST['apple_touch_icon'] );\n\t\t\t\t\tupdate_option( 'copyright_text', $_POST['copyright_text'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'style' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'char_set_latin', $_POST['char_set_latin'] );\n\t\t\t\t\tupdate_option( 'char_set_latin_ext', $_POST['char_set_latin_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_cyrillic', $_POST['char_set_cyrillic'] );\n\t\t\t\t\tupdate_option( 'char_set_cyrillic_ext', $_POST['char_set_cyrillic_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_greek', $_POST['char_set_greek'] );\n\t\t\t\t\tupdate_option( 'char_set_greek_ext', $_POST['char_set_greek_ext'] );\n\t\t\t\t\tupdate_option( 'char_set_vietnamese', $_POST['char_set_vietnamese'] );\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'nav_menu_search', $_POST['nav_menu_search'] );\n\t\t\t\t\tupdate_option( 'extra_font_styles', $_POST['extra_font_styles'] );\n\t\t\t\t\tupdate_option( 'footer_widget_locations', $_POST['footer_widget_locations'] );\n\t\t\t\t\tupdate_option( 'footer_widget_columns', $_POST['footer_widget_columns'] );\n\t\t\t\t\tupdate_option( 'mobile_zoom', $_POST['mobile_zoom'] );\n\t\t\t\t\tupdate_option( 'custom_css', $_POST['custom_css'] );\n\t\t\t\t\tupdate_option( 'external_css', $_POST['external_css'] );\n\t\t\t\t\tupdate_option( 'external_js', $_POST['external_js'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'blog' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'blog_type', $_POST['blog_type'] );\n\t\t\t\t\tupdate_option( 'post_sidebar', $_POST['post_sidebar'] );\n\t\t\t\t\tupdate_option( 'theme_excerpt', $_POST['theme_excerpt'] );\n\t\t\t\t\tupdate_option( 'pagination', $_POST['pagination'] );\n\t\t\t\t\tupdate_option( 'all_formats_homepage', $_POST['all_formats_homepage'] );\n\t\t\t\t\tupdate_option( 'about_the_author_module', $_POST['about_the_author_module'] );\n\t\t\t\t\tupdate_option( 'post_share_links_single', $_POST['post_share_links_single'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'portfolio' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'pf_ajax', $_POST['pf_ajax'] );\n\t\t\t\t\tupdate_option( 'pf_item_per_page', $_POST['pf_item_per_page'] );\n\t\t\t\t\tupdate_option( 'pf_content_editor', $_POST['pf_content_editor'] );\n\t\t\t\t\tupdate_option( 'pf_share_links_single', $_POST['pf_share_links_single'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'gallery' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'gl_ajax', $_POST['gl_ajax'] );\n\t\t\t\t\tupdate_option( 'gl_item_per_page', $_POST['gl_item_per_page'] );\n\t\t\t\t\tupdate_option( 'gl_ajax_single', $_POST['gl_ajax_single'] );\n\t\t\t\t\tupdate_option( 'gl_item_per_page_single', $_POST['gl_item_per_page_single'] );\n\t\t\t\t\tupdate_option( 'gl_slideshow_interval_single', $_POST['gl_slideshow_interval_single'] );\n\t\t\t\t\tupdate_option( 'gl_circular_single', $_POST['gl_circular_single'] );\n\t\t\t\t\tupdate_option( 'gl_next_on_click_image_single', $_POST['gl_next_on_click_image_single'] );\n\t\t\t\t\tupdate_option( 'gl_content_editor', $_POST['gl_content_editor'] );\n\t\t\t\t\tupdate_option( 'gl_share_links_single', $_POST['gl_share_links_single'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'sidebar' :\n\t\t\t\t\n\t\t\t\t\tupdate_option( 'no_sidebar_name', esc_attr( $_POST['new_sidebar_name'] ) );\n\t\t\t\t\t\n\t\t\t\t\tif ( esc_attr( $_POST['new_sidebar_name'] ) != \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( get_option( 'sidebars_with_commas' ) == \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tupdate_option( 'sidebars_with_commas', esc_attr( $_POST['new_sidebar_name'] ) );\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\tupdate_option( 'sidebars_with_commas', get_option( 'sidebars_with_commas' ) . ',' . esc_attr( $_POST['new_sidebar_name'] ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'seo' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'theme_og_protocol', $_POST['theme_og_protocol'] );\n\t\t\t\t\tupdate_option( 'theme_seo_fields', $_POST['theme_seo_fields'] );\n\t\t\t\t\tupdate_option( 'site_description', $_POST['site_description'] );\n\t\t\t\t\tupdate_option( 'site_keywords', $_POST['site_keywords'] );\n\t\t\t\t\tupdate_option( 'tracking_code_head', $_POST['tracking_code_head'] );\n\t\t\t\t\tupdate_option( 'tracking_code', $_POST['tracking_code'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'contact' :\n\t\t\t\t\t\n\t\t\t\t\tupdate_option( 'map_embed_code', $_POST['map_embed_code'] );\n\t\t\t\t\tupdate_option( 'enable_map', $_POST['enable_map'] );\n\t\t\t\t\tupdate_option( 'contact_form_email', $_POST['contact_form_email'] );\n\t\t\t\t\tupdate_option( 'contact_form_captcha', $_POST['contact_form_captcha'] );\n\t\t\t\t\tupdate_option( 'disable_contact_form', $_POST['disable_contact_form'] );\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// end switch\n\t\t}\n\t\t// end if\n\t}", "private function setOptions()\n\t{\n\t\t$this->site = ( isset($_POST['site']) ) ? sanitize_text_field($_POST['site']) : null;\n\t\t$this->feed_type = ( isset($_POST['type']) && $_POST['type'] !== 'search' ) ? sanitize_text_field($_POST['type']) : 'search';\n\t\t$this->post_id = ( isset($_POST['id']) ) ? sanitize_text_field($_POST['id']) : null;\n\t\t$this->feed_format = ( isset($_POST['format']) && $_POST['format'] !== 'unformatted' ) ? sanitize_text_field($_POST['format']) : 'unformatted';\n\t}", "static function saveHandlerOptions ()\n {\n // There is no option yet\n return;\n }", "function genesis_extender_custom_options_save()\n{\n\tcheck_ajax_referer( 'custom-options', 'security' );\n\t\n\tif( !empty( $_POST['extender']['css_builder_popup_active'] ) || genesis_extender_get_custom_css( 'css_builder_popup_active' ) )\n\t\t$custom_css = genesis_extender_preserve_backslashes( genesis_extender_get_custom_css( 'custom_css' ) );\n\telse\n\t\t$custom_css = $_POST['extender']['custom_css'];\n\n\t$css_update = array(\n\t\t'custom_css' => $custom_css,\n\t\t'css_builder_popup_active' => !empty( $_POST['extender']['css_builder_popup_active'] ) ? 1 : 0\n\t);\n\t$css_update_merged = array_merge( genesis_extender_custom_css_options_defaults(), $css_update );\n\tupdate_option( 'genesis_extender_custom_css', $css_update_merged );\n\t\n\t$functions_default = '<?php\n/* Do not remove this line. Add your functions below. */\n';\n\t\n\tif( !empty( $_POST['custom_functions'] ) )\n\t{\n\t\t$functions_update = array(\n\t\t\t'custom_functions_effect_admin' => !empty( $_POST['custom_functions']['custom_functions_effect_admin'] ) ? 1 : 0,\n\t\t\t'custom_functions' => ( $_POST['custom_functions']['custom_functions'] != '' ) ? $_POST['custom_functions']['custom_functions'] : $functions_default\n\t\t);\n\t\t$functions_update_merged = array_merge( genesis_extender_custom_functions_options_defaults(), $functions_update );\n\t\tupdate_option( 'genesis_extender_custom_functions', $functions_update_merged );\n\t}\n\n\tif( !empty( $_POST['custom_js'] ) )\n\t{\n\t\t$js_update = array(\n\t\t\t'custom_js_in_head' => !empty( $_POST['custom_js']['custom_js_in_head'] ) ? 1 : 0,\n\t\t\t'custom_js' => $_POST['custom_js']['custom_js']\n\t\t);\n\t\t$js_update_merged = array_merge( genesis_extender_custom_js_options_defaults(), $js_update );\n\t\tupdate_option( 'genesis_extender_custom_js', $js_update_merged );\n\t}\n\n\tif ( ! empty( $_POST['custom_template_ids'] ) ) {\n\t\t\n\t\t$template_ids_empty = true;\n\t\tforeach( $_POST['custom_template_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( ! empty( $key ) )\n\t\t\t\t$template_ids_empty = false;\n\n\t\t}\n\t\tforeach( $_POST['custom_template_ids'] as $key ) {\n\t\t\t\n\t\t\tif ( empty( $key ) && !$template_ids_empty ) {\n\t\t\t\t\n\t\t\t\techo 'Please fill in ALL \"File Name\" fields';\n\t\t\t\texit();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tgenesis_extender_update_templates( $_POST['custom_template_ids'], $_POST['custom_template_names'], $_POST['custom_template_types'], $_POST['custom_template_post_types'], $_POST['custom_template_textarea'] );\n\t\t\n\t}\n\n\tif( !empty( $_POST['custom_label_names'] ) )\n\t{\n\t\t$label_names_empty = true;\n\t\tforeach( $_POST['custom_label_names'] as $key )\n\t\t{\n\t\t\tif( !empty( $key ) )\n\t\t\t{\n\t\t\t\t$label_names_empty = false;\n\t\t\t}\n\t\t}\n\t\tforeach( $_POST['custom_label_names'] as $key )\n\t\t{\n\t\t\tif( empty( $key ) && !$label_names_empty )\n\t\t\t{\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tgenesis_extender_update_labels( $_POST['custom_label_names'] );\n\n\t\tif( !empty( $_POST['custom_label_create_conditionals'] ) )\n\t\t{\n\t\t\t$custom_conditional_ids = array();\n\t\t\t$custom_conditional_tags = array();\n\t\t\tforeach( $_POST['custom_label_create_conditionals'] as $key => $value )\n\t\t\t{\n\t\t\t\t$custom_conditional_ids[] = 'has_label_' . str_replace( '-', '_', genesis_extender_sanatize_string( $_POST['custom_label_names'][$key] ) );\n\t\t\t\t$custom_conditional_tags[] = 'extender_has_label(\\'' . genesis_extender_sanatize_string( $_POST['custom_label_names'][$key] ) . '\\')';\n\t\t\t}\n\t\t\tgenesis_extender_update_conditionals( $custom_conditional_ids, $custom_conditional_tags );\n\t\t}\n\t}\n\t\n\tif( !empty( $_POST['custom_widget_conditionals_list'] ) )\n\t{\n\t\t$custom_widget_conditionals_list = $_POST['custom_widget_conditionals_list'];\n\t}\n\telse\n\t{\n\t\t$custom_widget_conditionals_list = array();\n\t}\n\t\n\tif( !empty( $_POST['custom_hook_conditionals_list'] ) )\n\t{\n\t\t$custom_hook_conditionals_list = $_POST['custom_hook_conditionals_list'];\n\t}\n\telse\n\t{\n\t\t$custom_hook_conditionals_list = array();\n\t}\n\t\n\tif( !empty( $_POST['custom_conditional_ids'] ) )\n\t{\n\t\t$conditional_ids_empty = true;\n\t\tforeach( $_POST['custom_conditional_ids'] as $key )\n\t\t{\n\t\t\tif( !empty( $key ) )\n\t\t\t{\n\t\t\t\t$conditional_ids_empty = false;\n\t\t\t}\n\t\t}\n\t\tforeach( $_POST['custom_conditional_ids'] as $key )\n\t\t{\n\t\t\tif( empty( $key ) && !$conditional_ids_empty )\n\t\t\t{\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tgenesis_extender_update_conditionals( $_POST['custom_conditional_ids'], $_POST['custom_conditional_tags'] );\n\t}\n\tif( !empty( $_POST['custom_widget_ids'] ) )\n\t{\n\t\t$widget_ids_empty = true;\n\t\tforeach( $_POST['custom_widget_ids'] as $key )\n\t\t{\n\t\t\tif( !empty( $key ) )\n\t\t\t{\n\t\t\t\t$widget_ids_empty = false;\n\t\t\t}\n\t\t}\n\t\tforeach( $_POST['custom_widget_ids'] as $key )\n\t\t{\n\t\t\tif( empty( $key ) && !$widget_ids_empty )\n\t\t\t{\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tgenesis_extender_update_widgets( $_POST['custom_widget_ids'], $custom_widget_conditionals_list, $_POST['custom_widget_hook'], $_POST['custom_widget_class'], $_POST['custom_widget_description'], $_POST['custom_widget_status'], $_POST['custom_widget_priority'] );\n\t}\n\tif( !empty( $_POST['custom_hook_ids'] ) )\n\t{\n\t\t$hook_ids_empty = true;\n\t\tforeach( $_POST['custom_hook_ids'] as $key )\n\t\t{\n\t\t\tif( !empty( $key ) )\n\t\t\t{\n\t\t\t\t$hook_ids_empty = false;\n\t\t\t}\n\t\t}\n\t\tforeach( $_POST['custom_hook_ids'] as $key )\n\t\t{\n\t\t\tif( empty( $key ) && !$hook_ids_empty )\n\t\t\t{\n\t\t\t\techo 'Please fill in ALL \"Name\" fields';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tgenesis_extender_update_hooks( $_POST['custom_hook_ids'], $custom_hook_conditionals_list, $_POST['custom_hook_hook'], $_POST['custom_hook_status'], $_POST['custom_hook_priority'], $_POST['custom_hook_textarea'] );\n\t}\n\t\n\tgenesis_extender_write_files( $css = true, $ez = false );\n\t\n\techo 'Custom Options Updated';\n\texit();\n}", "function save_admin_options()\n {\n return update_option($this->options_name, $this->options);\n }", "public function save_builder_settings() {\n\t\t_deprecated_function( 'save_builder_settings', '1.6', 'save_builder' );\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforminator_validate_ajax( \"forminator_save_builder_fields\" );\n\n\t\t$submitted_data = $this->get_post_data();\n\t\t$fields = array();\n\t\t$id = isset( $submitted_data['form_id'] ) ? $submitted_data['form_id'] : null;\n\t\t$id = intval( $id );\n\t\t$title = sanitize_text_field( $submitted_data['formName'] );\n\t\t$status = isset( $submitted_data['status'] ) ? sanitize_text_field( $submitted_data['status'] ) : '';\n\t\t$version = isset( $submitted_data['version'] ) ? sanitize_text_field( $submitted_data['version'] ) : '1.0';\n\n\t\tif ( is_null( $id ) || $id <= 0 ) {\n\t\t\t$form_model = new Forminator_Custom_Form_Model();\n\n\t\t\tif ( empty( $status ) ) {\n\t\t\t\t$status = Forminator_Custom_Form_Model::STATUS_PUBLISH;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$form_model = Forminator_Custom_Form_Model::model()->load( $id );\n\n\t\t\tif ( ! is_object( $form_model ) ) {\n\t\t\t\twp_send_json_error( __( \"Form model doesn't exist\", Forminator::DOMAIN ) );\n\t\t\t}\n\t\t\tif ( empty( $status ) ) {\n\t\t\t\t$status = $form_model->status;\n\t\t\t}\n\t\t}\n\t\t$form_model->set_var_in_array( 'name', 'formName', $submitted_data, 'forminator_sanitize_field' );\n\n\t\t// Sanitize settings\n\t\t$settings = forminator_sanitize_field( $submitted_data['data'] );\n\n\t\t// Sanitize custom css\n\t\tif ( isset( $submitted_data['data']['custom_css'] ) ) {\n\t\t\t$settings['custom_css'] = sanitize_textarea_field( $submitted_data['data']['custom_css'] );\n\t\t}\n\n\t\t// Sanitize thank you message\n\t\tif ( isset( $submitted_data['data']['thankyou-message'] ) ) {\n\t\t\t$settings['thankyou-message'] = $submitted_data['data']['thankyou-message'];\n\t\t}\n\n\t\t// Sanitize user email message\n\t\tif ( isset( $submitted_data['data']['user-email-editor'] ) ) {\n\t\t\t$settings['user-email-editor'] = $submitted_data['data']['user-email-editor'];\n\t\t}\n\n\t\t// Sanitize admin email message\n\t\tif ( isset( $submitted_data['data']['admin-email-editor'] ) ) {\n\t\t\t$settings['admin-email-editor'] = $submitted_data['data']['admin-email-editor'];\n\t\t}\n\n\t\t$settings['formName'] = $title;\n\t\t$settings['version'] = $version;\n\t\t$form_model->settings = $settings;\n\n\t\t// status\n\t\t$form_model->status = $status;\n\n\t\t// Save data\n\t\t$id = $form_model->save();\n\n\t\t// add privacy settings to global option\n\t\t$override_privacy = false;\n\t\tif ( isset( $settings['enable-submissions-retention'] ) ) {\n\t\t\t$override_privacy = filter_var( $settings['enable-submissions-retention'], FILTER_VALIDATE_BOOLEAN );\n\t\t}\n\t\t$retention_number = null;\n\t\t$retention_unit = null;\n\t\tif ( $override_privacy ) {\n\t\t\t$retention_number = 0;\n\t\t\t$retention_unit = 'days';\n\t\t\tif ( isset( $settings['submissions-retention-number'] ) ) {\n\t\t\t\t$retention_number = (int) $settings['submissions-retention-number'];\n\t\t\t}\n\t\t\tif ( isset( $settings['submissions-retention-unit'] ) ) {\n\t\t\t\t$retention_unit = $settings['submissions-retention-unit'];\n\t\t\t}\n\t\t}\n\n\t\tforminator_update_form_submissions_retention( $id, $retention_number, $retention_unit );\n\n\t\twp_send_json_success( $id );\n\t}", "function pu_display_setting($args)\n{\n extract( $args );\n\n $option_name = 'pu_theme_options';\n\n $options = get_option( $option_name );\n\n switch ( $type ) { \n case 'text': \n $options[$id] = stripslashes($options[$id]); \n $options[$id] = esc_attr( $options[$id]); \n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\"; \n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea': \n $options[$id] = stripslashes($options[$id]); \n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html( $options[$id]); \n\n printf(\n \twp_editor($options[$id], $id, \n \t\tarray('textarea_name' => $option_name . \"[$id]\",\n \t\t\t'style' => 'width: 200px'\n \t\t\t)) \n\t\t\t\t);\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\"; \n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\"; \n break; \n }\n}", "function pu_display_setting($args)\n{\n extract($args);\n\n $option_name = 'pu_theme_options';\n\n $options = get_option($option_name);\n\n switch ($type) {\n case 'text':\n $options[$id] = stripslashes($options[$id]);\n $options[$id] = esc_attr($options[$id]);\n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\";\n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea':\n $options[$id] = stripslashes($options[$id]);\n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html($options[$id]);\n\n printf(\n wp_editor($options[$id], $id,\n array('textarea_name' => $option_name . \"[$id]\",\n 'style' => 'width: 200px',\n ))\n );\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\";\n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n }\n}", "public function get_widget_custom_settings($key, $widget)\r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t//$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\r\n\t/*\t 'title' => $uu_title,\r\n\t\t\t\t 'type' =>$uu_type, // 1-text, 2-shortcode\t\r\n\t\t\t\t 'editable' =>$uu_editable ,\t\r\n\t\t\t\t 'native' =>0,\t\t\r\n\t\t\t\t 'content' =>$uu_content,*/\r\n\t\t\t\t \r\n\t\t$editable_0 = \"\";\r\n\t\t$editable_1 = \"\";\r\n\t\tif($widget['editable']==0) {$editable_0 = 'selected=\"selected\"';}\r\n\t\tif($widget['editable']==1) {$editable_1 = 'selected=\"selected\"';}\r\n\t\t\r\n\t\t$type_1 = \"\";\r\n\t\t$type_2 = \"\";\r\n\t\tif($widget['type']==1) {$type_1 = 'selected=\"selected\"';}\r\n\t\tif($widget['type']==2) {$type_2 = 'selected=\"selected\"';}\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$html .= '<div class=\"uultra-adm-widget-cont-add-new\" style=\"width:98%\" >';\r\n \r\n\t\t$html .= '<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__(\"Name: \",'xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\"><input name=\"uultra_add_mod_widget_title_'.$key.'\" type=\"text\" id=\"uultra_add_mod_widget_title_'.$key.'\" style=\"width:120px\" value=\"'.$widget['title'].'\" /> \r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t <tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Type:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_widget_type_'.$key.'\" id=\"uultra_add_mod_widget_type_'.$key.'\" size=\"1\">\r\n\t\t\t\t \r\n\t\t\t\t <option value=\"1\" '.$type_1.'>'.__(\"Text: \",'xoousers').'</option>\r\n\t\t\t\t <option value=\"2\" '.$type_2.'>Shortcode</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t<tr>\r\n\t\t\t\t<td width=\"50%\"> '.__('Editable by user:','xoousers').'</td>\r\n\t\t\t\t<td width=\"50%\">\r\n\t\t\t\t<select name=\"uultra_add_mod_widget_editable_'.$key.'\" id=\"uultra_add_mod_widget_editable_'.$key.'\" size=\"1\">\r\n\t\t\t\t \r\n\t\t\t\t <option value=\"0\" '.$editable_0.'>NO</option>\r\n\t\t\t\t <option value=\"1\" '.$editable_1.'>YES</option>\r\n\t\t\t\t</select>\r\n\r\n\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t<td>'.__('Content:','xoousers').'</td>\r\n\t\t\t\t<td>&nbsp;</textarea> \r\n\t\t\t </td>\r\n\t\t\t </tr>\r\n\t\t\t \r\n\t\t\t <tr>\r\n\t\t\t\t\r\n\t\t\t\t<td colspan=\"2\">\r\n\t\t\t\t\r\n\t\t\t\t<textarea name=\"uultra_add_mod_widget_content_'.$key.'\" id=\"uultra_add_mod_widget_content_'.$key.'\" style=\"width:98%;\" rows=\"5\">'.stripslashes($widget['content']).'</textarea>\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t </td>\r\n\t\t\t </tr> \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t</table> '; \t\t\t\r\n\t\t\t \r\n\t\t\t$html .= ' <p class=\"submit\"></p> ';\r\n\t\t\t\t\r\n\t\t\t$html .= '</div>';\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t}", "function siteorigin_panels_save_options(){\n\tif( !current_user_can('manage_options') ) return;\n\tif( empty($_POST['_wpnonce']) || !wp_verify_nonce( $_POST['_wpnonce'], 'save_panels_settings' ) ) return;\n\n\t// Save the post types settings\n\t$post_types = isset( $_POST['siteorigin_panels_post_types'] ) ? array_keys( $_POST['siteorigin_panels_post_types'] ) : array();\n\n\t$settings = isset( $_POST['siteorigin_panels_settings'] ) ? $_POST['siteorigin_panels_settings'] : array();\n\tforeach($settings as $f => $v){\n\t\tswitch($f){\n\t\t\tcase 'inline-css' :\n\t\t\tcase 'responsive' :\n\t\t\tcase 'copy-content' :\n\t\t\tcase 'animations' :\n\t\t\tcase 'bundled-widgets' :\n\t\t\t$settings[$f] = !empty($settings[$f]);\n\t\t\t\tbreak;\n\t\t\tcase 'margin-bottom' :\n\t\t\tcase 'margin-sides' :\n\t\t\tcase 'mobile-width' :\n\t\t\t$settings[$f] = intval($settings[$f]);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Checkbox settings\n\t$settings['responsive'] = !empty($settings['responsive']);\n\t$settings['copy-content'] = !empty($settings['copy-content']);\n\t$settings['animations'] = !empty($settings['animations']);\n\t$settings['inline-css'] = !empty($settings['inline-css']);\n\t$settings['bundled-widgets'] = !empty($settings['bundled-widgets']);\n\n\t// Post type settings\n\t$settings['post-types'] = $post_types;\n\n\tupdate_option('siteorigin_panels_settings', $settings);\n\n\tglobal $siteorigin_panels_settings;\n\t$siteorigin_panels_settings = false;\n}", "function pu_display_setting($args) {\n extract($args);\n\n $option_name = 'pu_theme_options';\n\n $options = get_option($option_name);\n\n switch ($type) {\n case 'text':\n $options[$id] = stripslashes($options[$id]);\n $options[$id] = esc_attr($options[$id]);\n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\";\n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea':\n $options[$id] = stripslashes($options[$id]);\n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html($options[$id]);\n\n printf(\n wp_editor($options[$id], $id, array('textarea_name' => $option_name . \"[$id]\",\n 'style' => 'width: 200px'\n ))\n );\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\"; \n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\"; \n break;\n }\n}", "function zdtw_menu_options_callback() {\n echo '<form id=\"'.$this->prefix.'-form\" class=\"zd-settings-form\" method=\"POST\" action=\"options.php\">'.\"\\n\";\n\n// print_r( $this->options );\n// echo $this->settings_page_id;\n\n // settings_fields( $option_group )\n settings_fields( $this->settings_page_id );\n// settings_fields( $this->prefix . '-general-section' );\n\n do_settings_fields( $this->settings_page_id, $this->prefix .'-general-section' );\n\n submit_button();\n\n echo '</form>'.\"\\n\";\n }", "function save_meta_options( $postID ){\n\t\t$post = $_POST;\n\t\tif((isset($post['update']) || isset($post['save']) || isset($post['publish']))){\n\n\n\t\t\t$user_template = (isset($post['pagelines_template'])) ? $post['pagelines_template'] : '';\n\n\t\t\tif($user_template != ''){\n\n\t\t\t\t$set = pl_meta($postID, PL_SETTINGS);\n\t\t\t\t\n\t\t\t\t$set['draft']['page-template'] = $user_template; \n\t\t\t\t$set['live']['page-template'] = $user_template; \n\t\t\t\t\n\t\t\t\tpl_meta_update($postID, PL_SETTINGS, $set);\n\t\t\t}\n\n\n\t\t}\n\t}", "function modify_js_options( $options ) {\n // Addon Options Cleaned Up A Bit (lowest pri)\n //\n if ( $this->slplus->is_CheckTrue( $this->addon->options['hide_bubble'] ) ) {\n\t $this->slplus->SmartOptions->bubblelayout->value = '';\n }\n\n // Options From URL Passing (Second Highest Priority)\n //\n $new_options = array();\n if ( ! empty( $_REQUEST['address'] ) && $this->is_address_passed_by_URL() ) {\n $new_options['immediately_show_locations'] = '1';\n $new_options['use_sensor'] = false;\n }\n\n // Widget Options (Highest Pri)\n //\n $widget_options = array();\n if ( $this->addon->widget->is_initial_widget_search( $_REQUEST ) ) {\n $widget_options = array(\n 'disable_initial_directory' => false ,\n 'immediately_show_locations' => '1' ,\n 'map_initial_display' => 'map',\n 'use_sensor' => false\n );\n\n // Discrete State Output - recenter map\n //\n if ( isset( $_REQUEST['slp_widget']['state'] ) && ! empty( $_REQUEST['slp_widget']['state'] ) ) {\n $widget_options['map_center'] = $_REQUEST['slp_widget']['state'];\n }\n\n // Set Radius\n //\n if ( ( isset( $_REQUEST['widget_address'] ) ) && isset( $_REQUEST['radius'] ) ) {\n $widget_options['initial_radius'] = $_REQUEST['radius'];\n }\n }\n\n if ( empty( $this->addon->options['map_region'] ) ) {\n $this->attribute_special_processing( 'map_region' );\n }\n\n // Lowest Priority On Left: current options (slplus->options), then addon options, then attribute settings, then URL passing stuff, then our widget needs\n $all_options = array_merge( $options, $this->addon->options , $this->attribute_js_options, $new_options , $widget_options );\n\n // Only keep original options that were changed or \"for our JS\" settings\n\t //\n\t // NOTE: None of the SmartOptions should appear here\n\t //\n\t $for_our_js = array(\n\t \t'address_autocomplete',\n\t \t'disable_initial_directory',\n\t 'selector_behavior',\n\t );\n\t foreach ( $all_options as $key => $value ) {\n\t \tif ( array_key_exists( $key , $options ) || in_array( $key , $for_our_js ) ) {\n\t \t\t$options[ $key ] = $all_options[ $key ]; // overwrite\n\t\t }\n\t }\n\n return $options;\n }", "function widget_text_save_callback() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$data = $_POST['data'];\r\n\r\n\t\t$vals = explode('&', $data);\r\n\r\n\t\tforeach($vals as $item){\r\n\t\t\t$arr = explode('=', $item);\r\n\t\t\t$key = urldecode($arr[0]);\r\n\t\t\t$val = urldecode($arr[1]);\r\n\t\t\tif(endsWith($key, '[text]')) {\r\n\t\t\t\t// so this a Text Widget submission, continue to process\r\n\t\t\t\t\r\n\t\t\t\t$used_shortcodes = array();\r\n\t\t\t\t$replacements = array();\r\n\t\t\t\t$css = $this->cactus_parse_inlinecss($val, $used_shortcodes, $replacements);\r\n\t\t\t\t\r\n\t\t\t\tfile_put_contents(dirname(__FILE__) . '/log.txt',$css, FILE_APPEND);\r\n\t\t\t\tif($css != ''){\r\n\t\t\t\t\t$new_val = $val;\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach($replacements as $replace){\r\n\t\t\t\t\t\t$new_val = str_replace($replace[0], $replace[1], $new_val);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$widget = str_replace('[text]', '', $key);\r\n\r\n\t\t\t\t\t// update global custom CSS, to be called in every pages\r\n\t\t\t\t\t$global_custom_css = get_option('ct_custom_css');\r\n\t\t\t\t\tif(!isset($global_custom_css) || !is_array($global_custom_css)){\r\n\t\t\t\t\t\t$global_custom_css = array();\r\n\t\t\t\t\t\tadd_option('ct_custom_css', $global_custom_css);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$global_custom_css[$widget] = $css;\r\n\t\t\t\t\tupdate_option('ct_custom_css', $global_custom_css);\r\n\r\n\t\t\t\t\t$shortcodes = get_option('ct_shortcodes_used_in_widgets');\r\n\t\t\t\t\tif(!isset($shortcodes) || !is_array($shortcodes)){\r\n\t\t\t\t\t\t$shortcodes = array();\r\n\t\t\t\t\t\tadd_option('ct_shortcodes_used_in_widgets', $shortcodes);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$shortcodes[$widget] = $used_shortcodes;\r\n\t\t\t\t\tupdate_option('ct_shortcodes_used_in_widgets', $shortcodes);\r\n\r\n\t\t\t\t\tpreg_match('/(.*)\\[(.*)\\]/', $widget, $matches);\r\n\t\t\t\t\t$id_base = substr($matches[1], 7);\r\n\r\n\t\t\t\t\t$widget_options = get_option('widget_' . $id_base);\r\n\r\n\t\t\t\t\t$widget_options[$matches[2]]['text'] = $new_val;\r\n\r\n\t\t\t\t\tupdate_option('widget_' . $id_base, $widget_options);\r\n\r\n\t\t\t\t\t// do this silently. So echo empty;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\twp_die(); // this is required to terminate immediately and return a proper response\r\n\t}", "function options() {\n wp_enqueue_style('adminstyles', plugins_url('css/admin-options.css', __FILE__));\n if (version_compare(get_bloginfo('version'), '3.3', '<')) {\n wp_head();\n }\n $buttonOptions = $this->_followOptions->getButtonOptions();\n $style = $this->_followOptions->getDefaultStyle();\n $title = $this->_followOptions->getDefaultTitle();\n\n $commonFollowOptions = get_option('addthis_follow_settings');\n $followWidgetOptions = get_option('widget_addthis-follow-widget');\n /**\n * Restore from widget settings if possible\n */\n if (($commonFollowOptions == false || empty($commonFollowOptions)) && $followWidgetOptions != false) {\n foreach ($followWidgetOptions as $key => $list) {\n if (is_int($key) && is_array($list)) {\n merge_options($list, $buttonOptions, $title, $style);\n }\n }\n $restoreOptions = array('title' => $title, 'style' => $style);\n foreach($buttonOptions as $key => $value) {\n $restoreOptions[$key] = $value['placeholder'];\n }\n add_option('addthis_follow_settings', $restoreOptions);\n } elseif ($commonFollowOptions != false && !empty($commonFollowOptions)) {\n /**\n * Follow options already exists, just update it\n */\n merge_options($commonFollowOptions, $buttonOptions, $title, $style);\n }\n\n $this->displayOptionsForm($buttonOptions, $style, $title);\n }", "function wp_ajax_save_widget()\n {\n }", "function form( $instance ) \r\n {\r\n $defaults = array( 'title' => __('OptinSkin', 'OptinSkin'));\r\n $instance = wp_parse_args( (array) $instance, $defaults );\r\n $instance_key = uniqid();\r\n?>\r\n\r\n <style type=\"text/css\">\r\n \t.ois_admin_widget_title {\r\n font-size:15px;\r\n padding: 0 0 7px 0px;\r\n }\r\n .ois_admin_widget {\r\n max-width: 250px;\r\n }\r\n .ois_widget_selection {\r\n min-width: 200px;\r\n }\r\n .ois_admin_widget p {\r\n max-width: 250px;\r\n }\r\n </style>\r\n <div class=\"ois_admin_widget\">\r\n <h3 style=\"padding-top: 0;margin-top:10px;\">Basic Settings</h3>\r\n <div class=\"ois_admin_widget_title\">\r\n Skin to Display:\r\n </div><select class=\"ois_widget_selection\" name=\"<?php echo $this->get_field_name( 'skin' ); ?>\">\r\n <?php\r\n $skins = get_option('ois_skins');\r\n foreach ($skins as $id=>$skin) {\r\n echo '<option value=\"' . $id . '\"';\r\n if (isset($instance['skin']) && $instance['skin'] == $id) {\r\n echo ' selected=\"selected\" ';\r\n } // if\r\n echo '>' . $skin['title'] . '</option>';\r\n } // foreach\r\n ?>\r\n </select>\r\n <hr>\r\n <h3>Split-Testing <span style=\"font-weight:normal;\">(Optional)</span></h3>\r\n\r\n <p><input class=\"ois_widget_split\" id=\"<?php echo $instance_key; ?>_split\" type=\"checkbox\" name=\"<?php echo $this->get_field_name( 'split-test' ); ?>\" <?php if ($instance['split-test'] == 'yes') {\r\n echo ' checked=\"checked\" ';\r\n }?> value=\"yes\"> <span style=\"font-size:13px;\">I want to split-test this widget</span></p>\r\n\r\n <div id=\"<?php echo $instance_key; ?>_selection\" style=\"padding: 2px 0 8px 0;\">\r\n <div class=\"ois_admin_widget_title\">\r\n Alternate Skin:\r\n </div><select class=\"ois_widget_selection\" name=\"<?php echo $this->get_field_name( 'skin-b' ); ?>\">\r\n <?php\r\n foreach ($skins as $id=>$skin) {\r\n echo '<option value=\"' . $id . '\"';\r\n if (isset($instance['skin-b']) && $instance['skin-b'] == $id) {\r\n echo ' selected=\"selected\" ';\r\n } // if\r\n echo '>' . $skin['title'] . '</option>';\r\n }\r\n ?>\r\n </select>\r\n </div>\r\n\r\n <p style=\"border: 1px solid #e0e0e0; padding: 7px;&lt;?php\r\n ?&gt;\" id=\"<?php echo $instance_key; ?>_info\">If split-testing is enabled, the widget will either show the first or second skin, based on a random algorithm.</p>\r\n </div><?php\r\n }", "function theme_options_do_page() {\n\tglobal $select_options, $radio_options;\n\n\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t$_REQUEST['settings-updated'] = false;\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); echo \"<h2>Site Description</h2>\"; ?>\n\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'sample_options' ); ?>\n\t\t\t<?php $options = get_option( 'site_description' ); ?>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( 'Enter a site description', 'psnc' ); ?></th>\n\t\t\t\t\t<td>\n\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t$args = array(\n\t\t\t\t\t\t 'textarea_rows' => 15,\n\t\t\t\t\t\t 'teeny' => true,\n\t\t\t\t\t\t 'quicktags' => true,\n\t\t\t\t\t\t 'media_buttons' => false\n\t\t\t\t\t\t);\n\t\t\t\t\t\t $saved_vals = $options['sometextarea'];\n\t\t\t\t\t\twp_editor( stripslashes($saved_vals), 'site_description[sometextarea]', $args );\n\t\t\t\t\t\tsubmit_button( 'Save description' );\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<label class=\"description\" for=\"site_description[sometextarea]\"><?php _e( 'This will appear on your home page and also help with SEO (HTML allowed).', 'psnc' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t</form>\n\t</div>\n\t<?php\n\t\n}", "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}", "function update_sss_options() {\n\t$sss_options = get_option('sss_plugin_options');\n\tif(!$sss_options)\n\t\t$sss_options = array();\n\t\n\tif ($_POST['sss_set_max_width']) { \n\t\t$safe_val_max_width = intval(addslashes(strip_tags($_POST['sss_set_max_width'])));\n\t\t$sss_options['max_width'] = $safe_val_max_width;\n\t}\n\telse\n\t\t$sss_options['max_width'] = 560;\n\tif ($_POST['sss_start_showing_from']) { \n\t\t$safe_val_start_showing_from = intval(addslashes(strip_tags($_POST['sss_start_showing_from'])));\n\t\t$sss_options['start_showing_from'] = $safe_val_start_showing_from;\n\t}\n\telse\n\t\t$sss_options['start_showing_from'] = 6;\n\tif ($_POST['sss_twitter_name']) { \n\t\t$safe_val_twitter_name = addslashes(strip_tags($_POST['sss_twitter_name']));\n\t\t$sss_options['twitter_name'] = $safe_val_twitter_name;\n\t}\n\telse\n\t\t$sss_options['twitter_name'] = '';\n\tif ($_POST['sss_story_source']) { \n\t\t$safe_val_story_source = addslashes(strip_tags($_POST['sss_story_source']));\n\t\t$sss_options['story_source'] = $safe_val_story_source;\n\t}\n\telse\n\t\t$sss_options['story_source'] = get_bloginfo('name');\n\tif ($_POST['sss_show_where']) { \n\t\t$safe_val_show_where = addslashes(strip_tags($_POST['sss_show_where']));\n\t\t$sss_options['show_where'] = $safe_val_show_where;\n\t}\n\telse\n\t\t$sss_options['show_where'] = 'both';\n\t\t\n\t// button selection settings\n\tif ($buttons_arr = $_POST['sss_which_buttons']) {\n\t\t$sss_options['which_buttons'] = array();\n\t\tforeach ($buttons_arr as $btn) {\n\t\t\tarray_push($sss_options['which_buttons'], addslashes(strip_tags($btn)));\n\t\t}\n\t}\n\telse\n\t\t$sss_options['which_buttons'] = array();\n\t\n\t//excluding IDs\n\tif ($_POST['sss_exclude_ids']) { \n\t\t$safe_val_exclude_ids = addslashes(strip_tags(preg_replace('/\\s+/', '', $_POST['sss_exclude_ids'])));\n\t\t$sss_exclude_ids = array();\n\t\t$sss_exclude_ids_temp = explode(',', $safe_val_exclude_ids);\n\t\tforeach($sss_exclude_ids_temp as $single_id)\n\t\t\tif(strlen($single_id) > 0 && intval($single_id) > 0)\n\t\t\t\tarray_push($sss_exclude_ids, intval($single_id));\n\t\t$sss_options['exclude_ids'] = array_unique($sss_exclude_ids);\n\t}\n\telse\n\t\t$sss_options['exclude_ids'] = array();\n\t\n\tif (update_option('sss_plugin_options', $sss_options)) {\n\t\techo '<div id=\"message\" class=\"updated fade\">';\n\t\techo '<p>Updated!</p>';\n\t\techo '</div>';\n\t} /*else {\n\t\techo '<div id=\"message\" class=\"error fade\">';\n\t\techo '<p>Unable to update. My bad.</p>';\n\t\techo '</div>';\n\t}*/\n}", "function doOptionsPage()\r\n\t{\r\n\t\t/*\tDeclare the different settings\t*/\r\n\t\tregister_setting('wpklikandpay_store_config_group', 'storeTpe', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'storeRang', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'storeIdentifier', '' );\r\n\t\tregister_setting('wpklikandpay_store_config_group', 'environnement', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlSuccess', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlDeclined', '' );\r\n\t\t// register_setting('wpklikandpay_store_config_group', 'urlCanceled', '' );\r\n\t\tsettings_fields( 'wpklikandpay_url_config_group' );\r\n\r\n\t\t/*\tAdd the section about the store main configuration\t*/\r\n\t\tadd_settings_section('wpklikandpay_store_config', __('Informations de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeConfigForm'), 'wpklikandpayStoreConfig');\r\n\r\n\t\t/*\tAdd the section about the back url\t*/\r\n\t\t// add_settings_section('wpklikandpay_url_config', __('Urls de retour apr&eacute;s un paiement', 'wpklikandpay'), array('wpklikandpay_option', 'urlConfigForm'), 'wpklikandpayUrlConfig');\r\n?>\r\n<form action=\"\" method=\"post\" >\r\n<input type=\"hidden\" name=\"saveOption\" id=\"saveOption\" value=\"save\" />\r\n\t<?php \r\n\t\tdo_settings_sections('wpklikandpayStoreConfig'); \r\n \r\n\t\t/*\tSave the configuration in case that the form has been send with \"save\" action\t*/\r\n\t\tif(isset($_POST['saveOption']) && ($_POST['saveOption'] == 'save'))\r\n\t\t{\r\n\t\t\t/*\tSave the store main configuration\t*/\r\n\t\t\tunset($optionList);$optionList = array();\r\n\t\t\t$optionList['storeTpe'] = $_POST['storeTpe'];\r\n\t\t\t$optionList['storeRang'] = $_POST['storeRang'];\r\n\t\t\t$optionList['storeIdentifier'] = $_POST['storeIdentifier'];\r\n\t\t\t$optionList['environnement'] = $_POST['environnement'];\r\n\t\t\twpklikandpay_option::saveStoreConfiguration('wpklikandpay_store_mainoption', $optionList);\r\n\t\t}\r\n\t?>\r\n\t<table summary=\"Store main configuration form\" cellpadding=\"0\" cellspacing=\"0\" class=\"storeMainConfiguration\" >\r\n\t\t<?php do_settings_fields('wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig'); ?>\r\n\t</table>\r\n\t<br/><br/><br/>\r\n<!--\r\n\t<?php \r\n\t\t// do_settings_sections('wpklikandpayUrlConfig');\r\n\r\n\t\t/*\tSave the configuration in case that the form has been send with \"save\" action\t*/\r\n\t\tif(isset($_POST['saveOption']) && ($_POST['saveOption'] == 'save'))\r\n\t\t{\r\n\t\t\t/*\tSave the configuration for bakc url after payment\t*/\r\n\t\t\tunset($optionList);$optionList = array();\r\n\t\t\t$optionList['urlSuccess'] = $_POST['urlSuccess'];\r\n\t\t\t$optionList['urlDeclined'] = $_POST['urlDeclined'];\r\n\t\t\t$optionList['urlCanceled'] = $_POST['urlCanceled'];\r\n\t\t\twpklikandpay_option::saveStoreConfiguration('wpklikandpay_store_urloption', $optionList);\r\n\t\t}\r\n\t?>\r\n\t<table summary=\"Back url main configuration form\" cellpadding=\"0\" cellspacing=\"0\" class=\"storeMainConfiguration\" >\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" >\r\n\t\t<?php echo sprintf(__('Ajouter : %s dans les pages que vous allez cr&eacute;er.', 'wpklikandpay'), '<span class=\" bold\" >[wp-klikandpay_payment_return title=\"KlikAndPay return page\" ]</span>'); ?>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"2\" >&nbsp;</td>\r\n\t\t</tr>\r\n<?php \r\n\t\tdo_settings_fields('wpklikandpayUrlConfig', 'backUrlConfig'); \r\n?>\r\n\t</table>\r\n-->\r\n\t<br/><br/><br/>\r\n\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Enregistrer les options', 'wpklikandpay'); ?>\" />\r\n</form>\r\n<?php\r\n\t}", "public function save_settings() {\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-settings' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'vfb_settings' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tcheck_admin_referer( 'vfb-update-settings' );\n\n\t\t$data = array();\n\n\t\tforeach ( $_POST['vfb-settings'] as $key => $val ) {\n\t\t\t$data[ $key ] = esc_html( $val );\n\t\t}\n\n\t\tupdate_option( 'vfb-settings', $data );\n\t}", "public function saveForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->save();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_SAVE );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "function cinerama_edge_save_options() {\n\t\tglobal $cinerama_edge_global_options;\n\n\t\tif ( current_user_can( 'administrator' ) ) {\n\t\t\t$_REQUEST = stripslashes_deep( $_REQUEST );\n\n\t\t\tunset( $_REQUEST['action'] );\n\n\t\t\tcheck_ajax_referer( 'edgtf_ajax_save_nonce', 'edgtf_ajax_save_nonce' );\n\n\t\t\t$cinerama_edge_global_options = array_merge( $cinerama_edge_global_options, $_REQUEST );\n\n\t\t\tupdate_option( 'edgtf_options_cinerama', $cinerama_edge_global_options );\n\n\t\t\tdo_action( 'cinerama_edge_action_after_theme_option_save' );\n\t\t\techo esc_html__( 'Saved', 'cinerama' );\n\n\t\t\tdie();\n\t\t}\n\t}", "function genesis_extender_custom_options()\n{\n\tglobal $message;\n\t$custom_functions = get_option( 'genesis_extender_custom_functions' );\n\t$custom_js = get_option( 'genesis_extender_custom_js' );\n\t$custom_templates = genesis_extender_get_templates();\n\t$custom_labels = genesis_extender_get_labels();\n\t$custom_conditionals = genesis_extender_get_conditionals();\n\t$custom_widgets = genesis_extender_get_widgets();\n\t$custom_hooks = genesis_extender_get_hooks();\n?>\n\t<div class=\"wrap\">\n\t\t\n\t\t<div id=\"genesis-extender-custom-saved\" class=\"genesis-extender-update-box\"></div>\n\n\t\t<?php\n\t\tif( !empty( $_POST['action'] ) && $_POST['action'] == 'reset' )\n\t\t{\n\t\t\tgenesis_extender_reset_delete_template();\n\t\t\tupdate_option( 'genesis_extender_custom_css', genesis_extender_custom_css_options_defaults() );\n\t\t\tupdate_option( 'genesis_extender_custom_functions', genesis_extender_custom_functions_options_defaults() );\n\t\t\tupdate_option( 'genesis_extender_custom_js', genesis_extender_custom_js_options_defaults() );\n\t\t\tupdate_option( 'genesis_extender_custom_templates', array() );\n\t\t\tupdate_option( 'genesis_extender_custom_labels', array() );\n\t\t\tupdate_option( 'genesis_extender_custom_conditionals', array() );\n\t\t\tupdate_option( 'genesis_extender_custom_widget_areas', array() );\n\t\t\tupdate_option( 'genesis_extender_custom_hook_boxes', array() );\n\n\t\t\tgenesis_extender_get_custom_css( null, $args = array( 'cached' => false, 'array' => false ) );\n\t\t\t$custom_functions = get_option( 'genesis_extender_custom_functions' );\n\t\t\t$custom_js = get_option( 'genesis_extender_custom_js' );\n\t\t\t$custom_templates = genesis_extender_get_templates();\n\t\t\t$custom_labels = genesis_extender_get_labels();\n\t\t\t$custom_conditionals = genesis_extender_get_conditionals();\n\t\t\t$custom_widgets = genesis_extender_get_widgets();\n\t\t\t$custom_hooks = genesis_extender_get_hooks();\n\n\t\t\tgenesis_extender_write_files( $css = true, $ez = false );\n\t\t?>\n\t\t\t<script type=\"text/javascript\">jQuery(document).ready(function($){ $('#genesis-extender-custom-saved').html('Custom Options Reset').css(\"position\", \"fixed\").fadeIn('slow');window.setTimeout(function(){$('#genesis-extender-custom-saved').fadeOut( 'slow' );}, 2222); });</script>\n\t\t<?php\n\t\t}\n\n\t\tif( !empty( $_GET['activetab'] ) )\n\t\t{ ?>\n\t\t\t<script type=\"text/javascript\">jQuery(document).ready(function($) { $('#<?php echo $_GET['activetab']; ?>').click(); });</script>\t\n\t\t<?php\n\t\t} ?>\n\t\t\n\t\t<div id=\"icon-options-general\" class=\"icon32\"></div>\n\t\t\n\t\t<h2 id=\"genesis-extender-admin-heading\"><?php _e( 'Extender - Custom Options', 'extender' ); ?></h2>\n\t\t\n\t\t<div class=\"genesis-extender-css-builder-button-wrap\">\n\t\t\t<span id=\"show-hide-custom-css-builder\" class=\"button\"><?php _e( 'CSS Builder', 'extender' ); ?></span>\n\t\t</div>\n\n\t\t<div class=\"genesis-extender-php-builder-button-wrap\">\n\t\t\t<span id=\"show-hide-custom-php-builder\" class=\"button\"><?php _e( 'PHP Builder', 'extender' ); ?></span>\n\t\t</div>\n\t\t\n\t\t<div id=\"genesis-extender-admin-wrap\">\n\t\t\n\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-css-builder.php' ); ?>\n\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-php-builder.php' ); ?>\n\t\t\t\n\t\t\t<form action=\"/\" id=\"custom-options-form\" name=\"custom-options-form\">\n\t\t\t\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"genesis_extender_custom_options_save\" />\n\t\t\t\t<input type=\"hidden\" name=\"security\" value=\"<?php echo wp_create_nonce( 'custom-options' ); ?>\" />\n\t\t\t\n\t\t\t\t<div id=\"genesis-extender-floating-save\">\n\t\t\t\t\t<input type=\"submit\" value=\"<?php _e( 'Save Changes', 'extender' ); ?>\" name=\"Submit\" alt=\"Save Changes\" class=\"genesis-extender-save-button button button-primary\"/>\n\t\t\t\t\t<img class=\"genesis-extender-ajax-save-spinner\" src=\"<?php echo site_url() . '/wp-admin/images/spinner-2x.gif'; ?>\" />\n\t\t\t\t\t<span class=\"genesis-extender-saved\"></span>\n\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t<div id=\"genesis-extender-custom-options-nav\" class=\"genesis-extender-admin-nav\">\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li id=\"genesis-extender-custom-options-nav-css\" class=\"genesis-extender-options-nav-all genesis-extender-options-nav-active\"><a href=\"#\">CSS</a></li><li id=\"genesis-extender-custom-options-nav-functions\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Functions</a></li><li id=\"genesis-extender-custom-options-nav-js\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">JS</a></li><li id=\"genesis-extender-custom-options-nav-templates\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Templates</a></li><li id=\"genesis-extender-custom-options-nav-labels\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Labels</a></li><li id=\"genesis-extender-custom-options-nav-conditionals\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Conditionals</a></li><li id=\"genesis-extender-custom-options-nav-widget-areas\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Widget Areas</a></li><li id=\"genesis-extender-custom-options-nav-hook-boxes\" class=\"genesis-extender-options-nav-all\"><a href=\"#\">Hook Boxes</a></li><li id=\"genesis-extender-custom-options-nav-image-uploader\" class=\"genesis-extender-options-nav-all\"><a class=\"genesis-extender-options-nav-last\" href=\"#\">Images</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div class=\"genesis-extender-custom-options-wrap\">\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-css.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-functions.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-js.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-templates.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-labels.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-conditionals.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-widget-areas.php' ); ?>\n\t\t\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-hook-boxes.php' ); ?>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t</form>\n\n\t\t\t<?php require_once( GENEXT_PATH . 'lib/admin/boxes/custom-image-uploader.php' ); ?>\n\n\t\t\t<div id=\"genesis-extender-admin-footer\">\n\t\t\t\t<p>\n\t\t\t\t\t<a href=\"http://cobaltapps.com\" target=\"_blank\">CobaltApps.com</a> | <a href=\"http://extenderdocs.cobaltapps.com/\" target=\"_blank\">Docs</a> | <a href=\"http://cobaltapps.com/my-account/\" target=\"_blank\">My Account</a> | <a href=\"http://cobaltapps.com/forum/\" target=\"_blank\">Community Forum</a> | <a href=\"http://cobaltapps.com/affiliates/\" target=\"_blank\">Affiliates</a> &middot;\n\t\t\t\t\t<a><span id=\"show-options-reset\" class=\"genesis-extender-options-reset-button button\" style=\"margin:0; float:none !important;\"><?php _e( 'Custom Options Reset', 'extender' ); ?></span></a><a href=\"http://extenderdocs.cobaltapps.com/article/156-custom-options-reset\" class=\"tooltip-mark\" target=\"_blank\">[?]</a>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style=\"display:none; width:160px; border:none; background:none; margin:0 auto; padding:0; float:none; position:inherit;\" id=\"show-options-reset-box\" class=\"genesis-extender-custom-fonts-box\">\n\t\t\t\t<form style=\"float:left;\" id=\"genesis-extender-reset-custom-options\" method=\"post\">\n\t\t\t\t\t<input style=\"background:#D54E21; width:160px !important; color:#FFFFFF !important; -webkit-box-shadow:none; box-shadow:none;\" type=\"submit\" value=\"<?php _e( 'Reset Custom Options', 'extender' ); ?>\" class=\"genesis-extender-reset button\" name=\"Submit\" onClick='return confirm(\"<?php _e( 'Are you sure your want to reset your Genesis Extender Custom Options?', 'extender' ); ?>\")'/><input type=\"hidden\" name=\"action\" value=\"reset\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t</div> <!-- Close Wrap -->\n<?php\n}", "function category_browsing_options_form()\r\n\t//admin options for category_browsing_options module\r\n\t{\r\n\t\t$this->body .= \"<tr><td class=\\\"col_hdr\\\" colspan=\\\"2\\\" style=\\\"width: 100%; font-weight: bold; text-align: center;\\\">Options selected below will be applied to the Category Browsing Options Module</td></tr>\";\r\n\t\t$show_options = array (\r\n\t\t\t'cat_browse_opts_as_ddl' => $this->db->get_site_setting('cat_browse_opts_as_ddl'),\r\n\t\t\t'cat_browse_all_listings' => $this->db->get_site_setting('cat_browse_all_listings'),\r\n\t\t\t'cat_browse_end_today' => $this->db->get_site_setting('cat_browse_end_today'),\r\n\t\t\t'cat_browse_has_pics' => $this->db->get_site_setting('cat_browse_has_pics'),\r\n\t\t\t'cat_browse_has_pics' => $this->db->get_site_setting('cat_browse_has_pics'),\r\n\t\t\t'cat_browse_class_only' => $this->db->get_site_setting('cat_browse_class_only'),\r\n\t\t\t'cat_browse_auc_only' => $this->db->get_site_setting('cat_browse_auc_only'),\r\n\t\t\t'cat_browse_buy_now' => $this->db->get_site_setting('cat_browse_buy_now'),\r\n\t\t\t'cat_browse_buy_now_only' => $this->db->get_site_setting('cat_browse_buy_now_only'),\r\n\t\t\t'cat_browse_auc_bids' => $this->db->get_site_setting('cat_browse_auc_bids'),\r\n\t\t\t'cat_browse_auc_no_bids' => $this->db->get_site_setting('cat_browse_auc_no_bids')\r\n\t\t\t\r\n\t\t);\r\n\t\t$ddlTooltip = geoHTML::showTooltip('Show as Dropdown', 'Choose yes to display the module\\'s options in a dropdown list, or no to show them as a text-based, delimeter-separated list.');\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_opts_as_ddl\",\"Show as Dropdown $ddlTooltip\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_all_listings\",\"All listings\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_end_today\",\"Listings Ending within 24 hours\");\r\n\t\t$this->input_radio_yes_no($show_options,\"cat_browse_has_pics\",\"Listings with Photos\");\r\n\t\t\r\n\t\tif(geoMaster::is('classifieds') && geoMaster::is('auctions'))\r\n\t\t{\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_class_only\",\"Classifieds only\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_only\",\"Auctions only\");\r\n\t\t}\r\n\t\tif(geoMaster::is('auctions'))\r\n\t\t{\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_buy_now\",\"Auctions using Buy Now\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_buy_now_only\",\"Auctions using Buy Now Only\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_bids\",\"Auctions with Bids\");\r\n\t\t\t$this->input_radio_yes_no($show_options,\"cat_browse_auc_no_bids\",\"Auctions without Bids\");\r\n\t\t}\r\n\t\t\r\n\t}", "function get_widget_customization_options($widget_id)\r\n\t{\r\n\t\tglobal $xoouserultra;\t\t\r\n\t\t\r\n\t\t$html =\"\";\r\n\t\t$user_id = get_current_user_id();\r\n\t\t\r\n\t\t$custom_widgets = get_option('userultra_default_user_tabs');\r\n\t\t$widget = $custom_widgets[$widget_id];\r\n\t\t\r\n\t\t$widget_text = $widget[\"title\"];\r\n\t\t$uu_type = $widget[\"type\"];\r\n\t\t$uu_editable = $widget[\"editable\"];\r\n\t\t$uu_content = $widget[\"content\"];\r\n\t\t\r\n\t\tif($widget[\"native\"]==0) //this is a custom widget\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif($uu_editable ==1 && $uu_type == 1) //this is a text widget that can be edited by the user\r\n\t\t\t{\r\n\t\t\t\t$meta = 'uultra_user_widget_cont_edition_'.$widget_id;\r\n\t\t\t\t\r\n\t\t\t\t$html .='<div class=\"uultra-widget-int-edit-content\">';\r\n\t\t\t\t$html .='<input type=\"submit\" name=\"uultra-update-widget-custom-user-information\" id=\"uultra-update-widget-custom-text\" class=\"xoouserultra-button uultra-edit-widget-content-html-editor\" value=\"Edit Content\" widget-id=\"'.$widget_id.'\">';\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//$html .='<input type=\"submit\" name=\"uultra-update-widget-custom-user-information\" id=\"uultra-update-widget-custom-text\" class=\"xoouserultra-button uultra-update-widget-custom-user-information\" value=\"Update\" widget-id=\"'.$widget_id.'\">';\t\r\n\t\t\t\t\r\n\t\t\t\t$html .='</div>';\r\n\t\t\t\r\n\t\t\t}elseif($uu_editable ==0 && $uu_type == 1){ //this is a text widget that cannot be edited\r\n\t\t\t\r\n\t\t\t\t$html .='<div class=\"uultra-widget-int-edit-content\">';\r\n\t\t\t\t$html .=''.$uu_content.'';\r\n\t\t\t\t$html .='</div>';\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{ //this is a native widget\r\n\t\t\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t\t\r\n\t\r\n\t}", "function saveCharSelectorSettingsObject()\n\t{\n\t\tglobal $ilSetting, $ilCtrl, $lng, $tpl;\n\t\t\n\t\trequire_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';\n\t\t$char_selector = new ilCharSelectorGUI(ilCharSelectorConfig::CONTEXT_ADMIN);\n\t\t$form = $this->initCharSelectorSettingsForm($char_selector);\n if ($form->checkInput())\n {\n\t\t $char_selector->getFormValues($form);\n\n\t\t $ilSetting->set('char_selector_availability', $char_selector->getConfig()->getAvailability());\n\t\t $ilSetting->set('char_selector_definition', $char_selector->getConfig()->getDefinition());\n\t\t\t\n\t\t ilUtil::sendSuccess($lng->txt(\"msg_obj_modified\"), true);\n\t\t $ilCtrl->redirect($this, \"showCharSelectorSettings\");\n }\n $form->setValuesByPost();\n $tpl->setContent($form->getHTML());\n\t}", "function ot_after_save($options) {\r\n\t\t$clones = $options;\r\n\t\t$used_shortcodes = array();\r\n\t\t$global_css = '';\r\n\t\tforeach($options as $key => $val){\r\n\t\t\tif($key == 'archives_footer_cta_content'){\r\n\r\n\t\t\t\t$replacements = array();\r\n\t\t\t\t$css = $this->cactus_parse_inlinecss($val, $used_shortcodes, $replacements);\r\n\r\n\t\t\t\tif($css != ''){\r\n\r\n\t\t\t\t\t$new_val = $val;\r\n\t\t\t\t\tforeach($replacements as $replace){\r\n\t\t\t\t\t\t$new_val = str_replace($replace[0], $replace[1], $new_val);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$global_css .= ';' . $css;\r\n\t\t\t\t\t$clones[$key] = $new_val;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(startsWith($global_css,';')){\r\n\t\t\t$global_css = substr($global_css,1);\r\n\t\t}\r\n\r\n\t\t$shortcodes = get_option('ct_shortcodes_used_in_ot');\r\n\t\tif(!isset($shortcodes) || !is_array($shortcodes)){\r\n\t\t\tadd_option('ct_shortcodes_used_in_ot', array());\r\n\t\t}\r\n\r\n\t\t$shortcodes = $used_shortcodes;\r\n\t\tupdate_option('ct_shortcodes_used_in_ot', $shortcodes);\r\n\r\n\r\n\t\t// update global custom CSS in theme options, to be called in every pages\r\n\t\t$global_custom_css = get_option('ct_ot_custom_css');\r\n\t\tif(!isset($global_custom_css) || !is_array($global_custom_css)){\r\n\t\t\tadd_option('ct_ot_custom_css', '');\r\n\t\t}\r\n\r\n\t\t$global_custom_css = $global_css;\r\n\t\tupdate_option('ct_ot_custom_css', $global_custom_css);\r\n\r\n\t\tupdate_option(ot_options_id(), $clones);\r\n\r\n\t}", "function fudge_event_info_control() {\r\r\n if (isset($_POST['submitted'])) {\r\r\n update_option('fudge_event_info_widget_title', $_POST['eventdate']);\r\r\n update_option('fudge_event_info_widget_eventcity', $_POST['eventcity']);\r\r\n update_option('fudge_event_info_widget_eventtime', $_POST['eventtime']);\r\r\n update_option('fudge_event_info_widget_eventlocation', $_POST['eventlocation']);\r\r\n update_option('fudge_event_info_widget_menu', $_POST['eventmenu']);\r\r\n }\r\r\n //load options\r\r\n $eventdate = get_option('fudge_event_info_widget_title');\r\r\n $eventcity = get_option('fudge_event_info_widget_eventcity');\r\r\n $eventtime = get_option('fudge_event_info_widget_eventtime');\r\r\n $eventlocation = get_option('fudge_event_info_widget_eventlocation');\r\r\n $eventmenu = get_option('fudge_event_info_widget_menu');\r\r\n ?>\r\r\n <?php _e('Event Date:', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventdate\" value=\"<?php echo stripslashes($eventdate); ?>\" />\r\r\n <br /><br />\r\r\n <?php _e('Event Starting Time:', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventtime\" value=\"<?php echo stripslashes($eventtime); ?>\"/>\r\r\n <br /><br />\r\r\n <?php _e('Event City &amp; Country:', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventcity\" value=\"<?php echo stripslashes($eventcity); ?>\" />\r\r\n <br /><br />\r\r\n <?php _e('Event Location:', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventlocation\" value=\"<?php echo stripslashes($eventlocation); ?>\"/>\r\r\n <br /><br />\r\r\n <?php _e('Add to main navigation?', 'fudge'); ?><br />\r\r\n <input type=\"text\" class=\"widefat\" name=\"eventmenu\" value=\"<?php echo stripslashes($eventmenu); ?>\"/><br/>\r\r\n <small><?php _e('(Enter desired menu link text)', 'fudge'); ?></small>\r\r\n <br /><br />\r\r\n <input type=\"hidden\" name=\"submitted\" value=\"1\" />\r\r\n <?php\r\r\n}", "function save_option() {\n\t\t\tcheck_ajax_referer('ajax-nonce', 'nonce');\n\t\t\tif (isset($_POST['option']) && isset($_POST['value'])) {\n\t\t\t\tupdate_option($_POST['option'], stripslashes($_POST['value']));\n\t\t\t\techo 'saved';\n\t\t\t} else {\n\t\t\t\techo 'notsaved';\n\t\t\t}\n\t\t\tdie();\n\t\t}", "public function save()\n {\n update_option($this->optionKey, $this->fields);\n }", "function optionsframework_options() {\n\n\t// Typograpgy CSS list\n\t$typography = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/typography/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/typography/' // $directory_uri\n\t);\n\n\n\t// Layout CSS list\n\t$layout = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/layout/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/layout/' // $directory_uri\n\t);\n\t\n\t// Colors CSS list\n\t$colors = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/colors/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/colors/' // $directory_uri\n\t);\n\n\n\n\n\t$options = array();\n\t\t\n\n// Typography\n// typography in the Theme options\n\t\n \t$options['typography'] = array( \n\t\t\"name\" => \"Typography\",\n \t\t\"id\" => \"typography\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $typography );\n\n\n// Colors\n// Colors in the Theme options\n\t\n \t$options['colors'] = array( \n\t\t\"name\" => \"Colors\",\n \t\t\"id\" => \"colors\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $colors );\n \n\t// Color Picker\n\t\t\n $options['example_colorpicker'] = array(\n \t\"name\" => \"Colorpicker\",\n \t\"id\" => \"example_colorpicker\",\n \t\"std\" => \"#666666\",\n \t\"type\" => \"color\" );\n\n\n\n// Layout\n// Layout in the Theme options\n\t\n \t$options['layout'] = array( \n\t\t\"name\" => \"Layout CSS variants\",\n \t\t\"id\" => \"layout\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $layout );\n \n\n\n// site Width setting \n\t\t\n \t$options['site_width'] = array(\n \t \t\"name\" => \"Site Width\",\n \t \"id\" => \"site_width\",\n \t \"std\" => \"Default Value\",\n \t \"type\" => \"text\" );\n\n// Logo uploader\n\n\t$options['logo'] = array(\n\t\t\"name\" => \"Logo image\",\n\t\t\"desc\" => \"This creates a full size uploader that previews the image.\",\n\t\t\"id\" => \"logo\",\n\t\t\"type\" => \"upload\" );\n\t\t\n\n\treturn $options;\n}", "function em_ms_admin_options_page() {\n\tglobal $wpdb,$EM_Notices;\n\t//Check for uninstall/reset request\n\tif( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'uninstall' ){\n\t\tem_admin_options_uninstall_page();\n\t\treturn;\n\t}\t\n\tif( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'reset' ){\n\t\tem_admin_options_reset_page();\n\t\treturn;\n\t}\t\n\t//TODO place all options into an array\n\t$events_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#event-placeholders\">'. __('Event Related Placeholders','events-manager') .'</a>';\n\t$locations_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#location-placeholders\">'. __('Location Related Placeholders','events-manager') .'</a>';\n\t$bookings_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#booking-placeholders\">'. __('Booking Related Placeholders','events-manager') .'</a>';\n\t$categories_placeholders = '<a href=\"'.EM_ADMIN_URL .'&amp;events-manager-help#category-placeholders\">'. __('Category Related Placeholders','events-manager') .'</a>';\n\t$events_placeholder_tip = \" \". sprintf(__('This accepts %s and %s placeholders.','events-manager'),$events_placeholders, $locations_placeholders);\n\t$locations_placeholder_tip = \" \". sprintf(__('This accepts %s placeholders.','events-manager'), $locations_placeholders);\n\t$categories_placeholder_tip = \" \". sprintf(__('This accepts %s placeholders.','events-manager'), $categories_placeholders);\n\t$bookings_placeholder_tip = \" \". sprintf(__('This accepts %s, %s and %s placeholders.','events-manager'), $bookings_placeholders, $events_placeholders, $locations_placeholders);\n\t\n\tglobal $save_button;\n\t$save_button = '<tr><th>&nbsp;</th><td><p class=\"submit\" style=\"margin:0px; padding:0px; text-align:right;\"><input type=\"submit\" class=\"button-primary\" name=\"Submit\" value=\"'. __( 'Save Changes', 'events-manager') .' ('. __('All','events-manager') .')\" /></p></td></tr>';\n\t//Do some multisite checking here for reuse\n\t?>\t\n\t<script type=\"text/javascript\" charset=\"utf-8\"><?php include(EM_DIR.'/includes/js/admin-settings.js'); ?></script>\n\t<script type=\"text/javascript\" charset=\"utf-8\">\n\t\tjQuery(document).ready(function($){\n\t\t\t//events\n\t\t\t$('input[name=\"dbem_ms_global_events\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_events\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_global_events_links_row\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_global_events_links\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_global_events_links_row, tr#dbem_ms_events_slug_row\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_events_links\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_events_links\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_events_slug_row\").hide();\t\n\t\t\t\t}else{\t\t\t\t\n\t\t\t\t\t$(\"tr#dbem_ms_events_slug_row\").show();\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t//locations\n\t\t\t$('input[name=\"dbem_ms_mainblog_locations\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_mainblog_locations\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tbody.em-global-locations\").hide();\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tbody.em-global-locations\").show();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_locations\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_locations\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_global_locations_links_row\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_global_locations_links\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_global_locations_links_row, tr#dbem_ms_locations_slug_row\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\n\t\t\t$('input[name=\"dbem_ms_global_locations_links\"]').change(function(){\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_locations_links\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tr#dbem_ms_locations_slug_row\").hide();\t\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tr#dbem_ms_locations_slug_row\").show();\t\t\t\t\n\t\t\t\t}\n\t\t\t});\t\t\n\t\t\t//MS Mode selection hiders \n\t\t\t$('input[name=\"dbem_ms_global_table\"]').change(function(){ //global\n\t\t\t\tif( $('input:radio[name=\"dbem_ms_global_table\"]:checked').val() == 1 ){\n\t\t\t\t\t$(\"tbody.em-global-options\").show();\n\t\t\t\t\t$('input:radio[name=\"dbem_ms_mainblog_locations\"]:checked').trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(\"tbody.em-global-options\").hide();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}).first().trigger('change');\t\n\t\t});\n\t</script>\n\t<style type=\"text/css\">.postbox h3 { cursor:pointer; }</style>\n\t<div class=\"wrap <?php if(empty($tabs_enabled)) echo 'tabs-active' ?>\">\n\t\t<div id='icon-options-general' class='icon32'><br /></div>\n\t\t<h1 id=\"em-options-title\"><?php _e ( 'Event Manager Options', 'events-manager'); ?></h1>\n\t\t<h2 class=\"nav-tab-wrapper\">\n\t\t\t<?php\n\t\t\t$tabs_enabled = defined('EM_SETTINGS_TABS') && EM_SETTINGS_TABS;\n\t\t\tif( $tabs_enabled ){\n\t\t\t\t$general_tab_link = esc_url(add_query_arg( array('em_tab'=>'general')));\n\t\t\t}else{\n\t\t\t\t$general_tab_link = '';\n\t\t\t}\n\t\t\t?>\n\t\t\t<a href=\"<?php echo $general_tab_link ?>#general\" id=\"em-menu-general\" class=\"nav-tab nav-tab-active\"><?php esc_html_e('General','events-manager'); ?></a>\n\t\t\t<?php\n\t\t\t$custom_tabs = apply_filters('em_ms_options_page_tabs', array());\n\t\t\tforeach( $custom_tabs as $tab_key => $tab_name ){\n\t\t\t\t$tab_link = !empty($tabs_enabled) ? esc_url(add_query_arg( array('em_tab'=>$tab_key))) : '';\n\t\t\t\t$active_class = !empty($tabs_enabled) && !empty($_GET['em_tab']) && $_GET['em_tab'] == $tab_key ? 'nav-tab-active':'';\n\t\t\t\techo \"<a href='$tab_link#$tab_key' id='em-menu-$tab_key' class='nav-tab $active_class'>$tab_name</a>\";\n\t\t\t}\n\t\t\t?>\n\t\t</h2>\n\t\t<?php echo $EM_Notices; ?>\n\t\t<form id=\"em-options-form\" method=\"post\" action=\"\">\n\t\t\t<div class=\"metabox-holder\"> \n\t\t\t<!-- // TODO Move style in css -->\n\t\t\t<div class='postbox-container' style='width: 99.5%'>\n\t\t\t<div id=\"\">\n\t\t\t<?php if( !$tabs_enabled || ($tabs_enabled && (empty($_REQUEST['em_tab']) || $_REQUEST['em_tab'] == 'general')) ): //make less changes for now, since we don't have any core tabs to add yet ?>\n\t\t \t<div class=\"em-menu-general em-menu-group\">\n\t\t\t\t<div class=\"postbox \" id=\"em-opt-ms-options\" >\n\t\t\t\t\t<div class=\"handlediv\" title=\"<?php __('Click to toggle', 'events-manager'); ?>\"><br /></div><h3><span><?php _e ( 'Multi Site Options', 'events-manager'); ?></span></h3>\n\t\t\t\t\t<div class=\"inside\">\n\t\t\t <table class=\"form-table\">\n\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\tem_options_radio_binary ( __( 'Enable global tables mode?', 'events-manager'), 'dbem_ms_global_table', __( 'Setting this to yes will make all events save in the main site event tables (EM must also be activated). This allows you to share events across different blogs, such as showing events in your network whilst allowing users to display and manage their events within their own blog. Bear in mind that activating this will mean old events created on the sub-blogs will not be accessible anymore, and if you switch back they will be but new events created during global events mode will only remain on the main site.','events-manager') );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<tbody class=\"em-global-options\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tglobal $current_site;\n\t\t\t\t\t\t\t$global_slug_tip = __('%s belonging to other sub-sites will have an extra slug prepended to it so that your main site can differentiate between its own %s and those belonging to other sites in your network.','events-manager');\n\t\t\t\t\t\t\t$global_link_tip = __( 'When displaying global %s on the main site you have the option of users viewing the %s details on the main site or being directed to the sub-site.','events-manager');\n\t\t\t\t\t\t\t$global_post_tip = __( 'Displays %s from all sites on the network by default. You can still restrict %s by blog using shortcodes and template tags coupled with the <code>blog</code> attribute. Requires global tables to be turned on.','events-manager');\n\t\t\t\t\t\t\t$global_link_tip2 = __('You <strong>must</strong> have assigned a %s page in your <a href=\"%s\">main blog settings</a> for this to work.','events-manager');\n\t\t\t\t\t\t\t$options_page_link = get_admin_url($current_site->blog_id, 'edit.php?post_type='.EM_POST_TYPE_EVENT.'&page=events-manager-options#pages');\n\t\t\t\t\t\t\t?><tr class=\"em-header\"><td><h4><?php echo sprintf(__('%s Options','events-manager'),__('Event','events-manager')); ?></h4></td></tr><?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Display global events on main blog?', 'events-manager'), __('events','events-manager')), 'dbem_ms_global_events', sprintf($global_post_tip, __('events','events-manager'), __('events','events-manager')) );\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Link sub-site %s directly to sub-site?', 'events-manager'), __('events','events-manager')), 'dbem_ms_global_events_links', sprintf($global_link_tip, __('events','events-manager'), __('event','events-manager')).sprintf($global_link_tip2, __('event','events-manager'), $options_page_link) );\n\t\t\t\t\t\t\tem_options_input_text ( sprintf(__( 'Global %s slug', 'events-manager'),__('event','events-manager')), 'dbem_ms_events_slug', sprintf($global_slug_tip, __('Events','events-manager'), __('events','events-manager')).__('Example:','events-manager').'<code>http://yoursite.com/events/<strong>event</strong>/subsite-event-slug/', EM_EVENT_SLUG );\n\t\t\t\t\t\t\t?><tr class=\"em-header\"><td><h4><?php echo sprintf(__('%s Options','events-manager'),__('Location','events-manager')); ?></h4></td></tr><?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Locations on main blog?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_mainblog_locations', __('If you would prefer all your locations to belong to your main blog, users in sub-sites will still be able to create locations, but the actual locations are created and reside in the main blog.','events-manager') );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t<tbody class=\"em-global-options em-global-locations\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Display global %s on main blog?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_global_locations', sprintf($global_post_tip, __('locations','events-manager'), __('locations','events-manager')) );\n\t\t\t\t\t\t\tem_options_radio_binary ( sprintf(__( 'Link sub-site %s directly to sub-site?', 'events-manager'), __('locations','events-manager')), 'dbem_ms_global_locations_links', sprintf($global_link_tip, __('locations','events-manager'), __('location','events-manager')).sprintf($global_link_tip2, __('location','events-manager'), $options_page_link) );\n\t\t\t\t\t\t\tem_options_input_text ( sprintf(__( 'Global %s slug', 'events-manager'),__('location','events-manager')), 'dbem_ms_locations_slug', sprintf($global_slug_tip, __('Locations','events-manager'), __('locations','events-manager')).__('Example:','events-manager').'<code>http://yoursite.com/locations/<strong>location</strong>/subsite-location-slug/', EM_LOCATION_SLUG );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t<?php echo $save_button; ?>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t \n\t\t\t\t\t</div> <!-- . inside --> \n\t\t\t\t</div> <!-- .postbox --> \n\t\t\t\t\n\t\t\t\t<?php \n\t\t\t\t//including shared MS/non-MS boxes\n\t\t\t\tem_admin_option_box_caps();\n\t\t\t\tem_admin_option_box_image_sizes();\n\t\t\t\tem_admin_option_box_email();\n\t\t\t\tem_admin_option_box_uninstall();\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t\t<?php do_action('em_ms_options_page_footer'); ?>\n\t\t\t</div> <!-- .em-menu-general -->\n\t\t\t<?php endif; ?>\n\t\t\t<?php\n\t\t\t//other tabs\n\t\t\tif( $tabs_enabled ){\n\t\t\t\tif( array_key_exists($_REQUEST['em_tab'], $custom_tabs) ){\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"em-menu-bookings em-menu-group\">\n\t\t\t\t\t\t<?php do_action('em_ms_options_page_tab_'. $_REQUEST['em_tab']); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tforeach( $custom_tabs as $tab_key => $tab_name ){\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"em-menu-<?php echo esc_attr($tab_key) ?> em-menu-group\" style=\"display:none;\">\n\t\t\t\t\t\t<?php do_action('em_ms_options_page_tab_'. $tab_key); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" name=\"Submit\" value=\"<?php esc_attr_e( 'Save Changes', 'events-manager'); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"em-submitted\" value=\"1\" />\n\t\t\t\t<input type=\"hidden\" name=\"_wpnonce\" value=\"<?php echo wp_create_nonce('events-manager-options'); ?>\" />\n\t\t\t</p> \n\t\t\t\n\t\t\t</div> <!-- .metabox-sortables -->\n\t\t\t</div> <!-- .postbox-container -->\n\t\t\t\n\t\t\t</div> <!-- .metabox-holder -->\t\n\t\t</form>\n\t</div>\n\t<?php\n}", "function optionsframework_options() {\n\n\t$options = array();\n\t$options[] = array(\n\t\t'name' => __('Logo Upload', 'options_check'),\n\t\t'desc' => __('Logo Upload', 'options_check'),\n\t\t'id' => 'logo_upload',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Footer Copyright', 'options_check'),\n\t\t'desc' => __('text input field.', 'options_check'),\n\t\t'id' => 'footer_copyright',\n\t\t'std' => 'Text',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Blog description', 'options_check'),\n\t\t'desc' => __('Blog description.', 'options_check'),\n\t\t'id' => 'blog_description',\n\t\t'std' => 'Default Text',\n\t\t'type' => 'textarea');\n\n\t/**\n\t * For $settings options see:\n\t * http://codex.wordpress.org/Function_Reference/wp_editor\n\t *\n\t * 'media_buttons' are not supported as there is no post to attach items to\n\t * 'textarea_name' is set by the 'id' you choose\n\t */\n\n\n\treturn $options;\n}", "public function save_settings( $settings ) {\n\t\t$settings['_multiwidget'] = 1;\n\t\tupdate_option( $this->option_name, $settings );\n\t}", "public function add_options() {\n\t\t$types = get_option( 'ibx_docs_type' );\n\t\tif ( ! empty( $types ) ) {\n\t\t\t$docs_option = maybe_unserialize( $types );\n\t\t} else {\n\t\t\t$docs_option = array();\n\t\t}\n\n\t\tif (\n\t\t\t! isset( $_POST['docs_generate_nonce'] )\n\t\t\t|| ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['docs_generate_nonce'] ) ), 'docs__form_save' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_title = '';\n\t\t$post_slug = '';\n\t\t// process form data.\n\t\tif ( isset( $_POST['title'] ) ) {\n\t\t\t$post_title = sanitize_text_field( wp_unslash( $_POST['title'] ) );\n\t\t\tif ( isset( $_POST['slug'] ) && ! empty( $_POST['slug'] ) ) {\n\t\t\t\t$post_slug = sanitize_text_field( wp_unslash( $_POST['slug'] ) );\n\t\t\t} else {\n\t\t\t\t$post_slug = sanitize_title_with_dashes( $post_title );\n\t\t\t}\n\t\t}\n\n\t\t$docs_option[ $post_slug ] = array(\n\t\t\t'title' => $post_title,\n\t\t\t'slug' => $post_slug,\n\t\t);\n\n\t\tupdate_option( 'ibx_docs_type', maybe_serialize( $docs_option ) );\n\t}", "public function save()\n\t{\n\t\t$old_options = get_option($this->filterName);\n\t\t//create new options\n\t\t$this->options = is_array($old_options) ? array_merge($old_options, $this->options) : $this->options;\n\t\t\n\t\t//verify default value\n\t\t$this->defaultOptions($this->options);\n\t\tupdate_option($this->filterName, $this->options);\n\t}", "protected function _saveOptions(): void\n {\n if ($this->_search->hasOption(Search::OPTION_SCROLL)) {\n $this->_options[0] = $this->_search->getOption(Search::OPTION_SCROLL);\n }\n\n if ($this->_search->hasOption(Search::OPTION_SCROLL_ID)) {\n $this->_options[1] = $this->_search->getOption(Search::OPTION_SCROLL_ID);\n }\n\n if ($this->_search->hasOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE)) {\n $isNotInitial = (null !== $this->_options[2]);\n $this->_options[2] = $this->_search->getOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE);\n\n // remove ignore_unavailable from options if not initial search\n if ($isNotInitial) {\n $searchOptions = $this->_search->getOptions();\n unset($searchOptions[Search::OPTION_SEARCH_IGNORE_UNAVAILABLE]);\n $this->_search->setOptions($searchOptions);\n }\n }\n }", "public function save_options_menu() {\n if ( !isset($_REQUEST['cs_nonce']) ) return;\n if ( !isset($_REQUEST['cs_options']) ) return;\n if ( !isset($_REQUEST['cs_page']) ) return;\n if ( !wp_verify_nonce( stripslashes($_REQUEST['cs_nonce']), 'save-caseswap-options') ) return;\n\n $section = stripslashes( $_REQUEST['cs_page'] );\n if ( !isset($this->option_pages[$section]) ) return;\n\n $options = $this->get_options();\n $submitted = $this->get_options( stripslashes_deep($_REQUEST['cs_options']) );\n\n // We only want to save the updated options for the page we clicked \"Save changes\" for.\n foreach( $this->option_pages[$section]['fields'] as $key ) {\n if ( isset($submitted[$key]) ) {\n $options[$key] = $submitted[$key];\n }else{\n $options[$key] = false;\n }\n }\n\n // Save the updated options\n update_option( 'caseswap-options', $options );\n\n $args = apply_filters( 'caseswap-options-saved-redirect-args', array('cs_page' => $section, 'cs_message' => 'options-saved'), $this );\n\n wp_redirect( add_query_arg( $args, $this->options_page_url) );\n exit;\n }", "public function handle_post_action_options() {\n\t\tIggoGrid::check_nonce( 'options' );\n\n\t\tif ( ! current_user_can( 'iggogrid_access_options_screen' ) ) {\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.', 'default' ) );\n\t\t}\n\n\t\tif ( empty( $_POST['options'] ) || ! is_array( $_POST['options'] ) ) {\n\t\t\tIggoGrid::redirect( array( 'action' => 'options', 'message' => 'error_save' ) );\n\t\t} else {\n\t\t\t$posted_options = wp_unslash( $_POST['options'] );\n\t\t}\n\n\t\t// Valid new options that will be merged into existing ones\n\t\t$new_options = array();\n\n\t\t// Check each posted option value, and (maybe) add it to the new options\n\t\tif ( ! empty( $posted_options['admin_menu_parent_page'] ) && '-' != $posted_options['admin_menu_parent_page'] ) {\n\t\t\t$new_options['admin_menu_parent_page'] = $posted_options['admin_menu_parent_page'];\n\t\t\t// re-init parent information, as IggoGrid::redirect() URL might be wrong otherwise\n\t\t\t/** This filter is documented in classes/class-controller.php */\n\t\t\t$this->parent_page = apply_filters( 'iggogrid_admin_menu_parent_page', $posted_options['admin_menu_parent_page'] );\n\t\t\t$this->is_top_level_page = in_array( $this->parent_page, array( 'top', 'middle', 'bottom' ), true );\n\t\t}\n\t\tif ( ! empty( $posted_options['plugin_language'] ) && '-' != $posted_options['plugin_language'] ) {\n\t\t\t// only allow \"auto\" language and all values that have a translation\n\t\t\tif ( 'auto' == $posted_options['plugin_language'] || array_key_exists( $posted_options['plugin_language'], $this->get_plugin_languages() ) ) {\n\t\t\t\t$new_options['plugin_language'] = $posted_options['plugin_language'];\n\t\t\t}\n\t\t}\n\n\t\t// Custom CSS can only be saved if the user is allowed to do so\n\t\t$update_custom_css_files = false;\n\t\tif ( current_user_can( 'iggogrid_edit_options' ) ) {\n\t\t\t// Checkbox\n\t\t\t$new_options['use_custom_css'] = ( isset( $posted_options['use_custom_css'] ) && 'true' === $posted_options['use_custom_css'] );\n\n\t\t\tif ( isset( $posted_options['custom_css'] ) ) {\n\t\t\t\t$new_options['custom_css'] = $posted_options['custom_css'];\n\n\t\t\t\t$iggogrid_css = IggoGrid::load_class( 'IggoGrid_CSS', 'class-css.php', 'classes' );\n\t\t\t\t$new_options['custom_css'] = $iggogrid_css->sanitize_css( $new_options['custom_css'] ); // Sanitize and tidy up Custom CSS\n\t\t\t\t$new_options['custom_css_minified'] = $iggogrid_css->minify_css( $new_options['custom_css'] ); // Minify Custom CSS\n\n\t\t\t\t// Maybe update CSS files as well\n\t\t\t\t$custom_css_file_contents = $iggogrid_css->load_custom_css_from_file( 'normal' );\n\t\t\t\tif ( false === $custom_css_file_contents ) {\n\t\t\t\t\t$custom_css_file_contents = '';\n\t\t\t\t}\n\t\t\t\tif ( $new_options['custom_css'] !== $custom_css_file_contents ) { // don't write to file if it already has the desired content\n\t\t\t\t\t$update_custom_css_files = true;\n\t\t\t\t\t// Set to false again. As it was set here, it will be set true again, if file saving succeeds\n\t\t\t\t\t$new_options['use_custom_css_file'] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// save gathered new options (will be merged into existing ones), and flush caches of caching plugins, to make sure that the new Custom CSS is used\n\t\tif ( ! empty( $new_options ) ) {\n\t\t\tIggoGrid::$model_options->update( $new_options );\n\t\t\tIggoGrid::$model_table->_flush_caching_plugins_caches();\n\t\t}\n\n\t\tif ( $update_custom_css_files ) { // capability check is performed above\n\t\t\tIggoGrid::redirect( array( 'action' => 'options', 'item' => 'save_custom_css' ), true );\n\t\t}\n\n\t\tIggoGrid::redirect( array( 'action' => 'options', 'message' => 'success_save' ) );\n\t}", "public function configure()\n {\n if (sfContext::getInstance()->getModuleName() == 'file') {\n unset($this['judge_id'], $this['result'], $this['instruction'], \n $this['user_file_id'], $this['court_note_id'], $this['coordinator_id'],\n $this['barrister_id'], $this['appearing_type_id']/*, $this['appearing_id']*/\n );\n \n $this->widgetSchema['appearing_id']->setOption('method', 'obtainFullName');\n $this->widgetSchema['appearing_id']->setOption('table_method', 'getSolicitorsCB');\n \n $this->widgetSchema['court_id']->setAttribute('style', 'width:200px');\n $this->widgetSchema['listing_id']->setAttribute('style', 'width:150px');\n }\n else {\n //unset($this['coordinator_id']);\n $this->widgetSchema['result']->setAttributes(array('cols' => '70', 'rows' => '12'));\n $this->widgetSchema['user_file_id']->setOption('method', 'getClientName');\n $this->widgetSchema['court_note_id']->setLabel('Note');\n \n $this->widgetSchema['instruction'] = new sfWidgetFormTextarea(array(), array('cols' => '70', 'rows' => '4'));\n \n $this->widgetSchema['judge_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Judge'), \n 'form_module' => 'judge', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getJudgesCB'\n ));\n \n $this->widgetSchema['judge_id']->setLabel('Before');\n $this->validatorSchema['judge_id']->setOption('required', false);\n //$this->widgetSchema['judge_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['judge_id']->setOption('table_method', 'getJudgesCB');\n \n $this->widgetSchema['appearing_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Appearing'), \n 'form_module' => 'user?_frm=MyAccount', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getSolicitorsCB'\n ));\n \n // added by William, 26/05/2013: add barrister\n $this->widgetSchema['barrister_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => $this->getRelatedModelName('Barrister'), \n 'form_module' => 'user?_frm=MyAccount', \n 'add_empty' => true,\n 'method' => 'obtainFullName',\n 'table_method' => 'getBarristersCB'\n ));\n \n //$this->widgetSchema['appearing_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['appearing_id']->setOption('table_method', 'getSolicitorsCB');\n \n // for the add/edit button widget\n if (!sfContext::getInstance()->getRequest()->getParameter('shbx') ) {\n $this->widgetSchema['court_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'Agency', \n 'form_module' => 'agency?code=COU', \n 'add_empty' => true,\n ));\n }\n \n // for the add/edit button widget\n //if (!sfContext::getInstance()->getRequest()->getParameter('shbx') ) {\n $this->widgetSchema['listing_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'Listing', \n 'form_module' => 'listing', \n 'add_empty' => true,\n 'order_by' => array('name', 'asc') \n ));\n \n $this->widgetSchema['court_note_id'] = new sfWidgetFormAjaxDoctrineChoice(array(\n 'model' => 'CourtNote', \n 'form_module' => 'courtNote', \n 'add_empty' => true,\n 'method' => 'getValue',\n 'order_by' => array('value', 'asc') \n ));\n //}\n \n $this->hideField('user_file_id');\n \n $this->addFee();\n $this->widgetSchema['Fee']->setLabel(false);\n }\n \n // add class to year to validate past dates\n $this->widgetSchema['date']->setAttribute('class', 'validateYear');\n\n // set method to load values to show\n $this->widgetSchema['court_id']->setOption('table_method', 'getCourtsCB');\n \n //$this->widgetSchema['coordinator_id']->setOption('method', 'obtainFullName');\n //$this->widgetSchema['coordinator_id']->setOption('table_method', 'getCoordinatorsCB');\n \n if (sfContext::getInstance()->getModuleName() == 'file') {\n // remove emptys\n $this->widgetSchema['court_id']->setOption('add_empty', false);\n }\n \n // sort some dropboxes\n $this->widgetSchema['listing_id']->addOption('order_by', array('name', 'asc'));\n \n // adding some extra validators\n //$this->widgetSchema['time'] = new sfWidgetFormTime();\n $this->widgetSchema['time'] = $this->formattedWidgetFormTime();\n $this->validatorSchema['time'] = new sfValidatorTime(array('required' => false));\n $this->validatorSchema['court_id']->setOption('required', true);\n \n /*$this->validatorSchema->setPostValidator(\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialValues')))\n );*/\n $this->validatorSchema->setPostValidator(new sfValidatorAnd(array(\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialValues'))),\n new sfValidatorCallback(array('callback' => array($this, 'setSpecialFeeValues')))\n )));\n \n // adding asterisk for required fields\n $this->setAsteriskForRequiredFields();\n \n // this formatting is applied only if form is called directly, without admin generator templates\n $first = ($this->getOption('first') !== null) ? $this->getOption('first') : false;\n $custom_decorator = new ExtendedFormSchemaFormatter($this->getWidgetSchema(), array('header' => $first));\n $this->widgetSchema->addFormFormatter('Myformatter', $custom_decorator);\n $this->widgetSchema->setFormFormatterName('Myformatter');\n }", "public function options_update() {\n\t\tregister_setting( $this->plugin_name, $this->plugin_name, array($this, 'validate', 'default' => array( \"url_nerd_instance\" => \"\", \"category_weight\" => \"0.04\", \"entity_weight\" => \"0.7\" ) ) );\n\t}", "function handleOptions ()\n\t{\n\t\t$default_options = $this->default_options;\n\n\t\t// Get options from WP options\n\t\t$options_from_table = get_option( $this->db_options_name_core );\n\n\t\tif ( empty( $options_from_table ) ) {\n\t\t\t$options_from_table = $this->default_options; // New installation\n\t\t} else {\n\n\t\t\t// As of version 2.2 I changed the way I store the default options.\n\t\t\t// I need to upgrade the options before setting the options but we don't update the version yet.\n\t\t\tif ( ! $options_from_table['general'] ) {\n\t\t\t\t$this->upgradeDefaultOptions_2_2();\n\t\t\t\t$options_from_table = get_option( $this->db_options_name_core ); // Get the new options\n\t\t\t}\n\n\t\t\t// Update default options by getting not empty values from options table\n\t\t\tforeach ( $default_options as $section_key => $section_array ) {\n\t\t\t\tforeach ( $section_array as $name => $value ) {\n\n\t\t\t\t\tif ( isset( $options_from_table[$section_key][$name] ) && (! is_null( $options_from_table[$section_key][$name] )) ) {\n\t\t\t\t\t\tif ( is_int( $value ) ) {\n\t\t\t\t\t\t\t$default_options[$section_key][$name] = ( int ) $options_from_table[$section_key][$name];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$default_options[$section_key][$name] = $options_from_table[$section_key][$name];\n\t\t\t\t\t\t\tif ( 'associated_id' == $name ) {\n\t\t\t\t\t\t\t\tif ( 'blogavirtualh-20' == $options_from_table[$section_key][$name] )\n\t\t\t\t\t\t\t\t\t$default_options[$section_key][$name] = 'avh-amazon-20';\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\n\t\t\t// If a newer version is running do upgrades if neccesary and update the database.\n\t\t\tif ( $this->version > $options_from_table['general']['version'] ) {\n\t\t\t\t// Starting with version 2.1 I switched to a new way of storing the widget options in the database. We need to convert these.\n\t\t\t\tif ( $options_from_table['general']['version'] < '2.1' ) {\n\t\t\t\t\t$this->upgradeWidgetOptions_2_1();\n\t\t\t\t}\n\n\t\t\t\tif ( $options_from_table['general']['version'] < '2.4' ) {\n\t\t\t\t\t$this->doRemoveCacheFolder();\n\t\t\t\t}\n\t\t\t\tif ( $options_from_table['general']['version'] < '3.0' ) {\n\t\t\t\t\t$this->upgradeWidgetSettings_3_0();\n\t\t\t\t}\n\n\t\t\t\t// Write the new default options and the proper version to the database\n\t\t\t\t$default_options['general']['version'] = $this->version;\n\t\t\t\tupdate_option( $this->db_options_name_core, $default_options );\n\t\t\t}\n\t\t}\n\t\t// Set the class property for options\n\t\t$this->options = $default_options;\n\t}", "public function customizer_widget_appearance()\r\n\t{\r\n\t\t\r\n\t\t$array_customizer = array();\t\t\r\n\t\t$widget_id = $_POST['p_id'];\t\t\r\n\t\t\t\t\r\n\t\t$widget_post_types = \"\";\r\n\t\tif($widget_id==5) //my posts widgets\r\n\t\t{\r\n\t\t\t$str_types = \"\";\r\n\t\t\t$widget_post_types = $_POST['widget_post_type_list'];\r\n\t\t\t$ii = 0;\r\n\t\t\t\r\n\t\t\tforeach($widget_post_types as $type)\r\n\t\t\t{\r\n\t\t\t\t//echo $type[\"value\"];\r\n\t\t\t\t$str_types .= $type[\"value\"];\r\n\t\t\t\t\r\n\t\t\t\tif(count($widget_post_types)-1>$ii)\r\n\t\t\t\t{\r\n\t\t\t\t\t$str_types .= \",\";\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$ii++;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$array_customizer = array('widget_header_bg_color' =>$_POST['widget_header_bg_color'], 'widget_bg_color' =>$_POST['widget_bg_color'] ,'widget_header_text_color' =>$_POST['widget_header_text_color'] ,'widget_text_color' =>$_POST['widget_text_color'] ,'widget_transparent' =>$_POST['widget_transparent'] ,'widget_title' =>$_POST['widget_title'],'widget_post_types' =>$str_types);\r\n\t\t\r\n\t\t$widget_customization = serialize($array_customizer);\t\t\r\n\t\t$widget = 'uultra_widget_customing_'.$widget_id;\t\t\t\r\n\t\tupdate_option($widget,$widget_customization);\r\n\t\t\r\n\t\t//update widget properties only if it's a custom widget\r\n\t\t\r\n\t\tif($this->uultra_check_if_custom_widget($widget_id) && isset($_POST['uultra_add_mod_widget_title']) && $_POST['uultra_add_mod_widget_title'] !=\"\" )\t{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//update widget array\t\r\n\t\t\t\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\t\r\n\t\t\t$custom_widgets[$widget_id]['title'] = $_POST['uultra_add_mod_widget_title'];\r\n\t\t\t$custom_widgets[$widget_id]['type'] = $_POST['uultra_add_mod_widget_type'];\r\n\t\t\t$custom_widgets[$widget_id]['editable'] = $_POST['uultra_add_mod_widget_editable'];\r\n\t\t\t$custom_widgets[$widget_id]['content'] = $_POST['uultra_add_mod_widget_content'];\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\tupdate_option('userultra_custom_user_widgets', $custom_widgets);\r\n\t\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\techo __(\"Settings has been udpated! \", \"xoousers\");\r\n\t\tdie();\r\n\t\r\n\t}", "function widget_sandbox_rsslinks_control() {\n\t$options = $newoptions = get_option('widget_sandbox_rsslinks');\n\tif ( $_POST['rsslinks-submit'] ) {\n\t\t$newoptions['title'] = strip_tags( stripslashes( $_POST['rsslinks-title'] ) );\n\t}\n\tif ( $options != $newoptions ) {\n\t\t$options = $newoptions;\n\t\tupdate_option( 'widget_sandbox_rsslinks', $options );\n\t}\n\t$title = attribute_escape( $options['title'] );\n?>\n\t\t\t<p><label for=\"rsslinks-title\"><?php _e( 'Title:', 'sandbox' ) ?> <input class=\"widefat\" id=\"rsslinks-title\" name=\"rsslinks-title\" type=\"text\" value=\"<?php echo $title; ?>\" /></label></p>\n\t\t\t<input type=\"hidden\" id=\"rsslinks-submit\" name=\"rsslinks-submit\" value=\"1\" />\n<?php\n}", "function widget_ffes_feed_control() {\r\n $options = $newoptions = get_option('widget_ffes_feed');\r\n if ( $_POST['ffes-feed-submit'] ) {\r\n $newoptions['title'] = strip_tags(stripslashes($_POST['ffes-feed-title']));\r\n }\r\n if ( $options != $newoptions ) {\r\n $options = $newoptions;\r\n update_option('widget_ffes_feed', $options);\r\n }\r\n ?>\r\n <div style=\"text-align:right\">\r\n <label for=\"ffes-feed-title\" style=\"line-height:35px;display:block;\"><?php _e('Widget title:', 'ffes_widgets'); ?>\r\n <input type=\"text\" id=\"ffes-feed-title\" name=\"ffes-feed-title\" value=\"<?php echo wp_specialchars($options['title'], true); ?>\" /></label>\r\n <input type=\"hidden\" name=\"ffes-feed-submit\" id=\"ffes-feed-submit\" value=\"1\" />\r\n </div>\r\n <?php\r\n }", "function theme_options_do_page() {\n\tglobal $select_options, $radio_options;\n\n\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t$_REQUEST['settings-updated'] = false;\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); echo \"<h2>\" . get_current_theme() . ' -- ' . __( 'Theme Options', 'htmlks4wp' ) . \"</h2>\"; ?>\n\n\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t<div class=\"updated fade\"><p><strong><?php _e( 'Options saved', 'htmlks4wp' ); ?></strong></p></div>\n\t\t<?php endif; ?>\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'htmlks4wp_options' ); ?>\n\t\t\t<?php $options = get_option( 'htmlks4wp_theme_options' ); ?>\n\n\t\t\t<table class=\"form-table\">\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * [header] Google analytics code\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( '[header] Google analytics code', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[gacode]\" class=\"regular-text\" type=\"text\" name=\"htmlks4wp_theme_options[gacode]\" value=\"<?php esc_attr_e( $options['gacode'] ); ?>\" />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[gacode]\"><?php _e( '(e.g. \"UA-5668xxxx-1\", etc.)', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * [footer] Year(s) in the copyright\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( '[footer] Year(s) in the copyright', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[copyrightyear]\" class=\"regular-text\" type=\"text\" name=\"htmlks4wp_theme_options[copyrightyear]\" value=\"<?php esc_attr_e( $options['copyrightyear'] ); ?>\" />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[copyrightyear]\"><?php _e( '(e.g. \"2015\", \"2010-2015\", etc.)', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * [footer] Sitename in the copyright\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\"><?php _e( '[footer] Sitename in the copyright', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[copyrightname]\" class=\"regular-text\" type=\"text\" name=\"htmlks4wp_theme_options[copyrightname]\" value=\"<?php esc_attr_e( $options['copyrightname'] ); ?>\" />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[copyrightname]\"><?php _e( 'Your sitename', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample checkbox option\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'A checkbox', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[option1]\" name=\"htmlks4wp_theme_options[option1]\" type=\"checkbox\" value=\"1\" <?php checked( '1', $options['option1'] ); ?> />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[option1]\"><?php _e( 'Sample checkbox', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample text input option\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'Some text', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"htmlks4wp_theme_options[sometext]\" class=\"regular-text\" type=\"text\" name=\"htmlks4wp_theme_options[sometext]\" value=\"<?php esc_attr_e( $options['sometext'] ); ?>\" />\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[sometext]\"><?php _e( 'Sample text input', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample select input option\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'Select input', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"htmlks4wp_theme_options[selectinput]\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$selected = $options['selectinput'];\n\t\t\t\t\t\t\t\t$p = '';\n\t\t\t\t\t\t\t\t$r = '';\n\n\t\t\t\t\t\t\t\tforeach ( $select_options as $option ) {\n\t\t\t\t\t\t\t\t\t$label = $option['label'];\n\t\t\t\t\t\t\t\t\tif ( $selected == $option['value'] ) // Make default first in list\n\t\t\t\t\t\t\t\t\t\t$p = \"\\n\\t<option style=\\\"padding-right: 10px;\\\" selected='selected' value='\" . esc_attr( $option['value'] ) . \"'>$label</option>\";\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t$r .= \"\\n\\t<option style=\\\"padding-right: 10px;\\\" value='\" . esc_attr( $option['value'] ) . \"'>$label</option>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo $p . $r;\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[selectinput]\"><?php _e( 'Sample select input', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample of radio buttons\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'Radio buttons', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<fieldset><legend class=\"screen-reader-text\"><span><?php _e( 'Radio buttons', 'htmlks4wp' ); ?></span></legend>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif ( ! isset( $checked ) )\n\t\t\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\t\tforeach ( $radio_options as $option ) {\n\t\t\t\t\t\t\t\t$radio_setting = $options['radioinput'];\n\n\t\t\t\t\t\t\t\tif ( '' != $radio_setting ) {\n\t\t\t\t\t\t\t\t\tif ( $options['radioinput'] == $option['value'] ) {\n\t\t\t\t\t\t\t\t\t\t$checked = \"checked=\\\"checked\\\"\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<label class=\"description\"><input type=\"radio\" name=\"htmlks4wp_theme_options[radioinput]\" value=\"<?php esc_attr_e( $option['value'] ); ?>\" <?php echo $checked; ?> /> <?php echo $option['label']; ?></label><br />\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * A sample textarea option\n\t\t\t\t */\n\t\t\t\t?>\n\t\t\t\t<tr valign=\"top\" style=\"display: none;\"><th scope=\"row\"><?php _e( 'A textbox', 'htmlks4wp' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<textarea id=\"htmlks4wp_theme_options[sometextarea]\" class=\"large-text\" cols=\"50\" rows=\"10\" name=\"htmlks4wp_theme_options[sometextarea]\"><?php echo esc_textarea( $options['sometextarea'] ); ?></textarea>\n\t\t\t\t\t\t<label class=\"description\" for=\"htmlks4wp_theme_options[sometextarea]\"><?php _e( 'Sample text box', 'htmlks4wp' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e( 'Save Options', 'htmlks4wp' ); ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t</div>\n\t<?php\n}", "function update_options() {\n\t\tif ( get_current_blog_id() !== $this->options_blog_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tupdate_option( $this->option_name, $this->options );\n\t}", "public function config() {\n \n\t\t// Date Utilities\n\t\trequire_once( get_stylesheet_directory(). '/util-functions/date-util-functions.php' );\t\t\n\n\t\t/*\n\t\tglobal $wpdb;\t\t\t\t\n\t\t$results = $wpdb->get_results( \"SELECT * FROM $wpdb->sitemeta \", OBJECT );\t\n\t\techo \"<pre>\".print_r($results,1).\"</pre>\"; \n\t\t */\n\t\t\n\n\t\t//get saved data\t\n\t\tif ( !$widget_options = get_option( self::wid ) )\n\t\t{\n\t\t $widget_options = array();\n\t\t}\n\t\t//echo \"<pre>\".print_r($widget_options,1).\"</pre>\";\n\n\n\t\t//process update\t\n\t\tif ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['red_flag_parking']) ) \n\t\t{\n\t\t\t\n\t\t\t// define validation variables and set them empty values.\n\t\t\t$startingMonthErr = $startingDayErr = $startingYearErr = \"\";\n\t\t\t$startingMeridiemErr = $startingHourErr = $startingMinuteErr = \"\";\n\t\t\t\n\t\t\t$endingMonthErr = $endingDayErr = $endingYearErr = \"\";\n\t\t\t$endingMeridiemErr = $endingHourErr = $endingMinuteErr = \"\";\n\t\t\t\t\n\t\t\t// Error array.\t\t\n\t\t\t$Err = array();\t\n\t\t\t\n\t\t\t// Date Utilities\n\t\t\trequire_once( get_stylesheet_directory(). '/util-functions/date-util-functions.php' );\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t//get saved data\t\n\t\t\tif ( !$widget_options = get_site_option( self::wid ) )\n\t\t\t{\n\t\t\t \n\t\t\t $widget_options = array();\n\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t// create the starting time for Red Flag.\n\t\t\t$start_datetime = createDateTime(\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_month'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_day'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_year'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_hour'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_minute'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['starting_meridiem']\n\t\t\t\t\t\t);\n\t\t\t$widget_options['start_datetime'] = $start_datetime;\n\t\t\t\n\t\t\t// create the ending time for Red Flag.\n\t\t\t$end_datetime = createDateTime(\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_month'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_day'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_year'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_hour'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_minute'],\n\t\t\t\t\t\t\t$_POST['red_flag_parking']['ending_meridiem']\n\t\t\t\t\t\t);\n\t\t\t$widget_options['end_datetime'] = $end_datetime;\n\t\t\t\n\t\t\t\n\t\t\t// days remaining for red flag.\n\t\t\t$widget_options['days remaining'] = dateDiff($start_datetime, $end_datetime);\n\t\t\t\n\t\t\t\n\t\t\t// validate start date is less than end date.\n\t\t\tif($start_datetime > $end_datetime)\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\t$Err['datetimeErr'] = \"Starting date is greater than Ending date.\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start date not in past.\n\t\t\tif(date('Y-m-d H:i:s') >= $start_datetime)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startTimeErr'] = \"Starting date is less than today's date.\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start month is not empty.\t\t\t\t\t\n\t\t\tif(empty($_POST['red_flag_parking']['starting_month']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingMonthErr'] = \"Starting month is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['starting_month'] = $_POST['red_flag_parking']['starting_month'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start day is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['starting_day']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingDayErr'] = \"Starting day is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['starting_day'] = $_POST['red_flag_parking']['starting_day'];\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start year is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['starting_year']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingYearErr'] = \"Starting year is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\n\t\t\t\t$widget_options['starting_year'] = $_POST['red_flag_parking']['starting_year'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate start hour is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['starting_hour']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingHourErr'] = \"Starting hour is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['starting_hour'] = $_POST['red_flag_parking']['starting_hour'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// no validation required since always 00.\n\t\t\t$widget_options['starting_minute'] = $_POST['red_flag_parking']['starting_minute'];\n\t\t\t\n\t\t\t\n\t\t\t// validate start meridiem is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['starting_meridiem']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['startingMeridiemErr'] = \"Starting meridiem is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['starting_meridiem'] = $_POST['red_flag_parking']['starting_meridiem'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate end month is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_month']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingMonthErr'] = \"Ending month is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['ending_month'] = $_POST['red_flag_parking']['ending_month'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate end day is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_day']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingDayErr'] = \"Ending day is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['ending_day'] = $_POST['red_flag_parking']['ending_day'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate end year is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_year']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingYearErr'] = \"Ending year is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['ending_year'] = $_POST['red_flag_parking']['ending_year'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate end hour is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_hour']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingHourErr'] = \"Ending hour is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t$widget_options['ending_hour'] = $_POST['red_flag_parking']['ending_hour'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//no validation required always 00.\n\t\t\t$widget_options['ending_minute'] = $_POST['red_flag_parking']['ending_minute'];\n\t\t\t\n\t\t\t\n\t\t\t// validate end meridiem is not empty.\n\t\t\tif(empty($_POST['red_flag_parking']['ending_meridiem']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$Err['endingMeridiemErr'] = \"Ending meridiem is required.\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['ending_meridiem'] = $_POST['red_flag_parking']['ending_meridiem'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// validate reset is zero or value of 1.\n\t\t\tif(empty($_POST['red_flag_parking']['reset']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$widget_options['reset'] = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$widget_options['reset'] = $_POST['red_flag_parking']['reset'];\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// and not reset then add the current user and active.\n\t\t\tif( empty($Err) ) \n\t\t\t{\t\t\n\t\t\t\t\n\t\t\t\t$widget_options['active'] = 1;\n\t\t\t\t\n\t\t\t\t$current_user = wp_get_current_user();\t\n\t\t\t\t\n\t\t\t\t$widget_options['set_by_user'] = $current_user->user_login;\t\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// delete options.\n\t\t\tif($widget_options['reset'] == 1)\n\t\t\t{\n\t\t\t\t// used to reset \n\t\t\t\tself::delete_dashboard_widget_options( 'red_flag_widget_options' );\n\t\t\t\t\n\t\t\t\t//Red Flag ending time was reached. reset. reset. reset.\t\t\t\n\t\t\n\t\t\t\t//Register default settings...\n\t\t\t\tself::update_dashboard_widget_options(\n\t\t\t\t\tself::wid, //The widget id\n\t\t\t\t\tarray( //Associative array of options & default values\n\t\t\t\t\t\t'remaining_days' => 0,\n\t\t\t\t\t\t'reset' => 0,\n\t\t\t\t\t\t'start_conversion' => 0,\n\t\t\t\t\t\t'start_datetime' => '',\n\t\t\t\t\t\t'end_datetime' => '',\n\t\t\t\t\t\t'starting_year' => '',\n\t\t\t\t\t\t'starting_month' => '',\n\t\t\t\t\t\t'starting_day' => '',\n\t\t\t\t\t\t'starting_hour' => '',\n\t\t\t\t\t\t'starting_minute' => '',\n\t\t\t\t\t\t'starting_meridiem' => '',\n\t\t\t\t\t\t'starting_date' => '',\n\t\t\t\t\t\t'starting_time' => '',\n\t\t\t\t\t\t'ending_year' => '',\n\t\t\t\t\t\t'ending_month' => '',\n\t\t\t\t\t\t'ending_day' => '',\n\t\t\t\t\t\t'ending_hour' => '',\n\t\t\t\t\t\t'ending_minute' => '',\n\t\t\t\t\t\t'ending_meridiem' => '',\n\t\t\t\t\t\t'ending_date' => '',\n\t\t\t\t\t\t'ending_time' => '',\n\t\t\t\t\t\t'set_by_user' => '',\n\t\t\t\t\t\t'active' => 0\n\t\t\t\t\t),\n\t\t\t\t\ttrue //Add only (will not update existing options)\n\t\t\t\t);\n\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t//save update \n\t\t\t\tself::update_dashboard_widget_options( self::wid, $widget_options );\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//echo '<pre>'. print_r($Err,1) .'</pre>';\n\t\t\n\t\t// get widget options from the network database table.\n\t\t$get_widget_options = self::get_dashboard_widget_options('red_flag_parking');\n\t\t\t\t\n\t\t$get_starting_month = $get_widget_options['starting_month'];\n\t\t$get_starting_day = $get_widget_options['starting_day'];\n\t\t$get_starting_year = $get_widget_options['starting_year'];\n\t\t$get_starting_hour = $get_widget_options['starting_hour'];\n\t\t$get_starting_minute = $get_widget_options['starting_minute'];\n\t\t$get_starting_meridiem = $get_widget_options['starting_meridiem'];\n\t\t$get_ending_month = $get_widget_options['ending_month'];\n\t\t$get_ending_day = $get_widget_options['ending_day'];\n\t\t$get_ending_year = $get_widget_options['ending_year'];\n\t\t$get_ending_hour = $get_widget_options['ending_hour'];\n\t\t$get_ending_minute = $get_widget_options['ending_minute'];\n\t\t$get_ending_meridiem = $get_widget_options['ending_meridiem'];\n\t\t$get_set_by_user = $get_widget_options['set_by_user'];\n\t\t\n\t\t\n\t\t// set message to display on admin page.\n\t\tif(isset($get_widget_options['active']) && $get_widget_options['active'] == 1) \n\t\t{\n\t\t\t$active = '<div id=\"active\"> The Red Flag Parking is ACTIVE.</div>';\n\t\t} \n\t\telse{\n\t\t\t\n\t\t\t$active = '<div id=\"not-active\"> The Red Flag Parking is NOT ACTIVE.</div>';\n\t\t}\t\t\n\t\t\n\t\t// Admin Form\n\t\trequire_once( 'red-flag-parking-scheduling.php' );\t\t\n\t\t\n }", "function widget_sparkplug_control() {\n\tif ( !empty( $_POST['sidebar'] ) ) {\n\t\t$sparkie = array(\n\t\t\t\t\t\t'days' => $_POST['sparkplug_days'],\n\t\t\t\t\t\t'barColor' => $_POST['sparkplug_barColor'],\n\t\t\t\t\t\t'do_total' => !empty( $_POST['sparkplug_do_total'] ) ? 'yes' : 'no',\n\t\t\t\t\t\t'lineColor' => $_POST['sparkplug_lineColor'] \n\t\t\t\t\t);\n\t\tupdate_option( 'sparkplug_options', $sparkie );\n\t}\n\t\n\t$sparks = get_option( 'sparkplug_options' );\n\t\n\t$days = !empty( $sparks['days'] ) ? $sparks['days'] : 30;\n\t$barColor = !empty( $sparks['barColor'] ) ? $sparks['barColor'] : '#0066cc';\n\t$lineColor = !empty( $sparks['lineColor'] ) ? $sparks['lineColor'] : '#bdbdbd';\n\t$do_total = !empty( $sparks['do_total'] ) ? $sparks['do_total'] : 'yes';\n\t?>\n\t<p><label for=\"sparkplug_days\"><?php _e( 'Days to show:', 'sparkplug' ) ?><input type=\"text\" name=\"sparkplug_days\" id=\"sparkplug_days\" value=\"<?php echo $days; ?>\" class=\"widefat\" /></label></p>\n\t<p><label for=\"sparkplug_barColor\"><?php _e( 'Bar Color:', 'sparkplug' ) ?><input type=\"text\" name=\"sparkplug_barColor\" id=\"sparkplug_barColor\" value=\"<?php echo $barColor; ?>\" class=\"widefat\" /></label></p>\n\t<p><label for=\"sparkplug_do_total\"><?php _e( 'Overlay line everywhere but home:', 'sparkplug' ) ?><input type=\"checkbox\" name=\"sparkplug_do_total\" id=\"sparkplug_do_total\" value=\"true\"<?php echo 'yes' == $do_total ? ' checked=\"checked\"' : '' ?> /></label></p>\n\t<p><label for=\"sparkplug_lineColor\"><?php _e( 'Line Color:', 'sparkplug' ) ?><input type=\"text\" name=\"sparkplug_lineColor\" id=\"sparkplug_lineColor\" value=\"<?php echo $lineColor; ?>\" class=\"widefat\" /></label></p>\n\t<?php\n}", "function PricerrTheme_general_options()\n{\n $id_icon = 'icon-options-general2';\n $ttl_of_stuff = 'PricerrTheme - ' . __('General Settings', 'PricerrTheme');\n global $menu_admin_PricerrTheme_theme_bull;\n $arr = array(\"yes\" => __(\"Yes\", 'PricerrTheme'), \"no\" => __(\"No\", 'PricerrTheme'));\n\n //------------------------------------------------------\n\n echo '<div class=\"wrap\">';\n echo '<div class=\"icon32\" id=\"' . $id_icon . '\"><br/></div>';\n echo '<h2 class=\"my_title_class_sitemile\">' . $ttl_of_stuff . '</h2>';\n\n if (isset($_POST['PricerrTheme_save1'])) {\n update_option('PricerrTheme_show_views', trim($_POST['PricerrTheme_show_views']));\n update_option('PricerrTheme_admin_approve_job', trim($_POST['PricerrTheme_admin_approve_job']));\n update_option('PricerrTheme_admin_approve_request', trim($_POST['PricerrTheme_admin_approve_request']));\n update_option('PricerrTheme_enable_blog', trim($_POST['PricerrTheme_enable_blog']));\n\n update_option('PricerrTheme_enable_extra', trim($_POST['PricerrTheme_enable_extra']));\n update_option('PricerrTheme_max_time_to_wait', trim($_POST['PricerrTheme_max_time_to_wait']));\n update_option('PricerrTheme_job_listing', trim($_POST['PricerrTheme_job_listing']));\n update_option('PricerrTheme_featured_job_listing', trim($_POST['PricerrTheme_featured_job_listing']));\n update_option('PricerrTheme_for_strg', trim($_POST['PricerrTheme_for_strg']));\n update_option('PricerrTheme_i_will_strg', trim($_POST['PricerrTheme_i_will_strg']));\n update_option('PricerrTheme_show_limit_job_cnt', trim($_POST['PricerrTheme_show_limit_job_cnt']));\n update_option('PricerrTheme_en_country_flags', trim($_POST['PricerrTheme_en_country_flags']));\n update_option('PricerrTheme_ip_key_db', trim($_POST['PricerrTheme_ip_key_db']));\n update_option('PricerrTheme_default_nr_of_pics', trim($_POST['PricerrTheme_default_nr_of_pics']));\n update_option('PricerrTheme_mandatory_pics_for_jbs', trim($_POST['PricerrTheme_mandatory_pics_for_jbs']));\n update_option('PricerrTheme_taxonomy_page_with_sdbr', trim($_POST['PricerrTheme_taxonomy_page_with_sdbr']));\n update_option('PricerrTheme_enable_second_footer', trim($_POST['PricerrTheme_enable_second_footer']));\n update_option('PricerrTheme_enable_instant_deli', trim($_POST['PricerrTheme_enable_instant_deli']));\n update_option('PricerrTheme_show_pagination_homepage', trim($_POST['PricerrTheme_show_pagination_homepage']));\n\n update_option('PricerrTheme_jobs_permalink', trim($_POST['PricerrTheme_jobs_permalink']));\n update_option('PricerrTheme_location_permalink', trim($_POST['PricerrTheme_location_permalink']));\n update_option('PricerrTheme_category_permalink', trim($_POST['PricerrTheme_category_permalink']));\n\n update_option('PricerrTheme_nrpostsPage_home_page', trim($_POST['PricerrTheme_nrpostsPage_home_page']));\n\n\n $PricerrTheme_get_total_extras = $_POST['PricerrTheme_get_total_extras'];\n if ($PricerrTheme_get_total_extras > 10 or !is_numeric($PricerrTheme_get_total_extras)) $PricerrTheme_get_total_extras = 10;\n\n update_option('PricerrTheme_get_total_extras', trim($PricerrTheme_get_total_extras));\n\n do_action('PricerrTheme_general_settings_main_details_options_save');\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save2'])) {\n update_option('PricerrTheme_filter_emails_private_messages', trim($_POST['PricerrTheme_filter_emails_private_messages']));\n update_option('PricerrTheme_filter_urls_private_messages', trim($_POST['PricerrTheme_filter_urls_private_messages']));\n update_option('PricerrTheme_filter_emails_chat_box', trim($_POST['PricerrTheme_filter_emails_chat_box']));\n update_option('PricerrTheme_filter_urls_chat_box', trim($_POST['PricerrTheme_filter_urls_chat_box']));\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save3'])) {\n update_option('PricerrTheme_enable_shipping', trim($_POST['PricerrTheme_enable_shipping']));\n update_option('PricerrTheme_enable_flat_shipping', trim($_POST['PricerrTheme_enable_flat_shipping']));\n update_option('PricerrTheme_enable_location_based_shipping', trim($_POST['PricerrTheme_enable_location_based_shipping']));\n\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n\n if (isset($_POST['PricerrTheme_save4'])) {\n update_option('PricerrTheme_enable_facebook_login', trim($_POST['PricerrTheme_enable_facebook_login']));\n update_option('PricerrTheme_facebook_app_id', trim($_POST['PricerrTheme_facebook_app_id']));\n update_option('PricerrTheme_facebook_app_secret', trim($_POST['PricerrTheme_facebook_app_secret']));\n\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n\n if (isset($_POST['PricerrTheme_save5'])) {\n update_option('PricerrTheme_enable_twitter_login', trim($_POST['PricerrTheme_enable_twitter_login']));\n update_option('PricerrTheme_twitter_consumer_key', trim($_POST['PricerrTheme_twitter_consumer_key']));\n update_option('PricerrTheme_twitter_consumer_secret', trim($_POST['PricerrTheme_twitter_consumer_secret']));\n\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n if (isset($_POST['PricerrTheme_save_n'])) {\n update_option('PricerrTheme_level1_extras', trim($_POST['PricerrTheme_level1_extras']));\n update_option('PricerrTheme_level2_extras', trim($_POST['PricerrTheme_level2_extras']));\n update_option('PricerrTheme_level3_extras', trim($_POST['PricerrTheme_level3_extras']));\n update_option('PricerrTheme_default_level_nr', trim($_POST['PricerrTheme_default_level_nr']));\n\n update_option('PricerrTheme_level1_vds', trim($_POST['PricerrTheme_level1_vds']));\n update_option('PricerrTheme_level2_vds', trim($_POST['PricerrTheme_level2_vds']));\n update_option('PricerrTheme_level3_vds', trim($_POST['PricerrTheme_level3_vds']));\n\n\n echo '<div class=\"saved_thing\">' . __('Settings saved!', 'PricerrTheme') . '</div>';\n }\n\n do_action('PricerrTheme_general_options_actions');\n\n ?>\n\n<div id=\"usual2\" class=\"usual\">\n <ul>\n <li><a href=\"#tabs1\"><?php _e('Main Settings', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs_new\"><?php _e('Level Settings', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs2\"><?php _e('Filters', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs3\"><?php _e('Shipping', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs4\"><?php _e('Facebook Connect', 'PricerrTheme'); ?></a></li>\n <li><a href=\"#tabs5\"><?php _e('Twitter Connect', 'PricerrTheme'); ?></a></li>\n <?php do_action('PricerrTheme_general_options_tabs'); ?>\n </ul>\n\n <div id=\"tabs_new\">\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs_new\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 10 max.'); ?></td>\n <td width=\"200\"><?php _e('Default User Level:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"3\" name=\"PricerrTheme_default_level_nr\" value=\"<?php echo get_option('PricerrTheme_default_level_nr'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 10 max.'); ?></td>\n <td width=\"200\"><?php _e('Level 1 Allowed Extras:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level1_extras\" value=\"<?php echo get_option('PricerrTheme_level1_extras'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 10 max.'); ?></td>\n <td><?php _e('Level 2 Allowed Extras:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"5\" name=\"PricerrTheme_level2_extras\"\n value=\"<?php echo get_option('PricerrTheme_level2_extras'); ?>\"/></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 10 max.'); ?></td>\n <td><?php _e('Level 3 Allowed Extras:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level3_extras\" value=\"<?php echo get_option('PricerrTheme_level3_extras'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td colspan=\"3\"></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 3 max.'); ?></td>\n <td width=\"200\"><?php _e('Level 1 Allowed Videos:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level1_vds\" value=\"<?php echo get_option('PricerrTheme_level1_vds'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 3 max.'); ?></td>\n <td width=\"200\"><?php _e('Level 2 Allowed Videos:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level2_vds\" value=\"<?php echo get_option('PricerrTheme_level2_vds'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Set a value up to 3 max.'); ?></td>\n <td width=\"200\"><?php _e('Level 3 Allowed Videos:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_level3_vds\" value=\"<?php echo get_option('PricerrTheme_level3_vds'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save_n\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs1\">\n\n\n <form method=\"post\" action=\"\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet('Show homepage pagination.'); ?></td>\n <td width=\"240\"><?php _e('Homepage Pagination:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_show_pagination_homepage'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td><?php _e('Number of Homepage Lessons:', 'PricerrTheme'); ?></td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_nrpostsPage_home_page\" value=\"<?php echo get_option('PricerrTheme_nrpostsPage_home_page'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet('This enables or disables the sidebar in the category and archive pages.'); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable instant delivery file:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_instant_deli'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Number of Extras:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_get_total_extras\" value=\"<?php echo get_option('PricerrTheme_get_total_extras'); ?>\"/>\n ( max number is 10 )\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet('This enables or disables the sidebar in the category and archive pages.'); ?>\n </td>\n <td width=\"240\">\n <?php _e('Category Pages have sidebars?:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_taxonomy_page_with_sdbr'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet('This enables or disables the sidebar in the category and archive pages.'); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable second footer area?:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_second_footer'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Mandatory to upload pictures for jobs:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_mandatory_pics_for_jbs'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable country flags:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_en_country_flags'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('IPI Info DB Key:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"22\" name=\"PricerrTheme_ip_key_db\" value=\"<?php echo get_option('PricerrTheme_ip_key_db'); ?>\"/>\n ( register a key: http://www.ipinfodb.com/register.php )\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Max Amount of Pictures:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"5\" name=\"PricerrTheme_default_nr_of_pics\" value=\"<?php echo get_option('PricerrTheme_default_nr_of_pics'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Show views in each job page:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_show_views'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Admin approves each job:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_admin_approve_job'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Admin approves each request:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_admin_approve_request'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable Blog:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_blog'); ?>\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Enable Extra Services:', 'PricerrTheme'); ?>\n </td>\n <td>\n <?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_extra'); ?>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Auto-mark job as completed after:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"6\" name=\"PricerrTheme_max_time_to_wait\" value=\"<?php echo get_option('PricerrTheme_max_time_to_wait'); ?>\"/>\n hours\n </td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(__('After the time expires the job will be closed and your users can repost it. Leave 0 for never-expire jobs.', 'PricerrTheme')); ?>\n </td>\n <td><?php _e('Lesson listing period:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"6\" name=\"PricerrTheme_job_listing\" value=\"<?php echo get_option('PricerrTheme_job_listing'); ?>\"/>\n days\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Featured job listing period:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"6\" name=\"PricerrTheme_featured_job_listing\" value=\"<?php echo get_option('PricerrTheme_featured_job_listing'); ?>\"/>\n days\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Number of jobs show on homepage:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" name=\"PricerrTheme_show_limit_job_cnt\" size=\"10\" value=\"<?php echo get_option('PricerrTheme_show_limit_job_cnt'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Translation for \"I will provide\":', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" name=\"PricerrTheme_i_will_strg\" size=\"40\" value=\"<?php echo get_option('PricerrTheme_i_will_strg'); ?>\"/>\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td width=\"240\">\n <?php _e('Translation for \"for\":', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" name=\"PricerrTheme_for_strg\" size=\"40\" value=\"<?php echo get_option('PricerrTheme_for_strg'); ?>\"/>\n </td>\n </tr>\n\n\n <tr>\n <td colspan=\"3\"></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Slug for Lessons Permalink:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"30\" name=\"PricerrTheme_jobs_permalink\" value=\"<?php echo get_option('PricerrTheme_jobs_permalink'); ?>\"/>\n *if left empty will show 'jobs'\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Slug for Location Permalink:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"30\" name=\"PricerrTheme_location_permalink\" value=\"<?php echo get_option('PricerrTheme_location_permalink'); ?>\"/>\n *if left empty will show 'location'\n </td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\">\n <?php PricerrTheme_theme_bullet(); ?>\n </td>\n <td>\n <?php _e('Slug for Category Permalink:', 'PricerrTheme'); ?>\n </td>\n <td>\n <input type=\"text\" size=\"30\" name=\"PricerrTheme_category_permalink\" value=\"<?php echo get_option('PricerrTheme_category_permalink'); ?>\"/>\n *if left empty will show 'section'\n </td>\n </tr>\n\n\n <?php do_action('PricerrTheme_general_settings_main_details_options'); ?>\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save1\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n\n </div>\n\n <div id=\"tabs2\">\n\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs2\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Filter Email Addresses (private messages):', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_filter_emails_private_messages'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Filter URLs (private messages):', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_filter_urls_private_messages'); ?></td>\n </tr>\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Filter Email Addresses (chat box):', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_filter_emails_chat_box'); ?></td>\n </tr>\n\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Filter URLs (chat box):', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_filter_urls_chat_box'); ?></td>\n </tr>\n\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save2\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs3\">\n\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs3\">\n <table width=\"100%\" class=\"sitemile-table\">\n\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable Shipping:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_shipping'); ?></td>\n </tr>\n <!-- \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Enable only a flat fee:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_flat_shipping'); ?></td>\n </tr>\n \n <tr>\n <td colspan=\"3\"><?php _e('OR', 'PricerrTheme'); ?></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Location based:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_location_based_shipping'); ?></td>\n </tr>\n -->\n\n <tr>\n <td></td>\n <td></td>\n <td>\n <input type=\"submit\" name=\"PricerrTheme_save3\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/>\n </td>\n </tr>\n\n </table>\n </form>\n\n </div>\n\n <div id=\"tabs4\">\n For facebook connect, install this plugin: <a\n href=\"http://wordpress.org/extend/plugins/wordpress-social-login/\">WordPress Social Login</a>\n <!-- \n \t<form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs4\">\n <table width=\"100%\" class=\"sitemile-table\">\n \t\t\t\t\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable Facebook Login:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_facebook_login'); ?></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Facebook App ID:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"35\" name=\"PricerrTheme_facebook_app_id\" value=\"<?php echo get_option('PricerrTheme_facebook_app_id'); ?>\"/></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Facebook Secret Key:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"35\" name=\"PricerrTheme_facebook_app_secret\" value=\"<?php echo get_option('PricerrTheme_facebook_app_secret'); ?>\"/></td>\n </tr>\n \n <tr>\n <td ></td>\n <td ></td>\n <td><input type=\"submit\" name=\"PricerrTheme_save4\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/></td>\n </tr>\n \n </table> \n \t</form>\n -->\n </div>\n\n <div id=\"tabs5\">\n For twitter connect, install this plugin: <a href=\"http://wordpress.org/extend/plugins/wordpress-social-login/\">WordPress\n Social Login</a> <!--\n <form method=\"post\" action=\"<?php bloginfo('siteurl'); ?>/wp-admin/admin.php?page=general-options&active_tab=tabs5\">\n <table width=\"100%\" class=\"sitemile-table\">\n \t\t\t\t\n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"200\"><?php _e('Enable Twitter Login:', 'PricerrTheme'); ?></td>\n <td><?php echo PricerrTheme_get_option_drop_down($arr, 'PricerrTheme_enable_twitter_login'); ?></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Twitter Consumer Key:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"35\" name=\"PricerrTheme_twitter_consumer_key\" value=\"<?php echo get_option('PricerrTheme_twitter_consumer_key'); ?>\"/></td>\n </tr>\n \n <tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Twitter Consumer Secret:', 'PricerrTheme'); ?></td>\n <td><input type=\"text\" size=\"35\" name=\"PricerrTheme_twitter_consumer_secret\" value=\"<?php echo get_option('PricerrTheme_twitter_consumer_secret'); ?>\"/></td>\n </tr>\n \n \n \t\t\t\t\t\t<tr>\n <td valign=top width=\"22\"><?php PricerrTheme_theme_bullet(); ?></td>\n <td width=\"250\"><?php _e('Callback URL:', 'PricerrTheme'); ?></td>\n <td><?php echo get_bloginfo('template_url'); ?>/lib/social/twitter/callback.php</td>\n </tr>\n \n \t\t\t\t\n <tr>\n <td ></td>\n <td ></td>\n <td><input type=\"submit\" name=\"PricerrTheme_save5\" value=\"<?php _e('Save Options', 'PricerrTheme'); ?>\"/></td>\n </tr>\n \n </table> \n \t</form> -->\n </div>\n\n<?php do_action('PricerrTheme_general_options_div_content'); ?>\n\n <?php\n echo '</div>';\n\n}", "function worldlogger_options() {\n\t $opt_name = 'worldlogger_hash';\n\t $hidden_field_name = 'mt_submit_hidden';\n\t $data_field_name = 'worldlogger_hash';\n\n\t // Read in existing option value from database\n\t $opt_val = get_option( $opt_name );\n\n\t // See if the user has posted us some information\n\t // If they did, this hidden field will be set to 'Y'\n\t if( $_POST[ $hidden_field_name ] == 'Y' ) {\n\t // Read their posted value\n\t $opt_val = $_POST[ $data_field_name ];\n\t // Save the posted value in the database\n\t update_option( $opt_name, $opt_val );\n\n\t // Put an options updated message on the screen\n\n\t?>\n\t<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\n\t<?php } ?>\n\t<div class=\"wrap\">\n\t<h2><?= __( 'Worldlogger Options', 'worldlogger_domain' ) ?></h2>\n\tTo install Worldlogger, please create an account at <a href=\"http://www.worldlogger.com/signup\">worldlogger.com</a> and copy the hash in the \"Settings\" page of a website.\n\t<form name=\"form1\" method=\"post\" action=\"\">\n\t\t<table class=\"form-table\"> \n\t\t<tr valign=\"top\"> \n\t\t<th scope=\"row\"><label for=\"blogname\">Worldlogger Hash</label></th> \n\t\t<td><input type=\"text\" name=\"<?php echo $data_field_name; ?>\" value=\"<?php echo $opt_val; ?>\" size=\"40\"></td> \n\t\t</tr> \n\t\t</table>\n\t\t<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\n\t\t<p class=\"submit\"> \n\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"Save Changes\" /> \n\t\t</p>\n\t</form>\n\t</div>\n\n\t<?php\n\n}", "function mmpm_theme_options_form(){\n\t\t$out = '';\n\t\t$submit_button = mmpm_ntab(7) . '<input type=\"submit\" class=\"button-primary pull-right\" value=\"' . __( 'Save All Changes', MMPM_TEXTDOMAIN_ADMIN ) . '\" />';\n\t\t$theme_meta = mmpm_ntab(7) . '<div>' . mmpm_ntab(8) . '<span class=\"theme_name\">' . __( MMPM_PLUGIN_NAME , MMPM_TEXTDOMAIN_ADMIN ) . '</span>' . ' <small>v' . MMPM_PLUGIN_VERSION . mmpm_ntab(7) . '</small></div>';\n\t\t$out .= mmpm_ntab(1) . '<div class=\"wrap bootstrap\">';\n\t\t$out .= mmpm_ntab(2) . '<div class=\"'. MMPM_PREFIX . '_theme_page\">';\n\t\t$out .= mmpm_ntab(3) . '<form id=\"'. MMPM_PREFIX . '_theme_options_form\" class=\"'. MMPM_PREFIX . '_theme_options_form\" method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">';\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= $theme_meta;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n//\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"action\" value=\"update\" />';\n\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"' . MMPM_OPTIONS_DB_NAME . '[last_modified]\" value=\"' . ( time() + 60 ) . '\" />';\n\t\tob_start();\n\t\tsettings_fields( 'mmpm_options_group' );\n\t\t$out .= mmpm_ntab(4) . ob_get_contents();\n\t\tob_end_clean();\n\t\t$out .= mmpm_theme_sections_generator();\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n\t\t$out .= mmpm_ntab(3) . '</form>';\n\t\t$out .= mmpm_ntab(2) . '</div><!-- class=\"'. MMPM_PREFIX . 'theme_page\" -->';\n\t\t$out .= mmpm_ntab(1) . '</div><!-- class=\"wrap\" -->';\n\n\t\techo $out; // general out\n\t}", "function edd_incentives_render_exit_options() {\n global $post;\n\n $post_id = $post->ID;\n $meta = get_post_meta( $post_id, '_edd_incentive_meta', true );\n $text_css = ( ! isset( $meta['button_type'] ) || $meta['button_type'] == 'text' ? '' : ' style=\"display: none;\"' );\n $button_css = ( isset( $meta['button_type'] ) && $meta['button_type'] == 'button' ? '' : ' style=\"display: none;\"' );\n $image_css = ( isset( $meta['button_type'] ) && $meta['button_type'] == 'image' ? '' : ' style=\"display: none;\"' );\n\n // Button type\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_button_type\">' . __( 'Button Type', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[button_type]\" id=\"_edd_incentive_button_type\">';\n echo '<option value=\"text\"' . ( ! isset( $meta['button_type'] ) || $meta['button_type'] == 'text' ? ' selected' : '' ) . '>' . __( 'Text Link', 'edd-incentives' ) . '</option>';\n echo '<option value=\"image\"' . ( $meta['button_type'] == 'image' ? ' selected' : '' ) . '>' . __( 'Image Link', 'edd-incentives' ) . '</option>';\n echo '<option value=\"button\"' . ( $meta['button_type'] == 'button' ? ' selected' : '' ) . '>' . __( 'Button', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n // Button text - text\n echo '<p class=\"edd-incentives-button-type-text\"' . $text_css . '>';\n echo '<strong><label for=\"_edd_incentive_link_text\">' . __( 'Link Text', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" class=\"widefat\" name=\"_edd_incentive_meta[link_text]\" id=\"_edd_incentive_link_text\" value=\"' . ( isset( $meta['link_text'] ) && $meta['link_text'] != '' ? $meta['link_text'] : '' ) . '\" />';\n echo '</p>';\n \n // Button text - button\n echo '<p class=\"edd-incentives-button-type-button\"' . $button_css . '>';\n echo '<strong><label for=\"_edd_incentive_button_text\">' . __( 'Button Text', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" class=\"widefat\" name=\"_edd_incentive_meta[button_text]\" id=\"_edd_incentive_button_text\" value=\"' . ( isset( $meta['button_text'] ) && $meta['button_text'] != '' ? $meta['button_text'] : '' ) . '\" />';\n echo '</p>';\n\n // Button image\n echo '<p class=\"edd-incentives-button-type-image\"' . $image_css . '>';\n echo '<strong><label for=\"_edd_incentive_button_image\">' . __( 'Button Image', 'edd-incentives' ) . '</label></strong><br />';\n if( ! isset( $meta['button_image'] ) || $meta['button_image'] == '' ) {\n echo '<input type=\"file\" name=\"_edd_incentive_button_image\" id=\"_edd_incentive_button_image\" value=\"\" size=\"25\" />';\n } else {\n echo '<img src=\"' . $meta['button_image'] . '\" style=\"width: 100%;\" />';\n echo '<a href=\"' . add_query_arg( array( 'edd-action' => 'remove_button_image' ) ) . '\" class=\"button button-secondary\">' . __( 'Remove', 'edd-incentives' ) . '</a>';\n }\n echo '</p>';\n}", "function ajb_options_do_page() {\n\n\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t$_REQUEST['settings-updated'] = false ;\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); echo \"<h2>\" . get_current_theme() . __( ' Theme Options', 'ajb' ) . \"</h2>\"; ?>\n\n\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t<div class=\"updated fade\"><p><strong><?php _e( 'Options saved', 'ajb' ); ?></strong></p></div>\n\t\t<?php endif; ?>\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'ajb_option_group' ); ?>\n\t\t\t<?php $options = get_option( 'ajb_options' );\n\n\t\t\t_e( '<p>The <em>Community is...</em> section shows links to 5 pages. Enter here the information for these links.</p>', 'ajb' );\n\t\t\t?>\n\t\t\t<table class=\"form-table\">\n\n\t\t\t<?php\n\t\t\t/**\n\t\t\t * button link\n\t\t\t */\n\t\t\tfor ( $i=1; $i<=5; $i++ ) {\n\t\t\t\t?>\n\t\t\t\t <tr valign=\"top\"> <th scope=\"row\"><?php _e( 'Button ' . $i . ' Link', 'ajb' ); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t <input id=\"ajb_options[button_<?php echo $i; ?>_link]\" class=\"regular-text\" type=\"text\" name=\"ajb_options[button_<?php echo $i; ?>_link]\" value=\"<?php esc_attr_e( $options['button_' . $i . '_link'] ); ?>\" />\n\t\t\t\t\t <label class=\"description\" for=\"ajb_options[button_<?php echo $i; ?>_link]\"><?php _e( 'Link for link button ' . $i . '', 'ajb' ); ?></label>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t \n\t\t\t<?php } ?>\n\n\t\t\t</table>\n\t\t\t\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e( 'Save Options', 'ajb' ); ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t</div>\n\t<?php\n}", "function widget_opml_browser_register()\r\n {\r\n $options = get_option('widget_opml_browser');\r\n $need_update = false;\r\n if (isset($options['version'])) {\r\n $curver = $options['version'];\r\n if ($curver < 1.2) {\r\n $curver = 1.2;\r\n $options['version'] = $curver;\r\n $options[1]['title'] = $options['title'];\r\n $options[1]['opmlurl'] = $options['opmlurl'];\r\n $options[1]['opmlpath'] = $options['opmlpath'];\r\n $options[1]['reqhtml'] = $options['reqhtml'];\r\n $options[1]['reqfeed'] = $options['reqfeed'];\r\n $options[1]['noself'] = $options['noself'];\r\n $options[1]['opmllink'] = $options['opmllink'];\r\n $options[1]['closeall'] = $options['closeall'];\r\n $options[1]['indent'] = $options['indent'];\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n /* No changes to options between 1.2 and 2.2 */\r\n\t if ($curver < 2.2) {\r\n\t $curver = 2.2;\r\n $options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t\t $options[$i]['tooltips'] = '1';\r\n\t\t $options[$i]['credit'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.3) {\r\n\t $curver = 2.3;\r\n\t\t$options['version'] = $curver;\r\n\t\tfor ($i = 1; $i <= $options['number']; $i++)\r\n\t\t{\r\n\t\t $options[$i]['showfolders'] = '1';\r\n\t\t}\r\n\t\t$need_update = true;\r\n\t }\r\n\t if ($curver < 2.4) {\r\n\t $curver = 2.4;\r\n\t\t$options['version'] = $curver;\r\n\t\t$need_update = true;\r\n\t }\r\n }\r\n else {\r\n $curver = 2.4;\r\n $options['version'] = $curver;\r\n\t $options[1]['imageurl'] = get_settings('siteurl') . '/wp-content/plugins/opml-browser/images/';\r\n\t $options[1]['tooltips'] = '1';\r\n $options[1]['indent'] = \"5px\";\r\n\t $options[1]['credit'] = '1';\r\n $need_update = true;\r\n }\r\n\r\n $number = $options['number'];\r\n if ( $number < 1 ) {\r\n $number = 1;\r\n $options['number'] = 1;\r\n $need_update = true;\r\n }\r\n else if ( $number > 9 ) {\r\n $number = 9;\r\n $options['number'] = 9;\r\n $need_update = true;\r\n }\r\n\r\n // Apply any upgrades here by testing $curver and setting $need_update to true\r\n\r\n if ($need_update)\r\n update_option('widget_opml_browser', $options);\r\n\r\n for ($i = 1; $i <= 9; $i++) {\r\n $name = array('opml-browser %s', null, $i);\r\n register_sidebar_widget($name, $i <= $number ? 'widget_opml_browser' : /* unregister */ '', $i);\r\n register_widget_control($name, $i <= $number ? 'widget_opml_browser_control' : /* unregister */ '', 550, 500, $i);\r\n }\r\n add_action('sidebar_admin_setup', 'widget_opml_browser_setup');\r\n add_action('sidebar_admin_page', 'widget_opml_browser_page');\r\n\r\n // add the Link to the OPML file For Autodiscovery\r\n add_action('wp_head', 'opml_browser_head');\t\r\n\r\n // Add a filter for embedded browsers in content\r\n add_filter('the_content', 'opml_browser_content_filter');\r\n }", "public function setDefaultOptions()\n {\n // Set event data\n foreach ($this->events as $event => $handler) {\n $this->options['data']['widget-action-' . $event] = $handler;\n }\n\n if($this->jsWidget) {\n $this->options['data']['ui-widget'] = $this->jsWidget;\n }\n\n if($this->fadeIn) {\n $fadeIn = $this->fadeIn === true ? 'fast' : $this->fadeIn;\n $this->options['data']['widget-fade-in'] = $fadeIn;\n $this->visible = false;\n }\n\n if (!empty($this->init)) {\n $this->options['data']['ui-init'] = $this->init;\n }\n }", "function lbcb_print_option_buttons(){\n?>\n\t<input class=\"button-primary\" type=\"submit\" name=\"lbcb_options[save]\" id=\"lbcb_options[save]\" value=\"<?php _e( 'Save Options', 'lbcb_textdomain' ); ?>\"/>\n\t<input class=\"button-secondary\" type=\"submit\" name=\"lbcb_options[reset]\" id=\"lbcb_options[reset]\" value=\"<?php _e( 'Reset To Defaults', 'lbcb_textdomain' ); ?>\"/>\n\n<?php\n}", "function widget_supporters_init() {\r\n\tglobal $wpdb, $supporters_widget_main_blog_only;\r\n\t\t\r\n\t// Check for the required API functions\r\n\tif ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )\r\n\t\treturn;\r\n\r\n\t// This saves options and prints the widget's config form.\r\n\tfunction widget_supporters_control() {\r\n\t\tglobal $wpdb;\r\n\t\t$options = $newoptions = get_option('widget_supporters');\r\n\t\tif ( $_POST['supporters-submit'] ) {\r\n\t\t\t$newoptions['supporters-title'] = $_POST['supporters-title'];\r\n\t\t\t$newoptions['supporters-display'] = $_POST['supporters-display'];\r\n\t\t\t$newoptions['supporters-blog-name-characters'] = $_POST['supporters-blog-name-characters'];\r\n\t\t\t$newoptions['supporters-order'] = $_POST['supporters-order'];\r\n\t\t\t$newoptions['supporters-number'] = $_POST['supporters-number'];\r\n\t\t\t$newoptions['supporters-avatar-size'] = $_POST['supporters-avatar-size'];\r\n\t\t}\r\n\t\tif ( $options != $newoptions ) {\r\n\t\t\t$options = $newoptions;\r\n\t\t\tupdate_option('widget_supporters', $options);\r\n\t\t}\r\n\t?>\r\n\t\t\t\t<div style=\"text-align:left\">\r\n \r\n\t\t\t\t<label for=\"supporters-title\" style=\"line-height:35px;display:block;\"><?php _e('Title', 'widgets'); ?>:<br />\r\n <input class=\"widefat\" id=\"supporters-title\" name=\"supporters-title\" value=\"<?php echo $options['supporters-title']; ?>\" type=\"text\" style=\"width:95%;\">\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-display\" style=\"line-height:35px;display:block;\"><?php _e('Display', 'widgets'); ?>:\r\n <select name=\"supporters-display\" id=\"supporters-display\" style=\"width:95%;\">\r\n <option value=\"avatar_blog_name\" <?php if ($options['supporters-display'] == 'avatar_blog_name'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Avatar + Blog Name'); ?></option>\r\n <option value=\"avatar\" <?php if ($options['supporters-display'] == 'avatar'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Avatar Only'); ?></option>\r\n <option value=\"blog_name\" <?php if ($options['supporters-display'] == 'blog_name'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Blog Name Only'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-blog-name-characters\" style=\"line-height:35px;display:block;\"><?php _e('Blog Name Characters', 'widgets'); ?>:<br />\r\n <select name=\"supporters-blog-name-characters\" id=\"supporters-blog-name-characters\" style=\"width:95%;\">\r\n <?php\r\n\t\t\t\t\tif ( empty($options['supporters-blog-name-characters']) ) {\r\n\t\t\t\t\t\t$options['supporters-blog-name-characters'] = 30;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\tfor ( $counter = 1; $counter <= 500; $counter += 1) {\r\n\t\t\t\t\t\t?>\r\n <option value=\"<?php echo $counter; ?>\" <?php if ($options['supporters-blog-name-characters'] == $counter){ echo 'selected=\"selected\"'; } ?> ><?php echo $counter; ?></option>\r\n <?php\r\n\t\t\t\t\t}\r\n ?>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-order\" style=\"line-height:35px;display:block;\"><?php _e('Order', 'widgets'); ?>:\r\n <select name=\"supporters-order\" id=\"supporters-order\" style=\"width:95%;\">\r\n <option value=\"most_recent\" <?php if ($options['supporters-order'] == 'most_recent'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Most Recent'); ?></option>\r\n <option value=\"random\" <?php if ($options['supporters-order'] == 'random'){ echo 'selected=\"selected\"'; } ?> ><?php _e('Random'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-number\" style=\"line-height:35px;display:block;\"><?php _e('Number', 'widgets'); ?>:<br />\r\n <select name=\"supporters-number\" id=\"supporters-number\" style=\"width:95%;\">\r\n <?php\r\n\t\t\t\t\tif ( empty($options['supporters-number']) ) {\r\n\t\t\t\t\t\t$options['supporters-number'] = 10;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t\tfor ( $counter = 1; $counter <= 25; $counter += 1) {\r\n\t\t\t\t\t\t?>\r\n <option value=\"<?php echo $counter; ?>\" <?php if ($options['supporters-number'] == $counter){ echo 'selected=\"selected\"'; } ?> ><?php echo $counter; ?></option>\r\n <?php\r\n\t\t\t\t\t}\r\n ?>\r\n </select>\r\n </label>\r\n\t\t\t\t<label for=\"supporters-avatar-size\" style=\"line-height:35px;display:block;\"><?php _e('Avatar Size', 'widgets'); ?>:<br />\r\n <select name=\"supporters-avatar-size\" id=\"supporters-avatar-size\" style=\"width:95%;\">\r\n <option value=\"16\" <?php if ($options['supporters-avatar-size'] == '16'){ echo 'selected=\"selected\"'; } ?> ><?php _e('16px'); ?></option>\r\n <option value=\"32\" <?php if ($options['supporters-avatar-size'] == '32'){ echo 'selected=\"selected\"'; } ?> ><?php _e('32px'); ?></option>\r\n <option value=\"48\" <?php if ($options['supporters-avatar-size'] == '48'){ echo 'selected=\"selected\"'; } ?> ><?php _e('48px'); ?></option>\r\n <option value=\"96\" <?php if ($options['supporters-avatar-size'] == '96'){ echo 'selected=\"selected\"'; } ?> ><?php _e('96px'); ?></option>\r\n <option value=\"128\" <?php if ($options['supporters-avatar-size'] == '128'){ echo 'selected=\"selected\"'; } ?> ><?php _e('128px'); ?></option>\r\n </select>\r\n </label>\r\n\t\t\t\t<input type=\"hidden\" name=\"supporters-submit\" id=\"supporters-submit\" value=\"1\" />\r\n\t\t\t\t</div>\r\n\t<?php\r\n\t}\r\n// This prints the widget\r\n\tfunction widget_supporters($args) {\r\n\t\tglobal $wpdb, $current_site;\r\n\t\textract($args);\r\n\t\t$defaults = array('count' => 10, 'supportername' => 'wordpress');\r\n\t\t$options = (array) get_option('widget_supporters');\r\n\r\n\t\tforeach ( $defaults as $key => $value )\r\n\t\t\tif ( !isset($options[$key]) )\r\n\t\t\t\t$options[$key] = $defaults[$key];\r\n\r\n\t\t?>\r\n\t\t<?php echo $before_widget; ?>\r\n\t\t\t<?php echo $before_title . __($options['supporters-title']) . $after_title; ?>\r\n <br />\r\n <?php\r\n\r\n\t\t\t$newoptions['supporters-display'] = $_POST['supporters-display'];\r\n\t\t\t$newoptions['supporters-order'] = $_POST['supporters-order'];\r\n\t\t\t$newoptions['supporters-number'] = $_POST['supporters-number'];\r\n\t\t\t$newoptions['supporters-avatar-size'] = $_POST['supporters-avatar-size'];\r\n\t\t\t\t//=================================================//\r\n\t\t\t\t$now = time();\r\n\t\t\t\tif ( $options['supporters-order'] == 'most_recent' ) {\r\n\t\t\t\t\t$query = \"SELECT supporter_ID, blog_ID, expire FROM \" . $wpdb->base_prefix . \"supporters WHERE expire > '\" . $now . \"' ORDER BY supporter_ID DESC LIMIT \" . $options['supporters-number'];\r\n\t\t\t\t} else if ( $options['supporters-order'] == 'random' ) {\r\n\t\t\t\t\t$query = \"SELECT supporter_ID, blog_ID, expire FROM \" . $wpdb->base_prefix . \"supporters WHERE expire > '\" . $now . \"' ORDER BY RAND() LIMIT \" . $options['supporters-number'];\r\n\t\t\t\t}\r\n\t\t\t\t$supporters = $wpdb->get_results( $query, ARRAY_A );\r\n\t\t\t\tif (count($supporters) > 0){\r\n\t\t\t\t\tif ( $options['supporters-display'] == 'blog_name' || $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\techo '<ul>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ($supporters as $supporter){\r\n\t\t\t\t\t\t$blog_details = get_blog_details( $supporter['blog_ID'] );\r\n\t\t\t\t\t\tif ( $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\t\techo '<li>';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . get_blog_avatar( $supporter['blog_ID'], $options['supporters-avatar-size'], '' ) . '</a>';\r\n\t\t\t\t\t\t\techo ' ';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . substr($blog_details->blogname, 0, $options['supporters-blog-name-characters']) . '</a>';\r\n\t\t\t\t\t\t\techo '</li>';\r\n\t\t\t\t\t\t} else if ( $options['supporters-display'] == 'avatar' ) {\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . get_avatar( $supporter['blog_ID'], $options['supporters-avatar-size'], '' ) . '</a>';\r\n\t\t\t\t\t\t} else if ( $options['supporters-display'] == 'blog_name' ) {\r\n\t\t\t\t\t\t\techo '<li>';\r\n\t\t\t\t\t\t\techo '<a href=\"' . $blog_details->siteurl . '\">' . substr($blog_details->blogname, 0, $options['supporters-blog-name-characters']) . '</a>';\r\n\t\t\t\t\t\t\techo '</li>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( $options['supporters-display'] == 'blog_name' || $options['supporters-display'] == 'avatar_blog_name' ) {\r\n\t\t\t\t\t\techo '</ul>';\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\t\t<?php echo $after_widget; ?>\r\n<?php\r\n\t}\r\n\t// Tell Dynamic Sidebar about our new widget and its control\r\n\tif ( $supporters_widget_main_blog_only == 'yes' ) {\r\n\t\tif ( $wpdb->blogid == 1 ) {\r\n\t\t\tregister_sidebar_widget(array(__('supporters'), 'widgets'), 'widget_supporters');\r\n\t\t\tregister_widget_control(array(__('supporters'), 'widgets'), 'widget_supporters_control');\r\n\t\t}\r\n\t} else {\r\n\t\tregister_sidebar_widget(array(__('supporters'), 'widgets'), 'widget_supporters');\r\n\t\tregister_widget_control(array(__('supporters'), 'widgets'), 'widget_supporters_control');\r\n\t}\r\n}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'layout',\n\t\t\t\t\t'fonts',\n\t\t\t\t\t'custom',\n\t\t\t\t\t'columns',\n\t\t\t\t\t'liststyle',\n\t\t\t\t\t'imageratios',\n\t\t\t\t\t'background',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-display',\n\t\t\t\t\t\t'label' => __( 'Display', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'text_style' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $text_style ) ) ? $text_style : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Title &amp; Excerpt Position' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t\t\t'regular' => __( 'Regular' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t\t'overlay' => __( 'Overlay' , 'layerswp' )\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'show_media' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_media ) ) ? $show_media : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Featured Images' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_titles' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_titles ) ) ? $show_titles : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Titles' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_excerpts' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_excerpts ) ) ? $show_excerpts : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Excerpts' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'excerpt_length' => array(\n 'type' => 'number',\n 'name' => $this->get_field_name( 'excerpt_length' ) ,\n 'id' => $this->get_field_id( 'excerpt_length' ) ,\n 'min' => 0,\n 'max' => 10000,\n 'value' => ( isset( $excerpt_length ) ) ? $excerpt_length : NULL,\n 'label' => __( 'Excerpts Length' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_dates' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_dates ) ) ? $show_dates : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Dates' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_author' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_author ) ) ? $show_author : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Author' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_tags' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_tags ) ) ? $show_tags : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Tags' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_categories' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_categories ) ) ? $show_categories : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Categories' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_call_to_action' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_call_to_action ) ) ? $show_call_to_action : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show \"Read More\" Buttons' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'call_to_action' => array(\n 'type' => 'text',\n 'name' => $this->get_field_name( 'call_to_action' ) ,\n 'id' => $this->get_field_id( 'call_to_action' ) ,\n 'value' => ( isset( $call_to_action ) ) ? $call_to_action : NULL,\n 'label' => __( '\"Read More\" Text' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_pagination' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_pagination ) ) ? $show_pagination : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Pagination' , 'layerswp' )\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) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' => __( 'Post' , 'layerswp' ),\n\t\t\t\t\t'icon_class' =>'post'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\n\t\t\t\t\t<div class=\"layers-row layers-push-bottom\">\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Enter title here' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $title ) ) ? $title : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-text layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Short Excerpt' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $excerpt ) ) ? $excerpt : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-textarea layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php // Grab the terms as an array and loop 'em to generate the $options for the input\n\t\t\t\t\t\t$terms = get_terms( $this->taxonomy );\n\t\t\t\t\t\tif( !is_wp_error( $terms ) ) { ?>\n\t\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'category' ); ?>\"><?php echo __( 'Category to Display' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t\t<?php $category_options[ 0 ] = __( 'All' , 'layerswp' );\n\t\t\t\t\t\t\t\tforeach ( $terms as $t ) $category_options[ $t->term_id ] = $t->name;\n\t\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Select a Category' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t'value' => ( isset( $category ) ) ? $category : NULL ,\n\t\t\t\t\t\t\t\t\t\t'options' => $category_options\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</p>\n\t\t\t\t\t\t<?php } // if !is_wp_error ?>\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'posts_per_page' ); ?>\"><?php echo __( 'Number of items to show' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php $select_options[ '-1' ] = __( 'Show All' , 'layerswp' );\n\t\t\t\t\t\t\t$select_options = $this->form_elements()->get_incremental_options( $select_options , 1 , 20 , 1);\n\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $posts_per_page ) ) ? $posts_per_page : NULL ,\n\t\t\t\t\t\t\t\t\t'min' => '-1',\n\t\t\t\t\t\t\t\t\t'max' => '100'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'order' ); ?>\"><?php echo __( 'Sort by' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $order ) ) ? $order : NULL ,\n\t\t\t\t\t\t\t\t\t'options' => $this->form_elements()->get_sort_options()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\t\t<?php }", "public function hookConfigForm($args)\n {\n $view = get_view();\n $elementTable = $this->_db->getTable('Element');\n $configArgs -> options = get_option('viewer3d_options');\n if (isset($configArgs -> options)) {\n $configArgs -> options = json_decode($configArgs -> options);\n } else {\n $configArgs -> options = $this -> getDefaultOptions();\n set_option('viewer3d_options', json_encode($configArgs -> options));\n }\n //$configArgs -> options = $this -> getDefaultOptions();\n //set_option('viewer3d_options', json_encode($configArgs -> options));\n $this -> _showConfigForm($configArgs);\n \n }", "function JSOption()\n{\n\tglobal $options;\n\n\t// Check the session id.\n\tcheckSession('get');\n\n\t// If no variables are provided, leave the hell out of here.\n\tif (empty($_POST['v']) || !isset($_POST['val']))\n\t\texit;\n\n\t// Sorry, guests can't go any further than this..\n\tif (we::$is_guest || MID == 0)\n\t\tobExit(false);\n\n\t// If this is the admin preferences the passed value will just be an element of it.\n\tif ($_POST['v'] == 'admin_preferences')\n\t{\n\t\t$options['admin_preferences'] = !empty($options['admin_preferences']) ? unserialize($options['admin_preferences']) : array();\n\t\t// New thingy...\n\t\tif (isset($_GET['admin_key']) && strlen($_GET['admin_key']) < 5)\n\t\t\t$options['admin_preferences'][$_GET['admin_key']] = $_POST['val'];\n\n\t\t// Change the value to be something nice,\n\t\t$_POST['val'] = serialize($options['admin_preferences']);\n\t}\n\n\t// Update the option.\n\twesql::insert('replace',\n\t\t'{db_prefix}themes',\n\t\tarray('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),\n\t\tarray(MID, $_POST['v'], is_array($_POST['val']) ? implode(',', $_POST['val']) : $_POST['val'])\n\t);\n\n\tcache_put_data('theme_settings:' . MID, null, 60);\n\n\t// Don't output anything...\n\texit;\n}", "function sfg_home_button_options_callback() {\n//\n}", "private function set_end_options(): void {\n Simply_Static\\Options::instance()\n ->set('additional_files', Utils::array_to_option_string($this->files))\n ->set('additional_urls', Utils::array_to_option_string($this->urls))\n ->set('archive_end_time', Simply_Static\\Util::formatted_datetime())\n ->save();\n }", "function buildSettingsForm() {}", "function optionsframework_options() {\n\t// Theme Skin Color\n\t$theme_skin_colors = array(\n\t\t'45B6F7' => 100,\n\t\t'FF5E52' => 1,\n\t\t'2CDB87' => 2,\n\t\t'00D6AC' => 3,\n\t\t'16C0F8' => 4,\n\t\t'EA84FF' => 5,\n\t\t'FDAC5F' => 6,\n\t\t'FD77B2' => 7,\n\t\t'76BDFF' => 8,\n\t\t'C38CFF' => 9,\n\t\t'FF926F' => 10,\n\t\t'8AC78F' => 11,\n\t\t'C7C183' => 12,\n\t\t'555555' => 13\n\t);\n\t//List Type\n\t$list_type = array(\n\t\t'thumb' =>__('图文(缩略图尺寸:220*150,默认已自动裁剪)','im'),\n\t\t'text' =>__('文字','im'),\n\t\t'auto' =>__('自动(有缩略图时图文模式,否则文字模式)','im'),\n\t);\n\t//Post Widgets\n\t$post_widgets = array(\n\t\t'views' => __('阅读量(无需安装插件)','im'),\n\t\t'comments' => __('评论数(列表)','im'),\n\t\t'pubdate' => __('发布时间(列表)','im'),\n\t\t'authors' => __('作者(列表)','im'),\n\t\t'catlink' => __('分类链接(列表)','im')\n\t);\n\t$post_widgets_defaults = array(\n\t\t'views' => '1',\n\t\t'comments' => '1',\n\t\t'pubdate' => '1',\n\t\t'authors' => '1',\n\t\t'catlink' => '1'\n\t);\n\t// Pull all the categories into an array\n\t$options_categories = array();\n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n\t\t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\n\t// Pull all tags into an array\n\t$options_tags = array();\n\t$options_tags_obj = get_tags();\n\tforeach ( $options_tags_obj as $tag ) {\n\t\t$options_tags[$tag->term_id] = $tag->name;\n\t}\n\n\t// Pull all the pages into an array\n\t$options_pages = array();\n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t//$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n\t\t$options_pages[$page->ID] = $page->post_title;\n\t}\n\n\t//Pull all the link categories into an array\n\t$options_linkcats = array();\n\t$options_linkcats_obj = get_terms('link_category');\n\tforeach ($options_linkcats_obj as $linkcats) {\n\t\t$options_linkcats[$linkcats->term_id] = $linkcats->name;\n\t}\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_stylesheet_directory_uri() . '/assets/images/';\n\t// ADs descriptions\n\t$ads_desc = __('可添加任意广告联盟代码或自定义代码', 'im');;\n\t$options = array();\n\t/**\n\t * Basic Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('基本设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// LOGO\n\t$options[] = array(\n\t\t'name' => __('LOGO','im'),\n\t\t'desc' => __('建议尺寸:140*32,格式PNG'),\n\t\t'id' => 'logo_src',\n\t\t'std' => $imagepath.'logo.png',\n\t\t'type' => 'upload'\n\t);\n\t// Brand Title\n\t$options[] = array(\n\t\t'name' => __('品牌文字','im'),\n\t\t'desc' => __('显示在logo旁边的两个短文字,换行填写两段文字','im'),\n\t\t'id' => 'brand',\n\t\t'std' => \"第一行\\n第二行\",\n\t\t'type' => 'textarea',\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t)\n\t);\n\t// Theme Skin\n\t$options[] = array(\n\t\t'name' => __('主题风格','im'),\n\t\t'desc' => __('选择你喜欢的颜色,可自定义','im'),\n\t\t'id' => 'theme_skin',\n\t\t'std' => '45B6F7',\n\t\t'type' => 'colorradio',\n\t\t'options' => $theme_skin_colors\n\t);\n\t// Theme Skin Customize\n\t$options[] = array(\n\t\t'desc' => __('不喜欢上面的颜色可在此自定义,如不使用清空即可','im'),\n\t\t'id' => 'theme_skin_custom',\n\t\t'type' => 'color'\n\t);\n\t// Show Sidebar\n\t$options[] = array(\n\t\t'name' => __('是否显示侧栏','im'),\n\t\t'desc' => __('显示侧栏','im'),\n\t\t'id' => 'show_sidebar',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Content Max Width\n\t$options[] = array(\n\t\t'name' => __('网页最大宽度','im'),\n\t\t'desc' => __('单位:px','im'),\n\t\t'id' => 'site_width',\n\t\t'std' => 1200,\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// Fixed Nav In PC Frontend\n\t$options[] = array(\n\t\t'name' => __('PC端滚动时导航固定','im'),\n\t\t'desc' => __('开启(由于网址导航页左侧菜单固定,对此页面无效)','im'),\n\t\t'id' => 'nav_fixed',\n\t\t'type' => 'checkbox'\n\t);\n\t// Open Article Links In New Tab\n\t$options[] = array(\n\t\t'name' => __('新窗口打开文章','im'),\n\t\t'desc' => __('新窗口打开文章','im'),\n\t\t'id' => 'target_blank',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Load Pages By Ajax\n\t$options[] = array(\n\t\t'name' => __('分页无限加载页数','im'),\n\t\t'desc' => __('为0时表示不开启该功能','im'),\n\t\t'id' => 'ajaxpager',\n\t\t'std' => 5,\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// List Type\n\t$options[] = array(\n\t\t'name' => __('列表模式','im'),\n\t\t'id' => 'list_type',\n\t\t'std' => 'thumb',\n\t\t'type' => 'radio',\n\t\t'options' => $list_type\n\t);\n\t// Thumbnails\n\t$options[] = array(\n\t\t'name' => __('缩略图','im'),\n\t\t'desc' => __('自动提取文章首图为缩略图(如文章已设置特色图或外链缩略图,此设置无效)','im'),\n\t\t'id' => 'thumbnails',\n\t\t'type' => 'checkbox'\n\t);\n\t// Thumbnails Auto\n\t$options[] = array(\n\t\t'desc' => __('将自动加入文章首图地址后缀之前,默认为空。如:文章首图地址”aaa/bbb.jpg”,此处填写的字符是“-220x150”,则缩略图实际地址为“aaa/bbb-220x150.jpg”','im'),\n\t\t'id' => 'thumbnails_suffix',\n\t\t'std' => 'thumb',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini thumbnails_hidden',\n\t);\n\t// Thumbnails Link\n\t$options[] = array(\n\t\t'desc' => __('外链缩略图(开启后会在后台编辑文章时出现外链缩略图地址输入框,填写一个图片地址即可在文章列表中显示。注:如文章添加了特色图像,列表中显示的缩略图优先选择该特色图像。)','im'),\n\t\t'id' => 'thumbnails_link',\n\t\t'type' => 'checkbox'\n\t);\n\t// Post widgets\n\t$options[] = array(\n\t\t'name' => __('文章小部件','im'),\n\t\t'desc' => __('列表中是否显示小部件','im'),\n\t\t'id' => 'post_widgets',\n\t\t'std' => $post_widgets_defaults,\n\t\t'type' => 'multicheck',\n\t\t'options' => $post_widgets\n\t);\n\t// Comment Pop Align Right\n\t$options[] = array(\n\t\t'name' => __('列表中评论数靠右','im'),\n\t\t'desc' => __('列表中评论数靠右','im'),\n\t\t'id' => 'list_comments_r',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Author Link\n\t$options[] = array(\n\t\t'name' => __('作者名加链接','im'),\n\t\t'desc' => __('列表、文章有作者的地方都会加上链接','im'),\n\t\t'id' => 'author_link',\n\t\t'type' => 'checkbox'\n\t);\n\t// Footer Extra Info\n\t$options[] = array(\n\t\t'name' => __('网站底部信息','im'),\n\t\t'desc' => __('版权、网站地图(网站地图可自行使用sitemap插件自动生成)等','im'),\n\t\t'id' => 'footer_extra_info',\n\t\t'std' => '<a href=\"'.site_url('/sitemap.xml').'\">'.__('网站地图', 'haoui').'</a>'.\"\\n\",\n\t\t'type' => 'textarea'\n\t);\n\t// Site Gray\n\t$options[] = array(\n\t\t'name' => __('网站整体变灰','im'),\n\t\t'desc' => __('网站整体变灰','im'),\n\t\t'id' => 'site_gray',\n\t\t'type' => 'checkbox'\n\t);\n\t// Footer Spreadings\n\t$options[] = array(\n\t\t'name' => __('站点底部推广区','im'),\n\t\t'desc' => __('是否开启站点底部推广区','im'),\n\t\t'id' => 'footer_spreadings',\n\t\t'type' => 'checkbox'\n\t);\n\t// Footer Spreadings Title\n\t$options[] = array(\n\t\t//'name' => __('标题','im'),\n\t\t'desc' => __('标题:建议20字内','im'),\n\t\t'id' => 'footer_spreadings_title',\n\t\t'std' => '更专业 更方便',\n\t\t'type' => 'text',\n\t\t'class'=> 'footer_spreadings_hidden'\n\t);\n\t// Footer Spreadings Buttons\n\tfor($i = 1;$i <= 2;$i++){\n\t\t// Footer Spreadings Buttons Title\n\t\t$options[] = array(\n\t\t\t'name' => __('按钮','im').$i,\n\t\t\t'desc' => __('按钮文字','im'),\n\t\t\t'id' => 'footer_spreadings_btn_title_'.$i,\n\t\t\t'type' => 'text',\n\t\t\t'class'=> 'footer_spreadings_hidden'\n\t\t);\n\t\t// Footer Spreadings Buttons Link\n\t\t$options[] = array(\n\t\t\t'desc' => __('按钮链接','im'),\n\t\t\t'id' => 'footer_spreadings_btn_link_'.$i,\n\t\t\t'type' => 'text',\n\t\t\t'class'=> 'footer_spreadings_hidden'\n\t\t);\n\t\t// Footer Spreadings Buttons Link Open Style\n\t\t$options[] = array(\n\t\t\t'desc' => __('新窗口打开','im'),\n\t\t\t'id' => 'footer_spreadings_btn_link_target_'.$i,\n\t\t\t'type' => 'checkbox',\n\t\t\t'class'=> 'footer_spreadings_hidden'\n\t\t);\n\t}\n\t/**\n\t * Home Page Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('首页设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Don't show articles in these categories\n\t$options[] = array(\n\t\t'name' => __('首页不显示该分类下文章','im'),\n\t\t'id' => 'ignore_articles_cat',\n\t\t'type' => 'multicheck',\n\t\t'options' => $options_categories\n\t);\n\t// Don't show these posts\n\t$options[] = array(\n\t\t'name' => __('首页不显示以下ID文章','im'),\n\t\t'desc' => __('每行填写一个文章ID','im'),\n\t\t'id' => 'ignore_posts',\n\t\t'type' => 'textarea',\n\t\t'settings' => array(\n\t\t\t'rows' => 5\n\t\t)\n\t);\n\t// Notice District\n\t$options[] = array(\n\t\t'name' => __('公告模块','im'),\n\t\t'desc' => __('显示公告模块','im'),\n\t\t'id' => 'notice_district',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Notice District Title\n\t$options[] = array(\n\t\t'name' => __('公告模块标题','im'),\n\t\t'desc' => __('建议4个字以内','im'),\n\t\t'id' => 'notice_district_title',\n\t\t'std' => '站点公告',\n\t\t'type' => 'text',\n\t\t'class'=> 'notice_district_hidden'\n\t);\n\t// Notice District Contents From The Category Bellow\n\t$options[] = array(\n\t\t'name' => __('选择分类设置为网站公告','im'),\n\t\t'desc' => __('选择该分类为网站公告','im'),\n\t\t'id' => 'notice_district_cat',\n\t\t'type' => 'select',\n\t\t'class'=> 'notice_district_hidden',\n\t\t'options' => $options_categories\n\t);\n\t// Carousel Figure\n\t$options[] = array(\n\t\t'name' => __('轮播图','im'),\n\t\t'desc' => __('开启轮播图','im'),\n\t\t'id' => 'carousel_figure',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Carousel Figure Order\n\t$options[] = array(\n\t\t'name' => __('图片排序','im'),\n\t\t'desc' => __('数字间空格隔开,默认1 2 3 4 5','im'),\n\t\t'id' => 'carousel_figure_order',\n\t\t'std' => '1 2 3 4 5',\n\t\t'type' => 'text',\n\t\t'class'=> 'carousel_figure_hidden'\n\t);\n\t// Carousel Figure Item\n\tfor($i = 1;$i <= 5;$i++){\n\t\t// Carousel Figure Item Title\n\t\t$options[] = array(\n\t\t\t'name' => __('图片','im').$i,\n\t\t\t'desc' => __('图片标题','im'),\n\t\t\t'id' => 'carousel_figure_item_title_'.$i,\n\t\t\t'std' => 'IM',\n\t\t\t'type' => 'text',\n\t\t\t'class'=> 'carousel_figure_hidden'\n\t\t);\n\t\t// Carousel Figure Item Link\n\t\t$options[] = array(\n\t\t\t'desc' => __('链接地址','im'),\n\t\t\t'id' => 'carousel_figure_item_link_'.$i,\n\t\t\t'std' => 'http://www.webzgq.com',\n\t\t\t'type' => 'text',\n\t\t\t'class'=> 'carousel_figure_hidden'\n\t\t);\n\t\t// Carousel Figure Item Image\n\t\t$options[] = array(\n\t\t\t'desc' => __('图片上传(820*200)','im'),\n\t\t\t'id' => 'carousel_figure_item_image_'.$i,\n\t\t\t'std' => $imagepath.'xiu.jpg',\n\t\t\t'type' => 'upload',\n\t\t\t'class'=> 'carousel_figure_hidden'\n\t\t);\n\t\t// Carousel Figure Item Open Style\n\t\t$options[] = array(\n\t\t\t'desc' => __('新窗口打开','im'),\n\t\t\t'id' => 'carousel_figure_item_open_'.$i,\n\t\t\t'type' => 'checkbox',\n\t\t\t'class'=> 'carousel_figure_hidden'\n\t\t);\n\t}\n\t// List Section Title\n\t$options[] = array(\n\t\t'name' => __('列表板块标题','im'),\n\t\t'desc' => __('列表板块标题','im'),\n\t\t'id' => 'list_section_title',\n\t\t'std' => __('最新发布','im'),\n\t\t'type' => 'text'\n\t);\n\t// Contents of Right Part of the List Section Title \n\t$options[] = array(\n\t\t'name' => __('列表板块标题右侧内容','im'),\n\t\t'desc' => __('列表板块标题右侧内容','im'),\n\t\t'id' => 'list_section_title_r',\n\t\t'std' => '<a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a><a href=\"链接地址\">显示文字</a>',\n\t\t'type' => 'textarea'\n\t);\n\t/**\n\t * Article Page Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('文章页设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Hide Share Section In Mobile Frontend\n\t$options[] = array(\n\t\t'name' => __('手机端不显示分享模块','im'),\n\t\t'desc' => __('手机端不显示分享模块','im'),\n\t\t'id' => 'hide_share_distric',\n\t\t'type' => 'checkbox'\n\t);\n\t// Enable subtitle\n\t$options[] = array(\n\t\t'name' => __('副标题','im'),\n\t\t'desc' => __('开启副标题','im'),\n\t\t'id' => 'enable_subtitle',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Show the prev&nest post of current post\n\t$options[] = array(\n\t\t'name' => __('显示上下篇文章','im'),\n\t\t'desc' => __('显示上下篇文章','im'),\n\t\t'id' => 'post_prevnext',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Show Author Info Section\n\t$options[] = array(\n\t\t'name' => __('显示文章作者介绍','im'),\n\t\t'desc' => __('显示文章作者介绍','im'),\n\t\t'id' => 'post_author_info',\n\t\t'type' => 'checkbox'\n\t);\n\t// Related Posts Section\n\t$options[] = array(\n\t\t'name' => __('相关文章','im'),\n\t\t'desc' => __('是否显示相关文章','im'),\n\t\t'id' => 'post_related_section',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Related Posts Section Title\n\t$options[] = array(\n\t\t'desc' => __('相关文章板块标题','im'),\n\t\t'id' => 'post_related_section_title',\n\t\t'std' => __('相关推荐',\"im\"),\n\t\t'type' => 'text',\n\t\t'class'=> 'post_related_section_hidden'\n\t);\n\t// Related Posts Number\n\t$options[] = array(\n\t\t'desc' => __('显示文章数量','im'),\n\t\t'id' => 'post_related_num',\n\t\t'std' => 10,\n\t\t'type' => 'text',\n\t\t'class'=> 'post_related_section_hidden'\n\t);\n\t// Article Source Section\n\t$options[] = array(\n\t\t'name' => __('文章来源','im'),\n\t\t'desc' => __('是否显示文章来源','im'),\n\t\t'id' => 'article_source_section',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Article Source Link\n\t$options[] = array(\n\t\t'desc' => __('是否加上来源链接','im'),\n\t\t'id' => 'article_source_section_link',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'article_source_section_hidden'\n\t);\n\t// Article Source Link Section Title\n\t$options[] = array(\n\t\t'desc' => __('自定义来源标题','im'),\n\t\t'id' => 'article_source_section_title',\n\t\t'std' => __('来源:','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'article_source_section_hidden'\n\t);\n\t// Post Content Indent\n\t$options[] = array(\n\t\t'name' => __('内容段落缩进','im'),\n\t\t'desc' => __('只对前端文章展示有效','im'),\n\t\t'id' => 'post_content_indent',\n\t\t'type' => 'checkbox'\n\t);\n\t// Copyright Section After Content\n\t$options[] = array(\n\t\t'name' => __('文章页尾版权提示','im'),\n\t\t'desc' => __('是否显示文章页尾版权提示','im'),\n\t\t'id' => 'post_copyright',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Copyright Section Title\n\t$options[] = array(\n\t\t'desc' => __('版权提示前缀','im'),\n\t\t'id' => 'post_copyright_prefix',\n\t\t'std' => __('未经允许不得转载:','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'post_copyright_hidden'\n\t);\n\t// Post keywords and discriptions\n\t$options[] = array(\n\t\t'name' => __('文章关键词及描述','im'),\n\t\t'desc' => __('自动使用主题配置的关键词和描述(具体规则可以自行查看页面源码)','im'),\n\t\t'id' => 'post_keywords_discriptions',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Post keywords and discriptions customizion\n\t$options[] = array(\n\t\t'name' => __('自定义文章关键词及描述','im'),\n\t\t'desc' => __('开启后需在编辑文章时书写关键词和描述,如为空则使用如上规则,开启此项必须开启如上选项','im'),\n\t\t'id' => 'post_keywords_discriptions_customizion',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'post_keywords_discriptions_hidden'\n\t);\n\t/**\n\t * Unique Page Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('独立页面','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Site URL Navgation Page\n\t$options[] = array(\n\t\t'name' => __('网址导航页','im'),\n\t\t'desc' => __('标题下方描述','im'),\n\t\t'id' => 'navpage_desc',\n\t\t'std' => __('这里显示的是网址导航的一句话描述...','im'),\n\t\t'type' => 'text'\n\t);\n\t// Site URL Navgation Page Show Link Category\n\t$options[] = array(\n\t\t'desc' => __('要显示的链接分类','im'),\n\t\t'id' => 'navpage_cats',\n\t\t'type' => 'multicheck',\n\t\t'options' => $options_linkcats\n\t);\n\t// Reader Wall(time limit)\n\t$options[] = array(\n\t\t'name' => __('读者墙','im'),\n\t\t'desc' => __('限制在多少个月内(单位:月)','im'),\n\t\t'id' => 'readerwall_limit_time',\n\t\t'std' => 200,\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// Reader Wall Number\n\t$options[] = array(\n\t\t'desc' => __('显示个数','im'),\n\t\t'id' => 'readerwall_limit_number',\n\t\t'std' => 200,\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// Page Left Part Menus\n\t$options[] = array(\n\t\t'name' => __('页面左侧菜单','im'),\n\t\t'desc' => __('页面左侧菜单','im'),\n\t\t'id' => 'page_left_part_menus',\n\t\t'type' => 'multicheck',\n\t\t'options' => $options_pages\n\t);\n\t// Friend Links Categories\n\t$options[] = array(\n\t\t'name' => __('友情链接分类选择','im'),\n\t\t'desc' => __('友情链接分类选择','im'),\n\t\t'id' => 'friend_links_cat',\n\t\t'type' => 'multicheck',\n\t\t'options' => $options_linkcats\n\t);\n\t/**\n\t * SEO Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('SEO设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Site keywords\n\t$options[] = array(\n\t\t'name' => __('站点默认关键字','im'),\n\t\t'desc' => __('建议个数在5-10之间,用英文逗号隔开','im'),\n\t\t'id' => 'site_keywords',\n\t\t'type' => 'textarea',\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t)\n\t);\n\t// Site descriptions\n\t$options[] = array(\n\t\t'name' => __('站点描述','im'),\n\t\t'desc' => __('建议字数在30—70个之间','im'),\n\t\t'id' => 'site_descriptions',\n\t\t'type' => 'textarea',\n\t\t'settings' => array(\n\t\t\t'rows' => 2\n\t\t)\n\t);\n\t// Hyphen\n\t$options[] = array(\n\t\t'name' => __('全站连接符','im'),\n\t\t'desc' => __('一般为“-”或“_”,已经选择,请勿更改','im'),\n\t\t'id' => 'hythen',\n\t\t//'std' => _im('connector') ? _im('connector') : '-',\n\t\t'std' => '-',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini'\n\t);\n\t// No category in URL\n\t$options[] = array(\n\t\t'name' => __('分类URL去除category字样','im'),\n\t\t'desc' => __('开启(主题已内置no-category插件功能,请不要安装插件;开启后请去设置-固定连接中点击保存即可)','im'),\n\t\t'id' => 'no_cat_in_url',\n\t\t'type' => 'checkbox'\n\t);\n\t// Friend Links Section In the Bottom of Page\n\t$options[] = array(\n\t\t'name' => __('底部友情链接','im'),\n\t\t'desc' => __('开启底部友情链接','im'),\n\t\t'id' => 'bottom_flinks',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Friend Links Section In the Bottom for home page\n\t$options[] = array(\n\t\t'desc' => __('只在首页开启','im'),\n\t\t'id' => 'bottom_flinks_home',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'bottom_flinks_hidden'\n\t);\n\t// Friend Links From Which Link Categories\n\t$options[] = array(\n\t\t'name' => __('选择一个友链的链接分类','im'),\n\t\t'desc' => __('选择一个友链的链接分类','im'),\n\t\t'id' => 'bottom_flinks_cat',\n\t\t'type' => 'select',\n\t\t'class'=> 'bottom_flinks_hidden',\n\t\t'options' => $options_linkcats\n\t);\n\t// Enable Baidu Inner Site Search\n\t$options[] = array(\n\t\t'name' => __('百度站内搜索','im'),\n\t\t'desc' => __('开启百度站内搜索','im'),\n\t\t'id' => 'enable_baidu_inner',\n\t\t'type' => 'checkbox'\n\t);\n\t// Baidu Inner Site Seach Code\n\t$options[] = array(\n\t\t'desc' => __('此处存放百度自定义站内搜索代码(http://zn.baidu.com设置并获取)','im'),\n\t\t'id' => 'baidu_search_code',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'enable_baidu_inner_hidden',\n\t\t'settings' => array(\n\t\t\t'rows' => 5\n\t\t)\n\t);\n\t/**\n\t * User Center Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('会员中心','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Enable User Center\n\t$options[] = array(\n\t\t'name' => __('开启会员中心','im'),\n\t\t'desc' => __('开启会员中心','im'),\n\t\t'id' => 'enable_user_center',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Show User module in notice district of home page\n\t$options[] = array(\n\t\t'desc' => __('首页公告栏显示会员模块','im'),\n\t\t'id' => 'user_on_notice_module',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'enable_user_center_hidden'\n\t);\n\t// User Center template\n\t$options[] = array(\n\t\t'name' => __('会员中心页面','im'),\n\t\t'desc' => __('会员中心页面','im'),\n\t\t'id' => 'user_page',\n\t\t'type' => 'select',\n\t\t'class'=> 'enable_user_center_hidden',\n\t\t'options' => $options_pages\n\t);\n\t// User secure template\n\t$options[] = array(\n\t\t'name' => __('找回密码页面','im'),\n\t\t'desc' => __('找回密码页面','im'),\n\t\t'id' => 'user_pw_page',\n\t\t'type' => 'select',\n\t\t'class'=> 'enable_user_center_hidden',\n\t\t'options' => $options_pages\n\t);\n\t// Allow User Publish Posts\n\t$options[] = array(\n\t\t'name' => __('允许用户发布文章','im'),\n\t\t'desc' => __('允许用户发布文章','im'),\n\t\t'id' => 'allow_user_post',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'enable_user_center_hidden'\n\t);\n\t// Notifications of publishing\n\t$options[] = array(\n\t\t'name' => __('新投稿时邮件通知','im'),\n\t\t'desc' => __('新投稿时邮件通知','im'),\n\t\t'id' => 'notification_of_user_post',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'enable_user_center_hidden'\n\t);\n\t// Notifications of publishing by E-mail\n\t$options[] = array(\n\t\t'name' => __('通知邮箱','im'),\n\t\t'desc' => __('通知邮箱','im'),\n\t\t'id' => 'notification_by_email',\n\t\t'type' => 'text',\n\t\t'class'=> 'notification_of_user_post_hidden'\n\t);\n\t/**\n\t * ADs District Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('广告区','im'),\n\t\t'type' => 'heading'\n\t);\n\t// List Section of Home Page Top\n\t$options[] = array(\n\t\t'name' => __('首页文章列表板块上','im'),\n\t\t'desc' => __('首页文章列表板块上','im'),\n\t\t'id' => 'ads_index_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_index_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_index_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_index_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_index_01_hidden'\n\t);\n\t// List Section of Home Page Bottom\n\t$options[] = array(\n\t\t'name' => __('首页文章列表板块下','im'),\n\t\t'desc' => __('首页文章列表板块下','im'),\n\t\t'id' => 'ads_index_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_index_02_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_index_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_index_02_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_index_02_hidden'\n\t);\n\t// Content Section of Post Page Top\n\t$options[] = array(\n\t\t'name' => __('文章页正文上','im'),\n\t\t'desc' => __('文章页正文上','im'),\n\t\t'id' => 'ads_post_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_01_hidden'\n\t);\n\t// Words AD Right After Content Section of Post Page\n\t$options[] = array(\n\t\t'name' => __('文章页正文结尾文字广告','im'),\n\t\t'desc' => __('文章页正文结尾文字广告','im'),\n\t\t'id' => 'ads_post_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('前缀','im'),\n\t\t'id' => 'ads_post_02_prefix',\n\t\t'std' => __('专业','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'ads_post_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('标题','im'),\n\t\t'id' => 'ads_post_02_title',\n\t\t'std' => __('阿里巴巴','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'ads_post_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('链接','im'),\n\t\t'id' => 'ads_post_02_link',\n\t\t'std' => 'http://www.webzgq.com',\n\t\t'type' => 'text',\n\t\t'class'=> 'ads_post_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('是否新窗口打开','im'),\n\t\t'id' => 'ads_post_02_link_blank',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'ads_post_02_hidden'\n\t);\n\t// Content Section of Post Page Bottom\n\t$options[] = array(\n\t\t'name' => __('文章页正文下','im'),\n\t\t'desc' => __('文章页正文下','im'),\n\t\t'id' => 'ads_post_03',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_03_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_03_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_03_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_03_hidden'\n\t);\n\t// Above Comments Section of Post Page\n\t$options[] = array(\n\t\t'name' => __('文章页评论上','im'),\n\t\t'desc' => __('文章页评论上','im'),\n\t\t'id' => 'ads_post_04',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_04_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_04_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_post_04_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_post_04_hidden'\n\t);\n\t// List Section of Category Page Top\n\t$options[] = array(\n\t\t'name' => __('分类页列表板块上','im'),\n\t\t'desc' => __('分类页列表板块上','im'),\n\t\t'id' => 'ads_cat_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_cat_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_cat_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_cat_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_cat_01_hidden'\n\t);\n\t// List Section of Category Page Bottom\n\t$options[] = array(\n\t\t'name' => __('分类页列表板块下','im'),\n\t\t'desc' => __('分类页列表板块下','im'),\n\t\t'id' => 'ads_cat_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_cat_02_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_cat_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_cat_02_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_cat_02_hidden'\n\t);\n\t// List Section of Tag Page Top\n\t$options[] = array(\n\t\t'name' => __('标签页列表板块上','im'),\n\t\t'desc' => __('标签页列表板块上','im'),\n\t\t'id' => 'ads_tag_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_tag_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_tag_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_tag_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_tag_01_hidden'\n\t);\n\t// List Section of Tag Page Bottom\n\t$options[] = array(\n\t\t'name' => __('标签页列表板块下','im'),\n\t\t'desc' => __('标签页列表板块下','im'),\n\t\t'id' => 'ads_tag_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_tag_02_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_tag_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_tag_02_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_tag_02_hidden'\n\t);\n\t// List Section of Search Results Page Top\n\t$options[] = array(\n\t\t'name' => __('搜索页列表板块上','im'),\n\t\t'desc' => __('搜索页列表板块上','im'),\n\t\t'id' => 'ads_search_01',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_search_01_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_search_01_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_search_01_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_search_01_hidden'\n\t);\n\t// List Section of Search Results Page Bottom\n\t$options[] = array(\n\t\t'name' => __('搜索页列表板块下','im'),\n\t\t'desc' => __('搜索页列表板块下','im'),\n\t\t'id' => 'ads_search_02',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('非手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_search_02_nm',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_search_02_hidden'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('手机端','im').' '.$ads_desc,\n\t\t'id' => 'ads_search_02_m',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'ads_search_02_hidden'\n\t);\n\t/**\n\t * Interaction Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('互动设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Gravatar Link\n\t$options[] = array(\n\t\t'name' => __('Gravatar头像获取','im'),\n\t\t'id' => 'gravatar_url',\n\t\t'std' => 'ssl',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t\t'normal' => __('原有方式', 'im'),\n\t\t\t'ssl' => __('从Gravatar官方ssl获取', 'im'),\n\t\t\t'duoshuo' => __('从多说服务器获取', 'im')\n\t\t)\n\t);\n\t// Social WEIBO\n\t$options[] = array(\n\t\t'name' => __('微博','im'),\n\t\t'desc' => __('微博','im'),\n\t\t'id' => 'weibo',\n\t\t'type' => 'text'\n\t);\n\t// Social TWITTER\n\t$options[] = array(\n\t\t'name' => __('Twitter','im'),\n\t\t'desc' => __('Twitter','im'),\n\t\t'id' => 'twitter',\n\t\t'type' => 'text'\n\t);\n\t// Social FACEBOOK\n\t$options[] = array(\n\t\t'name' => __('Facebook','im'),\n\t\t'desc' => __('Facebook','im'),\n\t\t'id' => 'facebook',\n\t\t'type' => 'text'\n\t);\n\t// Social QQ\n\t$options[] = array(\n\t\t'name' => __('QQ','im'),\n\t\t'desc' => __('QQ','im'),\n\t\t'id' => 'qq',\n\t\t'type' => 'text'\n\t);\n\t// Social WECHAT\n\t$options[] = array(\n\t\t'name' => __('微信','im'),\n\t\t'desc' => __('微信','im'),\n\t\t'id' => 'wechat',\n\t\t'std' => 'IM',\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('二维码上传(200*200)','im'),\n\t\t'id' => 'wechat_qr',\n\t\t'type' => 'upload'\n\t);\n\t// Social RSS\n\t$options[] = array(\n\t\t'name' => __('RSS订阅','im'),\n\t\t'desc' => __('RSS订阅','im'),\n\t\t'id' => 'feed',\n\t\t'std' => get_feed_link(),\n\t\t'type' => 'text'\n\t);\n\t// Comment Title\n\t$options[] = array(\n\t\t'name' => __('评论标题','im'),\n\t\t'desc' => __('评论标题','im'),\n\t\t'id' => 'comment_title',\n\t\t'std' => __('评论', 'im'),\n\t\t'type' => 'text'\n\t);\n\t// Comment Placeholder\n\t$options[] = array(\n\t\t'name' => __('评论框默认字符','im'),\n\t\t'desc' => __('评论框默认字符','im'),\n\t\t'id' => 'comment_placehoder',\n\t\t'std' => __('你说呀','im'),\n\t\t'type' => 'text'\n\t);\n\t// Comment Submit Text\n\t$options[] = array(\n\t\t'name' => __('评论提交按钮字符','im'),\n\t\t'desc' => __('评论提交按钮字符','im'),\n\t\t'id' => 'comment_submit_text',\n\t\t'std' => __('提交评论', 'im'),\n\t\t'type' => 'text'\n\t);\n\t// Comment reply notify mail with extra info\n\t$options[] = array(\n\t\t'name' => __('用户评论被回复时邮件内容附自定义信息(被回复都会邮件通知)','im'),\n\t\t'desc' => __('邮件附加信息1','im'),\n\t\t'id' => 'mail_info1',\n\t\t'std' => __('订阅'.get_bloginfo('name'),'im'),\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('邮件附加信息1链接','im'),\n\t\t'id' => 'mail_info1_link',\n\t\t'std' => get_feed_link(),\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('邮件附加信息2','im'),\n\t\t'id' => 'mail_info2',\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('邮件附加信息2链接','im'),\n\t\t'id' => 'mail_info2_link',\n\t\t'type' => 'text'\n\t);\n\t// Share Module\n\t$options[] = array(\n\t\t'name' => __('分享模块','im'),\n\t\t'desc' => __('分享模块','im'),\n\t\t'id' => 'share_module',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Share Module Code\n\t$options[] = array(\n\t\t'name' => __('分享代码','im'),\n\t\t'desc' => __('默认是百度分享代码,可以改成其他分享代码','im'),\n\t\t'id' => 'share_module_code',\n\t\t'std' => '<div class=\"bdsharebuttonbox\">\n<span>分享到:</span>\n<a class=\"bds_qzone\" data-cmd=\"qzone\" title=\"分享到QQ空间\"></a>\n<a class=\"bds_tsina\" data-cmd=\"tsina\" title=\"分享到新浪微博\"></a>\n<a class=\"bds_weixin\" data-cmd=\"weixin\" title=\"分享到微信\"></a>\n<a class=\"bds_tqq\" data-cmd=\"tqq\" title=\"分享到腾讯微博\"></a>\n<a class=\"bds_sqq\" data-cmd=\"sqq\" title=\"分享到QQ好友\"></a>\n<a class=\"bds_bdhome\" data-cmd=\"bdhome\" title=\"分享到百度新首页\"></a>\n<a class=\"bds_tqf\" data-cmd=\"tqf\" title=\"分享到腾讯朋友\"></a>\n<a class=\"bds_youdao\" data-cmd=\"youdao\" title=\"分享到有道云笔记\"></a>\n<a class=\"bds_more\" data-cmd=\"more\">更多</a> <span>(</span><a class=\"bds_count\" data-cmd=\"count\" title=\"累计分享0次\">0</a><span>)</span>\n</div>\n<script>\nwindow._bd_share_config = {\n common: {\n\t\t\"bdText\" : \"\",\n\t\t\"bdMini\" : \"2\",\n\t\t\"bdMiniList\" : false,\n\t\t\"bdPic\" : \"\",\n\t\t\"bdStyle\" : \"0\",\n\t\t\"bdSize\" : \"24\"\n },\n share: [{\n bdCustomStyle: \"'. get_stylesheet_directory_uri() .'/css/share.css\"\n }]\n}\nwith(document)0[(getElementsByTagName(\"head\")[0]||body).appendChild(createElement(\"script\")).src=\"http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion=\"+~(-new Date()/36e5)];\n</script>',\n\t\t'type' => 'textarea',\n\t\t'class'=> 'share_module_hidden',\n\t\t'settings' => array(\n\t\t\t'rows' => 10\n\t\t)\n\t);\n\t/**\n\t * Performance Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('性能选项','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Place jQuery in the bottom of site\n\t$options[] = array(\n\t\t'name' => __('jQuery底部加载','im'),\n\t\t'desc' => __('开启(可提升页面内容加载速度,但部分依赖jQuery的插件可能失效)','im'),\n\t\t'id' => 'jquery_bottom',\n\t\t'type' => 'checkbox'\n\t);\n\t// Js CDN\n\t$options[] = array(\n\t\t'name' => __('JS文件托管','im'),\n\t\t'desc' => __('JS文件是否托管','im'),\n\t\t'id' => 'js_cdn',\n\t\t'std' => 'localhost',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t\t'localhost' => __('不托管', 'im'),\n\t\t\t'baidu' => __('百度', 'im'),\n\t\t\t'offi_site' => __('框架来源站点(分别引入jquery和bootstrap官方站点JS文件)', 'im')\n\t\t)\n\t);\n\t// Thumbnails loading by ajax \n\t$options[] = array(\n\t\t'name' => __('文章缩略图异步加载','im'),\n\t\t'desc' => __('文章缩略图异步加载','im'),\n\t\t'id' => 'ajax_thumbnail',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t/**\n\t * Functionalities Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('功能设置','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Micro Categories\n\t$options[] = array(\n\t\t'name' => __('微分类','im'),\n\t\t'desc' => __('开启微分类','im'),\n\t\t'id' => 'micro_cat',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Show posts from Micro Categories in home page\n\t$options[] = array(\n\t\t'name' => __('在首页显示微分类最新文章','im'),\n\t\t'desc' => __('在首页显示微分类最新文章','im'),\n\t\t'id' => 'micro_cat_home',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox',\n\t\t'class'=> 'micro_cat_hidden'\n\t);\n\t// Micro Categories Title\n\t$options[] = array(\n\t\t'name' => __('标题(默认:今日观点)','im'),\n\t\t'desc' => __('标题(默认:今日观点)','im'),\n\t\t'id' => 'micro_cat_home_title',\n\t\t'std' => __('今日观点','im'),\n\t\t'type' => 'text',\n\t\t'class'=> 'micro_cat_hidden'\n\t);\n\t// Choose a category for micro category\n\t$options[] = array(\n\t\t'name' => __('选择分类设置为微分类','im'),\n\t\t'desc' => __('选择一个使用微分类展示模版,分类下文章将全文输出到微分类列表','im'),\n\t\t'id' => 'micro_cat_from',\n\t\t'type' => 'select',\n\t\t'class'=> 'micro_cat_hidden',\n\t\t'options' => $options_categories\n\t);\n\t// Sidebars scroll as Window scrolls for home page\n\t$options[] = array(\n\t\t'name' => __('侧栏随动','im'),\n\t\t'desc' => __('首页','im'),\n\t\t'id' => 'sidebar_scroll_index',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块','im'),\n\t\t'id' => 'sidebar_scroll_index_set',\n\t\t'std' => '1 2',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini sidebar_scroll_index_hidden'\n\t);\n\t// Sidebars scroll as Window scrolls for cat&tag&search pages\n\t$options[] = array(\n\t\t'desc' => __('分类/标签/搜索页','im'),\n\t\t'id' => 'sidebar_scroll_list',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块','im'),\n\t\t'id' => 'sidebar_scroll_list_set',\n\t\t'std' => '1 2',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini sidebar_scroll_list_hidden'\n\t);\n\t// Sidebars scroll as Window scrolls for post page\n\t$options[] = array(\n\t\t'desc' => __('文章页','im'),\n\t\t'id' => 'sidebar_scroll_post',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t$options[] = array(\n\t\t'desc' => __('设置随动模块,多个模块之间用空格隔开即可!默认:“1 2”,表示第1和第2个模块,建议最多3个模块','im'),\n\t\t'id' => 'sidebar_scroll_post_set',\n\t\t'std' => '1 2',\n\t\t'type' => 'text',\n\t\t'class'=> 'mini sidebar_scroll_post_hidden'\n\t);\n\t// Direct Link\n\t$options[] = array(\n\t\t'name' => __('直达链接','im'),\n\t\t'desc' => __('显示','im'),\n\t\t'id' => 'direct_link',\n\t\t'type' => 'multicheck',\n\t\t'options' => array(\n\t\t\t'list_article' => __('在文章列表页显示','im'),\n\t\t\t'article_article' => __('在文章页显示','im')\n\t\t)\n\t);\n\t// Direct Link Open Type\n\t$options[] = array(\n\t\t'desc' => __('新窗口打开','im'),\n\t\t'id' => 'direct_link_open_type',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Direct Link with arrtribute of nofollow\n\t$options[] = array(\n\t\t'desc' => __('链接添加nofollow','im'),\n\t\t'id' => 'direct_link_nofollow',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\t// Direct Link Title\n\t$options[] = array(\n\t\t'desc' => __('自定义显示文字,默认为:直达链接','im'),\n\t\t'id' => 'direct_link_title',\n\t\t'std' => __('直达链接','im'),\n\t\t'type' => 'text'\n\t);\n\t/**\n\t * Customizitons Settings\n\t */\n\t$options[] = array(\n\t\t'name' => __('自定义','im'),\n\t\t'type' => 'heading'\n\t);\n\t// Custom your CSS code\n\t$options[] = array(\n\t\t'name' => __('自定义CSS样式','im'),\n\t\t'desc' => __('位于&lt;/head&gt;之前,直接写样式代码,不用添加&lt;style&gt;标签','im'),\n\t\t'id' => 'cus_csscode',\n\t\t'type' => 'textarea'\n\t);\n\t// Custom codes before </head>\n\t$options[] = array(\n\t\t'name' => __('自定义头部代码','im'),\n\t\t'desc' => __('位于&lt;/head&gt;之前,这部分代码是在主要内容显示之前加载,通常是CSS样式、自定义的&lt;meta&gt;标签、全站头部JS等需要提前加载的代码','im'),\n\t\t'id' => 'head_code',\n\t\t'type' => 'textarea'\n\t);\n\t// Custom codes before </body>\n\t$options[] = array(\n\t\t'name' => __('自定义底部代码','im'),\n\t\t'desc' => __('位于&lt;/body&gt;之前,这部分代码是在主要内容加载完毕加载,通常是JS代码','im'),\n\t\t'id' => 'foot_code',\n\t\t'type' => 'textarea'\n\t);\n\t// Custom the content above copyright section in the foot of the site\n\t$options[] = array(\n\t\t'name' => __('自定义网站底部内容','im'),\n\t\t'desc' => __('该块显示在网站底部版权上方,可已定义放一些链接或者图片之类的内容。','im'),\n\t\t'id' => 'cus_foot_content',\n\t\t'type' => 'textarea'\n\t);\n\t// Custom your analytic and on\n\t$options[] = array(\n\t\t'name' => __('网站统计代码','im'),\n\t\t'desc' => __('位于底部,用于添加第三方流量数据统计代码,如:Google analytics、百度统计、CNZZ、51la,国内站点推荐使用百度统计,国外站点推荐使用Google analytics','im'),\n\t\t'id' => 'trackcode',\n\t\t'type' => 'textarea'\n\t);\n\treturn $options;\n}", "protected function adjustOptionsValues()\n {\n $this->init();\n $this->create();\n }", "function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}", "function optionsframework_options() {\n\n\t$options = array();\n\t\n\t//GENERAL\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('General', 'wpex'),\n\t\t\"type\" \t=> 'heading',\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom Logo', 'wpex'),\n\t\t\"desc\" \t=> __('Upload your custom logo.', 'wpex'),\n\t\t\"std\" \t=> '',\n\t\t\"id\" \t=> 'custom_logo',\n\t\t\"type\" \t=> 'upload',\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Notification Bar', 'att'),\n\t\t\"desc\" \t=> __('Enter your text for the notification bar.', 'att'),\n\t\t\"std\" \t=> 'This is your notification bar...you can <a href=\"#\">add a link here &rarr;</a> if you want.',\n\t\t\"id\" \t=> 'notification',\n\t\t\"type\" \t=> 'textarea',\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom Excerpt Lenght', 'wpex'),\n\t\t\"desc\" \t=> __('Enter your desired custom excerpt length.', 'wpex'),\n\t\t\"id\" \t=> 'excerpt_length',\n\t\t\"std\" \t=> '17',\n\t\t\"type\" \t=> 'text'\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('AJAX Loading Instead of Pagination?', 'wpex'),\n\t\t\"desc\" \t=> __('Check box to enable the load more button rather then generic 1,2,3 pagination.', 'wpex'),\n\t\t\"id\" \t=> 'ajax_loading',\n\t\t\"std\" \t=> '1',\n\t\t\"type\" \t=> 'checkbox',\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom WP Gallery?', 'wpex'),\n\t\t\"desc\" \t=> __('This theme outputs a custom gallery style for the WordPress shortcode, if you don\\'t like it or are using a plugin for this you can unselect the custom functionality here.', 'wpex'),\n\t\t\"id\" \t=> 'custom_wp_gallery',\n\t\t\"std\" \t=> '1',\n\t\t\"type\" \t=> 'checkbox'\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Enable Retina Support', 'wpex'),\n\t\t\"desc\"\t=> __('Check this box to enable retina support for featured images. If enabled for every cropped featured image the theme will create a second one that is retina optimized. So keep disabled to save server space.', 'wpex'),\n\t\t\"id\"\t=> 'enable_retina',\n\t\t\"std\"\t=> '0',\n\t\t\"type\"\t=> 'checkbox'\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Featured Images For Single Posts', 'wpex'),\n\t\t\"desc\"\t=> __('Check this box to enable the display of featured images in single posts.', 'wpex'),\n\t\t\"id\"\t=> 'single_thumb',\n\t\t\"std\"\t=> '1',\n\t\t\"type\"\t=> 'checkbox'\n\t);\n\t\t\n\t\n\t//HOMEPAGE\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Home', 'wpex'),\n\t\t\"type\" \t=> 'heading',\n\t);\t\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Homepage Content', 'att'),\n\t\t\"desc\" \t=> __('Use this field to add content to your homepage area right below the main slider (or instead of the slider if you aren\\'t using it) and right above the latest posts.', 'att'),\n\t\t\"std\" \t=> '',\n\t\t\"id\" \t=> 'homepage_content',\n\t\t\"type\" \t=> 'editor',\n\t);\n\t\t\t\n\t\t\n\t//Slider\n\t$options[] = array(\n\t\t\"name\" \t=> __('Slides', 'att'),\n\t\t\"type\" \t=> 'heading',\n\t);\n\t\t\t\n\t\tif ( class_exists( 'Symple_Slides_Post_Type' ) ) {\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Toggle: Slideshow', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Check this box to enable automatic slideshow for your slides.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_slideshow\",\n\t\t\t\t\"std\" \t\t=> \"true\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'true' \t\t=> 'true',\n\t\t\t\t\t'false' \t=> 'false'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Toggle: Randomize', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Check this box to enable the randomize feature for your slides.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_randomize\",\n\t\t\t\t\"std\" \t\t=> \"false\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'true' \t\t=> 'true',\n\t\t\t\t\t'false' \t=> 'false'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Animation', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Select your animation of choice.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_animation\",\n\t\t\t\t\"std\" \t\t=> \"slide\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'fade' \t\t=> 'fade',\n\t\t\t\t\t'slide' \t=> 'slide'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Direction', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Select the direction for your slides. Slide animation only & if using the <strong>vertical direction</strong> all slides must have the same height.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_direction\",\n\t\t\t\t\"std\" \t\t=> \"horizontal\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'horizontal' \t=> 'horizontal',\n\t\t\t\t\t'vertical' \t\t=> 'vertical'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t=> __('SlideShow Speed', 'att'),\n\t\t\t\t\"desc\" \t=> __('Enter your preferred slideshow speed in milliseconds.', 'att'),\n\t\t\t\t\"id\" \t=> \"slideshow_speed\",\n\t\t\t\t\"std\" \t=> \"7000\",\n\t\t\t\t\"type\" \t=> \"text\",\n\t\t\t);\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t=> __('Animation Speed', 'att'),\n\t\t\t\t\"desc\" \t=> __('Enter your preferred animation speed in milliseconds.', 'att'),\n\t\t\t\t\"id\" \t=> \"animation_speed\",\n\t\t\t\t\"std\" \t=> \"600\",\n\t\t\t\t\"type\" \t=> \"text\",\n\t\t\t);\n\t\t}\n\t\t\t\n\t\t$options[] = array(\n\t\t\t\"name\" \t=> __('Slider Alternative', 'att'),\n\t\t\t\"desc\" \t=> __('If you prefer to use another slider you can enter the <strong>shortcode</strong> here.', 'att'),\n\t\t\t\"id\" \t=> \"slides_alt\",\n\t\t\t\"std\" \t=> \"\",\n\t\t\t\"type\" \t=> \"textarea\",\n\t\t);\n\n\treturn $options;\n}", "function save_widget($instance, $new_instance, $old_instance, $widget)\n {\n }", "function save_widget($instance, $new_instance, $old_instance, $widget)\n {\n }", "public function save_settings_fields() {\n\n\t\t\tif ( isset( $_POST[ $this->setting_field_prefix ] ) ) {\n\t\t\t\tif ( ( isset( $_POST[ $this->setting_field_prefix ]['nonce'] ) ) && ( wp_verify_nonce( $_POST[ $this->setting_field_prefix ]['nonce'], 'learndash_permalinks_nonce' ) ) ) {\n\n\t\t\t\t\t$post_fields = $_POST[ $this->setting_field_prefix ];\n\n\t\t\t\t\tif ( ( isset( $post_fields['courses'] ) ) && ( ! empty( $post_fields['courses'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['courses'] = $this->esc_url( $post_fields['courses'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['lessons'] ) ) && ( ! empty( $post_fields['lessons'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['lessons'] = $this->esc_url( $post_fields['lessons'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['topics'] ) ) && ( ! empty( $post_fields['topics'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['topics'] = $this->esc_url( $post_fields['topics'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['quizzes'] ) ) && ( ! empty( $post_fields['quizzes'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['quizzes'] = $this->esc_url( $post_fields['quizzes'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $post_fields['nested_urls'] ) ) && ( ! empty( $post_fields['nested_urls'] ) ) ) {\n\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = $this->esc_url( $post_fields['nested_urls'] );\n\n\t\t\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We check the Course Options > Course Builder setting. If this is set to 'yes' then we MUST keep the nested URLs set to true.\n\t\t\t\t\t\tif ( ! isset( $this->setting_option_values['nested_urls'] ) ) {\n\t\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = 'no';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( 'yes' !== $this->setting_option_values['nested_urls'] ) {\n\t\t\t\t\t\t\t$learndash_settings_courses_builder = get_option( 'learndash_settings_courses_management_display', array() );\n\t\t\t\t\t\t\tif ( ! isset( $learndash_settings_courses_builder['course_builder_shared_steps'] ) ) {\n\t\t\t\t\t\t\t\t$learndash_settings_courses_builder['course_builder_shared_steps'] = 'no';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( 'yes' === $learndash_settings_courses_builder['course_builder_shared_steps'] ) {\n\t\t\t\t\t\t\t\t$this->setting_option_values['nested_urls'] = 'yes';\n\n\t\t\t\t\t\t\t\tlearndash_setup_rewrite_flush();\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\tupdate_option( $this->settings_section_key, $this->setting_option_values );\n\t\t\t\t}\n\t\t\t}\n\t\t}" ]
[ "0.69915545", "0.6716821", "0.66808283", "0.6677745", "0.66202074", "0.6602848", "0.6494906", "0.646696", "0.6403739", "0.6341822", "0.633675", "0.63270384", "0.6325295", "0.63135666", "0.6311957", "0.6301942", "0.62736166", "0.62450916", "0.62045175", "0.62020034", "0.62004656", "0.6185971", "0.61701196", "0.6169322", "0.61665225", "0.61621326", "0.6142852", "0.61389047", "0.61256206", "0.6122552", "0.6116993", "0.6103416", "0.6094289", "0.60885096", "0.6081796", "0.60729206", "0.6067193", "0.60584044", "0.60471684", "0.60049754", "0.59858334", "0.5974247", "0.5970085", "0.5966674", "0.59649014", "0.59643763", "0.5962281", "0.59570444", "0.59556425", "0.5954843", "0.59513044", "0.5938144", "0.5923419", "0.59134936", "0.590773", "0.59063023", "0.5896298", "0.5895321", "0.58918285", "0.5888565", "0.58876425", "0.58671117", "0.58631647", "0.5862946", "0.58579415", "0.58517134", "0.5844988", "0.58448666", "0.5844491", "0.5843406", "0.5822953", "0.58133674", "0.58123565", "0.58102083", "0.57977974", "0.579144", "0.5778165", "0.57730556", "0.57724005", "0.5770668", "0.57594156", "0.57565737", "0.5755925", "0.575439", "0.5750357", "0.5745281", "0.5738482", "0.5734676", "0.57298803", "0.57264066", "0.572057", "0.5708353", "0.57081413", "0.57081103", "0.5701432", "0.56964725", "0.5696039", "0.56897014", "0.56771094", "0.56771094", "0.566793" ]
0.0
-1
/ Before widget (defined by themes)
function widget($args, $instance) { echo $args['before_widget']; if ( has_nav_menu( $instance['sidebar_menu'] ) ) : $sidebar = array( 'theme_location' => $instance['sidebar_menu'], 'menu' => $instance['sidebar_menu'], 'walker' => new obay_sidebar_navwalker(), 'container' => false, 'items_wrap' => '<div id="obay-cssmenu"><ul>%3$s</ul></div>' ); wp_nav_menu( $sidebar ); endif; /* After widget (defined by themes). */ echo $args['after_widget']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "function pre_load_widget() {\n register_widget( 'events_widget' );\n register_widget( 'fundys_widget' );\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "function widget_setup(){\n\n\t\treturn false;\n\t}", "function before_post_widget() {\n\n\n\tif ( is_home() && is_active_sidebar( 'sidebar1' ) ) { \n\t\tdynamic_sidebar('sidebar1', array(\n\t\t\t'before' => '<div class=\"before-post\">',\n\t\t\t'after' => '</div>',\n\t\t) ); \n\t}\n\n}", "function mai_do_header_before() {\n\tif ( ! is_active_sidebar( 'header_before' ) ) {\n\t\treturn;\n\t}\n\n\t// Variable function.\n\t$header_before = function( $attributes ) {\n\t\t$attributes['class'] = 'nav-header-before';\n\t\treturn $attributes;\n\t};\n\n\t// Change the header before menu class.\n\tadd_filter( 'genesis_attr_nav-header', $header_before );\n\n\t// Before Header widget area\n\t_mai_add_widget_header_menu_args();\n\tgenesis_widget_area( 'header_before' );\n\t_mai_remove_widget_header_menu_args();\n\n\t// Remove the filter.\n\tremove_filter( 'genesis_attr_nav-header', $header_before );\n}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "public function preApplyTheme()\n {\n //...\n }", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "function udesign_front_page_slider_before() {\r\n do_action('udesign_front_page_slider_before');\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function studio_before_header_widget_area() {\n\n\tgenesis_widget_area( 'before-header', array(\n\t 'before' => '<div class=\"before-header\"><div class=\"wrap\">',\n\t 'after'\t => '</div></div>',\n\t) );\n}", "public function before(){\n parent::before();\n $this->template->content = '';\n $this->template->styles = array('main');;\n $this->template->scripts = '';\n }", "function beforeLayout() {\n }", "function udesign_footer_before() {\r\n do_action('udesign_footer_before');\r\n}", "public function after_setup_theme()\n {\n }", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "function hocwp_theme_custom_widgets_init() {\r\n\r\n}", "public function before()\n\t{\n\n\t\tparent::before();\n\t\tif ($this->auto_render) { \n\t\t\t$this->template->title = 'Hector - ';\n\t\t\t$this->template->page_description = '';\n\t\t\t$this->template->navbar = '';\n\t\t\t$this->template->content = '';\n\t\t\t$this->template->styles = array();\n\t\t\t$this->template->scripts = array();\n\t\t\t$this->template->set_focus = '';\n\t\t}\n\t\t\n\t}", "function widgets_init_now() {\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Текст вверху шапки'\n\t\t\t,'id' => 'header_top'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Несколько виджетов будут расположены в строчку. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Блок для виджета рассылки в подвале'\n\t\t\t,'id' => 'footer_mailings'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Блок контактов в подвале'\n\t\t\t,'id' => 'footer_contacts'\n\t\t\t,'description' => 'Добавьте сюда виджет \"Текст\" из левой части страницы. Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Подробнее о системе обучения в Linguamore'\n\t\t\t,'id' => 'homepage_education-feats'\n\t\t\t,'description' => 'Блок, расположенный на странице \"Преимущества\". Добавьте сюда виджет \"Rich Text\" из левой части страницы. Иконки можно добавить кнопкой \"Add Media\". Названия виджетов на сайте не отобразятся'\n\t\t) );\n\t}", "function udesign_single_portfolio_entry_before() {\r\n do_action('udesign_single_portfolio_entry_before');\r\n}", "public function before() {\n parent::before();\n $this->template->title = 'My Own CMS (MOC)';\n $this->template->js = View::factory('partial/js')\n ->set('scripts', $this->check_js($this->_JS_));\n $this->template->css = View::factory('partial/css')\n ->set('styles', $this->check_css($this->_CSS_));\n $this->template->meta_tag = View::factory('partial/meta_tag');\n $this->template->icon = '/tdesign/assets/images/favicon.ico';\n }", "function beforeFilter() {\n\t\t$this->plugin = 'aqueous';\n\t\t$this->passedArgs = array_merge(array('layout'=>'default', 'theme'=>null), $this->passedArgs);\n\t}", "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "function darksnow_widgets_init() {\n\n\t\n\t\n\t\n}", "function dl_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Página de Contacto',\n\t\t'id'\t\t\t=> 'contact-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Barra Lateral',\n\t\t'id'\t\t\t=> 'sidebar-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Search Menu',\n\t\t'id'\t\t\t=> 'menu-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\n}", "function beforeRender()\n\t{\n\t}", "function cera_grimlock_preheader_callback() {\n\t\tcera_grimlock_widget_areas( 'preheader', 4 );\n\t}", "function child_theme_setup_before_parent() {\n}", "function cera_grimlock_homepage_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" tabindex=\"-1\">\n\t\t<?php\n\t}", "function onBeforeRender()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\tif($app->isAdmin()) return true;\n\t\t$doc = JFactory::getDocument();\n\t\tif($doc->getType() != 'html') return true;\n\t\t$content = $this->params->get('headtags');\n\t\t$config = JFactory::getConfig();\n\t\t$content = str_replace('%SITENAME%',$config->get( 'sitename' ),$content);\n\t\tJFactory::getDocument()->addCustomTag(PHP_EOL.'<!-- { gjheqadtag insert -->'.PHP_EOL.$content.PHP_EOL.'<!-- gjheqadtag insert } -->'.PHP_EOL);\n\t}", "public static function init () : void\n {\n add_action(\"widgets_init\", function ()\n {\n self::unregister_widget();\n self::register_widget();\n self::register_sidebar();\n });\n }", "function ourWidgetsInit(){\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Sidebar',\n\t\t\t'id' => 'sidebar1',\n\t\t\t'before_widget' => '<div class=\"widget-item\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4 class=\"my-special-class\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 1',\n\t\t\t'id' => 'footer1'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 2',\n\t\t\t'id' => 'footer2'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 3',\n\t\t\t'id' => 'footer3'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 4',\n\t\t\t'id' => 'footer4'\n\t\t));\n\t}", "function widget_init() {\n if ( function_exists('register_sidebar') )\n \n register_sidebar(\n array(\n 'name' => 'Footer',\n 'before_widget' => '<div class = \"footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '',\n 'after_title' => '',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Event Navigation',\n 'before_widget' => '<div class=\"custom-widget top-round card slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n register_sidebar(\n array(\n 'name' => 'Frontpage News',\n 'before_widget' => '<div class=\"custom-widget card top-round slight-shadow card_container flex-column-reverse\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"card_title\">',\n 'after_title' => '</div>',\n ));\n\n }", "public function before_shop_loop_starts_wrapper() {\n\t\t\t?>\n\t\t\t\t<div class=\"ast-shop-toolbar-container\">\n\t\t\t<?php\n\t\t}", "public function addWidget()\r\n {\r\n }", "function ourWidgetsInit(){\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"my-special-class\">',\n 'after_title' => '</h4>'\n\n ));\n}", "public static function init()\n {\n add_action( 'widgets_init', array(__CLASS__, 'register') );\n }", "private function setup_actions() {\n\n add_action('wp_head', array( &$this, 'addWidgetStyles' ) );\n\n }", "protected function _beforeToHtml(){\n\t\tif($this->getType()==\"featured/widget\")\n\t\t{\n\t\t\t$this->setWidgetOptions();\n\t\t}\n $this->setProductCollection($this->_getProductCollection());\n\t}", "function elodin_jobs_add_widget_area_before_genesis() {\n if ( !is_singular( 'jobs' ) )\n return;\n \n\tgenesis_widget_area( 'before-single-job', array(\n 'before' => '<div class=\"jobs-widget-wrap-before\">',\n 'after' => '</div>', \n\t) );\n}", "protected function onBeforeRender() : void\n {\n }", "function ShopNowWidget() {\n\t\tparent::__construct( false, 'Shop Now Widget' );\n\t}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "protected function _renderFiltersBefore()\n {\n parent::_renderFiltersBefore();\n }", "public function before_widget( $args, $instance ) {\n\n\t\t$title = $this->widget_title( $instance );\n\n\t\techo $args['before_widget'];\n\t\tif ( $title ) {\n\t\t\techo $args['before_title'] . $title . $args['after_title'];\n\t\t}\n\t}", "function anva_content_before_default() {\n\t?>\n\t<div class=\"sidebar-layout\">\n\t<?php\n}", "public function preinit()\n\t{\n\t\t//\tCreate our internal name\n\t\tCPSHelperBase::createInternalName( $this );\n\n\t\t//\tAttach our default Behavior\n\t\t$this->attachBehavior( 'psWidget', 'pogostick.behaviors.CPSWidgetBehavior' );\n\t}", "function hybrid_get_utility_before_content() {\n\tget_sidebar( 'before-content' );\n}", "public function before_render() {}", "function widget_wrap()\n{\n\tregister_widget('ag_pag_familie_w');\n\tregister_widget('ag_social_widget_container');\n\tregister_widget('ag_agenda_widget');\n}", "function before_block( $instance ) {\n\t\t}", "public function beforeRender() {\n\t\t$this->Html->script('/dximagebox/js/jquery.fancybox-1.3.4', array('inline' => false));\n\t\t$this->Html->script('/dximagebox/js/jquery.mousewheel-3.0.4.pack', array('inline' => false));\n\t\t$this->Html->script('/dximagebox/js/jquery.easing-1.3.pack', array('inline' => false));\n\t\t$this->Html->css('/dximagebox/css/jquery.fancybox-1.3.4', null, array('inline' => false)); \n\t\t\n }", "public function onPreRender($param)\n\t{\n\t\tparent::onPreRender($param);\n\t\t$this->getPage()->getClientScript()->registerPradoScript('jqueryui');\n\t\t$this->publishJuiStyle(self::BASE_CSS_FILENAME);\n\t}", "function copyright_load_widget() {\n register_widget( 'copyright_widget' );\n}", "function ois_load_widgets() {\r\n register_widget( 'OptinSkin_Widget' );\r\n}", "function err_override_woocommerce_widgets() {\r\n\r\n if ( class_exists( 'WC_Widget_Layered_Nav' ) ) {\r\n\r\n unregister_widget( 'WC_Widget_Layered_Nav' );\r\n\r\n include_once( 'inc/custom-wc-widget-layered-nav.php' );\r\n\r\n register_widget( 'Custom_WC_Widget_Layered_Nav' );\r\n }\r\n\r\n}", "protected function _beforeToHtml()\n\t{\n\t\tif (!$this->getTemplate()) {\n\t\t\t$this->setTemplate('FishPig_WordPress::sidebar/widget/categories.phtml');\n\t\t}\n\n\t\treturn parent::_beforeToHtml();\n\t}", "function add_widget_specific_settings() {\n\t\treturn false;\n\t}", "private function initializeWidgetContext() {}", "function _wp_admin_html_begin()\n {\n }", "function cera_grimlock_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" <?php cera_grimlock_content_class( array( 'site-content', 'region' ) ); ?> tabindex=\"-1\">\n\t\t\t<div class=\"region__container\">\n\t\t\t\t<div class=\"region__row\">\n\t\t<?php\n\t}", "function yellow_widgets_init() {\n\n\tregister_sidebar( array(\n\t 'name' => 'Sidebar',\n\t 'id' => 'sidebar',\n\t 'before_widget' => '<div class=\"media-body\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<div class=\"card-header\">',\n\t 'after_title' => '</div>',\n\t));\n\tregister_sidebar( array(\n\t\t'name' => 'Footer',\n\t\t'id' => 'footer',\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t ));\n\t\n \n }", "function onReady() {\n\t\t$this->text = $this->config->text;\n\t\tif (empty($this->text))\n\t\t\t$this->text = \"initial settings| set this widget | /admin set headsup\";\n\t\t\n\t\t$this->url = $this->config->url;\n\t\tif (empty($this->url))\n\t\t\t$this->url = \"\";\n\t\t\n\t\t$this->width = $this->config->width;\n\t\tif (empty($this->width))\n\t\t\t$this->width = 50;\n\t\t\n\t\t$this->pos = $this->config->pos;\n\t\tif (empty($this->pos))\n\t\t\t$this->pos = \"80,-85\";\n\t\t\n\t\tforeach ($this->storage->players as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t\tforeach ($this->storage->spectators as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t}", "public function postApplyTheme()\n {\n //...\n }", "function abc_load_widget()\n{\n register_widget('awesome_bmi_widget');\n}", "function tabber_tabs_plugin_init() {\n\n\t// Loads and registers the new widget.\n\tadd_action( 'widgets_init', 'tabber_tabs_load_widget' );\n\n\t// Add Javascript if not admin area. No need to run in backend.\n\tif ( !is_admin() ) {\n\t\t\n\t};\n\n\t// Hide Tabber until page load \n\tadd_action( 'wp_head', 'tabber_tabs_temp_hide' );\n\t\t\n\t// Load css \n\tadd_action( 'wp_head', 'tabber_tabs_css' );\n\t\n}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t\t//\n\t\t$this->view->title = \"Codini\";\n\t}", "function whichet_load_widget() {\n\tregister_widget( 'WHICHet_widget' );\n\tadd_action( 'wp_enqueue_script', 'WHICHet_scripts' );\n}", "protected function runBeforeRender() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "function arphabet_widgets_init() {\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'name' => 'Counter',\n\t\t\t'id' => 'counter_1',\n\t\t\t'before_widget' => '<div class=\"csc_box\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h2 class=\"csc_title\">',\n\t\t\t'after_title' => ' <i class=\"fa fa-users\"></i></h2>'\n\t\t)\n\t);\n}", "function ccac_2020_new_widgets_init() {\n /* Pinegrow generated Register Sidebars Begin */\n\n /* Pinegrow generated Register Sidebars End */\n}", "function pb18_article_also_widget() {\n register_widget( 'pb18_article_also_widget' );\n}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public function init(){\n /*you can set initial default values and other stuff here.\n * it's also a good place to register any CSS or Javascript your\n * widget may need. */ \n }", "public function on_before_render()\n {\n // (If you want to load js/css only for one action, put the addHeaderItem/addFooterItem call in that action's method instead)\n //DEV NOTE: we use \"on_before_render()\" instead of \"on_page_view()\" (on_page_view only works in block controllers [??])\n $hh = Loader::helper('html');\n $this->addHeaderItem($hh->css('dashboard.css', 'immo'));\n $this->addFooterItem($hh->javascript('dashboard.js', 'immo'));\n }", "public function beforeRender() {\r\n\t}", "function hw_load_widget() {\n\tregister_widget( 'hw_cal_widget' );\n\tregister_widget( 'hw_custom_post_list_widget' );\n}", "public function beforeRender() {\n\t\t$this->helpers = array();\n\t}", "function wpb_load_widget() {\n register_widget( 'recent_post_widget' );\n }", "function kcsite_widgets_init() {\t\t\t\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Left sidebar', 'kcsite' ),\n\t\t\t'id' => 'sidebar-l',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => '</aside>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t));\t\t\n\t\tregister_sidebar( array(\n\t\t\t'name' => __( 'Right sidebar', 'kcsite' ),\n\t\t\t'id' => 'sidebar-r',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget clearfix %2$s\">',\n\t\t\t'after_widget' => \"</aside>\",\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>',\n\t\t));\n/*\n\t\tregister_sidebar( array(\n\t\t\t'name' => __('Banners Before Footer', 'kcsite'),\n\t\t\t'id' => 'sidebar-banners-before-footer',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s help-inline\">',\n\t\t\t'after_widget' => \"</aside>\",\n\t\t\t//'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t//'after_title' => '</h3>',\n\t\t) );*/\n\t}", "public function before_the_title() {\n\t\techo '<div class=\"fusion-events-before-title\">';\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "public function widgets(){\n\t\t//register_widget(\"sampleWidget\");\n\t}", "function hotpro_load_widget() {register_widget( 'data_hotpro_widget' );}", "function header_widgets_init() {\r\n\r\n\tregister_sidebar( array(\r\n\t\t'name' => 'Header Widget',\r\n\t\t'id' => 'header_widget',\r\n\t\t'before_widget' => '<div class=\"header-widget\">',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '',\r\n\t\t'after_title' => '',\r\n\t) );\r\n\r\n}", "function widget($args, $instance){\n\t\t\n\t\textract($args);\n\t\techo $before_widget;\n\t\tbd_custom_tabs();\n\t\techo $after_widget;\n\t\n\t}", "function ecll_load() {\n\tadd_action( 'elementor/widgets/widgets_registered', 'ecll_register_elementor_widgets' );\n\tadd_action( 'elementor/frontend/after_register_scripts', 'ecll_widget_scripts' );\n}", "protected function beforeRender() \r\n {\r\n parent::beforeRender();\r\n \r\n // Set add layout\r\n $this->setLayout('add');\r\n }", "function cera_grimlock_before_site() {\n\t\tdo_action( 'grimlock_loader' );\n\t\tdo_action( 'grimlock_vertical_navigation' );\n\t}", "public function _register_widgets()\n {\n }", "function gp_get_default_widget_params() {\n return array(\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n //'before_title' => '<div class=\"decoration\"></div><h1 class=\"widget-title\">',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>'\n );\n}", "function genesisawesome_custom_widgets() {\n\n\t/* Unregister Header Right widget area */\n\tunregister_sidebar( 'header-right' );\n\n\t/* Register Custom Widgets */\n\tregister_widget( 'GA_Facebook_Likebox_Widget' );\n\tregister_widget( 'GA_Flickr_Widget' );\n\n}", "function MyPenandPantry_WidgetInit()\n{\n\tregister_sidebar(array(\n\t\t'name' => 'Social-icon-bar',\n\t\t'id' => 'sidebar1',\n\t\t'before_widget' => '<div class=\"widget-item\">',\n\t\t'after_widget' => '</div>'\n\t));\n}", "public function before_main_content() {\n\t?>\n\n\t\t<div id=\"bbp-container\">\n\t\t\t<div id=\"bbp-content\" role=\"main\" class='skeleton auto-align'>\n\n\t<?php\n\t}", "function wp_widget_control($sidebar_args)\n {\n }", "public function __parentBeforeRender() {\r\n\t\treturn parent::beforeRender();\t\t\r\n\t}", "function replace_widjets_content() {\n remove_action( 'widgets_init', 'envo_storefront_widgets_init' );\n}", "function SetWidget() {\n\t\t\n\t\t\tif ( !function_exists('register_sidebar_widget') ) \n\t\t\treturn;\n\t\t\t\n\t\t\t// This registers our widget so it appears with the other available\n\t\t\t// widgets and can be dragged and dropped into any active sidebars.\n\t\t\tregister_sidebar_widget(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteo'));\n\t\t\n\t\t\t// This registers our optional widget control form.\n\t\t\tregister_widget_control(array('3B Meteo', 'widgets'), array(\"TreBiMeteo\",'WidgetMeteoControl'), 450, 325);\n\t\t}" ]
[ "0.71269685", "0.6990116", "0.697852", "0.6823474", "0.67799467", "0.67696595", "0.6762169", "0.66672915", "0.66640043", "0.6642193", "0.660067", "0.6595814", "0.65943813", "0.6520567", "0.65002906", "0.64750075", "0.6416324", "0.6395455", "0.6360453", "0.6345676", "0.6340109", "0.6332797", "0.63132304", "0.63055885", "0.62729317", "0.62630314", "0.6225941", "0.6213371", "0.6209783", "0.61887056", "0.6172966", "0.61666805", "0.6163312", "0.61540663", "0.61472446", "0.6110796", "0.6096733", "0.60896075", "0.6082252", "0.60821724", "0.6081157", "0.60797215", "0.60766983", "0.60724455", "0.6062953", "0.60594153", "0.605785", "0.60548556", "0.60511583", "0.6048325", "0.60357434", "0.6035473", "0.6027454", "0.6024887", "0.60248333", "0.59908503", "0.5989877", "0.5988887", "0.5986252", "0.5985739", "0.5982307", "0.5957861", "0.5955656", "0.59504163", "0.59443194", "0.59405255", "0.593398", "0.592313", "0.5917595", "0.59125924", "0.5906872", "0.59027827", "0.5901283", "0.590037", "0.58929026", "0.58874744", "0.58691347", "0.5865392", "0.58653027", "0.58558035", "0.58454233", "0.58409595", "0.5836251", "0.5836176", "0.5833778", "0.5833778", "0.5828334", "0.58279955", "0.58179224", "0.581767", "0.5815132", "0.58113295", "0.580999", "0.5807561", "0.58049494", "0.5804767", "0.58046263", "0.58024377", "0.5801405", "0.57909864", "0.57891464" ]
0.0
-1
May be altered by another class
public function setUpOnce($class) { $isAltered = false; $this->extensionsToReapply = []; $this->extensionsToRemove = []; /** @var string|SapphireTest $class */ /** @var string|DataObject $dataClass */ // Remove any illegal extensions that are present foreach ($class::getIllegalExtensions() as $dataClass => $extensions) { if (!class_exists($dataClass ?? '')) { continue; } if ($extensions === '*') { $extensions = $dataClass::get_extensions(); } foreach ($extensions as $extension) { if (!class_exists($extension ?? '') || !$dataClass::has_extension($extension)) { continue; } if (!isset($this->extensionsToReapply[$dataClass])) { $this->extensionsToReapply[$dataClass] = []; } $this->extensionsToReapply[$dataClass][] = $extension; $dataClass::remove_extension($extension); $isAltered = true; } } // Add any required extensions that aren't present foreach ($class::getRequiredExtensions() as $dataClass => $extensions) { if (!class_exists($dataClass ?? '')) { throw new LogicException("Test {$class} requires dataClass {$dataClass} which doesn't exist"); } foreach ($extensions as $extension) { $extension = Extension::get_classname_without_arguments($extension); if (!class_exists($extension ?? '')) { throw new LogicException("Test {$class} requires extension {$extension} which doesn't exist"); } if (!$dataClass::has_extension($extension)) { if (!isset($this->extensionsToRemove[$dataClass])) { $this->extensionsToRemove[$dataClass] = []; } $this->extensionsToRemove[$dataClass][] = $extension; $dataClass::add_extension($extension); $isAltered = true; } } } // clear singletons, they're caching old extension info // which is used in DatabaseAdmin->doBuild() Injector::inst()->unregisterObjects([ DataObject::class, Extension::class ]); // If we have altered the schema, but SapphireTest::setUpBeforeClass() would not otherwise // reset the schema (if there were extra objects) then force a reset if ($isAltered && empty($class::getExtraDataObjects())) { DataObject::reset(); $class::resetDBSchema(true, true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function modify();", "public function inOriginal();", "abstract public function set();", "abstract public function change();", "abstract protected function update ();", "function modified() { $this->_modified=1; }", "function modified() { $this->_modified=1; }", "protected function setFrom() {}", "protected function __clone(){}", "protected function __init__() { }", "static function alter() {\n }", "public function __init(){}", "private function __() {\n }", "protected function update() {}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "protected function fixSelf() {}", "protected function fixSelf() {}", "protected function __clone()\n {\n\n }", "protected function __clone()\n {\n }", "protected function __clone()\n {\n \n }", "protected function __clone()\n {\n }", "protected function __clone()\n {\n }", "protected function __clone()\n {\n }", "protected function __clone()\n {\n }", "protected function __clone() { }", "private function __clone() \r\n { \r\n }", "final private function __construct(){\r\r\n\t}", "private function __clone() {\r\n\r\n }", "protected function __construct(){}", "protected function __construct(){}", "protected function __construct(){}", "protected function __clone() {\n \n }", "private function __clone()\r\n {\r\n }", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function __clone() {}", "protected function _update()\n\t{\n\t}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __clone() {\r\n \r\n }", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __construct()\t{}", "public function mutate();", "public function mutate();", "private function __clone()\n {\n }", "private function __clone()\n {\n }", "private function __clone(){\n\n }", "abstract protected function setMethod();", "public function __clone()\n { \n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR); \n }", "final public function __clone()\n {\n $this->aliased = false;\n }", "private function __clone()\n\t{\n\n\t}", "private function __clone()\n\t{\n\n\t}", "private function __clone()\n {\n \n }", "private function __clone()\n {\n \n }", "private function __clone()\r\n {\r\n // ...\r\n }", "private function __clone() {\r\n }", "private function __clone()\n {\n\n }", "private function __clone()\n {\n\n }", "private function __clone()\n {\n\n }", "private function __clone()\n {\n\n }", "private function __clone() {\n \n }", "private function __clone() {\n \n }", "private function __clone()\n\t{\n\t}", "private function __clone()\n\t{\n\t}", "private function __clone(){ }", "public function __clone()\n {\n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n\n }", "private function __construct() {\r\n\t\t\r\n\t}", "private function __clone() {\r\n\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __clone()\n {\n }", "private function __clone()\n {\n }" ]
[ "0.6535439", "0.649488", "0.6466413", "0.646512", "0.63473636", "0.63042283", "0.63042283", "0.62910825", "0.6284985", "0.6265124", "0.6235355", "0.6187483", "0.61641514", "0.61572814", "0.61459506", "0.61459506", "0.6112913", "0.6112913", "0.6108745", "0.60844857", "0.6080266", "0.60629684", "0.60629684", "0.60629684", "0.60629684", "0.6044643", "0.6043792", "0.6031276", "0.6031061", "0.602927", "0.602927", "0.602927", "0.60268176", "0.60242414", "0.6004313", "0.6004313", "0.6004313", "0.6004313", "0.6004313", "0.6004313", "0.6004313", "0.6001969", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.60004926", "0.5995032", "0.5986257", "0.5986257", "0.5986257", "0.5986257", "0.5986257", "0.5986257", "0.5986257", "0.5986257", "0.5986257", "0.5986257", "0.5986257", "0.59741396", "0.5962739", "0.5962739", "0.5954701", "0.5954701", "0.59501624", "0.594614", "0.59428287", "0.5940701", "0.59370595", "0.59370595", "0.5929796", "0.5929796", "0.59275395", "0.5926554", "0.59130126", "0.59130126", "0.59130126", "0.59130126", "0.5908093", "0.5908093", "0.5903333", "0.5903333", "0.5900738", "0.5889721", "0.5884185", "0.58760345", "0.5868451", "0.5862862", "0.5862862" ]
0.0
-1
Return a successful response with an empty body.
protected function respondNoContent() { return response()->make('', Response::HTTP_NO_CONTENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function emptyResponse()\n {\n return new ServerResponse(['ok' => true, 'result' => true], null);\n }", "protected function getApiEmptyResponse()\n {\n return new Response(\n '',\n 204\n );\n }", "public function responseNoContent()\n {\n $this->response = $this->laravelResponse->setStatusCode(204);\n return $this->respond();\n }", "public function __invoke(): Response\n {\n return new Response('', Response::HTTP_NO_CONTENT);\n }", "public function noContent()\n {\n return Response::json(null, FoundationResponse::HTTP_NO_CONTENT);\n }", "public function noContent() {\n return $this->simpleResponse(null, Codes::HTTP_NO_CONTENT);\n }", "public static function NoError():self {\n\t\treturn new Response('ok', 0, true);\n\t}", "protected function create204Response()\n {\n return $this->createSimpleResponse(204, '');\n }", "public function noContent()\n {\n return response()->json([], 204);\n }", "protected function noContent(): JsonResponse\n {\n return $this->setStatusCode(204)->respond();\n }", "public function s204() { self::respondWithJSON('', 204); }", "public function index(): Response\n {\n return new Response('', Response::HTTP_OK);\n }", "protected function noContent()\n {\n $this->response = $this->response->withStatus(204);\n }", "public function withNoContent()\n {\n return $this->setStatusCode(\n HttpStatus::HTTP_NO_CONTENT\n )->json();\n }", "function noContent() {\n header('HTTP/1.0 204 No Content');\n }", "public function empty_response(){\r\n $response['status']=502;\r\n $response['error']=true;\r\n $response['message']='No empty field';\r\n return $response;\r\n }", "public function empty_response(){\n $response['status']=502;\n $response['error']=true;\n $response['message']='Field tidak boleh kosong!';\n return $response;\n }", "public static function getNullResponse(): Response {\n return new Response(new NoCacheControl(), null);\n }", "function testEmptyResponseBody() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t// Get the test page.\n\t$http = new \\AutoHttp\\Http($config);\n\t$page = $http->getPage($root .'/test/pages/http/headersonly.php');\n\t\n\t// Validate basic return structure.\n\tif (!validateResponse($page))\n\t\treturn 'Result array was in a bad format.';\n\t\n\t// Check the test header content.\n\tif (!array_key_exists('X-HttpTestHeader', $page['headers']))\n\t\treturn 'Test header doesn\\'t exist.';\t\t\n\tif ($page['headers']['X-HttpTestHeader'] != 'servertestval')\n\t\treturn 'Test header value wasn\\'t what we were expecting.';\n\t\t\n\t// Check the raw headers.\n\tif (count($page['headersRaw']) < 1 || strpos($page['headersRaw'][0], '200 OK') === false)\n\t\treturn 'Raw headers should contain the HTTP response code.';\n\t\t\n\t// Make sure the body is empty.\n\tif (strlen($page['body']) !== 0)\n\t\treturn 'Response body length should be 0.';\n\t\t\n\treturn true;\n}", "public function empty_response(){\r\n $response['status']=502;\r\n $response['error']=true;\r\n $response['message']='Field tidak boleh kosong';\r\n return $response;\r\n }", "public function testEmptyResponse()\n {\n $configStub = $this->createMock(ReCaptchaConfigV2::class);\n\n // Configure the stub.\n $configStub->method('isServiceEnabled')\n ->willReturn(true);\n\n $testJson = null;\n\n $clientStub = $this->createMock(GuzzleRequestClient::class);\n $clientStub->method('post')\n ->willReturn($testJson);\n\n $_service = new GoogleReCaptchaV2Service($configStub, $clientStub);\n $service = new GoogleReCaptchaV2($_service);\n\n $response = $service->verifyResponse(null);\n $this->assertEquals(false, $response->isSuccess());\n }", "public function create()\n {\n return $this->sendSuccessResponse([]);\n }", "public function clearResponse()\n {\n $this->responseContent = '';\n $this->responseHeader = array();\n $this->responseCode = '200 Ok';\n }", "public function testFromNoContentResponse() : void {\n $this->assertEmpty(Result::fromResponse(Response::fromName(\"no content\"))->toArray());\n }", "public static function sendOkResponse(){\n http_response_code(200);\n die();\n }", "private function notFoundResponse() {\r\n $response['status_code_header'] = HTTP_NOT_FOUND;\r\n $response['body'] = null;\r\n return $response;\r\n }", "public function test_WhenBasicRequest_Expect_Response200()\n {\n $response = $this->get('/');\n\n $this->assertEquals(200, $this->response->status());\n }", "protected function _getNewEmptyResponse()\n\t{\n\t\treturn $this->_getNewSdkInstance('Radial_RiskService_Sdk_Response');\n\t}", "public function create()\n {\n return \\Response::json('Not Implemented', 501);\n }", "protected function buildResponse()\n {\n $response = new Response('', 204);\n\n return $this->addHeaders($response, true );\n }", "public function reset()\n {\n try {\n $this->resetBiz->reset();\n return $this->createResponse(Response::HTTP_OK, 'OK');\n } catch (\\Exception $ex) {\n return $this->createResponse(Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "public function get() {\r\n $this->response->setData(1);\r\n $this->response->setHeader('__OK', Http::Response(Http::OK));\r\n return TRUE;\r\n }", "private function resetReponse()\n {\n $this->app->singleton(\"response\", function () {\n return new Response();\n });\n }", "protected function buildEmptyResponse($headers = [], $options = 0)\n {\n $headers = array_merge($headers, $this->headers);\n\n $statusCode = $this->statusCode ? \n $this->statusCode : \n 204;\n\n $response = new JsonResponse([], $statusCode, $headers, $options);\n\n return $response;\n }", "public function testReturnEmptyResponse(): void\n {\n $repository = $this->prepareRepository(new stdClass());\n\n $this->assertEmpty(\n $repository->findForCamp(self::CAMP_ID),\n );\n }", "public function response ();", "public function create()\n {\n return response(null, 404);\n }", "public function response($result, $request)\n {\n return $this->respondWithNoContent();\n }", "private function notFoundResponse(){\n \n $response['status_code_header'] = 'HTTP/1.1 404 Not Found';\n $response['body'] = null;\n return $response;\n }", "protected static function apiResponseCreatedNoData($message) {\n self::setStatusCode(Response::HTTP_CREATED);\n return self::apiResponse([\n 'status' => 'success',\n 'status_code' => self::getStatusCode(),\n 'message' => $message\n ]);\n }", "public function test_example_empty()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }", "public static function status204($data=null) {\n\t\tself::response($data,204);\n\t}", "public function processResponse(array $jsonResponse): IResponse\n {\n return new EmptyResponse();\n }", "public function toResponse($request)\n\t{\n\t\treturn new Response($this->message, 204);\n\t}", "public function youCanOmitStatusCode()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n $meta = [\n 'foo' => 'bar'\n ];\n\n // Act...\n $response = $this->responder->success( $fruit, $meta );\n\n // Assert...\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertContains( $meta, $response->getData( true ) );\n }", "public function health(): Response\n {\n $response = new Response();\n $response->setStatusCode(Response::HTTP_OK);\n $response->headers->set('Content-Type', 'text/html');\n\n return $response;\n }", "protected function not_yet_response() {\n\t\t$error = new error( 'not-implemented-yet', __( 'Route Not Yet Implemented :(', 'your-domain' ) );\n\t\treturn new response( $error, 501, [] );\n\t}", "public static function buildOkResponse(): static\n {\n $dto = new static();\n $dto->setCode(Response::HTTP_OK);\n $dto->setSuccess(true);\n $dto->setMessage(self::MESSAGE_OK);\n\n return $dto;\n }", "public function method(?Request $request = null): Response\n {\n return new Response();\n }", "public function index()\n {\n return $this->sendNotFoundResponse();\n }", "public function It_should_be_able_to_fallback_to_no_deflation()\n\t{\n\t\t$response = $this->buildResponse( 200, 'Hello world!', 'superzip' );\n\t\t\n\t\t$this->assertEquals( 200, $response[ 0 ] );\n\t\t$this->assertEquals( array( 'Vary' => 'Accept-Encoding' ), $response[ 1 ] );\n\t\t$this->assertEquals( array( 'Hello world!' ), $response[ 2 ] );\n\t}", "public static function response(): Response\n {\n return new Response;\n }", "public function logout()\n {\n auth('api')->logout();\n\n return $this->response->noContent();\n }", "public function response();", "protected function statusCodeSuccess(): int\n {\n return 204;\n }", "private function _notimplemented(): Response\n {\n return new Response([\n 'errors' => [[\n 'status' => 501,\n 'title' => 'Not Implemented',\n 'detail' => 'This operation has not been implemented',\n ]],\n ], 501);\n }", "public function testNoResult()\n {\n $this->mock(AlphaVantageApiService::class, function ($mock) {\n return $mock->shouldReceive('querySymbol')\n ->once()\n ->andReturn(new \\GuzzleHttp\\Psr7\\Response(\n Response::HTTP_OK,\n [],\n '{\n \"Global Quote\": {}\n }'\n ));\n });\n\n $response = $this->get('api/stock-quotes?symbol=123');\n $response->assertStatus(Response::HTTP_OK);\n $response->assertExactJson([]);\n }", "public function assertNoContent($status = 204): self\n {\n $this->assertStatus($status);\n\n PHPUnit::assertEmpty($this->getResponseContent(), 'Response content is not empty.');\n\n return $this;\n }", "public function indexAction()\n {\n //====================================================================//\n // Return Dummy Response\n return new JsonResponse(array('result' => 'Ok'));\n }", "public function index()\n {\n return \\Response::json('Not Implemented', 501);\n }", "protected function success()\n {\n $this->response = $this->response->withStatus(200);\n $this->jsonBody($this->payload->getOutput());\n }", "public function index(){\n return response('', 200);\n }", "public function testEmptyContentType()\n {\n\n $config = ['accepts' => ['text/html']];\n $response = m::mock(Response::class);\n $headers = m::mock(stdClass::class);\n $response->headers = $headers;\n $request = m::mock(Request::class);\n $app = m::mock(ApplicationContract::class);\n\n /*\n |------------------------------------------------------------\n | Expectation\n |------------------------------------------------------------\n */\n\n $response\n ->shouldReceive('isRedirection')->andReturn(false)\n ->shouldReceive('getStatusCode')->andReturn(500)\n ->shouldReceive('getContent')\n ->shouldReceive('setContent');\n $headers->shouldReceive('get')->with('Content-type')->andReturn(null);\n $request->shouldReceive('ajax')->andReturn(false);\n $tracy = new Tracy($config, $app, $request);\n $excepted = $tracy->renderResponse($response);\n\n /*\n |------------------------------------------------------------\n | Assertion\n |------------------------------------------------------------\n */\n\n $this->assertSame($excepted, $response);\n }", "protected function deleted()\n {\n $this->response = $this->response->withStatus(204);\n $this->jsonBody($this->payload->getOutput());\n }", "public function logout() {\r\n $this->response()->setBody('OK'); \r\n }", "protected function successfulResponse(){\n return response()->json([\n 'ResultCode'=> 0,\n 'ResultDesc'=>'Transaction completed successfully',\n 'ThirdPartyTransID' => 1\n ]);\n\n }", "public function testInvokeNoModifyNonHtmlResponse()\n {\n $request = new ServerRequest([\n 'url' => '/articles',\n 'environment' => ['REQUEST_METHOD' => 'GET'],\n ]);\n $response = new Response([\n 'statusCode' => 200,\n 'type' => 'text/plain',\n 'body' => 'OK',\n ]);\n\n $handler = $this->handler();\n $handler->expects($this->once())\n ->method('handle')\n ->willReturn($response);\n $middleware = new DebugKitMiddleware();\n $result = $middleware->process($request, $handler);\n $this->assertInstanceOf(Response::class, $result, 'Should return a response');\n\n $requests = $this->getTableLocator()->get('DebugKit.Requests');\n $total = $requests->find()->where(['url' => '/articles'])->count();\n\n $this->assertSame(1, $total, 'Should track response');\n $body = (string)$result->getBody();\n $this->assertSame('OK', $body);\n }", "public function __construct()\n {\n return response([],400);\n }", "public function prefillBaseFieldsForSuccessResponse(): void\n {\n $this->setCode(Response::HTTP_OK);;\n $this->setSuccess(true);\n }", "public function create()\n {\n return $this->makeJSONResponse(true, 'This endpoint is not implemented', [], []);\n }", "function response() {\n return new Response;\n }", "public function createNotFoundResponse()\n {\n return $this->createErrorResponse('Not found', 404);\n }", "private function respond()\n {\n $this->response->header('Content-Type', 'application/json');\n return $this->response;\n }", "public function masterAction()\n {\n //====================================================================//\n // Return Dummy Response\n return new JsonResponse(array('result' => 'Ok'));\n }", "public function testStatusDefaultsTo200OnCreation()\n {\n $response = new Response();\n $this->assertEquals(200, $response->getStatus());\n }", "public function assertResponseOk()\n {\n $this->assertResponseStatusCode(200);\n }", "protected function notAuthenticated()\n {\n $this->response = $this->response->withStatus(401);\n $this->jsonBody($this->payload->getInput());\n }", "public static function createEmpty(): ResponseItem\n {\n return new static(new \\stdClass());\n }", "public function response()\n {\n }", "public function create()\n {\n // NOTE not used\n return Response('Not found', 404);\n }", "public function create()\n {\n // NOTE not used\n return Response('Not found', 404);\n }", "public function status()\n {\n $this->response->text('OK');\n }", "public function sendResponse();", "abstract public function response();", "public function __invoke() : ResponseInterface {\n $response = new Response();\n\n $response->setStatusCode(404)\n ->setContent(static::$NOTFOUND_BODY)\n ->setContentType(static::$CONTENT_TYPE);\n\n return $response;\n }", "public function actionForceUpdate(): Response\n {\n return $this->send($this->realInitialState(true));\n }", "public function executeNoDb()\n {\n //return Request::emptyResponse();\n }", "private function notActiveResponse() : JsonResponse\n\t{\n\t\treturn $this->jsonResponse(['active' => false]);\n\t}", "public function create()\n {\n // Define objet to be returned as a json string\n $data = new \\stdClass();\n $data->success = false;\n $data->error = \"Not allowed\";\n\n return \\Response::json($data);\n }", "protected function _setContent() {\n\t\tif (in_array($this->_status, array(304, 204))) {\n\t\t\t$this->body('');\n\t\t}\n\t}", "public function index()\n {\n return response()->json(\n ['data' => 'This is a test homepage'],\n Response::HTTP_ACCEPTED\n );\n }", "public function testStatus()\n {\n $this->status(204);\n\n $this->assertEquals($this->code, 204);\n }", "public function failAction()\n {\n //====================================================================//\n // Return Dummy Response\n return new JsonResponse(array('result' => 'Ko'), 500);\n }", "public function logout()\n {\n $this->loginProxy->logout();\n\n return $this->response(null, 204);\n }", "public function toResponse()\n {\n $base = ['return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL, 'return_msg' => $this->fail];\n $attributes = array_merge($base, $this->attributes);\n if ($this->sign) {\n $attributes['sign'] = Support\\generate_sign($attributes, $this->app->getKey());\n }\n return new Response(XML::build($attributes));\n }", "protected function falseResponse($msg, $data='') {\n $success = '0';\n //$data = array();\n $this->returnRequest($success, $msg, $data);\n }", "private function generalApiResponse()\n {\n return response()->json([\n 'status' => true,\n 'errMsg' => '',\n ]);\n }", "public function json()\n {\n $code = 200;\n\n if (!Request::has(\"no_response_code\") || Request::input('no_response_code') != \"yes\") {\n $code = $this->getCode();\n }\n\n return response()->json($this->getResponse(), $code);\n }", "public function create()\n {\n return response()->json([\n 'not found!'\n ], 404);\n }", "public function badRequestResponse(){\n $this->response->statusCode(400);\n return $this->response;\n }" ]
[ "0.78915745", "0.7642096", "0.7614399", "0.7565455", "0.73724395", "0.73673373", "0.72838503", "0.7232111", "0.7218483", "0.6968222", "0.6942818", "0.69042957", "0.68907905", "0.67168415", "0.651194", "0.6445676", "0.64230037", "0.6419969", "0.6331316", "0.63247293", "0.62488467", "0.6224568", "0.6215564", "0.6208784", "0.61617005", "0.6144201", "0.60774773", "0.60372883", "0.60169804", "0.59916604", "0.5989172", "0.5971855", "0.59660316", "0.5949277", "0.5940512", "0.59392613", "0.5931138", "0.59067756", "0.59001344", "0.58619463", "0.58494824", "0.5838311", "0.58329356", "0.5816831", "0.58157337", "0.5794838", "0.5770036", "0.5749066", "0.5747948", "0.5740373", "0.57381594", "0.5727606", "0.5726961", "0.57118136", "0.5710479", "0.57060957", "0.570391", "0.5702291", "0.56986856", "0.5698452", "0.56908995", "0.5671339", "0.5646088", "0.56189895", "0.5589908", "0.5575833", "0.55624306", "0.5562275", "0.55528736", "0.5549224", "0.55489683", "0.5548794", "0.5536046", "0.5520378", "0.5514515", "0.55124813", "0.5498593", "0.5478565", "0.5473514", "0.5471022", "0.5471022", "0.5469858", "0.54681116", "0.54630834", "0.54603", "0.5452457", "0.54516405", "0.5445911", "0.54437315", "0.54417527", "0.54040504", "0.5398209", "0.5388421", "0.538789", "0.538594", "0.5379279", "0.5377184", "0.53707546", "0.5366738", "0.53664136" ]
0.73911595
4
Check the entry data format
function examResults($marks) { if(!is_array($marks)) { echo "Entry data is not an array"; return; } $total = array_sum($marks); // If array length less than 3 if (count($marks) < 3) { echo "Insufficient data"; return; } // If array length more than 3 if (count($marks) > 3) { echo "Redundant data"; return; } // Main loop foreach ($marks as $key=>$mark) { // If the mark less than 35 if ($mark < 35) { echo "Exam failed! Total: $total :("; return; } // If the mark more than 100 if ($mark > 100) { $markNumber = ++$key; echo "The $markNumber mark is a Wrong mark!"; return; } } echo "Exam passed! Total: $total :)"; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkDataFormat(&$data)\n {\n return true;\n }", "public function checkDataFormat($data) {\n return true;\n }", "public function validEntry($data) {\n\t\t$values = array_values($data);\n\t\tif (!isset($values)) {\n\t\t\treturn false;\n\t\t}\n\t\t$value = $values[0];\n\n\t\t/* Load the Entrytype model */\n\t\tApp::import(\"Webzash.Model\", \"Entry\");\n\t\t$Entry = new Entry();\n\n\t\tif ($Entry->exists($value)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function validEntrytype($data) {\n\t\t$values = array_values($data);\n\t\tif (!isset($values)) {\n\t\t\treturn false;\n\t\t}\n\t\t$value = $values[0];\n\n\t\t/* Load the Entrytype model */\n\t\tApp::import(\"Webzash.Model\", \"Entrytype\");\n\t\t$Entrytype = new Entrytype();\n\n\t\tif ($Entrytype->exists($value)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}", "function isDataValid() \n {\n return true;\n }", "public function validateEntry($entry)\n {\n $arrayKeys = array(\n 'unlockDate',\n 'positionTop',\n 'positionLeft',\n 'url'\n );\n\n foreach ($arrayKeys as $arrayKey) {\n if (!array_key_exists($arrayKey, $entry)) {\n return false;\n }\n }\n\n if (!array_key_exists('doorImageLeft', $entry) && !array_key_exists('doorImageRight', $entry)) {\n return false;\n }\n\n return true;\n }", "public function DataIsValid()\n {\n $bDataIsValid = parent::DataIsValid();\n if ($this->HasContent() && $bDataIsValid) {\n if (intval($this->data) < 12 && intval($this->data) >= -11) {\n $bDataIsValid = true;\n } else {\n $bDataIsValid = false;\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sFieldTitle = $this->oDefinition->GetName();\n $oMessageManager->AddMessage($sConsumerName, 'TABLEEDITOR_FIELD_TIMEZONE_NOT_VALID', array('sFieldName' => $this->name, 'sFieldTitle' => $sFieldTitle));\n }\n }\n\n return $bDataIsValid;\n }", "protected final function CheckFormat(&$data)\n {\n if ($data[1] != \"Receiver\" && $data[2] != \"Transmitter\") \n ExHandler::Error500(\"Vue files must contain 'Receiver' and 'Transmitter' in cells B:1 and C:1 respectively.\");\n }", "function checkData() {\n\t //check template name\n\t if (!ereg('^[0-9a-zA-Z_\\-]+$',$this->newIdt)) {\n\t\t $this->error = MF_WRONG_SHORT_NAME;\n\t\t return false;\n\t } else \n\t \t return $this->isNameFree();\n }", "public function validateEntries() \n {\n //verify if first entry is a START entry\n $this->firstItemIsStartEntry();\n\n //Detect the right order of entries\n $this->detectRightEntryOrder();\n\n //check if last entry is pause or end when the record is not current\n $this->obligePauseWhenNotCurrent();\n }", "abstract public function validateData();", "protected function process_field_formats($data, $format)\n {\n }", "protected function checkStructure()\n {\n $structure = $this->getStructure();\n\n foreach ($structure as $field => $opt) {\n if (!array_key_exists($field, $this->data)) {\n continue;\n }\n\n $value = Arr::get($this->data, $field);\n if (is_array($value)) {\n $this->errors[$field][] = Translate::get('validate_wrong_type_data');\n continue;\n }\n\n $value = trim($value);\n $length = (int)$opt->length;\n\n if (!empty($length)) {\n $len = mb_strlen($value);\n if ($len > $length) {\n $this->errors[$field][] = Translate::getSprintf('validate_max_length', $length);\n continue;\n }\n }\n\n if (!$opt->autoIncrement && $opt->default === NULL && !$opt->allowNull && $this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_not_empty');\n continue;\n }\n\n switch ($opt->dataType) {\n case 'int':\n case 'bigint':\n if (!$this->isEmpty($value) && (filter_var($value, FILTER_VALIDATE_INT) === false)) {\n $this->errors[$field][] = Translate::get('validate_int');\n continue 2;\n }\n break;\n\n case 'double':\n if (!is_float($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_double');\n continue 2;\n }\n break;\n\n case 'float':\n if (!is_numeric($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_float');\n continue 2;\n }\n break;\n\n case 'date':\n case 'datetime':\n case 'timestamp':\n if (!$this->isEmpty($value) && !Validate::dateSql($value)) {\n $this->errors[$field][] = Translate::get('validate_sql_date');\n continue 2;\n }\n break;\n\n default:\n continue 2;\n break;\n\n }\n }\n }", "private function checkResponseFormat(){\n\n }", "function isValid($array){\n return $array['format_valid'];\n }", "function checkSourceFormat()\r\n\t{\r\n\t\treturn true;\r\n\t}", "function _validateValue($entry, $wholeentry) {\n\t\t//There is no @ allowed if the entry is enclosed by braces\n\t\tif (preg_match('/^{.*@.*}$/', $entry)) {\n\t\t\t$this->_generateWarning('WARNING_AT_IN_BRACES', $entry, $wholeentry);\n\t\t}\n\t\t//No escaped \" allowed if the entry is enclosed by double quotes\n\t\tif (preg_match('/^\\\".*\\\\\".*\\\"$/', $entry)) {\n\t\t\t$this->_generateWarning('WARNING_ESCAPED_DOUBLE_QUOTE_INSIDE_DOUBLE_QUOTES', $entry, $wholeentry);\n\t\t}\n\t\t//Amount of Braces is not correct\n\t\t$open = 0;\n\t\t$lastchar = '';\n\t\t$char = '';\n\t\tfor ($i = 0; $i < strlen($entry); $i++) {\n\t\t\t$char = substr($entry, $i, 1);\n\t\t\tif (('{' == $char) && ('\\\\' != $lastchar)) {\n\t\t\t\t$open++;\n\t\t\t}\n\t\t\tif (('}' == $char) && ('\\\\' != $lastchar)) {\n\t\t\t\t$open--;\n\t\t\t}\n\t\t\t$lastchar = $char;\n\t\t}\n\t\tif (0 != $open) {\n\t\t\t$this->_generateWarning('WARNING_UNBALANCED_AMOUNT_OF_BRACES', $entry, $wholeentry);\n\t\t}\n\t}", "private function _validData($data){\n\t\t$columnsLen = array(\n\t\t\t\t\t\t\t'nro_pedido' => 6,\n\t\t\t\t\t\t\t'id_factura_pagos' => 1,\n\t\t\t\t\t\t\t'valor' => 1,\n\t\t\t\t\t\t\t'concepto' => 1,\n\t\t\t\t\t\t\t'fecha_inicio' => 0,\n\t\t\t\t\t\t\t'fecha_fin' => 0,\n\t\t\t\t\t\t\t'id_user' => 1\n\t\t);\n\t\treturn $this->_checkColumnsData($columnsLen, $data);\n\t}", "public function checkDateFormat($data) {\n foreach ($this->_date_format as $field => $value) {\n if (!empty($data[$field])) {\n $dt = \\DateTime::createFromFormat($value, $data[$field]);\n if (!($dt !== false && !array_sum($dt->getLastErrors()))) {\n $this->_addError(self::ERROR_CODE_FIELD_FORMAT_DATE, $field, $data[$field]);\n $this->_invalid_parameter = $field;\n return false;\n }\n }\n }\n\n return true;\n }", "function _checkAllowedEntryType($entry) {\n\t\treturn in_array($entry, $this->allowedEntryTypes);\n\t}", "public function isDataValid(): bool;", "function validate(&$data, $format = null, $options = array())\r\n\t\t{\r\n\t\t\tif(empty($format))\r\n\t\t\t{\r\n\t\t\t\treturn $this->inp->check($data);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn data_validation::validate($data, $format, $options);\r\n\t\t\t}\r\n\t\t}", "private function isValidData($data) {\n\t\tif (!is_string($data) && !is_int($data) && !is_float($data) && !is_array($data)) {\n\t\t\tthrow new FlintstoneException('Invalid data type');\n\t\t}\n\n\t\treturn true;\n\t}", "function validateData($data) {\n $data = json_decode($data);\n $typesArr = [1, 2];\n\n if (!in_array((int)$data->type, $typesArr)) {\n return false;\n } else {\n $data->type = (int)$data->type;\n }\n\n if (empty($data->feedback)) {\n return false;\n }\n\n if ($data->type == 2 && !filter_var($data->url, FILTER_VALIDATE_URL)) {\n return false;\n }\n\n if (empty($data->name)) {\n $data->name = \"anonymous\";\n }\n\n if (empty($data->email)) {\n $data->email = \"anonymous\";\n }\n\n return $data;\n }", "function is_format($arg)\n{\n\tif (mb_substr ($arg, 0, 9) === \"--format=\")\n\t\treturn true;\n\treturn false;\n}", "abstract public function validateData($data);", "public function entryIsValid(){\r\n $this->emailEntryIsValid();\r\n $this->usernameEntryIsValid();\r\n $this->passwordEntryIsValid();\r\n \r\n return ( count($this->errors) ? false : true );\r\n }", "public function ajw_datagrab_validate_entry($datagrab, $data, $entry_id)\n {\n // If we have an entry_id, then it came from the imported $item,\n // so just return it so DataGrab does not think its a new entry.\n if (isset($data['entry_id']) && is_numeric($data['entry_id']))\n {\n $exists = ee()->db->get_where('channel_titles', [\n 'entry_id' => $data['entry_id']\n ])->num_rows();\n\n if ($exists) {\n return $data['entry_id'];\n }\n }\n\n return $entry_id;\n }", "private function changelog_validate_object () {\n\t\t# set valid objects\n\t\t$objects = array(\n\t\t\t\t\t\t\"ip_addr\",\n\t\t\t\t\t\t\"subnet\",\n\t\t\t\t\t\t\"section\"\n\t\t\t\t\t\t);\n\t\t# check\n\t\treturn in_array($this->object_type, $objects) ? true : false;\n\t}", "function validateMetaData($data){\n\t$schema = $data['schema'].'_'.$data['version'].'.json';\n\t\n\t// Validate if the Meta Data exists.\n\t// It's up to the software engineer to decide if the non existence of a Meta Data Schema file results into a true or false validation\n\tif(file_exists('schemas/'.$schema)){\n\t\t// Read the Schema file and decode into associative arrays\n\t\t$schema = file_get_contents('schemas/'.$schema);\n\t\t$schema = json_decode($schema,true);\n\t\t\n\t\t// Get the fieldnames from the Schema by abstracting the array keys\n\t\t$ret = validate($data,$schema);\n\t\tif(!$ret)\n\t\t\treturn false;\n\t}else{\n\t\t// The software engineer will have to decide how it's program will behave when there is nog Schema file found\n\t\techo \"Schema file not found.\\r\\n\";\n\t\techo \"Assume \";\n\t}\n\t\n\t// All is good. Meta Data is valid\n\treturn true;\n}", "public function checkUrlFormat($data) {\n foreach ($this->_url_format as $field) {\n if (!empty($data[$field]) && !filter_var($data[$field], FILTER_VALIDATE_URL)) {\n $this->_addError(self::ERROR_CODE_FIELD_FORMAT_URL, $field, $data[$field]);\n $this->_invalid_parameter = $field;\n return false;\n }\n }\n\n return true;\n }", "private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text('e11'));\n $this->datavalidator->addValidation('article_prologue','req',$this->text('e12'));\n $this->datavalidator->addValidation('article_prologue','maxlen=3000',$this->text('e13'));\n $this->datavalidator->addValidation('keywords','regexp=/^[^,\\s]{3,}(,? ?[^,\\s]{3,})*$/',$this->text('e32'));\n $this->datavalidator->addValidation('keywords','maxlen=500',$this->text('e33'));\n if($this->data['layout'] != 'g' && $this->data['layout'] != 'h'){ //if article is gallery dont need content\n $this->datavalidator->addValidation('article_content','req',$this->text('e14'));\n }\n $this->datavalidator->addValidation('id_menucategory','req',$this->text('e15'));\n $this->datavalidator->addValidation('id_menucategory','numeric',$this->text('e16'));\n $this->datavalidator->addValidation('layout','req',$this->text('e17'));\n $this->datavalidator->addValidation('layout','maxlen=1',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e19'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e20'));\n }\n //if user cannot publish articles check publish values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '1') {\n $this->datavalidator->addValidation('published','req',$this->text('e21'));\n $this->datavalidator->addValidation('published','numeric',$this->text('e22'));\n $this->datavalidator->addValidation('publish_date','req',$this->text('e23'));\n }\n $this->datavalidator->addValidation('topped','req',$this->text('e24'));\n $this->datavalidator->addValidation('topped','numeric',$this->text('e25'));\n $this->datavalidator->addValidation('homepage','req',$this->text('e30'));\n $this->datavalidator->addValidation('homepage','numeric',$this->text('e31'));\n $this->datavalidator->addValidation('showsocials','req',$this->text('e26'));\n $this->datavalidator->addValidation('showsocials','numeric',$this->text('e27'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }", "function isValidFormat($format){\n $qh = new QueryHelper();\n\n $columnName = \"FormatVal\";\n $selectFormat = \"SELECT * FROM Format;\";\n if($qh -> verifyDropDownInput($format, $selectFormat, $columnName)){\n return true;\n }\n else{\n echo \"invalid format\";\n return false;\n }\n }", "public function supportsNormalization($data, $format = null)\n {\n return $data instanceof \\Exception;\n }", "public function validDataTypes();", "public function checkDataSubmission() {\n\t\t$this->main('', array());\n }", "function _parseEntry($entry) {\n\t\tglobal $bibliographie_bibtex_escaped_chars;\n\t\t$entrycopy = '';\n\t\tif ($this->_options['validate']) {\n\t\t\t$entrycopy = $entry; //We need a copy for printing the warnings\n\t\t}\n\t\t$ret = array();\n\t\tif ('@string' == strtolower(substr($entry, 0, 7))) {\n\t\t\t//String are not yet supported!\n\t\t\tif ($this->_options['validate']) {\n\t\t\t\t$this->_generateWarning('STRING_ENTRY_NOT_YET_SUPPORTED', '', $entry . '}');\n\t\t\t}\n\t\t} elseif ('@preamble' == strtolower(substr($entry, 0, 9))) {\n\t\t\t//Preamble not yet supported!\n\t\t\tif ($this->_options['validate']) {\n\t\t\t\t$this->_generateWarning('PREAMBLE_ENTRY_NOT_YET_SUPPORTED', '', $entry . '}');\n\t\t\t}\n\t\t} else {\n\t\t\t//Parsing all fields\n\t\t\twhile (strrpos($entry, '=') !== false) {\n\t\t\t\t$position = strrpos($entry, '=');\n\t\t\t\t//Checking that the equal sign is not quoted or is not inside a equation (For example in an abstract)\n\t\t\t\t$proceed = true;\n\t\t\t\tif (substr($entry, $position - 1, 1) == '\\\\') {\n\t\t\t\t\t$proceed = false;\n\t\t\t\t}\n\t\t\t\tif ($proceed) {\n\t\t\t\t\t$proceed = $this->_checkEqualSign($entry, $position);\n\t\t\t\t}\n\t\t\t\twhile (!$proceed) {\n\t\t\t\t\t$substring = substr($entry, 0, $position);\n\t\t\t\t\t$position = strrpos($substring, '=');\n\t\t\t\t\t$proceed = true;\n\t\t\t\t\tif (substr($entry, $position - 1, 1) == '\\\\') {\n\t\t\t\t\t\t$proceed = false;\n\t\t\t\t\t}\n\t\t\t\t\tif ($proceed) {\n\t\t\t\t\t\t$proceed = $this->_checkEqualSign($entry, $position);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$value = trim(substr($entry, $position + 1));\n\t\t\t\t$entry = substr($entry, 0, $position);\n\n\t\t\t\tif (',' == substr($value, strlen($value) - 1, 1)) {\n\t\t\t\t\t$value = substr($value, 0, -1);\n\t\t\t\t}\n\t\t\t\tif ($this->_options['validate']) {\n\t\t\t\t\t$this->_validateValue($value, $entrycopy);\n\t\t\t\t}\n\t\t\t\tif ($this->_options['stripDelimiter']) {\n\t\t\t\t\t$value = $this->_stripDelimiter($value);\n\t\t\t\t}\n\t\t\t\tif ($this->_options['unwrap']) {\n\t\t\t\t\t$value = $this->_unwrap($value);\n\t\t\t\t}\n\t\t\t\tif ($this->_options['removeCurlyBraces']) {\n\t\t\t\t\t$value = $this->_removeCurlyBraces($value);\n\t\t\t\t}\n\n\t\t\t\t$position = strrpos($entry, ',');\n\t\t\t\t$field = strtolower(trim(substr($entry, $position + 1)));\n\n\t\t\t\tif($field != 'author' and $field != 'editor')\n\t\t\t\t\t$value = str_replace(array_values($this->escapedChars), array_keys($this->escapedChars), $value);\n\n\t\t\t\t$ret[$field] = $value;\n\t\t\t\t$entry = substr($entry, 0, $position);\n\t\t\t}\n\t\t\t//Parsing cite and entry type\n\t\t\t$arr = explode('{', $entry);\n\t\t\t$ret['cite'] = trim($arr[1]);\n\t\t\t$ret['entryType'] = strtolower(trim($arr[0]));\n\t\t\tif ('@' == $ret['entryType']{0}) {\n\t\t\t\t$ret['entryType'] = substr($ret['entryType'], 1);\n\t\t\t}\n\t\t\tif ($this->_options['validate']) {\n\t\t\t\tif (!$this->_checkAllowedEntryType($ret['entryType'])) {\n\t\t\t\t\t$this->_generateWarning('WARNING_NOT_ALLOWED_ENTRY_TYPE', $ret['entryType'], $entry . '}');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$ret['entryType'] = mb_strtoupper(mb_substr($ret['entryType'], 0, 1)).mb_substr($ret['entryType'], 1);\n\t\t\t//Handling the authors\n\t\t\tif (in_array('author', array_keys($ret)) && $this->_options['extractAuthors']) {\n\t\t\t\t$ret['author'] = $this->_extractAuthors($ret['author']);\n\t\t\t}\n\n\t\t\tif (in_array('editor', array_keys($ret)) && $this->_options['extractAuthors']) {\n\t\t\t\t$ret['editor'] = $this->_extractAuthors($ret['editor']);\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "private function fieldsAreValid(string $batch): bool\n {\n $fields = explode(' ', $batch);\n\n foreach ($fields as $field) {\n list($key, $val) = explode(':', $field);\n\n switch ($key) {\n default:\n if ($key !== 'cid') return false;\n break;\n\n case 'byr':\n if ($val < 1920 || $val > 2002) return false;\n break;\n\n case 'iyr':\n if ($val < 2010 || $val > 2020) return false;\n break;\n\n case 'eyr':\n if ($val < 2020 || $val > 2030) return false;\n break;\n\n case 'hgt':\n if (strpos($val, 'cm', -2)) {\n list($height) = explode('cm', $val);\n if ($height < 150 || $height > 193) return false;\n } else if (strpos($val, 'in', -2)) {\n list($height) = explode('in', $val);\n if ($height < 59 || $height > 76) return false;\n } else {\n return false;\n }\n break;\n\n case 'hcl':\n if (substr($val, 0, 1) !== '#') return false;\n\n $hex = substr($val, 1, 6);\n\n if (strlen($hex) !== 6) return false;\n if (! preg_match('/^[a-fA-F0-9._]+$/', $hex)) return false;\n break;\n\n case 'ecl':\n if (! in_array($val, [\n 'amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth',\n ])) return false;\n break;\n\n case 'pid':\n if (strlen($val) !== 9) return false;\n if (! is_numeric($val)) return false;\n break;\n }\n }\n\n return true;\n }", "public function check_data()\n {\n parent::check_data();\n\n if(empty($this->build_notifications))\n {\n throw new exception('<strong>Data missing: Notifications</strong>');\n }\n\n if(empty($this->build_batch_reference))\n {\n throw new exception('<strong>Data missing: Batch References</strong>');\n }\n }", "function parseData()\r\n\t{\r\n\t\treturn true;\r\n\t}", "static function checkObj(&$data) \n\t{\n\t\tif(!$data)\n\t\t\treturn false;\n\t\tif(preg_match('/((?![\\x20-\\x7E]).)/', $data)){\n\t\t\t//todo:now just int\n\t\t\t$data = unpack('I',$data);\n\t\t\t$data = $data[1];\n\t\t\treturn false;\n\t\t}\n\t\tif(substr_compare($data,'{',0,1)==0){\n\t\t\t$ndata = json_decode($data,true);\n\t\t\tif($ndata){\n\t\t\t\t$data = $ndata;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}", "function _validateFormat($format)\n {\n if (!array_key_exists($format, $this->conf['all_syntax']))\n $format = 'text';\n \n return $format; \n }", "public function supportsNormalization($data, $format = null)\n {\n return 'json' === $format && $data instanceof \\Exception;\n }", "protected function validate()\n {\n// echo static::class;\n if (!isset($this->getProperty('raw_data')['_'])) {\n throw new InvalidEntity('Invalid entity data given: ' . json_encode($this->getRawData(), JSON_PRETTY_PRINT));\n }\n }", "protected function _check($data)\n {\n if ($this->_count != 0) {\n $this->_type($data);\n } elseif (is_array($data)) {\n $this->_type($data);\n }\n }", "function validateMetaData($data){\r\n\t$schema = $data['schema'].'_schema_'.$data['version'].'.json';\r\n\t\r\n\t// Validate if the MetaData exists.\r\n\t// It's up to the software engineer to decide if the non existence of a Metadata Schema file results into a true or false validation\r\n\tif(file_exists('testschemas/'.$schema)){\r\n\t\t// Read the Schema file and decode into an associative array\r\n\t\t// NOTE: this part does not yet support nested arrays or objects!!!\r\n\t\t$schema = file_get_contents('testschemas/'.$schema);\r\n\t\t$schema = json_decode($schema,true); // Instructing PHP to turn the JSON Object into a associative array!\r\n\t\t\r\n\t\t// Start the validation process\r\n\t\t$ret = validate($data,$schema);\r\n\t\tif(!$ret)\r\n\t\t\treturn false;\r\n\t}elseif(isset($data[\"external_resource\"])){\r\n\t\t$ret = loadExternalResource($data);\r\n\t\tif($ret){\r\n\t\t\techo $data[\"external_resource\"].\" is VALID\\r\\n\";\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\techo $data[\"external_resource\"].\" is INVALID\\r\\n\";\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t}else{\r\n\t\t// The software engineer will have to decide how its program will behave when there is no Schema file found\r\n\t\techo \"Schema file not found.\\r\\n\";\r\n\t\techo \"Assume \";\r\n\t}\r\n\t\r\n\t// All is good. Metadata is valid\r\n\treturn true;\r\n}", "function supports($format);", "public function supportsNormalization($data, $format = null)\n {\n return $data instanceof Setting;\n }", "public function isValid() {\n\t\treturn !is_array($this->data) && count($this->data->getRawData()) > 0;\n\t}", "function is_serialized( $data ) {\n if ( !is_string( $data ) )\n return false;\n $data = trim( $data );\n if ( 'N;' == $data )\n return true;\n if ( !preg_match( '/^([adObis]):/', $data, $badions ) )\n return false;\n switch ( $badions[1] ) {\n case 'a' :\n case 'O' :\n case 's' :\n if ( preg_match( \"/^{$badions[1]}:[0-9]+:.*[;}]\\$/s\", $data ) )\n return true;\n break;\n case 'b' :\n case 'i' :\n case 'd' :\n if ( preg_match( \"/^{$badions[1]}:[0-9.E-]+;\\$/\", $data ) )\n return true;\n break;\n }\n return false;\n }", "function descrFormat ($value){\n \n if(strlen($value) == 0){\n return true;\n }\n \n else if(!preg_match(VALID_DESCR_FORMAT,$value)){\n return false;\n }\n \n return true;\n}", "public function valid(){\n\t\treturn (is_array($this->data) ? key($this->data) !== null : false);\n\t}", "private static function isInteger($entry) {\n return ctype_digit(strval($entry));\n }", "public function checkNumberFormat($data) {\n // KienNH 2016/04/20: Alway check language_type, page and limit\n $_number_format = array_merge($this->_number_format, array('language_type', 'page', 'limit'));\n\n foreach ($_number_format as $field) {\n\n if (!empty($data[$field]) && !is_numeric($data[$field])) {\n $this->_addError(self::ERROR_CODE_FIELD_FORMAT_NUMBER, $field, $data[$field]);\n $this->_invalid_parameter = $field;\n return false;\n }\n }\n\n return true;\n }", "public function validateData(){\n return true;\n }", "public function chk_dat()\n {\n echo \"title = \" . $this->dat[\"title\"] . \"\\n\\n\";\n echo \"name = \" . $this->dat[\"name\"] . \"\\n\\n\";\n echo \"era = \" . $this->dat[\"era\"] . \"\\n\\n\";\n echo \"rows = \" . $this->dat[\"rows\"] . \"\\n\\n\";\n\n echo $this->dat[\"field\"][\"n\"] . \", \".\n $this->dat[\"field\"][\"id\"] . \", \".\n $this->dat[\"field\"][\"scd\"] . \", \".\n $this->dat[\"field\"][\"name\"] . \", \".\n $this->dat[\"field\"][\"ymd\"] . \", \".\n $this->dat[\"field\"][\"line\"] . \", \".\n $this->dat[\"field\"][\"debit\"] . \", \".\n $this->dat[\"field\"][\"credit\"] . \", \".\n $this->dat[\"field\"][\"debit_name\"] . \", \".\n $this->dat[\"field\"][\"credit_name\"] . \", \".\n $this->dat[\"field\"][\"debit_account\"] . \", \".\n $this->dat[\"field\"][\"credit_account\"] . \", \".\n $this->dat[\"field\"][\"debit_amount\"] . \", \".\n $this->dat[\"field\"][\"credit_amount\"] . \", \".\n $this->dat[\"field\"][\"amount\"] . \", \".\n $this->dat[\"field\"][\"remark\"] . \", \".\n $this->dat[\"field\"][\"settled_flg\"] . \"\\n\\n\";\n\n $cnt = $this->dat[\"rows\"];\n for ($i = 0; $i < $cnt; $i++) {\n echo $this->dat[\"data\"][$i][\"n\"] . \", \".\n $this->dat[\"data\"][$i][\"id\"] . \", \".\n $this->dat[\"data\"][$i][\"scd\"] . \", \".\n $this->dat[\"data\"][$i][\"name\"] . \", \".\n $this->dat[\"data\"][$i][\"ymd\"] . \", \".\n $this->dat[\"data\"][$i][\"line\"] . \", \".\n $this->dat[\"data\"][$i][\"debit\"] . \", \".\n $this->dat[\"data\"][$i][\"credit\"] . \", \".\n $this->dat[\"data\"][$i][\"debit_name\"] . \", \".\n $this->dat[\"data\"][$i][\"credit_name\"] . \", \".\n $this->dat[\"data\"][$i][\"debit_account\"] . \", \".\n $this->dat[\"data\"][$i][\"credit_account\"] . \", \".\n $this->dat[\"data\"][$i][\"debit_amount\"] . \", \".\n $this->dat[\"data\"][$i][\"credit_amount\"] . \", \".\n $this->dat[\"data\"][$i][\"amount\"] . \", \".\n $this->dat[\"data\"][$i][\"remark\"] . \", \".\n $this->dat[\"data\"][$i][\"settled_flg\"] . \"\\n\\n\";\n }\n }", "public function validate()\n {\n $formatValid = preg_match('/^([A-Z]{2})([0-9]{2})([0-9A-Z]{12,30})/', $this->data);\n\n if (!$formatValid) {\n $this->invalidate();\n return false;\n }\n\n $isValid = self::validateIBAN($this->data);\n\n if (! $isValid) {\n $this->invalidate();\n }\n\n return $isValid;\n }", "public function validData($data, $type = \"\"){\n switch ($type){\n case 'ug':\n case \"ul\"://user-login. no russian 4-30 characters\n preg_match('/[A-Za-z0-9\\)\\(_\\-]{4,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n case \"un\": //user-name/surname rus+eng 2-30\n preg_match('/[А-Яа-яA-Za-z0-9\\)\\(_\\-]{2,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n case \"up\": //user=password\n preg_match('/[\\w]{6,16}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? md5($arr[0])\n : false;\n break;\n case \"ue\": //user-email\n return filter_var($data, FILTER_VALIDATE_EMAIL) ? $data\n : false;\n break;\n case \"dt\": //date &year &month &day\n preg_match('/(\\d{4})\\.(\\d{1,2})\\.(\\d{1,2})/', $data, $arr);\n return checkdate($arr[2], $arr[3], $arr[1]) ? $arr[0]\n : false;\n break;\n case \"ph\": //phone 0-9{3} 0-9{7}\n preg_match('/\\d{3}-\\d{7}/', $data, $arr);\n return !empty($arr) ? $arr[0]\n : false;\n break;\n case \"gr\": //user-name/surname rus+eng 2-30\n preg_match('/[А-Яа-яA-Za-z0-9\\)\\(_\\-]{2,30}/u', $data, $arr);\n return strlen($data) == strlen($arr[0]) ? $arr[0]\n : false;\n break;\n default:\n return false;\n break;\n }\n }", "public function checkEmailFormat($data) {\n foreach ($this->_email_format as $field) {\n if (!empty($data[$field])) {\n $pattern = \"/^[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\\.)+([A-Za-z0-9]{2,4}|museum)$/\";\n if (!preg_match($pattern, $data[$field])) {\n $this->_addError(self::ERROR_CODE_FIELD_FORMAT_EMAIL, $field, $data[$field]);\n $this->_invalid_parameter = $field;\n return false;\n }\n }\n }\n\n return true;\n }", "function is_serialized($data) {\n if (!is_string($data))\n return false;\n $data = trim($data);\n if ('N;' == $data)\n return true;\n if (!preg_match('/^([adObis]):/', $data, $badions))\n return false;\n switch ($badions[1]) {\n case 'a' :\n case 'O' :\n case 's' :\n if (preg_match(\"/^{$badions[1]}:[0-9]+:.*[;}]\\$/s\", $data))\n return true;\n break;\n case 'b' :\n case 'i' :\n case 'd' :\n if (preg_match(\"/^{$badions[1]}:[0-9.E-]+;\\$/\", $data))\n return true;\n break;\n }\n return false;\n }", "public function looksValid()\r\n\t{\r\n return true;\r\n\t}", "protected function verifyDataFormat()\r\n\t{\r\n\t\t// TODO validate data and formats\r\n\t\tif(!XSDDateTime::validateXSDDateTime($this->headers[SONIC_HEADER__DATE]))\r\n\t\t\tthrow new MalformedRequestHeaderException(\"Malformed response: Header \" . SONIC_HEADER__DATE . \" malformed: \" . $this->headers[SONIC_HEADER__DATE]);\r\n\t\tif(!XSDDateTime::validateXSDDateTime($this->headers[SONIC_HEADER__DATE]))\r\n\t\t\tthrow new MalformedRequestHeaderException(\"Malformed response: Header \" . SONIC_HEADER__DATE . \" malformed: \" . $this->headers[SONIC_HEADER__DATE]);\r\n\r\n\t\treturn true;\r\n\t}", "function validate($data) {\n if (is_string($this->paramtype)) {\n if (preg_match($this->paramtype, $data)) {\n return true;\n } else {\n return get_string('validateerror', 'admin');\n }\n\n } else if ($this->paramtype === PARAM_RAW) {\n return true;\n\n } else {\n $cleaned = stripslashes(clean_param(addslashes($data), $this->paramtype));\n if (\"$data\" == \"$cleaned\") { // implicit conversion to string is needed to do exact comparison\n return true;\n } else {\n return get_string('validateerror', 'admin');\n }\n }\n }", "function validInfo($info)\r\n{\r\n return !empty($info) //&& ctype_alpha($name)\r\n ;\r\n}", "public function checkFormatAllowed() {\n\t\t$imageFileType = pathinfo(basename($this->value[\"name\"]),PATHINFO_EXTENSION);\n\t\tif((($this->extension == \"\") && ($imageFileType == \"jpg\" || $imageFileType == \"png\" || $imageFileType == \"jpeg\"\n\t\t|| $imageFileType == \"gif\")) || ($this->extension == \"pdf\" && $imageFileType == \"pdf\" )) {\n\t\t return true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function privCheckFormat($p_level=0)\n {\n $v_result = true;\n\n\t// ----- Reset the file system cache\n clearstatcache();\n\n // ----- Reset the error handler\n $this->privErrorReset();\n\n // ----- Look if the file exits\n if (!is_file($this->zipname)) {\n // ----- Error log\n PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, \"Missing archive file '\".$this->zipname.\"'\");\n return(false);\n }\n\n // ----- Check that the file is readeable\n if (!is_readable($this->zipname)) {\n // ----- Error log\n PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, \"Unable to read archive '\".$this->zipname.\"'\");\n return(false);\n }\n\n // ----- Check the magic code\n // TBC\n\n // ----- Check the central header\n // TBC\n\n // ----- Check each file header\n // TBC\n\n // ----- Return\n return $v_result;\n }", "public function valid()\n {\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['type'] === null) {\n return false;\n }\n $allowed_values = array(\"text\", \"range\", \"category\");\n if (!in_array($this->container['type'], $allowed_values)) {\n return false;\n }\n if ($this->container['sort_type'] === null) {\n return false;\n }\n $allowed_values = array(\"alphabetical\", \"count\", \"value\", \"size\");\n if (!in_array($this->container['sort_type'], $allowed_values)) {\n return false;\n }\n if ($this->container['values'] === null) {\n return false;\n }\n return true;\n }", "function has_post_format($format = array(), $post = \\null)\n {\n }", "function stringifyData($data, $format) {\n //[] indicates databound key\n //?a(b) indicates an optional section\n //a is the data value to check. If present, b will be rendered\n //anything else is literal\n $formatted = \"\";\n $seps = '?()[]';\n $tok = strtok( $format, $seps ); // return false on empty string or null\n $cur = 0;\n $dumbDone = FALSE;\n $done = (FALSE===$tok);\n $flags = [\"databind\" => false, \"optional\" => false, \"check\" => false];\n $checkvalue = false;\n while (!$done) {\n $posTok = $dumbDone ? strlen($format) : strpos($format, $tok, $cur );\n $skippedMany = substr( $format, $cur, $posTok-$cur ); // false when 0 width\n $lenSkipped = strlen($skippedMany); // 0 when false\n if (0!==$lenSkipped) {\n $last = strlen($skippedMany) -1;\n for($i=0; $i<=$last; $i++){\n $skipped = $skippedMany[$i];\n $cur += strlen($skipped);\n switch($skipped) {\n case \"?\":\n $flags[\"check\"] = true;\n $flags[\"databind\"] = false;\n $flags[\"optional\"] = false;\n break;\n case \"(\":\n $flags[\"optional\"] = true;\n $flags[\"check\"] = false;\n break;\n case \"[\":\n $flags[\"databind\"] = true;\n $flags[\"check\"] = false;\n break;\n case \"]\":\n $flags[\"databind\"] = false;\n $flags[\"check\"] = false;\n break;\n case \")\":\n $flags[\"optional\"] = false;\n $flags[\"check\"] = false;\n break;\n default:\n $flags = [\"databind\" => false, \"optional\" => false, \"check\" => false];\n break;\n }\n }\n }\n if ($dumbDone) break; // this is the only place the loop is terminated \n if($flags[\"check\"]) {\n $checkvalue = !empty($data[$tok]);\n } else {\n if(!$flags[\"optional\"] || $checkvalue) {\n if($flags[\"databind\"]) {\n $formatted .= $data[$tok];\n } else {\n $formatted .= $tok;\n }\n } \n }\n $cur += strlen($tok);\n if (!$dumbDone){\n $tok = strtok($seps);\n $dumbDone = (FALSE===$tok);\n }\n };\n }", "protected function Validate() {\r\n if (!is_int($this->class_log)) {\r\n \treturn false;\r\n }\r\n\r\n if (!is_int($this->student)) {\r\n \treturn false;\r\n }\r\n\r\n if (!is_string($this->longitude)) {\r\n \treturn false;\r\n }\r\n\r\n if (!is_string($this->latitude)) {\r\n \treturn false;\r\n }\r\n\r\n return true;\r\n }", "function check_theme_data() {\n\tglobal $install_errors;\n\t\n\t$theme_data = get_theme_data();\n\t\n\tif(!check_value($theme_data['Name'])) {\n\t\t$install_errors[] = '<code>Theme Name</code> has no value.';\n\t}\n\tif(!check_value($theme_data['Chevereto'])) {\n\t\t$install_errors[] = 'There is no value on <code>@Chevereto</code> wich indicates the version compatibility.';\n\t}\n\t\n\tif(count($install_errors)==0) return true;\n}", "function checkFields( $args )\r\n {\r\n\t\treturn true;\r\n }", "public function sanitiseData(): void\n {\n $this->firstLine = self::sanitiseString($this->firstLine);\n self::validateExistsAndLength($this->firstLine, 1000);\n $this->secondLine = self::sanitiseString($this->secondLine);\n self::validateExistsAndLength($this->secondLine, 1000);\n $this->town = self::sanitiseString($this->town);\n self::validateExistsAndLength($this->town, 255);\n $this->postcode = self::sanitiseString($this->postcode);\n self::validateExistsAndLength($this->postcode, 10);\n $this->county = self::sanitiseString($this->county);\n self::validateExistsAndLength($this->county, 255);\n $this->country = self::sanitiseString($this->country);\n self::validateExistsAndLength($this->country, 255);\n }", "protected function is_valid_datechallenge_format($var){\n return in_array($var, $this->_resultFormatNames);\n }", "public function valid()\n {\n if ($this->container['name'] === null) {\n return false;\n }\n if (strlen($this->container['name']) > 50) {\n return false;\n }\n if ($this->container['type'] === null) {\n return false;\n }\n if ($this->container['sub_type'] === null) {\n return false;\n }\n if ($this->container['start_date'] === null) {\n return false;\n }\n return true;\n }", "function check_time_format($time) \r\n{ \r\n\t$valid = false; \r\n\tif (preg_match('/(\\d\\d):(\\d\\d)/', $time)) \r\n\t{ \r\n\t\t$valid = true; \r\n\t} \r\n\treturn $valid; \r\n}", "public function testGet() {\n $this->assertEquals('%m/%d/%Y', Format::get('date'));\n $this->assertEquals('%m/%d/%Y %I:%M%p', Format::get('datetime'));\n $this->assertEquals('%I:%M%p', Format::get('time'));\n $this->assertEquals('###-##-####', Format::get('ssn'));\n $this->assertEquals([\n 7 => '###-####',\n 10 => '(###) ###-####',\n 11 => '# (###) ###-####'\n ], Format::get('phone'));\n\n try {\n Format::get('fake');\n $this->assertTrue(false);\n\n } catch (Exception $e) {\n $this->assertTrue(true);\n }\n }", "private function is_valid_field_data() {\n\t\t$data = rgpost( $this->get_input_name() );\n\n\t\tif ( empty( $data ) ) {\n\t\t\tgf_recaptcha()->log_debug( __METHOD__ . \"(): Input {$this->get_input_name()} empty.\" );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn gf_recaptcha()->get_token_verifier()->verify_submission( $data );\n\t}", "public function supportsNormalization($data, $format = null)\n {\n return false;\n }", "function _checkAt($entry) {\n\t\t$ret = false;\n\t\t$opening = array_keys($this->_delimiters);\n\t\t$closing = array_values($this->_delimiters);\n\t\t//Getting the value (at is only allowd in values)\n\t\tif (strrpos($entry, '=') !== false) {\n\t\t\t$position = strrpos($entry, '=');\n\t\t\t$proceed = true;\n\t\t\tif (substr($entry, $position - 1, 1) == '\\\\') {\n\t\t\t\t$proceed = false;\n\t\t\t}\n\t\t\twhile (!$proceed) {\n\t\t\t\t$substring = substr($entry, 0, $position);\n\t\t\t\t$position = strrpos($substring, '=');\n\t\t\t\t$proceed = true;\n\t\t\t\tif (substr($entry, $position - 1, 1) == '\\\\') {\n\t\t\t\t\t$proceed = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$value = trim(substr($entry, $position + 1));\n\t\t\t$open = 0;\n\t\t\t$char = '';\n\t\t\t$lastchar = '';\n\t\t\tfor ($i = 0; $i < strlen($value); $i++) {\n\t\t\t\t$char = substr($this->content, $i, 1);\n\t\t\t\tif (in_array($char, $opening) && ('\\\\' != $lastchar)) {\n\t\t\t\t\t$open++;\n\t\t\t\t} elseif (in_array($char, $closing) && ('\\\\' != $lastchar)) {\n\t\t\t\t\t$open--;\n\t\t\t\t}\n\t\t\t\t$lastchar = $char;\n\t\t\t}\n\t\t\t//if open is grater zero were are inside an entry\n\t\t\tif ($open > 0) {\n\t\t\t\t$ret = true;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function checkInput($data) {\n\n if(strlen($data) >= 1){\n $data = trim($data); //remove \\n, \\r, \\t doesn't remove spaces between words, if wanted than use -> str_replace(\" \", \"\", trim($data));\n return $data;\n }else{\n return false;\n }\n\n }", "protected function isContentCorrect() {}", "function validateData($request) {\n\tglobal $amessages;\n\tinclude_once(ROOT_PATH.'classes/data/validate.class.php');\n\t$error = array();\n\t$validate = new Validate();\n\t$error['INPUT']['module'] = $validate->validString($request->element('module'),$amessages['object']);\t\n\t$error['INPUT']['name'] = $validate->validString($request->element('name'),$amessages['name']);\n\t$error['INPUT']['title'] = $validate->validString($request->element('title'),$amessages['title']);\n\t$error['INPUT']['class'] = $validate->pasteString($request->element('class'));\n\t$error['INPUT']['type'] = $validate->validNumber($request->element('type'),$amessages['custom_field_type']);\n\t$error['INPUT']['value'] = $validate->pasteString($request->element('value'));\n\tif($request->element('type')>3) $error['INPUT']['value'] = $validate->validString($request->element('value'),$amessages['custom_field_value']);\n\t$error['INPUT']['position'] = $validate->pasteString($request->element('position'));\n\t$error['INPUT']['status'] = $validate->pasteString($request->element('status'));\n\t\n\tif($error['INPUT']['module']['error'] || $error['INPUT']['name']['error'] || $error['INPUT']['title']['error'] || $error['INPUT']['type']['error'] || $error['INPUT']['value']['error']) {\n\t\t$error['invalid'] = 1;\n\t\treturn $error;\n\t}\n\t$error['invalid'] = 0;\n\treturn $error;\n}", "function cp_do_input_validation($_adata) {\n\t# Initialize array\n\t\t$err_entry = array(\"flag\" => 0);\n\n\t# Check modes and data as required\n\t\tIF ($_adata['op'] == 'edit' || $_adata['op'] == 'add') {\n\t\t# Check required fields (err / action generated later in cade as required)\n\t\t//\tIF (!$_adata['s_id'])\t\t{$err_entry['flag'] = 1; $err_entry['s_id'] = 1;}\n\t\t//\tIF (!$_adata['s_status'])\t{$err_entry['flag'] = 1; $err_entry['s_status'] = 1;}\n\t\t\tIF (!$_adata['s_company'])\t{$err_entry['flag'] = 1; $err_entry['s_company'] = 1;}\n\t\t//\tIF (!$_adata['s_name_first'])\t{$err_entry['flag'] = 1; $err_entry['s_name_first'] = 1;}\n\t\t//\tIF (!$_adata['s_name_last'])\t{$err_entry['flag'] = 1; $err_entry['s_name_last'] = 1;}\n\t\t\tIF (!$_adata['s_addr_01'])\t{$err_entry['flag'] = 1; $err_entry['s_addr_01'] = 1;}\n\t\t//\tIF (!$_adata['s_addr_02'])\t{$err_entry['flag'] = 1; $err_entry['s_addr_02'] = 1;}\n\t\t\tIF (!$_adata['s_city'])\t\t{$err_entry['flag'] = 1; $err_entry['s_city'] = 1;}\n\t\t\tIF (!$_adata['s_state_prov'])\t{$err_entry['flag'] = 1; $err_entry['s_state_prov'] = 1;}\n\t\t\tIF (!$_adata['s_country'])\t{$err_entry['flag'] = 1; $err_entry['s_country'] = 1;}\n\t\t\tIF (!$_adata['s_zip_code'])\t{$err_entry['flag'] = 1; $err_entry['s_zip_code'] = 1;}\n\t\t//\tIF (!$_adata['s_phone'])\t\t{$err_entry['flag'] = 1; $err_entry['s_phone'] = 1;}\n\t\t//\tIF (!$_adata['s_fax'])\t\t{$err_entry['flag'] = 1; $err_entry['s_fax'] = 1;}\n\t\t//\tIF (!$_adata['s_tollfree'])\t{$err_entry['flag'] = 1; $err_entry['s_tollfree'] = 1;}\n\t\t//\tIF (!$_adata['s_email'])\t\t{$err_entry['flag'] = 1; $err_entry['s_email'] = 1;}\n\t\t//\tIF (!$_adata['s_taxid'])\t\t{$err_entry['flag'] = 1; $err_entry['s_taxid'] = 1;}\n\t\t//\tIF (!$_adata['s_account'])\t{$err_entry['flag'] = 1; $err_entry['s_account'] = 1;}\n\t\t\tIF (!$_adata['s_terms'])\t\t{$err_entry['flag'] = 1; $err_entry['s_terms'] = 1;}\n\t\t//\tIF (!$_adata['s_notes'])\t\t{$err_entry['flag'] = 1; $err_entry['s_notes'] = 1;}\n\n\t\t}\n\n\t# Validate some data (submitting data entered)\n\t# Email\n\t\tIF ($_adata['s_email'] && do_validate_email($_adata['s_email'], 0)) {\n\t\t\t$err_entry['flag'] = 1; $err_entry['err_email_invalid'] = 1;\n\t\t}\n\n\t# Email does not match existing email\n\t\t$_ce = array(0,1,1,1,1);\t// Element 0 = Nothing, 1 = clients, 2 = suppliers, 3 = admins, 4 = site addressses\n\t\tIF ($_adata['s_email'] && do_email_exist_check($_adata['s_email'], $_adata['s_id'], $_ce)) {\n\t\t\t$err_entry['flag'] = 1; $err_entry['err_email_matches_another'] = 1;\n\t\t}\n\n\t\treturn $err_entry;\n\n\t}", "public function supportsNormalization($data, $format = null)\n {\n return $data instanceof Mesures;\n }", "public function checkValidity()\n {\n // le pb est que la propriété publicationDate est de type dateTime or les tests initiaux\n // se basent sur un format de type date --> ce qui génère une erreur de type notice\n \n return true;\n }", "private function validate_mms_data($_mms_data)\n {\n // Some code goes here to validate the mms_data array passed as an argument\n }", "abstract public function isValid($data);", "protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t\t\n\t\t// The remote IP address is also required\n\t\tif($this->validate_ip($this->REMOTE_ADDRESS)){throw new Exception(\"Renote IP address not set correctly\", 6);}\n\t}", "private function validateInputParameters($data)\n {\n }", "public function is_valid()\n {\n }", "public function is_valid()\n {\n }", "public function validateLine($data) {\n if (!is_array($data)) {\n return false;\n }\n if (count($data) < 3) {\n return false;\n }\n if (!preg_match(static::$VALIDRESTAURANTID, trim($data[0]))) {\n return false;\n }\n if (!preg_match(static::$VALIDPRICE, trim($data[1]))) {\n return false;\n }\n for ($i = 2; $i < count($data); $i++) {\n if (preg_match(static::$VALIDITEMNAME, trim($data[$i])) === 0) {\n return false;\n }\n }\n return true;\n }", "function check() {\n\n // TODO check for valid strings\n return true;\n }", "public function is_valid_vb_spec($data_array) {\n\n // Check that there are at least two rows.\n if ( count($data_array) < 2 ) {\n $this->notifier->add('There must be at least two rows in the '\n . 'uploaded dataset.', 'error');\n return false;\n }\n\n // Split the dataset into the header row and the rest of the sheet\n $header = $data_array[0]; // Just the first row\n $data_array = array_slice($data_array, 1); // Everything but the first row\n\n // Count the number of timepoint columns and check that there is\n // at least one.\n $num_timepoint_cols = count(self::ordered_columns_of_type($header, 0));\n if ($num_timepoint_cols < 1) {\n $this->notifier->add(esc_html('There must be at least one timepoint column. '\n . 'None were found. Note that syntax for timepoint column '\n . 'headers is strict: the fieldname must be machine-readable '\n . 'as a date. Try formats like \"2012\" or \"2012-08\" or \"3Q 2008\".'),\n 'error', 108);\n return false;\n }\n\n // Count the number of level columns and check that there is\n // at least one.\n $num_level_cols = count(self::ordered_columns_of_type($header, 1));\n if ($num_level_cols < 1) {\n $this->notifier->add(esc_html('There must be at least one LEVEL column. '\n . 'None were found. Note that syntax for LEVEL column '\n . 'headers is strict: the fieldname must be of the form '\n . 'LEVEL<N>, where <N> is an integer.'),\n 'error', 109);\n return false;\n }\n\n return true;\n }", "public function valid()\n {\n if ($this->container['type_of_barcode'] === null) {\n return false;\n }\n if ($this->container['text'] === null) {\n return false;\n }\n return true;\n }", "public function valid()\n {\n\n if (strlen($this->container['virtual_operator']) > 60) {\n return false;\n }\n if (strlen($this->container['event_type']) > 100) {\n return false;\n }\n if (strlen($this->container['result_status']) > 100) {\n return false;\n }\n if (strlen($this->container['username']) > 100) {\n return false;\n }\n if (strlen($this->container['property_value']) > 450) {\n return false;\n }\n return true;\n }", "public function validate()\n\t{\n\t\t$errors = array();\n\t\t\n\t\t//make sure user is logged in\n\t\tif (empty($this->userid)) \n\t\t{\n\t\t\t$errors['userid'] = true;\n\t\t}\n\t\t\n\t\t//verify all info is provided\n\t\tif (isset($this->title))\n\t\t\t$this->title = strip_tags($this->title);\n\t\telse\n\t\t\t$errors['title'] = true;\n\t\t\t\n\t\tif (isset($this->description))\n\t\t\t$this->description = strip_tags($this->description);\n\t\telse\n\t\t\t$errors['description'] = true;\n\t\t\t\n\t\tif (isset($this->content))\n\t\t\t$this->content = strip_tags($this->content, \"<br><b>\");\n\t\telse\n\t\t\t$errors['content'] = true;\n\t\t\t\n\t\tif (isset($this->location))\n\t\t\t$this->location = strip_tags($this->location);\n\t\telse\n\t\t\t$errors['location'] = true;\n\t\t\n\t\tif (!isset($this->category))\n\t\t\t$errors['category'] = true;\n\t\t\t\n\t\tif (!isset($this->enddatetime))\n\t\t\t$errors['enddatetime'] = true;\n\t\t\n\t\t\n\t\t//If we made it here, all is valid\n\t\tif (count($errors) > 0)\n\t\t\treturn $errors;\n\t\telse\n\t\t\treturn NULL;\n\t}", "function textFormat ($value){\n \n if(!preg_match(VALID_TEXT_FORMAT,$value)){\n return false;\n }\n \n return true;\n}" ]
[ "0.67706007", "0.67585516", "0.6666151", "0.648947", "0.64673334", "0.64673334", "0.6212232", "0.6082128", "0.6078824", "0.6078689", "0.6076554", "0.6023074", "0.60123116", "0.5956871", "0.5946402", "0.5928117", "0.5926121", "0.59197646", "0.5895151", "0.58225137", "0.5758779", "0.5754757", "0.5741553", "0.5714423", "0.57015425", "0.569667", "0.5662421", "0.5623039", "0.5619711", "0.5602807", "0.559512", "0.5586579", "0.5569092", "0.55615383", "0.5559007", "0.55413187", "0.55389935", "0.5530967", "0.55298024", "0.552527", "0.550296", "0.54953456", "0.54709196", "0.5470231", "0.54701614", "0.54572284", "0.5453424", "0.54452", "0.54404545", "0.54269964", "0.5401852", "0.5398955", "0.5396758", "0.53907925", "0.53851205", "0.5378077", "0.53770816", "0.53686947", "0.53623444", "0.536039", "0.53594005", "0.53516704", "0.5336422", "0.53331", "0.53298813", "0.53275955", "0.53201056", "0.53181493", "0.5301235", "0.5298537", "0.5294418", "0.52893966", "0.5288082", "0.52872574", "0.5279723", "0.5278529", "0.5270279", "0.5269846", "0.5269768", "0.5267145", "0.5265822", "0.52537394", "0.5251212", "0.52479964", "0.5243326", "0.5243112", "0.5240229", "0.5234884", "0.52344316", "0.52308244", "0.5230229", "0.5223024", "0.5221436", "0.5219351", "0.5210436", "0.5204577", "0.52043194", "0.5198048", "0.5197137", "0.51950794", "0.519357" ]
0.0
-1
Set the item to highlight when the page is rendered out
function __construct($highlightItem = 'none') { $this->highlightItem = $highlightItem; //Group One $this->menuItems[0][] = ['/images/icons/envelope.png', '#', 'Admin Messages']; $this->menuItems[0][] = ['/images/icons/envelope.png', '#', 'Account Requests']; $this->menuItems[0][] = ['/images/icons/envelope.png', '#', 'Send Message']; //Group Two $this->menuItems[1][] = ['/images/icons/user.png', '/pages/admin/useradmin.php', 'User Admin']; $this->menuItems[1][] = ['/images/icons/staff-pick.png', '#', 'Product Admin']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function silo_highlights()\r\n\t{\r\n\t}", "public function silo_highlights()\n\t{\n\t}", "public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n }", "public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n\n }", "public function onRender()\n {\n $this->page['cssClass'] = $this->property('cssClass');\n\n }", "function setitemstate()\n\t{\n\t\tflexicontent_html::setitemstate($this, 'json', $_record_type = 'category');\n\t}", "public function highlight($highlight) {\n\t\t$this->_body['highlight'] = $highlight;\n\t\treturn $this ;\n\t}", "public function selected()\n {\n parent::selected();\n $this->enclosed = null;\n $this->escaped = false;\n $this->collected = '';\n }", "public function highlight($value) {\n return $this->setProperty('highlight', $value);\n }", "public function highlight($value) {\n return $this->setProperty('highlight', $value);\n }", "public function taxonomy_highlight() {\n\t\t\tglobal $current_screen, $taxnow;\n\n\t\t\tif ( is_a( $current_screen, 'WP_Screen' ) && ! empty( $taxnow ) && in_array( $taxnow, array( wct_get_tag(), wct_get_category() ) ) ) {\n\t \t\t\t$current_screen->post_type = $this->post_type;\n\t \t\t}\n\t\t}", "public function settings_menu_highlight() {\n\t\t\tglobal $parent_file, $submenu_file, $typenow;\n\n\t\t\t$parent_file = add_query_arg( 'post_type', $this->post_type, 'edit.php' );\n\t\t\t$submenu_file = add_query_arg( 'page', 'wc_talks', 'options-general.php' );\n\t\t\t$typenow = $this->post_type;\n\t\t}", "function BeforeMoveNextList(&$data, &$row, &$record, &$pageObject)\n{\n\n\t\t//Row Color Start\nif($data[\"is_urgent\"]==\"1\")\n{\n$row[\"rowstyle\"]=\"style=\\\"background:#FFCCCC\\\"\";\n}\n\n//Row Color End\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "function BeforeShowView(&$xt, &$templatefile, &$values, &$pageObject)\n{\n\n\t\t$xt->assign(\"bg_edit\",\"style=\\\"background-color:\" . $values[\"Color\"].\";\\\"\");\n;\t\t\n}", "function onRenderEnter();", "function setActive() ;", "function BeforeShowView(&$xt, &$templatefile, &$values, &$pageObject)\n{\n\n\t\tif ($values['Color']) {\n\t$xt->assign(\"bgc_category\",'style=\"background:'.$values['Color'].';\" ');\n}\n\n\n;\t\t\n}", "public function selected()\n {\n parent::selected();\n $this->name = '';\n }", "public function onRun()\n {\n $this->page['visible'] = $this->property('visible');\n $this->page['button'] = $this->property('button');\n }", "private function defineHighlight ($num) {\n $this->begin_hi = array();\n // strings for highlighting search terms \n for ($i = 0; $i < $num; $i++) {\n $this->begin_hi[$i] = \"<span class='term\" . ($i + 1) . \"'>\";\n }\n }", "public function Inserted() {\n\t\t\t// Define sub menu selection\n\t\t\t$GLOBALS['menu']['items']['opt1_css'] = 'details_item_on';\n\t\t\t// Render view\n\t\t\tView::render('itemsInserted');\n \t\t}", "function viewhighlight($id,$title,$path,$template,$group,$page=1,$descr='',$photo='',$price=0,$quant=1) {\n\t $pview = $this->view;//GetSessionParam(\"PViewStyle\"); //get saved view from products dpc !?\t\n\t \t\n\t $gr = urlencode($group);\n\t $ar = urlencode($title);\n\t \n\t $link = seturl(\"t=$pview&a=$ar&g=$gr&p=\" ,$title);\n\n\t $data[] = seturl(\"t=$pview&a=$ar&g=$gr&p=\" , \n\t \"<img src=\\\"\" . $photo . \"\\\" width=\\\"100\\\" height=\\\"75\\\" border=\\\"0\\\" alt=\\\"\". localize('_IMAGE',getlocal()) . \"\\\">\" );\n\t //\"<A href=\\\"$PHP_SELF?t=$this->view&a=$ar&g=$gr&p=\\\">\" . //$plink .\n\t // \"<img src=\\\"\" . $photo . \"\\\" width=\\\"100\\\" height=\\\"75\\\" border=\\\"0\\\" alt=\\\"\". localize('_IMAGE',getlocal()) . \"\\\">\" . \"</A>\";\n\t $attr[] = \"left;10%\";\n\t \n\t $data[] = \"<B>$link</B><br>\" . $descr . \"<B>\";\n\t $attr[] = \"left;50%;middle\";\n\t \n\t $data[] = /*localize('_PRICE',getlocal()) . \" :\" . */ \"<B>\" . str_replace(\".\",\",\",$price) . $this->moneysymbol . \"</B>\";\t \n\t $attr[] = \"center;20%;middle;;\" . $this->star . \";\";\t\t\t\t \n\n\t //$data[] = dpc_extensions(\"$id;$title;$path;$template;$group;$page;$descr;$photo;$price;$quant;\",$group,$page); \n\t $data[] = GetGlobal('controller')->calldpc_method(\"metacache.showsymbol use $id;$title;$path;$template;$group;$page;$descr;$photo;$price;$quant;+$group+$page\",1) .\n\t GetGlobal('controller')->calldpc_method(\"cart.showsymbol use $id;$title;$path;$template;$group;$page;$descr;$photo;$price;$quant;+$group+$page\",1) .\t \n\t GetGlobal('controller')->calldpc_method(\"neworder.showsymbol use $id;$title;$path;$template;$group;$page;$descr;$photo;$price;$quant;+$group+$page\",1);\t \n\t $attr[] = \"center;20%;middle\";\t\t \n\n\t \n\t $myarticle = new window('',$data,$attr);\n\t $out = $myarticle->render(\"center::100%::0::group_article_high::left::0::0::\"). \"<hr>\";\n\t unset ($data);\n\t unset ($attr);\n\n\t return ($out);\n }", "function BeforeMoveNextList(&$data, &$row, &$record, &$pageObject)\n{\n\n\t\t$record[\"bgColor\"]=$data[\"Color\"];\n;\t\t\n}", "public function setCurrentContentItem( $contentItem )\n {\n $this->currentContentItem = $contentItem;\n }", "public function setActive() {}", "public function setup_selected() {\n\t}", "function BeforeMoveNextList(&$data, &$row, &$record, &$pageObject)\n{\n\n\t\t$record[\"DisplayRoute_css\"]='color:red';\n\n// Place event code here.\n// Use \n;\t\t\n}", "function SetStyle( $item, $value )\r\n {\r\n $this->_style[$item] = $value;\r\n }", "public function click(): void\n {\n $this->itemsList->backToSidebar()->handleLink($this->itemsList->getName(), $this->getName());\n }", "public function setLiActiveClass(string $liActiveClass);", "public function reset()\n {\n parent::reset();\n $this->attr('Light');\n \n }", "protected abstract function beforeRendering(): void;", "protected function _beforeRender()\r\n {\r\n $this->_element->setAttributes($this->getAttribs());\r\n }", "function show_what($item) {\n if ( $item->active ==1 ) {\n return sprintf('<span style=\"color: red;\">%s</span>','Remove');\n } else {\n return sprintf('<span style=\"color: green;\">%s</span>','Apply');\n }\n }", "function highlight($path, $normal = 'normal', $selected = 'youarehere') {\n\t\t$class = $normal;\n\t\t$currentPath = substr($this->Html->here, strlen($this->Html->base));\n\t\t// if there is a star in the path we need to do different checking\n\t\t$regs = array();\n\t\tif (ereg($path,$currentPath,$regs)){\n\t\t\t$class .= \" \".$selected;\n\t\t}\n\t\treturn $class;\n\t }", "function drawSelectedProducts(){\n \n }", "protected function _post_render() {\n\t\n\t\t// Silence is golden\n\t\n\t}", "function style(){\r\n\t\tif (isset($_GET[\"page\"]) && is_numeric($_GET[\"page\"])) {\r\n\t\t\t$getPage = $_GET[\"page\"];\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$getPage = 0;\r\n\t\t}\r\n\t\techo \"#li\".$getPage.\"nk{color: #3e8958; text-decoration: underline;}\";\r\n\t}", "protected function __construct(){\n $this->_navigation = $this->_markActive($this->_filter($this->_getPages()));\n }", "function greenfields_add_active_class($classes, $item)\n{\n if (in_array('current-menu-item', $classes)) {\n $classes[] = \"active\";\n }\n\n return $classes;\n}", "function activeStyle()\r\n\t {\r\n\t \t$styleId = JRequest::getInt('id');\r\n\t \t$model = &$this->getModel('qrcode');\r\n\t \tif($model->changeStyle($styleId))\r\n\t \t{\r\n\t \t\t$msg = JText::_('COM_QRCODE_CONTROLLER_STYLE_ACTIVATE');\r\n\t \t}\r\n\t \telse \r\n\t \t{\r\n\t \t\t$msg = JText::_('COM_QRCODE_CONTROLLER_STYLE_NOT_ACTIVATE');\r\n\t \t}\t\r\n\t \t$link = JURI::base().'index.php?option=com_qrcode&layout=style';\r\n\t $this->setRedirect($link,$msg);\r\n\t }", "function viewhighlight_vertical($id,$title,$path,$template,$group,$page=1,$descr='',$photo='',$price=0,$quant=1) {\n\t $pview = $this->view;//GetSessionParam(\"PViewStyle\");\t//get saved view from products dpc !?\t\n\t $gr = urlencode($group);\n\t $ar = urlencode($title);\n\t \n\t $description = $title . \"\\n\". $descr . \"\\n\" . str_replace(\".\",\",\",$price) . $this->moneysymbol;\n\t \t \n\t //$link = \"<A href=\\\"$PHP_SELF?t=$this->view&a=$ar&g=$gr&p=\\\">\";\t\t\t \n\n\t $data[] = seturl(\"t=$pview&a=$ar&g=$gr&p=\" , \n\t \"<img src=\\\"\" . $photo . \"\\\" width=\\\"145\\\" height=\\\"95\\\" border=\\\"0\\\" alt=\\\"\". $description . \"\\\">\" );\n\t $attr[] = \"left\";\n\n\t $myarticle = new window('',$data,$attr);\n\t $out = $myarticle->render(\"center::100%::0::group_article_high::left::0::0::\");\n\t unset ($data);\n\t unset ($attr);\n\n\t return ($out);\n }", "public function setActive()\n\t\t{\n\t\t\t$this->_state = 1;\n\t\t}", "protected function onLoad()\n\t\t{\n\t\t\tparent::onLoad();\n\n\t\t\tif( $this->items->count > 0 )\n\t\t\t{\n\t\t\t\t$this->defaultHTMLControlId = $this->getHTMLControlId() . \"__0\";\n\t\t\t}\n\t\t}", "function highlight()\n{\n // echo \"data coming from hooks\";\n // intercept output\n $CI =& get_instance();\n $data = $CI->output->get_output();\n // find the quote and make it an array of words!\n // substr(string,start,length) method // 16 is for p tag stuff\n $quote = substr($data, strpos($data, '<p class=\"lead\">') + 16,\n strpos($data, '</p>') - (strpos($data, '<p class=\"lead\">') + 16));\n // get all the required data into aaray form \n $newdata = explode(\" \", $quote);\n // create new array for updated quote\n $requiredoutput = array();\n // iterate all the words and add strong tag to them, if there is any capital word \n foreach($newdata as $word)\n {\n if( preg_match(\"/[A-Z]+/\", $word) )\n {\n $word = \"<strong>\" . $word . \"</strong>\";\n }\n $requiredoutput[] = $word;\n }\n // put everything together\n $newquote = implode(\" \", $requiredoutput);\n $newquote = '<p class=\"lead\">' . $newquote . '</p>';\n $data = preg_replace('#<p class=\"lead\">.+</p>#', $newquote, $data);\n // output the page!\n $CI->output->set_output($data);\n $CI->output->_display();\n}", "private function markCurrentPage() {\n $this->pageReloadMarker = $this->randomMachineName();\n $this->getSession()->executeScript('document.body.appendChild(document.createTextNode(\"' . $this->pageReloadMarker . '\"));');\n }", "function setSelected($selected) {\r\n if ($this->list) {\n if ($selected) {\n $this->list->selectOption($this);\n } else {\n $this->list->deselectOption($this);\n }\n }\n }", "public function ajax_remove_highlight() {\n\t\tcheck_ajax_referer( self::REMOVE_ACTION_NONCE, 'security' );\n\n\t\t$failure_message = __( 'Removing Highlight Failed', 'stream' );\n\n\t\tif ( empty( $_POST['recordId'] ) ) {\n\t\t\twp_send_json_error( $failure_message );\n\t\t}\n\n\t\t$record_id = sanitize_text_field( wp_unslash( $_POST['recordId'] ) );\n\n\t\tif ( ! is_numeric( $record_id ) ) {\n\t\t\twp_send_json_error( $failure_message );\n\t\t}\n\t\t$record_obj = new \\stdClass();\n\t\t$record_obj->ID = $record_id;\n\t\t$record = new Record( $record_obj );\n\t\t$alerts_triggered = $record->get_meta( Alerts::ALERTS_TRIGGERED_META_KEY, true );\n\t\tif ( isset( $alerts_triggered[ $this->slug ] ) ) {\n\t\t\tunset( $alerts_triggered[ $this->slug ] );\n\t\t}\n\t\t$record->update_meta( Alerts::ALERTS_TRIGGERED_META_KEY, $alerts_triggered );\n\t\twp_send_json_success();\n\t}", "public function beforeRender($action){\r\n\t\tif ($action->get_id() == 10) \r\n\t\t\t$action->set_userdata(\"color\", \"pink\"); //mark event\r\n\t}", "public function beforeContent() {\n\t\t$menu = $this->document->getElementById($this->id);\n\t\tif($menu) {\n\t\t\t$this->document->addCss('public/css/simplemenu.css');\n\t\t\t$menu->removeAttribute('style');\n\n\t\t\t$menuList = $this->document->createElement('ul');\n\n\t\t\t$rq = new RequestHandler(DEFAULTPAGE, $this->basepath);\n\n\t\t\tforeach($this->menuItems as $lbl => $page) {\n\t\t\t\t$li = $this->document->createElement('li');\n\t\t\t\t$a = $this->document->createElement('a', $lbl);\n\t\t\t\t$a->setAttribute('href', $this->basepath.'/'.$page);\n\t\t\t\tif($rq->getPage() == $page)\n\t\t\t\t\t$li->setAttribute('class', 'selected');\n\t\t\t\t$li->appendChild($a);\n\t\t\t\t$menuList->appendChild($li);\n\t\t\t}\n\t\t\t$menu->appendChild($menuList);\n\t\t}\n\t}", "public function add_highlight_content($response) {\n if (!isset($response->highlighting)) {\n // There is no highlighting to add.\n return;\n }\n\n $highlightedobject = $response->highlighting;\n foreach ($response->response->docs as $doc) {\n $x = $doc->id;\n $highlighteddoc = $highlightedobject->$x;\n $this->merge_highlight_field_values($doc, $highlighteddoc);\n }\n }", "function render ()\n {\n parent::render();\n }", "function printItemNavbar( $text, $link, $actual, $index ) {\n\n // seta a classe\n $cl = $index == $actual ? 'active' : '';\n\n // imprime o item\n echo \"<a href='\".site_url( $link ).\"' class='nav-link $cl'>$text</a>\"; \n}", "protected function onBeforeRender() : void\n {\n }", "function set_active_nav_class ($classes, $item) {\n if (in_array('current-menu-item', $classes) ){\n $classes[] = 'activemenu ';\n }\n return $classes;\n}", "protected function beforeRender()\n\t{\n\t\tparent::beforeRender();\n\t\t$this->template->count = $this->menuManager->getTableRecord();\n\t}", "static function setGridItemState($griditem_id=0,$value='')\r\n\t{\r\n\t\t$foundlocation = self::searchGriditemById($griditem_id);\t\t\r\n\t\tif ($foundlocation['scene_id'] != '0')\r\n\t\t{\t\t\t\r\n\t\t\t$itemstate = self::getGridItemItemState($griditem_id,$value);\t\t\t\r\n\t\t\t$iteminfo = self::getGriditemsInfo();\r\n\t\t\t$item = $iteminfo[$foundlocation['scene_id']]['griditems'][$foundlocation['cell_id']];\r\n\t\t\t$item['itemstate_id'] = $itemstate[$griditem_id]->id;\r\n\t\t\t$iteminfo[$foundlocation['scene_id']]['griditems'][$foundlocation['cell_id']] = $item;\r\n\t\t\tself::setGriditemsInfo($iteminfo);\r\n\t\t\tStorydata::set($item['slug'],$value);\t\t\t\r\n\t\t}\r\n\t}", "public function testSetSelected()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "public function markCompeted() {\n $this->status = self::COMPLETED;\n }", "protected function renderSimulateUserSelectAndLabel() {}", "protected function _pre_render() {\n\t\t\n\t\t$str_classes = array();\n\t\tif ( is_string( $this->attributes['class'] ) ) {\n\t\t\t$str_classes = Halp::str_to_classes( $this->attributes['class'] );\n\t\t}\n\t\t\n\t\t$this->classes = array_merge($str_classes, $this->classes);\n\t\t\n\t\tif ( sizeof( $this->classes ) > 0 ) {\n\t\t\t$this->attributes['class'] = implode( ' ', $this->classes );\n\t\t}\n\t\telse {\n\t\t\t$this->attributes['class'] = null;\n\t\t}\n\t\t\n\t}", "function beforeRender(){\n\t\t//Check to see if the user has flagged the item\n\t\t$user_id = $this->Auth->user('id');\n\t\t$model = $this->modelClass;\n\t\t$flagged = $this->$model->Flag->hasUserFlagged($user_id,$model,$this->$model->id);\n\t\t$this->set(compact('flagged'));\n\t}", "public function preRender() {\n\t\tif ($this->hasOwnBoundObject()) {\n\t\t\t$this->ownBoundObject = $this->getBoundObject();\n\t\t}\n\t\tparent::preRender();\n\t}", "public function click() {\r\n\t\tswitch($this->current) {\r\n\t\t\tdefault:\r\n\t\t\t\t$this->current = self::SEA;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase self::ISLAND:\r\n\t\t\t\t$this->current = self::NONE;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase self::SEA:\r\n\t\t\t\t$this->current = self::ISLAND;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {\n $search = ['°'];\n $replace = ['°'];\n $id = (isset( $args->post_id )) ? (int)$args->post_id : false;\n $byID = $id ? ($id != $item->object_id) : false;\n if ( $byID ){\n $output .= sprintf( \"\\n<li><a href='%s'%s title='%s' >%s</a>\\n\",\n $item->url,\n ( $item->object_id === get_the_ID() ) ? ' class=\"current\"' : '',\n\t\t\t\t\t\tucfirst($item->title),\n strtoupper($item->title)\n );\n }\n \n }", "private function bindResolveItemEvent(): void\n {\n Event::listen('pages.menuitem.resolveItem', function ($type, $item, $currentUrl, $theme) {\n $this->setUserGroups();\n\n //Get the referenced CMS Page\n if (!$page = $this->getPage($theme, $item)) {\n return;\n }\n\n //Get the referenced CMS Layout\n $layout = $this->getLayout($page, $item, $theme);\n\n //Get the Session component security (user)\n $security = $this->getSecurity($page, $layout);\n\n //Get the session component allowed groups\n $allowedUserGroups = $this->getAllowedUserGroups($page, $layout);\n\n if ($this->shouldHideMenuItem($security, $allowedUserGroups)) {\n\n //Support older Rainlab.Pages. No longer works since 2019\n $item->viewBag['isHidden'] = '1';\n\n /**\n * $item object no longer used to generate the menu\n * so modifying $item->viewBag has no effect.\n * \n * As a workaround, we'll keep an internal counter to indicate\n * the menu item should be hidden, then check this in the \n * pages.menu.referencesGenerated event listener.\n */\n $this->shouldHideIndexes[$this->counter] = true;\n }\n $this->counter++;\n });\n }", "public function onPreRender($param)\n\t{\n\t\tparent::onPreRender($param);\n\t\t$this->getPage()->getClientScript()->registerPradoScript('jqueryui');\n\t\t$this->publishJuiStyle(self::BASE_CSS_FILENAME);\n\t}", "protected function controlActiveElements() {}", "function viewhighlight_horizontal($id,$title,$path,$template,$group,$page=1,$descr='',$photo='',$price=0,$quant=1) {\n\t $pview = $this->view;//GetSessionParam(\"PViewStyle\");\t//get saved view from products dpc !?\t\t\n\t $gr = urlencode($group);\n\t $ar = urlencode($title);\n\t \n\t $description = $title . \"\\n\". $descr . \"\\n\" . str_replace(\".\",\",\",$price) . $this->moneysymbol;\n\t \t \n\t //$link = \"<A href=\\\"$PHP_SELF?t=$this->view&a=$ar&g=$gr&p=\\\">\";\t\t\t \n\n\t //$data[] \n\t $out = seturl(\"t=$pview&a=$ar&g=$gr&p=\" , \n\t \"<img src=\\\"\" . $photo . \"\\\" width=\\\"80\\\" height=\\\"55\\\" border=\\\"0\\\" alt=\\\"\". $description . \"\\\">\" );\n\n\t return ($out);\n }", "protected function initPageRenderer() {}", "protected function initPageRenderer() {}", "public function Base_Render_Before($Sender) {\n // Add \"Mark All Viewed\" to main menu\n if ($Sender->Menu && Gdn::Session()->IsValid()) {\n if (C('Plugins.AllViewed.ShowInMenu', TRUE))\n $Sender->Menu->AddLink('AllViewed', T('Mark All Viewed'), '/discussions/markallviewed', 'li', array('class' => 'hidden-sm'));\n }\n }", "public function setSelectedIndex($index);", "private function resetCurrentItem()\n {\n $this->current_item = 0;\n }", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "function block__head(){\n\t\techo \"<style>\n\t\t\t.listing .even {\n\t\t\t\tbackground-color: #aaaaaa;\n\t\t\t}\n\t\t</style>\";\n\t}", "function afterRender() { \t \t\n \tif($this->params['controller'] == 'nodes') {\n \t\tif(($this->action == 'admin_add') || ($this->action == 'admin_edit')) {\n \t\t\techo $this->Html->css(array('/cycle/css/styles')); \t\n \t\t}\n \t}\n }", "public function before_render() {}", "abstract protected function setTemplate($item);", "public function getHighlight()\n {\n //\n if(Auth::user()->privileges_name=='ผู้ดูแลระบบ')\n {\n return view('admin.highlight');\n }\n\n return redirect('index');\n \n }", "function beforeRender()\n\t{\n\t}", "public function renderQuickEdit() {}", "public function hookAdminItemsSearch()\n {\n $html = '<div class=\"field\">';\n $html .= '<div class=\"two columns alpha\">';\n $html .= get_view()->formLabel('annotated', 'Annotation Status');\n $html .= '</div>';\n $html .= '<div class=\"inputs five columns omega\">';\n $html .= '<div class=\"input-block\">';\n $html .= get_view()->formSelect('annotated', null, null, array(\n '' => 'Select Below',\n '1' => 'Only Annotated Items',\n '0' => 'Only Non-Annotated Items'\n ));\n $html .= '</div></div></div>';\n echo $html;\n }", "public function render() {\n \t\tif (isset($_GET['eventId']) )\n\t\t\t$this->allElements[$_GET['eventId']]->callOnClickPreRenderFn();\n\n\t\tparent::render();\n \t\t\n\t\tif (isset($_GET['eventId']) )\n\t\t\t$this->allElements[$_GET['eventId']]->callOnClickPostRenderFn();\n\n\t}", "public function _afterLoad()\n {\n $this->_setStateText();\n return parent::_afterLoad();\n }", "public function setActive()\r\n {\r\n $this->active = true;\r\n }", "function loadListColor()\n\t{\n\t\tif($this->new_size)\n\t\t\t$this->list_color = 'orange';\n\t}", "static function sideSelect($item)\n\t{\n\t\treturn ($GLOBALS['subpg']==$item? ' class=\"sideCurr\"':'');\n\t}", "function smarty_outputfilter_highlight($source, &$smarty) {\n global $feature_referer_highlight;\n\n $highlight = $_REQUEST['highlight'];\n if(isset($feature_referer_highlight) && $feature_referer_highlight == 'y') {\n $refererhi = _refererhi();\n if(isset($refererhi) && !empty($refererhi)) {\n if(isset($highlight) && !empty($highlight)) {\n $highlight = $highlight.\" \".$refererhi;\n } else {\n $highlight = $refererhi;\n }\n }\n }\n if (!isset($highlight) || empty($highlight)) {\n return $source;\n }\n\n\t$beginTag = '<!--HIGHLIGHT BEGIN-->';\n\t$endTag = '<!--HIGHLIGHT END-->';\n\t\n\t$beginPosition = strpos($source, $beginTag);\n\t$endPosition = strpos($source, $endTag);\n\t//return \"beginPosition: $beginPosition<br/>endPosition: $endPosition<br/>\" . ((!empty($beginPosition) && !empty($endPosition)) ? \"ok\" : \"nao\");\n\t\n\tif (!empty($beginPosition) && !empty($endPosition)) {\n\t\t$begin = substr($source, 0, $beginPosition);\n\t\t$mid = substr($source, $beginPosition + strlen($beginTag), $endPosition - $beginPosition - strlen($beginTag));\n\t\t$end = substr($source, $endPosition + strlen($endTag));\n\t} else {\n\t // highlight não funciona mais sem as tags $beginTag e $endTag, pra evitar q ele seja chamado em vários níveis.\n\t return $source;\n\t}\n\t\n\t$source = ''; // save memory\n\t\n\tglobal $enlightPattern;\n\t$enlightPattern = _enlightColor($highlight); // set colors\n\t\n\t$mid = preg_replace_callback('/>([^<>]+)</', '_findMatch', $mid);\n\t\n\t$mid = preg_replace_callback(\"/tooltip\\('[^']+?'\\)/\",'_fixTooltip', $mid);\n\treturn $begin . $mid . $end;\n\n }", "public function renderDefault() \r\n {\r\n // Add navigation\r\n $this->addNavigation('Add new books', '');\r\n }", "function onRenderLeave();", "function drawStyle()\r\n\t{\r\n\t}", "public function postRender()\n {\n }", "public function highlight($path, $normal = '', $selected = 'active') {\n\t\t$class = $normal;\n\t\t$currentPath = substr($this->request->here, strlen($this->request->base));\n\t\tif (preg_match($path, $currentPath)) {\n\t\t\t$class .= ' ' . $selected;\n\t\t}\n\t\treturn $class;\n\t}", "function decode_highlight_search_results( $text ) {\n if ( is_search() ) {\n \t$sr = get_search_query();\n\t\t$keys = implode( '|', explode( ' ', get_search_query() ) );\n\t\tif ($keys != '') { // Check for empty search, and don't modify text if empty\n\t\t\t$text = preg_replace( '/(' . $keys .')/iu', '<mark class=\"search-highlight\">\\0</mark>', $text );\n\t\t}\n }\n return $text;\n}", "protected function getPageRenderer() {}", "function render(TreeElement $item)\n {\n }", "function render_nav_item( \\WP_Post $page ) {\n\n\t$classes = ['NavAccordion_Item'];\n\n\tif ( 'private' === get_post_status( $page->ID ) ) {\n\t\t$classes[] = 'Nav_Item-Private';\n\t}\n\n\tif ( is_nav_item_current( $page ) ) {\n\t\t$classes[] = 'NavAccordion_Item-Active';\n\t}\n\n\tprintf(\n\t\t'<li class=\"%s\"><a href=\"%s\" class=\"NavAccordion_Anchor\">%s</a>',\n\t\tesc_attr( implode( ' ', array_map( 'sanitize_html_class', $classes ) ) ),\n\t\tesc_url( get_permalink( $page->ID ) ),\n\t\tesc_html( $page->post_title )\n\t);\n\n\trender_nav_list( $page->ID );\n\n\techo '</li>';\n}", "protected function _getSelected()\n\t{\n\t\t$id = App::get('request')->getVar('cid', 0);\n\n\t\t$db = App::get('db');\n\t\t$query = $db->getQuery()\n\t\t\t->select('template_style_id')\n\t\t\t->from('#__menu')\n\t\t\t->whereEquals('id', (int) $id[0]);\n\t\t$db->setQuery($query->toString());\n\n\t\treturn $db->loadResult();\n\t}" ]
[ "0.66175944", "0.6518488", "0.58726484", "0.58433133", "0.58433133", "0.5763921", "0.57213485", "0.5694193", "0.56575364", "0.56575364", "0.55145687", "0.5392255", "0.53078914", "0.5307407", "0.5235218", "0.5213631", "0.51968914", "0.51597375", "0.50596887", "0.50484395", "0.5042865", "0.50246924", "0.49427837", "0.49262223", "0.491785", "0.49081972", "0.4907259", "0.48442516", "0.4832107", "0.47872347", "0.4766084", "0.4763479", "0.47536728", "0.4745185", "0.47333115", "0.4730108", "0.47270444", "0.4707103", "0.4704911", "0.46941316", "0.46910965", "0.46900332", "0.46809965", "0.4673663", "0.4672215", "0.4671136", "0.4669813", "0.46688038", "0.46669212", "0.46667245", "0.46666926", "0.46636498", "0.4663262", "0.46573353", "0.46359763", "0.46349362", "0.4631945", "0.46222788", "0.46101972", "0.46056277", "0.45922616", "0.4591529", "0.4583139", "0.45742723", "0.45711362", "0.45686436", "0.45666865", "0.45638525", "0.45611367", "0.45552915", "0.45552444", "0.45450744", "0.4541557", "0.4534394", "0.4528305", "0.4528305", "0.45275128", "0.4515386", "0.4497862", "0.44976225", "0.44877848", "0.44846585", "0.44783044", "0.44761685", "0.4473333", "0.44721958", "0.4470158", "0.44659594", "0.44582936", "0.44504243", "0.44499415", "0.4449755", "0.4443295", "0.44418", "0.4439684", "0.44318718", "0.44287935", "0.44154218", "0.44133547", "0.4408176" ]
0.54913384
11
POST Register/user Check availability of an username
public function checkAvailability() { $name = Helper::getParam('name'); $value = Helper::getParam('value'); return $this->view->json(['available' => $this->model->checkAvailability($name, $value)]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkUsernameAction() {\n\t\t\n\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\tif ($request->isPost()) {\n\t\t\t// get the json raw data\n\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t$http_raw_post_data = '';\n\t\t\t\n\t\t\twhile (!feof($handle)) {\n\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t}\n\t\t\tfclose($handle); \n\t\t\t\n\t\t\t// convert it to a php array\n\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\t\n\t\t\t$isFreeUsername = Application_Model_User::checkUsername($json_data);\n\t\t\t\n\t\t\tif($isFreeUsername) {\n\t\t\t\t// continue\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t// username exists already\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}\n\t}", "public function ajax_check_username() {\n\t\tglobal $wpdb;\n\n\t\tif ( !isset( $_REQUEST['action'] ) )\n\t\t\treturn;\n\n\t\tif ( 'visual_form_builder_check_username' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\t$username = esc_html( $_REQUEST['username'] );\n\t\t$user_id = username_exists( $username );\n\t\t$valid = 'true';\n\n\t\t// If username exists, not valid\n\t\tif ( $user_id )\n\t\t\t$valid = 'false';\n\n\t\techo $valid;\n\n\t\tdie(1);\n\t}", "function checkUser(){\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\n\t\t$app \t = JFactory::getApplication();\n\t\t$db \t = JFactory::getDbo();\n\t\t$inputstr = $app->input->get('inputstr', '', 'string');\n\t\t$name \t = $app->input->get('name', '', 'string');\n\t\n\t\tif($name == 'username'){\n\t\t\t$query \t = \"SELECT COUNT(*) FROM #__users WHERE username=\".$db->quote($inputstr);\n\t\t\t$msg = 'COM_JBLANCE_USERNAME_EXISTS';\n\t\t}\n\t\telseif($name == 'email'){\n\t\t\t$query \t = \"SELECT COUNT(*) FROM #__users WHERE email=\".$db->quote($inputstr);\n\t\t\t$msg = 'COM_JBLANCE_EMAIL_EXISTS';\n\t\t}\n\t\n\t\t$db->setQuery($query);\n\t\tif($db->loadResult()){\n\t\t\techo JText::sprintf($msg, $inputstr);\n\t\t}\n\t\telse {\n\t\t\techo 'OK';\n\t\t}\n\t\texit;\n\t}", "public function checkRegisterUser()\n {\n if ($this->input->post('username')) {\n $arr=$this->f_usersmodel->getField_array('users','username');\n $input=array('username'=>$this->input->post('username'));\n $rs['check']=true;\n $rs['mss']='';\n if(in_array($input,$arr)){\n $rs['check']=false;\n $rs['mss']='Tên đăng nhập này đã có người sử dụng !';\n }\n echo json_encode($rs);\n }\n }", "public function checkUserNameExist()\n {\n $collection = new AjaxModel();\n\n if ($collection->CheckUserName($_POST['username'])) {\n echo \"true\";\n } else {\n echo \"false\";\n }\n }", "public function checkUserExistsAjaxAction()\n {\n if(isset($_POST['Username']) && !empty($_POST['Username'])) {\n header('Content-type: text/plain');\n if(UserModel::userExists($this->filterString($_POST['Username'])) !== false) {\n echo 1;\n } else {\n echo 2;\n }\n }\n }", "public function check_username()\n\t\t{\n\t\t\t$username = $this->input->post('username');\n\t\t\t$where = array('username' => $username);\n\t\t\tif($this->Admin_model->check_exits($where)){\n\t\t\t\t$this->form_validation->set_message(__FUNCTION__, 'Tài khoản đã tồn tại');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "private function checkUsernameExist(){\n $base = new ConnexionDb();\n\n $req = $base->query(\n \"SELECT u.username FROM user as u WHERE u.username = :username\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR)\n )\n );\n\n if(isset($req[0]->username)){\n return true;\n }else{\n return false;\n }\n }", "function checkUsername(){\n\t\t$username\t= JRequest::getVar('username');\n\t\t$action = 'error';\n\t\t$row\t= true;\n\t\t$msg \t= JText::sprintf('CE_CF_USERNAME_IS_NOT_VALID',$username);\n\t\t$class\t= 'invalid';\n\t\t\n\t\t$pattern= '/^[a-z\\d_.]{3,20}$/i';\n\t\tif(preg_match($pattern, $username)){\n\t\t\t$db =& JFactory::getDBO();\n\t\t\t$query = \"SELECT id FROM #__users \"\n\t\t\t. \" WHERE username=\".$db->Quote($username)\n\t\t\t. \" LIMIT 1\";\n\t\t\t$db->setQuery($query);\n\t\t\t$row = $db->loadResult();\n\t\t}\n\t\t// There is no registered user by this username \n\t\tif ( !$row ) {\n\t\t\tif(JRequest::getVar('registration')){\n\t\t\t\t$action = 'success';\n\t\t\t\t$class\t= 'success';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_AVAILABLE',$username);\n\t\t\t}else{\n\t\t\t\t// user claims to be registered but is not\n\t\t\t\t$action = 'error';\n\t\t\t\t$class\t= 'invalid';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_NOT_VALID',$username);\n\t\t\t}\n\t\t}else{\n\t\t\tif(JRequest::getVar('registration')){\n\t\t\t\t$action = 'error';\n\t\t\t\t$class\t= 'invalid';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_NOT_AVAILABLE',$username);\n\t\t\t}else{\n\t\t\t\t$action = 'success';\n\t\t\t\t$class\t= 'success';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_VALID',$username);\n\t\t\t}\n\t\t}\n\t\t$json\t=array('action'=> $action, 'msg' => $msg, 'class' => $class );\n\t\t$this->jsonReturn($json);\n\t}", "private static function userExists() {\r\n\t\tif (!isset($_GET) || !isset($_GET['userName']))\r\n\t\t\treturn self::jsonError('User name missing from request.');\r\n\r\n\t\t// make sure user name is not already taken\r\n\t\tif (UsersDB::userExists($_GET['userName']))\r\n\t\t\treturn self::jsonResponse(true, true, null, 'User name already exists.');\r\n\r\n\t\treturn self::jsonResponse(true, false, null, 'User name does not exist.');\r\n\t}", "public function is_username_available() {\n\t\tif (User::where('username', $_GET['username'])->active()->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'success' => true\n\t\t\t], 200);\n\t\t} else {\n\t\t\treturn response()->json([\n\t\t\t\t'success' => false\n\t\t\t], 200);\n\t\t}\n\t}", "public function checkIfAvailable(){\n $user_check_query = self::$connection->db->prepare(\"SELECT * FROM users WHERE name = ? OR email = ?\");\n $user_check_query->bind_param(\"ss\", self::$signUpName, self::$signUpEmail);\n $user_check_query->execute();\n $users = $user_check_query->get_result()->fetch_assoc();\n $user_check_query->close();\n $nameError = false;\n $emailError = false;\n $_POST = array();\n if (isset($users)) {\n foreach($users as $key=>$value) {\n if (strtolower($users['name']) === strtolower(self::$signUpName) && !$nameError) {\n self::addError(\"signUp\", \"Name already exists.\");\n $nameError = true;\n Auth::CreateView('Auth');\n };\n if ($users['email'] === self::$signUpEmail && !$emailError) {\n self::addError(\"signUp\", \"Email already exists.\");\n $emailError = true;\n Auth::CreateView('Auth');\n };\n }\n } else if(count(self::$signUpErrors) === 0){\n $this->registering();\n return true;\n }\n }", "public function testRegisterUsedUsername() {\n\t\t$data = $this->getUserData(\n\t\t\t$this->username,\t\t\t// Already registered\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t\t$this->assertEquals(count($resp_data->messages), 1);\n\t}", "public function checkUsernameExists(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t//echo \"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"'\";\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' LIMIT 1\");\r\n\t\t\t\t$count= mysql_num_rows($result);\r\n\t\t\t\tif($count==0){\r\n\t\t\t\t\t//Username is available\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return true;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Username already taken.\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return false;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t//return false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function checkUsername()\n {\n $username = $this->input->post('username');\n\n $user_login_id = $this->authentication_helper->checkUsername($username);\n\n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(false);\n }\n else\n {\n echo json_encode(true);\n }\n }", "public function checkusernameTask()\n\t{\n\t\t// Incoming\n\t\t$username = Request::getString('userlogin', '', 'get');\n\n\t\t// Instantiate a new registration object\n\t\t$xregistration = new \\Components\\Members\\Models\\Registration();\n\n\t\t// Check the username\n\t\t$usernamechecked = $xregistration->checkusername($username);\n\n\t\techo json_encode($usernamechecked);\n\t\tdie;\n\t}", "public function username_exist($username) {\n\n $isExist = $this->User_m->username_exist_m($username);\n\n if($isExist) {\n $res['status'] = false;\n $res['message'] = 'Username already exist..! Pls Regenerate Username';\n http_response_code(404);\n echo json_encode($res);\n exit;\n }\n\n }", "public function checkusername()\n\t\t{\n\t\t\t$username = $_POST['owner_username'];\n\t\t\t$data = $this->UserModel->checkusername($username);\n\t\t\tif (empty($data)){\n\t\t\t\techo 'true';\n\t\t\t}else {\n\t\t\t\techo 'false';\n\t\t\t}\n\t\t}", "public function userExists( $user_name ) { return true;}", "public function register_user()\n {\n if (isset($_POST['btnRegister'])) {\n $username = $_POST['username_reg'];\n $password = $_POST['password'];\n $role = 2;\n\n //check Username ton tai hay khong ton tai\n $checkUsername = $this->UserModel->checkUsername($username);\n if ($checkUsername == 'true') {\n header(\"Location:../Register\");\n } else {\n // 2.INSERT DATA EQUAL USERS\n $rs = $this->UserModel->InserNewUser($username,$password,$role);\n // 3.SHOW OK/FAILS ON SCREENS\n header(\"Location:../Login\");\n }\n }\n }", "function registerUser()\n\t{\n\t\t$userName = $_POST['userName'];\n\n\t\t# Verify that the user doesn't exist in the database\n\t\t$result = verifyUser($userName);\n\n\t\tif ($result['status'] == 'COMPLETE')\n\t\t{\n\t\t\t$email = $_POST['email'];\n\t\t\t$userFirstName = $_POST['userFirstName'];\n\t\t\t$userLastName = $_POST['userLastName'];\n\n\t\t\t$userPassword = encryptPassword();\n\n\t\t\t# Make the insertion of the new user to the Database\n\t\t\t$result = registerNewUser($userFirstName, $userLastName, $userName, $email, $userPassword);\n\n\t\t\t# Verify that the insertion was successful\n\t\t\tif ($result['status'] == 'COMPLETE')\n\t\t\t{\n\t\t\t\t# Starting the session\n\t\t\t\tstartSession($userFirstName, $userLastName, $userName);\n\t\t\t\techo json_encode($result);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Something went wrong while inserting the new user\n\t\t\t\tdie(json_encode($result));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Username already exists\n\t\t\tdie(json_encode($result));\n\t\t}\n\t}", "public function username_check($user_name)\n {\n session_check();\n $user_id = $this->uri->segment(3);\n $user_id = empty($user_id) ? $this->session->userdata('user_id') : $user_id;\n if($this->uri->segment(2) == 'add' || $this->uri->segment(2) == 'Add')\n $user_id = 0;\n if($this->users_model->isusernameexist($user_name, $user_id))\n {\n $this->form_validation->set_message('username_check', $this->lang->line('validation_username_exist'));\n return FALSE;\n }else\n {\n return TRUE;\n }\n }", "public function doRegister(){\n\t\t\t$requestUser = $this->registerView->getRequestUserName();\n\t\t\t$requestPassword = $this->registerView->getRequestPassword();\n\t\t\t$requestRePassword = $this->registerView->getRequestRePassword();\n\t\t\t\n\t\t\tif($this->registerView->didUserPressRegister() ){\n\t\t\t\ttry{\n\t\t\t\tif($this->checkUsername($requestUser) && $this->checkPassword($requestPassword,$requestRePassword)){\n\t\t\t\t\t//create and add new user\n\t\t\t\t\t$newUser = new User($requestUser,$requestPassword);\n\t\t\t\t\t$this->userList->add($newUser);\n\t\t\t\t\t\n\t\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t\t$this->model->setSessionUsername($requestUser);\n\t\t\t\t\t$this->navView->clearURL();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch (UserFewCharException $ufce){\n\t\t\t\t\t$this->registerView->setErrorUsernameFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (UserBadCharException $udce){\n\t\t\t\t\t$this->registerView->setErrorUsernameInvalidChar();\n\t\t\t\t\t$this->registerView->setUsernameField(strip_tags($requestUser));\n\t\t\t\t} \n\t\t\t\tcatch (UserExistsException $uee){\n\t\t\t\t\t$this->registerView->setErrorUsernameExists();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordLenException $ple){\n\t\t\t\t\t$this->registerView->setErrorPasswordFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordMissmatchException $pme){\n\t\t\t\t\t$this->registerView->setErrorPasswordMatch();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t\tif(empty($requestUser) && empty($requestPassword) && empty($requestRePassword))\n\t\t\t\t\t$this->registerView->setErrorMissingFields();\t\t\n\t\t\t}\n\t\t}", "function _check_username_exist_create($username) {\n\n\t\t$this->load->model('user');\n\n\t\t$result = $this->user->check_username_exist($username);\n\n\t\t\n\n\t\tif ($result == TRUE) {\n\n\t\t\t$this->form_validation->set_message('_check_username_exist_create', 'The username \"'.$username.'\" already exists! Please pick a different username.');\n\n\t\t\treturn FALSE;\n\n\t\t} else {\n\n\t\t\treturn TRUE;\n\n\t\t}\n\n\t}", "function _check_username_exist_create($username) {\n\n\t\t$this->load->model('user');\n\n\t\t$result = $this->user->check_username_exist($username);\n\n\t\t\n\n\t\tif ($result == TRUE) {\n\n\t\t\t$this->form_validation->set_message('_check_username_exist_create', 'The username \"'.$username.'\" already exists! Please pick a different username.');\n\n\t\t\treturn FALSE;\n\n\t\t} else {\n\n\t\t\treturn TRUE;\n\n\t\t}\n\n\t}", "public function doRegister()\n {\n\n //check if all the fields are filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity based on filled data\n $userEntity = new User(Request::postData());\n\n //check if the user exists and get it as entity if exists\n if ($this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username/email already exists!\", \"type\" => \"error\")));\n exit;\n }\n\n //add the user into DB\n $this->repository->addUser($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"Your account has been created!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "function username_check($username)\r\n\t{\r\n\t\tif ( $user = $this->generic_model->get_where_single_row('users', array('username' => $username))) \r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('username_check', 'This %s is already registered.');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse { return true; }\t\t\r\n\t}", "function user_check_input()\n\t{\n\t\t$do_register = true;\n\t\t$cols = $this->DB->database_build_query('USER_INSERT');\n\t\t\n\t\t_validate_input($cols, $_POST, false);\n\t\t\n\t\t$rows = $this->DB->database_select('users', $cols, array('username' => $_POST['username']), 1); //Does username already exist\n\n\t\tif($rows != false)\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Username already exists\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\t$rows = $this->DB->database_select('users', 'email', array('email' => $_POST['email'])); //Does email already exist\n\t\t\t\n\t\tif($rows != false)\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Email address already exists\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif(empty($_POST['username']) || empty($_POST['password']) //Are primary fields empty\n\t\t || empty($_POST['password_confirm']) || empty($_POST['email']))\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"No fields can be left blank\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif(!preg_match(\"/^[A-Za-z0-9_\\-\\.]+@[A-Z0-9a-z]+\\.[a-zA-Z]{2,5}\\.?[a-zA-Z]*$/\", trim($_POST['email']))) //Check email format\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Invalid email address\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif($_POST['password'] !== $_POST['password_confirm']) //Confirm that passwords match\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Passwords do not match\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif(strlen($_POST['password']) < 6 || strlen($_POST['password']) > 12) //Confirm password validity\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Password must be between 6 and 12 characters\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif(!preg_match(\"/([a-zA-Z])/\", $_POST['password']) || !preg_match(\"/([0-9])/\", $_POST['password']))\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Password must be contain both numbers and letters\");\n\t\t\t$do_register = false;\n\t\t}\n\t\t\n\t\tif (empty($_SESSION['captcha']) || trim(strtolower($_REQUEST['captcha'])) != $_SESSION['captcha']) //Check captcha\n\t\t{\n\t\t\t$this->errorsrv->set_error(\"Invalid captcha\");\n\t\t\t$do_register = false;\t\n\t\t}\n\t\t\n\t\treturn $do_register;\n\t}", "function checkUserExists($username){\n\treturn false;\n}", "public function postName(Request $request)\n {\n $user = User::where('username', $request->username)->count();\n $exists = $user > 0 ? \"<small class='form-text text-danger'>Sorry, <strong>\" . $request->username . \"</strong> is already registered</small>\" :\n \"\";\n return response($exists);\n }", "public function register_action() \n\t{\n $rules = array(\n 'username' => 'required',\n 'email' => 'valid_email|required',\n 'password' => 'required',\n 'password2' => 'required',\n 'securityq1' => 'required',\n 'securityq2' => 'required',\n 'securitya1' => 'required',\n 'securitya2' => 'required',\n\n );\n \n // Readible array\n $readible = \n [ \n 'securityq1' => 'Security Queston 1',\n 'securityq2' => 'Security Queston 2',\n 'securitya1' => 'Security Answer 1',\n 'securitya2' => 'Security Answer 2'\n ];\n\n // readible inputs\n FormValidation::set_field_names($readible);\n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n\n UserModel::register();\n }", "public function register() {\n\t\tif($this->isPost()) {\n\t\t\treturn $this->registerUser();\n\t\t}\n\t\techo json_encode(['success' => false, 'message' => 'Check method type!']);\n\t}", "public function register() {\n\n // If it is not a valid password\n if (!$this->valid_password()) {\n return \"Invalid Password. It must be six characters\";\n }\n\n // If the mobile is valid\n if (!$this->valid_mobile()) {\n return \"Mobile Number is Invalid. It must be 10 numeric digits\";\n }\n\n // If there is a user with that username\n if (User::find($this->username, 'username') !== null) {\n return \"Username already taken\";\n }\n\n // Now we create the user on the database\n if ($this->create_record()) {\n echo \"<br><br>Record Created\";\n // We update the sync the object with the database\n if ($this->update_object('username')) {\n return true;\n echo \"<br><br>Object Updated\";\n }\n }\n\n return \"Sorry, an error has ocurred. Try again later\";\n }", "function userExists( $username ) {\n return true;\n }", "public function iN_CheckUsernameExistForRegister($username) {\n\t\t$username = mysqli_real_escape_string($this->db, $username);\n\t\t$checkUsername = mysqli_query($this->db, \"SELECT i_username FROM i_users WHERE i_username = '$username'\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($checkUsername) == 1) {\n\t\t\treturn true;\n\t\t} else {return false;}\n\t}", "function checkUserAvail() {\n $this->load->model('Usermodel');\n $this->load->library('form_validation');\n $this->load->helper('form');\n $this->load->helper('string');\n $this->load->library('encrypt');\n $this->load->library('parser');\n $this->load->library('email');\n\n if (!$this->checkAccess('ADD_USER')) {\n show_error('You do not have permission to access this resource!');\n }\n //validation check\n $this->form_validation->set_rules('username', 'Username', 'trim|required|callback_chkusername');\n if ($this->form_validation->run() == FALSE) {\n echo 0;\n } else {\n echo 1;\n }\n }", "function verify_username_availability($userName){\n $exists = false;\n if(get_user($userName)){\n $exists = true;\n }\n return $exists;\n}", "public function registerAction()\n {\n Lb_Points_Helper_Data::debug_log(\"Registration request sent to LB\", true);\n $txtName = $_POST['txtName'];\n $txtEmail = $_POST['txtEmail'];\n $txtPhoneNumber = $_POST['txtPhoneNumber'];\n $result = Lb_Points_Helper_Data::registerUser($txtName,$txtEmail,$txtPhoneNumber);\n echo json_encode($result);\n }", "function username_exists(){\n //include connection.php\n include \"connection.php\";\n $rowdata=$_POST['data'];\n $username=$rowdata[4];\n \n //create a query that will check if username is taken\n $qrystring=\"SELECT * FROM tblusers \n WHERE username='$username'\"; \n $query=mysqli_query($db,$qrystring);\n //check how many rows does the query returned\n // (0=no match,1 means have match)\n if(mysqli_num_rows($query)>0){\n\treturn true;\t//taken sudah\n }\n else{\n\treturn false;\t//balum taken\n }\t\n mysqli_close($db);\n\n}", "public function check_username(){\n\t\tif(isset($_POST[\"submit\"])){\n\t\t\t$user = $_POST[\"uname\"];\n\t\t\t$query = $this->db->query(\"SELECT * \n\t\t\t\t\t\t\t\t\t\tFROM admin \n\t\t\t\t\t\t\t\t\t\tWHERE username LIKE '$user'\");\n\t\t\treturn $query->num_rows();\n\t\t}\n\t}", "public function register_post()\n\t{\n\t\t$array['username'] = strtolower($this->post('username'));\n\t\t$array['email'] = strtolower($this->post('email'));\n\t\t$array['password'] = hash('sha512', $this->post('password'));\n\n\t\t$error = [];\n\n\t\tif (!filter_var($array['email'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t$error[] = 'Invalid email format.';\n\t\t}\n\t\tif (!preg_match('/^[A-Za-z][A-Za-z0-9]{5,100}$/', $array['username'])) {\n\t\t\t$error[] = 'Invalid username format. Only alphabets & numbers are allowed.';\n\t\t}\n\n\t\tif (!empty($error)) {\n\t\t\t$this->response(['status' => FALSE, 'error' => $error], REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\n\t\tif (empty($array['username'])) {\n\t\t\t$this->response(['status' => FALSE, 'error' => 'Username is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t} else if (empty($array['email'])) {\n\t\t\t$this->response(['status' => FALSE, 'error' => 'Email is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t} else if (empty($array['password'])) {\n\t\t\t$this->response(['status' => FALSE, 'error' => 'Password is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t} else {\n\t\t\t$data = $this->api_model->register($array);\n\t\t\tif ($data === FALSE) {\n\t\t\t\t$this->response(['status' => FALSE, 'error' => 'Email or username already registered.'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t} else {\n\t\t\t\t$this->response(['status' => TRUE, 'message' => 'Account registered successfully.'], REST_Controller::HTTP_OK);\n\t\t\t}\n\t\t}\n\t}", "function _validate_pnhempusername()\r\n\t{\r\n\t\t$username = $this->input->post('username');\r\n\t\tif($this->db->query('select count(*) as t from king_admin where username = ? ',$username)->row()->t)\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('_validate_pnhempusername','Username already available');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function checkuser($user_name)\n\t{\n\t\t$checkid=mysql_query(\"select user_id from registration where user_name='$user_name' or user_id='$user_name'\");\n\t\t\tif(mysql_num_rows($checkid)>0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn true;\n\t}", "function login_name(){\n\t\tif(isset($_POST[\"user_name\"])){\n\t\t\t$user_name=$_POST[\"user_name\"];\n\t\t\t$valid='TRUE';\n\t\t\t$data[\"check_name\"]=$this->db->query(\"SELECT * FROM user_account WHERE user_name='$user_name'\"); \n\t\t\tif($data[\"check_name\"]->num_rows() > 0){\n \t\t\techo \"true\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"false\";\n\t\t\t}\n\t\t}\n\t}", "public function check_signup_availability() {\n if ($this->input->is_ajax_request() == TRUE) {\n\n //--- start loading model ---//\n $this->load->model('Userdb', '', TRUE);\n\n //--- end loading model ---//\n // Collect @parameter_string...\n $to_check = $this->input->post('to_check');\n $val = $this->input->post('val');\n\n // If var @to_check == 'username', check for username existence...\n if ($to_check == 'username') {\n\n $rec_num = $this->Userdb->username_exist($val);\n }\n // If var @to_check == 'email', check for email existence...\n else {\n $rec_num = $this->Userdb->email_exist($val);\n }\n\n echo $rec_num;\n exit();\n } else {\n redirect(base_url());\n }\n }", "public function register_user()\n {\n \n return true;\n \n }", "function username_exists($username){\n global $connection;\n\n $query = \"SELECT user_name FROM users WHERE user_name = '{$username}'\";\n $result = mysqli_query($connection, $query);\n confirm($result);\n\n //if the username column name already has a value that is given by the user when registering\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n}", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "function register(){\n\t\t\t$this->__dataDecode();\n\t\t\t\t$data = $this->data;\n\t\t\t\t$username = $data['User']['userName'];\n\t\t\t\t$response\t= array();\n\t\t\t\t$emptyuserName = $this->User->findByUsername($username);\n\t\t\t \t$emptyEmail = $this->User->findByEmail($this->data['User']['email']);\n\t\t\t\n\t\t\t \t\n\t\t\tif(isset($this->data['User']['password']))\n\t\t\t{\n\t\t\t\t$this->data['User']['confirm_password'] = $this->data['User']['password'] \t= md5($this->data['User']['password']);\n\t\t\t\t$this->data['User']['email_confirmation']\t= 1;\n\t\t\t\t$this->data['User']['status']\t\t\t= 1;\n\t\t\t\t$data = $this->data;\n\t\t\t\t$data['User']['firstname']=$this->data['User']['firstName'];\n\t\t\t\t$data['User']['lastname']=$this->data['User']['lastName'];\n\t\t\t\t$data['User']['username']=$this->data['User']['userName'];\n\t\t\t\t}\n\n\t\t\tif(!($this->__validEmail($this->data['User']['email'])) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Please enter a valid email.';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t \t}\n\t\t\tif(!empty($emptyuserName) && !empty($data['User']['username']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'userName Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\n\t\t\t}\n\t\t\tif(!empty($emptyuserName) && !empty($data['User']['username']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'userName Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\n\t\t\tif(!empty($emptyEmail) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Email Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\n\t\t\t}\n\t\t\tif(!empty($emptyemail) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'email Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\tif(!($this->validateUSAZip($this->data['User']['zip'])) && !empty($this->data['User']['zip']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Please enter a valid Zip Code.';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t \t}\n\t\t\n\t\t\telse if($this->User->save($data))\n\t\t\t{\n\t\t\t\t$message\t= \"registered successfully\";\n\t\t\t\t$response['error']\t= 0;\n\t\t\t\t$response['response']['result'] = 'success';\n\t\t\t\t$response['response']['message'] = 'registered successfully';\n\t\t\t\t$this->set('response', $response);\t\t\t\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['result'] = 'failure';\n\t\t\t\t$response['response']['message']\t= 'registered unsuccessfully';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\n\t\t\techo json_encode($response);\n\t\t\tdie();\n\t\t}", "function validateUser($username){\n\t\tglobal $dataModel;\n\n\t\tif($dataModel->userExist($username, \"\")){\n\t\t\t$_SESSION['error'] = \"Username already taken\";\n\t\t\theader(\"location:../views/profUpdate.php\");\n\t\t}\n\t\n\t\tif (strlen($username)< 6){\n\t\t\t$_SESSION['error'] = \"Username too short\";\n\t\t\theader(\"location:../views/profUpdate.php\");\n\t\t}\n\n\t\treturn true;\n\t}", "public function isUsernameAvailable($username){\n \n $con=Connection::createConnection();\n $result = mysql_query(\"SELECT * FROM user WHERE nickname = '$username'\");\n $flagToReturn=false;\n \n if(mysql_num_rows($result) == 1){\n //already exist\n }else{\n $flagToReturn=true;\n }\n NetDebug::trace($flagToReturn);\n Connection::closeConnection($con);\n return $flagToReturn;\n \n }", "public function testRegisterSmallUsername() {\n\t\t$data = $this->getUserData(\n\t\t\t't',\t\t\t\t\t\t// 1 char\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t\t$this->assertEquals(count($resp_data->messages), 1);\n\t}", "function validate_user_signup()\n {\n }", "public function check_username_exists($username){\n\t\t\t$this->form_validation->set_message('check_username_exists', 'That username is taken. Please choose a different one');\n\t\t\tif($this->um->check_username_exists($username)){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function actionCheckUser()\n {\n if(isset($_POST['user'])) {\n $email = $_POST['user'];\n\n $users = TUsers::model()->findAllByAttributes(array('username'=>$email));\n $users_count = count($users);\n\n if($users_count > 0)\n {\n echo '<span style=\"color:green\">This User <strong>' . $email . '</strong>' .\n ' is registered.</span>';\n }\n else\n {\n echo '<span style=\"color:red\"> User Does Not Exist.</span>';\n }\n\n }\n }", "public function check_username($str){\n\n\t\t$data = array(\n\t\t\t'id_usuario'=>$this->input->post('id_usuario'),\n\t\t\t'username' =>$str\n\t\t);\n\n\t\tif($this->Usuarios_model->check_username($data)){\n\t\t\t$this->form_validation->set_message('check_username', 'El nombre de usuario ya se encuentra registrado para otro usuario');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\n\t}", "public function checkForm()\n\t{\n\t\t$name = $_POST['name'];\n\t\t$email = $_POST['email'];\n\t\t$pass = $_POST['pass'];\n\t\t$conf_pass = $_POST['conf_pass'];\n\t\t$result = $this -> facade -> checkRegister($name, $email, $pass,\n\t\t$conf_pass);\n\t\tif($result === true)\n\t\t{\n\t\t\t$add = $this -> facade -> addUser();\n\t\t\t$data = $this -> facade -> getArray();\n\t\t\t$this -> view -> showForm($data);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = $this -> facade -> getArray();\n\t\t\t$this -> view -> showForm($data);\n\t\t\treturn true;\n\t\t}\n\t}", "public function _userexists($input) {\n\n\t\t$prepare \t= $this->db->prepare(\"SELECT * FROM `users` WHERE `username` = ?\");\n\t\t$prepare->execute(array(r::post($input)));\n\t\t$result \t= $prepare->fetch();\n\n\t\tif(!empty($result)) {\n\t\t\treturn true;\n\t\t}\n\t}", "private function username_check($username){\n\t\tif(strlen($username) > REGISTER_USERNAME_MAX_LENGTH) {\t// check if username is less than max len\n\t\t\t$this->error .= \"Username must be less than \" . REGISTER_USERNAME_MAX_LENGTH . \" characters.\\n\"; // error username is >= max len\n\t\t\treturn false;\n\t\t}\n\n\t\tif($stmt = $this->Mysqli->prepare(\"SELECT username FROM players WHERE username = ? LIMIT 1\")){ // prepare select query to check if username exists\n\t\t\t$stmt->bind_param('s', $username);\t\t\t\t\t\t// bind params\n\t\t\t$stmt->execute();\t\t\t\t\t\t\t\t\t\t// execute\n\t\t\t$stmt->store_result();\t\t\t\t\t\t\t\t\t// store the results\n\n\t\t\t$updated = $stmt->num_rows == 1;\n\n\t\t\t$stmt->free_result();\t\t\t\t\t\t\t\t\t// free results\n\t\t\t$stmt->close();\t\t\t\t\t\t\t\t\t\t\t// close connection\n\t\t\tif($updated){\t\t\t\t\t\t\t\t\t\t\t// check if row exists\n\t\t\t\t$this->error .= \"This username already exist!\\n\"; \t// error username exists\n\t\t\t\treturn false;\n\t\t\t} else\n\t\t\t\treturn true;\t\t\t\t\t\t\t\t\t\t// username dne, return true\n\t\t} else {\n\t\t\t$this->error .= \"Error reaching servers, please try again later.\\n\";\n\t\t\treturn false;\n\t\t}\n\t}", "function register()\n{\n $_POST['action'] = \"register\";\n\n $username = @$_POST[\"Username\"];\n $password = @$_POST[\"Password\"];\n\n if (isset($username) && isset($password)) {\n creatUser();\n require \"view/home.php\";\n } else\n\n require \"view/register.php\";\n}", "public function registrationValidation() \n { \n if ($this->WishlistModel->usernameCheck()) \n { \n\t\t\t$this->form_validation->set_message('registrationValidation', 'Username is already in use'); \n return false; \n } else { \n return true; \n } \n }", "public function hasUsername() : bool;", "public function check_username_exists($username){\n $this->form_validation->set_message('check_username_exists', 'Usrname Sudah diambil. Silahkan gunakan username lain');\n if($this->m_login->check_username_exists($username)){\n return true;\n } else {\n return false;\n }\n }", "public function isReg($userName){\r\n try{\r\n $stmt = $this->query(\"SELECT 1 FROM users WHERE username = :username\");\r\n $stmt->bindParam(\":username\", $userName, PDO::PARAM_STR);\r\n $stmt->execute();\r\n if($stmt->rowCount() == 1)\r\n return true;\r\n else\r\n return false;\r\n }\r\n catch(PDOException $exception){\r\n echo (\"is registered ERROR: \" . $exception->getMessage());\r\n }\r\n }", "public function register(){\n\t\t// if the incoming request is of type $_POST[], process it.\n\t\t// else load the form\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST'){ // if POST request, run the validation proccess.\n\t\t\tif (isset($_POST['user_name']))\n\t\t\t\t$user_name = trim($_POST['user_name']);\n\t\t\tif (isset($_POST['email']))\n\t\t\t\t$email = trim($_POST['email']);\n\t\t\t$data = [\n\t\t\t\t'user_name'\t\t\t=> $user_name, //store values here so the user doesnt have to retype it.\n\t\t\t\t'email'\t\t\t\t=> $email,\n\t\t\t\t'password'\t\t\t=> '',\n\t\t\t\t'confirm_password'\t=> '',\n\t\t\t\t'name_error'\t\t=> '',\n\t\t\t\t'email_error'\t\t=> '',\n\t\t\t\t'password_error'\t=> '',\n\t\t\t\t'confirm_password_error' => ''\n\t\t\t];\n\n\t\t\tif (empty($user_name)){\n\t\t\t\t$data['name_error'] = 'Choose a user name.';\n\t\t\t} else {\n\t\t\t\tswitch (1337) {\n\t\t\t\t\tcase strlen($user_name) < 4 : \n\t\t\t\t\t\t$data['name_error'] = 'User name must be 4 characters or longer.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase strlen($user_name) > 16 :\n\t\t\t\t\t\t$data['name_error'] = 'User name must be 15 characters or shorter.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase !preg_match('/^[A-Z]([a-z0-9])*([_-]){0,1}([a-z0-9])+$/', $user_name) :\n\t\t\t\t\t\t$data['name_error'] = 'User name must start with capital letter and contain characters from A-Z a-z, 0-9, one hyphen at max.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase $this->userModel->userNameExists($user_name) :\n\t\t\t\t\t\t$data['name_error'] = 'User name is taken';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$data['user_name'] = $user_name;\n\t\t\t\t\t\t$data['name_error'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($email)){\n\t\t\t\t$data['email_error'] = 'Please provide your email address.';\n\t\t\t} else {\n\t\t\t\tswitch (1337) {\n\t\t\t\t\tcase !filter_var($email, FILTER_VALIDATE_EMAIL) :\n\t\t\t\t\t\t$data['email_error'] = 'Please provide a valid email address.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase $email !== filter_var($email, FILTER_SANITIZE_EMAIL) :\n\t\t\t\t\t\t$data['email_error'] = 'Please provide a valid email address!';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase $this->userModel->emailExists($email) :\n\t\t\t\t\t\t$data['email_error'] = 'Email already exists.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$data['email'] = $email;\n\t\t\t\t\t\t$data['email_error'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($_POST['password'])){\n\t\t\t\t$data['password_error'] = 'Password can\\'t be empty';\n\t\t\t} else {\n\t\t\t\tswitch (1337) {\n\t\t\t\t\tcase strlen($_POST['password']) > 25 :\n\t\t\t\t\t\t$data['password_error'] = 'Your password should be 25 characters or shorter';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase strlen($_POST['password']) < 5 :\n\t\t\t\t\t\t$data['password_error'] = 'Your password should be 5 characters or longer';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase !preg_match('/^(?=.*\\d)(?=.*[A-Za-z])[A-Za-z\\d]{5,25}$/', $_POST['password']) :\n\t\t\t\t\t\t$data['password_error'] = 'Your password should contain and at least 1 digit and 1 character';\t\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$data['password'] = $_POST['password'];\n\t\t\t\t\t\t$data['password_error'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($_POST['confirm_password'])){\n\t\t\t\t$data['confirm_password_error'] = 'Please confirm your password.';\n\t\t\t} else {\n\t\t\t\tswitch (1337) {\n\t\t\t\t\tcase $_POST['confirm_password'] !== $data['password'] :\n\t\t\t\t\t\t$data['confirm_password_error'] = 'Password does not match.';\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$data['confirm_password'] = $_POST['confirm_password'];\n\t\t\t\t\t\t$data['confirm_password_error'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// registration data is good. send query to model. else reload register page with appropriate errors.\n\t\t\tif (empty($data['name_error']) && empty($data['email_error'])\n\t\t\t\t&& empty($data['password_error']) && empty($data['confirm_password_error'])){\n\t\t\t\t$data['password'] = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\t\t\t\tif ($this->userModel->registerUser($data)){\n\t\t\t\t\t$link = '<a target=\"_blank\" href=\"' . URLROOT . '/users/login?xjk=' . base64_url_encode($this->userModel->getUserId($data['user_name'])) . '&hr=' . md5($data['user_name']) .'\">Click here</a>';\n\t\t\t\t\tmail($data['email'], 'Verify email', 'Hello ' . $data['user_name'] . PHP_EOL . 'Please verify your email by visiting the following link :' . PHP_EOL . $link);\n\t\t\t\t\t$this->view('users/login', $data); // redirect through url to login page\n\t\t\t\t} else {\n\t\t\t\t\t$data['name_error'] = 'Something went wrong!!!';\n\t\t\t\t\t$this->view('users/register', $data); // data is valid but something went wrong in model\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\t$this->view('users/register', $data); // data is not valid\n\n\t\t} else {\n\t\t\t$data = [\n\t\t\t\t'user_name'\t\t\t=> '', // not POST request => load register page with empty data\n\t\t\t\t'email'\t\t\t\t=> '',\n\t\t\t\t'password'\t\t\t=> '',\n\t\t\t\t'confirm_password'\t=> '',\n\t\t\t\t'name_error'\t\t=> '',\n\t\t\t\t'email_error'\t\t=> '',\n\t\t\t\t'password_error'\t=> '',\n\t\t\t\t'confirm_password_error' => ''\n\t\t\t];\n\t\t\t$this->view('users/register', $data);\n\t\t}\n\t}", "public function regNewUser( $data ){\n\n\t\t$success = parent::regNewUser( $data );\n\t\n\t\tif( is_array( $success ) ){\n\t\t \treturn $this->createAnswer( 1,\"Username or email already exist\",403 );\n\t\t}elseif ( $success ){\n\t\t\treturn $this->createAnswer( 0,\"Congratulation you got permission\" );\n\t\t}else{\n\t\t return $this->createAnswer( 1,\"invalid query\",402 );\n\t\t}\n\t}", "public function userExists()\n {\n $action = __NAMESPACE__ . '\\actions\\UserExists';\n\n $result = $this->actionController->executeAction($action);\n $content = ($result->getSuccess()) ?: 'That Username Does Not Exist';\n\n $result->setContent($content)\n ->Render();\n }", "function username_exists($username)\n {\n global $connection;\n $query = \"select username from users where username = '{$username}'\";\n $result = mysqli_query($connection, $query);\n confirmQuery($result);\n if(mysqli_num_rows($result) > 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function registerUser(){\r\n\t\t$name = $_POST['register_name'];\r\n\t\t$email = $_POST['register_email'];\r\n\t\t$password = $_POST['register_password'];\r\n\r\n\t\t$sql = \"INSERT INTO users values (null,?,?,?)\";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$name,$email,$password]);\r\n\t\t//ako je registracija uspela pojavice se div u formu sa ispisom notifikacije!!!\r\n\t\tif ($query) {\r\n\t\t\t$this->register_result=true;\r\n\t\t}\r\n\t}", "public function registerUserAction() {\n\t\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\t\tif ($request->isPost()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// get the json raw data\n\t\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t\t$http_raw_post_data = '';\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t\t}\n\t\t\t\tfclose($handle); \n\t\t\t\t\n\t\t\t\t// convert it to a php array\n\t\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\n\t\t\t\t//echo json_encode($json_data);\n\t\t\t\t\n\t\t\t\tif (is_array($json_data)) {\n\t\t\t\t\t// convert it back to json\n\t\t\t\t\t\n\t\t\t\t\t// write the user back to database\n\t\t\t\t\t$registered = Application_Model_User::registerUser($json_data);\n\t\t\t\t\t\n\t\t\t\t\tif($registered) {\n\t\t\t\t\t\techo json_encode($registered);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\techo 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}", "function signUp() {\n if ($this->getRequestMethod() != 'POST') {\n $this->response('', 406);\n }\n \n $user = json_decode(file_get_contents('php://input'),true);\n if (!self::validateUser($user['username'], $user['password'])) {\n $this->response('', 406);\n }\n\t \n\t // check if user already exists\n\t $username_to_check = $user['username'];\n\t $query = \"select * from users where username='$username_to_check'\";\n\t $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\t\n\t if ($r->num_rows > 0) {\n\t \t$this->response('', 406);\n\t }\t\n\t\n $user['password'] = self::getHash($user['username'], $user['password']);\n $keys = array_keys($user);\n $columns = 'username, password';\n $values = \"'\" . $user['username'] . \"','\" . $user['password'] . \"'\"; \n $query = 'insert into users (' . $columns . ') values ('. $values . ');';\n \n if(!empty($user)) {\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => 'Success', 'msg' => 'User Created Successfully.', 'data' => $user);\n $this->response(json_encode($success),200);\n } else {\n $this->response('',204);\n }\n }", "public function register() {\n\n define('KDEBUG_JSON', true);\n\n $errors = array();\n $success = true;\n\n $slug = user::generateUniqueUsername($_REQUEST['username']);\n if (!isset($_REQUEST['username']) || empty($_REQUEST['username']) || $_REQUEST['username'] == 'Full name') {\n $errors['register_username'] = 'You must specify your Full Name';\n $success = false;\n } elseif (user::findOne(array('slug' => $slug))) {\n $errors['register_username'] = 'This username already exists';\n $success = false;\n }\n\n if (!isset($_REQUEST['email']) || empty($_REQUEST['email']) || $_REQUEST['email'] == 'email address') {\n $errors['register_email'] = 'You must specify an e-mail address';\n $success = false;\n } elseif (!filter_var($_REQUEST['email'], FILTER_VALIDATE_EMAIL)) {\n $errors['register_email'] = 'Invalid e-mail address';\n $success = false;\n } elseif (user::findOne(array('email' => $_REQUEST['email'])) != null) {\n $errors['register_email'] = 'This e-mail address already exists';\n $success = false;\n }\n\n\n if (!isset($_REQUEST['password']) || empty($_REQUEST['password']) || $_REQUEST['password'] == 'password') {\n $errors['register_password'] = 'You must specify a password';\n $success = false;\n } elseif (user::verify('password', $_REQUEST['password']) !== true) {\n $errors['register_password'] = user::verify('password', $_REQUEST['password']);\n $success = false;\n }\n\n if ($_REQUEST['password'] != $_REQUEST['verify']) {\n $errors['register_verify'] = 'Your passwords do not match';\n $success = false;\n }\n\n if ($success) {\n\n // create our new user\n $user = new user();\n $user->email = $_REQUEST['email'];\n $user->username = $_REQUEST['username'];\n $user->slug = $slug;\n\n $user->public = 1;\n $user->created = time();\n $user->updated = time();\n $user->password = crypt($_REQUEST['password']);\n $user->save();\n $user->login();\n\n }\n\n echo json_encode(array('success' => $success, 'errors' => $errors));\n return true;\n\n }", "function Register(){\n\n\t\t$sql = \"select * from USUARIOS where login = '\".$this->login.\"'\";\n\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'El usuario ya existe';\n\t\t\t}\n\t\telse{\n\t \t\treturn true; //TEST : El usuario no existe\n\n\t}\n}", "public function usernameEntryIsValid() {\r\n if (array_key_exists(\"username\", $_POST) )\r\n {\r\n if ( !Validator::usernameIsValid($_POST[\"username\"]) )\r\n {\r\n $this->errors[\"username\"] = \"Username is not valid!\";// if the username is not valid then the error will be filled with this message\r\n }\r\n if( $this->usernameIsTaken($_POST[\"username\"]) == true ) \r\n {\r\n $this->errors[\"username\"] = \"That Username has been taken!\"; // if the website that the user entered is already in the database\r\n }\r\n }\r\n else\r\n {\r\n $this->errors[\"username\"] = \"Username is required!\"; // requires a Username to be entered\r\n }\r\n \r\n return ( empty($this->errors[\"username\"]) ? true : false );\r\n }", "function RegisterUser(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateRegistrationSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$itemPicture = $this->upLoadUserPic();\r\n\t\tif($itemPicture != false){\r\n\t\t\t$formvars['Upic'] = $this->upLoadUserPic();\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectRegistrationSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->comparePswd($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(!$this->SaveToEventAdvDatabase($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/*if(!$this->sendConfimMail($formvars)){\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\r\n\t\t//$this->SendAdminIntimationEmail($formvars);\r\n\r\n\t\treturn true;\r\n\t}", "function usernameExists($username) {\n\n\tglobal $connection;\n\n\t$query = \"SELECT username FROM users WHERE username = '{$username}'\";\n\t$result = mysqli_query($connection, $query);\n\tconfirm($result);\n\n\treturn mysqli_num_rows($result) > 0 ? true : false;\n\n}", "function isFreeUsername($username, $connection) {\n\t$namecheckquery = mysqli_query($connection, \"select name from users where name = '\".$username.\"';\");\n\t$namecheck = mysqli_num_rows($namecheckquery);\n\n\treturn !$namecheck;\n}", "function register()\n\t\t{\n\n\t\t if(!empty($_POST['email']) && !empty($_POST['password'])&& !empty($_POST['nombre'])){\n\n\t\t $email=filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n\t\t $password=filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\t\t $name=filter_input(INPUT_POST, 'nombre', FILTER_SANITIZE_STRING);\n\t\t $new_user=$this->model->register($email,$password,$name);\n\n\t\t if ($new_user == TRUE){ \n\t\t // cap a la pàgina principal\n\t\t header('Location:'.APP_W.'home');\n\t\t }\n\t\t else{\n\t\t // no hi és l'usuari, cal registrar\n\t\t header('Location:'.APP_W.'register');\n\t\t }\n\t\t \t\t}\n\t\t}", "function register() {\n\t$a = array(\n\t 'status' => 'system-error'\n\t);\n\n\t// raw inputs\n\t$taint_uname = isset($_POST['uname']) ? $_POST['uname'] : 0;\n\t$taint_email = isset($_POST['email']) ? $_POST['email'] : 0;\n\t$taint_pword = isset($_POST['pword']) ? $_POST['pword'] : 0;\n\n\t// validate inputs\n\t$uname = validateUname($taint_uname);\n\t$email = validateEmail($taint_email);\n\t$pword = validatePword($taint_pword);\n\n\tif (!$email || !$uname || !$pword) {\n\t\tLog::write(LOG_WARNING, \"attempt with invalid parameter set\");\n\t\treturn $a;\n\t}\n\n\t$conn = getConnection();\n\tif (!$conn) {\n\t\treturn $a;\n\t}\n\n\t// validate username is unique\n\t$name = 'test-unique-username';\n\t$sql = \"select id from accounts.user where username = $1\";\n\t$params = array($uname);\n\t$result = execSql($conn, $name, $sql, $params, false);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t$numrows = pg_num_rows($result);\n\tif ($numrows > 0) {\n\t\tLog::write(LOG_NOTICE, \"$name: username already on file\");\n\t\t$a['status'] = 'username-in-use';\n\t\treturn $a;\n\t}\n\n\t// validate email is unique\n\t$name = 'test-unique-email';\n\t$sql = \"select id from accounts.user where email = $1\";\n\t$params = array($email);\n\t$result = execSql($conn, $name, $sql, $params, false);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t$numrows = pg_num_rows($result);\n\tif ($numrows > 0) {\n\t\tLog::write(LOG_NOTICE, \"$name: email already on file\");\n\t\t$a['status'] = 'email-in-use';\n\t\treturn $a;\n\t}\n\n\t// get the next user id\n\t$name = 'get-next-user-id';\n\t$sql = \"select nextval('accounts.user_id_seq')\";\n\t$params = array();\n\t$result = execSql($conn, $name, $sql, $params, true);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t$row = pg_fetch_array($result, 0, PGSQL_ASSOC);\n\t$id = $row['nextval'];\n\n\t// hash the password\n\t$hashPassword = hashPassword($pword);\n\n\t$auth = DB::$auth_registered;\n\t$access = DB::$auth_novice;\n\n\t// get TIC\n\t$publicTic = generateTic();\n\t$hashTic = hashTic($publicTic);\n\n\t// write a session token\n\t$si = writeToken($conn, $id);\n\tif (!$si){\n\t\treturn $a;\n\t}\n\n\t// write the user record\n\t$name = 'insert-user';\n\t$sql = \"insert into accounts.user (id, username, email, hashpassword, auth, hashtic, tmhashtic) values ($1, $2, $3, $4, $5, $6, now())\";\n\t$params = array($id, $uname, $email, $hashPassword, $auth, $hashTic);\n\t$result = execSql($conn, $name, $sql, $params, true);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t// send TIC to user by email\n\t$boo = sendAuthenticationEmail($email, 'verify', $publicTic);\n\tif (!$boo) {\n\t\t$a['status'] = 'send-email-failed';\n\t\treturn $a;\n\t}\n\n\t// success\n\t$a['status'] = 'ok';\n\t$a['si'] = $si;\n\t$a['auth'] = $auth;\n\t$a['access'] = $access;\n\t$a['uname'] = $uname;\n\t//$a['email'] = obscureEmail($email);\n\treturn $a;\n}", "public function CheckUsername($username, $userId);", "function is_username_available($username) {\n\t\t// Load Models\n\t\t$this->ci->load->model('dx_auth/users', 'users');\n\t\t$this->ci->load->model('dx_auth/user_temp', 'user_temp');\n\n\t\t$users = $this->ci->users->check_username($username);\n\t\t//$temp = $this->ci->user_temp->check_username($username);\n\t\t\n\t\t//return $users->num_rows() + $temp->num_rows() == 0;\n\t\treturn $users->num_rows() == 0;\n\t}", "function UserNameExists($username) {\n\n\t$result = DBRead('usuarios', $params = 'username', $fields = 'username');\n\n\t$query = \"SELECT username FROM usuarios WHERE username = '$username'\";\n\t$result = DBExecute($query);\n\n\tif (mysqli_num_rows($result) <= 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function register()\n\t{\n\t\t$rsp = new Response();\n\n\t\t//Do we have all the required fields ?\n\t\tif(empty($_POST['user_name']) ||\n empty($_POST['user_email']) ||\n empty($_POST['user_passwd']) ||\n empty($_POST['user_passwd_confirm']))\n {\n\t\t\t$rsp->setFailure(400, \"One or more fields are missing.\")\n ->send();\n }\n\n //Is password confirmation correct ?\n if($_POST['user_passwd'] !== $_POST['user_passwd_confirm'])\n {\n $rsp->setFailure(409, \"`user_passwd` and `user_passwd_confirm` does not match.\")\n ->send();\n\n return;\n }\n\n //Is email valid ?\n if(!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL))\n {\n $rsp->setFailure(409, \"`user_email` is not a valid email.\")\n ->send();\n\n return;\n }\n\n //Is email banned?\n if(Response::read(\"ban\", \"is\", \"email\", $_POST['user_email'])[\"code\"] == 401)\n {\n $rsp->setFailure(406, \"The email used is banned.\")\n ->send();\n\n return;\n }\n\n //Is user unique?\n if(!$this->model->isUnique($_POST['user_email']))\n {\n $rsp->setFailure(403, \"This email is already in use. You might want to log in.\")\n ->send();\n\n return;\n }\n\n //Register the user\n $userID = $this->model->addUser($_POST['user_name'], $_POST['user_email'], $_POST['user_passwd'], time());\n\n //Send an activation email\n if(!$this->model->sendMail($userID, $_POST['user_email'], time()))\n {\n $rsp->setFailure(400, \"Error while sending the activation email.\")\n ->send();\n\n return;\n }\n\n $rsp->setSuccess(201, \"User added and activation mail sent.\")\n ->bindValue(\"email\", $_POST['user_email'])\n ->bindValue(\"userID\", $userID)\n ->send();\n\t}", "function register()\n{\n if (isset($_POST['submitregister'])) {\n global $connection;\n\n $Nome = $_POST['Nome'];\n $Cognome = $_POST['Cognome'];\n $Email = $_POST['Email'];\n $Telefono = $_POST['Telefono'];\n $Password = $_POST['Password'];\n $Cita = $_POST['Cita'];\n\n $query_count = \"SELECT COUNT(*) AS TotalUsers from users WHERE user_username='$Email'\";\n $result_count = mysqli_query($connection, $query_count);\n $row_count = mysqli_fetch_assoc($result_count);\n if ($row_count['TotalUsers'] < 1) {\n $queryinstert = \"INSERT INTO users(user_name,user_surname,user_username,user_email,user_city,user_livel,user_phone,user_password) VALUES ('$Nome','$Cognome','$Email','$Email','$Cita','1','$Telefono','$Password')\";\n $result_insert = mysqli_query($connection, $queryinstert);\n if ($result_insert) {\n return header('Location: index.php');\n }\n } else {\n echo '<script>alert(\"Attenzione! Con questo email esiste gia un accaunt creato.\")</script>';\n }\n }\n}", "public function reg_user($username, $password) {\n $conn = db();\n //$password = md5($password);\n $sql = \"SELECT * FROM user WHERE username='$username'\";\n//checking if the username is available in db\n $check = $conn->query($sql);\n $count_row = $check->num_rows;\n//if the username is not in db then insert to the table\n if ($count_row == 0) {\n $sql = \"INSERT INTO user SET username='$username', password='$password'\";\n // $sql= \"INSERT INTO user(username) VALUES('$username')\"; ALTERNATIVE\n $result = $conn->query($sql);\n return $result;\n } else {\n return false;\n }\n }", "public function userExists()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$users = self::getRawUsers('uname = \\'' . mysql_escape_string($uname) . '\\'');\n\n\t\tif(count($users) == 1) {\n\t\t\tforeach($users as $user) {\n\t\t\t\tif($user['uname'] == $uname) {\n\t\t\t\t\t$return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return = false;\n\t\t}\n\t\treturn self::ret($return);\n\t}", "public function registerAction()\n {\n // specify required fields\n $requirements = array(\n 'userName',\n 'password',\n 'email'\n );\n\n // fech post json data\n $post = $this->fetchRequestData($requirements);\n\n //we need to match what's in the database\n $fields = array(\n 'yourEmail' => 'email',\n 'yourUserName' => 'userName',\n 'yourPassword' => 'password',\n 'fname' => 'fname',\n 'lname' => 'lname',\n 'yourIP' => 'ip',\n 'yourCountry' => 'countryAbbreviation',\n 'yourBday' => 'birthdate',\n 'accountId' => 'accountId',\n 'gender' => 'gender',\n 'cmsUserGroupId' => 'userRole',\n 'isChannel' => 'isChannel',\n );\n\n $params = array();\n $params['userId'] = 0;\n\n foreach ($fields as $key => $val) {\n if (isset($post[$val]) && $post[$val]) $params[$key] = $post[$val];\n }\n\n if (isset($params['yourEmail']) && $params['yourEmail']) {\n if ($this->get('UserServices')->checkDuplicateUserEmail($params['userId'], $params['yourEmail'])) {\n throw new HttpException(422, $this->translator->trans('This email address belongs to an existing Tourist Tuber.'));\n }\n }\n\n if (isset($params['yourUserName']) && $params['yourUserName']) {\n if ($this->get('UserServices')->checkDuplicateUserName($params['userId'], $params['yourUserName'])) {\n $suggestedNewUserNames = $this->get('UserServices')->suggestUserNameNew($params['yourUserName']);\n throw new HttpException(422, $this->translator->trans('Your username is already taken. try:') . ' ' . implode(' or ', $suggestedNewUserNames));\n }\n }\n\n if (isset($params['yourPassword']) && $params['yourPassword']) {\n //validate first for invalid password\n $validatePass = $this->get('UserServices')->validateUserLengthPassword($params['yourPassword']);\n if (isset($validatePass['success']) && $validatePass['success'] == false) {\n throw new HttpException(422, $validatePass['message']);\n }\n }\n\n if ((isset($params['fname']) && $params['fname']) || (isset($params['lname']) && $params['lname'])) {\n $fullname = '';\n if ($params['fname']) {\n $fullname .= $params['fname'];\n }\n if ($params['lname']) {\n $fullname .= $params['lname'];\n }\n } else {\n $fullname = $params['fname'] = $params['yourUserName'];\n }\n\n $params['fullName'] = $fullname;\n $params['defaultPublished'] = 0;\n $result = array();\n\n\n\n $insert = $this->get('UserServices')->generateUser($params);\n\n if (is_array($insert) && isset($insert['error']) && !empty($insert['error'])) {\n throw new HttpException(422, $insert['error']);\n } else {\n $this->get('UserServices')->sendRegisterActivationEmail(array('userId' => $insert->getId(), 'activationLink' => '/api/users/activate/'));\n $result['status'] = \"success\";\n $result['message'] = $this->translator->trans('An email is sent to you to activate your account.');\n }\n\n $response = new Response(json_encode($result));\n $response->setStatusCode(200);\n return $response;\n }", "function check_gruop_name(){\n\t\tif(isset($_POST[\"gruop_name\"])){\n\t\t\t$gruop_name=$_POST[\"gruop_name\"];\n\t\t\t$gruop_username=$this->uri->segment(3);\n\t\t\t$valid='TRUE';\n\t\t\t$data[\"gruop_name\"]=$this->db->query(\"SELECT * FROM photo_gruop WHERE gruop_name='$gruop_name' and gruop_username='$gruop_username'\"); \n\t\t\tif($data[\"gruop_name\"]->num_rows() > 0){\n \t\t\techo \"false\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"true\";\n\t\t\t}\n\t\t}\n\t}", "static public function tryToRegisterNewUser() {\r\n\t\t$errors = array();\r\n\r\n\t\tif (strlen($_POST['new_username']) < self::$USER_MIN_LENGTH)\r\n\t\t\t$errors[] = array('new_username' => sprintf( __('The username has to contain at least %s signs.'), self::$USER_MIN_LENGTH));\r\n\r\n\t\tif (self::usernameExists($_POST['new_username']))\r\n\t\t\t$errors[] = array('new_username' => __('This username is already used.'));\r\n\r\n\t\tif (self::mailExists($_POST['email']))\r\n\t\t\t$errors[] = array('email' => __('This email is already used.'));\r\n\r\n\t\tif ($_POST['password'] != $_POST['password_again'])\r\n\t\t\t\t$errors[] = array('password_again' => __('The passwords have to be the same.'));\r\n\r\n\t\tif (strlen($_POST['password']) < self::$PASS_MIN_LENGTH)\r\n\t\t\t$errors[] = array('password' => sprintf( __('The password has to contain at least %s signs.'), self::$PASS_MIN_LENGTH));\r\n\r\n\t\tif (empty($errors))\r\n\t\t\t$errors = self::createNewUserFromPost();\r\n\r\n\t\tif (empty($errors))\r\n\t\t\treturn true;\r\n\r\n\t\treturn $errors;\r\n\t}", "function user_action_user_register($env, $vars) {\n // Prepare the response object.\n $response = new stdClass();\n $user = UserFactory::requestAction($env, $vars['data']['action'], $vars['data']);\n // Check if there are validation errors.\n if (!empty($user->getData('validation_errors'))) {\n foreach ($user->getData('validation_errors') as $error) {\n new Message($env, $error, MESSAGE_WARNING);\n }\n $response->errors = Message::burnMessages();\n }\n else {\n $username = array_pop($vars['data']['name']);\n $user = UserFactory::load($env, $username);\n $user->logIn(NULL, t('Hello %user, thank you for signing up. You are now a registered member.', array('%user' => $username)), TRUE);\n $response->redirect = NodeFactory::current($env)->getName();\n }\n\n // Encode the response JSON code.\n $response_json = json_encode($response);\n\n exit($response_json);\n}", "private function _validateUsername()\n\t{\n\t\t$state = $this->getStateVariables();\n\n\t\t$ret = (object)array('username' => false);\n\t\t$username = $state->username;\n\t\tif(empty($username)) return $ret;\n\t\t$myUser = JFactory::getUser();\n\t\t$user = FOFModel::getTmpInstance('Jusers','AkeebasubsModel')\n\t\t\t->username($username)\n\t\t\t->getFirstItem();\n\n\t\tif($myUser->guest) {\n\t\t\tif(empty($user->username)) {\n\t\t\t\t$ret->username = true;\n\t\t\t} else {\n\t\t\t\t// If it's a blocked user, we should allow reusing the username;\n\t\t\t\t// this would be a user who tried to subscribe, closed the payment\n\t\t\t\t// window and came back to re-register. However, if the validation\n\t\t\t\t// field is non-empty, this is a manually blocked user and should\n\t\t\t\t// not be allowed to subscribe again.\n\t\t\t\tif($user->block) {\n\t\t\t\t\tif(!empty($user->activation)) {\n\t\t\t\t\t\t$ret->username = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ret->username = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$ret->username = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$ret->username = ($user->username == $myUser->username);\n\t\t}\n\t\treturn $ret;\n\t}", "function register()\n {\n \t\t$data = file_get_contents('php://input');\n \t\t$this->logservice->log($this->module_name, \"DEBUG\",\"EVENT\",$this->IP,\"$data \");\n\t\t$busData = json_decode($data ,true);\n\t\t//查找是否有重名\n\t\t$criteria = array();\n\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"]);\n\t\t$result = $this->User->count_results($criteria);\n\n\t\tif ($result > 0) {\n\t\t\t$rspData[\"userID\"] =0;\n\t\t\t$rspData[\"state\"] = \"ERRO\";\n\t\t\t$rspData[\"erroInfo\"] = \"该用户名已经被使用\";\n\n\t\t\t$rspInfo = json_encode($rspData);\n\t\t\techo $rspInfo;\n\t\t\treturn;\n\t\t}\n\t\t$data_in = array();\n\t\t$data_in[\"Role_Id\"] = 2;\n\t\t$data_in[\"Password\"] = $busData[\"password\"];\n\t\t$data_in[\"Name\"] = $busData[\"name\"];\n\t\t$data_in[\"Phone\"] = $busData[\"name\"];\n\t\t$data_in[\"UpLoad\"] = 0;\n\t\t$data_in[\"DownLoad\"] = 0;\n\t\t$data_in[\"Status\"] = 0;\n \n\t\t$result = $this->User->create($data_in);\n\t\tif ($result) {\n\t\t\t$criteria = array();\n\t\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"]);\n\t\t\t$userDat = $this->User->read($criteria);\n\t\t\tif (!empty($userDat)) {\n\t\t\t\t\n\t\t\t\t$rspData[\"userID\"] =$userDat[0][\"User_Id\"];\n\t\t\t\t$rspData[\"state\"] = \"OK\";\n\t\t\t\t$rspData[\"erroInfo\"] = \"注册成功ID为\".$userDat[0][\"User_Id\"];\n\n\t\t\t\t$rspInfo = json_encode($rspData);\n\t\t\t\techo $rspInfo;\n\t\t\t}\n\n\t\t}\n }", "public function action_register(){\n\t\t\n\t\t$user = CurUser::get();\n\t\t\n\t\tif($user->save($_POST, User_Model::SAVE_REGISTER)){\n\t\t\t$user->login($user->{CurUser::LOGIN_FIELD}, $_POST['password']);\n\t\t\tApp::redirect('user/profile/greeting');\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\tMessenger::get()->addError('При регистрации возникли ошибки:', $user->getError());\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function registerAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $userObj = new User(\n $this->request->getQuery('username')\n , $this->request->getQuery('password')\n );\n $userObj->save();\n\n return parent::httpResponse(json_encode($userObj));\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "public function register(){\n if (!empty($_SESSION['user_id']))\n redirects('pages/index');\n // Check for POST\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n // Process form\n \n // Sanitize POST data\n // $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n // Init data\n $data =[\n 'name' => trim($_POST['name']),\n 'username' => trim($_POST['username']),\n 'email' => trim($_POST['email']),\n 'password' => trim($_POST['password']),\n 'confirm_password' => trim($_POST['confirm_password']),\n 'validation_hash' => '',\n 'email_verification' => '',\n 'name_error' => '',\n 'username_error' => '',\n 'email_error' => '',\n 'password_error' => '',\n 'confirm_password_error' => '',\n 'message' => '',\n 'title' => '',\n ];\n\n // Validate Email\n if(empty($data['email'])){\n $data['email_error'] = 'Pleae enter email';\n } else {\n // check if valid email\n if (!filter_var($data['email'], FILTER_VALIDATE_EMAIL)) {\n $data['email_error'] = \"Please enter a valid email\"; \n }\n\n // Check email if exists\n if($this->userModel->findUserByEmail($data['email'])){\n $data['email_error'] = 'Email is already taken';\n }\n }\n //valid username\n if (preg_match('/\\s/',$data['username']) || !ctype_alnum($data['username'])){\n $data['username_error'] = 'Please enter a valid username';\n } else {\n // check the lenght of the username\n if (strlen($data['username']) < 6)\n $data['username_error'] = 'Username should be at least 6 characters';\n\n // check if the username is already taken\n if ($this->userModel->findUserByUsername($data['username']))\n $data['username_error'] = 'Username is already taken';\n }\n\n // Validate Name\n if(empty($data['name'])){\n $data['name_error'] = 'Pleae enter name';\n } else {\n if (!ctype_alnum($data['name']))\n $data['name_error'] = 'Please enter a valid name';\n }\n\n // Validate Password\n if(empty($data['password'])){\n $data['password_error'] = 'Pleae enter password';\n } else {\n // Validate password strength\n $uppercase = preg_match('@[A-Z]@', $data['password']);\n $lowercase = preg_match('@[a-z]@', $data['password']);\n $number = preg_match('@[0-9]@', $data['password']);\n if(!$uppercase || !$lowercase || !$number || strlen($data['password']) < 8)\n $data['password_error'] = 'Password should be at least 8 characters in length and should include at least one upper case letter, one number.';\n }\n // validate confirm_password\n if ($data['password'] != $data['confirm_password'])\n $data['confirm_password_error'] = 'Password does not match!';\n\n // Make sure errors are empty\n if(empty($data['email_error']) && empty($data['username_error']) && empty($data['name_error']) && empty($data['password_error']) && empty($data['confirm_password_error'])){\n // Validated\n\n // generate confirmation key\n $hash = md5( rand(0,1000) );\n $data['validation_hash'] = $hash;\n // hash password\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\n if($this->userModel->register($data))\n {\n $link = $link = URLROOT . '/users/emailVerification/' . $data['validation_hash'];\n $data['message'] = 'Please click on the link to validate you registration : ' . $link;\n $data['title'] = '[Camagru] Complete your registration';\n $this->sendEmailnotification($data);\n $data['email_verification'] = 'alert-info';\n $data['email'] = '';\n $data['password'] = '';\n $this->view('users/login', $data);\n }\n else\n {\n die('somthing went wrong');\n }\n } else {\n // // Load view with errors\n $this->view('users/register', $data);\n }\n\n } else {\n // Init data\n $data =[\n 'name' => '',\n 'email' => '',\n 'username' => '',\n 'password' => '',\n 'name_error' => '',\n 'username_error' => '', \n 'email_error' => '',\n 'password_error' => ''\n ];\n\n // // Load view\n $this->view('users/register', $data);\n }\n }", "public function validate_username()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$userId = JFactory::getUser()->id;\n\t\t$username = $this->input->getString('fieldValue');\n\t\t$validateId = $this->input->getString('fieldId');\n\t\t$query->select('COUNT(*)')\n\t\t\t->from('#__users')\n\t\t\t->where('username = ' . $db->quote($username));\n\n\t\tif ($userId > 0)\n\t\t{\n\t\t\t$query->where('id != ' . (int) $userId);\n\t\t}\n\n\t\t$db->setQuery($query);\n\t\t$total = $db->loadResult();\n\t\t$arrayToJs = array();\n\t\t$arrayToJs[0] = $validateId;\n\n\t\tif ($total)\n\t\t{\n\t\t\t$arrayToJs[1] = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrayToJs[1] = true;\n\t\t}\n\n\t\techo json_encode($arrayToJs);\n\n\t\t$this->app->close();\n\t}", "public function registerAction()\n {\n if (empty($_POST) === false) {\n if (isset($_POST['register'])) {\n //Function Checking if customer with entered \n // user name or emalil exists in Data Base.\n $message = $this->checkIfExists($_POST['userName'], $_POST['email']);\n //Message that user Already exist. \n if ($message != \"\")\n $this->regMassage($message);\n //Registrating a new Customer and Adding him to Data Base.\n else {\n $cst = $this->customerCreate();\n $this->register($cst);\n }\n }\n }\n $this->view->render('Register');\n }", "function addUser($name,$pw){\n\t if(($name != NULL) && ($pw != NULL)){\n $count = @mysql_query(\"SELECT COUNT(*) as count FROM UserUNandID WHERE ('$name' = UserName)\");\n\t\t $countdata = mysql_fetch_assoc($count);\n\t\t if($countdata['count'] >= 1){\n\t\t print \"User already exists!\";\n exit(1);\n\t\t }\n else\n\t\t { \n @mysql_query(\"INSERT INTO UserUNandID VALUES (0,'$name','$pw')\");\n }\t\t\t \n\t\t}\t\t\n\t}", "public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }", "function usernameExists($username) {\t\t\r\n\t\t$query = \"SELECT * FROM users WHERE username = '\" . $username .\"'\";\r\n\t\t\tmysql_query($query) or $error = $query.mysql_error().\" \".$query;\r\n\t\t$affectedRows = mysql_affected_rows();\r\n\t\tif($error != \"\")\r\n\t\t\treturn json_encode(array(\"error\"=>$SQLerror));\r\n\t\telseif($affectedRows == 1)\r\n\t\t\treturn \"true\";\r\n\t\telse\r\n\t\t\treturn \"false\";\r\n\t}", "public function testRegisterBlankUsername() {\n\t\t$data = $this->getUserData(\n\t\t\t' ',\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\t\n\t\t// Code returned when error is always 400\n\t\t$this->assertResponseStatus(400);\n\t\t// Variable error should be set to true\n\t\t$this->assertTrue($resp_data->error);\n\t\t// The test should cover only one partition, so only\n\t\t// one error message should exist in the response\n\t\t$this->assertEquals(count($resp_data->messages), 1);\n\t}" ]
[ "0.79301965", "0.7426028", "0.74024004", "0.7343221", "0.7329237", "0.71937305", "0.71824", "0.7152603", "0.71146107", "0.7113636", "0.71005636", "0.7088958", "0.7043555", "0.70398223", "0.7034342", "0.70212704", "0.70110077", "0.69923526", "0.6980898", "0.69294745", "0.69200116", "0.6896578", "0.68923163", "0.68618083", "0.68618083", "0.68530524", "0.6846582", "0.683911", "0.68297666", "0.68197715", "0.68093103", "0.6793841", "0.6776508", "0.6774368", "0.6742378", "0.67287743", "0.6722254", "0.6720645", "0.6711709", "0.67014146", "0.6700186", "0.66992015", "0.6661988", "0.66583306", "0.6651089", "0.66458845", "0.6639553", "0.6638045", "0.6629584", "0.6620482", "0.66114485", "0.661092", "0.6598182", "0.6598147", "0.6590484", "0.6576736", "0.65572613", "0.65510327", "0.6549042", "0.654667", "0.65403086", "0.65345454", "0.6534405", "0.6533431", "0.653343", "0.65302396", "0.65280235", "0.65190655", "0.6515856", "0.6511319", "0.65079427", "0.65018857", "0.64984137", "0.64764714", "0.6476394", "0.6450984", "0.64464355", "0.6442742", "0.6439369", "0.64358646", "0.6433327", "0.6429624", "0.64293724", "0.6425315", "0.6417432", "0.6416366", "0.64106697", "0.6410056", "0.64098406", "0.6407491", "0.640677", "0.64037406", "0.6399744", "0.6376739", "0.63754636", "0.63751084", "0.6358754", "0.6358685", "0.6358388", "0.6355755", "0.6353081" ]
0.0
-1
Returns available tab options.
protected function getTabOptions() { $options = [ 'members' => $this->t('Members'), 'admins' => $this->t('Administrators'), ]; if (($this->currentUser->hasPermission('manage circle spaces') && $this->moduleHandler->moduleExists('living_spaces_circles')) || $this->moduleHandler->moduleExists('living_spaces_subgroup') ) { $options['inherit'] = $this->t('Inherited'); } return $options; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "function getOptions() ;", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "private function parse_options()\n\t\t{\n\t\t\t$options = $this->options;\n\n\t\t\tforeach ( $options as $option ) {\n\n\t\t\t\tif ( $option[ 'type' ] == 'heading' ) {\n\t\t\t\t\t$tab_name = sanitize_title( $option[ 'name' ] );\n\t\t\t\t\t$this->tab_headers = array( $tab_name => $option[ 'name' ] );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$option[ 'tab' ] = $tab_name;\n\t\t\t\t$tabs[ $tab_name ][ ] = $option;\n\n\t\t\t}\n\n\t\t\t$this->tabs = $tabs;\n\n\t\t\treturn $tabs;\n\t\t}", "function getSearchOptions() {\n\n $tab = array();\n $tab['common'] = __('Characteristics');\n\n $tab[2]['table'] = $this->getTable();\n $tab[2]['field'] = 'id';\n $tab[2]['name'] = __('ID');\n $tab[2]['massiveaction'] = false;\n $tab[2]['datatype'] = 'number';\n\n if (!preg_match('/^itemtype/', static::$itemtype_1)) {\n $tab[3]['table'] = getTableForItemType(static::$itemtype_1);\n $tab[3]['field'] = static::$items_id_1;\n $tab[3]['name'] = call_user_func(array(static::$itemtype_1, 'getTypeName'));\n $tab[3]['datatype'] = 'text';\n $tab[3]['massiveaction'] = false;\n }\n\n if (!preg_match('/^itemtype/', static::$itemtype_2)) {\n $tab[4]['table'] = getTableForItemType(static::$itemtype_2);\n $tab[4]['field'] = static::$items_id_2;\n $tab[4]['name'] = call_user_func(array(static::$itemtype_2, 'getTypeName'));\n $tab[4]['datatype'] = 'text';\n $tab[4]['massiveaction'] = false;\n }\n\n return $tab;\n }", "public function getAvailableOptions(): array\n\t{\n\t\treturn [\n\t\t\t'id',\n\t\t\t'timestamp',\n\t\t\t'trigger',\n\t\t\t'progress',\n\t\t\t'assignment',\n\t\t\t'obj_type',\n\t\t\t'obj_title',\n\t\t\t'refid',\n\t\t\t'link',\n\t\t\t'parent_title',\n\t\t\t'parent_refid',\n\t\t\t'user_mail',\n\t\t\t'user_id',\n\t\t\t'user_login',\n\t\t];\n\t}", "public function get_help_tabs()\n {\n }", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "public static function getTabs() {\r\n\t\treturn self::getModulesForUser(Config::$sis_tab_folder);\r\n\t}", "protected function getAllAvailableSectionsOptions() {}", "public function getTabs(): array\n {\n return $this->tabs;\n }", "protected function getOptions() {\n\t\treturn array();\n\t}", "abstract public function getOptions();", "public function getDefinedOptions();", "public function getOptions()\n {\n return $this->optionRequested->get();\n }", "public function getOptions()\n\t{\n\t\treturn $this->getViewState('Options', '');\n\t}", "function getOptions();", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "public static function getOptionsList()\n {\n $optionsArray = [\n 'banner_content' => Yii::t('app', 'Homepage banner content'),\n 'mid_content' => Yii::t('app', 'Homepage mid page content'),\n 'footer_about_us' => Yii::t('app', 'Footer About us'),\n 'footer_address' => Yii::t('app', 'Footer Address'),\n ];\n\n return $optionsArray;\n }", "public function getOptions() : array;", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "public function get_tabs() {\n return $this->_tabs;\n }", "protected function getOptions()\n {\n return array(\n\n );\n }", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "public function getOptions()\r\n {\r\n }", "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }" ]
[ "0.72532773", "0.6955908", "0.68708473", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6848745", "0.6821523", "0.681229", "0.6759449", "0.6701688", "0.6691995", "0.66914153", "0.66914153", "0.66457105", "0.66457105", "0.66457105", "0.66457105", "0.66457105", "0.66457105", "0.66457105", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66272914", "0.66218406", "0.66065747", "0.6595551", "0.6586082", "0.65760595", "0.6566777", "0.65643835", "0.65590346", "0.6552657", "0.6548755", "0.65457934", "0.65457934", "0.65457934", "0.65457934", "0.65457934", "0.65457934", "0.65457934", "0.6544796", "0.6544796", "0.6544796", "0.6544796", "0.65327793", "0.65327793", "0.65327793", "0.65134287", "0.65134287", "0.65134287", "0.65134287", "0.65134287", "0.65134287", "0.65134287", "0.65057737", "0.6504546", "0.6501725", "0.65016603", "0.64989746", "0.64913005", "0.64913005", "0.64913005", "0.64913005", "0.64913005", "0.64913005", "0.64913005", "0.64913005", "0.64913005", "0.6470361", "0.64612836", "0.6446955", "0.6446955", "0.6446955", "0.6446955", "0.6446955", "0.64428204", "0.6437455" ]
0.8225386
0
Returns tab render array based on argument.
protected function getTabContent(string $tab) { /** @var \Drupal\group\Entity\GroupInterface $group */ $group = $this->getContextValue('group'); $build = []; switch ($tab) { case 'members': $group_ids = [$group->id()]; if ($group->hasField('circles')) { $group_ids = array_merge($group_ids, array_column($group->get('circles')->getValue(), 'target_id')); } $build['members'] = $this->getMembersViewRender(implode('+', $group_ids)); $build['contact'] = $this->getContactActionsRender($group); $build['export'] = $this->getExportActionsViewRender($group); break; case 'admins': $build['members'] = $this->getMembersViewRender($group->id(), TRUE); break; case 'inherit': if ($this->moduleHandler->moduleExists('living_spaces_subgroup')) { $build['tree'] = $this->getGroupTreeRender($group); } /** @var \Drupal\group\Entity\Storage\GroupRoleStorageInterface $role_storage */ $role_storage = $this->entityTypeManager->getStorage('group_role'); $roles = $role_storage->loadByUserAndGroup($this->currentUser, $group); $current_is_admin = FALSE; foreach ($roles as $role) { if ($role->get('is_space_admin')) { $current_is_admin = TRUE; break; } } if ($this->moduleHandler->moduleExists('living_spaces_circles') && ( $current_is_admin || $this->currentUser->hasPermission('manage circle spaces') || $group->hasPermission('manage circle spaces', $this->currentUser) ) ) { $build['circle'] = $this->getCircleFormRender($group); $url = Url::fromRoute('entity.group.add_form', [ 'group_type' => 'circle', ], [ 'query' => ['space' => $group->id()], ]); $build['add_cricle'] = [ '#type' => 'link', '#url' => $url, '#title' => $this->t('Add circle'), '#attributes' => ['class' => ['btn', 'btn-primary']], ]; } break; } return $build; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tab() {\n $args = func_get_args();\n\n if (count($args) == 0) {\n return $this->info['tab'];\n } else {\n $tab = array();\n\n if (!is_array($args[0])) {\n $tab['name'] = $args[0];\n } else {\n $tab = $args[0];\n }\n\n if (isset($args[1])) {\n $tab['plugin'] = $args[0];\n }\n\n if (isset($args[2])) {\n $tab['label'] = $args[2];\n }\n\n $tab = array_merge(array(\n 'plugin' => $this->id(),\n 'flag' => null,\n ), $tab);\n\n $this->hook('nav-tab', 'createNavTab', array(\n $tab['name'],\n $tab['plugin'],\n $tab['label'],\n $tab['flag'])\n );\n }\n }", "function render_tab($key,$tab){\n global $post;\n echo '<h2>'.apply_filters('GWP_custom_tab_title',$tab['title'],$tab,$key).'</h2>';\n echo apply_filters('GWP_custom_tab_content',$tab['content'],$tab,$key);\n }", "abstract protected function tabs();", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "function template_tabs($tabs = array(), $active = 0){\n $content = '';\n $top = '';\n $i =0;\n foreach($tabs as $id=>$tab){\n if ($i == $active){$class = 'active';}\n $top .= \"\\t\" . '<li><a class=\"'.$class.'\" href=\"#'.$id.'\">' . $tab['title'] . '</a></li>' . \"\\n\";\n $content .= \"\\t\" . '<li id=\"'.$id.'\" class=\"'.$class.'\">' . $tab['content'] . '</li>' . \"\\n\"; \n $i++;\n $class = '';\n }\n $return = '<ul class=\"tabs\">' . \"\\n\" . $top . '</ul>' . \"\\n\";\n $return .= '<ul class=\"tabs-content\">' . \"\\n\" . $content . '</ul>';\n return $return;\n \n}", "public function get_tab( $tabs ) {\n\t\t$tabs['tweaks'] = array(\n\t\t\t'label' => __( 'Tweaks', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-car-tilt',\n\t\t);\n\t\treturn $tabs;\n\t}", "function echotheme_tabs_func( $atts, $content = null ) {\n global $tabs;\n $tabs = array(); // clear the array\n\tdo_shortcode($content); // execute the '[tab]' shortcode first to get the title and content\n\n $tabs_nav = '<div class=\"clear\"></div>';\n $tabs_nav .= '<div class=\"tabs-wrapper\">';\n $tabs_nav .= '<ul class=\"tabs\">';\n\t$tabs_content .= '<ul class=\"tabs-content\">';\n \n\tforeach ($tabs as $tab => $tab_atts) {\n\t\t$id = str_replace(' ', '-', $tab_atts['title']);\n\t\t$default = ( $tab == 0 ) ? ' class=\"active\"' : '';\n\t\n\t\t$tabs_nav .= '<li><a href=\"#'.$id.'\"'.$default.'>'.$tab_atts['title'].'</a></li>';\n\t\t$tabs_content .= '<li id=\"'.$id.'\"'.$default.'>'.$tab_atts['content'].'</li>';\n }\n\n $tabs_nav .= '</ul>';\n\t$tabs_content .= '</ul>';\n $tabs_output .= $tabs_nav . $tabs_content;\n $tabs_output .= '</div><!-- tabs-wrapper end -->';\n $tabs_output .= '<div class=\"clear\"></div>';\n\t\n return $tabs_output;\n}", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "function generateTabs($pScreenName, $pRestriction = ''){\n if(0 == count($this->getScreens())){\n return '';\n }\n\n $content = '';\n $tabs = array();\n $Screens =& $this->getScreens();\n\n if (\"List\" == $pScreenName){\n if(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\t\t\t$content = '';\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content = \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n break; //exits loop\n }\n }\n }\n } else {\n // $content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n //$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n } \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n } elseif (\"ListCtxTabs\" == $pScreenName){\n\t\t\n//$tabs['List'] = Array(\"list.php?$qs\", gettext(\"List|View the list of /**plural_record_name**/\"));\n\t\t\t$content = \"\\$tabs['List'] = array(\\\"list.php?\\$qs\\\", gettext(\\\"List|View the list of \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\tif(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n // $content .= \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n\n break; //exits loop\n }\n }\n }\n } else {\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t//$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n\t\t}elseif( \"EditScreenPermissions\" == $pScreenName ){\n\t\t\t$content = '';\n\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND isset($Screen->EditPermission) ){\n\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$Screen->EditPermission}';\\n\";\t\n\t\t\t\t}\n }\n\t\t\tif( $content != '' ){\n\t\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND !isset($Screen->EditPermission) ){\n\t\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$this->ModuleID}';\\n\";\t\n\t\t\t\t\t}\n }\n\t\t\t}\n\t\t\n\t\t}elseif( \"ListRecordMenu\" == $pScreenName ){ \n\t\t \n\t\t\t$recordMenuCounter = 0;\n\t\t\t\t\n\t\t\tforeach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n\t\t\t\t$recordMenu = '';\n\t\t\t\t$recordMenuEntries = '';\n\t\t\t\t\n switch( strtolower(get_class($Screen)) ){\n case \"viewscreen\":\n $handler = \"view.php\"; \n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n\t\t\t\t$recordMenu = '$recordMenuEntries['.$Screen->name.']='.\"'{ text: \\\"'.strip_tags( ShortPhrase( gettext(\\\"{$phrase}\\\") ) ).'\\\" }';\\n\";\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n\t\t\t\tif( ( \"view\" == $pRestriction && \"viewscreen\" == strtolower(get_class($Screen)) ) \n\t\t\t\t || (\"view\" != $pRestriction) ){\n\t\t\t\t\tif($linkTo == ''){\t\t\t\t\t\t\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl={$this->ModuleID}\\\";\\n\"; \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl=$linkTo\\\";\\n\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\n if( in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen')) ){ \n\t\t\t\t\t$recordMenuList .= $recordMenu;\n\t\t\t\t\t$recordMenuURLList .= $recordMenuURL;\t\t\t\t\t\n }\n }\t\t\t\n\t\t\t\n\t\t\t$content = $recordMenuList.$recordMenuURLList;\n\t\n\t\t}else {\n print \"m. GenerateTabs: current screen $pScreenName\\n\";\n\n $currentScreen = $this->getScreen($pScreenName);\n\n foreach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n switch(strtolower(get_class($Screen))){\n case \"viewscreen\":\n $handler = \"view.php\";\n /* if(in_array($this->SingularRecordName[0], array('a','e','i','o','h','y','A','E','I','O','H','Y'))){\n $a = 'an';\n } else {\n $a = 'a';\n } */\n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n if ($pScreenName != $Screen->name){\n if ( ( \"view\" == $pRestriction \n\t\t\t\t\t && ( \"viewscreen\" == strtolower( get_class($Screen) ) \n\t\t\t\t\t || \"recordreportscreen\" == strtolower( get_class($Screen) ) ) ) \n\t\t\t\t\t || (\"view\" != $pRestriction) ){\n\n //insert link\n if($linkTo == ''){\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?scr={$Screen->name}&amp;\\$tabsQS\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n } else {\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?mdl=$linkTo&amp;rid=\\$recordID\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n }\n } else {\n //Current screen: insert name only\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n\n if(in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen'))){\n $content .= $tab;\n }\n }\n }\n\n return $content;\n }", "public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }", "public function get_tab( $tabs ) {\n\t\t$tabs['goaccess'] = array(\n\t\t\t'label' => __( 'Goaccess', 'wpcd' ),\n\t\t\t'icon' => 'fad fa-user-chart',\n\t\t);\n\t\treturn $tabs;\n\t}", "public function tabsAction()\n {\n\t\treturn array();\n }", "protected function createTabs() {}", "private function get_main_tabs_array() {\n\t\treturn apply_filters(\n\t\t\t'updraftplus_main_tabs',\n\t\t\tarray(\n\t\t\t\t'backups' => __('Backup / Restore', 'updraftplus'),\n\t\t\t\t'migrate' => __('Migrate / Clone', 'updraftplus'),\n\t\t\t\t'settings' => __('Settings', 'updraftplus'),\n\t\t\t\t'expert' => __('Advanced Tools', 'updraftplus'),\n\t\t\t\t'addons' => __('Premium / Extensions', 'updraftplus'),\n\t\t\t)\n\t\t);\n\t}", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "protected function renderArray() {}", "function woocommerce_settings_tabs_array( $settings_tabs ) {\n $settings_tabs[$this->id] = __('GWP Custom Tabs','GWP');\n return $settings_tabs;\n }", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "function training_tabs_callback() {\n ctools_include('menu');\n $tab_1 = array(\n 'title' => 'First tab',\n 'href' => 'training/ctools/tabs/tab1',\n );\n $tab_2 = array(\n 'title' => 'Second tab',\n 'href' => 'training/ctools/tabs/tab2',\n );\n ctools_menu_add_tab($tab_1);\n ctools_menu_add_tab($tab_2);\n if (arg(3) == 'tab2') {\n return t('Tab 2 content');\n }\n\n return t('Tab 1 content');\n}", "function getTabs($a = true, $b = '') {\n $args = func_get_args();\n return call_user_func_array(array($this, '_getTabs'), $args);\n }", "public function providerTestHorizontalTabsLabels() {\n return array_reduce($this->themeList, function (array $carry, string $theme_name) {\n $carry[$theme_name] = [\n 'theme_name' => $theme_name,\n ];\n return $carry;\n }, []);\n }", "protected function _getNavigationTabs()\n {\n return array(\n 'bible' => array(\n 'title' => new XenForo_Phrase('th_bible_bible'),\n 'href' => XenForo_Link::buildPublicLink('bible'),\n 'position' => 'middle',\n 'linksTemplate' => 'th_navigation_tabs_bible'\n )\n );\n }", "function selector_panel_list_tab( $location_array, $is_selected = false ) {\n\t$location = json_decode( json_encode( $location_array ) );\n\t$is_selected_string = $is_selected ? 'true' : 'false'; // convert boolean to string for js\n\t$is_active_string = $is_selected ? 'active' : ''; // convert boolean to string for js\n\t$tab = \"\n\t\t<li class='nav-item'>\n\t\t\t<a \n\t\t\tclass='nav-link {$is_active_string}' \n\t\t\tid='tab-{$location->slug}-tab' \n\t\t\tdata-toggle='tab' \n\t\t\thref='#tab-{$location->slug}-content' \n\t\t\trole='tab' \n\t\t\taria-controls='tab-{$location->slug}-content' \n\t\t\taria-selected='{$is_selected_string}'\n\t\t\tdata-location='{$location->slug}'\n\t\t\t>\n\t\t\t\t{$location->name}\n\t\t\t</a>\n\t\t</li>\n\t\";\n\t//$tab .= var_export($location_array, true);\n\n\treturn $tab;\n\t//return \"<li class='locations {$location->slug}' data-location='{$location->slug}'><div class='location location-{$i}'></div><a href='#'>{$location->name}</a></li>\";\n\n}", "public function render()\n {\n return view('laravolt::components.tab');\n }", "private function renderTabs()\n {\n ?>\n <h2 class=\"nav-tab-wrapper wp-clearfix\">\n <?php\n array_walk(\n $this->tabs,\n [$this, 'renderTab'],\n $this->currentlyActiveTab()\n );\n ?>\n </h2>\n <?php\n }", "function cre_banner_metabox_tab($property_metabox_tabs)\n{\n\tif (is_array($property_metabox_tabs)) {\n\t\t$property_metabox_tabs['banner'] = array(\n\t\t\t'label' => esc_html__('Top Banner', 'crucial-real-estate'),\n\t\t\t'icon' => 'dashicons-format-image',\n\t\t);\n\t}\n\n\treturn $property_metabox_tabs;\n}", "function getTabs($action) \n { \n if (isset($this->m_results[\"getTabs\"])) \n return $this->m_results[\"getTabs\"]; \n return parent::getTabs($action);\n }", "public function getTabs(): array\n {\n return $this->tabs;\n }", "function account_tab( $tabs ) {\n\n\t\t$tabs[1000]['points']['icon'] = 'um-faicon-trophy';\n\t\t$tabs[1000]['points']['title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['submit_title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['show_button'] = false;\n\n\t\treturn $tabs;\n\t}", "function makeTab($title,$content) {\n\t\t$placeholders = array(\n\t\t\t\"[+title+]\" => $title,\n\t\t\t\"[+tab_content+]\" => $content,\n\t\t);\n\t\treturn str_replace( array_keys( $placeholders ), array_values( $placeholders ), $this->templates[\"tab\"]);\n\t}", "function change_tabs($tabs){\n $tabs['additional_information']['title'] = 'Характеристики';\n return $tabs;\n}", "public function describeTabs();", "private static function getTab() {\n\t$tpc = ENV::getParm(\"tpc\"); if ($tpc) {\n\t\treturn dirname($tpc);\n\t}\n\t$tab = ENV::getParm(\"tab\"); if ($tab) return $tab;\n\t$tab = ENV::get(\"tab.\".APP_IDX); if ($tab) return $tab;\n\t$set = basename(APP_IDX);\n\n\t$arr = CFG::getValues(\"tabsets:$set\");\n\t$lst = VEC::flip($arr);\n\t$tab = VEC::get($lst, \"default\"); if ($tab) return $tab;\n\treturn key($arr);\n}", "function dpbootstrap_render_nav_tabs() \n{\n $output = '';\n\n if ($primary = menu_primary_local_tasks()) {\n $output .= '<ul class=\"nav nav-tabs\">' . drupal_render($primary) . '</ul>';\n }\n\n if ($secondary = menu_secondary_local_tasks()) {\n $output .= '<ul class=\"nav nav-tabs\">' . drupal_render($secondary) .'</ul>';\n }\n\n return $output;\n}", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "public function tab($strTab = NULL) {\n\t\t\tif (!is_null($strTab)) $this->strTab = $strTab; \n\t\t\treturn $this->strTab; \n\t\t}", "function scb_tabx($atts, $content){\n\t$tabid='';\n\t$tabclass = $atts['class'];\n\t$tabmode = ' nav-tabs';\n\t$tablia = ''; $tabCont = '';\n\t\n\tif($atts['id'] !=''){\n\t\t$tabid = ' id=\"'.$atts['id'].'\"'; \n\t}\n\t\n\tif($atts['mode'] !=''){\n\t\t$tabmode = ' nav-'.$atts['mode']; \n\t}\n\t\n\t$menu = explode('[/tab_content]', $content);\n\t$tabTitle='';\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\tadd_shortcode('content:'.str_replace(' ','',$tabTitle), 'tabMenuCont_sc');\n\t}\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\t$tabSCName = explode(']',$menu[$i])[0];\n\t\t$renscName = '[tab_content:'.str_replace(' ','',$tabTitle);\n\t\t$scName = str_replace($tabSCName, $renscName ,$menu[$i]);\n\t\t$tablia .= '<li role=\"presentation\" '.($i==0?'class=\"active\"':'').'><a href=\"#dv'.$attrs['id'].'_'.$i.'\" data-toggle=\"tab\" role=\"tab\" aria-expanded=\"true\">'.$tabTitle.'</a></li>';\n\t\t\n\t\t$tabCont .= '<div id=\"dv'.$attrs['id'].'_'.$i.'\" class=\"tab-pane '.($i==0?'active':'').'\" >'.do_shortcode(trim($scName)).'</div>';\n\t}\n\t\n\t$retVal = '<div'.$tabid.'><ul class=\"nav'.$tabmode.'\">'.$tablia.'</ul><div class=\"tab-content\">'.$tabCont.'</div></div>';\n\treturn $retVal;\n}", "public function render()\n {\n return view('components.components.tab');\n }", "public function getTab()\n\t{\n\t\treturn '<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABh0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzT7MfTgAAAY9JREFUOI2lkj1rVUEQhp93d49XjYiCUUFtgiBpFLyWFhKxEAsbGy0ErQQrG/EHCII/QMTGSrQ3hY1FijS5lQp2guBHCiFRSaLnnN0di3Pu9Rpy0IsDCwsz8+w776zMjP+J0JV48nrufMwrc2AUbt/CleMv5ycClHH1UZWWD4MRva4CByYDpHqjSgKEETcmHiHmItW5STuF/FfAg8HZvghHDDMpkKzYXScPgFcx9XBw4WImApITn26cejEAkJlxf7F/MOYfy8K3OJGtJlscKsCpAJqNGRknd+jO6TefA8B6WU1lMrBZ6fiE1R8Zs7hzVJHSjvJnNMb/hMSmht93IYIP5Qhw99zSx1vP+5eSxZmhzpzttmHTbcOKk+413Sav4v3J6ZsfRh5sFdefnnhr2Gz75rvHl18d3aquc43f1/BjaN9V1wn4tq6eta4LtnUCQuPWHmAv0AOKDNXstZln2/f3zgCUX8oFJx1zDagGSmA1mn2VmREk36pxw5NgzVqDhOTFLhjtOgMxmqVOE/81fgFilqPyaom5BAAAAABJRU5ErkJggg==\">callback';\n\t}", "public function getTab(): string {\n\t\t$errors = count($this->getWarnings());\n\t\t$untranslated = count($this->getUntranslated());\n\n\t\treturn '<span title=\"Translation ' . $this->getLocale() . '\"><svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"#' . ($errors || $untranslated ? 'B71C1C' : '009688') . '\" d=\"M12.87,15.07L10.33,12.56L10.36,12.53C12.1,10.59 13.34,8.36 14.07,6H17V4H10V2H8V4H1V6H12.17C11.5,7.92 10.44,9.75 9,11.35C8.07,10.32 7.3,9.19 6.69,8H4.69C5.42,9.63 6.42,11.17 7.67,12.56L2.58,17.58L4,19L9,14L12.11,17.11L12.87,15.07M18.5,10H16.5L12,22H14L15.12,19H19.87L21,22H23L18.5,10M15.88,17L17.5,12.67L19.12,17H15.88Z\" /></svg><span class=\"tracy-label\">' . strtoupper($this->getLocale()) . '</span></span>';\n\t}", "public function actionRenderTab() {\n\n if (isset($_GET['name']) && isset($_GET['type'])) {\n $model = $this->loadModel();\n $this->renderPartial('/project/' . $_GET['type'] . 'Wrapper',\n array('model' => $model,\n 'render' => $_GET['name'],\n 'tab_fk' => $_GET['tab_fk']));\n } elseif (isset($_GET['ajaxPanel']) && $_GET['ajaxPanel']) {\n if (!isset($_GET['ajax'])) {\n echo CJSON::encode(array('status' => 't',\n 'response' => $this->renderPartial('/project/ajaxInterface', array('params' => $_GET), true, true)));\n } elseif (isset($_GET['ajax'])) {\n echo $this->renderPartial('/project/ajaxInterface', array('params' => $_GET), true, true);\n }\n Yii::app()->end();\n } else {\n echo CJSON::encode(array('status' => 'f',\n 'response' => 'There was a problem rendering this panel.'));\n Yii::app()->end();\n }\n }", "public function get_tabs() {\n return $this->_tabs;\n }", "public function tab1(){\n $this->layout = new \\stdClass();\n return $this->layout;\n\n }", "public function prepare( $tabs ) {\n\t\t$tabs[ $this->key_name ] = array(\n\t\t\t'title' => __( 'Polylang', 'custom-sidebars' ),\n\t\t\t'cat_name' => __( 'Language', 'custom-sidebars' ),\n\t\t);\n\t\treturn $tabs;\n\t}", "function webplayer_admin_tabs($current = 'webplayer') {\r\n\t$tabs = array('webplayer' => 'HD Webplayer', 'videos' => 'Videos', 'playlist' => 'Playlist', 'license' => 'License', 'documentation' => 'Documentation');\r\n\t$links = array();\r\n\t\r\n\tforeach( $tabs as $tab => $name ) {\r\n\t\tif( $tab == $current) {\r\n\t\t\t$links[] = \"<a class='nav-tab nav-tab-active' href='?page=$tab'>$name</a>\";\r\n\t\t} else {\r\n\t\t\t$links[] = \"<a class='nav-tab' href='?page=$tab'>$name</a>\";\r\n\t\t}\r\n\t}\r\n\t\r\n\techo '<div id=\"icon-upload\" class=\"icon32\"></div>';\r\n\techo \"<h2 class='nav-tab-wrapper'>\";\r\n\tforeach( $links as $link ) {\r\n\t\techo $link;\r\n\t}\r\n\techo \"</h2>\";\r\n\t\r\n}", "public function lite_tabs( $tabs ) {\n\n $tabs['mobile'] = __( 'Mobile', 'envira-gallery' );\n $tabs['videos'] = __( 'Videos', 'envira-gallery' );\n $tabs['social'] = __( 'Social', 'envira-gallery' );\n $tabs['tags'] = __( 'Tags', 'envira-gallery' );\n $tabs['pagination'] = __( 'Pagination', 'envira-gallery' );\n return $tabs;\n\n }", "public function display_tablenav( $which ) \n{\n ?>\n <div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n\n <div class=\"alignleft actions\">\n <?php $this->bulk_actions(); ?>\n </div>\n <?php\n $this->extra_tablenav( $which );\n $this->pagination( $which );\n ?>\n <br class=\"clear\" />\n </div>\n <?php\n}", "function dw_index_tab_fields($cf)\n{\n global $post;\n $tab_num = get_post_meta($post->ID, 'guidance_tabs', true);\n if (is_numeric($tab_num)) {\n for ($t = 0; $t < $tab_num; $t++) {\n $cf[] = 'guidance_tabs_' . $t . '_tab_title';\n\n $section_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_sections', true);\n\n if (is_numeric($section_num)) {\n for ($s = 0; $s < $section_num; $s++) {\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_title';\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_html_content';\n }\n }\n\n $links_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_links', true);\n\n if (is_numeric($links_num)) {\n for ($l = 0; $l < $links_num; $l++) {\n $cf[] = 'guidance_tabs_' . $t . '_links_' . $l . '_link_title';\n }\n }\n }\n }\n\n return $cf;\n}", "function showListedTemplate($templateName, $output, $tableName, $id) {\n switch ($templateName) {\n case \"default\":\n echo $output[0].\" - \".$output[1];\n break;\n\n case \"no\":\n echo \"no\";\n break;\n\n default:\n echo $tableName . \"<br>\";\n echo $id . \"<br>\";\n print_r($output);\n echo \"<hr>\";\n }\n}", "function tab($courseid, $blockid, $forum, $chatid, $groupid, $current_tab = 'description') {\n global $CFG;\n\n $tabs = array();\n $row = array();\n $inactive = array();\n $activated = array();\n\n if (!$groupid) { // Imprime o map somente se houver grupo.\n $inactive[] = 'map';\n }\n\n $row[] = new tabobject('description',\n $CFG->wwwroot.'/blocks/pbltool/view.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid,\n get_string('description', 'block_pbltool'));\n $row[] = new tabobject('tasks',\n $CFG->wwwroot.'/blocks/pbltool/view_tasks.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid ,\n get_string('tasks', 'block_pbltool'));\n $row[] = new tabobject('map',\n $CFG->wwwroot.'/blocks/pbltool/view_gantt.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid.'\"\n onclick=\"this.target=\\'map\\'; return\n openpopup(\\'/blocks/pbltool/view_gantt.php?blockid='.$blockid.'&courseid='.$courseid.'&groupid='.$groupid.'\\'\n ,\\'map\\', \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('map', 'block_pbltool'));\n $row[] = new tabobject('forum', $CFG->wwwroot.'/mod/forum/view.php?f='.$forum . '&group=' . $groupid . '\"\n onclick=\"this.target=\\'forum\\';\n return openpopup(\\'/mod/forum/view.php?f='.$forum .'&group=' . $groupid .'\\' ,\\'forum\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=1000,height=600\\');',\n get_string('forum', 'block_pbltool'));\n\n if ($groupid) {\n $row[] = new tabobject('chat', $CFG->wwwroot.'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid. '\"\n onclick=\"this.target=\\'chat\\';\n return openpopup(\\'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid .'\\' ,\\'chat\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('groupchat', 'block_pbltool'));\n } else {\n $row[] = new tabobject('chat', $CFG->wwwroot.'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid. '\"\n onclick=\"this.target=\\'chat\\';\n return openpopup(\\'/mod/chat/gui_header_js/index.php?id='.$chatid.'&groupid='.$groupid .'\\' ,\\'chat\\',\n \\'resizable=1,scrollbars=1,directories=o,location=0,menubar=0,toolbar=0,status=0,width=800,height=450\\');',\n get_string('Chat', 'block_pbltool'));\n }\n\n if (count($row) > 1) {\n $tabs[] = $row;\n return print_tabs($tabs, $current_tab, $inactive, $activated, true);\n }\n}", "public static function preRenderTabContent(array $element) {\n // Build content array.\n $element['content'] = [\n '#theme' => 'contacts_dash_tabs',\n '#weight' => -1,\n '#tabs' => [],\n '#manage_mode' => $element['#manage_mode'],\n '#attached' => [\n 'library' => ['contacts/tabs'],\n ],\n ];\n\n foreach ($element['#tabs'] as $tab_id => $tab) {\n $element['content']['#tabs'][$tab_id] = [\n 'text' => $tab['label'],\n 'link' => Url::fromRoute('page_manager.page_view_contacts_dashboard_contact', [\n 'user' => $element['#user']->id(),\n 'subpage' => $tab['path'],\n ]),\n ];\n\n // Add the drag icon.\n if ($element['#manage_mode']) {\n $element['content']['#tabs'][$tab_id]['link_attributes']['class'][] = 'manage-tab';\n }\n\n // Swap links for AJAX request links.\n if ($element['#ajax']) {\n $element['content']['#tabs'][$tab_id]['link_attributes']['data-ajax-url'] = Url::fromRoute('contacts.ajax_subpage', [\n 'user' => $element['#user']->id(),\n 'subpage' => $tab['path'],\n ])->toString();\n $element['content']['#tabs'][$tab_id]['link_attributes']['class'][] = 'use-ajax';\n $element['content']['#tabs'][$tab_id]['link_attributes']['data-ajax-progress'] = 'fullscreen';\n }\n\n // Add tab id to attributes.\n $element['content']['#tabs'][$tab_id]['attributes']['data-contacts-drag-tab-id'] = $tab_id;\n $element['content']['#tabs'][$tab_id]['link_attributes']['data-contacts-tab-id'] = $tab_id;\n\n // Add active class to current tab.\n if ($tab['path'] == $element['#subpage']) {\n $element['content']['#tabs'][$tab_id]['attributes']['class'][] = 'is-active';\n $element['content']['#tabs'][$tab_id]['link_attributes']['class'][] = 'is-active';\n }\n }\n\n return $element;\n }", "function tpps_details_tabs(array &$state) {\n $output = '<ul class=\"nav nav-tabs\" role=\"tablist\">\n <li class=\"nav-item\"><a class=\"nav-link active\" role=\"tab\" data-toggle=\"tab\" href=\"#species\">Species</a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#study\">Study Details</a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#trees\">Plants</a></li>';\n $p_exist = FALSE;\n $g_exist = FALSE;\n $mass_spectro_exist = FALSE;\n for ($i = 1; $i <= $state['stats']['species_count']; $i++) {\n if (!empty($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['phenotype'])) {\n $p_exist = TRUE;\n }\n if (!empty($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['genotype'])) {\n $g_exist = TRUE;\n }\n if ($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['phenotype']['iso-check'] == TRUE) {\n $mass_spectro_exist = TRUE;\n }\n }\n \n $output .= $p_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#phenotype\">Phenotypes / Environments</a></li>' : \"\";\n $output .= $g_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#genotype\">Genotypes</a></li>' : \"\";\n $output .= $mass_spectro_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#mass_spectrometry\">Mass Spectrometry</a></li>' : \"\";\n $output .= '</ul><div id=\"tab-content\" class=\"tab-content\">';\n\n $output .= \"<div id=\\\"species\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade in active\\\"></div>\";\n $output .= \"<div id=\\\"study\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\";\n $output .= \"<div id=\\\"trees\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\";\n\n $output .= $p_exist ? \"<div id=\\\"phenotype\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n $output .= $g_exist ? \"<div id=\\\"genotype\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n $output .= $mass_spectro_exist ? \"<div id=\\\"mass_spectrometry\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n\n $output .= '</div>';\n return $output;\n}", "function ch_widget_tabcontent($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_tabcontent');\n\t\n\tinclude(TEMPLATEPATH . '/tabcontent.php');\n\t\n}", "function woocommerce_product_tabs($tabs){\n global $post;\n //get global tabs\n $global_tabs = get_option('wc_'.$this->id.'_globals');\n $global_tabs_ids = ! empty( $global_tabs ) ? array_map( 'absint', $global_tabs ) : array();\n \n //get tabs to exclude from this product\n $exclude_tabs = get_post_meta( $post->ID, 'exclude_custom_tabs_ids', true );\n $exclude_tabs_ids = ! empty($exclude_tabs ) ? array_map( 'absint', $exclude_tabs ) : array();\n \n //get tabs to include with current product\n $product_tabs = get_post_meta( $post->ID, 'custom_tabs_ids', true );\n $_ids = ! empty($product_tabs ) ? array_map( 'absint', $product_tabs ) : null;\n \n //combine global and product specific tabs and remove excluded tabs\n $_ids = array_merge((array)$_ids,(array)array_diff((array)$global_tabs_ids, (array)$exclude_tabs_ids));\n \n if ($_ids){\n //fix order\n $_ids = array_reverse($_ids);\n //loop over tabs and add them\n foreach ($_ids as $id) {\n \tif ($this->post_exists($id)){\n\t\t\t\t\t$display_title = get_post_meta($id,'tab_display_title',true);\n\t\t\t\t\t$priority = get_post_meta($id,'tab_priority',true);\n\t $tabs['customtab_'.$id] = array(\n\t 'title' => ( !empty($display_title)? $display_title : get_the_title($id) ),\n\t 'priority' => ( !empty($priority)? $priority : 50 ),\n\t 'callback' => array($this,'render_tab'),\n\t 'content' => apply_filters('the_content',get_post_field( 'post_content', $id)) //this allows shortcodes in custom tabs\n\t );\n \t}\n }\n }\n return $tabs;\n }", "public function getTabOrder() {}", "public static function getTabs() {\r\n\t\treturn self::getModulesForUser(Config::$sis_tab_folder);\r\n\t}", "protected function getTabOptions() {\n $options = [\n 'members' => $this->t('Members'),\n 'admins' => $this->t('Administrators'),\n ];\n if (($this->currentUser->hasPermission('manage circle spaces') &&\n $this->moduleHandler->moduleExists('living_spaces_circles')) ||\n $this->moduleHandler->moduleExists('living_spaces_subgroup')\n ) {\n $options['inherit'] = $this->t('Inherited');\n }\n return $options;\n }", "private function _tabModelCreateData()\n {\n return [\n 'designTabsModel' => [\n 'containerDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'tabDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'tabDesignTextModel' => [\n 'size' => 20\n ],\n 'contentDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n ],\n 'textModel' => [\n 'designTextModel' => [\n 'size' => 10\n ],\n 'designBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'type' => 1,\n 'hasEditor' => false,\n ],\n 'isShowEmpty' => true,\n 'isLazyLoad' => true,\n ];\n }", "protected function getTab() {\n return \" \";\n }", "public function tabsShortcode($atts) {\n ob_start();\n ?>\n <div class=\"row\">\n <div class=\"col s12\">\n <ul class=\"tabs\">\n <li class=\"tab col s3\"><a href=\"#test1\">Test 1</a></li>\n <li class=\"tab col s3\"><a class=\"active\" href=\"#test2\">Test 2</a></li>\n <li class=\"tab col s3 disabled\"><a href=\"#test3\">Disabled Tab</a></li>\n <li class=\"tab col s3\"><a href=\"#test4\">Test 4</a></li>\n </ul>\n </div>\n <div id=\"test1\" class=\"col s12\">Test 1</div>\n <div id=\"test2\" class=\"col s12\">Test 2</div>\n <div id=\"test3\" class=\"col s12\">Test 3</div>\n <div id=\"test4\" class=\"col s12\">Test 4</div>\n </div>\n <?php\n return ob_get_clean();\n\n }", "public function tab()\n\t{\n\t\treturn 'cash';\n\t}", "function sliderRenderSlidesTabBar($slider_id, $params = array())\n\t{\n\n\t\textract($params);\n\n\t\t$slide = new dbo_slider_slide(\"WHERE slider = '\".dboescape($slider_id).\"' ORDER BY order_by\");\n\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"dbo-tab-bar margin-bottom\" id=\"tabs-slides\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<span class=\"tabs inline-block\" style=\"max-width: calc(100% - 120px)\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tif($slide->size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<span class=\"dbo-tab <?= $active_slide == $slide->id ? 'active' : '' ?>\" data-slide_id=\"<?= $slide->id ?>\" peixe-reload=\".wrapper-slide-content\" data-url=\"<?= keepUrl('active_slide='.$slide->id) ?>\"><br /><?= strlen(trim($slide->titulo)) ? htmlSpecialChars($slide->titulo) : 'Slide sem título' ?><br />&nbsp;</span>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}while($slide->fetch());\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?>\n\t\t\t\t\t\t\t<span class=\"dbo-tab\" style=\"cursor: default;\"><br /><br />&nbsp;</span>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"right relative top-20\" style=\"right: 15px;\">\n\t\t\t\t\t<a href=\"<?= secureUrl('dbo/core/dbo-slider-ajax.php?action=adicionar-slide&slider_id='.$slider_id.'&current_url='.dboEncode(fullUrl()).'&'.CSRFVar()) ?>\" class=\"no-margin peixe-json font-13\" peixe-log><i class=\"fa fa-plus-circle font-14\"></i> <span class=\"underline\">Adicionar slide</span></a>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "function training_menu_tabs($arg) {\n return t('This is the tab \"%arg\" in the \"basic tabs\" example', array('%arg' => $arg));\n}", "public function renderTabs($input, array $args, Parser $parser, PPFrame $frame) {\n\t\t$doc = new DOMDocument('1.0', \"UTF-8\");\n\t\t$doc->loadHTML(utf8_decode($parser->recursiveTagParse($input, $frame)));\n\t\t$doc = JQueryLihuen::renderTabsDoFormat($doc, \"extJQueryLihuenTabs-\" . JQueryLihuen::$tabcount);\n\t\tJQueryLihuen::$tabcount++;\n\t\n\t\treturn utf8_encode($doc->saveHTML());\n\t}", "function demotheme_admin_tabs( $current = 'general' ) {\n $tabs = array( \n 'demotheme_tab_general' => __( 'General', 'demotheme' ),\n 'demotheme_tab_images' => __( 'Images', 'demotheme' ),\n 'demotheme_tab_social' => __( 'Social', 'demotheme' ),\n 'demotheme_tab_footer' => __( 'Footer', 'demotheme' )\n ); \n $links = array();\n echo '<div id=\"icon-themes\" class=\"icon32\"><br></div>';\n echo '<h2 class=\"nav-tab-wrapper\">';\n foreach( $tabs as $tab => $name ){\n $class = ( $tab == $current ) ? ' nav-tab-active' : '';\n echo \"<a class='nav-tab$class' href='#$tab'>$name</a>\";\n }\n echo '</h2>';\n }", "public static function get_active($tab) {\n\t\t\tif (isset($_GET['tab'])) {\n\t\t\t\techo $_GET['tab'] == $tab ? 'nav-tab-active' : '';\n\t\t\t} elseif ($tab == 'create-deal') {\n\t\t\techo 'nav-tab-active';\n\t\t}\n\t}", "protected function renderItems()\n {\n $html = '';\n foreach ($this->items as $n => $item) {\n if ($item['active']) {\n $this->options['selected'] = $n;\n unset($item['active']);\n }\n $html .= Tab::widget($item);\n }\n return $html;\n }", "function render($cTabs,$title,$base_path) {\n\t\tglobal $modx;\n\t\t$content = \"\";\n\t\tforeach ($cTabs as $name=>$tab_content) {\n\t\t\t$content .= $this->makeTab($name,$tab_content);\n\t\t}\n\t\t$placeholders = array(\n\t\t\t\"[+ditto_base_url+]\" => $base_path,\n\t\t\t\"[+base_url+]\" => $modx->config[\"site_url\"].\"manager\",\n\t\t\t\"[+theme+]\" => $modx->config[\"manager_theme\"],\n\t\t\t\"[+title+]\" => $title,\n\t\t\t\"[+content+]\" => $content,\n\t\t\t\"[+charset+]\" => $modx->config[\"modx_charset\"],\n\t\t);\n\t\n\t\treturn str_replace( array_keys( $placeholders ), array_values( $placeholders ), $this->templates[\"main\"]);\n\t}", "public function _getTab()\n\t{\n\t\treturn $this->_tab;\n\t}", "public function render() {\n return [\n '#theme' => $this->themeFunctions(),\n '#view' => $this->view,\n '#options' => $this->options,\n '#rows' => $this->view->result,\n '#mapping' => $this->defineMapping(),\n ];\n }", "public function getTab()\n\t{\n\t\t$this->data = $this->getData($this->sessionData);\n\n\t\tif (count($this->data)) {\n\t\t\treturn '<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAITSURBVBgZpcHLThNhGIDh9/vn7/RApwc5VCmFWBPi1mvwAlx7BW69Afeu3bozcSE7E02ILjCRhRrds8AEbKVS2gIdSjvTmf+TYqLu+zyiqszDMCf75PnnnVwhuNcLpwsXk8Q4BYeSOsWpkqrinJI6JXVK6lSRdDq9PO+19vb37XK13Hj0YLMUTVVyWY//Cf8IVwQEGEeJN47S1YdPo4npDpNmnDh5udOh1YsZRcph39EaONpnjs65oxsqvZEyTaHdj3n2psPpKDLBcuOOGUWpZDOG+q0S7751ObuYUisJGQ98T/Ct4Fuo5IX+MGZr95jKjRKLlSxXxFxOEmaaN4us1Upsf+1yGk5ZKhp8C74H5ZwwCGO2drssLZZo1ouIcs2MJikz1oPmapHlaoFXH1oMwphyTghyQj+MefG+RblcoLlaJG/5y4zGCTMikEwTctaxXq/w9kuXdm9Cuzfh9acujXqFwE8xmuBb/hCwl1GKAnGccDwIadQCfD9DZ5Dj494QA2w2qtQW84wmMZ1eyFI1QBVQwV5GiaZOpdsPaSwH5HMZULi9UmB9pYAAouBQbMHHrgQcnQwZV/KgTu1o8PMgipONu2t5KeaNiEkxgAiICDMCCFeEK5aNauAOfoXx8KR9ZOOLk8P7j7er2WBhwWY9sdbDeIJnwBjBWBBAhGsCmiZxPD4/7Z98b/0QVWUehjkZ5vQb/Un5e/DIsVsAAAAASUVORK5CYII=\" />';\n\t\t}\n\t}", "protected function render_instantquiz_tabs($tabs) {\n return print_tabs($tabs->tabrows, $tabs->selected, $tabs->inactive, $tabs->activated, true);\n }", "function pexeto_show_tabs( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t\t\t'titles' => '',\r\n\t\t\t\t\t'width' => 'medium'\r\n\t\t\t\t), $atts ) );\r\n\t\t$titlearr=explode( ',', $titles );\r\n\t\t$html='<div class=\"tabs-container\"><ul class=\"tabs \">';\r\n\t\tif ( $width=='small' ) {\r\n\t\t\t$wclass='w1';\r\n\t\t}elseif ( $width=='big' ) {\r\n\t\t\t$wclass='w3';\r\n\t\t}else {\r\n\t\t\t$wclass='w2';\r\n\t\t}\r\n\t\tforeach ( $titlearr as $title ) {\r\n\t\t\t$html.='<li class=\"'.$wclass.'\"><a href=\"#\">'.$title.'</a></li>';\r\n\t\t}\r\n\t\t$html.='</ul><div class=\"panes\">'.do_shortcode( $content ).'</div></div>';\r\n\t\treturn $html;\r\n\t}", "public function getTab() {\n\n \\Tracy\\Debugger::timer($this->name);\n\n if(\\TracyDebugger::getDataValue('referencePageEdited') && $this->wire('input')->get('id') && ($this->wire('process') == 'ProcessPageEdit' || $this->wire('process') == 'ProcessUser')) {\n $this->p = $this->wire('process')->getPage();\n }\n elseif($this->wire('process') == 'ProcessPageView') {\n $this->p = $this->wire('page');\n }\n\n if(!$this->p) return;\n\n $diskFiles = $this->getDiskFiles($this->p);\n $pageFiles = $this->getPageFiles($this->p);\n $numDiskFiles = count($diskFiles, COUNT_RECURSIVE) - count($diskFiles);\n\n if($numDiskFiles == 0) {\n $this->filesListStr .= '<p>There are no files associated with this page.';\n }\n else {\n foreach($pageFiles as $pid => $files) {\n $pageFilesBasenames[$pid] = array();\n $fileFields[$pid] = array();\n $this->missingFiles[$pid] = array();\n foreach($files as $file) {\n $basename = pathinfo($file['filename'], PATHINFO_BASENAME);\n array_push($pageFilesBasenames[$pid], $basename);\n $fileFields[$pid][$basename] = $file['field'];\n if(!in_array($basename, $diskFiles[$pid])) {\n $this->numMissingFiles++;\n array_push($this->missingFiles[$pid], $file);\n }\n }\n }\n\n foreach($diskFiles as $pid => $files) {\n if(empty($files) && !isset($this->missingFiles[$pid])) continue;\n $p = $this->wire('pages')->get($pid);\n $repeaterFieldName = strpos($p->template->name, 'repeater_') !== false ? ' ('.substr($p->template->name, 9).')' : '';\n if(isset($currentPID)) $this->filesListStr .= '</table></div>';\n if(!isset($currentPID) || $pid !== $currentPID) {\n $this->filesListStr .= '\n <h2><strong>#'.$pid . '</strong> ' . $repeaterFieldName.'</h2>\n <div class=\"tracyPageFilesPage\">\n <table>\n <th>Filename</th><th>Field</th>'.(count($this->tempFiles) > 0 ? '<th>Temp</th>' : '');\n }\n\n foreach($files as $file) {\n if(isset($pageFilesBasenames[$pid]) && in_array($file, $pageFilesBasenames[$pid])) {\n $style = '';\n $fileField = $fileFields[$pid][$file];\n }\n else {\n $style = 'color: ' . \\TracyDebugger::COLOR_WARN;\n $fileField = '';\n $this->orphanFiles[] = $p->filesManager()->path . $file;\n }\n $this->filesListStr .= '<tr><td><a style=\"'.$style.' !important\" href=\"'.$p->filesManager()->url.$file.'\">'.$file.'</a></td><td style=\"width: 1px\">'.$fileField.'</td>' . (count($this->tempFiles) > 0 ? '<td style=\"text-align: center\">'.(in_array($p->filesManager()->path.$file, $this->tempFiles) ? '\t✔' : '').'</td>' : '') . '</tr>';\n }\n\n if(isset($this->missingFiles[$pid])) {\n foreach($this->missingFiles[$pid] as $missingFile) {\n $this->filesListStr .= '<tr><td><span style=\"color: ' . \\TracyDebugger::COLOR_ALERT . ' !important\">'.pathinfo($missingFile['filename'], PATHINFO_BASENAME).'</td><td>'.$missingFile['field'].'</td>' . (count($this->tempFiles) > 0 ? '<td></td>' : '') . '</tr>';\n }\n }\n\n $currentPID = $pid;\n }\n $this->filesListStr .= '\n </table>\n </div>';\n }\n\n if($this->numMissingFiles > 0) {\n $iconColor = \\TracyDebugger::COLOR_ALERT;\n }\n elseif(count($this->orphanFiles) > 0) {\n $iconColor = \\TracyDebugger::COLOR_WARN;\n }\n else {\n $iconColor = \\TracyDebugger::COLOR_NORMAL;\n }\n\n // the svg icon shown in the bar and in the panel header\n $this->icon = '\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"23.3\" height=\"16\" viewBox=\"244.4 248 23.3 16\">\n <path fill=\"'.$iconColor.'\" d=\"M267.6 255.2l-3.2 8.8h-17.6l3.3-8.8c.3-.7 1.2-1.4 2-1.4h14.5c.8 0 1.2.6 1 1.4zm-21.8 7.3l3-7.9c.5-1.3 1.9-2.3 3.3-2.3h12.7c0-.8-.7-1.5-1.5-1.5h-10.2l-1.5-2.9h-5.8c-.8 0-1.5.7-1.5 1.5V261c.1.9.7 1.5 1.5 1.5z\"/>\n </svg>\n ';\n\n $orphanMissingCounts = '';\n if($this->numMissingFiles > 0 || count($this->orphanFiles) > 0) {\n $orphanMissingCounts = $this->numMissingFiles . '/' . count($this->orphanFiles) . '/';\n }\n\n return \"<span title='{$this->label}'>{$this->icon}\".(\\TracyDebugger::getDataValue('showPanelLabels') ? $this->label : '').\" \".$orphanMissingCounts.($numDiskFiles > 0 ? $numDiskFiles : '').\"</span>\";\n }", "function show_tabs($tabs) {\n// $this->log(__CLASS__ . \".\" . __FUNCTION__ . \"() for \" . $this->controller->request->params['controller'] . '/' . $this->controller->request->params['action'], LOG_DEBUG);\n\n if (!is_array($tabs)){\n $args = func_get_args();\n }\n else $args = $tabs;\n\n foreach($args as $tabID){\n $tabMap = Configure::read('tabControllerActionMap');\n $controller = $tabMap[$tabID]['controller'];\n $action = $tabMap[$tabID]['action'];\n $isAuthorized = $this->controller->DhairAuth->isAuthorizedForUrl($controller,$action); \n\n if (!$isAuthorized)\n {\n unset($args[array_search($tabID, $args)]);\n }\n elseif ($controller == 'surveys' && $action == 'index'\n && empty($this->controller->session_link)){\n unset($args[array_search($tabID, $args)]);\n }\n\n }\n\n $this->tabs_for_layout = $args;\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...) tabs_for_layout after auth filter: \" . print_r($this->tabs_for_layout, true) /**. \", here's the stack: \" . Debugger::trace() */, LOG_DEBUG);\n\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), next: calculateTabsToRemoveOrDisable()\" /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->calculateTabsToRemoveOrDisable();\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), just did calculateTabsToRemoveOrDisable()\" /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->controller->set('tabsToDisable', $this->tabsToDisable);\n\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), here's tabs_for_layout: \" . print_r($this->tabs_for_layout, true) /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->controller->set('tabs_for_layout', $this->tabs_for_layout);\n }", "function RenderTabItem($Label, $URL, array $Classes) {\n\t$Result = sprintf(\"<li class=\\\"%s\\\">\\n\" .\n\t\t\t\t\t\t\t\t\t\t\"\t<span>%s</span>\\n\" .\n\t\t\t\t\t\t\t\t\t\t\"</li>\\n\",\n\t\t\t\t\t\t\t\t\t\tGetValue($URL, $Classes, ''),\n\t\t\t\t\t\t\t\t\t\tAnchor($Label, $URL));\n\treturn $Result;\n}", "public function get_help_tabs()\n {\n }", "protected function getTabs()\n {\n return $this->_tabs;\n }", "function cd_status_cake_page(){\n ?>\n <div class=\"wrap\">\n <h2>Client Dash Status Cake</h2>\n <?php\n cd_create_tab_page(array(\n 'tabs' => array(\n 'Status' => 'status',\n 'Settings' => 'settings',\n 'Test' => 'test'\n )\n ));\n ?>\n </div><!--.wrap-->\n <?php\n}", "public function getTabs()\n {\n // so we need to set current handler object for rendering. \n $tabs = static::$tabs;\n foreach ($tabs as $tab) {\n $tab->setHandler($this);\n }\n return $tabs;\n }", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "function parseTabs(&$field, &$item) {\r\n\t\t$editorarea_per_tab = $field->parameters->get('editorarea_per_tab', 0);\r\n\r\n\t\t$start_of_tabs_pattern = $field->parameters->get('start_of_tabs_pattern');\r\n\t\t$end_of_tabs_pattern = $field->parameters->get('end_of_tabs_pattern');\r\n\t\t\r\n\t\t$start_of_tabs_default_text = $field->parameters->get('start_of_tabs_default_text'); // Currently unused\r\n\t\t$default_tab_list = $field->parameters->get('default_tab_list'); // Currently unused\r\n\t\t\r\n\t\t$title_tab_pattern = $field->parameters->get('title_tab_pattern');\r\n\t\t$start_of_tab_pattern = $field->parameters->get('start_of_tab_pattern');\r\n\t\t$end_of_tab_pattern = $field->parameters->get('end_of_tab_pattern');\r\n\t\t\r\n\t\t$field_value = & $field->value[0];\r\n\t\t$field->tabs_detected = false;\r\n\t\t\r\n\t\t// MAKE MAIN TEXT FIELD OR TEXTAREAS TABBED\r\n\t\tif ( $editorarea_per_tab ) {\r\n\t\t\t\r\n\t\t\t//echo 'tabs start: ' . preg_match_all('/'.$start_of_tabs_pattern.'/u', $field_value ,$matches) . \"<br />\";\r\n\t\t\t//print_r ($matches); echo \"<br />\";\r\n\t\t\t\r\n\t\t\t//echo 'tabs end: ' . preg_match_all('/'.$end_of_tabs_pattern.'/u', $field_value ,$matches) . \"<br />\";\r\n\t\t\t//print_r ($matches); echo \"<br />\";\r\n\t\t\t\r\n\t\t\t$field->tabs_detected = preg_match('/' .'(.*)('.$start_of_tabs_pattern .')(.*)(' .$end_of_tabs_pattern .')(.*)'. '/su', $field_value ,$matches);\r\n\t\t\t\r\n\t\t\tif ($field->tabs_detected) {\r\n\t\t\t\t$field->tab_info = new stdClass();\r\n\t\t\t\t$field->tab_info->beforetabs = $matches[1];\r\n\t\t\t\t$field->tab_info->tabs_start = $matches[2];\r\n\t\t\t\t$insidetabs = $matches[3];\r\n\t\t\t\t$field->tab_info->tabs_end = $matches[4];\r\n\t\t\t\t$field->tab_info->aftertabs = $matches[5];\r\n\t\t\t\t\r\n\t\t\t\t//echo 'tab start: ' . preg_match_all('/'.$start_of_tab_pattern.'/u', $insidetabs ,$matches) . \"<br />\";\r\n\t\t\t\t//echo \"<pre>\"; print_r ($matches); echo \"</pre><br />\";\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//echo 'tab end: ' . preg_match_all('/'.$end_of_tab_pattern.'/u', $insidetabs ,$matches) . \"<br />\";\r\n\t\t\t\t//print_r ($matches); echo \"<br />\";\r\n\t\t\t\t\r\n\t\t\t\t$tabs_count = preg_match_all('/('.$start_of_tab_pattern .')(.*?)(' .$end_of_tab_pattern .')/su', $insidetabs ,$matches) . \"<br />\";\r\n\t\t\t\t\r\n\t\t\t\tif ($tabs_count) {\r\n\t\t\t\t\t$tab_startings = $matches[1];\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($tab_startings as $i => $v) {\r\n\t\t\t\t\t\t$title_matched = preg_match('/'.$title_tab_pattern.'/su', $tab_startings[$i] ,$title_matches) . \"<br />\";\r\n\t\t\t\t\t\t//echo \"<pre>\"; print_r($title_matches); echo \"</pre>\";\r\n\t\t\t\t\t\t$tab_titles[$i] = $title_matches[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$tab_contents = $matches[2];\r\n\t\t\t\t\t$tab_endings = $matches[3];\r\n\t\t\t\t\t//foreach ($tab_titles as $tab_title) echo \"$tab_title &nbsp; &nbsp; &nbsp;\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo \"FALIED while parsing tabs<br />\";\r\n\t\t\t\t\t$field->tabs_detected = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$field->tab_info->tab_startings = & $tab_startings;\r\n\t\t\t\t$field->tab_info->tab_titles = & $tab_titles;\r\n\t\t\t\t$field->tab_info->tab_contents = & $tab_contents;\r\n\t\t\t\t$field->tab_info->tab_endings = & $tab_endings;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function getCustomTabsInfo(){\n $custom_tabs_info = array(array('name' => 'Tab1', 'url' => 'javascript://'),\n array('name' => 'Tab2', 'url' => 'javascript://'),\n array('name' => 'Tab3', 'url' => 'javascript://'), );\n $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);\n mysql_select_db(DB_NAME);\n $sql = \"select * from healingcrystals_user_custom_tabs where user_id='\" . $this->getId() . \"'\";\n $result = mysql_query($sql);\n if (mysql_num_rows($result)){\n while($entry = mysql_fetch_assoc($result)){\n $custom_tabs_info[$entry['tab_index']-1]['name'] = $entry['tab_description'];\n $custom_tabs_info[$entry['tab_index']-1]['url'] = $entry['tab_link'];\n }\n }\n mysql_close($link);\n return $custom_tabs_info;\n }", "function display_tablenav( $which ) {\n $mode = isset($_REQUEST['mode']) ? wpla_clean($_REQUEST['mode']) : 'list';\n ?>\n <div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n <div class=\"alignleft actions\">\n <?php $this->bulk_actions(); ?>\n </div>\n <?php\n $this->extra_tablenav( $which );\n $this->pagination( $which );\n $this->view_switcher( $mode );\n ?>\n <br class=\"clear\" />\n </div>\n <?php\n }", "public function render():array\n {\n return $this->itinerary;\n }", "function productTabMenu($mode = 'order')\n{\n\t$CI =& get_instance();\n\t$ajax = $mode == 'order' ? 'getOrderTabs' : ($mode == 'sale' ? 'getSaleOrderTabs' : 'getViewTabs');\n\t$sc = '';\n\t$qr = \"SELECT * FROM product_tab WHERE id_parent = 0\";\n\t$qs = $CI->db->query($qr);\n\n\tforeach( $qs->result() as $rs)\n\t{\n\t\tif( hasChild($rs->id) === TRUE)\n\t\t{\n\t\t\t//$sc .= '<li class=\"dropdown\" onmouseover=\"expandTab((this))\" onmouseout=\"collapseTab((this))\">';\n\t\t\t$sc .= '<li class=\"dropdown pointer\">';\n\t\t\t//$sc .= '<a id=\"ul-'.$rs->id.'\" class=\"dropdown-toggle\" role=\"tab\" data-toggle=\"tab\" href=\"#cat-'.$rs->id.'\" onClick=\"'.$ajax.'(\\''.$rs->id.'\\')\" >';\n\t\t\t$sc .= '<a id=\"ul-'.$rs->id.'\" class=\"dropdown-toggle\" role=\"tab\" data-toggle=\"dropdown\" aria-expanded=\"false\">';\n\t\t\t$sc .= $rs->name.'<span class=\"caret\"></span></a>';\n\t\t\t//$sc .= $rs->name.'</a>';\n\t\t\t$sc .= \t'<ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"ul-'.$rs->id.'\">';\n\t\t\t$sc .= \tgetSubTab($rs->id, $ajax);\n\t\t\t$sc .= '</ul>';\n\t\t\t$sc .= '</li>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sc .= '<li class=\"menu\"><a href=\"#cat-'.$rs->id.'\" role=\"tab\" data-toggle=\"tab\" onClick=\"'.$ajax.'(\\''.$rs->id.'\\')\">'.$rs->name.'</a></li>';\n\t\t}\n\t}\n\treturn $sc;\n\n}", "private function parse_options()\n\t\t{\n\t\t\t$options = $this->options;\n\n\t\t\tforeach ( $options as $option ) {\n\n\t\t\t\tif ( $option[ 'type' ] == 'heading' ) {\n\t\t\t\t\t$tab_name = sanitize_title( $option[ 'name' ] );\n\t\t\t\t\t$this->tab_headers = array( $tab_name => $option[ 'name' ] );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$option[ 'tab' ] = $tab_name;\n\t\t\t\t$tabs[ $tab_name ][ ] = $option;\n\n\t\t\t}\n\n\t\t\t$this->tabs = $tabs;\n\n\t\t\treturn $tabs;\n\t\t}", "function dashboard_bundles()\r\n{\r\n\t$Templatic_connector = New Templatic_connector;\r\n\trequire_once(TEVOLUTION_PAGE_TEMPLATES_DIR.'classes/main.connector.class.php' );\t\r\n\tif(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='extend') { \t\r\n\t\t$Templatic_connector->templ_extend();\r\n\t}else if(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='payment-gateways') { \t\r\n\t\t$Templatic_connector->templ_payment_gateway();\r\n\t}else if(isset($_REQUEST['tab']) && $_REQUEST['tab'] =='system_status') { \t\r\n\t\t$Templatic_connector->templ_system_status();\r\n\t}\r\n\telse if((!isset($_REQUEST['tab'])&& @$_REQUEST['tab']=='') || isset($_REQUEST['tab']) && $_REQUEST['tab'] =='overview') { \t\r\n\t\t$Templatic_connector->templ_overview();\r\n\t\t$Templatic_connector->templ_dashboard_extends();\r\n\t}\r\n \r\n}", "public function uultra_get_default_modules_array()\r\n\t{\r\n\t\t$tabs = array();\r\n\t\t\r\n\t\t$tabs[0] =array(\r\n\t\t\t 'position' => 0,\r\n\t\t\t 'slug' => 'dashboard',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-tachometer',\t\t\t \t\t\t\r\n\t\t\t 'title' => __('Dashboard', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[1] =array(\r\n\t\t\t 'position' => 1,\r\n\t\t\t 'slug' => 'followers',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'icon' => 'fa-sitemap',\t\t\t \t\t\t\r\n\t\t\t 'title' => __('Followers', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 0 //not visible in user's dashboard\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[2] =array(\r\n\t\t\t 'position' => 2,\r\n\t\t\t 'slug' => 'following',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'icon' => 'fa-users',\t\t\t\r\n\t\t\t 'title' => __('Following', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 0 //not visible in user's dashboard\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[3] =array(\r\n\t\t\t 'position' => 3,\r\n\t\t\t 'slug' => 'photos',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-camera',\t\t\t\r\n\t\t\t 'title' => __('My Photos', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[4] =array(\r\n\t\t\t 'position' => 4,\r\n\t\t\t 'slug' => 'videos',\r\n\t\t\t 'slug_public' => 'fa-video-camera',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-video-camera',\t\t\t\r\n\t\t\t 'title' => __('My Videos', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[5] =array(\r\n\t\t\t 'position' => 5,\r\n\t\t\t 'slug' => 'posts',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-edit',\t\t\t\r\n\t\t\t 'title' => __('My Posts', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[6] =array(\r\n\t\t\t 'position' =>6,\r\n\t\t\t 'slug' => 'friends',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-users',\t\t\t\r\n\t\t\t 'title' => __('My Friends', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[7] =array(\r\n\t\t\t 'position' =>7,\r\n\t\t\t 'slug' => 'topics',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-user',\t\t\t\r\n\t\t\t 'title' => __('My Topics', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 0 //not visible in user's dashboard\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[8] =array(\r\n\t\t\t 'position' =>8,\r\n\t\t\t 'slug' => 'messages',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-envelope-o',\t\t\t\r\n\t\t\t 'title' => __('My Messages', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[9] =array(\r\n\t\t\t 'position' =>9,\r\n\t\t\t 'slug' => 'profile-customizer',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t \r\n\t\t\t 'icon' => 'fa-puzzle-piece',\t\t\t\r\n\t\t\t 'title' => __('Profile Customizer', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[10] =array(\r\n\t\t\t 'position' =>10,\r\n\t\t\t 'slug' => 'wootracker',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-truck',\t\t\t\r\n\t\t\t 'title' => __('My Purchases', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[11] =array(\r\n\t\t\t 'position' =>11,\r\n\t\t\t 'slug' => 'myorders',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-list',\t\t\t\r\n\t\t\t 'title' => __('My Orders', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[12] =array(\r\n\t\t\t 'position' =>12,\r\n\t\t\t 'slug' => 'profile',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-user',\t\t\t\r\n\t\t\t 'title' => __('My Profile', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[13] =array(\r\n\t\t\t 'position' =>13,\r\n\t\t\t 'slug' => 'account',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-wrench',\t\t\t\r\n\t\t\t 'title' => __('Account', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[14] =array(\r\n\t\t\t 'position' =>14,\r\n\t\t\t 'slug' => 'settings',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-gear',\t\t\t\r\n\t\t\t 'title' => __('Settings', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[15] =array(\r\n\t\t\t 'position' =>15,\r\n\t\t\t 'slug' => 'logout',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-arrow-circle-right',\t\t\t\r\n\t\t\t 'title' => __('Logout', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\t\r\n\t\tksort($tabs);\r\n\t\t\r\n\t\treturn $tabs;\r\n\t\t\r\n\t\r\n\t}", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "function tab_get_file_areas($course, $cm, $context) {\n $areas = array();\n $areas['content'] = get_string('content', 'tab');\n return $areas;\n}", "public function getName()\n {\n return 'tabbed';\n }", "public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Ensure tab title\r\n\t\t// Do shortcode\r\n\t\tforeach($data['tabs'] as $index=>$tab) {\r\n\t\t\t$ttl = trim(str_replace(\"\\n\", '', $tab['title']));\r\n\t\t\tif (empty($ttl)) {\r\n\t\t\t\t$tab['title'] = 'Tab ' . ($index + 1);\r\n\t\t\t}\r\n\t\t\t$tab['content'] = $this->_do_shortcode($tab['content']);\r\n\t\t\t$data['tabs'][$index] = $tab;\r\n\t\t}\r\n\r\n\t\tif (!$data['preset']) {\r\n\t\t\t$data['preset'] = 'default';\r\n\t\t}\r\n\r\n\t\t$data['wrapper_id'] = str_replace('utabs-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('utabs', $data, dirname(dirname(__FILE__)) . '/tpl/utabs.html');\r\n\r\n\t\t// upfront_add_element_style('upfront_tabs', array('css/utabs.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('upfront_tabs', array('js/utabs-front.js', dirname(__FILE__)));\r\n\r\n\t\treturn $markup;\r\n\t}", "function debug($tab){\n\techo '<div style=\"color: white; padding: 20px; font-weight: bold; background:#' . rand(111111, 999999) . '\">';\n\n\t$trace = debug_backtrace(); // Retourne les infos sur l'emplace ou est executee une fonction\n\techo 'Le debug a ete demande dans le fichier : ' . $trace[0]['file'] . ' à la ligne : ' . $trace[0]['line'] . '</hr>';\n\n\n\n\n\n echo '<pre>';\n print_r($tab);\n echo '</pre>';\n\n\n echo '</div>';\n\n}", "public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}", "public static function initialize_tab($settings_tab) {\n if(!is_array($settings_tab)){\n $settings_tab = (array)$settings_tab;\n }\n $settings_tab['fp_donationsystem_table'] = __('Donation Table', 'donationsystem');\n return array_filter($settings_tab);\n }", "public function tabs()\r\n\t{\r\n\t\tif(!$this->tabs instanceof \\Zbase\\Models\\Ui\\Tabs)\r\n\t\t{\r\n\t\t\t$className = zbase_model_name('ui.tabs', null, '\\Zbase\\Models\\Ui\\Tabs');\r\n\t\t\t$this->tabs = new $className;\r\n\t\t}\r\n\t\treturn $this->tabs;\r\n\t}", "function tab($texto,$cant){ $i=1;\r\n $a=\"\";\r\n while($i<=$cant){\r\n $a.=\"&nbsp;\";\r\n $i++;\r\n }\r\n return $a.$texto;\r\n }", "public function tab1(){\n $this->layout = new \\stdClass();\n \n if($this->model->getConfigParam('actionimage1')){\n $this->layout->scroll[] = $this->getComponentImage($this->model->getConfigParam('actionimage1'),\n [],\n ['margin' => '120 80 10 80']);\n $margin = 20;\n } else {\n $margin = 140;\n }\n\n $this->layout->scroll[] = $this->getComponentText('{#collect_location_matching#}', array(), array(\n 'padding' => $margin.' 40 10 40',\n 'text-align' => 'center',\n 'font-size' => '27',\n 'font-ios' => 'Lato-Light',\n 'font-android' => 'Lato-Light',\n ));\n\n $onclick[] = $this->getOnclickLocation(['sync_open' => 1]);\n $onclick[] = $this->getOnclickOpenAction('people',false,['sync_open' => 1]);\n\n $this->layout->footer[] = $this->getComponentSpacer('20');\n $this->layout->footer[] = $this->uiKitButtonHollow('{#enable_location#}',[\n 'onclick' => $onclick\n ]);\n $this->layout->footer[] = $this->getComponentSpacer('20');\n\n\n\n return $this->layout;\n }" ]
[ "0.71853554", "0.65441877", "0.6529235", "0.6317095", "0.6282094", "0.6192708", "0.6143254", "0.6140019", "0.6127954", "0.6118145", "0.61177593", "0.6092159", "0.6077302", "0.6038078", "0.60155636", "0.6006818", "0.59634966", "0.59149027", "0.5865436", "0.57963485", "0.5790513", "0.5789971", "0.57785875", "0.57632834", "0.5757494", "0.5736759", "0.57277924", "0.5716561", "0.5700899", "0.5694439", "0.5691249", "0.5659934", "0.5657722", "0.5640994", "0.5630641", "0.5630402", "0.5617666", "0.56019914", "0.5589979", "0.5589465", "0.55635333", "0.5552164", "0.5542852", "0.5535766", "0.5518275", "0.5517237", "0.55156285", "0.5495555", "0.54852253", "0.5477414", "0.5475531", "0.5474735", "0.5457376", "0.54521745", "0.54455346", "0.54450387", "0.542", "0.5418863", "0.5415889", "0.5413158", "0.53937316", "0.5387392", "0.53696954", "0.53621495", "0.53607017", "0.53496444", "0.53436184", "0.53387254", "0.530998", "0.53021485", "0.52996176", "0.52865636", "0.5284867", "0.52749985", "0.52721375", "0.5266327", "0.5262285", "0.5260403", "0.5254142", "0.5253889", "0.523697", "0.5233652", "0.52264905", "0.52257174", "0.522149", "0.52135694", "0.5208842", "0.5187153", "0.5180368", "0.5178196", "0.5177745", "0.5170461", "0.5166601", "0.51574236", "0.5153436", "0.51506454", "0.51413393", "0.5139752", "0.5134803", "0.51182383" ]
0.5772797
23
Returns render array for members or admins tab.
protected function getMembersViewRender($group_id, $is_admin = FALSE) { $view = Views::getView('members'); if ($is_admin) { $view->setExposedInput([ 'is_space_admin' => '1', ]); } $view->attachment_before[] = [ '#type' => 'html_tag', '#tag' => 'h3', '#value' => $is_admin ? $this->configuration['admins_view_label'] : $this->configuration['members_view_label'], ]; return [ '#type' => 'view', '#view' => $view, '#name' => 'members', '#display_id' => 'members_by_role', '#arguments' => [$group_id], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function renderArray() {}", "public static function getAdminMenu()\n {\n return [\n 'label' => Yii::t('rbac', 'Access control'),\n 'icon' => FA::_WRENCH,\n 'order' => 6,\n 'roles' => ['rbac'],\n 'items' => [\n [\n 'label' => Yii::t('rbac', 'Action access'),\n 'icon' => FA::_MAP_SIGNS,\n 'url' => '/rbac/access/',\n 'roles' => ['rbac'],\n ],\n [\n 'label' => Yii::t('rbac', 'Elements Access'),\n 'icon' => FA::_EXTERNAL_LINK,\n 'url' => '/rbac/element/',\n 'roles' => ['rbac'],\n ],\n [\n 'label' => Yii::t('rbac', 'Fields Access'),\n 'icon' => FA::_TEXT_HEIGHT,\n 'url' => '/rbac/field/',\n 'roles' => ['rbac'],\n ],\n [\n 'label' => Yii::t('rbac', 'Assignments'),\n 'icon' => FA::_GAVEL,\n 'url' => '/rbac/assignment/',\n 'roles' => ['rbac'],\n ],\n [\n 'label' => Yii::t('rbac', 'Auth items'),\n 'icon' => FA::_GEARS,\n 'url' => '/rbac/auth-item/',\n 'roles' => ['rbac'],\n ],\n [\n 'label' => Yii::t('rbac', 'Roles'),\n 'icon' => FA::_GEAR,\n 'url' => '/rbac/role/',\n 'roles' => ['rbac'],\n ],\n [\n 'label' => Yii::t('rbac', 'Permissions'),\n 'icon' => FA::_GEAR,\n 'url' => '/rbac/permission/',\n 'roles' => ['rbac'],\n ],\n [\n 'label' => Yii::t('rbac', 'Rules'),\n 'icon' => FA::_GAVEL,\n 'url' => '/rbac/rule/',\n 'roles' => ['rbac'],\n ],\n ],\n ];\n }", "function generateAdminList() {\n //$pageTags = array();\n //$pageTags['USERNAME'] = \"Username\";\n //$pageTags['DEPARTMENT'] = \"Department\";\n\n PHPWS_Core::initCoreClass('DBPager.php');\n $pager = new DBPager('sysinventory_admin','Sysinventory_Admin');\n\n $pager->setModule('sysinventory');\n $pager->setTemplate('admin_pager.tpl');\n $pager->setLink('index.php?module=sysinventory');\n $pager->setEmptyMessage('No admins found.');\n $pager->addToggle('class=\"toggle1\"');\n $pager->addToggle('class=\"toggle2\"');\n //$pager->addPageTags($pageTags);\n\n $pager->db->addJoin('left outer','sysinventory_admin','sysinventory_department','department_id','id');\n $pager->db->addColumn('sysinventory_department.description');\n $pager->db->addColumn('sysinventory_admin.username');\n $pager->db->addColumn('sysinventory_admin.id');\n $pager->addRowTags('get_row_tags');\n return $pager->get();\n }", "function generateAdminList() {\n //$pageTags = array();\n //$pageTags['USERNAME'] = \"Username\";\n //$pageTags['DEPARTMENT'] = \"Department\";\n\n PHPWS_Core::initCoreClass('DBPager.php');\n $pager = new DBPager('sysinventory_admin','Sysinventory_Admin');\n\n $pager->setModule('sysinventory');\n $pager->setTemplate('admin_pager.tpl');\n $pager->setLink('index.php?module=sysinventory');\n $pager->setEmptyMessage('No admins found.');\n $pager->addToggle('class=\"toggle1\"');\n $pager->addToggle('class=\"toggle2\"');\n //$pager->addPageTags($pageTags);\n\n $pager->db->addJoin('left outer','sysinventory_admin','sysinventory_department','department_id','id');\n $pager->db->addColumn('sysinventory_department.description');\n $pager->db->addColumn('sysinventory_admin.username');\n $pager->db->addColumn('sysinventory_admin.id');\n $pager->addRowTags('get_row_tags');\n return $pager->get();\n }", "public function tabsAction()\n {\n\t\treturn array();\n }", "private function get_main_tabs_array() {\n\t\treturn apply_filters(\n\t\t\t'updraftplus_main_tabs',\n\t\t\tarray(\n\t\t\t\t'backups' => __('Backup / Restore', 'updraftplus'),\n\t\t\t\t'migrate' => __('Migrate / Clone', 'updraftplus'),\n\t\t\t\t'settings' => __('Settings', 'updraftplus'),\n\t\t\t\t'expert' => __('Advanced Tools', 'updraftplus'),\n\t\t\t\t'addons' => __('Premium / Extensions', 'updraftplus'),\n\t\t\t)\n\t\t);\n\t}", "public static function getAdminList()\n {\n \t$type = \"text/html\";\n \t$terms = array(\n \t\t\t'isapproved' => 1\n \t);\n \t$data = self::getListByFilter($terms);\n \n \treturn response()->view('adminlist', [ 'data' => $data, 'isadmin' => self::isAdmin()])->header('Content-Type', $type);\n }", "public function getAdminPermissions(): array;", "protected function adminNavigation()\n {\n return [\n \n 'muonline' => [\n 'name' => 'MuOnline',\n 'type' => 'dropdown',\n 'icon' => 'fas fa-star',\n 'route' => 'muonline.admin.*',\n 'items' => [\n 'muonline.admin.settings' => 'Settings',\n 'muonline.admin.info' => 'Info',\n 'muonline.admin.users' => 'Users',\n 'muonline.admin.characters' => 'Characters',\n ],\n ],\n ];\n }", "public function getLinks()\n {\n $links = array();\n $submenulinks = array();\n\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'view'), 'text' => $this->__('Users list'), 'class' => 'z-icon-es-view');\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $pending = ModUtil::apiFunc($this->name, 'registration', 'countAll');\n if ($pending) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'viewRegistrations'), 'text' => $this->__('Pending registrations') . ' ('.DataUtil::formatForDisplay($pending).')', 'class' => 'user-icon-adduser');\n }\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADD)) {\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'newUser'), 'text' => $this->__('Create new user'));\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import users'));\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADMIN)) {\n $submenulinks[] = array('url' => ModUtil::url($this->name, 'admin', 'exporter'), 'text' => $this->__('Export users'));\n }\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'newUser'), 'text' => $this->__('Create new user'), 'class' => 'z-icon-es-new', 'links' => $submenulinks);\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'search'), 'text' => $this->__('Find users'), 'class' => 'z-icon-es-search');\n }\n if (SecurityUtil::checkPermission('Users::MailUsers', '::', ACCESS_MODERATE)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mailUsers'), 'text' => $this->__('E-mail users'), 'class' => 'z-icon-es-mail');\n }\n if (SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'config'), 'text' => $this->__('Settings'), 'class' => 'z-icon-es-config');\n }\n\n return $links;\n }", "private function administer(): array {\n return [\n 'title' => $this->t('Administer Team'),\n 'restrict access' => TRUE,\n ];\n }", "function admin_pages()\n {\n // Require admin login\n if(!(isset($_SESSION['active_user']) && $_SESSION['active_user']['type'] == 'admin'))\n redirect_to('/');\n\n $this->load_outer_template('admin');\n\n $m_members = instance_model('members');\n $members = $m_members->get_all();\n\n $m_set = instance_model('gallery_set');\n $m_categories = instance_model('member_categories');\n\n $list = array();\n foreach($members as $member)\n {\n $categories = $m_set->get_by_user($member['ID']);\n\n $in_categories = '';\n if($categories == array())\n $in_categories = 'Uncategoriesd';\n else\n {\n $no_cat = true;\n foreach($categories as $cat)\n {\n $get_name = $m_categories->get_by_id($cat['Category']);\n if($get_name != array())\n {\n $no_cat = false;\n $in_categories .= ', ' . hen($get_name[0]['Name']);\n }\n }\n\n if($no_cat == false)\n $in_categories = substr($in_categories, 2);\n else\n $in_categories = 'Uncategoriesd';\n }\n\n// print_r2($categories);\n\n // print '--<br />';\n\n\n $list []= array(\n 'name' => $member['Title'],\n 'extra_cols' => array(\n 'cats' => array($in_categories, 'tbl_mem_cats')\n ),\n 'options' => array(\n 'Categories &amp; Gallery' => make_url('members', 'admin_gallery_set', $member['ID']),\n 'Edit' => make_url('members', 'admin_pages_edit', $member['ID']),\n 'Delete' => make_url('members', 'admin_pages_delete', $member['ID']))\n );\n }\n\n\n $view = instance_view('admin/index_generic');\n $view = $view->parse_to_variable(array(\n 'sortable' => false,\n 'title' => 'Member pages',\n 'new_url' => make_url('members', 'admin_pages_create'),\n 'new_name' => 'New member page',\n 'extra_cols' => array('cats' => 'Categories'),\n 'list' => $list,\n 'col_classes' => array('tbl_mem_name', 'tbl_mem_opt')\n ));\n\n\n $this->set_template_paramiters(array(\n 'content' => $view\n ));\n }", "public function admins()\n {\n return $this->members()->wherePivot('role', '=', Member::ROLE_ADMIN)->get();\n }", "public function showAdmins() { \n\t\n return View('admin.admins');\n\t\t\t\n }", "function render()\n {\n return array(\n 'init' => $this->__init,\n 'data' => $this->__items\n );\n }", "public function view(): array\n {\n return [\n 'breadcrumb' => $this->breadcrumb(),\n 'component' => 'k-user-view',\n 'props' => $this->props(),\n 'title' => $this->model->username(),\n ];\n }", "public function mainAction() {\n return array(\n 'admins' => $this->get('snowcap_admin')->getAdmins(),\n );\n }", "protected function render()\n {\n if ($this->oUser->id == 0 && !$this->oUser->isAdmin())\n {\n if (isset($this->oRouter->ajax))\n {\n return ['content' => $this->viewRender('login')];\n }\n\n return $this->viewRender('login');\n }\n\n $sControllerDriver = \\Limbonia\\Controller\\Admin::driver((string)$this->oRouter->controller);\n\n if (empty($sControllerDriver))\n {\n return parent::render();\n }\n\n $oCurrentController = $this->controllerFactory($sControllerDriver);\n $oCurrentController->prepareView();\n $sControllerView = $oCurrentController->getView();\n\n if (isset($this->oRouter->ajax))\n {\n return array_merge(['content' => $this->viewRender($sControllerView)], $oCurrentController->getAdminOutput());\n }\n\n $this->viewData('content', $this->viewRender($sControllerView));\n return $this->viewRender('index');\n }", "public function allAdminList(){\n $result = $this->adminModel->getAllAdmin();\n foreach ($result as $row){\n $data[] = array('AdminID'=>$row->adminID,'Email'=>$row->email,'role'=>$row->type,\n );\n }\n $this->view('admins/allAdminList',$data);\n\n }", "public function display_all_supervisor()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 50)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits d\\'administrateur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des superviseurs'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_by_type('name = \"Superviseur\"');\n \n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }", "private function getMenuArrayRender()\n {\n $this->load->model('Menu_Model', \"menuModel\");\n $this->menuModel->setControllerName($this->_controllerName);\n return $this->menuModel->getMenuArray();\n }", "public function index()\n {\n $admins = $this->adminService->getActiveUsers();\n return view('admin.list-sub-admin',compact('admins'));\n }", "protected function getTabOptions() {\n $options = [\n 'members' => $this->t('Members'),\n 'admins' => $this->t('Administrators'),\n ];\n if (($this->currentUser->hasPermission('manage circle spaces') &&\n $this->moduleHandler->moduleExists('living_spaces_circles')) ||\n $this->moduleHandler->moduleExists('living_spaces_subgroup')\n ) {\n $options['inherit'] = $this->t('Inherited');\n }\n return $options;\n }", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "function get_list_widget_admin()\n {\n global $active_modules;\n\n $result = [];\n /**\n * List widgets of Admin\n */\n $result['Admin'] = config('Admin::widget.admin');\n\n /**\n * List widgets of Modules\n */\n if ($active_modules) {\n foreach ($active_modules as $mod) {\n $result[$mod] = config($mod . '::widget.admin');\n }\n }\n\n return $result;\n }", "public static function returnMenu() {\n return array(\n array(\n 'title' => 'Eve - лица',\n 'link' => self::$group . '/' . 'faces',\n 'class' => 'fa-list-alt',\n 'permit' => 'view',\n ),\n );\n }", "public function meList( )\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\t\treturn $this->adminListByUser($userId);\n\t}", "public function get_list_admin()\n {\n $this->db->where('type', 1);\n $query = $this->db->get('user');\n return $query->result();\n }", "public function index()\n {\n if(Gate::denies('EDIT_USERS')){\n abort(403);\n }\n\n $this->title = 'Менеджер прав пользователей';\n\n $roles = $this->getRoles();\n $permitions = $this->getPermitions();\n \n $this->content = view(config('settings.theme') . '.admin.permitions_content', compact('roles', 'permitions'))->render();\n \n return $this->renderOutput();\n }", "public function showMembers() {\n\n $memberModel = $GLOBALS[\"memberModel\"];\n // Get all of the members from the db.\n $included_members = $memberModel->getAll();\n $data = array(\"included_members\" => $included_members);\n return $this->render(\"listMembers\", $data);\n }", "public static function get_admins();", "function members() {\n $results = null;\n pagination::init()->paginator('SELECT * FROM `users` ORDER BY `id` DESC', null, 20, 5, null);\n $results .= '<div class=\"members-header\">Members</div>';\n $results .= '<div class=\"members-content\">';\n if(pagination::init()->count() > 0):\n foreach(pagination::init()->result() as $user):\n $results .= '('.$user->id.') - '.sanitize($user->username).'<hr class=\"members-list-hr\"/>';\n endforeach;\n endif;\n $results .= '</div>';\n $results .= '<div class=\"members-content-pagination\">'.pagination::init()->links().'</div>';\n return $results;\n }", "public function settings()\n\t{\n\t\t$this->data['admins'] = User::whereHas('UserTypes',function($q){\n\t\t\t$q->where('name','Admin');\n\t\t})->get();\n\t\treturn $this->renderView('admin.admins.index');\n\t}", "function index()\n {\n $data = $this->member->load_member();\n $container = array();\n $container ['data'] = $data;\n $this->load->view('admin_member',$container);\n }", "public function viewMemberAction()\n {\n $users = $this->getDoctrine()\n ->getManager()\n ->getRepository('BlogBundle:Membres')\n ->findAll();\n\n return array('users' => $users);\n }", "public function index()\n {\n return view('dashboard.members.index', [\n 'data' => Members::latest()->get(),\n 'memtypes' => MemberType::latest()->get()\n ]);\n }", "public function renderSideNavItems() {\n\t\t$out = '';\n\t\t$admin = $this->wire('pages')->get(wire('config')->adminRootPageID); \n\t\t$config = $this->wire('config'); \n\t\t$user = $this->wire('user'); \n\t\n\t\tforeach($admin->children(\"check_access=0\") as $p) {\n\t\t\tif(!$p->viewable()) continue; \n\t\t\t$out .= $this->renderSideNavItem($p);\n\t\t\t\n\t\t}\n\t\treturn $out; \n\t}", "public function toArray()\n {\n return array(\n '' => Mage::helper('adminhtml')->__('Home Page'),\n 'customer/account' => Mage::helper('adminhtml')->__('Customer Login'),\n 'checkout/cart' => Mage::helper('adminhtml')->__('Cart Page'),\n );\n }", "public function uultra_get_default_modules_array()\r\n\t{\r\n\t\t$tabs = array();\r\n\t\t\r\n\t\t$tabs[0] =array(\r\n\t\t\t 'position' => 0,\r\n\t\t\t 'slug' => 'dashboard',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-tachometer',\t\t\t \t\t\t\r\n\t\t\t 'title' => __('Dashboard', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[1] =array(\r\n\t\t\t 'position' => 1,\r\n\t\t\t 'slug' => 'followers',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'icon' => 'fa-sitemap',\t\t\t \t\t\t\r\n\t\t\t 'title' => __('Followers', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 0 //not visible in user's dashboard\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[2] =array(\r\n\t\t\t 'position' => 2,\r\n\t\t\t 'slug' => 'following',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'icon' => 'fa-users',\t\t\t\r\n\t\t\t 'title' => __('Following', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 0 //not visible in user's dashboard\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[3] =array(\r\n\t\t\t 'position' => 3,\r\n\t\t\t 'slug' => 'photos',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-camera',\t\t\t\r\n\t\t\t 'title' => __('My Photos', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[4] =array(\r\n\t\t\t 'position' => 4,\r\n\t\t\t 'slug' => 'videos',\r\n\t\t\t 'slug_public' => 'fa-video-camera',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-video-camera',\t\t\t\r\n\t\t\t 'title' => __('My Videos', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[5] =array(\r\n\t\t\t 'position' => 5,\r\n\t\t\t 'slug' => 'posts',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-edit',\t\t\t\r\n\t\t\t 'title' => __('My Posts', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[6] =array(\r\n\t\t\t 'position' =>6,\r\n\t\t\t 'slug' => 'friends',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-users',\t\t\t\r\n\t\t\t 'title' => __('My Friends', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[7] =array(\r\n\t\t\t 'position' =>7,\r\n\t\t\t 'slug' => 'topics',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-user',\t\t\t\r\n\t\t\t 'title' => __('My Topics', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 0 //not visible in user's dashboard\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[8] =array(\r\n\t\t\t 'position' =>8,\r\n\t\t\t 'slug' => 'messages',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-envelope-o',\t\t\t\r\n\t\t\t 'title' => __('My Messages', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[9] =array(\r\n\t\t\t 'position' =>9,\r\n\t\t\t 'slug' => 'profile-customizer',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t \r\n\t\t\t 'icon' => 'fa-puzzle-piece',\t\t\t\r\n\t\t\t 'title' => __('Profile Customizer', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[10] =array(\r\n\t\t\t 'position' =>10,\r\n\t\t\t 'slug' => 'wootracker',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-truck',\t\t\t\r\n\t\t\t 'title' => __('My Purchases', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[11] =array(\r\n\t\t\t 'position' =>11,\r\n\t\t\t 'slug' => 'myorders',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-list',\t\t\t\r\n\t\t\t 'title' => __('My Orders', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[12] =array(\r\n\t\t\t 'position' =>12,\r\n\t\t\t 'slug' => 'profile',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-user',\t\t\t\r\n\t\t\t 'title' => __('My Profile', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[13] =array(\r\n\t\t\t 'position' =>13,\r\n\t\t\t 'slug' => 'account',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-wrench',\t\t\t\r\n\t\t\t 'title' => __('Account', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[14] =array(\r\n\t\t\t 'position' =>14,\r\n\t\t\t 'slug' => 'settings',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-gear',\t\t\t\r\n\t\t\t 'title' => __('Settings', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\r\n\t\t$tabs[15] =array(\r\n\t\t\t 'position' =>15,\r\n\t\t\t 'slug' => 'logout',\r\n\t\t\t 'slug_public' => 'fa-credit-card',\r\n\t\t\t 'link_type' => 'default',\r\n\t\t\t 'content' => '',\r\n\t\t\t 'content_type' => '',\r\n\t\t\t 'icon' => 'fa-arrow-circle-right',\t\t\t\r\n\t\t\t 'title' => __('Logout', 'xoousers'),\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t 'visible' => 1\r\n\t\t);\r\n\t\t\t\r\n\t\tksort($tabs);\r\n\t\t\r\n\t\treturn $tabs;\r\n\t\t\r\n\t\r\n\t}", "public function providePermissions() {\n return array(\n 'CMS_ACCESS_KapostBridgeLogViewer'=>array(\n 'name'=>_t(\n 'CMSMain.ACCESS',\n \"Access to '{title}' section\",\n \"Item in permission selection identifying the admin section. Example: Access to 'Files & Images'\",\n array('title'=>_t('KapostBridgeLogViewer.MENUTITLE', 'Kapost Bridge Logs'))\n ),\n 'category'=>_t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access')\n )\n );\n }", "public function getPostersArray() {\n\t\treturn icms::handler('icms_member')->getUserList();\n\t}", "protected function AdminPage() {\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t\n\t\t\t // ($sGroupKey,$sKeyValue=TRUE,$sDispOff=NULL,$sDispOn=NULL,$sPopup=NULL)\n $oMenu->SetNode($ol = new fcMenuOptionLink('show','all','show all',NULL,'show inactive as well as active'));\n\t $doAll = $ol->GetIsSelected();\n \n\tif ($doAll) {\n\t $rs = $this->SelectRecords(NULL,'Sort');\n\t} else {\n\t $rs = $this->ActiveRecords();\n\t}\n\treturn $rs->AdminRows();\n }", "public function provider_render() {\n return array(\n array(\n array(\n \n ),\n ),\n );\n }", "public function existingAdminList()\n {\n $groceries = $this->getList();\n return $this->renderExistingAdminList($groceries);\n }", "public function index()\n {\n if(auth('api')->user()->hasRole('superadmin')){\n $permisions = Permission::paginate(10);\n foreach($permisions as $key => $value){\n $permisions[$key]['role'] = $value->getRoleNames();\n $permisions[$key]['count'] = count($value->getRoleNames());\n }\n return $permisions;\n }\n }", "public function page() {\n $config = $this->config('workbench_access.settings');\n if ($scheme_id = $config->get('scheme')) {\n $this->manager = \\Drupal::getContainer()->get('plugin.manager.workbench_access.scheme');\n $scheme = $this->manager->getScheme($scheme_id);\n $parents = $config->get('parents');\n $tree = $this->manager->getActiveTree();\n $list = '';\n foreach ($parents as $id => $label) {\n // @TODO: Move to a theme function?\n // @TODO: format plural\n foreach ($tree[$id] as $iid => $item) {\n $editor_count = count($this->manager->getEditors($iid));\n $role_count = count($this->manager->getRoles($iid));\n $row = [];\n $row[] = str_repeat('-', $item['depth']) . ' ' . $item['label'];\n $row[] = \\Drupal::l($this->t('@count editors', ['@count' => $editor_count]), Url::fromRoute('workbench_access.by_user', array('id' => $iid))); // List of all editors.\n $row[] = \\Drupal::l($this->t('@count roles', ['@count' => $role_count]), Url::fromRoute('workbench_access.by_role', array('id' => $iid))); // List of all editors.\n $rows[] = $row;\n }\n }\n $build = array(\n '#type' => 'table',\n '#header' => array($config->get('plural_label'), t('Editors'), t('Roles')),\n '#rows' => $rows,\n );\n }\n else {\n $build = array(\n '#type' => 'markup',\n '#markup' => $this->t('No sections are available.'),\n );\n }\n return $build;\n }", "public function toArray()\n {\n return array(\n 0 => Mage::helper('adminhtml')->__('Test'),\n 1 => Mage::helper('adminhtml')->__('Live'),\n );\n }", "public function admins() {\n $data = array();\n // verify user has priviledges\n if($this->User->isLoggedIn() && $this->User->isAdmin()) {\n $flash = null;\n \n if (isset($_POST['delete_admin'])) {\n if ($this->User->removeAdminRights($_POST['user_id'])) {\n $flash = \"Admin user removed\";\n }\n }\n \n if (isset($_POST['email'])) {\n $user_id = $this->User->getByEmail($_POST['email']);\n if(isset($user_id['id'])) {\n if($this->User->bestowAdminRights($user_id['id'])) {\n $flash = \"{$_POST['email']} added as an admin.\";\n }\n }\n }\n \n // fetch admin users\n $users = $this->User->getAdmins();\n \n //set the title\n $data = array(\n 'users' => $users,\n 'flash' => $flash,\n 'title' => 'Manage Admin Users'\n );\n \n } else {\n header(\"Location: \".app::site_url(array('users','login')));\n exit(0);\n }\n return $data;\n }", "public function get_adminMember(){\n if(Auth::user()->user_type == 0){\n return redirect('/adminlogin');\n }\n $users = User::all()->except(Auth::id());\n return view('admin.member',compact('users'));\n }", "public function getRoles(): array\n {\n return ['admin'];\n }", "function roleListing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $type = $this->login_id;\n $data['userRecords'] = $this->user_model->roleListing($type);\n\n $this->global['pageTitle'] = '角色管理';\n\n $this->loadViews(\"systemrolemanage\", $this->global, $data, NULL);\n }\n }", "public function indexAdmin ()\n {\n $listOfUsers = $this->userRequest->usersIndexForAdmin();\n return $listOfUsers;\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Member manager';\n\t\t$view = 'admin/character/index';\n\t\t$data_level = Model_Level::get_level();\n\t\t$data = array(\n\t\t\t'data_level' => $data_level,\n\t\t);\n\t\t$this->template->content = View::forge($view, $data);\n\t}", "public function render():array\n {\n return $this->itinerary;\n }", "public function members_list() {\n\t\tif (!in_array($this->type, $this->membership_types)) {\n\t\t\tredirect(base_url('members/list/active'));\n\t\t}\n\n\t\t$data['type'] = ($this->type === NULL)? 'active': $this->type;\n\t\t$data['user_mode'] = $this->session->userdata('mode');\n\t\t$data['members'] = $this->get_members($this->type);\n\t\t$data['api_ver_url'] = FINGERPRINT_API_URL . \"?action=verification&member_id=\";\n\t\t$data['total_count'] = count($this->get_members($this->type));\n\n\t\t$this->breadcrumbs->set([ucfirst($data['type']) => 'members/list/' . $data['type']]);\n\n\t\tif ($this->type === 'guest') {\n\t\t\t$data['guests'] = $this->get_guests();\n\t\t}\n\n\t\t$this->render('list', $data);\n\t}", "public function list()\n {\n $admins = Admin::all();\n $html = view('partials.table-tbody.table-admin', compact('admins'))->render();\n\n return response()->json(['html' => $html], 200);\n }", "public function index()\n {\n $admins = Member::orderBy('created_at', 'desc')->paginate(20);\n return view('admin.index',['users' =>$admins]);\n }", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "public function adminSerializer()\n {\n $view_vars = $this->viewSerializer();\n\n $admin_vars = array();\n\n return array_merge($view_vars, $admin_vars);\n }", "public static function menu()\n {\n if (Auth::check()) {\n if (Auth::user()->admin) {\n return [\n 'dashboard' => [\n 'icon' => 'home',\n 'route_name' => 'admin',\n 'params' => [\n 'layout' => 'side-menu'\n ],\n 'title' => 'Dashboard'\n ],\n 'teams' => [\n 'icon' => 'star',\n 'route_name' => 'admin.teams',\n 'params' => [\n 'layout' => 'side-menu'\n ],\n 'title' => 'Teams'\n ],\n 'article' => [\n 'icon' => 'airplay',\n 'route_name' => 'admin.article',\n 'params' => [\n 'layout' => 'side-menu'\n ],\n 'title' => 'Artikel',\n 'extends' => [\n 'admin.article.create',\n 'admin.article.edit',\n 'admin.article.detail',\n ]\n ],\n\n 'devider',\n 'soal' => [\n 'icon' => 'book-open',\n 'route_name' => 'admin.question.category',\n 'params' => null,\n 'title' => 'Soal',\n 'extends' => [\n 'admin.question.category.create',\n 'admin.question.category.edit',\n 'admin.question',\n 'admin.question.create',\n 'admin.question.edit',\n 'admin.question.answer',\n 'admin.question.edit',\n 'admin.question.result',\n ]\n ],\n\n 'devider',\n 'users' => [\n 'icon' => 'users',\n 'title' => 'Users',\n 'route_name' => 'admin.user',\n 'params' => null,\n 'extends' => [\n 'admin.user.show',\n 'admin.user.create',\n 'admin.user.edit',\n ],\n ],\n 'kontak' => [\n 'icon' => 'phone',\n 'route_name' => 'admin.contact',\n 'params' => [\n 'layout' => 'side-menu'\n ],\n 'title' => 'Kontak'\n ],\n ];\n } else {\n return [\n 'dashboard' => [\n 'icon' => 'home',\n 'route_name' => 'member',\n 'params' => null,\n 'title' => 'Dashboard'\n ],\n 'test' => [\n 'icon' => 'file-text',\n 'title' => 'Test',\n 'params' => null,\n 'route_name' => 'member.test',\n 'extends' => [\n 'member.test.start',\n ],\n ],\n 'devider',\n 'riwayat' => [\n 'icon' => 'file',\n 'route_name' => 'member.history',\n 'params' => null,\n 'title' => 'Riwayat',\n 'extends' => [\n 'member.history.test',\n ],\n\n ],\n ];\n }\n }\n return [];\n }", "public function getTabs(array $params)\n {\n $tabs = parent::getTabs($params);\n\n unset($tabs['usersadmin_add']);\n unset($tabs['usersadmin_search']);\n\n return $tabs;\n }", "public function adminDetails()\n {\n //other items.\n return array(\n 'type' => 'Tokens Purchased',\n 'title' => $this->get('tokens') . ' Tokens Purchased.'\n );\n }", "private function edit(): array {\n return [\n 'title' => $this->t('Edit Team Member'),\n ];\n }", "public function render()\n {\n\n parent::render();\n\n return \"usergroup_list.tpl\";\n }", "public function getAdmins()\n {\n $admins = Admin::all();\n return view('view_admins', compact('admins'));\n }", "public function actionIndex()\n {\n\t\t$arrayAuthManage \t= AuthItem::find()->where(\"type = 1\")->orderBy('type asc, name asc')->all();\n return $this->render('index', [\n\t\t\t'arrayAuthManage'\t=> $arrayAuthManage\n ]);\n }", "public function render(): array\n {\n return $this->purposeOfTravel;\n }", "public function admin()\n\t{\n\t\t$tenders = Tender::orderBy('created_at','DESC')->get();\n\t\treturn view('tenders.admin.index',compact('tenders'));\n\t}", "function get_admin_list()\r\n {\r\n $result = array();\r\n $this->db->select('login');\r\n $this->db->distinct();\r\n $this->db->order_by('login');\r\n $query = $this->db->get(db_prefix.'Admins');\r\n $result[] = 'UNDEFINED';\r\n foreach ($query->result_array() as $row)\r\n {\r\n $result[] = $row['login'];\r\n }\r\n return $result;\r\n }", "public function memberList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "function query_module_access_list(&$user)\n{\n\trequire_once('modules/MySettings/TabController.php');\n\t$controller = new TabController();\n\t$tabArray = $controller->get_tabs($user); \n\n\treturn $tabArray[0];\n\t\t\n}", "function getRoles () {\n return array(\"user.friendRequest.edit\",\"user.friendRequest.view\");\n }", "public function getAccessOfRender(): array\n {\n $access = $this->getAccessOfAll(true, $this->bsw['menu']);\n $annotation = [];\n\n foreach ($access as $key => $item) {\n $enum = [];\n foreach ($item['items'] as $route => $target) {\n if ($target['join'] === false || $target['same']) {\n continue;\n }\n $enum[$route] = $target['info'];\n }\n\n if (!isset($annotation[$key])) {\n $annotation[$key] = [\n 'info' => $item['info'] ?: 'UnSetDescription',\n 'type' => new Checkbox(),\n 'enum' => [],\n 'value' => [],\n ];\n }\n\n $annotation[$key]['enum'] = array_merge($annotation[$key]['enum'], $enum);\n }\n\n return $annotation;\n }", "public function all_users_profile()\n {\n $em = $this->getDoctrine()->getManager();\n $data = $em->getRepository('AppBundle:User');\n\n //ROLE_REGULAR\n $regular = $data->findBy(array('group_id'=>1));\n\n //ROLE_GOLDEN\n $golden = $data->findBy(array('group_id'=>2));\n\n //ROLE_DIAMOND\n $diamond = $data->findBy(array('group_id'=>3));\n\n //ROLE_AGENT\n $agent = $data->findBy(array('group_id'=>4));\n\n\n return $this->render('FOSUserBundle:Clients:group.html.twig',array('regular'=>$regular,'golden'=>$golden,'diamond'=>$diamond,'agent'=>$agent));\n }", "public function render() {\n return [\n '#theme' => $this->themeFunctions(),\n '#view' => $this->view,\n '#options' => $this->options,\n '#rows' => $this->view->result,\n '#mapping' => $this->defineMapping(),\n ];\n }", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "public function Index_MemberRole()\n {\n $aMemberRole = MemberRole::get();\n return view('admin.templates.member-role.member-role', compact('aMemberRole'));\n }", "public function getDashboardGroups(): array;", "public function index()\n {\n $this->View->render('admin/index', array(\n 'users' => UserModel::getPublicProfilesOfAllUsers())\n );\n }", "function getRoles () {\n return array(\"user.image.edit\",\"user.image.view\");\n }", "public static function menuItems()\n {\n return [\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Users'), 'url' => ['/user-management/user/index']],\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Roles'), 'url' => ['/user-management/role/index']],\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Permissions'), 'url' => ['/user-management/permission/index']],\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Permission groups'), 'url' => ['/user-management/auth-item-group/index']],\n ['label' => '<i class=\"fa fa-angle-double-right\"></i> ' . Yii::t('menu', 'Visit log'), 'url' => ['/user-management/user-visit-log/index']],\n ];\n }", "public function index()\n {\n $roles = Role::all();\n $users = User::simplePaginate();\n\n return view('dashboard.members', compact('users', 'roles'));\n }", "function admin_get_users()\n{\n global $app;\n\n $users = $app->bbs->users();\n $app->render('admin_users.html', [\n 'page' => mkPage(getMessageString('admin_users'), 0, 2),\n 'users' => $users,\n 'isadmin' => is_admin()]);\n}", "public function index()\n {\n //\n $admins = Admin::all();\n return view ('theme.admin.admin_manager')->with(['admins'=>$admins]);\n }", "public function index()\n {\n return view('admin.users.admin.index', [\n \"users\" => User::role('admin')->where('id', '!=', auth()->user()->id)->get()\n ]);\n }", "public function render(): array\n {\n return [\n 'left' => $this->left,\n 'right' => $this->right,\n 'title' => $this->title,\n ];\n }", "public function index()\n {\n // $data=AuthGroup::find(1)->admin;\n // dump($data);\n $group=AuthGroup::get();\n $str=\"\";\n foreach($group as $k=>$v){\n $admin=$v->admin;\n foreach($admin as $kk=>$vv){\n $str.=$vv->username.\",\";\n $group[$k]['username']=substr($str,0,strlen($str)-1);\n } \n \n }\n return view('admin.role.index',['group'=>$group]);\n }", "public function index()\n {\n $list_privilegs_id = Role::select('name','permission')->where('id',Auth::user()->role_id)->first();\n $arr_privilegs_id = explode(',', $list_privilegs_id->privileges_id);\n $data = Permission::get()->toArray();\n // echo \"<pre>\";\n // print_r($data);\n // echo \"</pre>\";die;\n\n $roles = Role::select('id', 'name')->get();\n return view('backends.role.index', ['roles' => $roles, 'data'=>$data,'list_privilegs'=> $arr_privilegs_id, 'name' => $list_privilegs_id->name ]);\n }", "public static function getAll() {\n global $lC_Database, $lC_Language, $_module;\n\n $lC_Language->loadIniFile('administrators.php');\n \n $media = $_GET['media'];\n \n /* Filtering */\n $aWhere = \"\";\n if ($_GET['aSearch'] != \"\") {\n $aWhere = \"where id = '\" . (int)$_GET['aSearch'] . \"'\";\n } \n\n $Qadmins = $lC_Database->query('select * from :table_administrators ' . $aWhere . ' order by user_name');\n $Qadmins->bindTable(':table_administrators', TABLE_ADMINISTRATORS);\n $Qadmins->execute();\n\n $result = array('entries' => array());\n $result = array('aaData' => array());\n $cnt = 0;\n while ( $Qadmins->next() ) {\n $group = self::getGroupName($Qadmins->valueInt('access_group_id')) ;\n $color = ($odd == $cnt%2) ? 'purple-bg' : 'green-bg';\n if ($Qadmins->valueInt('access_group_id') == 1) $color = 'red-bg';\n\n $last = '<td>' . $Qadmins->valueProtected('last_name') . '</td>';\n $first = '<td>' . $Qadmins->valueProtected('first_name') . '</td>';\n $user = '<td>' . $Qadmins->valueProtected('user_name') . '</td>';\n $group = '<td><small class=\"tag ' . $color . '\">' . self::getGroupName($Qadmins->valueInt('access_group_id')) . '</small></td>';\n $action = '<td class=\"align-right vertical-center\"><span class=\"button-group compact\">\n <a href=\"' . ((int)($_SESSION['admin']['access'][$_module] < 3) ? '#' : 'javascript://\" onclick=\"editAdmin(\\'' . $Qadmins->valueInt('id') . '\\')') . '\" class=\"button icon-pencil ' . ((int)($_SESSION['admin']['access'][$_module] < 3) ? 'disabled' : NULL) . '\">' . (($media === 'mobile-portrait' || $media === 'mobile-landscape') ? NULL : $lC_Language->get('icon_edit')) . '</a>\n <a href=\"' . ((int)($_SESSION['admin']['access'][$_module] < 4) ? '#' : 'javascript://\" onclick=\"deleteAdmin(\\'' . $Qadmins->valueInt('id') . '\\', \\'' . urlencode($Qadmins->valueProtected('user_name')) . '\\')') . '\" class=\"button icon-trash with-tooltip ' . ((int)($_SESSION['admin']['access'][$_module] < 4) ? 'disabled' : NULL) . '\" title=\"' . $lC_Language->get('icon_delete') . '\"></a></span></td>';\n\n $result['aaData'][] = array(\"$last\", \"$first\", \"$user\", \"$group\", \"$action\");\n $result['entries'][] = $Qadmins->toArray();\n $cnt++;\n }\n $Qadmins->freeResult();\n\n return $result;\n }", "function group_get_menu_tabs() {\n global $USER;\n static $menu;\n\t\n $group = group_current_group();\n if (!$group) {\n return null;\n }\n\t\n\t//Start-Anusha\n\tif($group->outcome){\n\t\t$groupmem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t//End-Anusha\n\t\n\t//Start-Eshwari\n\tif($group->courseoutcome){\n\t\t$groupcoursemem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t\n\t//End-Eshwari\n\t//Start-Eshwari\n\t\n\tif($group->courseoffering){\n\t\t$groupofferingmem = get_record('group_member','member',$USER->get('id'),'group',$group->id);\n\t}\n\t\n\t/*\n $menu = array(\n 'info' => array(\n 'path' => 'coursetemplate/info',\n 'url' => 'coursetemplate/view.php?id='.$group->id,\n\n 'title' => 'About',\n 'weight' => 20\n ),\n\t);\n\t*/\n\t//End-Eshwari\n\t $menu = array(\n 'info' => array(\n 'path' => 'groups/info',\n 'url' => 'group/view.php?id='.$group->id,\n 'title' => get_string('About', 'group'),\n\n\n 'weight' => 20\n ),\n\t);\n//Start-Anusha\n\tif($groupmem){\n\t\tif($groupmem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n//End-Anusha\n\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n//Start-Anusha\n\t}\n\t//Start-Eshwari \n\t\n\tif($groupcoursemem){\n\t\tif($groupcoursemem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n\n\t\t$menu['members'] = array(\n\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n\n\t}\n\t\n\tif($groupofferingmem){\n\t\tif($groupofferingmem->role != \"member\"){\n\t\t\t$menu['members'] = array(\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t\t);\t\n\t\t}\n\t}else{\n\n\t\t$menu['members'] = array(\n\n\t\t\t\t'path' => 'groups/members',\n\t\t\t\t'url' => 'group/members.php?id='.$group->id,\n\t\t\t\t'title' => get_string('Members', 'group'),\n\t\t\t\t'weight' => 30\n\t\t);\n\n\t}\n\t\n\t\n\t//End-Eshwari\n\t/*\n\t//Start of subgroup logic by Shashank\n\t$menu['subgroups'] = array(\n\t\t\t\t'path' => 'coursetemplate/subgroups',\n\t\t\t\t'url' => 'coursetemplate/subgroups.php?id='.$group->id,\n\t\t\t\t'title' => 'Sub Template',\n\t\t\t\t'weight' => 35\n\t\t);\n\t//End of subgroup logic by Shashank\n\t*/\n\t//Start of subgroup logic by Shashank\n\t$menu['subgroups'] = array(\n\t\t\t\t'path' => 'groups/subgroups',\n\t\t\t\t'url' => 'group/subgroups.php?id='.$group->id,\n\t\t\t\t'title' => 'Sub Groups',\n\t\t\t\t'weight' => 35\n\t\t);\n//End of subgroup logic by Shashank\n//End-Anusha\t\n if ($group->public || group_user_access($group->id)) {\n $menu['forums'] = array( // @todo: get this from a function in the interaction plugin (or better, make forums an artefact plugin)\n 'path' => 'groups/forums',\n 'url' => 'interaction/forum/index.php?group='.$group->id,\n 'title' => get_string('nameplural', 'interaction.forum'),\n 'weight' => 40,\n );\n }\n\t/*\n $menu['views'] = array(\n 'path' => 'coursetemplate/views',\n 'url' => 'view/groupviews.php?group='.$group->id,\n\n 'title' => 'Views',\n 'weight' => 50,\n );\n\t*/\n\t $menu['views'] = array(\n 'path' => 'groups/views',\n 'url' => 'view/groupviews.php?group='.$group->id,\n 'title' => get_string('Views', 'group'),\n\n\n 'weight' => 50,\n );\n//Start-Anusha\nif($group->outcome){\n $menu['outcome'] = array(\n 'path' => 'groups/outcomes',\n 'url' => 'group/groupoutcome.php?group='.$group->id,\n 'title' => 'Outcome Results',\n 'weight' => 60,\n );\n}\n//End-Anusha\n//Start-Eshwari\n\nif($group->courseoutcome){\n $menu['courseoutcome'] = array(\n 'path' => 'groups/courseofferings',\n 'url' => 'group/groupcourseoffering.php?group='.$group->id,\n 'title' => 'Course offering Outcome Results',\n 'weight' => 60,\n );\n}\n//End-Eshwari\n\n\n if (group_user_access($group->id)) {\n safe_require('grouptype', $group->grouptype);\n $artefactplugins = call_static_method('GroupType' . $group->grouptype, 'get_group_artefact_plugins');\n if ($plugins = get_records_array('artefact_installed', 'active', 1)) {\n foreach ($plugins as &$plugin) {\n if (!in_array($plugin->name, $artefactplugins)) {\n continue;\n }\n safe_require('artefact', $plugin->name);\n $plugin_menu = call_static_method(generate_class_name('artefact',$plugin->name), 'group_tabs', $group->id);\n $menu = array_merge($menu, $plugin_menu);\n }\n }\n }\n\n if (defined('MENUITEM')) {\n $key = substr(MENUITEM, strlen('groups/'));\n if ($key && isset($menu[$key])) {\n $menu[$key]['selected'] = true;\n }\n }\n\n return $menu;\n}", "public function index()\r\n\t{\r\n\t\t// ->join('admin_auth_group group','group.id=access.group_id')\r\n\t\t// ->select();\r\n\t\t$admin = new Admin_role;\r\n\t\t$res = $admin->select();\r\n\t\t$authG =new Auth();\r\n\t\tforeach ($res as $key => $value) {\r\n\t\t\t$_groupTitle = $authG->getGroups($value['id']);\r\n\t\t\t$groupTitle = $_groupTitle[0]['title'];\r\n\t\t\t$value['groupTitle'] =$groupTitle;\r\n\r\n\t\t}\r\n\t\t$this->assign('res',$res);\r\n\t\treturn $this->fetch();\r\n\t}", "public function index()\n {\n $data['title'] = 'Lista de Usuarios';\n $data['array'] = Auth::user()->role == 'superadmin' ? User::where('id','<>',Auth::user()->id)->where('role','<>','sponsored')->orderBy('full_name','ASC')->get() : Auth::user()->sponsored;\n return view('dashboard.users.index')->with('data',$data);\n }", "protected function renderActionList() {}", "public function getShowGroups(): array;", "public function toArray()\n {\n return array(\n 1 => Mage::helper('adminhtml')->__('Enabled'),\n 0 => Mage::helper('adminhtml')->__('Disabled'),\n\n );\n }", "public function index()\n {\n $data['roles'] = $this->roleRepo->paginate();\n\n return $this->theme->scope('role.index', $data)->render();\n }", "protected function dashboards()\n {\n return [];\n }", "protected function dashboards()\n {\n return [];\n }", "function viewcMenu() {\n $user = Auth::customer()->user();\n if ($user) {\n if ($user->type == 1) {\n $controladoresTwo = array( \n array('name' => 'Pelfil ADmin', 'controller' => 'admclient\\ProfileAdminController@getIndex'),\n array('name' => 'Clientes', 'controller' => 'admclient\\UserController@getIndex'));\n } else {\n $controladoresTwo = array(\n array('name' => 'Mi Perfil', 'controller' => 'admclient/perfil'),\n array('name' => 'Mis Campañas', 'controller' => 'admclient/campanias'),\n array('name' => 'MIs Equipos', 'controller' => 'admclient/equipment'));\n }\n foreach ($controladoresTwo as $key => $value) {\n $valor[] = array('name' => $value['name'], 'controller' => $value['controller']);\n }\n }\n return $valor;\n }", "function DetermineTabs () {\n global $zLOCALUSER;\n\n // Currently logged in user is an editor.\n if ($this->CheckEditorAccess()) return (\"owner\");\n\n if ($this->CheckViewAccess()) {\n // Group is public\n $returntab = \"public\";\n } else {\n // Group is private, hide everything from non-members except for info.\n $returntab = \"private\";\n } // if\n\n return ($returntab);\n\n }", "public function index()\n {\n return view('superadmin.member.index');\n }" ]
[ "0.62194455", "0.6145911", "0.59725845", "0.59725845", "0.59642017", "0.5912117", "0.5902642", "0.5897258", "0.5882684", "0.5877859", "0.5870171", "0.5862602", "0.58610046", "0.5828308", "0.5814828", "0.5804857", "0.58048046", "0.575856", "0.5755381", "0.5753162", "0.5752994", "0.57506996", "0.5737483", "0.57363474", "0.57356054", "0.5729155", "0.5728566", "0.572801", "0.5721878", "0.5718721", "0.571501", "0.5711616", "0.5694419", "0.56928277", "0.5677615", "0.5673115", "0.5662249", "0.56617653", "0.565369", "0.5646694", "0.5641866", "0.5637774", "0.5635135", "0.563494", "0.5621157", "0.5619934", "0.5611035", "0.5607581", "0.5606392", "0.56016624", "0.55961514", "0.5579588", "0.5573289", "0.55717254", "0.55701375", "0.5558014", "0.55564517", "0.55539733", "0.5552081", "0.554583", "0.5541102", "0.5537082", "0.55328673", "0.5531334", "0.55291486", "0.55153435", "0.55018204", "0.5491747", "0.54908", "0.5482025", "0.54799795", "0.54733413", "0.54704094", "0.54684854", "0.54673135", "0.5465374", "0.5465291", "0.5464197", "0.54559934", "0.54554886", "0.5455005", "0.54512435", "0.5445514", "0.544091", "0.54392684", "0.54365844", "0.54325193", "0.5427101", "0.5425807", "0.5425034", "0.54221594", "0.5420663", "0.54198474", "0.5417224", "0.5415882", "0.5415851", "0.54147685", "0.54147685", "0.5412516", "0.5399985", "0.53956985" ]
0.0
-1
Returns render array for contact actions on a space group.
protected function getContactActionsRender(GroupInterface $group) { $output = [ '#type' => 'container', 'title' => [ '#type' => 'html_tag', '#tag' => 'h4', '#value' => t('Contact'), '#attributes' => ['class' => ['living-space-contact-action-title']], ], ]; $hook = 'living_spaces_group_contact_info'; $account = $this->currentUser->getAccount(); $actions = $this->moduleHandler->invokeAll($hook, [FALSE, $group, $account]); if (!empty($actions)) { $output += array_intersect_key($actions, array_filter($this->configuration['enabled_contacts'])); } else { $output = []; } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getExportActionsViewRender(GroupInterface $group) {\n $output = [\n '#type' => 'container',\n 'title' => [\n '#type' => 'html_tag',\n '#tag' => 'h4',\n '#value' => t('Export'),\n '#attributes' => ['class' => ['living-space-export-action-title']],\n ],\n ];\n\n $actions = $this->moduleHandler\n ->invokeAll('living_spaces_group_exports_info', [FALSE, $group]);\n if (!empty($actions)) {\n $output += array_intersect_key($actions, array_filter($this->configuration['enabled_exports']));\n }\n else {\n $output = [];\n }\n return $output;\n }", "public function actionGroup()\n {\n $query = $this->user->getContactGroups();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort'=> [\n 'defaultOrder' => [\n 'name' => SORT_ASC,\n ],\n ],\n ]);\n\n return $this->render('group/index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getContactListAction($id_group) {\n\t\treturn $this->group->getContactArrayOf($id_group);\n\t}", "public function action()\n {\n if (!$this->action) {\n $this->action = array();\n foreach (monsterToAction::where('mid', '=', $this->id)->get() as $a) {\n $this->action[] = array(\n 'name' => $a->name,\n 'desc' => $a->description,\n 'dc' => array(\n 'attr' => $a->dc,\n 'beat' => $a->dcv,\n 'success' => $a->dc_success,\n ),\n 'damage' => array(\n 'type' => $a->damage_type,\n 'damage' => $a->damage,\n 'roll_bonus' => $a->bonus,\n ),\n 'legendery_action' => ($a->legendery) ? TRUE : FALSE,\n );\n }\n }\n return $this->action;\n }", "public function actions()\n\t{\n\t\treturn array(\n\t\t\t// captcha action renders the CAPTCHA image displayed on the contact page\n\t\t\t'captcha'=>array(\n\t\t\t\t'class'=>'CCaptchaAction',\n\t\t\t\t'backColor'=>0xFFFFFF,\n\t\t\t),\n\t\t\t// page action renders \"static\" pages stored under 'protected/views/site/pages'\n\t\t\t// They can be accessed via: index.php?r=site/page&view=FileName\n\t\t\t'page'=>array(\n\t\t\t\t'class'=>'CViewAction',\n\t\t\t),\n\t\t);\n\t}", "public function actions()\n\t{\n\t\treturn array(\n\t\t\t// captcha action renders the CAPTCHA image displayed on the contact page\n\t\t\t'captcha'=>array(\n\t\t\t\t'class'=>'CCaptchaAction',\n\t\t\t\t'backColor'=>0xFFFFFF,\n\t\t\t),\n\t\t\t// page action renders \"static\" pages stored under 'protected/views/site/pages'\n\t\t\t// They can be accessed via: index.php?r=site/page&view=FileName\n\t\t\t'page'=>array(\n\t\t\t\t'class'=>'CViewAction',\n\t\t\t),\n\t\t);\n\t}", "public function actions()\n\t{\n\t\treturn array(\n\t\t\t// captcha action renders the CAPTCHA image displayed on the contact page\n\t\t\t'captcha'=>array(\n\t\t\t\t'class'=>'CCaptchaAction',\n\t\t\t\t'backColor'=>0xFFFFFF,\n\t\t\t),\n\t\t\t// page action renders \"static\" pages stored under 'protected/views/site/pages'\n\t\t\t// They can be accessed via: index.php?r=site/page&view=FileName\n\t\t\t'page'=>array(\n\t\t\t\t'class'=>'CViewAction',\n\t\t\t),\n\t\t);\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $contactGroups = $em->getRepository('AppBundle:ContactGroup')->findAll();\n\n return $this->render('contactgroup/index.html.twig', array(\n 'contactGroups' => $contactGroups,\n ));\n }", "public function getActions(): array;", "public function getGroupSequence()\n {\n $groups = ['Message'];\n $groups[] = $this->action;\n\n return $groups;\n }", "public function getFrontEndActions();", "function actions()\n {\n return[];\n }", "public function &onGroupAreas()\n\t{\n\t\t$area = array(\n\t\t\t'name' => $this->_name,\n\t\t\t'title' => Lang::txt('PLG_GROUPS_ACTIVITY'),\n\t\t\t'default_access' => $this->params->get('plugin_access', 'members'),\n\t\t\t'display_menu_tab' => $this->params->get('display_tab', 1),\n\t\t\t'icon' => 'f056'\n\t\t);\n\t\treturn $area;\n\t}", "protected function renderActionList() {}", "public function actions()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t// captcha action renders the CAPTCHA image displayed on the contact page\r\n\t\t\t'captcha'=>array(\r\n\t\t\t\t'class'=>'CCaptchaAction',\r\n\t\t\t\t'backColor'=>0xFFFFFF,\r\n\t\t\t),\r\n\t\t\t// page action renders \"static\" pages stored under 'protected/views/site/pages'\r\n\t\t\t// They can be accessed via: index.php?r=site/page&view=FileName\r\n\t\t\t'page'=>array(\r\n\t\t\t\t'class'=>'CViewAction',\r\n\t\t\t),\r\n\t\t);\r\n\t}", "public function getActions();", "public function getActions();", "public function actions(): array;", "public function get_actions(): array;", "protected function getActions()\n {\n $actions = [];\n\n if (method_exists($this, 'editAction')) {\n $actions['edit'] = [\n 'label' => 'bigfoot_core.crud.actions.edit.label',\n 'route' => $this->getRouteNameForAction('edit'),\n 'icon' => 'edit',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'duplicateAction')) {\n $actions['duplicate'] = [\n 'label' => 'bigfoot_core.crud.actions.duplicate.label',\n 'route' => $this->getRouteNameForAction('duplicate'),\n 'icon' => 'copy',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'deleteAction')) {\n $actions['delete'] = [\n 'label' => 'bigfoot_core.crud.actions.delete.label',\n 'route' => $this->getRouteNameForAction('delete'),\n 'icon' => 'trash',\n 'color' => 'red',\n 'class' => 'confirm-action',\n 'attributes' => [\n 'data-confirm-message' => $this->getTranslator()->trans(\n 'bigfoot_core.crud.actions.delete.confirm',\n ['%entity%' => $this->getEntityLabel()]\n ),\n ],\n ];\n }\n\n return $actions;\n }", "public function groupsAction()\n\t{\n\t\t$user = $this->user;\n $user_id = $user['id'];\n $application_id = $user['Application_ID'];\n\n $user = $this->user;\n $user_id = $user['id'];\n $application_id = $user['Application_ID'];\n\n $user = UsersMobile::findFirst($user_id);\n\n $cms = $user->getCms([\n \t\"secured = 1 AND application_id = {$application_id}\"\n \t]);\n\n $data = [];\n\t\tforeach ($cms as $key => $chat) {\n\t\t\t$data[\"messages\"][$key][\"name\"] = $chat->title;\n\t\t\t$data[\"messages\"][$key][\"id\"] = $chat->id;\n\t\t\t$data[\"messages\"][$key][\"created_at\"] = $chat->datetime;\n\t\t}\n\n\t\t$final_array = $this->structureMessages($data[\"messages\"]);\n\n\t\t$response = [\n \t\"status\" => $this->apiFactory->getStatus(200, \"Success\"),\n \t\"data\" => $final_array\n ];\n\n return $this->sendJson($response);\n\t}", "public function gestioncontactAction()\r\n {\r\n $auth = Zend_Auth::getInstance();\r\n $userGroupId = $auth->getIdentity()->UserGroupIdF;\r\n\r\n $contacts = new Application_Model_DbTable_Contact();\r\n $contact = $contacts->getAllContactByGroup($userGroupId);\r\n $this->view->contacts = $contact;\r\n\r\n // Form for the creation of a contact\r\n $createForm = new Application_Form_CreateContactForm();\r\n $createForm->createForm();\r\n $createForm->setAction($this->_helper->url('createcontact', 'admin'));\r\n $this->view->form = $createForm;\r\n\r\n // Form for the edit of a contact\r\n $editForm = new Application_Form_EditContactForm();\r\n $editForm->createForm();\r\n $editForm->setAction($this->_helper->url('editcontact', 'admin'));\r\n $this->view->editform = $editForm;\r\n\r\n }", "public function actions()\n { \n return array( \n // captcha action renders the CAPTCHA image displayed on the contact page\n 'captcha'=>array(\n 'class'=>'CCaptchaAction',\n 'backColor'=>0xFFFFFF, \n 'maxLength'=>'4', // 最多生成几个字符\n 'minLength'=>'4', // 最少生成几个字符\n 'height'=>'40'\n ), \n ); \n }", "protected function getActions() {}", "function getActionsByGroupId($groupId, $limit = NULL, $offset = NULL) {\n $sql = \"SELECT action_id, action_name\n FROM %s\n WHERE action_group = %d\n ORDER BY action_name ASC\";\n $sqlParams = array($this->tableActions, $groupId);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['action_id']] = $row['action_name'];\n }\n }\n return $result;\n }", "function getActionGroups($limit = NULL, $offset = NULL) {\n $sql = \"SELECT actiongroup_id, actiongroup_name\n FROM %s\n ORDER BY actiongroup_name ASC\";\n $sqlParams = array($this->tableGroups);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['actiongroup_id']] = $row['actiongroup_name'];\n }\n }\n return $result;\n }", "public static function returnActions() {\n return array(\n 'view' => 'Просмотр',\n 'moderate' => 'Доступ к модерированию',\n 'clear' => 'Полная очистка БД',\n );\n }", "public function sendAction()\n {\n return array();\n }", "public function getBatchActions(): array;", "protected function get_bulk_actions() {\n\n\t\t$actions = [];\n\n\t\tif ( current_user_can( wp_mail_smtp()->get_pro()->get_logs()->get_manage_capability() ) ) {\n\t\t\t$actions['delete'] = esc_html__( 'Delete', 'wp-mail-smtp-pro' );\n\t\t\t$actions['resend'] = esc_html__( 'Resend', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\treturn $actions;\n\t}", "public function getActions() {\n\t\treturn array(\n\t\t\t// Client Nav\n\t\t\tarray(\n\t\t\t\t'action'=>\"widget_client_home\",\n\t\t\t\t'uri'=>\"plugin/client_notices/client_widget/\",\n\t\t\t\t'name'=>Language::_(\"ClientNoticesPlugin.widget_client_home.index\", true)\n\t\t\t),\n\t\t\t// Staff Nav\n array(\n 'action' => \"nav_secondary_staff\",\n 'uri' => \"plugin/client_notices/admin_main/index/\",\n 'name' => Language::_(\"ClientNoticesPlugin.nav_secondary_staff.index\", true),\n 'options' => array(\n\t\t\t\t\t'parent' => \"clients/\"\n\t\t\t\t)\n ),\n\t\t\t// Client Profile Action Link\n\t\t\tarray(\n\t\t\t\t'action' => \"action_staff_client\",\n\t\t\t\t'uri' => \"plugin/client_notices/admin_main/add/\",\n\t\t\t\t'name' => Language::_(\"ClientNoticesPlugin.action_staff_client.add\", true),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'class' => \"invoice\"\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function getActions() {\n\n\t}", "public static function getOnAction($action){\n\t\t$ret = [];\n\t\tforeach(self::$components as $name => $component){\n\t\t\tforeach($component as $view => $actions){\n\t\t\t\tforeach($actions as $item => $ac){\n\t\t\t\t\tif($ac == $action){\n\t\t\t\t\t\t$ret[$name] = $component;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "public function action()\n {\n return $this->_actions;\n }", "function get_actions_data() {\n\t\t$actions_data = $this->get_meta( 'actions' );\n\t\treturn is_array( $actions_data ) ? array_map( [ $this, 'format_action_fields' ], $actions_data ) : [];\n\t}", "public function call_action_display() {\n\t\t// Build the output to return for use by the shortcode.\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"callbox\">\n\t\t\t<div class=\"fixme\"><a class=\"call\" href=\"mailto:[email protected]?subject=marketing questions\"><span class=\"ss-icon\">mail</span> Contact our marketing consultants</a></div>\n\t\t</div>\n\t\t<?php\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $content;\n\t}", "public function actions()\r\n {\r\n return array(\r\n 'index' => array(\r\n 'class' => \\nizsheanez\\jsonRpc\\Action::class,\r\n ),\r\n );\r\n }", "public function transform(ContactGroup $model)\n {\n return [\n 'id' => $model->id,\n 'org_id' => $model->org_id,\n 'name' => $model->name,\n 'description' => $model->description\n ];\n }", "public function getDashboardActions(): array;", "public function index()\n {\n return Group::all()->toArray();\n }", "public static function getActions() {\n $user = JFactory::getUser();\n $result = new JObject;\n\n $assetName = 'com_labgeneagrogene';\n\n $actions = array(\n 'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'\n );\n\n foreach ($actions as $action) {\n $result->set($action, $user->authorise($action, $assetName));\n }\n\n return $result;\n }", "public function getActions() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'action'=>\"nav_primary_client\",\n\t\t\t\t'uri'=>\"plugin/knowledgebase/client_main/\",\n\t\t\t\t'name'=>Language::_(\"KnowledgebasePlugin.client_main\", true)\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'action' => \"nav_secondary_staff\",\n\t\t\t\t'uri' => \"plugin/knowledgebase/admin_main/\",\n\t\t\t\t'name' => Language::_(\"KnowledgebasePlugin.admin_main\", true),\n\t\t\t\t'options' => array('parent' => \"tools/\")\n\t\t\t)\t\t\t\n\t\t);\n\t}", "public function getActionsHTML()\n\t{\n\t\t$tpl = $this->getTemplate('actions');\n\n\t\tinclude_once(\"Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$actions = new ilGroupedListGUI();\n\t\t$actions->setAsDropDown(true, true);\n\n\t\tif( $this->getQuestionMarkLinkTarget() )\n\t\t{\n\t\t\t$actions->addEntry($this->getQuestionMarkActionLabel(), $this->getQuestionMarkLinkTarget(),\n\t\t\t\t'','','ilTestQuestionAction','tst_mark_question_action');\n\t\t\t$actions->addSeparator();\n\t\t}\n\n\t\tif( $this->getRevertChangesLinkTarget() )\n\t\t{\n\t\t\t$actions->addEntry($this->lng->txt('tst_revert_changes'), $this->getRevertChangesLinkTarget(),\n\t\t\t\t'','','ilTestQuestionAction ilTestRevertChangesAction','tst_revert_changes_action');\n\t\t}\n\t\telse {\n\t\t\t$actions->addEntry($this->lng->txt('tst_revert_changes'), '#',\n\t\t\t\t'','','ilTestQuestionAction ilTestRevertChangesAction disabled','tst_revert_changes_action');\n\t\t}\n\n\t\tif( $this->isDiscardSolutionButtonEnabled() )\n\t\t{\n\t\t\t$actions->addEntry($this->lng->txt('discard_answer'),'#',\n\t\t\t\t'','','ilTestQuestionAction ilTestDiscardSolutionAction','tst_discard_solution_action');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$actions->addEntry($this->lng->txt('discard_answer'),'#',\n\t\t\t\t'','','ilTestQuestionAction ilTestDiscardSolutionAction disabled','tst_discard_solution_action');\n\t\t}\n\n\t\tif( $this->getSkipQuestionLinkTarget() )\n\t\t{\n\t\t\t$actions->addEntry($this->lng->txt('postpone_question'), $this->getSkipQuestionLinkTarget(),\n\t\t\t\t'','','ilTestQuestionAction','tst_skip_question_action');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$actions->addEntry($this->lng->txt('postpone_question'), '#',\n\t\t\t\t'','','ilTestQuestionAction disabled','tst_skip_question_action');\n\t\t}\n\n\t\tif( $this->isCharSelectorEnabled() )\n\t\t{\n\t\t\t$actions->addSeparator();\n\t\t\t$actions->addEntry($this->lng->txt('char_selector_btn_label'),'#',\n\t\t\t\t'','','ilTestQuestionAction ilCharSelectorMenuToggle','ilCharSelectorMenuToggleLink');\n\t\t}\n\n\t\t// render the mark icon\n\t\tif( $this->getQuestionMarkLinkTarget() )\n\t\t{\n\t\t\t$this->renderActionsIcon(\n\t\t\t\t$tpl, $this->getQuestionMarkIconSource(), $this->getQuestionMarkIconLabel(), 'ilTestMarkQuestionIcon'\n\t\t\t);\n\t\t}\n\n\t\t// render the action menu\n\t\tinclude_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';\n\t\t$list = new ilAdvancedSelectionListGUI();\n\t\t$list->setSelectionHeaderClass('btn-primary');\n\t\t$list->setId('QuestionActions');\n\t\t$list->setListTitle($this->lng->txt(\"actions\"));\n\t\t$list->setStyle(1);\n\t\t$list->setGroupedList($actions);\n\t\t$tpl->setVariable('ACTION_MENU',$list->getHTML());\n\n\t\treturn $tpl->get();\n\t}", "public function findgrouprecordsAction()\n {\n \t//Don't display a new view\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t//Don't use the default layout since this isn't a view call\n\t\t$this->_helper->layout->disableLayout();\n\t\t\n\t\t$group = GroupNamespace::getCurrentGroup();\n\t\tif (isset($group) && !is_null($group))\n\t\t{\n\t\t\t$records = $group->getRecords(TRUE);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$records = array();\n\t\t}\n\t\t\n\t\t$grouprecords = array();\n\t\tforeach ($records as $record)\n\t\t{\n\t\t\t$callnumbers = $record->getCallNumbers();\n\t\t\t$stringcallnumbers = implode(\"; \", $callnumbers);\n\t\t\t$counts = $record->getInitialCounts();\n\t\t\t$vol = $counts->getVolumeCount();\n\t\t\t$sheet = $counts->getSheetCount();\n\t\t\t$photo = $counts->getPhotoCount();\n\t\t\t$other = $counts->getOtherCount();\n\t\t\t$boxes = $counts->getBoxCount();\n\t\t\t\t\n\t\t\t$finalcounts = $record->getFunctions()->getReport()->getCounts();\n\t\t\t$finalvol = $finalcounts->getVolumeCount();\n\t\t\t$finalsheet = $finalcounts->getSheetCount();\n\t\t\t$finalphoto = $finalcounts->getPhotoCount();\n\t\t\t$finalother = $finalcounts->getOtherCount();\n\t\t\t$finalhousing = $finalcounts->getHousingCount();\n\t\t\t$finalbox = $finalcounts->getBoxCount();\n\t\t\t\t\n\t\t\tarray_push($grouprecords, array(\n\t\t\t\tItemDAO::ITEM_ID => $record->getItemID(),\n\t\t\t\t\"CallNumbers\" => $stringcallnumbers,\n\t\t\t\tItemDAO::TITLE => $record->getTitle(),\n\t\t\t\tItemDAO::AUTHOR_ARTIST => $record->getAuthorArtist(),\n\t\t\t\tItemDAO::DATE_OF_OBJECT => $record->getDateOfObject(),\n\t\t\t\t\"VolumeCount\" => $vol,\n\t\t\t\t\"SheetCount\" => $sheet,\n\t\t\t\t\"PhotoCount\" => $photo,\n\t\t\t\t\"OtherCount\" => $other,\n\t\t\t\t\"BoxCount\" => $boxes,\n\t\t\t\tItemDAO::COMMENTS => $record->getComments(),\n\t\t\t\tProposalDAO::EXAM_DATE => $record->getFunctions()->getProposal()->getExamDate(),\n\t\t\t\tProposalDAO::DIMENSION_UNIT => $record->getFunctions()->getProposal()->getDimensions()->getUnit(),\n\t\t\t\tProposalDAO::HEIGHT => $record->getFunctions()->getProposal()->getDimensions()->getHeight(),\n\t\t\t\tProposalDAO::WIDTH => $record->getFunctions()->getProposal()->getDimensions()->getWidth(),\n\t\t\t\tProposalDAO::THICKNESS => $record->getFunctions()->getProposal()->getDimensions()->getThickness(),\n\t\t\t\tReportDAO::REPORT_DATE => $record->getFunctions()->getReport()->getReportDate(),\n\t\t\t\t\"TotalHours\" => $record->getFunctions()->getReport()->getTotalHours(),\n\t\t\t\t\"ReportUnit\" => $record->getFunctions()->getReport()->getDimensions()->getUnit(),\n\t\t\t\t\"ReportHeight\" => $record->getFunctions()->getReport()->getDimensions()->getHeight(),\n\t\t\t\t\"ReportWidth\" => $record->getFunctions()->getReport()->getDimensions()->getWidth(),\n\t\t\t\t\"ReportThickness\" => $record->getFunctions()->getReport()->getDimensions()->getThickness(),\n\t\t\t\t\"FinalVolumeCount\" => $finalvol,\n\t\t\t\t\"FinalSheetCount\" => $finalsheet,\n\t\t\t\t\"FinalPhotoCount\" => $finalphoto,\n\t\t\t\t\"FinalOtherCount\" => $finalother,\n\t\t\t\t\"FinalHousingCount\" => $finalhousing,\n\t\t\t\t\"FinalBoxCount\" => $finalbox\n\t\t\t\t));\n\t\t}\n\t\t\n\t\t//Only use the results\n \t$resultset = array('Result' => $grouprecords);\n \t$retval = Zend_Json::encode($resultset);\n\t\t//Make sure JS knows it is in JSON format.\n\t\t$this->getResponse()->setHeader('Content-Type', 'application/json')\n\t\t\t\t\t\t\t\t->setBody($retval);\n }", "public static function returnActions() {\n ##return array();\n }", "public function contactsAction()\n {\n $this->view->pageTitle = 'Member Contact List';\n\t$service = new App_Service_Member();\n $users = $service->getActiveUsers();\n\n $this->view->users = array();\n $lastRowLetter = null;\n\t\n\t// remove inactive memebers\n\t$users = array_filter($users, function($usr) { return $usr->isActive();} );\n\t\n foreach ($users as $userId => $user) {\n $firstName = $user->getFirstName();\n\n if ($lastRowLetter !== $firstName[0]) {\n $lastRowLetter = $rowLetter = $firstName[0];\n } else {\n $rowLetter = null;\n }\n\n $this->view->users[$userId] = array(\n 'user' => $user,\n 'rowLetter' => $rowLetter,\n );\n }\n }", "public function getActionData() {\r\n\t\treturn array(\r\n\t\t\t'packageID' => $this->packageID\r\n\t\t);\r\n\t}", "public function getBatchActions()\n {\n //$actions = parent::getBatchActions();\n\n\n $actions['check']= array('label' => $this->trans('action_check', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n $actions['visible']= array('label' => $this->trans('action_visible', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n\n return $actions;\n }", "public function getBatchActions()\n {\n //$actions = parent::getBatchActions();\n\n\n $actions['check']= array('label' => $this->trans('action_check', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n $actions['visible']= array('label' => $this->trans('action_visible', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n\n return $actions;\n }", "public function getActualActionGroups()\n {\n $actionGroupIds = $this->getActionGroupIds();\n $actualActionProductIds = $this->getActualActionProducts()->select('id')->column();\n\n $query = Group::find()\n ->orderBy(['{{%sales_groups}}.name' => SORT_ASC]);\n\n if (empty($actualActionProductIds)) {\n return $query->andWhere('1=0');\n }\n\n $query\n ->joinWith('products', false)\n ->andWhere(['IN', '{{%sales_products}}.id', $actualActionProductIds])\n ->distinct('{{%sales_groups}}.id');\n\n if ($actionGroupIds) {\n $query->where(['IN', '{{%sales_groups}}.id', $actionGroupIds]);\n }\n\n return $query;\n }", "public static function bulkActions() {\n return [\n static::BULK_ACTION_SETREAD => ['title' => \\Yii::t('app', 'خوانده شده')],\n static::BULK_ACTION_SETNOTREAD => ['title' => \\Yii::t('app', 'خوانده نشده')],\n static::BULK_ACTION_DELETE => ['title' => \\Yii::t('app', 'حذف')],\n ];\n }", "public function getContactListByGroup(Request $request, $group_id)\n {\n // Get contacts\n $data = $this->Service->getContactListByGroup($group_id);\n $layoutData['js_plugin'] = $this->getJsPlugin([\"JSP_BOOTSTRAP_BOOTBOX\",\"JSP_SORTABLE\"]);\n $layoutData['userType'] = config(\"dashboard_constant.USER_TYPE\");\n $layoutData['userStatus'] = config(\"dashboard_constant.USER_STATUS\");\n $layoutData['title'] = 'Group Contacts | '.config(\"app.name\");\n $layoutData['group'] = $this->GroupService->getDetail($group_id);\n $layoutData['breadcrumb'] = [\n \"links\" => [\n [\n \"name\" => \"Groups\",\n \"url\" => url(\"#/group-list\"),\n \"icon\" => \"flaticon-list-1\"\n ],\n [\n \"name\" => \"Group Contacts\",\n \"url\" => url(\"#/contact-group-list/\".$group_id),\n \"icon\" => \"flaticon-list-1\"\n ]\n ],\n \"modalButton\" =>[\n [\n \"name\" => \"Add Contact\",\n \"url\" => 'javascript:void(0)',\n \"icon\" => \"la la-plus\",\n \"class\" => \"m-btn--air btn-accent\",\n \"toggle\" => \"modal\",\n \"target\" => \"#contact-modal\"\n ]\n ] \n ]; \n $layoutData['data'] = $data['data']; \n // pagination meta value\n $layoutData['meta'] = $data['meta'];\n // pagination links\n $layoutData['links'] = $data['links'];\n \n // Return collection of list as a reosurce\n\t\treturn response()->json($layoutData); \n }", "public function getShowGroups(): array;", "function bigbluebuttonbn_get_view_actions() {\n return array('view', 'view all');\n}", "public function index()\n {\n if(Auth::user()->isRoot(Role::find(Auth::user()->role_id)))\n {\n $contacts = SmsContact::all();\n $group = SmsGroup::pluck('name', 'id')->all();\n return view('portal.contacts.manageContacts', compact('contacts','group'));\n }\n $contacts = SmsContact::where('user_id',Auth::user()->id)->get();\n $group = SmsGroup::where('user_id',Auth::user()->id)->pluck('name', 'id')->all();\n return view('portal.contacts.manageContacts', compact('contacts','group'));\n\n }", "function questionnaire_get_view_actions() {\n return array('view', 'view all');\n}", "protected static function getActions()\n {\n return [\n CrudController::ACTION_ADD => 'created',\n CrudController::ACTION_DELETE => 'removed',\n CrudController::ACTION_DETAILS => 'displayed',\n CrudController::ACTION_EDIT => 'updated',\n CrudController::ACTION_HIDE => 'hidden',\n CrudController::ACTION_VIEW => 'displayed',\n CrudController::ACTION_UNHIDE => 'made visible',\n CrudController::ACTION_ENABLE => 'enabled',\n CrudController::ACTION_DISABLE => 'disabled',\n ];\n }", "public function actionIndex() {\n\n $model = new SmsForm;\n\n\n $groups = SmsGroup::model()->findAll('user_id=:uid', array(':uid' => Yii::app()->user->id));\n $listGroups = CHtml::listData($groups, 'id', 'name');\n\n\n\n $criteria = new CDbCriteria;\n $criteria->select = 'g.id,g.name';\n $criteria->condition = 's.user_id=:uid';\n $criteria->params = array(':uid' => Yii::app()->user->id);\n $criteria->join = 'LEFT JOIN sms_group_share as s ON s.group_id=g.id';\n $criteria->alias = 'g';\n\n $sharedGroups = SmsGroup::model()->findAll($criteria);\n \n //CVarDumper::dump($sharedGroups);\n $listSharedGroups = CHtml::listData($sharedGroups, 'id', 'name');\n\n $optionList = array(\n 'User Group' => $listGroups,\n 'Shared Group' => $listSharedGroups\n );\n\n\n\n if (isset($_POST['SmsForm'])) {\n $model->attributes = $_POST['SmsForm'];\n $groupMembers = SmsGroupMembers::model()->findAll('group_id=:group_id', array(':group_id' => $model->groupId));\n\n if ($model->validate()) {\n\n $successCount = 0;\n $errorCount = 0;\n\n foreach ($groupMembers as $member => $attr) {\n $out = new SmsOut();\n $out->group_id = $model->groupId;\n $out->message = $model->message;\n $out->message_type = '1'; // 1 for text, 2 for flash, 3 for unicode\n $out->department = SmsSupervisors::model()->getDepartment();\n $out->mask = $model->mask;\n $out->to_number = $attr->member_phone;\n $out->create_by = Yii::app()->user->id;\n $out->create_time = date(\"Y-m-d h:m:s\");\n $out->priority = 1; // 1 for normal, 2 for high\n $out->status = 0; // 0 for elegble for sending 1 is for sent\n $out->save();\n if ($out->save()) {\n $successCount++;\n } else {\n $errorCount++;\n }\n }\n\n if ($successCount > 0) {\n Yii::app()->user->setFlash('green', 'SMS sent request submitted successfully. It might take some time to deliver all messages');\n } else {\n Yii::app()->user->setFlash('error', 'An error occured while submitting SMS request. Contact ICT support.');\n }\n $this->redirect('/sms');\n }\n }\n $this->render('index', array('model' => $model, 'groups' => $optionList, 'clis' => $this->clis));\n }", "public function getActions(){\r\n\t\t\r\n\t\t\treturn $this->_actions;\r\n\t\t}", "public function get_actions() {\n $actions = get_post_meta( $this->post_id, '_wcs_actions', true );\n\n if ( ! $actions ) {\n return array();\n }\n\n return (array) $actions;\n }", "public static function getActions() {\n $user = JFactory::getUser();\n $result = new JObject;\n\n $assetName = 'com_keymanager';\n\n $actions = array(\n 'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'\n );\n\n foreach ($actions as $action) {\n $result->set($action, $user->authorise($action, $assetName));\n }\n\n return $result;\n }", "function admin_groups() {\r\n if (empty($this->RequestersPermission->belongsTo)) {\r\n $this->RequestersPermission->bindModel(array(\r\n 'belongsTo' => array('Permission')\r\n ), false);\r\n }\r\n\r\n set_time_limit(300);\r\n /////////\r\n //TODO: 1. Delete unrelated permissions\r\n /////////\r\n /////////\r\n //2. Get permissions list \"from app\"\r\n //and use names AS keys\r\n /////////\r\n $permissionsNames = $this->_get_permissions_list_from_app();\r\n $permissionsNames = array_combine($permissionsNames, array_fill(0, count($permissionsNames), false));\r\n\r\n /////////\r\n //3. Prepare $permissionsNames data for view\r\n /////////\r\n $regexp = '^[a-z0-9_]*:([*]|[a-z0-9_]*:([*]|[a-z0-9_]+:[*]|[a-z0-9_]+:[a-z0-9_]+|[a-z0-9_]+:[a-z0-9_]+:own))$';\r\n $this->Permission->Behaviors->attach('Containable');\r\n $permissions = $this->Permission->find('all', array(\r\n 'conditions' => array('or' => array('Permission.name REGEXP \"' . $regexp . '\"', 'Permission.name' => '*')),\r\n 'contain' => array('Group'),\r\n ));\r\n\r\n foreach ($permissions AS &$permission) {\r\n if (isSet($permissionsNames[$permission['Permission']['name']])) {\r\n $groupsByIds = array();\r\n foreach ($permission['Group'] AS $group) {\r\n $groupsByIds[$group['id']] = $group;\r\n }\r\n $permission['Group'] = $groupsByIds;\r\n $permissionsNames[$permission['Permission']['name']] = $permission;\r\n }\r\n }\r\n\r\n\r\n foreach ($permissionsNames AS $key => &$permission) {\r\n if (empty($permission)) {\r\n $permission = array('Permission' => array('name' => $key), 'Group' => array());\r\n }\r\n }\r\n\r\n $this->set('permissionsNames', $permissionsNames);\r\n\r\n /////////\r\n //4. Prepare $groups data for view\r\n /////////\r\n $this->set('groups', $this->Permission->Group->find('list', array('order' => 'Group.order ASC')));\r\n\r\n /////////\r\n //5. Save permissions if data is sent\r\n /////////\r\n if (!empty($this->request->data)) {\r\n\r\n $groups = $this->Permission->Group->find('list', array('fields' => array('id', 'alias')));\r\n\r\n //przesĹ‚ano zserializowane dane - trzeba odtworzyć\r\n if (!empty($this->request->data['Serialized']['text'])) {\r\n// $old_data = unserialize(str_replace(array(\"\\r\\n{\\r\\n\", \"\\r\\n}\\r\\n\"), array(\"{\", \"}\"), $this->request->data['Serialized']['text']));\r\n $old_data = $this->_xml_to_array($this->request->data['Serialized']['text']);\r\n $groups2 = array_flip($groups);\r\n\r\n $this->request->data = array('Permission' => array());\r\n foreach ($old_data['Permission'] AS $key => $value) {\r\n $this->request->data['Permission'][$key] = array();\r\n foreach ($value AS $sub_key => $checked) {\r\n $this->request->data['Permission'][$key][$groups2[$sub_key]] = $checked;\r\n }\r\n }\r\n }\r\n\r\n foreach ($this->request->data['Permission'] AS $key => &$permission) {\r\n foreach ($permission AS $sub_key => $value) {\r\n if (empty($value)) {\r\n //try to delete relation\r\n $this->RequestersPermission->deleteAll(array(\r\n 'Permission.name' => $key,\r\n 'RequestersPermission.row_id' => $sub_key,\r\n 'RequestersPermission.model' => 'Group'\r\n ), false);\r\n } else {\r\n //is there Permission row with name == $key?\r\n if (($permissionRow = $this->Permission->createIfNotExists($key)) == false) {\r\n $this->Session->setFlash('Zapisywanie uprawnienie zostało przerwane, poniĹĽej przedstawiono stan rzeczywisty');\r\n $this->redirect($this->here);\r\n }\r\n\r\n $requestersPermission = $this->RequestersPermission->find('count', array('conditions' => array(\r\n 'RequestersPermission.permission_id' => $permissionRow['Permission']['id'],\r\n 'RequestersPermission.row_id' => $sub_key,\r\n 'RequestersPermission.model' => 'Group'\r\n )));\r\n if (empty($requestersPermission)) {\r\n $this->RequestersPermission->create(array('RequestersPermission' => array(\r\n 'permission_id' => $permissionRow['Permission']['id'],\r\n 'row_id' => $sub_key,\r\n 'model' => 'Group'\r\n )));\r\n if (!$this->RequestersPermission->save()) {\r\n $this->Session->setFlash('Zapisywanie uprawnienie zostało przerwane, poniĹĽej przedstawiono stan rzeczywisty');\r\n $this->redirect($this->here);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $new_data = array('Permission' => array());\r\n foreach ($this->request->data['Permission'] AS $key => $value) {\r\n $new_data['Permission'][$key] = array();\r\n foreach ($value AS $sub_key => $checked) {\r\n $new_data['Permission'][$key][$groups[$sub_key]] = $checked;\r\n }\r\n }\r\n\r\n $dir = APP . 'Config/permissions/';\r\n// $i = 1;\r\n $file_name = $dir . 'groups_permissions.xml';\r\n// while(file_exists($unique_file_name = $dir.'groups_permissions'.$i.'.txt')){\r\n// $i++;\r\n// };\r\n// $filecontent = \"\\n-- Utworzono: \".date('Y-m-d H:i:s').\" \\r\\n\";\r\n// $filecontent .= \"-- Na stacji administrowanej przez: {$_SERVER['SERVER_ADMIN']}\\r\\n\\r\\n\";\r\n// $filecontent .= \"=======Dane do przetworzenia:=======\\r\\n\";\r\n $filecontent = $this->_array_to_xml($new_data);\r\n// $filecontent .= \"\\r\\n================KONIEC==============\\r\\n\";\r\n//debug($new_data);\r\n// file_put_contents($unique_file_name, $filecontent);\r\n file_put_contents($file_name, $filecontent);\r\n\r\n $this->Session->setFlash('Uprawnienia grup zostały zapisane');\r\n $this->redirect($this->here);\r\n }\r\n }", "public function viewgroupAction()\n {\n $post_values = $this->getRequest()->getPost();\n if(count($post_values) > 0)\n {\n $appraisal_id = $this->_getParam('appraisal_id',null);\n $manager_id = $this->_getParam('manager_id',null);\n $group_id = $this->_getParam('group_id',null);\n $group_name = $this->_getParam('group_name',null);\n \n try\n {\n if($appraisal_id != '' && $manager_id != '' && $group_id != '')\n {\n $appraisal_id = sapp_Global::_decrypt($appraisal_id);\n $manager_id = sapp_Global::_decrypt($manager_id);\n $group_id = sapp_Global::_decrypt($group_id);\n \n $app_manager_model = new Default_Model_Appraisalmanager();\n $appraisal_init_model = new Default_Model_Appraisalinit();\n $appraisal_qs_model = new Default_Model_Appraisalquestions();\n\n $manager_emp = $app_manager_model->getmanager_emp($appraisal_id, $manager_id,$group_id);\n $appraisaldata = $appraisal_init_model->getConfigData($appraisal_id);\n $appraisaldata = (isset($appraisaldata[0]) && !empty($appraisaldata[0]))?$appraisaldata[0]:array();\n if(!empty($appraisaldata) && !empty($manager_emp))\n\t\t\t\t\t{\n\t\t\t\t\t\t$ques_ids = $manager_emp[0]['manager_qs'];\n\t\t\t\t\t\t$questionsArr = $appraisal_qs_model->getQuestionsByCategory($appraisaldata['category_id'],$ques_ids);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$manager_qs_privileges = json_decode($manager_emp[0]['manager_qs_privileges'],true);\n\t\t\t\t\t\tforeach($manager_qs_privileges as $key => $val)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t$check_array[$key] = $val;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$view = $this->view;\n\t\t\t\t\t\t$view->appraisal_id = $appraisal_id;\n\t\t\t\t\t\t$view->manager_id = $manager_id;\n\t\t\t\t\t\t$view->manager_emp = $manager_emp;\n\t\t\t\t\t\t$view->questionsArr = $questionsArr;\n\t\t\t\t\t\t$view->appraisaldata = $appraisaldata;\n\t\t\t\t\t\t$this->view->checkArr = $check_array;\n\t\t\t\t\t\t$view->group_name = sapp_Global::_decrypt($group_name);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->view->ermsg = 'nodata';\n\t\t\t\t\t}\t\t\t\t\t\n }\n else\n {\n $this->view->ermsg = 'nodata';\n }\n } \n catch (Exception $e) \n {\n $this->view->ermsg = 'nodata';\n }\n }\n }", "public function actions()\n {\n $pivotTable = config('permission.database.action_permissions_table');\n\n $relatedModel = config('permission.database.actions_model');\n\n return $this->belongsToMany($relatedModel, $pivotTable, 'permission_id', 'action_id')->withTimestamps();\n }", "public static function getActions()\n\t{\n\t\t$user = Factory::getUser();\n\t\t$result = new JObject;\n\n\t\t$assetName = 'com_dnabold';\n\n\t\t$actions = array(\n\t\t\t'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'\n\t\t);\n\n\t\tforeach ($actions as $action)\n\t\t{\n\t\t\t$result->set($action, $user->authorise($action, $assetName));\n\t\t}\n\n\t\treturn $result;\n\t}", "public function cgetAction()\n {\n return $this->handleView(\n $this->view(\n new CollectionRepresentation($this->get('sulu_contact.country_repository')->findAll(), 'countries')\n )\n );\n }", "public function senderActions($action) {\n return $this->send('sender_action', $action);\n }", "public static function returnActions() {\n return array();\n }", "public function actionGetMembergroup() {\n $json = array();\n if (isset(\\Yii::$app->request->get()['id'])) {\n $model = BbiiMembergroup::find(\\Yii::$app->request->get()['id']);\n if ($model !== null) {\n $json['id'] = $model->id;\n $json['name'] = $model->name;\n $json['description'] = $model->description;\n $json['min_posts'] = $model->min_posts;\n $json['color'] = $model->color;\n $json['image'] = $model->image;\n }\n }\n echo json_encode($json);\n \\Yii::$app->end();\n }", "public function index()\n {\n $this->authorize('viewAny', [Group::class]);\n return Group::with('modality', 'formationProgram', 'formationProgram.formationProgramType')->get();\n }", "public function groups() {\n\t\t//variabel\n\t\t$data['datas'] = $this->PbkGroups_model->get_all();\n\t\t\n\t\t$template_data['title'] = 'SMS Gateway ';\n\t\t$template_data['subtitle'] = 'Kirim SMS';\n $template_data['crumb'] = ['SMS Gateway' => 'smsgateway', 'SMS Groups' => 'smsgateway/kirimsms/groups',];\n\t\t//view\n\t\t$this->layout->set_wrapper('groups_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}", "function get_actions() {\n\t\tglobal $db;\n\t\tstatic $actions = null;\n\t\tif ( is_null($actions) ) {\n\t\t\tfor ( $info = $db->Execute(\"SELECT * FROM `actions` ORDER BY `title` ASC\"); !$info->EOF; $info->moveNext() ) {\n\t\t\t\t$actions[$info->fields['id']] = (object)array(\"id\" => $info->fields['id'], \"title\" => $info->fields['title'], \"visible\" => $info->fields['visible'] == \"true\" ? true : false);\n\t\t\t}\n\t\t} return $actions;\n\t}", "public function actions()\n {\n return [\n 'index' => ['class' => 'backend\\modules\\music\\actions\\HomeAction', 'checkAccess' => [$this, 'checkAccess']],\n 'home' => ['class' => 'backend\\modules\\music\\actions\\HomeAction', 'checkAccess' => [$this, 'checkAccess']],\n 'song' => ['class' => 'backend\\modules\\music\\actions\\MusicSongAction', 'checkAccess' => [$this, 'checkAccess']],\n 'playlist' => ['class' => 'backend\\modules\\music\\actions\\MusicPlaylistAction', 'checkAccess' => [$this, 'checkAccess']],\n 'artist' => ['class' => 'backend\\modules\\music\\actions\\MusicArtistAction', 'checkAccess' => [$this, 'checkAccess']],\n 'song-download' => ['class' => 'backend\\modules\\music\\actions\\MusicSongDownloadAction', 'checkAccess' => [$this, 'checkAccess']],\n 'search' => ['class' => 'backend\\modules\\music\\actions\\SearchAction', 'checkAccess' => [$this, 'checkAccess']],\n 'feedback' => ['class' => 'backend\\modules\\music\\actions\\FeedbackAction', 'checkAccess' => [$this, 'checkAccess']],\n 'browse' => ['class' => 'backend\\modules\\music\\actions\\BrowseMusicAction', 'checkAccess' => [$this, 'checkAccess']],\n ];\n }", "public function grouplist(Request $request)\n\t{\n\t\t$data = Contact::all();\n\t\t$groupname = $request->groupname;\n\t\t$group_id = CreateGroup::insertGetId(array('groupname'=> $groupname));\n\t\t\n\n\t\tforeach($request->contactgroup as $user)\n\t\t{\n\t\t\t$smsid = Groupsms::insert(array('groupid'=> $group_id, 'user_id' =>$user));\n\t\t}\n\t\t\n\t\treturn view('contacts.addgroup',compact('data'));\n\t}", "public function emailComposeAction(){\n $contentIds = trim($this->params()->fromQuery('content_ids'));\n $concertId = $this->params()->fromQuery('concert_id');\n\n $concertService = $this->getConcertService();\n $concert = $concertService->getConcertById($concertId);\n\n if($contentIds !== ''){\n $contentIds = explode(',', $contentIds);\n array_walk($contentIds, function(&$id){\n $id = (int)trim($id);\n });\n } else {\n $contentIds = array();\n }\n\n // display edit page;\n\n // get content\n $contentService = $this->getContentService();\n\n $contents = $contentService->getSongContentsByIds($contentIds);\n $contentsOrdered = $contentService->orderContentsByIds($contents, $contentIds);\n\n return array(\n 'contents' => $contentsOrdered,\n 'contentService' => $contentService,\n 'concert' => $concert,\n 'concertService' => $concertService\n );\n }", "public function actions()\n {\n return [\n 'grid-sort' => [\n 'class' => SortableGridAction::className(),\n 'modelName' => $this->modelClass,\n ],\n ];\n }", "public function actions() {\n $actions = parent::actions();\n\n // will overriding return data on the index action\n //$actions['index']['prepareDataProvider'] = [new Category(), 'getAllCategories'];\n // Way 2: How to do custom search items using the built in Search Class generated by Gii which is \n // already performing validation and using 'like' (still OK for use)\n // API: http://localhost/yii2-advanced-api/api/web/v1/categories?CategorySearch[name]=Shoes\n $actions['index']['prepareDataProvider'] = [new Category(), 'prepareDataProvider'];\n\n // will overriding return data on the view action \n unset($actions['view']);\n return $actions;\n }", "public function getActions(): array\n {\n return $this->actions;\n }", "public function actions()\n {\n return [\n 'subscribe' => [\n 'class' => 'backend\\modules\\subscribe\\actions\\SubscribeAction',\n 'checkAccess' => [$this, 'checkAccess']\n ],\n \n 'check_subscribe' => [\n 'class' => 'backend\\modules\\subscribe\\actions\\CheckSubscribeAction',\n 'checkAccess' => [$this, 'checkAccess']\n ],\n \n ];\n }", "public function getChildActions() {}", "public static function bygroup()\r\n {\r\n if(!self::user()->hasPerm('users_membership'))\r\n \\CAT\\Helper\\Json::printError('You are not allowed for the requested action!');\r\n $id = self::router()->getParam();\r\n $data = \\CAT\\Groups::getInstance()->getMembers($id);\r\n if(self::asJSON())\r\n {\r\n echo header('Content-Type: application/json');\r\n echo json_encode($data,true);\r\n return;\r\n }\r\n }", "public function getAccessOfRender(): array\n {\n $access = $this->getAccessOfAll(true, $this->bsw['menu']);\n $annotation = [];\n\n foreach ($access as $key => $item) {\n $enum = [];\n foreach ($item['items'] as $route => $target) {\n if ($target['join'] === false || $target['same']) {\n continue;\n }\n $enum[$route] = $target['info'];\n }\n\n if (!isset($annotation[$key])) {\n $annotation[$key] = [\n 'info' => $item['info'] ?: 'UnSetDescription',\n 'type' => new Checkbox(),\n 'enum' => [],\n 'value' => [],\n ];\n }\n\n $annotation[$key]['enum'] = array_merge($annotation[$key]['enum'], $enum);\n }\n\n return $annotation;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lsDefAssociationGroupings = $em->getRepository('CftfBundle:LsDefAssociationGrouping')->findAll();\n\n return [\n 'lsDefAssociationGroupings' => $lsDefAssociationGroupings,\n ];\n }", "public function getBatchActions()\n {\n return array();\n }", "protected function bulkActions(): array\n {\n return [\n 'bulk-delete' => __('Delete')\n ];\n }", "protected function renderActivities()\n {\n $activities = Yii::$app->getModule('activity')->getMailActivities($this->user, $this->interval);\n\n $result['html'] = '';\n $result['text'] = '';\n\n foreach ($activities as $activity) {\n $result['html'] .= $activity->render(BaseActivity::OUTPUT_MAIL);\n $result['text'] .= $activity->render(BaseActivity::OUTPUT_MAIL_PLAINTEXT);\n }\n\n return $result;\n }", "public function index()\n {\n hasPermission('View Permission Groups');\n\n return view('jawad_permission_uuid::permissionGroup.index');\n }", "public Function getActions(){\n\t\treturn $this->actions;\n\t}", "function getcontacts() {\n \t\t\n \t\t$this->checkAccess('bulksms');\n \t\t\n \t\t$group_id = filter_var(trim($_POST['group_id']), FILTER_SANITIZE_STRING);\n \t\t$c['conditions']['BulkAddressbook.status'] = '0';\n\t\t$c['conditions']['BulkAddressbook.bulk_group_id'] = $group_id;\n\t\t$c['fields'] = array('BulkAddressbook.id', 'BulkAddressbook.mobile', 'CONCAT(BulkAddressbook.firstname, \\' \\', BulkAddressbook.lastname) as full_name');\n\t\t$data = $this->BulkAddressbook->find('all', $c);\n \t\tforeach($data as $v) {\n \t\t\t$return_data[$v['BulkAddressbook']['id']]['name'] = (empty($v['0']['full_name'])) ? 'no name' : $v['0']['full_name'];\n \t\t\t$return_data[$v['BulkAddressbook']['id']]['mobile'] = $v['BulkAddressbook']['mobile'];\n \t\t}\n \t\techo json_encode($return_data);\n \t\t\n \t\t$this->autoRender = false;\n \t}", "function customcert_get_view_actions() {\n return array('view', 'view all', 'view report');\n}", "function customcert_get_view_actions() {\n return array('view', 'view all', 'view report');\n}", "public static function GetAliasControllers() {\n /******** Jan 26, 2015 ANH DUNG **********\n * @note: ex: 'childActions'=>array('NameActionAjax1', 'NameActionAjax2', 'NameActionAjax3')\n * with some action you can use: MyFormat::isAllowAccess(\"rolesAuth\", \"group\")\n */\n return array(\n \n 'UsersLandlord'=>array('alias'=>'Landlord Management',\n 'actions'=>array(\n 'Index'=>array('alias'=> Yii::t('translation', 'List'),\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'UsersAgent'=>array('alias'=>'Saleperson Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'UsersTenant'=>array('alias'=>'Tenant Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'UsersRegistered'=>array('alias'=>'Registered Users Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Proopportunity'=>array('alias'=>'Job Opportunity Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Proresume'=>array('alias'=>'Resume Management',\n 'actions'=>array(\n 'ExportResume'=>array('alias'=>'Export Resume',\n 'childActions'=>array()\n ), \n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Listing'=>array('alias'=>'Listings Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array('Extradetail', \"Managephotos\",\n 'Confrimations',\n 'Ajax_upload_photo','Ajax_upload_doc','Ajaxdelete_photo',\n 'Ajaxdelete_doc','Setdefault','Autocomplete_agent',\n )\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'AjaxDeactivate'=>array('alias'=>'Published / Unpublished',\n 'childActions'=>array('AjaxActivate')\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'BankRequest'=>array('alias'=>'Bank Evaluation Report',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Transactions'=>array('alias'=>'Transactions Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array('ViewInvoice')\n ), \n 'ApproveTransaction'=>array('alias'=>'Approve Transaction',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'AjaxGenReceipt'=>array('alias'=>'Generate Receipt',\n 'childActions'=>array()\n ),\n 'SummaryReport'=>array('alias'=>'Summary Report',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Listingcompany'=>array('alias'=>'Company Listings Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n 'UpdateTelemarketer'=>array('alias'=>'Edit Telemaketer',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Tenancy'=>array('alias'=>'Tenancies Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'Tenancies Approved',\n 'childActions'=>array()\n ), \n 'Tenancies_new'=>array('alias'=>'Tenancies New',\n 'childActions'=>array()\n ),\n 'Tenancies_draft'=>array('alias'=>'Tenancies Draft',\n 'childActions'=>array()\n ),\n 'CreateTenancy'=>array('alias'=>'Create Tenancy',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update Tenancy',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete ',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Banners'=>array('alias'=>'Banner Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Pages'=>array('alias'=>'Page Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Testimonial'=>array('alias'=>'Master Files - Testimonial Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'FloorType'=>array('alias'=>'Master Files - Floor Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Furnished'=>array('alias'=>'Master Files - Furnished Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'LeaseTerm'=>array('alias'=>'Master Files - Lease Term Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'SpecialFeatures'=>array('alias'=>'Master Files - Special Features Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Bathroom'=>array('alias'=>'Master Files - Bathroom Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'FixturesFittings'=>array('alias'=>'Master Files - Fixtures & Fitting Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'FurnishingIncluded'=>array('alias'=>'Master Files - Furnishing Included Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'OutdoorIndoorSpace'=>array('alias'=>'Master Files - Outdoor/Indoor Space Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'ProMasterHdbTown'=>array('alias'=>'Master Files - HDB Town/Estate Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Prouploaddocument'=>array('alias'=>'Master Files - Document Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Commission'=>array('alias'=>'Master Files - Commission scheme',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n// 'Delete'=>array('alias'=>'Delete',\n// 'childActions'=>array()\n// ),\n )\n ), /* end controller */\n \n 'Floor'=>array('alias'=>'Master Files - Floor Area Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Price'=>array('alias'=>'Master Files - Price For Sale',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'ProMasterPriceRent'=>array('alias'=>'Master Files - Price For Rent',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n \n 'ProPropertyType'=>array('alias'=>'Master Files - Property Types Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n// 'Delete'=>array('alias'=>'Delete',\n// 'childActions'=>array()\n// ),\n )\n ), /* end controller */\n \n \n \n 'FiInvoice'=>array('alias'=>'Financial Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'Invoices Management',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create Invoice',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update Invoice',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View Invoice',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete Invoice',\n 'childActions'=>array()\n ),\n 'GenerateReceipt'=>array('alias'=>'Generate Receipt',\n 'childActions'=>array('ViewReceipt')\n ),\n 'AccountsReceivables'=>array('alias'=>'Account Receivables Management',\n 'childActions'=>array()\n ),\n 'Paymentvouchers'=>array('alias'=>'Payment Vouchers Management',\n 'childActions'=>array('Printvoucher')\n ),\n 'Viewvoucher'=>array('alias'=>'View Voucher',\n 'childActions'=>array()\n ),\n 'Updatevoucher'=>array('alias'=>'Update Voucher',\n 'childActions'=>array()\n ),\n 'Deletevoucher'=>array('alias'=>'Delete Voucher',\n 'childActions'=>array()\n ),\n// 'Printvoucher'=>array('alias'=>'Print Voucher',\n// 'childActions'=>array()\n// ),\n 'Accountpayable'=>array('alias'=>'Account Payable Management',\n 'childActions'=>array()\n ),\n 'Report'=>array('alias'=>'Report Financial',\n 'childActions'=>array()\n ),\n 'Report_transaction'=>array('alias'=>'Report Transaction',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Subscriber'=>array('alias'=>'Subscriber Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'Subscriber-Public Management',\n 'childActions'=>array()\n ), \n 'Member'=>array('alias'=>'Subscriber-Member Management',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n// 'View'=>array('alias'=>'View',\n// 'childActions'=>array()\n// ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'Newsletter'=>array('alias'=>'Newsletter Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n 'Create'=>array('alias'=>'Create',\n 'childActions'=>array()\n ),\n 'Update'=>array('alias'=>'Update',\n 'childActions'=>array()\n ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'GlobalEnquiry'=>array('alias'=>'Global Enquiry Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n// 'Update'=>array('alias'=>'Update',\n// 'childActions'=>array()\n// ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'EnquiryProperty'=>array('alias'=>'Enquiry of Property Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n// 'Update'=>array('alias'=>'Update',\n// 'childActions'=>array()\n// ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n 'ContactUs'=>array('alias'=>'Contact Us Management',\n 'actions'=>array(\n 'Index'=>array('alias'=>'List',\n 'childActions'=>array()\n ), \n// 'Create'=>array('alias'=>'Create',\n// 'childActions'=>array()\n// ),\n// 'Update'=>array('alias'=>'Update',\n// 'childActions'=>array()\n// ),\n 'View'=>array('alias'=>'View',\n 'childActions'=>array()\n ),\n 'Delete'=>array('alias'=>'Delete',\n 'childActions'=>array()\n ),\n )\n ), /* end controller */\n \n \n \n \n /******** Jan 26, 2015 ANH DUNG ***********/\n \n );\n }", "private static function getActions()\n {\n // get the called class\n $calledClass\t\t= get_called_class();\n if (!$calledClass) {\n return array();\n }\n\n if (isset(self::$actions[$calledClass])) {\n return self::$actions[$calledClass];\n }\n\n self::$actions[$calledClass] = array();\n\n // reflect in and find all public static functions defined by that class\n $reflectionClass \t= new \\ReflectionClass($calledClass);\n foreach ($reflectionClass->getMethods() as $method) {\n if ($method->isStatic() && $method->isPublic() && $method->class == $calledClass) {\n self::$actions[$calledClass][] = $method->name;\n }\n }\n\n return self::$actions[$calledClass];\n }", "private function getRecordActions()\n {\n return array_filter($this->actions, function($item) {\n return in_array($item, array('show', 'edit'));\n });\n }", "function grp_actions($type, $gid) {\n global $db;\n $gdetails = $this->get_details($gid);\n\n if (!$gdetails)\n e(lang(\"grp_exist_error\"));\n else {\n switch ($type) {\n case \"activate\":\n case \"active\": {\n $db->update(tbl($this->gp_tbl), array(\"active\"), array(\"yes\"), \" group_id='$gid' \");\n e(lang(\"grp_av_msg\"), \"m\");\n }\n break;\n case \"deactivate\":\n case \"deactive\": {\n\n $db->update(tbl($this->gp_tbl), array(\"active\"), array(\"no\"), \" group_id='$gid' \");\n e(lang(\"grp_da_msg\"), \"m\");\n }\n break;\n case \"featured\":\n case \"feature\": {\n $db->update(tbl($this->gp_tbl), array(\"featured\"), array(\"yes\"), \" group_id='$gid' \");\n e(lang(\"grp_fr_msg\"), \"m\");\n }\n break;\n case \"unfeatured\":\n case \"unfeature\": {\n $db->update(tbl($this->gp_tbl), array(\"featured\"), array(\"no\"), \" group_id='$gid' \");\n e(lang(\"grp_fr_msg2\"), \"m\");\n }\n break;\n case \"delete\": {\n $this->delete_group($gid);\n e(lang(\"grp_del_msg\"), \"m\");\n }\n break;\n }\n }\n }", "public function buildTemplateAction()\n {\n $action = [\n 'type' => ActionType::RICH_MENU_SWITCH,\n 'richMenuAliasId' => $this->richMenuAliasId,\n 'data' => $this->data,\n ];\n if (isset($this->label)) {\n $action['label'] = $this->label;\n }\n\n return $action;\n }", "public function actions()\n\t{\n\t\treturn $this->hasMany('App\\MeetingAction');\n\t}", "public function getActionNames()\n {\n return $this->action_names;\n }", "public function allAction() {}", "public function getRightActions(){\n return [\n /** EDIT IN CP **/\n [\n 'title' => $this->app->lang->translate('admin_bar_edit_in_cp'),\n 'link' => $this->app->urlFor('cp.listings_edit', ['id' => $this->listing->getId(), 'set_domain'=>true]),\n 'class' => 'btn btn-default btn-edit',\n 'target' => '_blank'\n ]\n ];\n }" ]
[ "0.5938471", "0.5854643", "0.5725198", "0.55975497", "0.55420315", "0.55420315", "0.55420315", "0.55306005", "0.550286", "0.54723805", "0.546748", "0.54247445", "0.54011554", "0.53890795", "0.53735965", "0.53732735", "0.53732735", "0.5345275", "0.5338938", "0.53061503", "0.52889806", "0.5258824", "0.5238365", "0.52202356", "0.5203883", "0.51999897", "0.5185044", "0.5175849", "0.51730627", "0.51128745", "0.50460064", "0.5029568", "0.50228107", "0.50090045", "0.49914372", "0.49808735", "0.4947779", "0.4946134", "0.49387163", "0.49138725", "0.4904467", "0.4900952", "0.49004325", "0.49002022", "0.48955062", "0.48898825", "0.4873604", "0.48695454", "0.48695454", "0.4864625", "0.48631287", "0.4862919", "0.48595503", "0.48563737", "0.48471954", "0.48338994", "0.4832324", "0.48296675", "0.48277226", "0.48206392", "0.4820149", "0.48183715", "0.4815488", "0.48113385", "0.47906935", "0.47872016", "0.47870573", "0.47869682", "0.47862574", "0.47760633", "0.47721946", "0.47664395", "0.4766338", "0.4765409", "0.47599477", "0.47550267", "0.47482717", "0.47467247", "0.47370854", "0.4735539", "0.47345826", "0.4730024", "0.47260684", "0.47220227", "0.47213376", "0.47193107", "0.47190782", "0.47175848", "0.47165942", "0.4716275", "0.4716275", "0.4714237", "0.47139883", "0.47041315", "0.47028857", "0.46969908", "0.46898472", "0.46895468", "0.4688162", "0.4684488" ]
0.76027656
0
Returns render array for export actions on a space group.
protected function getExportActionsViewRender(GroupInterface $group) { $output = [ '#type' => 'container', 'title' => [ '#type' => 'html_tag', '#tag' => 'h4', '#value' => t('Export'), '#attributes' => ['class' => ['living-space-export-action-title']], ], ]; $actions = $this->moduleHandler ->invokeAll('living_spaces_group_exports_info', [FALSE, $group]); if (!empty($actions)) { $output += array_intersect_key($actions, array_filter($this->configuration['enabled_exports'])); } else { $output = []; } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getContactActionsRender(GroupInterface $group) {\n $output = [\n '#type' => 'container',\n 'title' => [\n '#type' => 'html_tag',\n '#tag' => 'h4',\n '#value' => t('Contact'),\n '#attributes' => ['class' => ['living-space-contact-action-title']],\n ],\n ];\n\n $hook = 'living_spaces_group_contact_info';\n $account = $this->currentUser->getAccount();\n $actions = $this->moduleHandler->invokeAll($hook, [FALSE, $group, $account]);\n if (!empty($actions)) {\n $output += array_intersect_key($actions, array_filter($this->configuration['enabled_contacts']));\n }\n else {\n $output = [];\n }\n\n return $output;\n }", "public function listActions() {\n return [\n new Action('Export', 'fa-download', URL::route('admin-'.$this->name().'-export'))\n ];\n }", "public function getDashboardActions(): array;", "public function export()\r\n {\r\n return array(\r\n 'i' => $this->id,\r\n 's' => $this->status\r\n );\r\n }", "public function export() {\n $data = array();\n foreach ($this->elements as $element) {\n $data[$element->getName()] = $element->export();\n }\n return $data;\n }", "protected function getGlobalActions()\n {\n $globalActions = [];\n\n if ($this->generateExportCsvLink()) {\n $csvArray = $this->generateExportCsvLink();\n $globalActions['csv'] = [\n 'label' => 'bigfoot_core.crud.actions.csv.label',\n 'route' => $csvArray['route'],\n 'parameters' => $csvArray['parameters'],\n 'icon' => 'icon-table',\n ];\n }\n\n if (method_exists($this, 'newAction')) {\n $globalActions['new'] = [\n 'label' => 'bigfoot_core.crud.actions.new.label',\n 'route' => $this->getRouteNameForAction('new'),\n 'parameters' => [],\n 'icon' => 'icon-plus-sign',\n ];\n }\n\n return $globalActions;\n }", "function getActionsByGroupId($groupId, $limit = NULL, $offset = NULL) {\n $sql = \"SELECT action_id, action_name\n FROM %s\n WHERE action_group = %d\n ORDER BY action_name ASC\";\n $sqlParams = array($this->tableActions, $groupId);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['action_id']] = $row['action_name'];\n }\n }\n return $result;\n }", "public function exportProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//output\n\t\t\t\t'{\"Export\":{\"created_timestamp\":1414143865,\"created\":\"2014-10-24 12:44:25\"},\"Languages\":[],\"Messages\":[],\"References\":[],\"Translations\":[]}',\n\t\t\t\t//headers\n\t\t\t\tarray(\n\t\t\t\t\t'Content-Disposition' => 'attachment; filename=\"localization_export_2014-10-24 12:44:25.json\"'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function getGroupExportableFields()\n\t{\n\t\tforeach($this->definitions as $id => $definition)\n\t\t{\n\t\t\tif($definition['group_export'])\n\t\t\t{\n\t\t\t\t$cexp_definition[$id] = $definition;\n\t\t\t}\n\t\t}\n\t\treturn $cexp_definition ? $cexp_definition : array();\n\t}", "public function get_bulk_actions() {\n\n\t\t\tif ( ! $this->bulk_actions_enabled ) {\n\t\t\t\t// Bulk actions disabled.\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif ( empty( $this->wpda_list_columns->get_table_primary_key() ) ) {\n\t\t\t\t// Tables has no primary key: no bulk actions allowed!\n\t\t\t\t// Primary key is neccesary to ensure uniqueness.\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\t$actions = [];\n\n\t\t\tif ( $this->allow_delete === 'on' ) {\n\t\t\t\t$actions = [\n\t\t\t\t\t'bulk-delete' => __( 'Delete Permanently', 'wp-data-access' ),\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$this->bulk_export_enabled && (\n\t\t\t\t\tWPDA::is_wpda_table( $this->table_name ) ||\n\t\t\t\t\tWPDA::get_option( WPDA::OPTION_BE_EXPORT_ROWS ) === 'on'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t$actions['bulk-export'] = __( 'Export to SQL', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-xml'] = __( 'Export to XML', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-json'] = __( 'Export to JSON', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-excel'] = __( 'Export to Excel', 'wp-data-access' );\n\t\t\t\t$actions['bulk-export-csv'] = __( 'Export to CSV', 'wp-data-access' );\n\t\t\t}\n\n\t\t\treturn $actions;\n\n\t\t}", "protected function getActions()\n {\n $actions = [];\n\n if (method_exists($this, 'editAction')) {\n $actions['edit'] = [\n 'label' => 'bigfoot_core.crud.actions.edit.label',\n 'route' => $this->getRouteNameForAction('edit'),\n 'icon' => 'edit',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'duplicateAction')) {\n $actions['duplicate'] = [\n 'label' => 'bigfoot_core.crud.actions.duplicate.label',\n 'route' => $this->getRouteNameForAction('duplicate'),\n 'icon' => 'copy',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'deleteAction')) {\n $actions['delete'] = [\n 'label' => 'bigfoot_core.crud.actions.delete.label',\n 'route' => $this->getRouteNameForAction('delete'),\n 'icon' => 'trash',\n 'color' => 'red',\n 'class' => 'confirm-action',\n 'attributes' => [\n 'data-confirm-message' => $this->getTranslator()->trans(\n 'bigfoot_core.crud.actions.delete.confirm',\n ['%entity%' => $this->getEntityLabel()]\n ),\n ],\n ];\n }\n\n return $actions;\n }", "protected function get_bulk_actions() {\n\n\t\t$actions = [];\n\n\t\tif ( current_user_can( wp_mail_smtp()->get_pro()->get_logs()->get_manage_capability() ) ) {\n\t\t\t$actions['delete'] = esc_html__( 'Delete', 'wp-mail-smtp-pro' );\n\t\t\t$actions['resend'] = esc_html__( 'Resend', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\treturn $actions;\n\t}", "public function getActionData() {\r\n\t\treturn array(\r\n\t\t\t'packageID' => $this->packageID\r\n\t\t);\r\n\t}", "public function actions()\n {\n return [\n 'index' => ['class' => 'backend\\modules\\music\\actions\\HomeAction', 'checkAccess' => [$this, 'checkAccess']],\n 'home' => ['class' => 'backend\\modules\\music\\actions\\HomeAction', 'checkAccess' => [$this, 'checkAccess']],\n 'song' => ['class' => 'backend\\modules\\music\\actions\\MusicSongAction', 'checkAccess' => [$this, 'checkAccess']],\n 'playlist' => ['class' => 'backend\\modules\\music\\actions\\MusicPlaylistAction', 'checkAccess' => [$this, 'checkAccess']],\n 'artist' => ['class' => 'backend\\modules\\music\\actions\\MusicArtistAction', 'checkAccess' => [$this, 'checkAccess']],\n 'song-download' => ['class' => 'backend\\modules\\music\\actions\\MusicSongDownloadAction', 'checkAccess' => [$this, 'checkAccess']],\n 'search' => ['class' => 'backend\\modules\\music\\actions\\SearchAction', 'checkAccess' => [$this, 'checkAccess']],\n 'feedback' => ['class' => 'backend\\modules\\music\\actions\\FeedbackAction', 'checkAccess' => [$this, 'checkAccess']],\n 'browse' => ['class' => 'backend\\modules\\music\\actions\\BrowseMusicAction', 'checkAccess' => [$this, 'checkAccess']],\n ];\n }", "function actions()\n {\n return[];\n }", "function getActionGroups($limit = NULL, $offset = NULL) {\n $sql = \"SELECT actiongroup_id, actiongroup_name\n FROM %s\n ORDER BY actiongroup_name ASC\";\n $sqlParams = array($this->tableGroups);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams, $limit, $offset)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['actiongroup_id']] = $row['actiongroup_name'];\n }\n }\n return $result;\n }", "public function export()\n {\n $exportFields = [\n 'id', 'title', 'slashtag', 'destination', 'shortUrl', \n 'status', 'createdAt', 'updatedAt', 'clicks', 'lastClickAt',\n 'favourite', 'forwardParameters'\n ];\n\n $linkArray= [];\n foreach ($exportFields as $fieldName) {\n $value = $this->$fieldName;\n if ($value) {\n $linkArray[$fieldName] = $value;\n }\n }\n\n if ($this->domain) {\n $linkArray['domain'] = $this->domain->export();\n }\n\n return $linkArray;\n }", "public function getBatchActions(): array;", "public function exportProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Language' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Language' => array(\n\t\t\t\t\t\t\t\t'Language Data'\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'Message' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Message' => array(\n\t\t\t\t\t\t\t\t'Message Data'\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'MessageReference' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'MessageReference' => array(\n\t\t\t\t\t\t\t\t'MessageReference Data'\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'Translation' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Translation' => array(\n\t\t\t\t\t\t\t\t'Translation Data'\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\t//export\n\t\t\t\tarray(\n\t\t\t\t\t'Languages' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Language Data'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'Messages' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Message Data'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'References' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'MessageReference Data'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'Translations' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'Translation Data'\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}", "private function get_bulk_actions( $export_type ) {\n\n\t\t$bulk_actions = array(\n\t\t\t'mark_exported_to_csv' => __( 'Mark exported to CSV', 'woocommerce-customer-order-csv-export' ),\n\t\t\t'mark_not_exported_to_csv' => __( 'Mark not exported to CSV', 'woocommerce-customer-order-csv-export' ),\n\t\t\t'download_to_csv' => __( 'Download to CSV', 'woocommerce-customer-order-csv-export' ),\n\t\t);\n\n\t\t// add export to CSV via [method] action\n\t\tif ( $auto_export_method = $this->get_methods_instance()->get_auto_export_method( $export_type ) ) {\n\n\t\t\t$label = $this->get_methods_instance()->get_export_method_label( $auto_export_method );\n\n\t\t\t/* translators: Placeholders: %s - via [method], full example: Export to CSV via Email */\n\t\t\t$label = sprintf( __( 'Export to CSV %s', 'woocommerce-customer-order-csv-export' ), $label );\n\n\t\t\t$bulk_actions['export_to_csv_via_auto_export_method'] = $label;\n\t\t}\n\n\t\treturn $bulk_actions;\n\t}", "public static function returnActions() {\n return array(\n 'view' => 'Просмотр',\n 'moderate' => 'Доступ к модерированию',\n 'clear' => 'Полная очистка БД',\n );\n }", "public function alm_filters_export(){\n\n \tif( isset( $_POST[\"alm_filters_export\"] ) ) {\n\n $filename = 'alm-filters';\n \tif(!empty($_POST['filter_keys'])){\n \t$export_array = array();\n foreach($_POST['filter_keys'] as $name){\n $option = get_option($name);\n $export_array[] = unserialize($option);\n $filename .= '['. ALMFilters::alm_filters_replace_string($name) .']';\n }\n\n\t \t$filename = $filename .= '.json';\n\t \t\theader( \"Content-Description: File Transfer\" );\n\t \t\theader( \"Content-Disposition: attachment; filename={$filename}\" );\n\t \t\theader( \"Content-Type: application/json; charset=utf-8\" );\n\n\t \t\t// return\n\t \t\techo json_encode($export_array, JSON_PRETTY_PRINT);\n\n\t \t\tdie();\n\n \t\t} else {\n\n \t$this->alm_filters_add_admin_notice(__('No filter groups selected', 'ajax-load-more-filters'), 'error');\n\n \t\t}\n }\n \t}", "public static function bulkActions() {\n return [\n static::BULK_ACTION_SETREAD => ['title' => \\Yii::t('app', 'خوانده شده')],\n static::BULK_ACTION_SETNOTREAD => ['title' => \\Yii::t('app', 'خوانده نشده')],\n static::BULK_ACTION_DELETE => ['title' => \\Yii::t('app', 'حذف')],\n ];\n }", "public function actions()\n {\n return [\n 'grid-sort' => [\n 'class' => SortableGridAction::className(),\n 'modelName' => $this->modelClass,\n ],\n ];\n }", "public function get_actions(): array;", "public function actions()\n {\n return [\n 'subscribe' => [\n 'class' => 'backend\\modules\\subscribe\\actions\\SubscribeAction',\n 'checkAccess' => [$this, 'checkAccess']\n ],\n \n 'check_subscribe' => [\n 'class' => 'backend\\modules\\subscribe\\actions\\CheckSubscribeAction',\n 'checkAccess' => [$this, 'checkAccess']\n ],\n \n ];\n }", "public function getActions(): array;", "function master_xml_export()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$entry = array();\n\n\t\t//-----------------------------------------\n\t\t// Get XML class\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\t$xml->doc_type = $this->ipsclass->vars['gb_char_set'];\n\n\t\t$xml->xml_set_root( 'export', array( 'exported' => time() ) );\n\n\t\t//-----------------------------------------\n\t\t// Set group\n\t\t//-----------------------------------------\n\n\t\t$xml->xml_add_group( 'group' );\n\n\t\t//-----------------------------------------\n\t\t// Get templates...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'groups',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'g_id ASC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( 0, 6 ) ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$content = array();\n\n\t\t\t$r['g_icon'] = '';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Sort the fields...\n\t\t\t//-----------------------------------------\n\n\t\t\tforeach( $r as $k => $v )\n\t\t\t{\n\t\t\t\t$content[] = $xml->xml_build_simple_tag( $k, $v );\n\t\t\t}\n\n\t\t\t$entry[] = $xml->xml_build_entry( 'row', $content );\n\t\t}\n\n\t\t$xml->xml_add_entry_to_group( 'group', $entry );\n\n\t\t$xml->xml_format_document();\n\n\t\t$doc = $xml->xml_document;\n\n\t\t//-----------------------------------------\n\t\t// Print to browser\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->show_download( $doc, 'groups.xml', '', 0 );\n\t}", "public function actions(): array;", "function acf_prepare_field_group_for_export($field_group = array())\n{\n}", "public function getBatchActions()\n {\n //$actions = parent::getBatchActions();\n\n\n $actions['check']= array('label' => $this->trans('action_check', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n $actions['visible']= array('label' => $this->trans('action_visible', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n\n return $actions;\n }", "public function getBatchActions()\n {\n //$actions = parent::getBatchActions();\n\n\n $actions['check']= array('label' => $this->trans('action_check', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n $actions['visible']= array('label' => $this->trans('action_visible', array(), 'SonataAdminBundle'),\n 'ask_confirmation' => true);\n\n return $actions;\n }", "protected function bulkActions(): array\n {\n return [\n 'bulk-delete' => __('Delete')\n ];\n }", "public function actionExport()\n {\n // export data to excel file\n return $this->render('export');\n }", "function get_bulk_actions() {\n\t\t$actions = array(\n\t\t\t\t\t\t\t'delete' => __('Delete', 'blog-designer-pack')\n\t\t\t\t\t\t);\n\t\treturn apply_filters('bdpp_style_bulk_act', $actions);\n\t}", "public function exportAction()\r\n {\r\n $this->_setParam('outputformat', 'csv');\r\n $this->indexAction(); \r\n }", "public function getBatchActions()\n {\n $actions = parent::getBatchActions();\n\n // PS : https://sonata-project.org/bundles/admin/2-0/doc/reference/batch_actions.html\n\n // check user permissions\n if($this->isGranted('EDIT') && $this->isGranted('DELETE')){\n $originalActions = $actions; // on copie les actions et les réinitialise pour mettre les actiosn 'valider' & 'dévalider' en premier\n $actions = array(); // on réinitilaise le tableau\n $actions['valider']=array(\n 'label' => 'Valider',\n 'ask_confirmation' => true // If true, a confirmation will be asked before performing the action\n );\n\n $actions['devalider']=array(\n 'label' => 'Dévalider',\n 'ask_confirmation' => true // If true, a confirmation will be asked before performing the action\n );\n\n $actions = array_merge($actions, $originalActions);\n }\n\n return $actions;\n }", "function bigbluebuttonbn_get_view_actions() {\n return array('view', 'view all');\n}", "protected function get_bulk_actions() {\n\t\t// We don't want bulk actions, we have our own UI\n\t\treturn array();\n\t}", "public function getDashboardGroups(): array;", "public function get_bulk_actions() {\n\t\t $actions = [\n\t\t \t'bulk-delete' => 'Delete',\n\t\t ];\n\n\t\t //return $actions;\n\t}", "public static function returnActions() {\n ##return array();\n }", "function getGroupButtons($intGroupKey,$intGroups) {\n if ($intGroups>1) {\n if($intGroupKey==1) {\n $arrOutput[] = $this->groupButton('row_turndown',$intGroupKey);\n } else {\n $arrOutput[] = $this->groupButton('row_up',$intGroupKey);\n }\n }\n $arrOutput[] = $this->groupButton('row_remove',$intGroupKey);\n if ($intGroups>1) {\n if($intGroupKey==$intGroups) {\n $arrOutput[] = $this->groupButton('row_turnup',$intGroupKey);\n } else {\n $arrOutput[] = $this->groupButton('row_down',$intGroupKey);\n }\n }\n return $arrOutput;\n }", "public function actions()\r\n {\r\n return array(\r\n 'index' => array(\r\n 'class' => \\nizsheanez\\jsonRpc\\Action::class,\r\n ),\r\n );\r\n }", "public static function getActions() {\n $user = JFactory::getUser();\n $result = new JObject;\n\n $assetName = 'com_keymanager';\n\n $actions = array(\n 'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'\n );\n\n foreach ($actions as $action) {\n $result->set($action, $user->authorise($action, $assetName));\n }\n\n return $result;\n }", "protected function renderActionList() {}", "public function getExportFields(): array;", "function get_bulk_actions( ) {\r\n\t\t$actions = array();\r\n\r\n\t\tif ( $this->is_trash ) {\r\n\t\t\t$actions['restore'] = __( 'Restore', 'media-library-assistant' );\r\n\t\t\t$actions['delete'] = __( 'Delete Permanently', 'media-library-assistant' );\r\n\t\t} else {\r\n\t\t\t$actions['edit'] = __( 'Edit', 'media-library-assistant' );\r\n\r\n\t\t\tif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {\r\n\t\t\t\t$actions['trash'] = __( 'Move to Trash', 'media-library-assistant' );\r\n\t\t\t} else {\r\n\t\t\t\t$actions['delete'] = __( 'Delete Permanently', 'media-library-assistant' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_bulk_actions', $actions );\r\n\t}", "public function getActions() {\n\n\t}", "public function ppb_register_csv_export_bulk_actions($bulk_actions) {\n\t\t$bulk_actions['ppb_generate_activity_export'] = __( 'Export All Activity CSV', RED_PPB__TEXTDOMAIN );\n\t\t$bulk_actions['ppb_generate_selected_activity_export'] = __( 'Export Selected Activity CSV', RED_PPB__TEXTDOMAIN );\n\t\treturn $bulk_actions;\n\t}", "public function get_bulk_actions() {\n\t\t$actions = [\n\t\t\t'redirect' => esc_html__( 'Redirect', 'rank-math' ),\n\t\t\t'delete' => esc_html__( 'Delete', 'rank-math' ),\n\t\t];\n\n\t\tif ( ! Helper::get_module( 'redirections' ) ) {\n\t\t\tunset( $actions['redirect'] );\n\t\t}\n\n\t\treturn $actions;\n\t}", "public function getBatchActions()\n {\n return array();\n }", "protected function getActions() {}", "public static function returnActions() {\n return array();\n }", "public static function getActions() {\n $user = JFactory::getUser();\n $result = new JObject;\n\n $assetName = 'com_labgeneagrogene';\n\n $actions = array(\n 'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'\n );\n\n foreach ($actions as $action) {\n $result->set($action, $user->authorise($action, $assetName));\n }\n\n return $result;\n }", "public function action()\n {\n if (!$this->action) {\n $this->action = array();\n foreach (monsterToAction::where('mid', '=', $this->id)->get() as $a) {\n $this->action[] = array(\n 'name' => $a->name,\n 'desc' => $a->description,\n 'dc' => array(\n 'attr' => $a->dc,\n 'beat' => $a->dcv,\n 'success' => $a->dc_success,\n ),\n 'damage' => array(\n 'type' => $a->damage_type,\n 'damage' => $a->damage,\n 'roll_bonus' => $a->bonus,\n ),\n 'legendery_action' => ($a->legendery) ? TRUE : FALSE,\n );\n }\n }\n return $this->action;\n }", "public function export(): array {\n $defaultPort = $this->crypto ? 443 : 80;\n\n if (isset($this->interfaces)) {\n $interfaces = array_unique($this->interfaces, SORT_REGULAR);\n } else {\n $interfaces = [[\"::\", $defaultPort]];\n if (self::separateIPv4Binding()) {\n $interfaces[] = [\"0.0.0.0\", $defaultPort];\n }\n }\n\n return [\n \"interfaces\" => $interfaces,\n \"name\" => $this->name,\n \"crypto\" => $this->crypto,\n \"actions\" => $this->actions,\n \"httpdriver\" => $this->httpDriver,\n ];\n }", "public function export()\n\t{\n\t\treturn $this->props->export();\n\t}", "public function getFrontEndActions();", "function _export()\n\t{\n\t\t$title=get_page_title('EXPORT');\n\n\t\tif (!array_key_exists('tables',$_POST)) warn_exit(do_lang_tempcode('IMPROPERLY_FILLED_IN'));\n\n\t\t$xml=export_to_xml($_POST['tables'],post_param_integer('comcode_xml',0)==1);\n\n\t\tbreadcrumb_set_self(do_lang_tempcode('_RESULTS'));\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('XML_DATA_MANAGEMENT'))));\n\n\t\treturn do_template('XML_STORAGE_EXPORT_RESULTS_SCREEN',array('TITLE'=>$title,'XML'=>$xml));\n\t}", "function get_bulk_actions()\n {\n $actions = array(\n 'delete_selected' => 'Delete Selected',\n );\n return $actions;\n }", "public function toArray(ExportInterface $export);", "public function getActions();", "public function getActions();", "public function actions()\n {\n return array(\n 'all' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\AllAction'],\n 'accept' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\AcceptAction'],\n 'decline' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\DeclineAction'],\n 'history' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\HistoryAction'],\n 'control' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\ControlAction'],\n 'close' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\CloseAction'],\n 'bet' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\RatesAction'],\n 'refund' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\RefundAction'],\n 'trash' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\TrashAction'],\n 'info' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\InfoAction'],\n 'ratio' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\RatioAction'],\n 'date' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\DateAction'],\n 'resolve' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\ResolveAction'],\n 'deleteRatio' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\DeleteRatioAction'],\n 'all-betting' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\AllBettingAction'],\n 'calc-betting' => ['class' => 'frontend\\modules\\admin\\controllers\\actions\\event\\CalcBettingAction'],\n );\n }", "public function get_export_button() {\n\n\t\t$this->output_export_button();\n\t}", "public function get_export_button() {\n\n\t\t$this->output_export_button();\n\t}", "function get_actions_data() {\n\t\t$actions_data = $this->get_meta( 'actions' );\n\t\treturn is_array( $actions_data ) ? array_map( [ $this, 'format_action_fields' ], $actions_data ) : [];\n\t}", "protected static function getActions()\n {\n return [\n CrudController::ACTION_ADD => 'created',\n CrudController::ACTION_DELETE => 'removed',\n CrudController::ACTION_DETAILS => 'displayed',\n CrudController::ACTION_EDIT => 'updated',\n CrudController::ACTION_HIDE => 'hidden',\n CrudController::ACTION_VIEW => 'displayed',\n CrudController::ACTION_UNHIDE => 'made visible',\n CrudController::ACTION_ENABLE => 'enabled',\n CrudController::ACTION_DISABLE => 'disabled',\n ];\n }", "function get_export_choices() {\n $export = [];\n\n $settings = FWP()->helper->settings;\n\n foreach ( $settings['facets'] as $facet ) {\n $export['facet-' . $facet['name']] = 'Facet - ' . $facet['label'];\n }\n\n foreach ( $settings['templates'] as $template ) {\n $export['template-' . $template['name']] = 'Template - '. $template['label'];\n }\n\n return $export;\n }", "public function getGroupSequence()\n {\n $groups = ['Message'];\n $groups[] = $this->action;\n\n return $groups;\n }", "public function index()\n {\n return Group::all()->toArray();\n }", "public function actions(): array\n {\n /**\n * @var string\n */\n $cmd = request('cmd', '');\n\n return [\n // new Actions\\FullcalendarAction(),\n // new Actions\\TestAction(),\n new ArtisanAction($cmd),\n ];\n }", "public function exportedAssets(): array\n {\n $exported = [];\n\n foreach ($this->tagsByType('ExportAssets') as $export) {\n $characterId = $export->tags->item;\n\n foreach ($export->names->item as $name) {\n $exported[(string) $name] = (int) $characterId;\n }\n }\n\n return $exported;\n }", "public function getExportFormats(): array;", "public function export(Request $request) {\n try {\n $list = AssortmentGroup\n ::leftJoin('assortment_groups as assortment_main', 'assortment_groups.main_group', '=', 'assortment_main.id')\n ->groupBy('assortment_groups.id')\n ->selectRaw('assortment_groups.*, assortment_main.name as main_group_name')\n ->get();\n\n return response()->json([\n 'code' => SUCCESS_CODE,\n 'message' => SUCCESS_MESSAGE,\n 'data' => $list\n ]);\n } catch (Exception $e) {\n return response()->json([\n 'code' => SERVER_ERROR_CODE,\n 'message' => SERVER_ERROR_MESSAGE\n ]);\n }\n }", "public function getRightActions(){\n return [\n /** EDIT IN CP **/\n [\n 'title' => $this->app->lang->translate('admin_bar_edit_in_cp'),\n 'link' => $this->app->urlFor('cp.listings_edit', ['id' => $this->listing->getId(), 'set_domain'=>true]),\n 'class' => 'btn btn-default btn-edit',\n 'target' => '_blank'\n ]\n ];\n }", "function get_bulk_actions() {\n\t\t//bulk action combo box parameter\n\t\t//if you want to add some more value to bulk action parameter then push key value set in below array\n\t\t$actions = array();\n\t\treturn $actions;\n }", "public function getExportModes() {\n\t\t\treturn array(\n\t\t\t\t'getUnformatted' =>\tExportableField::UNFORMATTED,\n\t\t\t\t'getPostdata' =>\tExportableField::POSTDATA\n\t\t\t);\n\t\t}", "public function get_bulk_actions() {\n\t\t$actions = array(\n\t\t\t'trash' => __( 'Move to Trash', 'wdaf' ),\n\t\t);\n\n\t\treturn $actions;\n\t}", "function actions() {\n return array(\n 'block' => array(\n 'class' => 'application.modules.admin.components.actions.BlockAction',\n 'modelClass' => 'Page',\n 'message_block' => Yii::t('infoMessages', 'Контент разблокирован!'),\n 'errorMessage_block' => Yii::t('infoMessages', 'Произошла ошибка при разблокировании контента!'),\n 'message_unBlock' => Yii::t('infoMessages', 'Контент заблокирован!'),\n 'errorMessage_unBlock' => Yii::t('infoMessages', 'Произошла ошибка при блокировании контента!'),\n ),\n 'markAsDeleted' => array(\n 'class' => 'application.modules.admin.components.actions.MarkAsDeletedAction',\n 'modelClass' => 'Pages',\n 'message_mark' => Yii::t('infoMessages', 'Страница удалена!'),\n 'errorMessage_mark' => Yii::t('infoMessages', 'Произошла ошибка при удалении страницы!'),\n )\n );\n }", "public function createExport();", "public function export() {\n\t\t$data = array();\n\t\tforeach ($this->store as $key => $value) {\n\t\t\tif ($value instanceof ELSWAK_Object) {\n\t\t\t\t$data[$key] = $value->_export();\n\t\t\t} elseif ($value instanceof ELSWAK_Array) {\n\t\t\t\t$data[$key] = $value->export();\n\t\t\t} else {\n\t\t\t\t$data[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "function tab_get_view_actions() {\n return array('view', 'view all');\n}", "public function action()\n {\n return $this->_actions;\n }", "function get_bulk_actions() {\n $actions = array(\n // 'update' \t=> __( 'Update details from Amazon', 'wp-lister-for-amazon' ), // TODO\n // 'reapply' => __( 'Re-apply profile', 'wp-lister-for-amazon' ),\n // 'end_item' => __( 'Pause listings', 'wp-lister-for-amazon' ),\n 'wpla_get_compet_price' => __( 'Fetch latest prices from Amazon', 'wp-lister-for-amazon' ),\n 'wpla_resubmit' => __( 'Resubmit items', 'wp-lister-for-amazon' ),\n 'wpla_change_profile' => __( 'Change profile', 'wp-lister-for-amazon' ),\n 'wpla_trash_listing' => __( 'Remove from Amazon', 'wp-lister-for-amazon' ),\n 'wpla_delete' => __( 'Delete from database', 'wp-lister-for-amazon' ),\n 'wpla_get_lowest_offers' => __( 'Get lowest offer listings', 'wp-lister-for-amazon' ) . ' (beta)',\n 'wpla_fetch_pdescription' => __( 'Fetch full description', 'wp-lister-for-amazon' ) . ' (beta)',\n );\n return $actions;\n }", "public static function getActions()\n\t{\n\t\t$user = Factory::getUser();\n\t\t$result = new JObject;\n\n\t\t$assetName = 'com_dnabold';\n\n\t\t$actions = array(\n\t\t\t'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'\n\t\t);\n\n\t\tforeach ($actions as $action)\n\t\t{\n\t\t\t$result->set($action, $user->authorise($action, $assetName));\n\t\t}\n\n\t\treturn $result;\n\t}", "function get_bulk_actions()\n {\n $actions = array(\n\n 'delete' => 'Delete',\n );\n return $actions;\n }", "public function export_actions() {\n\t\t\tglobal $post_type;\n\t\t\t\n\t\t\tif ( WPO_WCPDF_Dropbox()->api->is_enabled() !== false && 'shop_order' == $post_type ) {\n\t\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\tjQuery('<option>').val('dropbox_export_invoices').text('<?php _e( 'PDF Invoices to Dropbox', 'wpo_wcpdf_pro' )?>').appendTo(\"select[name='action']\");\n\t\t\t\t\tjQuery('<option>').val('dropbox_export_invoices').text('<?php _e( 'PDF Invoices to Dropbox', 'wpo_wcpdf_pro' )?>').appendTo(\"select[name='action2']\");\n\t\t\t\t\tjQuery('<option>').val('dropbox_export_packing_slips').text('<?php _e( 'PDF Packing Slips to Dropbox', 'wpo_wcpdf_pro' )?>').appendTo(\"select[name='action']\");\n\t\t\t\t\tjQuery('<option>').val('dropbox_export_packing_slips').text('<?php _e( 'PDF Packing Slips to Dropbox', 'wpo_wcpdf_pro' )?>').appendTo(\"select[name='action2']\");\n\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}", "public function run()\n {\n $customerPermission = [\n 'name' => 'Export Customers',\n 'slug' => 'export_customers',\n ];\n\n $this->permission->create($customerPermission, false);\n $godownsPermission = [\n 'name' => 'Export Godowns',\n 'slug' => 'export_godowns',\n ];\n\n $this->permission->create($godownsPermission, false);\n $weightsPermission = [\n 'name' => 'Export Weights',\n 'slug' => 'export_weights',\n ];\n\n $this->permission->create($weightsPermission, false);\n\n $unitsPermission = [\n 'name' => 'Export Units',\n 'slug' => 'export_units',\n ];\n\n $this->permission->create($unitsPermission, false);\n $technicalsPermission = [\n 'name' => 'Export Technicals',\n 'slug' => 'export_technicals',\n ];\n\n $this->permission->create($technicalsPermission, false);\n\n $productsPermission = [\n 'name' => 'export Products',\n 'slug' => 'export_products',\n ];\n $this->permission->create($productsPermission, false);\n $sectionsPermission = [\n 'name' => 'Export Sections',\n 'slug' => 'export_sections',\n ];\n\n $this->permission->create($sectionsPermission, false);\n $categoriesPermission = [\n 'name' => 'Export Categories',\n 'slug' => 'export_categories',\n ];\n\n $this->permission->create($categoriesPermission, false);\n }", "private function export() {\n\t\t// export is in PipelineExportContoller\n\t}", "public function get_bulk_actions() {\n\n\t\t\t$actions = [\n\n\t\t\t\t'bulk-delete' => 'Delete'\n\n\t\t\t];\n\n\n\n\t\t\treturn $actions;\n\n\t\t}", "function customcert_get_view_actions() {\n return array('view', 'view all', 'view report');\n}", "function customcert_get_view_actions() {\n return array('view', 'view all', 'view report');\n}", "public function getActionLists()\n {\n return $this->action_lists;\n }", "function get_bulk_actions()\n {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lsDefAssociationGroupings = $em->getRepository('CftfBundle:LsDefAssociationGrouping')->findAll();\n\n return [\n 'lsDefAssociationGroupings' => $lsDefAssociationGroupings,\n ];\n }", "public function getActions(): array\n {\n return $this->actions;\n }", "public function getShowGroups(): array;", "public function exportAction()\n {\n $helpers = $this->get(\"app.helpers\");\n $em = $this->getDoctrine()->getManager();\n\n $comparendos = $em->getRepository('JHWEBContravencionalBundle:CvCdoComparendo')->findAll();\n \n $response = array(\n 'status' => 'success',\n 'code' => 200,\n 'message' => \"lista de comparendos\",\n 'data' => $comparendos,\n );\n return $helpers->json($response);\n }" ]
[ "0.64288974", "0.6256333", "0.60034233", "0.5817994", "0.5810293", "0.5797827", "0.57573223", "0.5743704", "0.57402873", "0.5727694", "0.565833", "0.5654961", "0.56274325", "0.562369", "0.56142485", "0.56063426", "0.5563493", "0.5540996", "0.55381507", "0.5538053", "0.5535479", "0.551802", "0.55143416", "0.5507971", "0.55068153", "0.5504307", "0.5499764", "0.5449971", "0.5434213", "0.538841", "0.5385695", "0.5385695", "0.53773004", "0.53762484", "0.537523", "0.53676134", "0.5367467", "0.536028", "0.5354462", "0.53453827", "0.5336035", "0.53188515", "0.5307232", "0.5289701", "0.5289065", "0.52742475", "0.5271477", "0.5265719", "0.52657163", "0.52653635", "0.5263325", "0.5261896", "0.52598387", "0.5257203", "0.5255273", "0.52548915", "0.52532285", "0.5248303", "0.52429694", "0.5240739", "0.5237364", "0.523694", "0.5230257", "0.5230257", "0.52139837", "0.52136767", "0.52136767", "0.52049184", "0.52037674", "0.51950026", "0.51931894", "0.51924855", "0.5188", "0.5185898", "0.5183345", "0.51821446", "0.51732093", "0.51726955", "0.51689667", "0.51682925", "0.5166884", "0.5163863", "0.51594967", "0.5155008", "0.51548064", "0.51484936", "0.5144415", "0.5141433", "0.5139779", "0.5136948", "0.5136637", "0.5127858", "0.5125278", "0.5125278", "0.5118921", "0.5117473", "0.51160127", "0.5115008", "0.51090914", "0.51068723" ]
0.82140887
0
Returns render array for group tree.
protected function getGroupTreeRender(GroupInterface $group) { $plugin_block = $this->blockManager->createInstance('living_spaces_group_tree_block', [ 'id' => 'living_spaces_group_tree_block', 'context_mapping' => [ 'group' => '@group.group_route_context:group', ], ]); if ($plugin_block instanceof ContextAwarePluginInterface) { $contexts = $this->contextRepository->getRuntimeContexts($plugin_block->getContextMapping()); $this->contextHandler->applyContextMapping($plugin_block, $contexts); } return $plugin_block->build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function format()\n {\n $result = array();\n\n foreach ($this->groups as $group) {\n $result[] = array(\n 'id' => $group->getInternalId(),\n 'external_id' => $group->getExternalId(),\n 'value' => $group->getName(),\n 'label' => $group->getName(),\n );\n }\n\n return $result;\n }", "function pi_authoring_render_group_tree($group_list, &$group_data)\n{\n\t$rows_to_return = array();\n\t// Check everything in the list and return either the name or the \n\t// expanded sub-list (if it's an array) \n\tforeach($group_list as $group_id => $group_items) \n\t{\n\t\t$item_name = theme('pi_group_title', l($group_data[$group_id]['title'], 'node/' . $group_id . '/edit', array('query' => drupal_get_destination()) ), $group_data[$group_id]['group_type']);\t\t\n\t\tif(is_array($group_items))\n\t\t{\n\t\t\t//pi_debug_message(\"expanding $group_id :\" . count($group_items));\n\t\t\t$expanded_group_list = pi_authoring_render_group_tree($group_items, $group_data);\n\t\t\t$rows_to_return[] = theme('item_list', $expanded_group_list, $item_name);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//pi_debug_message(\"not expanding $group_id :\" . $item_name);\n\t\t\t$rows_to_return[] = $item_name;\n\t\t}\n\t}\n\treturn $rows_to_return;\n}", "private function tree_getRendered()\n {\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n\n $arr_result = array();\n\n static $firstCallDrsTreeview = true;\n\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS filter configuration\n //$conf_name = $this->conf_view['filter.'][$table . '.'][$field];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n\n\n // Add first item\n // SWITCH display first item\n switch ( $conf_array[ 'first_item' ] )\n {\n case( true ):\n // Set hits\n $hitsField = $this->sql_filterFields[ $this->curr_tableField ][ 'hits' ];\n $sum_hits = ( int ) $this->hits_sum[ $this->curr_tableField ];\n $this->pObj->cObj->data[ $hitsField ] = $sum_hits;\n // Set hits\n // Render uid and value of the first item\n $first_item_uid = $conf_array[ 'first_item.' ][ 'option_value' ];\n $tsValue = $conf_array[ 'first_item.' ][ 'cObject' ];\n $tsConf = $conf_array[ 'first_item.' ][ 'cObject.' ];\n $first_item_value = $this->pObj->cObj->cObjGetSingle( $tsValue, $tsConf );\n // Render uid and value of the first item\n $tmpOneDim = array( 'uid' => $first_item_uid ) +\n array( 'value' => $first_item_value );\n if ( !empty( $this->tmpOneDim ) )\n {\n $tmpOneDim = $tmpOneDim +\n $this->tmpOneDim;\n }\n // Render uid and value of the first item\n break;\n case( false ):\n default:\n $tmpOneDim = $this->tmpOneDim;\n break;\n }\n // SWITCH display first item\n // Add first item\n // Move one dimensional array to an iterator\n $tmpArray = $this->pObj->objTyposcript->oneDim_to_tree( $tmpOneDim );\n $rcrsArrIter = new RecursiveArrayIterator( $tmpArray );\n $iterator = new RecursiveIteratorIterator( $rcrsArrIter );\n // Move one dimensional array to an iterator\n // HTML id\n $cObj_name = $conf_array[ 'treeview.' ][ 'html_id' ];\n $cObj_conf = $conf_array[ 'treeview.' ][ 'html_id.' ];\n $html_id = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n // HTML id\n //////////////////////////////////////////////////////\n //\n // Loop values\n // Initial depth\n // SWITCH display first item\n switch ( $conf_array[ 'first_item' ] )\n {\n case( true ):\n $last_depth = -1;\n break;\n case( false ):\n default:\n $last_depth = 0;\n break;\n }\n // SWITCH display first item\n // Initial depth\n // LOOP\n $bool_firstLoop = true;\n $loops = 0;\n foreach ( $iterator as $key => $value )\n {\n // CONTINUE $key is the uid. Save the uid.\n if ( $key == 'uid' )\n {\n $curr_uid = $value;\n continue;\n }\n // CONTINUE $key is the uid. Save the uid.\n\n if ( $bool_firstLoop )\n {\n $first_item_uid = $curr_uid;\n }\n\n\n // CONTINUE ERROR $key isn't value\n if ( $key != 'value' )\n {\n echo 'ERROR: key != value.' . PHP_EOL . __METHOD__ . ' (Line: ' . __LINE__ . ')' . PHP_EOL;\n continue;\n }\n // CONTINUE ERROR $key isn't value\n // Render the value\n//$this->pObj->dev_var_dump( $value )\n $item = $this->get_filterItem( $curr_uid, $value );\n //$item = '<a href=\"leglis-bid/?tx_browser_pi1%5Btx_leglisbasis_sector.brc_text%5D=1657&cHash=579a339049d1ca24815eadf0cd53371d\">\n // Baugewerbe (132)\n // </a>';\n//$this->pObj->dev_var_dump( $item );\n // CONTINUE: item is empty\n if ( empty( $item ) )\n {\n // DRS\n if ( $firstCallDrsTreeview && ( $this->pObj->b_drs_filter || $this->pObj->b_drs_cObjData ) )\n {\n $prompt = 'No value: [' . $key . '] won\\'t displayed! Be aware: this log won\\'t displayed never again.';\n t3lib_div :: devlog( '[WARN/FILTER] ' . $prompt, $this->pObj->extKey, 2 );\n $prompt = 'Maybe TS configuration for [' . $key . '] is: display it only with a hit at least.';\n t3lib_div :: devlog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n $prompt = 'There is a workaround: please take a look in the manual for ' . $this->pObj->prefixId . '.flag_treeview.';\n t3lib_div :: devlog( '[HELP/FILTER] ' . $prompt, $this->pObj->extKey, 1 );\n $firstCallDrsTreeview = false;\n }\n // DRS\n continue;\n }\n // CONTINUE: item is empty\n\n $loops++;\n\n // Vars\n $curr_depth = $iterator->getDepth();\n $indent = str_repeat( ' ', ( $iterator->getDepth() + 1 ) );\n // Vars\n // Render the start tag\n switch ( true )\n {\n case( $curr_depth > $last_depth ):\n // Start of sublevel\n $delta_depth = $curr_depth - $last_depth;\n $startTag = PHP_EOL .\n str_repeat\n (\n $this->htmlSpaceLeft . $indent . '<ul id=\"' . $html_id . '_ul_' . $curr_uid . '\">' . PHP_EOL .\n $this->htmlSpaceLeft . $indent . ' <li id=\"' . $html_id . '_li_' . $curr_uid . '\">', $delta_depth\n );\n $last_depth = $curr_depth;\n break;\n // Start of sublevel\n case( $curr_depth < $last_depth ):\n // Stop of sublevel\n $delta_depth = $last_depth - $curr_depth;\n $startTag = '</li>' . PHP_EOL .\n str_repeat\n (\n $this->htmlSpaceLeft . $indent . ' </ul>' . PHP_EOL .\n $this->htmlSpaceLeft . $indent . '</li>', $delta_depth\n ) .\n PHP_EOL .\n $this->htmlSpaceLeft . $indent . '<li id=\"' . $html_id . '_li_' . $curr_uid . '\">';\n $last_depth = $curr_depth;\n break;\n // Stop of sublevel\n default:\n $startTag = '</li>' . PHP_EOL .\n $this->htmlSpaceLeft . $indent . '<li id=\"' . $html_id . '_li_' . $curr_uid . '\">';\n break;\n }\n // Render the start tag\n // Result array\n $arr_result[ $curr_uid ] = $startTag . $item;\n\n $bool_firstLoop = false;\n }\n // LOOP\n // Loop values\n // Render the end tag of the last item\n $endTag = '</li>' .\n str_repeat\n (\n '</ul>' . PHP_EOL .\n $this->htmlSpaceLeft . $indent . '</li>', $curr_depth\n ) .\n PHP_EOL .\n $this->htmlSpaceLeft . $indent . '</ul>';\n $arr_result[ $curr_uid ] = $arr_result[ $curr_uid ] . $endTag . PHP_EOL .\n $this->htmlSpaceLeft . '</div>';\n // Render the end tag of the last item\n\n $arr_result[ $first_item_uid ] = $this->htmlSpaceLeft . '<div id=\"' . $html_id . '\">' . $arr_result[ $first_item_uid ];\n\n $this->pObj->timeTracking_log( $debugTrailLevel, 'end' );\n\n // RETURN the result\n return $arr_result;\n }", "protected function renderArray() {}", "public function getGroups(): array;", "public function render(): array\n {\n return [\n 'left' => $this->left,\n 'right' => $this->right,\n 'title' => $this->title,\n ];\n }", "public function render()\n {\n\n parent::render();\n\n return \"usergroup_list.tpl\";\n }", "public function groupList(){\n\t\techo json_encode($this->read_database->get_groups());\n\t}", "public static function groupList()\r\n\t{\r\n\t\t$arrayData = array();\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$criteria->order = 'level DESC';\r\n\t\t$criteria->compare('level <',Yii::app()->user->level -1,false);\r\n\t\t$result = self::model()->findAll($criteria);\r\n\t\tforeach ($result as $r) {\r\n\t\t\t$arrayData[$r->id] = $r->groupname;\r\n\t\t}\r\n\t\treturn $arrayData;\r\n\t}", "public function provider_render() {\n return array(\n array(\n array(\n \n ),\n ),\n );\n }", "private function getMenuArrayRender()\n {\n $this->load->model('Menu_Model', \"menuModel\");\n $this->menuModel->setControllerName($this->_controllerName);\n return $this->menuModel->getMenuArray();\n }", "public function getShowGroups(): array;", "public function generateTreeHtml()\n {\n $htmlWriter = new Writer();\n\n return $htmlWriter->render( $this->mapRedisSchema(), $this->getNamespaceSeparator() );\n }", "public function getDataTree() {\n $array = [\n 'id' => $this->id,\n 'name' => $this->name,\n 'type' => $this->type,\n 'data' => ['href' => route('sensors.edit', $this->id)],\n 'children' => []\n ];\n\n foreach( $this->children as $child ) {\n $array['children'][] = $child->getDataTree();\n }\n\n return $array;\n }", "public function render()\n {\n return $this->renderChildren();\n }", "public function getGroupsList(){\n return $this->_get(4);\n }", "public function getGroupsList(){\n return $this->_get(4);\n }", "public function actionGroup() {\r\n $out = [];\r\n if (isset($_POST['depdrop_parents'])) {\r\n $parents = $_POST['depdrop_parents'];\r\n if ($parents != null) {\r\n $id = $parents[0];\r\n $model = ProductGroup::find()->asArray()->where(['STORE_ID'=>$id,'STATUS'=>'1'])->all();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n \r\n foreach ($model as $key => $value) {\r\n $out[] = ['id'=>$value['GROUP_ID'],'name'=> $value['GROUP_NM']];\r\n } \r\n echo json_encode(['output'=>$out, 'selected'=>'']);\r\n return;\r\n }\r\n }\r\n echo Json::encode(['output'=>'', 'selected'=>'']);\r\n }", "public function getGroupsList(){\n return $this->_get(3);\n }", "public static function getGroups(): array\n {\n return [\"group2\"];\n }", "public function renderTree()\n {\n $structure = $this->_module->treeStructure + $this->_module->dataStructure;\n extract($structure);\n $nodeDepth = $currDepth = $counter = 0;\n $jsSelect = '$('.$this->id.').treeview(\"collapseAll\");';\n $out = Html::beginTag('ul', ['class' => 'kv-tree']) . \"\\n\";\n foreach ($this->_nodes as $node) {\n /**\n * @var Tree $node\n */\n if (!$this->isAdmin && !$node->isVisible() || !$this->showInactive && !$node->isActive()) {\n continue;\n }\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeDepth = $node->$depthAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeLeft = $node->$leftAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeRight = $node->$rightAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeKey = $node->$keyAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeName = $node->$nameAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIcon = $node->$iconAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIconType = $node->$iconTypeAttribute;\n\n $isChild = ($nodeRight == $nodeLeft + 1);\n $indicators = '';\n\n if (isset($this->nodeLabel)) {\n $label = $this->nodeLabel;\n $nodeName = is_callable($label) ? $label($node) :\n (is_array($label) ? ArrayHelper::getValue($label, $nodeKey, $nodeName) : $nodeName);\n }\n if ($nodeDepth == $currDepth) {\n if ($counter > 0) {\n $out .= \"</li>\\n\";\n }\n } elseif ($nodeDepth > $currDepth) {\n $out .= Html::beginTag('ul') . \"\\n\";\n $currDepth = $currDepth + ($nodeDepth - $currDepth);\n } elseif ($nodeDepth < $currDepth) {\n $out .= str_repeat(\"</li>\\n</ul>\", $currDepth - $nodeDepth) . \"</li>\\n\";\n $currDepth = $currDepth - ($currDepth - $nodeDepth);\n }\n if (trim($indicators) == null) {\n $indicators = '&nbsp;';\n }\n $nodeOptions = [\n 'data-key' => $nodeKey,\n 'data-lft' => $nodeLeft,\n 'data-rgt' => $nodeRight,\n 'data-lvl' => $nodeDepth,\n 'data-readonly' => static::parseBool($node->isReadonly()),\n 'data-movable-u' => static::parseBool($node->isMovable('u')),\n 'data-movable-d' => static::parseBool($node->isMovable('d')),\n 'data-movable-l' => static::parseBool($node->isMovable('l')),\n 'data-movable-r' => static::parseBool($node->isMovable('r')),\n 'data-removable' => static::parseBool($node->isRemovable()),\n 'data-removable-all' => static::parseBool($node->isRemovableAll()),\n ];\n\n $css = [];\n if (!$isChild) {\n $css[] = 'kv-parent ';\n }\n if (!$node->isVisible() && $this->isAdmin) {\n $css[] = 'kv-invisible';\n }\n if ($this->showCheckbox && in_array($node->id, $this->selected)) {\n $css[] = 'kv-selected ';\n $jsSelect .= '$('.$this->id.').treeview(\"checkNode\", \"'.$node->id.'\");';\n }\n if ($node->isCollapsed()) {\n $css[] = 'kv-collapsed ';\n }\n if ($node->isDisabled()) {\n $css[] = 'kv-disabled ';\n }\n if (!$node->isActive()) {\n $css[] = 'kv-inactive ';\n }\n $indicators .= $this->renderToggleIconContainer(false) . \"\\n\";\n $indicators .= $this->showCheckbox ? $this->renderCheckboxIconContainer(false) . \"\\n\" : '';\n if (!empty($css)) {\n Html::addCssClass($nodeOptions, $css);\n }\n $out .= Html::beginTag('li', $nodeOptions) . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-tree-list']) . \"\\n\" .\n Html::beginTag('div', ['class' => 'kv-node-indicators']) . \"\\n\" .\n $indicators . \"\\n\" .\n '</div>' . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-node-detail']) . \"\\n\" .\n $this->renderNodeIcon($nodeIcon, $nodeIconType, $isChild) . \"\\n\" .\n Html::tag('span', $nodeName, ['class' => 'kv-node-label']) . \"\\n\" .\n '</div>' . \"\\n\" .\n '</div>' . \"\\n\";\n ++$counter;\n }\n if (isset($jsSelect)) {\n $this->view->registerJs(\n $jsSelect,\n View::POS_READY,\n 'treeviewinput-selected'\n );\n }\n $out .= str_repeat(\"</li>\\n</ul>\", $nodeDepth) . \"</li>\\n\";\n $out .= \"</ul>\\n\";\n return Html::tag('div', $this->renderRoot() . $out, $this->treeOptions);\n }", "public function render(): array\n {\n return $this->categories;\n }", "public function getGroups() {}", "public function groups();", "public function groups();", "public function getTemplatesHtml()\n\t{\n\t\t$path = 'global/slider/content/custom/groups';\n\n\t\t$templates = '';\n\t\tforeach (Mage::getConfig()->getNode($path)->children() as $group) {\n\t\t\t$templates .= $this->getChildHtml($group->getName() .'_content_type'). \"\\n\" ;\n\t\t}\n\n\t\treturn $templates;\n\t}", "public function getGroupsList(){\n return $this->_get(1);\n }", "public function getTreeGridData()\n {\n $list = array();\n \n // Get all menusets\n $menusets = $this->getAllMenusets();\n \n if (count($menusets)) {\n $i = 0;\n foreach ($menusets as $key => $item) {\n // Case with <html> orginal folder\n if (empty($item['menuset'])) {\n $item['menuset'] = self::getDefaultMenuset();\n }\n \n $curMenuset = $item['menuset'];\n $htmlObj = new Application_Model_Html($curMenuset);\n $data = $htmlObj->getHtmlList(true);\n \n $list[$i] = array(\n 'id' => $curMenuset,\n 'name' => $this->getMenusetName($curMenuset),\n 'fullname' => $item[0],\n 'children' => $data['rows'],\n 'state' => 'closed',\n 'can_del' => $this->canDelete($curMenuset),\n 'is_menuset' => true\n );\n $i++;\n }\n\n // Sort list\n array_multisort($list);\n }\n\n return $list;\n }", "function render()\n {\n return array(\n 'init' => $this->__init,\n 'data' => $this->__items\n );\n }", "function fantacalcio_admin_groups_list() {\n $out = \"\";\n \n $out .= l(\"Aggiungi girone\", \"admin/fantacalcio/groups/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $groups = Group::all();\n $competitions = Competition::all();\n if ($groups) {\n $header = array(\n t(\"Girone\"), \n t(\"Attivo\"), \n t(\"Calendario\"), \n t(\"Classfica\"), \n t(\"Formazioni\"), \n t(\"Newsletter\"));\n foreach ($groups as $g_id => $group) {\n $rows[] = array(\n l($competitions[$group->competition_id]->name . \" - \" . $group->name, \"admin/fantacalcio/groups/\" . $g_id), \n fantacalcio_check_value($group->active), \n \n // \"<img src='\" .base_path() . drupal_get_path(\"module\", \"fantacalcio\") . \"/images/\" . get_image_check($group->active) . \"'>\",\n $group->matches_order, \n $group->standings_order, \n $group->lineups_order, \n $group->newsletters_order);\n }\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"empty\" => t(\"Nessun gruppo\"))));\n }\n \n return $out;\n}", "function theme_pi_authoring_admin_group_hierarchy_list($group_order, $group_list_by_type, $all_groups)\n{\n\t$output = '';\n\tforeach($group_order as $group_type_to_list => $group_description)\t\n\t{\n\t\t$output .= '<h2>' . $group_description . '</h2>';\n\t\t\n\t\t// Check if there are any tree roots for this type of group\n\t\tif(count($group_list_by_type[$group_type_to_list])>0)\n\t\t{\n\t\t\t//Render each tree within an item list for the group description\n\n\t\t\t// First go through the trees and add nids for any branches/children \n\t\t\t$full_tree_structures = pi_groups_generate_child_list($group_list_by_type[$group_type_to_list], $all_groups);\n\t\t\t// Now render all branches of the trees\n\t\t\t$expanded_root = pi_authoring_render_group_tree($full_tree_structures, $all_groups);\t\n\t\t\tasort($expanded_root);\n\t\t\t$output .= theme('item_list', $expanded_root);\n\t\t}\n\t\t\n\t\tif(count($group_list_by_type[$group_type_to_list])==0)\n\t\t{\n\t\t\t// If there are no tree roots in this type then render a list with title and \"none\".\n\t\t\t$output .= t(\"None\");\n\t\t}\n\t}\n\treturn $output;\n}", "public function toArray()\n {\n return $this->groups->toArray();\n }", "public function render()\n {\n foreach ($this->arrayList as $item)\n {\n $this->render .= $item->render();\n }\n return $this->render;\n }", "public function getTrees() {}", "public function toJson()\n {\n // return $this->groups->map(function ($group) {\n // return json_decode(json_encode($group));\n // })->toJson();\n return $this->groups->toJson();\n }", "public function render(){\n\t\t$html = '<li class=\"addToGroupButton\" style=\"float: left; color: #333333;\nfont-size: 110%;\ntext-decoration: none;\nbackground-color: rgba( 255, 255, 255, 0.5 );\ndisplay: block;\nfloat: left;\nmargin-right: 1rem;\nheight: 2.2rem;\nline-height: 2.2rem;\npadding-left: 2.3rem;\npadding-right: 1rem;\nbackground-repeat: no-repeat;\nbackground-size: 1.8rem;\nbackground-position: 0.3rem 0.3rem;\nposition: relative;\ntop: 50%;\nmargin-top: -1.1em;\n\" ><span>Dodaj do grupy</span><ul class=\"addToGroupList\" style=\"\" >';\n\t\tforeach( $this->positions as $position){\n\t\t\t$html .= $position->render();\n\t\t}\n\t\t$html .= '</ul></li>';\n\t\t\n\t\treturn $html;\n\t}", "protected function getGroupList() {}", "protected function getGroupList() {}", "public static function groupList()\n {\n $category = Category::all();\n $array = [];\n foreach ($category->where('category_id', 0) as $parent){\n\n $array[$parent->title] = array();\n\n foreach($parent->children as $attribute) {\n $array[$parent->title][$attribute->id] = $attribute->title;\n }\n }\n\n return $array;\n }", "function cata_getallgroups_treeview(&$ar, $idgroup, $depthlimit, $idgroupstop, $depth=1)\n{\n\n\tglobal $db;\n\t$groups = array();\n\n\t$select = \"SELECT * FROM dims_group WHERE system = 0 ORDER BY label\";\n\t$result = $db->query($select);\n\twhile ($fields = $db->fetchrow($result))\n\t{\n\t\t$groups[$fields['id_group']][$fields['id']] = $fields;\n\t}\n\n\treturn(cata_getallgroupsrec($ar, $groups, $idgroup, $depthlimit, $idgroupstop, $depth));\n}", "public function getGroups();", "public function getGroups();", "private function htmlFromArray($hierarchicalArray) {\n $html = '';\n foreach($hierarchicalArray as $item) {\n $html .= \"<ul>\";\n $html .= \"<li style='color: \". ( ($item['status'] == 1) ? \"green\" : \"red\" ) .\"'>\". $item['title'] . \"<span style='color:black;'> --- \". $item['total_points'] .\"</span></li>\";\n if(count($item['children']) > 0) {\n $html .= $this->htmlFromArray($item['children']);\n }\n $html .= \"</ul>\";\n }\n return $html;\n }", "public function index()\n {\n return Group::all()->toArray();\n }", "public function renderChildren() {}", "public function renderChildren(): string\n {\n $html = [];\n\n foreach ($this->children as $child) {\n $html[] = $child->render();\n }\n\n $html = implode('', $html);\n\n if ($this instanceof HasTextChild && $this->escapeHtml) {\n $html = htmlspecialchars($html);\n }\n\n return $html;\n }", "abstract protected function getGroupStructure();", "public function renderChildren()\n\t{\n\t\t$children = '';\n\t\t\n\t\tforeach($this->_children as $child)\n\t\t{\n\t\t\t$children .= \"$child\";\n\t\t}\n\t\t\n\t\treturn $children;\n\t}", "function printCollectionTree(){\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}", "public function viewGroup($id)\n {\n $dview = array();\n \n // Detect view mode\n $viewmode = $this->input->get('viewmode');\n if(empty($viewmode))\n $viewmode = 4; // Show all kids\n $dview['viewmode'] = $viewmode;\n \n // Detect filter\n $filter = (int)$this->input->get('f');\n switch ($filter) {\n case '0':\n $this->session->set_userdata(array('desktop_filter' => 0));\n break;\n\n default:\n break;\n }\n \n $this->setTitle('Groupe - '.$this->config->item('appname')); \n $this->load->model('children_model');\n\n $group = $this->groups_model->getGroup((int)$id);\n $dview['group'] = $group;\n \n $children_all = $this->groups_model->getGroupChildren((int)$id);\n $children_checkedin = $this->groups_model->getGroup_childrenCheckedin((int)$id);\n $children_checkedout = $this->groups_model->getGroup_childrenCheckedout((int)$id);\n $children_notices = $this->groups_model->getGroup_noticesTotals((int)$id);\n \n // Find the children that haven't checked in neither checked out\n $children_unchecked = $children_all;\n \n // Remove children with checkin from unchecked children\n foreach ($children_checkedin as $key => $value) \n foreach($children_all as $key2 => $value2)\n if($value2->id_child == $value->id_child)\n {\n unset($children_unchecked[$key2]);\n break;\n }\n \n // Remove children with n+1 checkin for today from unchecked children\n // This avoids showing children with n+1 checkin in children as \"checkedin\"\n // also in \"checkedout\" as this view is the CURRENT status of the children\n foreach ($children_checkedin as $key => $value) \n foreach($children_checkedout as $key2 => $value2)\n if($value2->id_child == $value->id_child)\n {\n unset($children_checkedout[$key2]);\n break;\n } \n \n // Remove children with checkout from unchecked children\n foreach ($children_checkedin as $key => $value) \n foreach($children_all as $key2 => $value2)\n if($value2->id_child == $value->id_child)\n {\n unset($children_unchecked[$key2]);\n break;\n }\n\n // Add events status to $children_all\n $children_all_events = array();\n foreach ($children_all as $key_c_all => $c_all)\n {\n // Set the \"checkins\"\n foreach ($children_checkedin as $c_in)\n if($c_all->id_child == $c_in->id_child )\n $children_all_events[$c_all->id_child]['checkin_status_now'] = array('status' => 1, 'datetime_start' => $c_in->datetime_start);\n // Set the \"checkouts\"\n foreach ($children_checkedout as $c_out)\n if($c_all->id_child == $c_out->id_child )\n $children_all_events[$c_all->id_child]['checkin_status_now'] = array('status' => 2, 'datetime_end' => $c_out->datetime_end);\n }\n\n $dview['children_notices'] = $children_notices;\n $dview['children_all_events'] = $children_all_events;\n $dview['children'] = $children_all;\n $dview['children_checkedin'] = $children_checkedin;\n $dview['children_checkedout'] = $children_checkedout;\n $dview['children_unchecked'] = $children_unchecked;\n \n $this->display('desktop_group_manage',$dview);\n }", "public function getDashboardGroups(): array;", "public function get_recursive_groups()\n {\n return $this->_recursive_groups;\n }", "public function GetGroup() {\n $resource = $this->Retrieve();\n $query = mysqli_query($resource, \"SELECT grpname, grpdesc FROM `group`\");\n while ($row = mysqli_fetch_object($query)) {\n $p[] = $row;\n }\n return json_encode($p);\n }", "public function renderItems()\n {\n $this->dataProvider->setPagination(false);\n\n $rows=[];\n $this->renderLevel($rows,0,0);\n\n return implode($this->separator, $rows);\n }", "public function render() {\n return [\n '#theme' => $this->themeFunctions(),\n '#view' => $this->view,\n '#options' => $this->options,\n '#rows' => $this->view->result,\n '#mapping' => $this->defineMapping(),\n ];\n }", "private function createTree() {\n\t\t$html = $this->getSpec();\n\t\t$html .= '<div class=\"tal_clear\"></div>';\n\t\t$html .= $this->getSkills();\n\n\t\treturn $html;\n\t}", "public function render(){\n\t\t$data = array();\n\n\t\tforeach($this->fields as $fieldName => $field){\n\t\t\t$field->invokeContents($field->getValue(), $field);\n\t\t\t$data[$fieldName] = $this->renderTag($field);\n $data['fieldData'][$fieldName] = $this->renderArray($field);\n\t\t}\n $data['namespace'] = $this->settings['namespace'];\n\t\t$data['errors'] = $this->getMessageBag()->get(\"errors\");\n\t\t$data['messages'] = $this->getMessageBag()->get(\"messages\");\n $data['fieldData'] = substr(json_encode($data['fieldData']), 1, -1); // <-- remove outer curly's for IDE\n\n\t\treturn $data;\n\t}", "public function dataProvider()\n {\n return [\n 'Size' => [\n [\n 'size' => ButtonGroup::SIZE_LARGE,\n 'options' => [\n 'id' => 'btn-group'\n ]\n ],\n '<button-group id=\"btn-group\" size=\"large\"><i-button id=\"btn\">Button</i-button></button-group>'\n ],\n 'Shape' => [\n [\n 'shape' => ButtonGroup::SHAPE_CIRCLE,\n 'options' => [\n 'id' => 'btn-group'\n ]\n ],\n '<button-group id=\"btn-group\" shape=\"circle\"><i-button id=\"btn\">Button</i-button></button-group>'\n ],\n 'Vertical' => [\n [\n 'vertical' => true,\n 'options' => [\n 'id' => 'btn-group'\n ]\n ],\n '<button-group id=\"btn-group\" vertical><i-button id=\"btn\">Button</i-button></button-group>'\n ]\n ];\n }", "public function render()\n {\n return view('components.generic.data-table.group-by-btn');\n }", "public function getMenuGroups(){\n\t\t//y utilizando permisos\n\t\t\n\t\t$menuGroup = new MenuGroup();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\treturn array($menuGroup);\n\t}", "public function getTree() {\n\t\t// Affichage de la page\n\t\t$html = '<div id=\"tal_box\">';\n\t\t$html .= '<p>You can still use <span id=\"skillPoints\">23</span> points.</p>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div id=\"tal_linkBox\">';\n\t\t$html .= '<button onClick=\"createLink()\">Create a link</button>';\n\t\t$html .= '<p id=\"tal_buildLink\"></p>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "private function createGroupXML()\r\n\t{\r\n\t\t$rows = $this->getGroups();\r\n\t\t$groups = $this->doc->createElement('groups');\r\n\r\n\t\tforeach ($rows as $row)\r\n\t\t{\r\n\t\t\t$group = $this->doc->createElement('group');\r\n\r\n\t\t\tforeach ($row as $key => $value)\r\n\t\t\t{\r\n\t\t\t\t$group->setAttribute($key, $value);\r\n\t\t\t}\r\n\t\t\t$groups->appendChild($group);\r\n\t\t}\r\n\r\n\t\treturn $groups;\r\n\t}", "public function getMenuGroups(){\n\t\t//y utilizando permisos\n\n\t\t$menuGroup = new MenuGroup();\n\n\n\n\n\t\treturn array($menuGroup);\n\t}", "public function getRenderDataInnslag()\n {\n $renderData = $this->getRenderData();\n $this->_collected = [];\n if ($renderData->harGrupper()) {\n foreach ($renderData->getGrupper() as $gruppe) {\n if ($gruppe->harGrupper()) {\n foreach ($gruppe->getGrupper() as $undergruppe) {\n $this->_collectInnslag($undergruppe);\n }\n } else {\n $this->_collectInnslag($gruppe);\n }\n }\n } else {\n $this->_collectInnslag($renderData);\n }\n\n return $this->_collected;\n }", "public function getGroups() {\n return parent::getGroups();\n }", "public function tree()\n {\n return view('EmployeeTreeview.index',['employees'=>$this->makeArray(Employees::getEmployeesAll())]);\n }", "public function getRenderDataPersoner()\n {\n $renderData = $this->getRenderData();\n $this->_collected_personer = [];\n if ($renderData->harGrupper()) {\n foreach ($renderData->getGrupper() as $gruppe) {\n if ($gruppe->harGrupper()) {\n foreach ($gruppe->getGrupper() as $undergruppe) {\n $this->_collectPersoner($undergruppe);\n }\n } else {\n $this->_collectPersoner($gruppe);\n }\n }\n } else {\n $this->_collectPersoner($renderData);\n }\n\n return $this->_collected_personer;\n }", "function smarty_function_randgen_generator_tree($params, &$smarty)\n{\n $tree = $params['tree'];\n $htmltag = '<div class=\"well\"><em class=\"title\">%s</em> : %s';\n $depth = 0;\n $html = '';\n foreach(array_keys($tree['description']) as $key){\n $currentDepth = $tree['depth'][$key];\n $description = nl2br(htmlspecialchars($tree['description'][$key], ENT_QUOTES, 'UTF-8'));\n if($depth == $currentDepth){\n $html .= \"</div>\";\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n }\n elseif($depth > $currentDepth){\n for($i=0;$i<$depth-$currentDepth;$i++){\n $html .= \"</div>\";\n }\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n $depth = $currentDepth;\n }\n elseif($depth < $currentDepth){\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n $depth = $currentDepth;\n }\n }\n for($i=0;$i<$currentDepth;$i++){\n $html .= \"</div>\";\n }\n\n return $html;\n}", "public static function getGroupList() {\n $params = $_GET;\n if (isset($params['parent_id'])) {\n // requesting child groups for a given parent\n $params['page'] = 1;\n $params['rp'] = 0;\n $groups = CRM_Contact_BAO_Group::getGroupListSelector($params);\n }\n else {\n $requiredParams = [];\n $optionalParams = [\n 'title' => 'String',\n 'created_by' => 'String',\n 'group_type' => 'String',\n 'visibility' => 'String',\n 'component_mode' => 'String',\n 'status' => 'Integer',\n 'parentsOnly' => 'Integer',\n 'showOrgInfo' => 'Boolean',\n 'savedSearch' => 'Integer',\n // Ignore 'parent_id' as that case is handled above\n ];\n $params = CRM_Core_Page_AJAX::defaultSortAndPagerParams();\n $params += CRM_Core_Page_AJAX::validateParams($requiredParams, $optionalParams);\n\n // get group list\n $groups = CRM_Contact_BAO_Group::getGroupListSelector($params);\n\n // if no groups found with parent-child hierarchy and logged in user say can view child groups only (an ACL case),\n // go ahead with flat hierarchy, CRM-12225\n if (empty($groups)) {\n $groupsAccessible = CRM_Core_PseudoConstant::group();\n $parentsOnly = $params['parentsOnly'] ?? NULL;\n if (!empty($groupsAccessible) && $parentsOnly) {\n // recompute group list with flat hierarchy\n $params['parentsOnly'] = 0;\n $groups = CRM_Contact_BAO_Group::getGroupListSelector($params);\n }\n }\n\n //NYSS 5259 convert line breaks to html\n foreach ( $groups['data'] as &$group ) {\n $group['description'] = str_replace('\\r\\n', '\\n', $group['description']);\n $group['description'] = str_replace('\\r', '\\n', $group['description']);\n $group['description'] = str_replace('\\n', '<br />', $group['description']);\n } \n }\n\n CRM_Utils_JSON::output($groups);\n }", "function renderTree($tree, $options)\n {\n $current_depth = 0;\n $counter = 0;\n $result = '';\n $folders = isset($options['folders']);\n $plans = isset($options['plans']);\n\n foreach($tree as $node)\n {\n $curr = $node['Category'];\n $node_depth = $curr['level'];\n $node_name = $curr['title'];\n $node_id = $curr['cat_id'];\n $node_count = $curr['listing_count'];\n\n if($node_depth == $current_depth)\n {\n if($counter > 0) $result .= '</li>';\n }\n elseif($node_depth > $current_depth)\n {\n $result .= '<ul'.($folders ? ' class=\"filetree\"' : '').'>';\n $current_depth = $current_depth + ($node_depth - $current_depth);\n }\n elseif($node_depth < $current_depth)\n {\n $result .= str_repeat('</li></ul>',$current_depth - $node_depth).'</li>';\n $current_depth = $current_depth - ($current_depth - $node_depth);\n }\n $result .= '<li class=\"jr-tree-cat-'.$node_id.' closed\"';\n $result .= '>';\n $folders and $result .= '<span class=\"folder\">&nbsp;';\n $result .= !$plans ?\n $this->Routes->category($node)\n :\n $this->Routes->category($node,array(\"onclick\"=>\"JRPaid.Plans.load({'cat_id':\".$node_id.\"});return false;\"))\n ;\n $this->Config->dir_cat_num_entries and $result .= ' (' .$node_count . ')';\n $folders and $result .= '</span>';\n ++$counter;\n }\n\n $result .= str_repeat('</li></ul>',$node_depth);\n\n return $result;\n }", "public static function treeCategories(): array\n {\n return JEasyUi::jsonFormat(self::parentCategories());\n }", "public function render():array\n {\n return $this->itinerary;\n }", "public function displayReviewGroup()\n {\n $groups = Group::orderBy('name')->get();\n\n return view('review.group.display')->with([\"groups\" => $groups]);\n }", "function v2_mumm_menu_tree__menu_doormat(&$variables) {\n return $variables['tree'];\n}", "public function groups() {\n\t\t//variabel\n\t\t$data['datas'] = $this->PbkGroups_model->get_all();\n\t\t\n\t\t$template_data['title'] = 'SMS Gateway ';\n\t\t$template_data['subtitle'] = 'Kirim SMS';\n $template_data['crumb'] = ['SMS Gateway' => 'smsgateway', 'SMS Groups' => 'smsgateway/kirimsms/groups',];\n\t\t//view\n\t\t$this->layout->set_wrapper('groups_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}", "public function index()\n {\n //\n return static::getGroupsData();\n }", "abstract protected function getGroupList() ;", "public function getMenuGroups(){\n\t\t//y utilizando permisos\n\t\t\n\t\t$menuGroup = new MenuGroup();\n\t\t\n\t\treturn array($menuGroup);\n\t}", "public function getView()\n {\n return [\n 'Figure' => \"Pyramid\",\n 'Parameters' => [\n 'length' => $this->baseLength,\n 'width' => $this->baseWidth,\n 'height' => $this->height\n ],\n 'Area' => $this->area()\n ];\n }", "public function getTreeHtml()\n {\n if ($this->getMenu()) {\n return $this->_getTreeHtmlLevel(0, $this->getMenu()->getMenuTreeObjects());\n }\n\n return '';\n }", "public function getTreeOutput(){\n \n if(!$this->treeoutput)\n $this->setTreeOutput();\n \n return $this->treeoutput;\n }", "public function getElementsRecursively() {\n\t\treturn $this->getRenderablesRecursively();\n\t}", "public function getGroupList()\n\t{\n\t\t$db = FabrikWorker::getDbo(true);\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('DISTINCT(group_id)')->from('#__{package}_formgroup');\n\t\t$db->setQuery($query);\n\t\t$usedgroups = $db->loadResultArray();\n\t\tJArrayHelper::toInteger($usedgroups);\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('id AS value, name AS text')->from('#__{package}_groups');\n\t\tif (!empty($usedgroups)) {\n\t\t\t$query->where('id NOT IN('.implode(\",\", $usedgroups) .')');\n\t\t}\n\t\t$query->where('published <> -2');\n\t\t$query->order(FabrikString::safeColName('text'));\n\t\t$db->setQuery($query);\n\t\t$groups = $db->loadObjectList();\n\t\t$list = JHTML::_('select.genericlist', $groups, 'jform[groups]', \"class=\\\"inputbox\\\" size=\\\"10\\\" style=\\\"width:100%;\\\" \", 'value', 'text', null, $this->id . '-from');\n\t\treturn array($groups, $list);\n\t}", "public function getCurrentGroupList()\n\t{\n\t\t$db = FabrikWorker::getDbo(true);\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('fg.group_id AS value, g.name AS text');\n\t\t$query->from('#__{package}_formgroup AS fg');\n\t\t$query->join('LEFT', ' #__{package}_groups AS g ON fg.group_id = g.id');\n\t\t$query->where('fg.form_id = '.(int)$this->form->getValue('id'));\n\t\t$query->where('g.name <> \"\"');\n\t\t$query->order('fg.ordering');\n\t\t$db->setQuery($query);\n\t\t$currentGroups = $db->loadObjectList();\n\t\t$list = JHTML::_('select.genericlist', $currentGroups, $this->name, \"class=\\\"inputbox\\\" multiple=\\\"multiple\\\" style=\\\"width:100%;\\\" size=\\\"10\\\" \", 'value', 'text', '/', $this->id);\n\t\treturn array($currentGroups, $list);\n\t}", "public function treeDataProvider()\n {\n $catData = [\n [\n 'id' => 'cat1',\n 'active' => true,\n 'sort' => 1,\n 'left' => 2,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat2',\n 'active' => true,\n 'sort' => 2,\n 'left' => 8,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat3',\n 'active' => true,\n 'sort' => 1,\n 'left' => 1,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n 'current' => true,\n 'expanded' => true,\n ],\n [\n 'id' => 'cat4',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat41',\n 'active' => true,\n 'sort' => 1,\n 'left' => 4,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ],\n [\n 'id' => 'cat42',\n 'active' => true,\n 'sort' => 1,\n 'left' => 5,\n 'parent_id' => 'cat4',\n 'level' => 2,\n ],\n [\n 'id' => 'cat421',\n 'active' => true,\n 'sort' => 2,\n 'left' => 7,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ],\n [\n 'id' => 'cat422',\n 'active' => true,\n 'sort' => 1,\n 'left' => 6,\n 'parent_id' => 'cat42',\n 'level' => 3,\n ],\n [\n 'id' => 'cat5',\n 'active' => true,\n 'sort' => 1,\n 'left' => 3,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n [\n 'id' => 'cat6',\n 'active' => true,\n 'sort' => 1,\n 'left' => 9,\n 'parent_id' => 'oxrootid',\n 'level' => 1,\n ],\n ];\n\n $data = [];\n foreach ($catData as $category) {\n $data[$category['id']] = $this->buildCategory($category);\n }\n\n return [['data' => $data]];\n }", "function toHTML($array_name, $ident = 0, $mark=\"\"){\n static $s1;\n if (is_array($array_name)){\n $s1=$s1.'<ul class=\"level_'.$ident.'\">\n ';\n foreach ($array_name as $k => $v){\n if (is_array($v)){\n for ($i=0; $i < $ident; $i++){ $s1=$s1.$mark; }\n $s1=$s1.'<li class=\"level_'.$ident.'_'.$ident.'\">'.$k .'</li>'. \" \" . \"\n \";\n $this->toHTML($v, $ident + 1, $mark);\n // $s=$s.'AFTERM';\n }else{\n for ($i=0; $i < $ident; $i++){$s1=$s1.$mark; }\n $s1=$s1.'<li class=\"level_'.$ident.'_'.$ident.' \">'.$k . \"</li>\n \" . $v .\"\";\n }\n }\n $s1=$s1.'</ul>\n ';\n }else{\n $s1=$s1.\"Error = \" . $array_name;\n }\n return $s1;\n }", "public function canRenderTrees();", "public function getGroupedOpcodesDataProvider(): array\n {\n return [\n [\n <<<'EOT'\napples\noranges\nkiwis\ncarrots\nEOT\n ,\n <<<'EOT'\napples\nkiwis\ncarrots\ngrapefruits\nEOT\n ,\n [\n [\n ['eq', 0, 1, 0, 1],\n ['del', 1, 2, 1, 1],\n ['eq', 2, 4, 1, 3],\n ['ins', 4, 4, 3, 4],\n ],\n ],\n ],\n ];\n }", "static function getHTMLForTree( $data ){\n\t\tglobal $wgOut;\n\t\t$wgOut->addModules( 'ext.DataVisualizer' );\n\n\t\treturn '<div class=\"dv_d3_tree\" style=\"text-align:center;\" dv_data=' . json_encode($data) .'></div>';\n\t}", "public function actionAreaTree()\n {\n $html = $this->renderPartial('tree', array(), true);\n Yii::app()->getClientScript()->renderBodyBegin($html);\n Yii::app()->getClientScript()->renderBodyEnd($html);\n echo $html;\n Yii::app()->end();\n }", "public function render($groupName = null, $type = null) {\n \n $html = '';\n\n if (!isset($this->config['groups'])) {\n return '';\n }\n \n foreach (array_keys($this->config['groups']) as $configType) {\n if (!isset($this->config['groups'][$configType])) {\n continue;\n }\n\n if ($type !== null and $type !== $configType) {\n continue;\n }\n\n if ($groupName !== null) {\n $html .= $this->renderGroup($groupName, $this->config['groups'][$configType][$groupName], $configType);\n continue;\n }\n foreach($this->config['groups'][$configType] as $name => $group) {\n $html .= $this->renderGroup($name, $group, $configType);\n }\n }\n\n return $html;\n }", "public static abstract function getGroupList();", "function generateallActiveTreeArray() {\n $tree = array();\n $this->db->select('id,name,shortdesc,status,parentid,page_uri,orderr');\n $this->db->where ('status','active');\n $this->db->order_by('parentid asc, orderr asc');\n $query = $this->db->get('adminmenu');\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $row) {\n $index = (isset($tree[$row->parentid]))?count($tree[$row->parentid]):0; \n $tree[$row->parentid][$index] = $row;\n }\n }\n \n return $tree;\n }", "public function getGroupList()\n\t{\n\t\t$db = Zend_Db_Table::getDefaultAdapter();\n\t\t$query = \"select id,group_name from main_groups where isactive = 1 order by group_name\";\n\t\t$result = $db->query($query);\n\t\t$group_arr = array();\n\t\twhile($row = $result->fetch())\n\t\t{\n\t\t\t$group_arr[$row['id']] = $row['group_name'];\n\t\t}\n\n\t\treturn $group_arr;\n\t}", "public function getGroup();", "public function getGroup();", "public function getGroup();", "public function getMenuGroups(){\n\t\t//y utilizando permisos\n\n\t\t$menuGroup = new MenuGroup();\n\n\t\treturn array($menuGroup);\n\t}", "public function groups()\n {\n return $this->hasMany(static::class, 'parent_id');\n }", "public function getContent()\n\t\t{\n\t\t\treturn $this->getGroup();\n\t\t\t\n\t\t}" ]
[ "0.6781402", "0.65309376", "0.63400924", "0.62671614", "0.62258005", "0.61690885", "0.6139825", "0.6118749", "0.60628206", "0.606034", "0.6059696", "0.5984809", "0.59276223", "0.5916014", "0.5904813", "0.5846664", "0.5846664", "0.5827093", "0.582627", "0.57989156", "0.57775575", "0.57751364", "0.5773784", "0.57533777", "0.57533777", "0.5750934", "0.57475334", "0.5742415", "0.57156086", "0.57148445", "0.5709029", "0.57089263", "0.5705016", "0.5701412", "0.5693574", "0.5683333", "0.56813896", "0.56813896", "0.56805027", "0.56672084", "0.5661038", "0.5661038", "0.566016", "0.56480753", "0.56303495", "0.56299585", "0.56210285", "0.5603675", "0.5602949", "0.5581881", "0.55702496", "0.5569603", "0.5565975", "0.5563666", "0.5560178", "0.55593497", "0.55100906", "0.55055296", "0.55019075", "0.548361", "0.54811823", "0.54751635", "0.54744613", "0.54720235", "0.54572314", "0.5445782", "0.5442489", "0.5436516", "0.54331464", "0.54317176", "0.5415929", "0.5406269", "0.5401447", "0.5393313", "0.5387637", "0.5378787", "0.5377158", "0.5373062", "0.5368204", "0.5366325", "0.5364565", "0.5359058", "0.5357806", "0.53565395", "0.5354634", "0.53527063", "0.5351428", "0.53513515", "0.5348314", "0.53480434", "0.5347748", "0.53425884", "0.53348494", "0.5329024", "0.5328229", "0.5328229", "0.5328229", "0.53256696", "0.5324313", "0.5323053" ]
0.54979515
59
Returns render array for circle form.
protected function getCircleFormRender(GroupInterface $group) { $plugin_block = $this->blockManager->createInstance('living_spaces_circles_add_people_block', [ 'id' => 'living_spaces_circles_add_people_block', 'context_mapping' => [ 'group' => '@group.group_route_context:group', ], ]); if ($plugin_block instanceof ContextAwarePluginInterface) { $contexts = $this->contextRepository->getRuntimeContexts($plugin_block->getContextMapping()); $this->contextHandler->applyContextMapping($plugin_block, $contexts); } return $plugin_block->build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getView()\n {\n return [\n 'Figure' => \"Circle\",\n 'Parameters' => [\n 'radius' => $this->radius,\n ],\n 'Area' => $this->area()\n ];\n }", "public function getCircles()\n {\n return $this->circles;\n }", "protected function renderArray() {}", "public function getCirclesJs()\n\t{\n\t\t$return = '';\n\t\tif (null !== $this->resources->itemAt('circles'))\n\t\t{\n\t\t\tforeach ($this->resources->itemAt('circles') as $circle)\n\t\t\t{\n\t\t\t\t$return .= $circle->toJs($this->getJsName());\n\t\t\t\t$return .= \"\\n \";\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "public function graphic(): array\n {\n return $this->classes;\n }", "public function render(): array\n {\n return [\n 'left' => $this->left,\n 'right' => $this->right,\n 'title' => $this->title,\n ];\n }", "public function drawArray()\n\t{\n\t\t$this->outArray['days'] = array();\n\t\t$this->makeCalendarTitle();\n\t\t$this->makeCalendarHead();\n\t\t$this->makeDayHeadings();\n\t\t$this->startMonthSpacers();\n\t\t$this->makeArrayIterator();\n\t\t$this->endMonthSpacers();\t\t\n\t\t\n\t\treturn $this->outArray;\n\t}", "public function getShape(): object {\n return (object) ['m' => $this->row, 'n' => $this->col];\n }", "public function render(): array\n {\n $this->setAttribute('type', self::TYPE);\n\n return $this->attributes;\n }", "public function jsonSerialize()\n {\n $json = array();\n $json['circle'] = $this->circle;\n $json['polygon'] = $this->polygon;\n\n return $json;\n }", "public function index()\n {\n return array(\n array(\n \"latitud\" => 40.7127837,\n \"longitud\" => -74.0059413,\n \"radio\" => 40,\n ),\n array(\n \"latitud\" => -33.4377968,\n \"longitud\" => -70.6504451,\n \"radio\" => 33,\n ),\n array(\n \"latitud\" => -34.6075682,\n \"longitud\" => -58.4370894,\n \"radio\" => 58,\n )\n )\n ;\n }", "public function render(): array\n {\n return $this->purposeOfTravel;\n }", "public function getView()\n {\n return [\n 'Figure' => \"Pyramid\",\n 'Parameters' => [\n 'length' => $this->baseLength,\n 'width' => $this->baseWidth,\n 'height' => $this->height\n ],\n 'Area' => $this->area()\n ];\n }", "public function render(): array\n {\n return $this->categories;\n }", "public function render() {\n return [\n '#theme' => $this->themeFunctions(),\n '#view' => $this->view,\n '#options' => $this->options,\n '#rows' => $this->view->result,\n '#mapping' => $this->defineMapping(),\n ];\n }", "public function render() {\n return [\n 'command' => 'slideCommand',\n 'action' => $this->action,\n 'bo_view_dom_id' => $this->bo_view_dom_id,\n 'entity_id' => $this->entity_id,\n ];\n }", "public function toString() {\n //formed as an array to manage methods\n echo json_encode(array \n (\"radius\" => parent::getRadius(),\n \"height\" => $this->getHeight(),\n \"base\" => number_format($this->getBaseArea(), 2),\n \"volume\" => number_format($this->getVolume(), 2),\n \"lateral\" => number_format($this->getLateralSurface(), 2),\n \"surface\" => number_format($this->getSurfaceArea(), 2)\n ));\n }", "function render()\n {\n return array(\n 'init' => $this->__init,\n 'data' => $this->__items\n );\n }", "public function getShapes()\n {\n return $this->shapes;\n }", "public function provider_render() {\n return array(\n array(\n array(\n \n ),\n ),\n );\n }", "function cercle($cx,$cy,$r){\n return \"<circle cx=\\\"$cx\\\" cy=\\\"$cy\\\" r=\\\"$r\\\" />\";\n}", "public function render()\n {\n return view('components.galeria.carrusel-artistas', [\n 'plana_4' => Carrusel::find(4),\n 'plana_5' => Carrusel::find(5),\n 'plana_6' => Carrusel::find(6),\n ]);\n }", "protected function addCircleSection(ArrayNodeDefinition $node)\n {\n $node\n ->children()\n ->arrayNode('circle')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('class')->end()\n ->scalarNode('helper_class')->end()\n ->scalarNode('prefix_javascript_variable')->end()\n ->arrayNode('center')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('longitude')->end()\n ->scalarNode('latitude')->end()\n ->scalarNode('no_wrap')->end()\n ->end()\n ->end()\n ->scalarNode('radius')->end()\n ->arrayNode('options')\n ->useAttributeAsKey('options')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ->end();\n }", "public function render():array\n {\n return $this->itinerary;\n }", "public static function getAllShapes() : array {\n return [\n 'Tree', 'Star'\n ];\n }", "public function toArray()\n {\n return ['topleft' => __('Top Left'),\n 'bottomleft' => __('Bottom Left'),\n 'topright' => __('Top Right'),\n 'bottomright' => __('Bottom Right')\n ];\n }", "public function index()\n {\n $circles = Circle::exceptSecret()->latest()->paginate(self::PAGINATION_COUNT);\n\n return view(\n 'front.circles',\n with(\n [\n 'circles' => $circles,\n ]\n )\n );\n }", "public function getRadius();", "public function toArray() {\n\n // Initialize the output.\n $output = [];\n\n // Set the background color.\n ArrayUtility::set($output, \"backgroundColor\", $this->backgroundColor, [null]);\n\n // Set the base length.\n ArrayUtility::set($output, \"baseLength\", $this->baseLength, [null]);\n\n // Set the base width.\n ArrayUtility::set($output, \"baseWidth\", $this->baseWidth, [null]);\n\n // Set the border color.\n ArrayUtility::set($output, \"borderColor\", $this->borderColor, [null]);\n\n // Set the border width.\n ArrayUtility::set($output, \"borderWidth\", $this->borderWidth, [null]);\n\n // Set the radius.\n ArrayUtility::set($output, \"radius\", $this->radius, [null]);\n\n // Set the rear length.\n ArrayUtility::set($output, \"rearLength\", $this->rearLength, [null]);\n\n // Set the top width.\n ArrayUtility::set($output, \"topWidth\", $this->topWidth, [null]);\n\n // Return the output.\n return $output;\n }", "function Circle($x,$y,$r,$style='')\n\t\t{\n\t\t\t$this->Ellipse($x,$y,$r,$r,$style);\n\t\t}", "public function getRendererInstances() {}", "public function circle($x, $y, $r, $style = self::STYLE_DRAW) {}", "public function __toString()\n {\n return sprintf(\n \"<%s,%s>\",\n (string) $this->center,\n $this->radius\n );\n }", "public function renderComponents();", "private static function getRings(): array\n {\n return [\n PlayerEquipment::create('No ring', 0, 0, 0),\n\n PlayerEquipment::create('Ring of Damage +1', 25, 1, 0),\n PlayerEquipment::create('Ring of Damage +2', 50, 2, 0),\n PlayerEquipment::create('Ring of Damage +3', 100, 3, 0),\n\n PlayerEquipment::create('Ring of Defense +1', 20, 0, 1),\n PlayerEquipment::create('Ring of Defense +2', 40, 0, 2),\n PlayerEquipment::create('Ring of Defense +3', 80, 0, 3),\n\n ];\n }", "protected function RenderArray()\n {\n if ($this->m_QueryONRender && !$this->m_ActiveRecord && $this->m_DataObjName) {\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n $this->UpdateActiveRecord($resultRecords[0]);\n }\n\n $columns = $this->m_RecordRow->RenderColumn();\n foreach($columns as $key=>$val) {\n $fields[$key][\"label\"] = $val;\n $fields[$key][\"required\"] = $this->GetControl($key)->m_Required;\n $fields[$key][\"description\"] = $this->GetControl($key)->m_Description;\n $fields[$key][\"value\"] = $this->GetControl($key)->m_Value;\t \n }\n\n $controls = $this->m_RecordRow->Render();\n if ($this->CanShowData()) {\n foreach($controls as $key=>$val) {\n $fields[$key][\"control\"] = $val;\n }\n }\n return $fields;\n }", "public function index()\n {\n $circle = Circle::paginate(10);\n return view('admin.circle.index')->withCircles($circle);\n }", "function getShape() { return $this->_shape; }", "protected function getPathFromCircle(SimpleXMLElement $circle){\n\n\t\t$mult = 0.55228475;\n\t\treturn\n\t\t\t'M'.($circle['cx']-$circle['r']).' '.$circle['cy'].\n\t\t\t'C'.($circle['cx']-$circle['r']).' '.($circle['cy']-$circle['r']*$mult).' '.($circle['cx']-$circle['r']*$mult).' '.($circle['cy']-$circle['r']).' '.$circle['cx'].' '.($circle['cy']-$circle['r']).\n\t\t\t'C'.($circle['cx']+$circle['r']*$mult).' '.($circle['cy']-$circle['r']).' '.($circle['cx']+$circle['r']).' '.($circle['cy']-$circle['r']*$mult).' '.($circle['cx']+$circle['r']).' '.$circle['cy'].\n\t\t\t'C'.($circle['cx']+$circle['r']).' '.($circle['cy']+$circle['r']*$mult).' '.($circle['cx']+$circle['r']*$mult).' '.($circle['cy']+$circle['r']).' '.$circle['cx'].' '.($circle['cy']+$circle['r']).\n\t\t\t'C'.($circle['cx']-$circle['r']*$mult).' '.($circle['cy']+$circle['r']).' '.($circle['cx']-$circle['r']).' '.($circle['cy']+$circle['r']*$mult).' '.($circle['cx']-$circle['r']).' '.$circle['cy'].\n\t\t\t'Z';\n\n\t}", "public function index_get()\n {\n $response_array = array(\n 'status' => true,\n 'error' => \"\",\n 'circles' => null,\n );\n\n try\n {\n $this->CI = &get_instance();\n $this->load->model('Circle_model');\n\n //get parameters\n $device_id = $this->get('device_id');\n\n $circles = $this->Circle_model->getCirclesForDeviceId($device_id);\n $response_array[\"circles\"] = $circles;\n\n } catch (Exception $e) {\n $response_array[\"status\"] = false;\n $response_array[\"error\"] = $e->getMessage();\n }\n $this->response($response_array);\n }", "function _paintJS()\r\n {\r\n\r\n $penwidth = max($this->Pen->Width, 1);\r\n\r\n switch ($this->_shape)\r\n {\r\n case stCircle:\r\n case stSquare:\r\n case stRoundSquare:\r\n // need to center the shape\r\n $size = min($this->Width, $this->Height) / 2 - $penwidth * 4;\r\n $xc= ($this->Width/2);\r\n $yc= ($this->Height/2);\r\n $x1 = $xc - $size;\r\n $y1 = $yc - $size;\r\n $x2= $xc + $size;\r\n $y2= $yc + $size;\r\n break;\r\n default:\r\n $x1=$penwidth;\r\n $y1=$penwidth;\r\n $x2=max($this->Width, 2) - $penwidth * 2;\r\n $y2=max($this->Height, 2) - $penwidth * 2;\r\n $size=max($x2, $y2);\r\n break;\r\n };\r\n\r\n $w = max($this->Width, 1);\r\n $h = max($this->Height, 1);\r\n\r\n // need to center the shape\r\n $size = min($this->Width, $this->Height) / 2 - $penwidth * 4;\r\n $result = \"\";\r\n switch ($this->_shape)\r\n {\r\n case stRectangle:\r\n case stSquare:\r\n $result .= $this->FillRect($x1, $y1, $x2, $y2);\r\n $result .= $this->Rectangle($x1, $y1, $x2, $y2);\r\n break;\r\n case stRoundRect:\r\n case stRoundSquare:\r\n if ($w < $h) $s = $w;\r\n else $s = $h;\r\n\r\n $result .= $this->RoundRect($x1, $y1, $x2, $y2);\r\n break;\r\n case stCircle:\r\n $xc = $this->Width / 2;\r\n $yc = $this->Height / 2;\r\n if ($w < $h) $radius = ($w/2)-5;\r\n else $radius = ($h/2)-5;\r\n\r\n $result .= $this->Circle($xc, $yc, $radius);\r\n break;\r\n case stEllipse:\r\n $x = 5;\r\n $y = 5;\r\n $result .= $this->Ellipse($x, $y, $this->Width-10, $this->Height-10);\r\n break;\r\n }\r\n return $result;\r\n }", "function getShape() { return $this->_shape; }", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "protected static function generatePositionToCrown ()\n {\n $dataTree = Tree::getByUser()->getDataByTree();\n\n $treeCroneCenterPosX = $dataTree['crownCenterPosX'];\n $treeCroneCenterPosY = $dataTree['crownCenterPosY'];\n\n $treeHalfWidth = $dataTree['halfCrownWidth'];\n $treeHalfHeight = $dataTree['halfCrownHeight'];\n\n\n $posX = rand(-$treeHalfWidth, $treeHalfWidth);\n $posY = rand(-$treeHalfHeight, $treeHalfHeight);\n\n // Check the coordinates located inside the oval (crown) (x^2/a^2 + y^2/b^2) == 1 for ellipse\n $ovalVerification = (($posX * $posX) / ($treeHalfWidth * $treeHalfWidth)) + (($posY * $posY) / ($treeHalfHeight * $treeHalfHeight));\n\n if($ovalVerification > 1){\n // If they are beyond the oval (crown),\n // I place them on the surface of the oval (crown),\n // keeping the angle from the center\n $reductionRatio = sqrt($ovalVerification);\n $posX /= $reductionRatio;\n $posY /= $reductionRatio;\n }\n\n return [\n 'x' => (int) ($treeCroneCenterPosX + $posX),\n 'y' => (int) ($treeCroneCenterPosY + $posY),\n ];\n }", "public function toArray()\n {\n return [\n 'type' => 'divider',\n ];\n }", "public function getCrops(){\n return $this->crops->crops(); \n }", "public function getShape1()\n {\n }", "public function draw()\n {\n echo 'Draw circle';\n }", "public function getCircleId()\n {\n return $this->circle_id;\n }", "public function render(){\n\t\t$data = array();\n\n\t\tforeach($this->fields as $fieldName => $field){\n\t\t\t$field->invokeContents($field->getValue(), $field);\n\t\t\t$data[$fieldName] = $this->renderTag($field);\n $data['fieldData'][$fieldName] = $this->renderArray($field);\n\t\t}\n $data['namespace'] = $this->settings['namespace'];\n\t\t$data['errors'] = $this->getMessageBag()->get(\"errors\");\n\t\t$data['messages'] = $this->getMessageBag()->get(\"messages\");\n $data['fieldData'] = substr(json_encode($data['fieldData']), 1, -1); // <-- remove outer curly's for IDE\n\n\t\treturn $data;\n\t}", "public function render()\n {\n foreach ($this->arrayList as $item)\n {\n $this->render .= $item->render();\n }\n return $this->render;\n }", "public function getCrop() : array\n\t{\n\t\t\n\t\t$this->fit = $this->fit ?? 'crop-center';\n\n\t\tif (array_key_exists($this->fit, self::CROP_METHODS)) {\n\t\t\treturn self::CROP_METHODS[$this->fit];\n\t\t}\n\t\t\n\t\t$matches = array();\n\t\t\n\t\tif (preg_match(self::CROP_REGEX, $this->fit, $matches)) {\n\t\t\t$matches[3] = isset($matches[3]) ? $matches[3] : 1;\n\t\t\t\n\t\t\tif ($matches[1] > 100 or $matches[2] > 100 or $matches[3] > 100) {\n\t\t\t\treturn self::CROP_METHODS['crop-center'];\n\t\t\t}\n\t\t\t\n\t\t\treturn [\n\t\t\t\t\t(int) $matches[1],\n\t\t\t\t\t(int) $matches[2],\n\t\t\t\t\t(float) $matches[3],\n\t\t\t];\n\t\t}\n\t\t\n\t\treturn self::CROP_METHODS['crop-center'];\n\t}", "public function render()\n {\n return view('components.opp-org-chart-row');\n }", "public function getRect()\n {\n $x1 = min([$this->p1->x, $this->p2->x, $this->p3->x]);\n $y1 = min([$this->p1->y, $this->p2->y, $this->p3->y]);\n $x2 = max([$this->p1->x, $this->p2->x, $this->p3->x]);\n $y2 = max([$this->p1->y, $this->p2->y, $this->p3->y]);\n\n return [new Point($x1, $y1), new Point($x2, $y2)];\n }", "public function render(): array\n {\n $this->init();\n $resultArray = $this->initializeResultArray();\n $currentRecord = $this->cleanUpCurrentRecord($this->data['databaseRow']);\n $backendRelPath = 'EXT:maps2/';\n\n $this->pageRenderer->addRequireJsConfiguration([\n 'paths' => [\n 'leaflet' => rtrim(\n PathUtility::getRelativePath(\n PATH_typo3,\n GeneralUtility::getFileAbsFileName('EXT:maps2/Resources/Public/JavaScript/Leaflet')\n ),\n '/'\n ),\n 'leafletDragPath' => rtrim(\n PathUtility::getRelativePath(\n PATH_typo3,\n GeneralUtility::getFileAbsFileName('EXT:maps2/Resources/Public/JavaScript/Leaflet.Drag.Path')\n ),\n '/'\n ),\n 'leafletEditable' => rtrim(\n PathUtility::getRelativePath(\n PATH_typo3,\n GeneralUtility::getFileAbsFileName('EXT:maps2/Resources/Public/JavaScript/Leaflet.Editable')\n ),\n '/'\n )\n ],\n 'shim' => [\n 'leaflet' => [\n 'deps' => ['jquery'],\n 'exports' => 'L'\n ],\n 'leafletDragPath' => [\n 'deps' => ['leaflet'],\n ],\n 'leafletEditable' => [\n 'deps' => ['leafletDragPath'],\n ],\n ]\n ]);\n\n $resultArray['stylesheetFiles'][] = $backendRelPath . 'Resources/Public/Css/Leaflet/Leaflet.css';\n $resultArray['requireJsModules'][] = [\n 'TYPO3/CMS/Maps2/OpenStreetMapModule' => 'function(OpenStreetMap){OpenStreetMap();}'\n ];\n\n $resultArray['html'] = $this->getMapHtml($this->getConfiguration($currentRecord));\n\n return $resultArray;\n }", "protected function markers(): ?array\n {\n return [\n [\n 'label' => 'Medium',\n 'value' => 40,\n ],\n ];\n }", "public function getPoints(): array;", "protected function generateGraphic() {}", "public static function map() {\n\t\t\treturn array(\n\t\t\t\t'name' => __( 'Divider Dots', 'total' ),\n\t\t\t\t'description' => __( 'Dot Separator', 'total' ),\n\t\t\t\t'base' => 'vcex_divider_dots',\n\t\t\t\t'icon' => 'vcex-dots vcex-icon fa fa-ellipsis-h',\n\t\t\t\t'category' => wpex_get_theme_branding(),\n\t\t\t\t'params' => array(\n\t\t\t\t\t// General\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t\t'heading' => __( 'Visibility', 'total' ),\n\t\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t\t),\n\t\t\t\t\tvcex_vc_map_add_css_animation(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Extra class name', 'total' ),\n\t\t\t\t\t\t'param_name' => 'el_class',\n\t\t\t\t\t\t'description' => __( 'Style particular content element differently - add a class name and refer to it in custom CSS.', 'total' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_text_alignments',\n\t\t\t\t\t\t'heading' => __( 'Align', 'total' ),\n\t\t\t\t\t\t'param_name' => 'align',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Count', 'total' ),\n\t\t\t\t\t\t'param_name' => 'count',\n\t\t\t\t\t\t'value' => '3',\n\t\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => __( 'Size', 'total' ),\n\t\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t\t'description' => __( 'Default', 'total' ) . ': 5px',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t'heading' => __( 'Color', 'total' ),\n\t\t\t\t\t\t'param_name' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'vcex_trbl',\n\t\t\t\t\t\t'heading' => __( 'Margin', 'total' ),\n\t\t\t\t\t\t'param_name' => 'margin',\n\t\t\t\t\t),\n\t\t\t\t\t// Hidden Removed attributes\n\t\t\t\t\tarray( 'type' => 'hidden', 'param_name' => 'margin_top' ),\n\t\t\t\t\tarray( 'type' => 'hidden', 'param_name' => 'margin_bottom' ),\n\t\t\t\t),\n\t\t\t);\n\t\t}", "public function getAllOptions()\n {\n if ($this->_options === null) {\n $this->_options = [\n ['label' => __('None'), 'value' => self::NONE],\n ['label' => __('Circle'), 'value' => self::CIRCLE],\n ['label' => __('Disc'), 'value' => self::DISC],\n ['label' => __('Square'), 'value' => self::SQUARE]\n ];\n }\n return $this->_options;\n }", "public function getAccessOfRender(): array\n {\n $access = $this->getAccessOfAll(true, $this->bsw['menu']);\n $annotation = [];\n\n foreach ($access as $key => $item) {\n $enum = [];\n foreach ($item['items'] as $route => $target) {\n if ($target['join'] === false || $target['same']) {\n continue;\n }\n $enum[$route] = $target['info'];\n }\n\n if (!isset($annotation[$key])) {\n $annotation[$key] = [\n 'info' => $item['info'] ?: 'UnSetDescription',\n 'type' => new Checkbox(),\n 'enum' => [],\n 'value' => [],\n ];\n }\n\n $annotation[$key]['enum'] = array_merge($annotation[$key]['enum'], $enum);\n }\n\n return $annotation;\n }", "public function ToString()\n\t\t{\n\t\t\tparent::ToString();\n\t\t\t$objeto[\"tipo\"] = \"Rectángulo<br>\";\n\t\t\t$objeto[\"lUno\"] = $this->_ladoUno;\n\t\t\t$objeto[\"lDos\"] = $this->_ladoDos;\n\t\t\t$objeto[\"perim\"] = $this->_perimetro;\n\t\t\t$objeto[\"sup\"]\t = $this->_superficie;\n\t\t\t$objeto[\"fig\"] = $this->Dibujar();\n\t\t\treturn $objeto;\n\t\t}", "public function render() {\n\t\t$rtn = [\n\t\t\t'speech' => $this->speech,\n\t\t\t'source' => $this->source\n\t\t];\n\t\t$data = [];\n\t\tif ($this->googleData) {\n\t\t\t$data['google']=$this->googleData->render();\n\t\t}\n\t\tif (count($data)>0) {\n\t\t\t$rtn['data']=$data;\n\t\t}\n\t\tif ($this->displayText) {\n\t\t\t$rtn['displayText'] = $this->displayText;\n\t\t}\n\t\treturn $rtn;\n\t}", "private function getCorsesArray()\n {\n $corsesArray = array();\n if (count($this->getCorses()) == 1) {\n $corsesArray = array(\n Resources::XTAG_CORS_RULE => $this->getCorses()[0]->toArray()\n );\n } elseif ($this->getCorses() != array()) {\n foreach ($this->getCorses() as $cors) {\n $corsesArray[] = [Resources::XTAG_CORS_RULE => $cors->toArray()];\n }\n }\n\n return $corsesArray;\n }", "public function getFills(): array;", "public function render()\n {\n $out = [];\n $optionInfo = [];\n\n if ($this->title) {\n $out['title'] = $this->title;\n }\n\n if ($this->description) {\n $out['description'] = $this->description;\n }\n\n if ($this->footer) {\n $out['footer'] = $this->footer;\n }\n\n if ($this->imageUrl) {\n $out['image'] = [\n 'url' => $this->imageUrl,\n 'accessibilityText' => ($this->accessibilityText) ? $this->accessibilityText : 'accessibility text',\n ];\n }\n\n $out['openUrlAction'] = [\n 'url' => $this->openUrlAction,\n ];\n\n return $out;\n }", "public function points(): array;", "private function getMenuArrayRender()\n {\n $this->load->model('Menu_Model', \"menuModel\");\n $this->menuModel->setControllerName($this->_controllerName);\n return $this->menuModel->getMenuArray();\n }", "function render( $params ) {\n\n $output = '';\n $facet = $params['facet'];\n $value = $params['selected_values'];\n $unit = empty( $facet['unit'] ) ? 'mi' : $facet['unit'];\n\n $lat = empty( $value[0] ) ? '' : $value[0];\n $lng = empty( $value[1] ) ? '' : $value[1];\n $chosen_radius = empty( $value[2] ) ? '' : (float) $value[2];\n $location_name = empty( $value[3] ) ? '' : urldecode( $value[3] );\n\n $radius_options = [ 10, 25, 50, 100, 250 ];\n\n // Grab the radius UI\n $radius_ui = empty( $facet['radius_ui'] ) ? 'dropdown' : $facet['radius_ui'];\n\n // Grab radius options from the UI\n if ( ! empty( $facet['radius_options'] ) ) {\n $radius_options = explode( ',', preg_replace( '/\\s+/', '', $facet['radius_options'] ) );\n }\n\n // Grab default radius from the UI\n if ( empty( $chosen_radius ) && ! empty( $facet['radius_default'] ) ) {\n $chosen_radius = (float) $facet['radius_default'];\n }\n\n // Support dynamic radius\n if ( ! empty( $chosen_radius ) && 0 < $chosen_radius ) {\n if ( ! in_array( $chosen_radius, $radius_options ) ) {\n $radius_options[] = $chosen_radius;\n }\n }\n\n $radius_options = apply_filters( 'facetwp_proximity_radius_options', $radius_options );\n\n ob_start();\n?>\n <input type=\"text\" class=\"facetwp-location\" value=\"<?php echo esc_attr( $location_name ); ?>\" placeholder=\"<?php _e( 'Enter location', 'fwp-front' ); ?>\" />\n\n <?php if ( 'dropdown' == $radius_ui ) : ?>\n\n <select class=\"facetwp-radius facetwp-radius-dropdown\">\n <?php foreach ( $radius_options as $radius ) : ?>\n <?php $selected = ( $chosen_radius == $radius ) ? ' selected' : ''; ?>\n <option value=\"<?php echo $radius; ?>\"<?php echo $selected; ?>><?php echo \"$radius $unit\"; ?></option>\n <?php endforeach; ?>\n </select>\n\n <?php elseif ( 'slider' == $radius_ui ) : ?>\n\n <div class=\"facetwp-radius-wrap\">\n <input class=\"facetwp-radius facetwp-radius-slider\" type=\"range\"\n min=\"<?php echo $facet['radius_min']; ?>\"\n max=\"<?php echo $facet['radius_max']; ?>\"\n value=\"<?php echo $chosen_radius; ?>\"\n />\n <div class=\"facetwp-radius-label\">\n <span class=\"facetwp-radius-dist\"><?php echo $chosen_radius; ?></span>\n <span class=\"facetwp-radius-unit\"><?php echo $facet['unit']; ?></span>\n </div>\n </div>\n\n <?php elseif ( 'none' == $radius_ui ) : ?>\n\n <input class=\"facetwp-radius facetwp-hidden\" value=\"<?php echo $chosen_radius; ?>\" />\n\n <?php endif; ?>\n\n <div class=\"facetwp-hidden\">\n <input type=\"text\" class=\"facetwp-lat\" value=\"<?php echo esc_attr( $lat ); ?>\" />\n <input type=\"text\" class=\"facetwp-lng\" value=\"<?php echo esc_attr( $lng ); ?>\" />\n </div>\n<?php\n return ob_get_clean();\n }", "public function render()\n {\n $loggedUser = Auth::guard('moonlight')->user();\n $site = App::make('site');\n\n $currentClassId = $this->currentElement ? $site->getClassId($this->currentElement) : null;\n $parentClassId = $this->parentNode ? $site->getClassId($this->parentNode) : null;\n\n $bindings = $this->parentNode\n ? $this->rubric->getBindingsByClass($site->getClass($this->parentNode))\n : $this->rubric->getRootBindings();\n $elements = [];\n\n foreach ($bindings as $binding) {\n $item = $site->getItemByClassName($binding->className);\n $mainProperty = $item->getMainProperty();\n $rubricElements = $this->rubric->getElements($binding->className, $this->parentNode, $binding->clause);\n\n foreach ($rubricElements as $element) {\n $elementClassId = $site->getClassId($element);\n $open = Cache::get(\"rubric_node_{$loggedUser->id}_{$this->rubric->getName()}_{$elementClassId}\", false);\n $count = $this->getCount($element);\n\n $children = $open && $count\n ? (new RubricNode($this->rubric, $element, $this->currentElement))->render()\n : null;\n\n $elements[] = (object) [\n 'item_name' => $item->getName(),\n 'item_title' => $item->getTitle(),\n 'browse_url' => $site->getBrowseUrl($element),\n 'edit_url' => $site->getEditUrl($element),\n 'class_id' => $site->getClassId($element),\n 'name' => $element->{$mainProperty},\n 'children' => $children,\n 'has_children' => $count,\n ];\n }\n }\n\n return view('moonlight::components.rubrics.node', [\n 'elements' => $elements,\n 'name' => $this->rubric->getName(),\n 'bind' => 0,\n 'currentClassId' => $currentClassId,\n 'parentClassId' => $parentClassId,\n ]);\n }", "function areaofacircle($radius){\r\n$pie = 3.142;\r\n $area = $pie * $radius * $radius;\r\n return $area;\r\n}", "public function getComponents();", "public function getComponents();", "function getCircle(){\n\n include \"../php/circleObtainment.php\";\n\n return $getCircleFetch;\n\n }", "function getArrayCampos() {\n\t\t$arr = array(\n\t\t\t\"id\"=>$this->id,\n\t\t\t\"idov\"=>$this->idov,\n\t\t\t\"ordinal\"=>$this->ordinal,\n\t\t\t\"visible\"=>$this->visible,\n\t\t\t\"iconoov\"=>$this->iconoov,\n\t\t\t\"name\"=>$this->name,\n\t\t\t\"idov_refered\"=>$this->idov_refered,\n\t\t\t\"idresource_refered\"=>$this->idresource_refered,\n\t\t\t\"type\"=>$this->type\n\t\t);\n\t\treturn $arr;\n\t}", "public function format(): array\n {\n return [\n 'name' => 'click',\n 'selector' => $this->selector,\n 'amount' => $this->amount,\n 'button' => $this->button,\n ];\n }", "public function render(): array\n {\n return array_merge($this->attributes, [\n 'cols' => $this->table->toArray()\n ]);\n }", "function as_array()\n\t{\n\t\t$arr = array(\n\t\t\t'x' => array(),\n\t\t\t'y' => array(),\n\t\t\t'label' => array()\n\t\t);\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\t$arr['x'][] = array($value['left'], $value['right']);\n\t\t\t$arr['y'][] = $index;\n\t\t\t$arr['label'][] = (isset($value[self::TOOLTIP]) ? $value[self::TOOLTIP] : null);\n\t\t}\n\n\t\treturn $arr;\n\t}", "public function getRadius()\r\n {\r\n return $this->radius;\r\n }", "public final function data($xCenter,$yCenter,$radius)\n {\n $result = array(['i' => 0, 'x' => 0, 'y' => 0]);\n $names = file($this->path_to_files.'names.txt');\n\n $first = $this->getBorder($names,$xCenter - $radius);\n $last = $this->getBorder($names, $xCenter + $radius, $first);\n\n for ($i = $first; $i <= $last; $i++) {\n $points = file($this->getFileName($names[$i]));\n foreach ($points as $point) {\n $arr = explode(\";\", $point, 3);\n if($this->checkInDisc($xCenter,$yCenter,$radius,$arr)) {\n array_push($result, ['i' => $arr[0], 'x' => $arr[1], 'y' => (float)$arr[2]]);\n }\n }\n }\n\n return json_encode($result);\n }", "public function providerBuildImage()\n {\n\n return [\n [\n ['action' => 'scale_and_crop', 'width' => 40, 'height' => '25%'],\n ['action' => 'scale_and_crop', 'width' => 40, 'height' => 125],\n ],\n [\n ['action' => 'scale', 'width' => 40],\n ['action' => 'scale', 'width' => 40],\n ],\n [\n ['action' => 'scale', 'width' => '50%'],\n ['action' => 'scale', 'width' => 250],\n ],\n [\n ['action' => 'crop', 'height' => '50%', 'yoffset' => 20],\n ['action' => 'crop', 'height' => 250, 'yoffset' => 20],\n ],\n [\n ['action' => 'crop', 'height' => 20, 'yoffset' => 'bottom'],\n ['action' => 'crop', 'height' => 20, 'yoffset' => 480],\n ],\n [\n ['action' => 'crop', 'width' => '50%', 'xoffset' => 'center'],\n ['action' => 'crop', 'width' => '250', 'xoffset' => 125],\n ],\n [\n ['action' => 'crop', 'width' => '20', 'xoffset' => 'left'],\n ['action' => 'crop', 'width' => '20', 'xoffset' => 0],\n ],\n ];\n }", "function toHtml()\n {\n $arr_return = parent::toHtml();\n $arr_return['html'] = '';\n $arr_radios = array();\n $arr_radios = $this->getAttribute('radios');\n $checked = $this->getAttribute('checked');\n $id = $this->getAttribute('id');\n if (is_array($arr_radios))\n {\n foreach ($arr_radios as $key => $value)\n {\n $encode_key = str_replace(' ', '_', $key);\n \n $arr_return['html'] .= '<input {attr_name=attr_value} {extra_attr} id=\"'\n .\"${id}_$encode_key\".'\" value=\"'.$key.'\"';\n $arr_return['html'] .= ($key == $checked)? ' checked' : '';\n $arr_return['html'] .= '%id|checked|radios|separator% />';\n $arr_return['html'] .= ($value != '')? \n '<label for=\"{attr_id}_'.$encode_key.'\">'.$value.'</label>' : '';\n $arr_return['html'] .= $this->arr_attr['separator'].\"\\n\";\n }\n }\n return $arr_return;\n }", "public function render(){\n\t\treturn json_encode($this->data,$this->options);\n\t}", "public function grid() : array\r\n {\r\n return [];\r\n }", "public static function renderRadio();", "public function getImageArray();", "public function circle($value)\n {\n $this->setProperty('circle', $value);\n return $this;\n }", "public static function CircleDefinition($name, $center, $radius, $tagName1 = null, $tagName2 = null, $coord_type = null)\n {\n $res = '<' . $name . '>';\n $res .= '<center>' . $center[0] . ' ' . $center[1] . '</center>';\n $res .= '<radius>' . $radius . '</radius>';\n if ($tagName1)\n $res .= '<coord1_tag_name>' . $tagName1 . '</coord1_tag_name>';\n if ($tagName2)\n $res .= '<coord2_tag_name>' . $tagName2 . '</coord2_tag_name>';\n if ($coord_type)\n $res .= '<coord_type>' . $coord_type . '</coord_type>';\n $res .= '</' . $name . '>';\n return $res;\n }", "public function render() {\r\n\t\treturn $this->arguments['media'][$this->arguments['position']];\r\n\t}", "function getArray() {\n\treturn array('Red', 'Green', 'Blue');\n}", "public function render()\n {\n return $this->data;\n }", "public function render(){\n\t\t$html = '<li class=\"addToGroupButton\" style=\"float: left; color: #333333;\nfont-size: 110%;\ntext-decoration: none;\nbackground-color: rgba( 255, 255, 255, 0.5 );\ndisplay: block;\nfloat: left;\nmargin-right: 1rem;\nheight: 2.2rem;\nline-height: 2.2rem;\npadding-left: 2.3rem;\npadding-right: 1rem;\nbackground-repeat: no-repeat;\nbackground-size: 1.8rem;\nbackground-position: 0.3rem 0.3rem;\nposition: relative;\ntop: 50%;\nmargin-top: -1.1em;\n\" ><span>Dodaj do grupy</span><ul class=\"addToGroupList\" style=\"\" >';\n\t\tforeach( $this->positions as $position){\n\t\t\t$html .= $position->render();\n\t\t}\n\t\t$html .= '</ul></li>';\n\t\t\n\t\treturn $html;\n\t}", "public function getGfxData()\n {\n return $this->barList;\n }", "public function getShape2()\n {\n }", "public function getElements() {\n\t\treturn $this->renderables;\n\t}" ]
[ "0.7145182", "0.65856636", "0.62163293", "0.6121456", "0.57672566", "0.56802696", "0.56290853", "0.55994457", "0.5511177", "0.5419719", "0.53908145", "0.53700453", "0.53474295", "0.53430283", "0.5291359", "0.5279379", "0.5256886", "0.5228608", "0.522236", "0.5215148", "0.52055246", "0.52005166", "0.5170564", "0.5145116", "0.5141681", "0.51194346", "0.51190704", "0.5074389", "0.50722957", "0.50683427", "0.506492", "0.50486445", "0.50341064", "0.5030382", "0.5010577", "0.50101304", "0.4970827", "0.49480352", "0.4944028", "0.49413517", "0.49122718", "0.49078888", "0.4901775", "0.49017388", "0.49017388", "0.49017388", "0.49017388", "0.49017388", "0.49017388", "0.48388177", "0.48285666", "0.48245442", "0.48190588", "0.4816168", "0.4811465", "0.48111594", "0.48095903", "0.48062575", "0.48059717", "0.47959697", "0.47926137", "0.47869086", "0.47672668", "0.47646585", "0.4761349", "0.4760651", "0.4744228", "0.47239333", "0.4713327", "0.47129115", "0.4705548", "0.47023228", "0.47020635", "0.4701515", "0.4698504", "0.4695375", "0.46864593", "0.46823525", "0.46823525", "0.46773627", "0.46715546", "0.4668007", "0.46611756", "0.46546972", "0.46486792", "0.46387458", "0.46369994", "0.46306407", "0.46265182", "0.4615174", "0.46126056", "0.46105745", "0.4595207", "0.45880824", "0.4580017", "0.4577472", "0.45735383", "0.45695183", "0.4567099", "0.45618865", "0.45545885" ]
0.0
-1
Get all of the tasks for the user.
public function user() { return $this->belongsTo(User::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTasks();", "public function getTasks();", "public function getAllTasks()\n\t{\n\t\treturn $this->task->orderBy('is_completed', 'ASC')->get();\t\n\t}", "public function forUser(User $user)\r\n {\r\n return tasks::where('user_id', $user->id)\r\n ->orderBy('created_date', 'asc')\r\n ->get();\r\n }", "public function getTasks()\n\t{\n\t\t$users = Task::all();\n\t\treturn Response::json($users);\n\t}", "function GetTasks()\n\t{\n\t\t$result = $this->sendRequest(\"GetTasks\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function actionTasks(){\n\t\t$userIdtmp = XenForo_Visitor::getUserId();\n\t\t$conditions = array('userId' => $userIdtmp);\n\t\t$order_items = $this->_getOrderItemModel()->getAllOrderItem($conditions);\n\t\t\n\t\t$viewParams = array(\n\t\t\t'tasks' => $order_items\n\t\t);\n\t\t\n\t\treturn $this -> responseView('DTUI_ViewPublic_EntryPoint_Tasks','dtui_task_list',$viewParams);\n\t}", "public function list()\n\t\t{\n\t return Task::all();\n\t\t}", "public function get_tasks()\n\t{\n\t\t$tasks = Auth::user()->tasks;\n\n\t\treturn View::make('index', array('tasks' => $tasks));\n\t}", "static function getTasks($application=\"all\", $userName=\"\"){\n $usr = (!$userName)? (self::getUser()) : ($userName);\n $result = Array();\n return $result;\n }", "public function getTasks()\n {\n return $this->tasks;\n }", "public function getTasks()\n {\n return $this->hasMany(Task::className(), ['author_id' => 'id']);\n }", "public function fetch_all_tasks()\n {\n //\n }", "public function getTasks()\n {\n return $this->_tasks;\n }", "public function getAllTasks($user=null, $currentPage=null, $number=0)\n\t{\n\t\t$where = array(\n\t\t\t'projectid =' => $this->id,\n\t\t);\n\n\t\treturn $this->getTasksWhere($where, null, $currentPage, $number, $user);\n\t}", "public function showAllTasks() {\n $result = $this->getTask();\n return response()->json($result);\n // return response()->json(Task::all());\n }", "public function avaliable_tasks()\n {\n return DB::table('tasks')\n ->leftJoin('subjects', 'tasks.subject_id', '=', 'subjects.id')\n ->leftJoin('usersubjects', 'subjects.id', '=', 'usersubjects.subject_id')\n ->leftJoin('users', 'usersubjects.user_id', '=', 'users.id')\n ->where('users.id','=',$this->id)\n ->where('tasks.isactive','=',true)\n ->select('subjects.name', 'users.id', 'tasks.*')\n ->get();\n }", "public function getUserTasks($id){\n\t\t$sql = \"SELECT $this->tableUserTask.id_task,task.title, task.description,$this->tableUserTask.assignment_date,$this->tableUserTask.completed FROM {$this->tableUserTask} JOIN task ON $this->tableUserTask.id_task = task.id_task JOIN user ON $this->tableUserTask.id_user = user.id_user WHERE user.id_user='{$id}'\";\n\t\t$query = mysqli_query($this->conn,$sql);\n\t\tif($query){\n\t\t\treturn mysqli_fetch_all($query,MYSQLI_ASSOC);\n\t\t}else{\n\t\t\techo \"No tasks assigned\";\n\t\t}\n\t}", "public function listTasks()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\n\t\t$tasksReg = 0;\n\t\t$tasksNew = 0;\n\t\t$tasksDue = 0;\n\t\t$arrReturn = array();\n\n\t\t$objTask = $this->Database->prepare(\"SELECT t.deadline, s.status, s.assignedTo FROM tl_task t LEFT JOIN tl_task_status s ON t.id=s.pid AND s.tstamp=(SELECT MAX(tstamp) FROM tl_task_status ts WHERE ts.pid=t.id)\" . (!$this->User->isAdmin ? \" WHERE (t.createdBy=? OR s.assignedTo=?)\" : \"\"))\n\t\t\t\t\t\t\t\t ->execute($this->User->id, $this->User->id);\n\n\t\tif ($objTask->numRows) \n\t\t{\n\t\t\t$time = time();\n\n\t\t\twhile ($objTask->next())\n\t\t\t{\n\t\t\t\tif ($objTask->status == 'completed')\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($objTask->deadline <= $time)\n\t\t\t\t{\n\t\t\t\t\t++$tasksDue;\n\t\t\t\t}\n\t\t\t\telseif ($objTask->status == 'created' && $objTask->assignedTo == $this->User->id)\n\t\t\t\t{\n\t\t\t\t\t++$tasksNew;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++$tasksReg;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($tasksReg > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_info\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksCur'], $tasksReg) . '</p>';\n\t\t\t}\n\n\t\t\tif ($tasksNew > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_new\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksNew'], $tasksNew) . '</p>';\n\t\t\t}\n\n\t\t\tif ($tasksDue > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_error\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksDue'], $tasksDue) . '</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn implode(\"\\n\", $arrReturn);\n\t}", "public static function tasks ()\r\n {\r\n $acl = Session::get('acl');\r\n return $acl['tasks'];\r\n }", "public function getTasks() {\n\t\treturn $this->tasks;\n\t}", "public function getTasks() {\n\t\treturn $this->tasks;\n\t}", "public function getTasks()\n {\n \tif ($this->tasks == null) {\n \t\t$this->tasks = $this->itemLinkService->getLinkedItemsOfType($this->me(), 'from', 'Task');\n \t}\n \treturn $this->tasks;\n }", "public function get()\n {\n return $this->tasks;\n }", "public function index()\n {\n return $this->task->all();\n }", "public function index()\n {\n $task = Task::where('user_id', auth()->user()->id)->get();\n return TaskResource::collection($task);\n }", "public function getTasks()\r\n\t{\r\n\t\t$tasks = array();\r\n\t\t$sql = sprintf('\r\n\t\t\tSELECT\r\n\t\t\t\tid, title\r\n\t\t\tFROM\r\n\t\t\t\ttask\r\n\t\t');\t\t\r\n\r\n\t\t$result = mysqli_query($this->db, $sql);\r\n\r\n\t\twhile ($row = $result->fetch_object())\r\n\t\t{\r\n\t\t\t$task = new Task();\r\n\t\t\t$task->id = $row->id;\r\n\t\t\t$task->title = $row->title;\r\n\r\n\t\t\t$tasks[] = json_decode((string)$task);\r\n\t\t}\r\n\r\n\t\t$result->close();\r\n\r\n\t\treturn json_encode($tasks);\r\n\t}", "public function all($options = [])\n {\n list($code, $tasks) = $this->httpClient->get(\"/tasks\", $options);\n return $tasks; \n }", "public function index()\n {\n $this->authorize('viewAny', Task::class);\n\n return TaskResource::collection(\n Task::where('user_id', Auth::user()->id)->get()\n );\n }", "public function index(Request $request)\n {\n $user = $request->user();\n return $user->tasks;\n }", "public function index()\n {\n return Task::all();\n }", "public function index()\n {\n return Task::all();\n }", "public function index()\n {\n return Task::all();\n }", "public function get()\n {\n $allTasks = Task::all();\n return response()->json($allTasks);\n }", "public function index()\n {\n return task::all();\n }", "public function getAll()\n {\n return $this->taskResourceModel->getAll();\n }", "public function index(Request $request)\n {\n return Task::with('user')->get();\n }", "public function admin_tasks_list(){\n \n //$tasks = Task::find(2)->Task()->User()->get();\n //$users = $tasks->user;\n $tasks = Task::with('user')->get();\n $users = User::get();\n //dd($users);\n //$tasks = Task::with('user')->get();\n //echo $tasks->user()->username;\n //dd($tasks);\n return view('admin.task', array(\n 'tasks' => $tasks,\n 'users' => $users\n ));\n //['tasks' => Task::with('user')->get()]);\n }", "public function index()\n {\n // ->paginate(3);\n $tasks = QueryBuilder::for(Task::class)\n ->allowedIncludes(['project', 'user'])\n ->allowedFilters(['completed', 'due_date', Filter::exact('user_id'),Filter::exact('project_id')])\n ->get();\n\n\n return TaskResource::collection($tasks);\n }", "function getTaskList()\n\t{\n\t\t//Update Task List\n\t\t$this->Task_List = null;\n\t\t$assigned_tasks_rows = returnRowsDeveloperAssignments($this->getUsername(), 'Task');\n\t\tforeach($assigned_tasks_rows as $assigned_task)\n\t\t\t$this->Task_List[] = new Tasks( $assigned_task['ClientProjectTask'] );\n\t\treturn $this->Task_List;\n\t}", "public function index()\n {\n $tasks = auth()->user()->tasks()->with('category', 'comments', 'files')->paginate(100);\n return TaskResource::collection($tasks);\n }", "public function gettask()\n {\n return $this->db->get(\"tm_task\")->result_array();\n }", "public function getTasks()\n {\n return $this->hasMany(Task::className(), ['contractor_id' => 'id']);\n }", "public function index()\n {\n $tasks = $this->task->paginate();\n\n return new TaskCollection($tasks);\n }", "public static function getTaskList()\n {\n $db = Db::getConnection();\n\n $result = $db->query('SELECT id, name, email, message, date FROM tasks ORDER BY id DESC');\n $tasksList = array();\n $i = 0;\n while ($row = $result->fetch()) {\n $tasksList[$i]['id'] = $row['id'];\n $tasksList[$i]['name'] = $row['name'];\n $tasksList[$i]['email'] = $row['email'];\n $tasksList[$i]['message'] = $row['message'];\n $tasksList[$i]['date'] = $row['date'];\n $i++;\n }\n return $tasksList;\n }", "function get_user_tasks($user, $session_uid, $json=false,$limit=0, $where_attr='', $administrator=false) {\r\n global $conn, $task_attributes;\r\n $out = '{\"content\": []}';\r\n if (isset($conn)) {\r\n //make everything safe to use\r\n $user = make_safe($user);\r\n $session_uid = make_safe($session_uid);\r\n $limit = is_int($limit) ? $limit : 0;\r\n $where_attr = make_safe($where_attr);\r\n $adinistrator = $administrator===true ? true : false;\r\n\r\n //verify user's access before continuing\r\n if (verify_access($user, $session_uid)) {\r\n //get a list of all accessible tasks using get_accessible_tasks function\r\n $accessible_tasks = get_accessible_tasks($user, $administrator, $conn);\r\n\r\n //make where string\r\n $where_string = $where_attr==='' ? '' : \" AND $where_attr\";\r\n //return $where_attr;\r\n\r\n $task_db_results = array();\r\n //for all the available tasks, query them\r\n foreach($accessible_tasks as $task_id) {\r\n //prepare statement\r\n $q = \"SELECT * FROM tasks WHERE id=$task_id $where_string\";\r\n //query statement\r\n if ($qres = $conn->query($q)) {\r\n //add results to $task_db_results\r\n $qres->data_seek(0);\r\n array_push($task_db_results, $qres->fetch_assoc());\r\n //close query\r\n $qres->close();\r\n }\r\n }\r\n //if the limit is specified, shorten the results to the limit length\r\n if ($limit > 1) {\r\n $task_db_results = array_slice($task_db_results, 0, $limit);\r\n }\r\n\r\n if ($json==false) {\r\n return $json;\r\n return $task_db_results;\r\n }\r\n //write the output as json in the $out string\r\n $out = '{\"content\":[ ';\r\n foreach ($task_db_results as $row) {\r\n if (is_array($row)) {\r\n $out = $out.'{';\r\n foreach ($row as $key => $value) {\r\n $out = $out.'\"'.$key.'\":\"'.$value.'\",';\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.'},';\r\n } else {\r\n $out = $out.'\"\",';\r\n }\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.\"]\";\r\n //write types as types attr\r\n $out = $out.',\"types\": [';\r\n foreach($task_attributes as $ind => $type) {\r\n $out = $out.'\"'.$type.'\",';\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.']';\r\n $out = $out.\"}\";\r\n\r\n } else {\r\n return 'hi';\r\n }\r\n }\r\n //return output\r\n return $out;\r\n}", "public function getRegisteredTasks()\n {\n return $this->_registeredTask;\n }", "public function getTasks()\n {\n if ($this->tasks === null) {\n $this->tasks = $this->discoverTaskTypes();\n }\n\n return $this->tasks;\n }", "public function getTasks()\n {\n $sql = \"SELECT workflow.form_steps_id FROM fs_workflow workflow\n LEFT JOIN fs_workstpes task \n ON task.work_id = workflow.form_steps_id\n WHERE workflow.form_name = '$this->wf_name'\n ORDER BY workflow.form_sequence ASC\";\n\n $query = $this->conn->query($sql);\n\n $collection = new ArrayCollection();\n\n while($row = $query->fetch_assoc()) {\n $task = new task($row['form_steps_id']);\n $collection->add($task);\n }\n \n return $collection;\n }", "public function index()\n {\n //If is admin get all tasks\n if(Gate::allows('view_all_tasks_access')){\n $tasks = Task::with(['creator_user','assigned_user'])->get();\n }\n else {\n //If is user get user's tasks\n $loggedUserId = Auth::id();\n $tasks = Task::with(['assigned_user', 'creator_user'])->where('assigned_user_id',$loggedUserId)->get();\n }\n\n return view('tasks.index', compact('tasks'));\n }", "function getTasks(){\r\n $query_result = $this->query(\"SELECT * FROM Task\");\r\n $formated_array = [];\r\n \r\n while($row = $query_result->fetchArray()){\r\n $formated_array[$row['ID']] = $row['task'];\r\n }\r\n\r\n return $formated_array;\r\n }", "public function index($user_id)\n {\n // fetch all tasks based on current user id\n $tasks = Task::all()->where('user_id', $user_id);\n\n // return tasks as a resource\n return TaskResource::collection($tasks);\n }", "public function getTasks()\n {\n return $this->hasMany(Task::className(), ['address_id' => 'id']);\n }", "public function index()\n {\n $tasks = Task::where('is_deleted',false)->with(['filters','country_filter'])->get();\n foreach ($tasks as $task){\n $task->user = User::find($task->user_id);\n }\n return view('admin.tasks.index',compact('tasks'));\n }", "public function actionTasks()\n\t{\n\t\tYii::app()->user->rightsReturnUrl = array('authItem/tasks');\n\t\t\n\t\t$dataProvider = new RAuthItemDataProvider('tasks', array(\n\t\t\t'type'=>CAuthItem::TYPE_TASK,\n\t\t\t'sortable'=>array(\n\t\t\t\t'id'=>'RightsTaskTableSort',\n\t\t\t\t'element'=>'.task-table',\n\t\t\t\t'url'=>$this->createUrl('authItem/sortable'),\n\t\t\t),\n\t\t));\n\n\t\t// Render the view\n\t\t$this->render('tasks', array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'isBizRuleEnabled'=>$this->module->enableBizRule,\n\t\t\t'isBizRuleDataEnabled'=>$this->module->enableBizRuleData,\n\t\t));\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM tbl_task';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function index()\n {\n $tasks = Task::with('user')->orderByDesc('created_at')->get();\n return response([\n 'tasks' => resourceTask::collection($tasks),\n 'message' => 'Retrieved successfully'], 200);\n }", "public function index()\n {\n $taskList = Task::doesntHave('user')->orderBy('deadline', 'asc')->get();\n return view('tasks.tasks', ['taskList' => $taskList]);\n }", "public function getTasks(){\n return Task::with('categories')->get();\n }", "public function index()\n {\n $tasks = $this->user->tasks()->get(['id', 'title', 'description', 'status', 'image_url', 'files_url']);\n foreach ($tasks as $task) {\n $task->files_url = json_decode($task->files_url);\n }\n return response()->json($tasks->toArray());\n }", "public function task_list()\n {\n \t//get list of tasks from database\n \t//instance the class\n $this->load->model('Task_model');\n\t\t$id_user = $this->User_model->getID();\n\t\t$data['name'] = $this->User_model->getID();\n $data['tasks'] = $this->Task_model->getTask(NULL, $this->User_model->getActiveProject());\n\t\t\n \t//load the view associated with this controller\n $this->load->view('header', $data);\n $this->load->view('nav', $data);\n $this->load->view('task/task', $data);\n $this->load->view('footer', $data);\n \t\n }", "function listTasks()\n {\n return view('tasks', [\n 'tasks' => Task::orderBy('created_at', 'asc')->get()\n ]);\n }", "public function index()\n\t{\n\t\t$tasks = Auth::user()->getTasks;\n\t\treturn Response::json(['error' => false , 'tasks' => $tasks->toArray()] , 201 );\n\t}", "public function tasks()\n {\n return $this->hasMany(Task::class);\n }", "public function tasks()\n {\n return $this->hasMany(Task::class);\n }", "public function tasks()\n {\n return $this->hasMany(Task::class);\n }", "public function tasks()\n {\n return $this->hasMany(Task::class);\n }", "public function tasks()\n {\n return $this->hasMany(Task::class);\n }", "public function tasks()\n {\n return $this->hasMany(Task::class);\n }", "public function tasklistsTasks()\n {\n $tasklistsWithTasks = $this->tasklist->with('tasks')->get();\n\n if (!count($tasklistsWithTasks)) {\n return API::throwResourceNotFoundException();\n }\n\n return fractal($tasklistsWithTasks, new TaskListsTransformer())->toArray();\n }", "public function getTasks()\n {\n return $this->hasMany(Tasks::className(), ['city_id' => 'id']);\n }", "public function tasks() {\n\n return $this->hasMany(Task::class);\n }", "public function viewTasks(){\n $task = new Tasks();\n $roles = new Role();\n $resp = $task->read();\n if($resp->status){\n $tasks = $resp->data;\n $temp = array();\n foreach ($tasks as $task){\n $task->mapped_roles = $task->getMappedRoles($task->tasks_id);\n $temp[] = $task;\n }\n $resp->data = $temp;\n }\n $this->data['response_tasks'] = $resp;\n $this->data['response_roles'] = $roles->readAll();\n return $this->view();\n }", "public function completedTasks()\n\t{\n\t\treturn $this->belongsToMany('TGLD\\Tasks\\Task', 'user_completed_task', 'user_id', 'task_id')\n\t\t\t->with('project')\n\t\t\t->orderBy('priority', 'ASC')\n\t\t\t->latest();\n\t}", "public function tasks() {\n return $this->hasMany(Task::class);\n }", "public function fetchAll()\n {\n if ($this->_userId) {\n // get total hours associated\n $join = $this->adapter->quoteInto('user_tasks.task_id = user_tasks_total_hours.task_id ' .\n 'and user_tasks_total_hours.user_id = ?', $this->_userId);\n $this->select->joinLeft('user_tasks_total_hours',\n $join,\n array('total_hours' => new Zend_Db_Expr('ifnull(total_hours,0)')));\n $this->select->where('user_tasks.user_id = ?', $this->_userId);\n }\n\n return parent::fetchAll();\n }", "public function index(Request $request)\n {\n $tasks = $request->user()->tasks()->get();\n // print_r($tasks);\n return response()->json($tasks);\n }", "public function getTasks()\n {\n return $this->hasMany(Task::className(), ['space_room_id' => 'id']);\n }", "public function getGroupsTasks(){\n $tasks = $this->individualGroupModel->getGroupTasks($_SESSION['current_group']);\n\n echo json_encode($tasks);\n }", "public function index()\n {\n $tasks = auth()->user()->tasks()->get();\n\n return view('tasks.index', compact('tasks'));\n }", "public function getContainedTasks($user=null, $currentPage=null, $number=0)\n\t{\n\t\t$ids = array($this->id);\n\t\t$ids = array_merge($ids, $this->getChildIds(true, 1));\n\t\t\n\t\t$where = array(\n\t\t\t'projectid' => $ids,\n\t\t);\n\n\t\treturn $this->getTasksWhere($where, null, $currentPage, $number, $user);\n\t}", "public function startedTasks()\n\t{\n\t\treturn $this->belongsToMany('TGLD\\Tasks\\Task', 'user_started_task', 'user_id', 'task_id')\n\t\t\t->with('project')\n\t\t\t->orderBy('priority', 'ASC')\n\t\t\t->latest();\n\t}", "public static function getTasks($params)\r\n {\r\n $database = new Database();\r\n $dbConn = $database->getConnection();\r\n\r\n // select all query\r\n $query = '';\r\n\r\n $query .= \"SELECT c.company_name,p.project_name, u1.nickname as assigned_user_nickname,u2.nickname as creator_user_nickname, COUNT(n.ID) as notes_count, t.* FROM tasks t LEFT JOIN users u1 ON u1.ID=t.assigned_user_id LEFT JOIN users u2 ON u2.ID=t.creator_user_id INNER JOIN projects p ON t.related_table_id=p.ID INNER JOIN companies c ON c.ID=p.company_id LEFT JOIN notes n ON t.ID=n.related_table_id AND n.related_table='tasks' WHERE t.related_table='projects' AND t.status = 'not_started'\";\r\n\r\n if (isset($params['assignedUserId']) && is_numeric($params['assignedUserId']))\r\n $query .= \" AND t.assigned_user_id=\" . $params['assignedUserId'];\r\n\r\n $query .= \" GROUP BY t.ID\";\r\n $query .= \" ORDER BY t.due_date ASC\";\r\n //$query .= \" LIMIT 1000, 500\";\r\n\r\n // prepare query statement\r\n $stmt = $dbConn->prepare($query);\r\n\r\n // execute query\r\n $stmt->execute();\r\n\r\n $numRows = $stmt->rowCount();\r\n\r\n $tasksArray = array();\r\n\r\n if ($numRows > 0) {\r\n // retrieve our table contents\r\n // fetch() is faster than fetchAll()\r\n // http://stackoverflow.com/questions/2770630/pdofetchall-vs-pdofetch-in-a-loop\r\n\r\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\r\n $taskItem = array(\r\n 'ID' => $row['ID'],\r\n 'title' => $row['title'],\r\n 'description' => $row['description'],\r\n 'assignedUserNickname' => $row['assigned_user_nickname'],\r\n 'creatorUserNickname' => $row['creator_user_nickname'],\r\n 'projectName' => $row['project_name'],\r\n 'companyName' => $row['company_name'],\r\n 'dueDate' => $row['due_date'],\r\n 'notesCount' => $row['notes_count']\r\n\r\n );\r\n\r\n array_push($tasksArray, $taskItem);\r\n }\r\n }\r\n\r\n return $tasksArray;\r\n }", "public function testGetUserTasks()\n {\n $userId = User::first()->value('id');\n $user = User::find($userId);\n $tasks = $user->tasks()->get()->toArray();\n\n $response = $this->json('GET', '/api/v1.0.0/users/'.$userId.'/tasks');\n\n $response\n ->assertStatus(200)\n ->assertExactJson($tasks);\n }", "public function getArray() {\n return $tasks = \\App\\Task::with('goal')->get();\n }", "public function listTasks()\n {\n $arr_tasks = [];\n $obj_request = new TaskQueueQueryTasksRequest();\n $obj_response = new TaskQueueQueryTasksResponse();\n $obj_request->setQueueName($this->str_name);\n $obj_request->setMaxRows(self::MAX_LIST_ROWS);\n $this->makeCall('QueryTasks', $obj_request, $obj_response);\n if ($obj_response->getTaskSize() > 0) {\n foreach ($obj_response->getTaskList() as $obj_source_task) {\n /** @var \\google\\appengine\\TaskQueueQueryTasksResponse\\Task $obj_source_task */\n $arr_tasks[] = (new Task())\n ->setName($obj_source_task->getTaskName())\n ->setPayload($obj_source_task->getBody())\n ->setEta($obj_source_task->getEtaUsec() / 1e6);\n }\n }\n return $arr_tasks;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('tBundle:UserToTask')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function getAll($accountId = null) {\n global $registry;\n\n $taskIds = [];\n $tasks = [];\n\n // Take all IDs of Tasks\n $taskIds = $registry->call('tasks/listUids');\n\n // Iterate through all IDs and export for each ID an iCal task\n foreach ($taskIds as $id) {\n $iCalTask = $registry->call('tasks/export', array($id, 'text/calendar'));\n array_push($tasks, $iCalTask);\n }\n\n return $tasks;\n }", "public function getTasks()\n {\n if (array_key_exists(\"tasks\", $this->_propDict)) {\n return $this->_propDict[\"tasks\"];\n } else {\n return null;\n }\n }", "public function index()\n\t{\n\t\tView::share('title', 'ThinkClosing - Tasks');\n\t\tif ( !Auth::user()->isAdmin() ) {\n\t\t\t$tasks = Task::where('user_id', '=', Auth::user()->id)\n\t\t\t\t->paginate(10);\n\t\t} else {\n\t\t\t$tasks = Task::where('id', '>', 0)->paginate(10);\n\t\t}\n\t\treturn View::make('tasks.index', array('tasks' => $tasks));\n\t}", "public function getTask()\n {\n try {\n $data = array();\n\n $userId = auth::user()->id;\n $user = User::where('id', $userId)->first();\n $levelId = ManageClass::where('id', $user->classId)->value('levelId');\n\n if ($user->isPassOut == 1) {\n $manageTaskQuarter = ManageTaskQuarter::where([['dateFrom', '<=', date('Y-m-d', strtotime(Carbon::now()))], ['dateTo', '>=', date('Y-m-d', strtotime(Carbon::now()))]])->whereNotIn('taskLevelId', [1])->first();\n if ($manageTaskQuarter == null) {\n goto a;\n } else {\n $topRankedUser = TopRankedUser::where([\n ['userId', $userId],\n ['levelId', $levelId],\n ['taskLevelId', $manageTaskQuarter->taskLevelId],\n ['taskQuarterId', $manageTaskQuarter->id],\n ])->first();\n if (!is_null($topRankedUser)) {\n return response()->json(['status' => 1, 'msg' => 'You have entered to top 100', \"payload\" => ['data' => $data]], config('constants.ok'));\n } else {\n $manageTasks = ManageTasks::where([\n ['taskLevelId', $manageTaskQuarter->taskLevelId],\n ['taskQuarterId', $manageTaskQuarter->id],\n ['levelId', $levelId],\n ['status', '1']\n ])->get();\n }\n }\n } else {\n $manageTaskQuarter = ManageTaskQuarter::where('taskLevelId', 1)->first();\n $manageTasks = ManageTasks::where([\n ['taskLevelId', 1],\n ['levelId', $levelId],\n ['status', '1']\n ])->get();\n }\n\n foreach ($manageTasks as $temp) {\n $taskResult = TaskResult::where([['taskId', $temp->id], ['userId', $userId]])->orderBy('id', 'desc')->first();\n $data[] = array(\n 'id' => $temp->id,\n 'taskLevelId' => $temp->taskLevelId,\n 'taskLevel' => ManageTaskLevel::where('id', $temp->taskLevelId)->value('title'),\n 'taskQuarterTitle' => $manageTaskQuarter->title,\n 'taskQuarterFrom' => date('d-m-Y', strtotime($manageTaskQuarter->dateFrom)),\n 'taskQuarterTo' => date('d-m-Y', strtotime($manageTaskQuarter->dateTo)),\n 'title' => $temp->title,\n 'point' => $temp->point,\n 'description' => $temp->description,\n 'image' => $this->picUrl($temp->image, 'taskQuestionPic', $this->platform),\n 'status' => ($taskResult == null) ? config('constants.notAttempted') : $taskResult->status,\n );\n }\n\n if (!empty($data)) {\n return response()->json(['status' => 1, 'msg' => config('constants.successMsg'), \"payload\" => ['data' => $data]], config('constants.ok'));\n } else {\n a:\n return response()->json(['status' => 0, 'msg' => 'No task found', \"payload\" => (object)[]], config('constants.ok'));\n }\n } catch (Exception $e) {\n return response()->json(['status' => 0, 'msg' => config('constants.serverErrMsg'), 'payload' => (object) []], config('constants.serverErr'));\n }\n }", "public function index(Request $request)\n {\n //$tasks = $request->user()->tasks()->get();\n \n// return view('tasks.index',[\n// 'tasks' => $tasks,\n// ]);\n \n return view('tasks.index',[\n 'tasks' => $this->tasks->forUser($request->user()),\n ]);\n }", "public function getAvailableTasks();", "public function index()\n {\n $tasks = Task::where('user_id', Auth::user()->id)->get();\n return view('task.index', compact('tasks'));\n\n }", "public function acceptedTasks()\n\t{\n\t\treturn $this->belongsToMany('TGLD\\Tasks\\Task', 'user_accepted_task', 'user_id', 'task_id')\n\t\t\t->with('project')\n\t\t\t->orderBy('priority', 'ASC')\n\t\t\t->latest();\n\t}", "public function index()\n\t{\n\t\t$tasks = $this->task->all();\n\t\treturn $this->response($tasks, self::OK);\n\t}", "public function tasks()\n {\n return $this->hasMany('App\\Model\\Task');\n }", "public function actionIndex()\n {\n $request = $this->getApp()->getRequest();\n $sortByUsername = strtoupper($request->param('username', ''));\n $sortByEmail = strtoupper($request->param('email', ''));\n $sortByStatus = strtoupper($request->param('status', ''));\n $page = $request->param('page', 1);\n\n $perPage = self::PER_PAGE;\n\n if (!$sortByUsername && !$sortByEmail && !$sortByStatus) {\n $tasks = $this->getDb()->tasks()->paged($perPage, $page);\n }\n if ($sortByUsername) {\n $tasks = $this->getDb()->tasks()->orderBy('username', $sortByUsername)->paged($perPage, $page);\n }\n if ($sortByEmail) {\n $tasks = $this->getDb()->tasks()->orderBy('email', $sortByEmail)->paged($perPage, $page);\n }\n if ($sortByStatus) {\n $tasks = $this->getDb()->tasks()->orderBy('status', $sortByStatus)->paged($perPage, $page);\n }\n\n $rows = $tasks->fetchAll();\n\n $pagesTotal = $this->getDb()->tasks()->count();\n $pagination = new Pagination($perPage, $pagesTotal);\n $pagination->page = $page;\n $pagination->url = \"/tasks?username=$sortByUsername&email=$sortByEmail&status=$sortByStatus&page=\";\n\n $canAccept = $this->isAdmin();\n\n return $this->render(\n 'task.index', compact(\n 'rows',\n 'sortByUsername',\n 'sortByEmail',\n 'sortByStatus',\n 'page',\n 'pagesTotal',\n 'perPage',\n 'canAccept',\n 'pagination'\n )\n );\n }", "public function index()\n {\n if (Auth::check()) {\n $tasks = Task::where('user_id', Auth::id())->get();\n return view('tasks.index', compact('tasks'));\n }\n }", "public function forUser()\n {\n return TestUploadAdmin::orderBy('task_id', 'asc')\n ->orderBy('user_id', 'asc')\n ->orderBy('created_at', 'desc')\n ->paginate(10);\n }", "public function index()\n {\n $tasks = Task::all('id', 'name', 'done');\n return response()->json($tasks, 200);\n }" ]
[ "0.7702231", "0.7702231", "0.76288015", "0.7601574", "0.75348604", "0.7493974", "0.7366935", "0.7338981", "0.72239435", "0.7213353", "0.7186927", "0.71557593", "0.71499896", "0.71365815", "0.71266425", "0.71171784", "0.7110398", "0.70817596", "0.70734525", "0.70730996", "0.70571214", "0.70571214", "0.7047334", "0.69635504", "0.69266856", "0.68802786", "0.68666106", "0.6853246", "0.68529636", "0.68400985", "0.6731071", "0.6731071", "0.6731071", "0.6730761", "0.6691951", "0.66899973", "0.66798854", "0.6649038", "0.6645415", "0.66337293", "0.6626006", "0.66246384", "0.66182625", "0.6601988", "0.65975434", "0.6589835", "0.6581523", "0.6565602", "0.6550662", "0.6548219", "0.6542741", "0.6534379", "0.65275854", "0.6515895", "0.64977574", "0.6482096", "0.64705074", "0.64704555", "0.64629924", "0.643924", "0.64363307", "0.6432941", "0.6423883", "0.6414899", "0.6414899", "0.6414899", "0.6414899", "0.6414899", "0.6414899", "0.64010733", "0.6401007", "0.6397178", "0.6389445", "0.63886887", "0.63836974", "0.6381967", "0.63731533", "0.6372245", "0.6364485", "0.6363663", "0.6359473", "0.6342469", "0.6341273", "0.63315135", "0.6311445", "0.630687", "0.6291919", "0.6286033", "0.6284655", "0.627895", "0.62774056", "0.62680304", "0.6263022", "0.6257117", "0.62426263", "0.6229898", "0.62043077", "0.61981153", "0.6194204", "0.6189501", "0.61793345" ]
0.0
-1
Initializes the controller before invoking an action method.
protected function initializeAction() { $this->pageRenderer->addCssFile(t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/StyleSheet/module.css'); $this->pageRenderer->addInlineLanguageLabelFile('EXT:smoothmigration/Resources/Private/Language/locallang.xml'); $this->pageRenderer->addJsLibrary('jquery', t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/jquery-1.10.1.min.js'); $this->pageRenderer->addJsLibrary('sprintf', t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/sprintf.min.js'); $this->pageRenderer->addJsFile(t3lib_extMgm::extRelPath('smoothmigration') . 'Resources/Public/JavaScript/General.js'); if (t3lib_div::int_from_ver(TYPO3_version) > 6001000) { $this->moduleToken = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get()->generateToken('moduleCall', 'tools_SmoothmigrationSmoothmigration'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeController() {}", "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}", "protected function initializeAction() {\n\t\t$this->akismetService->setCurrentRequest($this->request->getHttpRequest());\n\t}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initAction()\n {\n }", "public function initializeAction() {\n\n\t}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function init()\n {\n $controller = $this->router->getController();\n $action = $this->router->getAction();\n $params = $this->router->getParams();\n\n $objController = registerObject($controller);\n\n call_user_func_array([$objController, $action], $params);\n }", "protected function _initControllers()\n\t{\n\t\treturn;\n\t}", "public function initController()\n {\n $this->model = new AliveSettingServiceMeta();\n\n $this->middleware([\n\n ]);\n }", "protected function initializeAction() {\n\t\t/* Merge flexform and setup settings\n\t\t * \n\t\t */\n\t\t$this->settings['action'] = $this->actionMethodName;\n\t}", "protected function preRunController()\n {\n $annotations = $this->controller->getControllerAnnotationParser()->getAnnotationsForMethod($this->action);\n\n if ($annotations->has(\"AuthRequired\")) {\n if (!$this->getApplicationSession()->isSessionActive()) {\n $this->reRouteTo(\"login\", \"prompt\");\n }\n }\n\n if ($annotations->has(\"LogInNotPermitted\")) {\n if ($this->getApplicationSession()->isSessionActive()) {\n $this->redirectTo(\"main\");\n }\n }\n }", "public function initialize()\n {\n parent::initialize();\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie');\n $this->cors();\n\n $currentController = $this->request->getParam('controller');\n // pr($currentController); die();\n if($currentController == 'Tenants'){\n $currentController = 'TenantUsers';\n }\n if($currentController == 'CorporateClients'){\n $currentController = 'CorporateClientUsers';\n // pr($currentController);die();\n }\n // $currentController = $this->request->params['controller'];\n $loginAction = $this->Cookie->read('loginAction');\n if(!$loginAction){\n $loginAction = ['controller' => $currentController,'action' => 'login'];\n }\n // pr($loginAction);die;\n $this->loadComponent('Auth',[\n 'loginAction' => ['controller' => $currentController,'action' => 'login'],\n 'authenticate' => [\n 'Form' =>\n [\n 'userModel' => $currentController,\n 'fields' => ['username' => 'email', 'password' => 'password']\n ]\n ],\n 'authorize'=> ['Controller'],\n 'loginAction' => $loginAction,\n 'loginRedirect' => $loginAction,\n 'logoutRedirect' => $loginAction \n\n ]);\n // $this->loadComponent('Auth', [\n\n // 'unauthorizedRedirect' => false,\n // 'checkAuthIn' => 'Controller.initialize',\n\n // // If you don't have a login action in your application set\n // // 'loginAction' to false to prevent getting a MissingRouteException.\n // 'loginAction' => false\n // ]);\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n }", "public function _initialize()\n {\n $this->cate=CONTROLLER_NAME;\n }", "public function init()\n {\n $this->projectController->init();\n }", "public function init()\n {\n // setting current view class name\n $this->_sThisAction = strtolower(get_class($this));\n\n if (!$this->_blIsComponent) {\n // assume that cached components does not affect this method ...\n $this->addGlobalParams();\n }\n }", "public function init() {\n\t\t$this->load_actions();\n\t}", "protected function initializeAction()\n {\n parent::initializeAction();\n $this->customer = SubjectResolver::get()\n ->forClassName(Customer::class)\n ->forPropertyName('user')\n ->resolve();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "function initialize(Controller $controller) {\n $this->controller = $controller;\n }", "protected function initializeAction()\n\t{\n\t\tparent::init('Form');\n\t}", "protected function initAction()\r\n {\r\n $return = false;\r\n\r\n // parse request URI\r\n $parts_url = parse_url(strtolower(trim($_SERVER['REQUEST_URI'], '/')));\r\n // @TODO: fix\r\n $parts_url_array = explode('/', $parts_url['path']);\r\n list($this->controllerName, $this->itemId) = $parts_url_array;\r\n\r\n // parse method\r\n $this->requestMethod = strtolower($_SERVER['REQUEST_METHOD']);\r\n\r\n switch ($this->requestMethod) {\r\n case 'get':\r\n // default actions for GET\r\n if ($this->controllerName == 'login' || $this->controllerName == 'logout') {\r\n $this->actionName = $this->controllerName;\r\n $this->controllerName = 'users';\r\n } elseif (is_null($this->itemId)) {\r\n $this->actionName = 'index';\r\n } else {\r\n $this->actionName = 'view';\r\n }\r\n break;\r\n case 'post':\r\n // default action for POST\r\n $this->actionName = 'add';\r\n break;\r\n case 'put':\r\n // default action for PUT\r\n $this->actionName = 'edit';\r\n break;\r\n case 'delete':\r\n // default action for DELETE\r\n $this->actionName = 'delete';\r\n break;\r\n }\r\n\r\n if (!$this->controllerName) {\r\n $this->controllerName = 'main';\r\n }\r\n if (!$this->actionName) {\r\n $this->actionName = 'index';\r\n }\r\n\r\n // get, check & requre class\r\n $className = sprintf('mob%s', ucfirst($this->controllerName));\r\n $className = 'pages\\\\' . $className;\r\n \r\n if (class_exists($className)) {\r\n //create a instance of the controller\r\n $this->controller = new $className();\r\n\r\n //check if the action exists in the controller. if not, throw an exception.\r\n $actionName = sprintf('action%s', ucfirst($this->actionName));\r\n if (method_exists($this->controller, $actionName) !== false) {\r\n $this->action = $actionName;\r\n // set request params\r\n if ($this->itemId) {\r\n $this->controller->setParams(array('id' => $this->itemId));\r\n }\r\n $this->controller->setRequestParams($this->requestMethod);\r\n\r\n $return = true;\r\n } else {\r\n $this->controller->httpStatusCode = HTTP_STATUS_METHOD_NOT_ALLOWED;\r\n// throw new \\Exception('Action is invalid.');\r\n }\r\n } else {\r\n $this->controller = new clsMobController();\r\n $this->controller->httpStatusCode = HTTP_STATUS_NOT_FOUND;\r\n// throw new \\Exception('Controller class is invalid.');\r\n }\r\n\r\n return $return;\r\n }", "protected function initializeAction()\n {\n $this->extKey = GeneralUtility::camelCaseToLowerCaseUnderscored('BwrkOnepage');\n /** @var LanguageAspect $languageAspect */\n $languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');\n $this->languageUid = $languageAspect->getId();\n }", "public static function init() {\n\t\tself::setup_actions();\n\t}", "public function actionInit()\n {\n $this->initRoles($this->roles);\n $this->initPermissions($this->permissions);\n $this->initDependencies($this->dependencies);\n }", "function initialize(Controller $controller) {\n $this->controller=&$controller;\n \t}", "public function preDispatch()\n\t{\n\t\t$this->_actionController->initView();\n\t\t\n\t\t// We have to store the values here, because forwarding overwrites\n\t\t// the request settings.\n\t\t$request = $this->getRequest();\n\t\t$this->_lastAction = $request->getActionName();\n\t\t$this->_lastController = $request->getControllerName();\n\t}", "protected function Init()\n\t{\n\t\tparent::Init();\n\n\t\t// TODO: add controller-wide bootstrap code\n\t\t\n\t\t// TODO: if authentiation is required for this entire controller, for example:\n\t\t// $this->RequirePermission(ExampleUser::$PERMISSION_USER,'SecureExample.LoginForm');\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public function contentControllerInit()\n\t{\n\t}", "public function initialize(Controller $controller) {\n\t\t$this->_controller = $controller;\n\t}", "protected function Init() {\n\t\tparent::Init();\n\n\t\t// TODO: add controller-wide bootstrap code\n\n\t\t// TODO: if authentiation is required for this entire controller, for example:\n\t\t// $this->RequirePermission(ExampleUser::$PERMISSION_USER,'SecureExample.LoginForm');\n\t}", "public function initialize()\n {\n parent::initialize();\n $nav_selected = [\"slides\"];\n $this->set('nav_selected', $nav_selected);\n\n // Allow full access to this controller\n //$this->Auth->allow();\n }", "public function initBaseController();", "public function init() {\n\n $this->jobs = new Hb_Jobs();\n if ($this->_request->getActionName() == 'view') {\n\n $this->_request->setActionName('index');\n }\n\n $this->searchParams = $this->_request->getParams();\n $this->view->searchParams = $this->searchParams;\n\n $this->view->actionName = $this->_request->getActionName();\n }", "public function init()\r\n {\r\n\r\n /* Initialize action controller here */\r\n\r\n //=====================================must add in all Controller class constructor ===================================//\r\n if(defined('SITEURL')) $this->site_url = SITEURL;\r\n if(defined('SITEASSET')) $this->site_asset = SITEASSET;\r\n $this->view->site_url = $this->site_url;\r\n $this->view->site_asset = $this->site_asset;\r\n Zend_Loader::loadClass('Signup');\r\n Zend_Loader::loadClass('User');\r\n Zend_Loader::loadClass('Request');\r\n //Zend_Loader::loadClass('mailerphp');\r\n\t\t//Zend_Loader::loadClass('Permission');\r\n\r\n\r\n //-----------------------------------------------authenticate logged in user---------------------------------------------//\r\n Zend_Loader::loadClass('LoginAuth');\r\n $this->view->ob_LoginAuth = $this->sessionAuth = new LoginAuth();\r\n\r\n $this->sessionAuth->login_user_check();\r\n\r\n $this->sessionAuth->cookie_check();\r\n $this->view->server_msg = $this->sessionAuth->msg_centre();\r\n\r\n //-----------------------------------------------authenticate logged in user---------------------------------------------//\r\n unset($_SESSION['tranzgo_session']['export_list']);\r\n $this->view->ControllerName = $this->_request->getControllerName();\r\n $this->view->page_id = ($_SESSION['tranzgo_session']['role_id']==1)?'5':'7';\r\n //______________________________________must add in all Controller class constructor _____________________________________//\r\n\r\n\r\n }", "public function before()\n {\n parent::before();\n\n // Get the HTTP status code\n $action = $this->request->action();\n\n if ($this->request->is_initial())\n {\n // This controller happens to exist, but lets pretent it does not\n $this->request->action($action = 404);\n }\n else if ( ! method_exists($this, 'action_'.$action))\n {\n // Return headers only\n $this->request->action('empty');\n }\n\n // Set the HTTP status code\n $this->response->status($action);\n }", "public function preAction() {\n $this->apiBrowser = new ApiBrowser();\n\n $basePath = $this->request->getBasePath();\n $this->namespaceAction = $basePath . '/namespace/';\n $this->classAction = $basePath . '/class/';\n $this->searchAction = $basePath . '/search';\n }", "protected function initializeAction() {\t\n\t\t$this->persdataRepository = t3lib_div::makeInstance('Tx_PtConference_Domain_Repository_persdataRepository');\n\t}", "public function initialize(Controller $controller) \r\n\t{\r\n\t\t$this->controller \t\t\t\t\t= $controller;\r\n\t\t$this->controller->request->sufixo \t= $this->sufixo;\r\n\t}", "protected function beforeAction () {\n\t}", "public static function init() {\n\t\t$_GET = App::filterGET();\n\t\t\n\t\t// Checken of er params zijn meegegeven\n\t\ttry {\n\t\t\tif (count($_GET) == 0) {\n\t\t\t\t$_GET[0] = '';\n\t\t\t}\n\t\t\t\n\t\t\t// Is de eerste param een controller ? Anders een pageView\n\t\t\tif (self::isController($_GET[0])) {\n\t\t\t\t$controllerName = self::formatAsController($_GET[0]);\n\t\t\t\t$controller = self::loadController($controllerName);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Er is sprake van een pageview\n\t\t\t\t$controllerName = 'PagesController';\n\t\t\t\t$controller = self::loadController($controllerName);\n\t\t\t}\n\t\t\t\n\t\t\t$action = self::getAction($controller);\n\t\t\t$controller->setAction($action);\n\n\t\t\t// Try to exec the action\n\t\t\ttry {\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\tcatch(ActionDoesNotExistException $ex) {\n\n\t\t\t\techo $action;\n\t\t\t\t// Action bestaat niet\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\t\n\t\t\t\t// Als development is ingeschakeld, dan de ware error tonen, anders een 404 pagina\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('invalidAction');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\tcatch(MissingArgumentsException $ex) {\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\t\n\t\t\t\t// Als development is ingeschakeld, dan de ware error tonen, anders een 404 pagina\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('missingArguments');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t}\n\t\t\t\n\t\t\t// Try to render the view\n\t\t\ttry {\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t\tcatch(ViewDoesNotExistException $ex) {\n\t\t\t\t// View bestaat niet\n\t\t\t\t$controller = self::loadController('ErrorController');\n\t\t\t\tif (Config::DEVELOPMENT)\n\t\t\t\t\t$action = self::formatAsAction('invalidView');\n\t\t\t\telse\n\t\t\t\t\t$action = self::formatAsAction('notFound');\n\t\t\t\t\n\t\t\t\t$controller->setAction($action);\n\t\t\t\tself::dispatchAction($controller, $action);\n\t\t\t\t\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(NoValidTemplateException $ex) {\n\t\t\techo 'Invalid template';\n\t\t}\n\t\tcatch(IsNotControllerException $ex) {\n\t\t\techo 'Controller not found';\n\t\t}\n\t}", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->resolution_summary = \"\";\n\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "protected function initializeAction()\n {\n parent::initializeAction();\n\n $query = GeneralUtility::_GET('q');\n if ($query !== null) {\n $this->request->setArgument('q', $query);\n }\n }", "public function __construct()\n {\n // Prepare the action for execution, leveraging constructor injection.\n }", "public function preAction()\n {\n // Nothing to do\n }", "public function initialize(Controller $controller) {\n $this->setUser();\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler',['enableBeforeRedirect'=>false]);\n $this->loadComponent('Flash');\n\n parent::initialize();\n ini_set('max_execution_time', \"600\"); //300 seconds = 5 minutes\n ini_set('memory_limit', '2048M');\n \n date_default_timezone_set('America/Bogota');\n $this->loadComponent('Auth', [\n 'authError' => 'Primero debes iniciar sesión.',\n 'authenticate' => [\n 'Form' => [\n 'userModel'=>'Usuarios',\n 'fields' => [\n 'username' => 'usuario',\n 'password' => 'password'\n ]\n ]\n ], \n 'loginAction' => [\n 'controller' => 'Usuarios',\n 'action' => 'login'\n ],\n \n //use isAuthorized in Controllers\n 'authorize' => ['Controller'],\n // If unauthorized, return them to page they were just on\n 'unauthorizedRedirect' => $this->referer(),\n\n 'storage' => 'Session'\n ]);\n if($this->Auth->user()){\n $this->_getMenuBD(); \n $this->getUserData();\n }\n $IndexPage = \"/Dashboard/index/\";\n $this->set(compact('IndexPage'));\n }", "protected function beforeAction() {\n\n }", "public static function initialize()\n {\n //Can be used to setup things before the execution of the action\n return true;\n }", "public function preInit()\n {\n $this->_viewEngine = Bigace_Services::get()->getService('view');\n }", "public function init()\n\t{\n\t\t$acl = Zend_Controller_Front::getInstance()->getParam('acl');\n\t\t$role = Zend_Auth::getInstance()->getIdentity()->role;\n\t\t\n\t\tif ($role == \"administrator\") {\n\t\t\t//$this->_models[] = 'Default_Model_Sources';\n\t\t}\t\n\t\t\n\t\t// find if a page have been set\n\t\t$params = $this->getRequest()->getParams();\n\t\tif (isset($params['page'])) {\n\t\t\t$this->page = $params['page'];\n\t\t}\t\n\t}", "public function preController(FilterControllerEvent $event)\r\n {\r\n $controller = $event->getController();\r\n\r\n // Return if its not an array\r\n if (!is_array($controller)) {\r\n return;\r\n }\r\n\r\n $controllerObject = $controller[0];\r\n\r\n // Make sure it can initialize\r\n if ($controllerObject instanceof InitializableControllerInterface) {\r\n\r\n $this->dispatcher->dispatch(\r\n UecodeCommonEvents::PRE_CONTROLLER_INITIALIZE,\r\n new ControllerEvent($controllerObject, $event)\r\n );\r\n\r\n $controllerObject->initialize(\r\n $this->getEntityManager(),\r\n $this->getUserService(),\r\n $this->getResponseService(),\r\n $this->getViewService()\r\n );\r\n\r\n $this->dispatcher->dispatch(\r\n UecodeCommonEvents::POST_CONTROLLER_INITIALIZE,\r\n new ControllerEvent($controllerObject, $event)\r\n );\r\n }\r\n\r\n return;\r\n }", "public function init()\n {\n $request =& $this->request;\n $route = '/:controller/:action';\n $opts = ['controller' => 'Home', 'action' => 'index'];\n\n // Inlined as a closure to fix \"using $this when not in object context\" on 5.3\n $validateSession = function () {\n if (!empty($_SESSION['php-censor-user-id'])) {\n $user = Factory::getStore('User')->getByPrimaryKey($_SESSION['php-censor-user-id']);\n\n if ($user) {\n return true;\n }\n }\n\n return false;\n };\n\n $skipAuth = [$this, 'shouldSkipAuth'];\n\n // Handler for the route we're about to register, checks for a valid session where necessary:\n $routeHandler = function (&$route, Response &$response) use (&$request, $validateSession, $skipAuth) {\n $skipValidation = in_array($route['controller'], ['session', 'webhook', 'build-status']);\n\n if (!$skipValidation && !$validateSession() && (!is_callable($skipAuth) || !$skipAuth())) {\n if ($request->isAjax()) {\n $response->setResponseCode(401);\n $response->setContent('');\n } else {\n $_SESSION['php-censor-login-redirect'] = substr($request->getPath(), 1);\n $response = new RedirectResponse($response);\n $response->setHeader('Location', APP_URL . 'session/login');\n }\n\n return false;\n }\n\n return true;\n };\n\n $this->router->clearRoutes();\n $this->router->register($route, $opts, $routeHandler);\n }", "protected function initializeAction() {\n\t\t$this->frontendUserRepository = t3lib_div::makeInstance('Tx_GrbFeusermanager_Domain_Repository_FrontendUserRepository');\n\t}", "public function __construct() {\n // filter controller, action and params\n $url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL); // $_GET['url']\n $params = explode('/', trim($url, '/'));\n\n // store first and seccond params, removing them from params list\n $controller_name = ucfirst(array_shift($params)); // uppercase classname\n $action_name = array_shift($params);\n\n require_once APP . 'config.php';\n\n // default controller and action\n if (empty($controller_name)) {\n $controller_name = AppConfig::DEFAULT_CONTROLLER;\n }\n if (empty($action_name)) {\n $action_name = AppConfig::DEFAULT_ACTION;\n }\n\n // load requested controller\n if (file_exists(APP . \"Controller/$controller_name.php\")) {\n require CORE . \"Controller.php\";\n require CORE . \"Model.php\";\n require APP . \"Controller/$controller_name.php\";\n $controller = new $controller_name();\n\n // verify if action is valid\n if (method_exists($controller, $action_name)) {\n call_user_func_array(array($controller, $action_name), $params);\n $controller->render(\"$controller_name/$action_name\"); // skipped if already rendered\n } else {\n // action not found\n $this->notFound();\n }\n } else {\n // controller not found\n $this->notFound();\n }\n }", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct()\n\t{\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "function initialize(&$controller, $settings = array()) {\n\t\t$this->controller =& $controller; \n\t}", "public function __construct()\n\t{\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function init()\n {\n $request = $this->getRequest();\n $controller = $request->getParam('controller');\n $action = $request->getParam('action');\n $view = $this->getView();\n $path = $this->filepath([APP_PATH, 'view', 'scripts', $controller]);\n\n // setup the view\n $view->addViewScriptPath($path);\n $view->setScript($action);\n\n // if the request is not ajax, then setup the layout\n if (!$request->isAjax()) {\n $view->setLayout('default');\n }\n\n return $this;\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "public function initialize()\n {\n \t\n \t$this->viewBuilder()->setLayout('default');\n \t\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n\t\t$this->loadComponent('Auth', [\n 'authorize' => ['Controller'],\n 'loginRedirect' => [\n 'controller' => 'MasterListings', \n 'action' => 'index'\n ],\n 'logoutRedirect' => [\n 'controller' => 'Users', \n 'action' => 'login'\n ],\n 'loginAction' => [\n 'controller' => 'Users', \n 'action' => 'login'\n ],\n 'authenticate' => [\n 'Form' => [\n //'passwordHasher' => 'Blowfish',\n 'userModel' => 'Users', \n 'fields' => ['username' => 'username', 'password' => 'password'] \n \n ]\n ],\n\t\t\t\n 'authError' => 'you are not Authorise to Acccess this location.',\n 'storage' => 'Session'\n ]);\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see http://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "function initialize(&$controller, $settings = array()) {\n\t\t$this->controller =& $controller;\n\t}", "function initialize(&$controller, $settings = array()) {\n\t\t$this->controller =& $controller;\n\t}", "public function init()\n {\n $currentUser = new Zend_Session_Namespace('currentUser');\n $requestParameters = $this->getRequest()->getParams();\n\n if ($requestParameters['controller'] != 'user' && $requestParameters['action'] != 'login') {\n if ($currentUser->username == null) {\n $this->_helper->_redirector->goToRouteAndExit(array('controller' => 'user', 'action' => 'login'));\n } else {\n $this->view->currentUser = $currentUser;\n SoftLayer_SoapClient::setAuthenticationUser($currentUser->username, $currentUser->apiKey);\n }\n }\n\n /*\n * Set common view elements.\n */\n $this->view->translate = Zend_Registry::get('Zend_Translate');\n $this->view->baseUrl = $this->getRequest()->getBaseUrl();\n }", "public function preAction()\n {\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie');\n\t\t\n\t\t $this->loadComponent('Security');\n\n\t\t\n\t/*\n *Authentication,Redirect\n */\t\n\t\t$this->loadComponent('Auth', [\n\t\t\t\t\t'authenticate' => [\n\t\t\t\t\t'Form' => [\n\t\t\t\t\t'fields' => [\n\t\t\t\t\t'username' => 'username',\n\t\t\t\t\t'password' => 'password']],\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'loginAction' => [\n\t\t\t\t\t'controller' => 'Users',\n\t\t\t\t\t'action' => 'login'\n\t\t\t\t\t],\n\t\t\t\t\t\n\t\t\t\t\t'loginRedirect' => [\n\t\t\t\t\t'controller' => 'Documents',\n\t\t\t\t\t'action' => 'index'\n\t\t\t\t\t],\n\t\t\t\t\t'logoutRedirect' => [\n\t\t\t\t\t'controller' => 'Documents',\n\t\t\t\t\t'action' => 'index',\n\t\t\t\t\t'home'\n\t\t\t\t\t],\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t'unauthorizedRedirect' => $this->referer() \n\t\t\n\t\t]);\n\t\n /*permitted actions*/\n\t\t$this->Auth->allow(['display']);\n\t\t\t\n\t\t$this->Auth->allow([\n\t\t'display',\n\t\t'tagindex','searchDocument',\n\t\t'changeLangHu','changeLangEn'\n\t\t\n\t\t]);\n\t\t\n\t\t\n\t\t\n\n\t\t\n\n $this->loadComponent('Security');\n /*Protection against Cross Site Scripting*/\n $this->loadComponent('Csrf');\n }", "public function init()\n {\n $this->vars['CRUD']['Object'] = $this;\n $this->kernel = kernel();\n\n // Dynamic initialization\n if (! $this->modelName) {\n $modelRefl = new ReflectionClass($this->modelClass);\n $this->modelName = $modelRefl->getShortName();\n }\n\n\n if (! $this->crudId) {\n $this->crudId = \\Phifty\\Inflector::getInstance()->underscore($this->modelName);;\n }\n if (! $this->templateId) {\n $this->templateId = $this->crudId;\n }\n\n // Derive options from request\n if ($request = $this->getRequest()) {\n if ($useFormControls = $request->param('_form_controls')) {\n $this->actionViewOptions['submit_btn'] = true;\n $this->actionViewOptions['_form_controls'] = true;\n }\n }\n\n $this->reflect = new ReflectionClass($this);\n $this->namespace = $ns = $this->reflect->getNamespaceName();\n\n // XXX: currently we use FooBundle\\FooBundle as the main bundle class.\n $bundleClass = \"$ns\\\\$ns\";\n if (class_exists($bundleClass)) {\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n } else {\n $bundleClass = \"$ns\\\\Application\";\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n }\n\n $this->vars['Handler'] = $this;\n $this->vars['Controller'] = $this;\n\n // anyway, we have the model classname, and the namespace, \n // we should be able to registerRecordAction automatically, so we don't have to write the code.\n if ($this->registerRecordAction) {\n $self = $this;\n $this->kernel->event->register('phifty.before_action',function() use($self) {\n $self->kernel->action->registerAction('RecordActionTemplate', array(\n 'namespace' => $self->namespace,\n 'model' => $self->modelName,\n 'types' => (array) $self->registerRecordAction\n ));\n });\n }\n\n\n $this->initPermissions();\n\n /*\n * TODO: Move this to before render CRUD page, keep init method simple\n\n if ( $this->isI18NEnabled() ) {\n $this->primaryFields[] = 'lang';\n }\n */\n $this->initNavBar();\n }", "protected function Init()\n\t{\n\t\tparent::Init();\n\n\t\t// TODO: add controller-wide bootstrap code\n\t}", "public function initialize()\n {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"refund\");\n }", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Auth', ['authenticate' =>\n ['ADmad/JwtAuth.Jwt' => [\n 'parameter' => 'token',\n 'userModel' => 'Sessions',\n 'fields' => [\n 'username' => 'username'\n ],\n 'scope' => ['Sessions.status' => 1],\n 'queryDatasource' => true\n ]\n ],'storage' => 'Memory',\n 'checkAuthIn' => 'Controller.initialize',\n 'loginAction' => false,\n 'unauthorizedRedirect' => false]);\n $this->loadComponent('Paginator');\n $this->loadComponent('BryanCrowe/ApiPagination.ApiPagination',[\n 'visible' => [\n 'page',\n 'current',\n 'count',\n 'perPage',\n 'prevPage',\n 'nextPage'\n ]\n ]);\n }", "public function __construct()\n {\n // Call the CI_Controller constructor\n parent::__construct();\n }", "protected function initializeAction() {\n\t\t$this->feusers = $this->feusersRepository->findByUid( $GLOBALS['TSFE']->fe_user->user['uid'] ) ;\n\t\t$this->schule = $this->feusers->getSchule();\n\t\n\t\t$this->extKey = $this->request->getControllerExtensionKey();\n\t\t$this->extPath = t3lib_extMgm::extPath($this->extKey);\n\t\n\t\t$this->importClassFile = $this->extPath.'Classes/tmp/class.importtext.php';\n\t\t$this->importClass = 'ImportText';\n\t \n\t\tif ( $this->settings[pidAjaxContainerKlassenuebersicht] > 0) $this->pidAjaxContainerKlassenuebersicht = (int) $this->settings[pidAjaxContainerKlassenuebersicht];\n\t\n\t}", "public function __construct()\n {\n if (get_called_class() != 'ApplicationController') {\n $this->_set_default_layout();\n $this->_vars = new stdClass();\n $this->_init();\n }\n }", "public function initializeAction() {\t\t\n\t\t$this->contactRepository = t3lib_div::makeInstance('Tx_Addresses_Domain_Repository_ContactRepository');\t\n\t}", "public function init()\n {\n $this->_defaultOrderColumn = $this->_getPrimaryIdKey();\n \n $front = Zend_Controller_Front::getInstance();\n if ($this->getRequest()->getActionName() == $front->getDefaultAction() && $this->getRequest()->getActionName() != 'index') {\n $this->_forward($this->_getBrowseAction());\n }\n }", "function startup(&$controller) {\n $this->setVars();\n }", "public function before()\n\t{\n\t\tif ($this->request->is_initial())\n\t\t{\n\t\t\t$this->request->action(404);\n\t\t}\n\t\t\n\t\treturn parent::before();\n\t}", "public function preAction() {\n\n }", "protected function initDefaultController() {\n\t\tif (!class_exists(\"HomeController\")) return;\n\t\t$this->controller = new HomeController();\n\t}", "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Auth', [\n 'authorize' => 'Controller',\n 'loginAction' => [\n 'controller' => 'Users',\n 'action' => 'login',\n ],\n 'loginRedirect' => [\n 'controller' => 'Users',\n 'action' => 'index/',\n ],\n 'logoutRedirect' => [\n 'controller' => 'Booking',\n 'action' => 'index',\n ],\n 'authError' => 'Enregistrez-vous ou Connectez-vous',\n 'authenticate' => [\n 'Form' => [\n 'fields' => ['username' => 'Email', 'password' => 'Password']\n ]\n ]\n ]\n );\n\n /*\n * Enable the following components for recommended CakePHP security settings.\n * see https://book.cakephp.org/3.0/en/controllers/components/security.html\n */\n //$this->loadComponent('Security');\n //$this->loadComponent('Csrf');\n }", "public function __construct() {\n\n\t\t#Make sure Basecontroller construct gets called\n\t\tparent::__construct();\n\n\t\t#only logged in users are allowed here\n\t\t$this->beforeFilter('auth');\n\t}", "public function __construct() {\r\n\t\t\r\n\t\tSession::init();\n\t\tif (!Session::get('local'))\n\t\t\tSession::set('local', DEFAULT_LANGUAGE);\r\n\t\t\r\n\t\t$this->getUrl();\r\n\t\t\r\n\t\t//No controller is specified.\r\n\t\tif (empty($this->url[0])) {\r\n\t\t\t$this->loadDefaultController();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->loadCurrentController();\r\n\t\t$this->callControllerMethod();\r\n\r\n\t}", "protected function setUp() {\n $this->_request = Request::createFromGlobals();\n $this->object = new LoginController($this->_request);\n }", "public function init() {\n $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t\t$this->_helper->acl->allow('public',null);\n\t\t$this->_helper->contextSwitch()\n\t\t\t ->setAutoDisableLayout(true)\n\t\t\t ->addActionContext('index', array('xml','json'))\n ->initContext();\n\t}", "public function init()\n {\n $this->ctrlModel = new Admin_Model_Acl_ControllersActions();\n $this->dbCtrl = new Admin_Model_DbTable_Acl_ModuleController();\n }", "public function __construct() {\n\t\t\t$this->init_globals();\n\t\t\t$this->init_actions();\n\t\t}", "function __construct()\n {\n parent::Controller();\n }", "public function init()\n {\n $actionName = Yii::$app->controller->action->id;\n $function = new \\ReflectionClass($this->model->className());\n $modelName = $function->getShortName();\n $this->permissionSave = PermissionHelper::findPermissionModelAction($modelName, $actionName);\n\n parent::init();\n\n $this->initVariablesI18n();\n }", "public function init()\n {\n require_once(__DIR__.'/controllers/AbstractAuthorizedApiController.php');\n }" ]
[ "0.83893245", "0.8365739", "0.8365739", "0.77989143", "0.7763317", "0.7562168", "0.7562168", "0.75611573", "0.745006", "0.74203813", "0.74139845", "0.74139845", "0.74139845", "0.74139845", "0.74139845", "0.73387736", "0.73374873", "0.7303854", "0.7300791", "0.7264129", "0.71146405", "0.70932627", "0.70630306", "0.7057551", "0.7056006", "0.70402026", "0.7036855", "0.7022971", "0.70227", "0.699504", "0.6993984", "0.6986746", "0.69743043", "0.69675463", "0.69372606", "0.6918528", "0.6914477", "0.6892082", "0.6890458", "0.68844646", "0.68568337", "0.6835564", "0.68340504", "0.68262565", "0.6812753", "0.6808976", "0.6795197", "0.67503023", "0.6747851", "0.67456543", "0.6723742", "0.6717342", "0.6703215", "0.66895247", "0.66871226", "0.6669945", "0.66695553", "0.66684836", "0.6665409", "0.6643854", "0.66303027", "0.66296166", "0.66204685", "0.6618396", "0.66138035", "0.6612208", "0.6612208", "0.660915", "0.6605574", "0.6601929", "0.65964913", "0.6591923", "0.6583463", "0.65834254", "0.65834254", "0.6574699", "0.6573727", "0.65556675", "0.65390146", "0.65357524", "0.65322834", "0.65233535", "0.65225303", "0.6520507", "0.65176946", "0.65130615", "0.65081465", "0.6502409", "0.6485291", "0.64814657", "0.64804816", "0.6477831", "0.6476408", "0.64672273", "0.6461317", "0.6450003", "0.6431659", "0.6431065", "0.64227664", "0.6407342", "0.640466" ]
0.0
-1
Processes a general request. The result can be returned by altering the given response.
public function processRequest(Tx_Extbase_MVC_RequestInterface $request, Tx_Extbase_MVC_ResponseInterface $response) { $this->template = t3lib_div::makeInstance('template'); $this->pageRenderer = $this->template->getPageRenderer(); $GLOBALS['SOBE'] = new stdClass(); $GLOBALS['SOBE']->doc = $this->template; parent::processRequest($request, $response); $pageHeader = $this->template->startpage( $GLOBALS['LANG']->sL('LLL:EXT:smoothmigration/Resources/Private/Language/locallang.xml:module.title') ); $pageEnd = $this->template->endPage(); $response->setContent($pageHeader . $response->getContent() . $pageEnd); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function processRequest();", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "public abstract function processRequest();", "abstract public function processResponse($response);", "public function processRequest();", "protected abstract function handleRequest();", "abstract public function response();", "abstract public function handle_request();", "abstract protected function process(Request $request);", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public static function process_http_request()\n {\n }", "abstract public function simplifyResponse($request, $response);", "public function processRequest(F3_FLOW3_MVC_Request $request, F3_FLOW3_MVC_Response $response) {\n\t\t// return $response;\n\t\t$this->content = $request->getArgument('content');\n\t\t$this->settings = $request->getArgument('settings');\n\t\t\n\t\tif ($this->isContentToBeParsed()) {\n\t\t\t$response->setContent($this->parser->parse($this->content));\n\t\t\t// TODO Implement Inverse of Control for Parser/Content\n\t\t\t// $processorChain = $this->componentManager->getComponent('F3_Contentparser_ProcessorChain');\n\t\t\t// $processorChain->addProcessor($this->parser);\n\t\t\t// $processorChain->addProcessor($this->postProcessor);\n\t\t\t// $this->content->setProcessorChain($processorChain);\n\t\t\t// return $this->content->processChain();\n\t\t} else {\n\t\t\t$response->setContent($this->content);\n\t\t}\n\t\treturn $response;\n\t}", "public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "protected function process_response() {\n\t\t\t$this->response['response']['Message'] = isset($this->response['response']['Message']) ? $this->response['response']['Message'] : '';\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'invalid') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'the item code was specified more than once') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['Level1Code'] = $this->request['Level1Code'];\n\t\t\t\n\t\t\tif (!$this->response['response']['error']) { // IF Error is False\n\t\t\t\tif (in_array($this->response['server']['http_code'], array('200', '201', '202', '204'))) {\n\t\t\t\t\t$this->log_sendlogitem($this->request['Level1Code']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->log_error($this->response['response']['Message']);\n\t\t\t}\n\t\t}", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "abstract public function request();", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function processRequest(): ResponseInterface\n {\n $routes = $this->bs->routes();\n $request = new Request($this->bs->globals());\n $routingEngine = new RoutingEngine($routes);\n $result = $routingEngine->resolve(\n $request->method(),\n $request->uri()\n );\n if($result === null) {\n return new TextResponse(\"404 page not found\");\n }\n $requestHandler = new RequestHandler(\n $this,\n $request,\n $this->bs->middlewares(),\n $result\n );\n $response = $requestHandler->handleRequest();\n return $response;\n }", "abstract function parse_api_response();", "public function process($response) {\n return $response;\n }", "public function processAction(): Response\n {\n // 1. Transform Request to Query.\n /** @var GetOneQuery $query */\n $query = $this->queryAdapter->buildQueryFromRequest($this->queryRequest);\n\n // 2. Business work thanks to the Query.\n $entity = $this->queryHandler->process($query);\n\n // 3. Format using the business work and return the Response.\n $body = $this->prepareSuccess($entity);\n return $this->responseHandler->create($body)->getResponse();\n }", "abstract public function handleRequest($request);", "public function processRequest() : \\Core\\Responses\\CLIResponse {\n return Response::create('CLIResponse');\n }", "public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}", "public function __doRequest($request, $location, $action, $version, $one_way = 0)\n\t{\n\t\t$response = parent::__doRequest($request, $location, $action, $version, $one_way);\n\t\t$this->rawResponse = $response;\n\t\t//if resposnse content type is mtom strip away everything but the xml.\n\t\tif (strpos($response, \"Content-Type: application/xop+xml\") !== false) {\n\t\t\t//not using stristr function twice because not supported in php 5.2 as shown below\n\t\t\t//$response = stristr(stristr($response, \"<s:\"), \"</s:Envelope>\", true) . \"</s:Envelope>\";\n\t\t\t$tempstr = stristr($response, \"<s:\");\n\t\t\t$response = substr($tempstr, 0, strpos($tempstr, \"</s:Envelope>\")) . \"</s:Envelope>\";\n\t\t}\n\t\t//log_message($response);\n\t\treturn $response;\n\t}", "abstract function do_api_request();", "abstract protected function parseResponse($response);", "protected function _response() {}", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "abstract public function mapRequest($request);", "public function process(Request $request, Response $response, RequestHandlerInterface $handler);", "function handleRequest() ;", "public function & GetResponse ();", "function process() {\n\t\t\t$response = $this->response();\n\t\t\t$this->setSuccess($response);\n\t\t\treturn $this->responseVar;\n\t\t}", "abstract public function responseProvider();", "abstract public function handle(ServerRequestInterface $request): ResponseInterface;", "public function call($request, $response);", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public function processRequest() {\n $serviceType = $this->getServiceType();\n if(!$serviceType){return \"Invalid Call ! \\n\";}\n $repoPath = $this->getRepoName();\n if(!defined(\"__APIURL__\" . $serviceType)){\n return \"API URL not found for $serviceType\\n\";\n }\n $apiUrl = sprintf(constant(\"__APIURL__\" . $serviceType), $repoPath);\n $response = $this->makeCurlRequest($apiUrl, 'get');\n switch ($serviceType) {\n case 'github.com':\n return $this->getCountForGit($response);\n break;\n case 'bitbucket.org':\n return $this->getCountForBit($response);\n break;\n default :\n return $response;\n break;\n }\n }", "function handleRequest($request, &$response){ \n switch($request->getHeader($HEADER_CONTENT_TYPE)){\n case $CONTENT_TYPE_JSON:\n if(json_decode($request)!=null){ // basic JSON validation\n $response->getBody()->write($SAMPLE_RESPONSE_JSON);\n $response->withHeader($HEADER_CONTENT_TYPE, $CONTENT_TYPE_JSON);\n $response->withStatus(200, $STATUS_REASON_200);\n }else\n $response->withStatus(400, $STATUS_REASON_400);\n break;\n case $CONTENT_TYPE_HTML:\n $response->getBody()->write($SAMPLE_RESPONSE_HTML);\n $response->withHeader($HEADER_CONTENT_TYPE, $CONTENT_TYPE_HTML);\n $response->withStatus(200, $STATUS_REASON_200);\n break;\n // other content types can be added as needed\n default:\n $response->withStatus(400, $STATUS_REASON_400);\n }\n}", "public function dispatch_single( $request ) {\n\t\t// check that the object passes some basic protocal shape tests\n\t\tif ( !$this->isValidRequestObect( $request ) )\n\t\t\treturn jsonrpc2::error( -32600 );\n\n\t\t// if the request object does not specify a jsonrpc verison\n\t\tif ( !isset( $request->jsonrpc ) )\n\t\t\t$request->jsonrpc = '1.0';\n\n\t\t// if the request is 2.0 and and no params were sent\n\t\t\t// create an empty params entry,\n\t\t\t// as 2.0 requests do not need to send an empty array\n\t\t\t// later code can now assume that this field will exist\n\t\tif ( $request->jsonrpc == '2.0' && !isset( $request->params ) )\n\t\t\t$request->params = array();\n\n\t\t// invoke the request object, and store it in the reponse\n\t\t$response = $this->invoke( $request );\n\n\t\t// if the request id is not set, or if it is null\n\t\tif ( !isset ( $request->id ) || is_null( $request->id ) )\n\t\t\treturn null;\n\n\t\t// copy the request id into the response object\n\t\t$response->id = $request->id;\n\n\t\t// if it is a 2.0 request\n\t\tif ( $request->jsonrpc === '2.0' ) {\n\t\t\t// set the response to 2.0\n\t\t\t$response->jsonrpc = $request->jsonrpc;\n\t\t} else {\n\t\t\t// assume it is a 1.0 requrest\n\t\t\t// ensure there is a result member in the response\n\t\t\tif ( !isset( $response->result ) )\n\t\t\t\t$response->result = null;\n\n\t\t\t// ensure there is an error member\n\t\t\tif ( !isset( $response->error ) )\n\t\t\t\t$response->error = null;\n\t\t}\n\n\t\t// return the response object\n\t\treturn $response;\n\t}", "public function DispatchRequest ();", "public function getResponse(string &$packageRoot, Request &$request): Response;", "public abstract function getResponse($response, $pack);", "private function processRequest($request)\n {\n if (!is_array($request)) {\n return $this->requestError();\n }\n\n // The presence of the 'id' key indicates that a response is expected\n $isQuery = array_key_exists('id', $request);\n\n $id = &$request['id'];\n\n if (($id !== null) && !is_int($id) && !is_float($id) && !is_string($id)) {\n return $this->requestError();\n }\n\n $version = &$request['jsonrpc'];\n\n if ($version !== self::VERSION) {\n return $this->requestError($id);\n }\n\n $method = &$request['method'];\n\n if (!is_string($method)) {\n return $this->requestError($id);\n }\n\n // The 'params' key is optional, but must be non-null when provided\n if (array_key_exists('params', $request)) {\n $arguments = $request['params'];\n\n if (!is_array($arguments)) {\n return $this->requestError($id);\n }\n } else {\n $arguments = array();\n }\n\n if ($isQuery) {\n return $this->processQuery($id, $method, $arguments);\n }\n\n $this->processNotification($method, $arguments);\n return null;\n }", "public function handleRequest() {}", "protected abstract function handleResponse(View $view);", "public function processMsg()\n {\n\t\t$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n \t//extract post data\n \t$logfile = fopen(\"./log/request_log\", \"a\");\n \tfwrite($logfile, $postStr);\n \tfclose($logfile);\n\t\tif (!empty($postStr)){\n /* libxml_disable_entity_loader is to prevent XML eXternal Entity Injection,\n the best way is to check the validity of xml by yourself */\n libxml_disable_entity_loader(true);\n $parseObj = new RequestParse();\n $requestData = $parseObj->parse($postStr);\n $processObj = new RequestProcess();\n $responseData = $processObj->process($requestData);\n $responseObj = new RequestResponse();\n //echo $responseObj->response($responseData);\n\t\t $response = $responseObj->response($responseData);\n\t\t echo $response;\n\t\t $logfile = fopen(\"./log/response_log\", \"a\");\n\t\t fwrite($logfile, $response);\n\t\t fclose($logfile);\n }else {\n \techo \"\";\n \texit;\n }\n }", "private function processRequest()\n\t{\n\t\t\n\t\t$request = NEnvironment::getService('httpRequest');\n\t\t\n\t\tif ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) { \n\t\t\t\n\t\t\t$data = json_decode(file_get_contents('php://input'), TRUE);\n\t\t\tif (count($data) > 0) {\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\tif (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) {\n\t\t\t\t\t\t$this->items[$key]['callback']->invokeArgs($this->items[$key]['args']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdie(json_encode(array('status' => \"OK\")));\n\t\t}\n\t\t\n\t}", "public function process(Response $response): Response {\n return $response;\n }", "private function requestProcessor() {\n try {\n\n if (empty($this->uri))\n throw new \\Exception(\"Undefined url\");\n\n $ReqHandle = curl_init($this->uri);\n\n $body = json_encode([]);\n if( sizeof($this->data) > 0 )\n $body = json_encode($this->data);\n\n $returnTransfer = 0;\n if( $this->hasResponseToReturn )\n $returnTransfer = 1;\n\n $isPost = 0;\n if( $this->method != 'GET')\n $isPost = 1;\n\n\n if($isPost == 1){\n curl_setopt($ReqHandle,CURLOPT_POST, $isPost);\n curl_setopt($ReqHandle, CURLOPT_POSTFIELDS, $body);\n }\n \n curl_setopt_array($ReqHandle, [\n CURLOPT_RETURNTRANSFER => $returnTransfer,\n CURLOPT_HTTPHEADER => $this->headersToBeUsed\n ]);\n\n\n $result = curl_exec($ReqHandle);\n\n if(curl_errno($ReqHandle)){\n\n return curl_error($ReqHandle);\n }\n\n if($returnTransfer == 1)\n return json_decode($result);\n\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "abstract protected function handleResult();", "abstract function doExecute($request);", "public function prepareResponse();", "public function processResponseData($rawResponseData);", "private function _handleRequest($parsedRequest)\r\n {\r\n if ($this->options[\"debug\"] && is_string($this->test_mode))\r\n {\r\n $res = $this->testing_pump_command_engine->processRequest($parsedRequest);\r\n } else\r\n {\r\n $res = $this->pump_command_engine->processRequest($parsedRequest);\r\n };\r\n\r\n\r\n return $res;\r\n\r\n }", "protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }", "public function getResponse($input);", "function processRequests()\n\t{\n\n\t\t$requestMode = -1;\n\t\t$sFunctionName = \"\";\n\t\t$bFoundFunction = true;\n\t\t$bFunctionIsCatchAll = false;\n\t\t$sFunctionNameForSpecial = \"\";\n\t\t$aArgs = array();\n\t\t$sPreResponse = \"\";\n\t\t$bEndRequest = false;\n\t\t$sResponse = \"\";\n\n\t\t$requestMode = $this->getRequestMode();\n\t\tif ($requestMode == -1) return;\n\n\t\tif ($requestMode == XAJAX_POST)\n\t\t{\n\t\t\t$sFunctionName = $_POST[\"xajax\"];\n\n\t\t\tif (!empty($_POST[\"xajaxargs\"]))\n\t\t\t\t$aArgs = $_POST[\"xajaxargs\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader (\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n\t\t\theader (\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n\t\t\theader (\"Cache-Control: no-cache, must-revalidate\");\n\t\t\theader (\"Pragma: no-cache\");\n\n\t\t\t$sFunctionName = $_GET[\"xajax\"];\n\n\t\t\tif (!empty($_GET[\"xajaxargs\"]))\n\t\t\t\t$aArgs = $_GET[\"xajaxargs\"];\n\t\t}\n\n\t\t// Use xajax error handler if necessary\n\t\tif ($this->bErrorHandler) {\n\t\t\t$GLOBALS['xajaxErrorHandlerText'] = \"\";\n\t\t\tset_error_handler(\"xajaxErrorHandler\");\n\t\t}\n\n\t\tif ($this->sPreFunction) {\n\t\t\tif (!$this->_isFunctionCallable($this->sPreFunction)) {\n\t\t\t\t$bFoundFunction = false;\n\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t$objResponse->addAlert(\"Unknown Pre-Function \". $this->sPreFunction);\n\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t}\n\t\t}\n\t\t//include any external dependencies associated with this function name\n\t\tif (array_key_exists($sFunctionName,$this->aFunctionIncludeFiles))\n\t\t{\n\t\t\tob_start();\n\t\t\tinclude_once($this->aFunctionIncludeFiles[$sFunctionName]);\n\t\t\tob_end_clean();\n\t\t}\n\n\t\tif ($bFoundFunction) {\n\t\t\t$sFunctionNameForSpecial = $sFunctionName;\n\t\t\tif (!array_key_exists($sFunctionName, $this->aFunctions))\n\t\t\t{\n\t\t\t\tif ($this->sCatchAllFunction) {\n\t\t\t\t\t$sFunctionName = $this->sCatchAllFunction;\n\t\t\t\t\t$bFunctionIsCatchAll = true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$bFoundFunction = false;\n\t\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t\t$objResponse->addAlert(\"Unknown Function $sFunctionName.\");\n\t\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($this->aFunctionRequestTypes[$sFunctionName] != $requestMode)\n\t\t\t{\n\t\t\t\t$bFoundFunction = false;\n\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t$objResponse->addAlert(\"Incorrect Request Type.\");\n\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t}\n\t\t}\n\n\t\tif ($bFoundFunction)\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($aArgs); $i++)\n\t\t\t{\n\t\t\t\t// If magic quotes is on, then we need to strip the slashes from the args\n\t\t\t\tif (get_magic_quotes_gpc() == 1 && is_string($aArgs[$i])) {\n\n\t\t\t\t\t$aArgs[$i] = stripslashes($aArgs[$i]);\n\t\t\t\t}\n\t\t\t\tif (stristr($aArgs[$i],\"<xjxobj>\") != false)\n\t\t\t\t{\n\t\t\t\t\t$aArgs[$i] = $this->_xmlToArray(\"xjxobj\",$aArgs[$i]);\n\t\t\t\t}\n\t\t\t\telse if (stristr($aArgs[$i],\"<xjxquery>\") != false)\n\t\t\t\t{\n\t\t\t\t\t$aArgs[$i] = $this->_xmlToArray(\"xjxquery\",$aArgs[$i]);\n\t\t\t\t}\n\t\t\t\telse if ($this->bDecodeUTF8Input)\n\t\t\t\t{\n\t\t\t\t\t$aArgs[$i] = $this->_decodeUTF8Data($aArgs[$i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this->sPreFunction) {\n\t\t\t\t$mPreResponse = $this->_callFunction($this->sPreFunction, array($sFunctionNameForSpecial, $aArgs));\n\t\t\t\tif (is_array($mPreResponse) && $mPreResponse[0] === false) {\n\t\t\t\t\t$bEndRequest = true;\n\t\t\t\t\t$sPreResponse = $mPreResponse[1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$sPreResponse = $mPreResponse;\n\t\t\t\t}\n\t\t\t\tif (is_a($sPreResponse, \"xajaxResponse\")) {\n\t\t\t\t\t$sPreResponse = $sPreResponse->getXML();\n\t\t\t\t}\n\t\t\t\tif ($bEndRequest) $sResponse = $sPreResponse;\n\t\t\t}\n\n\t\t\tif (!$bEndRequest) {\n\t\t\t\tif (!$this->_isFunctionCallable($sFunctionName)) {\n\t\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t\t$objResponse->addAlert(\"The Registered Function $sFunctionName Could Not Be Found.\");\n\t\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ($bFunctionIsCatchAll) {\n\t\t\t\t\t\t$aArgs = array($sFunctionNameForSpecial, $aArgs);\n\t\t\t\t\t}\n\t\t\t\t\t$sResponse = $this->_callFunction($sFunctionName, $aArgs);\n\t\t\t\t}\n\t\t\t\tif (is_a($sResponse, \"xajaxResponse\")) {\n\t\t\t\t\t$sResponse = $sResponse->getXML();\n\t\t\t\t}\n\t\t\t\tif (!is_string($sResponse) || strpos($sResponse, \"<xjx>\") === FALSE) {\n\t\t\t\t\t$objResponse = new xajaxResponse();\n\t\t\t\t\t$objResponse->addAlert(\"No XML Response Was Returned By Function $sFunctionName.\");\n\t\t\t\t\t$sResponse = $objResponse->getXML();\n\t\t\t\t}\n\t\t\t\telse if ($sPreResponse != \"\") {\n\t\t\t\t\t$sNewResponse = new xajaxResponse($this->sEncoding, $this->bOutputEntities);\n\t\t\t\t\t$sNewResponse->loadXML($sPreResponse);\n\t\t\t\t\t$sNewResponse->loadXML($sResponse);\n\t\t\t\t\t$sResponse = $sNewResponse->getXML();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$sContentHeader = \"Content-type: text/xml;\";\n\t\tif ($this->sEncoding && strlen(trim($this->sEncoding)) > 0)\n\t\t\t$sContentHeader .= \" charset=\".$this->sEncoding;\n\t\theader($sContentHeader);\n\t\tif ($this->bErrorHandler && !empty( $GLOBALS['xajaxErrorHandlerText'] )) {\n\t\t\t$sErrorResponse = new xajaxResponse();\n\t\t\t$sErrorResponse->addAlert(\"** PHP Error Messages: **\" . $GLOBALS['xajaxErrorHandlerText']);\n\t\t\tif ($this->sLogFile) {\n\t\t\t\t$fH = @fopen($this->sLogFile, \"a\");\n\t\t\t\tif (!$fH) {\n\t\t\t\t\t$sErrorResponse->addAlert(\"** Logging Error **\\n\\nxajax was unable to write to the error log file:\\n\" . $this->sLogFile);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfwrite($fH, \"** xajax Error Log - \" . strftime(\"%b %e %Y %I:%M:%S %p\") . \" **\" . $GLOBALS['xajaxErrorHandlerText'] . \"\\n\\n\\n\");\n\t\t\t\t\tfclose($fH);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sErrorResponse->loadXML($sResponse);\n\t\t\t$sResponse = $sErrorResponse->getXML();\n\n\t\t}\n\t\tif ($this->bCleanBuffer) while (@ob_end_clean());\n\t\tprint $sResponse;\n\t\tif ($this->bErrorHandler) restore_error_handler();\n\n\t\tif ($this->bExitAllowed)\n\t\t\texit();\n\t}", "function rest_do_request($request)\n {\n }", "protected abstract function service(Response $response);", "private function processOptions()\r\n {\r\n $this->response = new Response(null, 200);\r\n }", "function getResponse();", "function getResponse();", "public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }", "function processRequest() {\n\n\t\t// Cleanup any previous response\n\t\t$this->m_response = null;\n\n\t\t// Optional argument is the request\n\t\tif (func_num_args() === 1) {\n\t\t\t$this->m_request = func_get_arg(0);\n\t\t}\n\n\t\tif ($this->m_request === null) {\n\t\t\ttrigger_error(\"CardEaseXMLRequest: No request to process\", E_USER_ERROR);\n\t\t}\n\n\t\t// Validate that the request data is good\n\t\t$this->m_request->validate();\n\n\t\tif ($this->m_serverURLs === null || count($this->m_serverURLs) === 0) {\n\t\t\ttrigger_error(\"CardEaseXMLCommunication: No servers to contact\", E_USER_ERROR);\n\t\t}\n\n\t\t$lastCommunicationException = null;\n\n\t\t// Try each of the server URLs\n\t\tforeach ($this->m_serverURLs as $url) {\n\n\t\t\tif ($url === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$xmlWriter = new XMLWriterCreditCall($this->m_xmlEncoding);\n\t\t\t$requestXML = $this->m_request->generateRequestXML($xmlWriter);\n\n\t\t\t// Set the HTTP settings\n\t\t\t$curl = curl_init();\n\t\t\tcurl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10000);\n\t\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\"Content-Type: text/xml\"));\n\t\t\tcurl_setopt($curl, CURLOPT_POST, TRUE);\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $requestXML);\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t\t@curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, TRUE); // FIXME This should really be TRUE\n\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE); // FIXME This should really be TRUE\n\t\t\tcurl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__).'/../../cacert.pem');\n\t\t\tcurl_setopt($curl, CURLOPT_TIMEOUT, $url->getTimeout());\n\t\t\tcurl_setopt($curl, CURLOPT_URL, $url->getURL());\n\n\t\t\t// Setup the proxy information\n\t\t\tif ($this->m_proxyHost !== null) {\n\t\t\t\tcurl_setopt($curl, CURLOPT_PROXY, $this->m_proxyHost.\":\".$this->m_proxyPort);\n\n\t\t\t\tif ($this->m_proxyUserName !== null && $this->m_proxyPassword !== null) {\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_PROXYUSERPWD, $this->m_proxyUserName.\":\".$this->m_proxyPassword);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create a connection to the server and send the XML\n\t\t\t$responseXML = curl_exec($curl);\n\n\t\t\t$curlError = curl_error($curl);\n\t\t\t$curlInfo = curl_getinfo($curl);\n\n\t\t\tcurl_close($curl);\n\n\t\t\tif (!empty($curlError)) {\n\t\t\t\t$lastCommunicationException = \"CardEaseXMLCommunication: $curlError\";\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Read the response code from the server and check it\n\t\t\t$responseCode = $curlInfo['http_code'];\n\n\t\t\t// Check the response code\n\t\t\tif ($responseCode !== 200) {\n\t\t\t\t$lastCommunicationException = \"CardEaseXMLCommunication: Unexpected HTTP response: \" . $responseCode;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (strlen($responseXML) === 0) {\n\t\t\t\t$lastCommunicationException = \"CardEaseXMLCommunication: Unable to retrieve server response\";\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Convert the XML string to a response\n\t\t\t$this->m_response = new Response();\n\t\t\t$this->m_response->parseResponseXML($responseXML);\n\n\t\t\t// If we have got this far the connection has been successful\n\t\t\treturn $this->m_response;\n\t\t}\n\n\t\t// Communication hasn't been successful and an exception exists\n\t\tif ($lastCommunicationException !== null) {\n\t\t\ttrigger_error($lastCommunicationException, E_USER_ERROR);\n\t\t}\n\n\t\treturn $this->m_response;\n\t}", "protected function _handle_query()\n\t{\t\n\t\t$this->_http_query = $this->_request;\n\t\t$response_object = $this->payments->gateway_request($this->_api_endpoint, $this->_http_query, 'application/x-www-form-urlencoded');\n\t\treturn $this->_parse_response($response_object);\n\t}", "public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }", "protected function _request() {}", "public function requests()\n\t{\n\t\t$this->checkRequest();\n\t\t$this->getResponse();\n\t}", "public function response();", "private function responseHandle() {\n // call hook function\n is_callable(config('hooks.onResponse')) && call_user_func(config('hooks.onResponse'), $this);\n // response data\n $this->responder->output();\n }", "public function getResponse($response) {\r\n\r\n\r\n }", "final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }", "protected function _handleResponse(){\n $this->_results[] = array(\n 'http_code' => $this->getInfoHTTPCode(),\n 'response' => $this->getResponse(),\n 'server' => $this->getUrl()\n );\n }", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}", "public function processApi() {\n $request = $this->_request['request'];\n $values = $this->_request;\n\n // WARNING: This method needs to add some ways to authenticate the user\n // and should also filter out any dangerous or magic methods before it\n // would be safe. This code is for demonstration purposes only!\n\n if (method_exists($this->database, $request)) {\n if (!empty($_REQUEST['request'])) {\n unset($values['request']);\n $result = $this->database->processRequest($request, $values);\n if (!empty($result)) {\n $this->response($this->json($result), 200);\n }\n else {\n // If no records \"No Content\" status\n $this->response('',204);\n }\n }\n else {\n // If the method not exist with in this class, response would be \"Page not found\".\n $this->response('',404);\n }\n }\n }", "protected function handleResultRequest() {\n\t\t// no longer letting people in without these things. If this is\n\t\t// preventing you from doing something, you almost certainly want to be\n\t\t// somewhere else.\n\t\t$deadSession = false;\n\t\tif ( !$this->adapter->session_hasDonorData() ) {\n\t\t\t$deadSession = true;\n\t\t}\n\t\t$oid = $this->adapter->getData_Unstaged_Escaped( 'order_id' );\n\n\t\t$request = $this->getRequest();\n\t\t$referrer = $request->getHeader( 'referer' );\n\t\t$liberated = false;\n\t\tif ( $this->adapter->session_getData( 'order_status', $oid ) === 'liberated' ) {\n\t\t\t$liberated = true;\n\t\t}\n\n\t\t// XXX need to know whether we were in an iframe or not.\n\t\tglobal $wgServer;\n\t\tif ( $this->isReturnFramed() && ( strpos( $referrer, $wgServer ) === false ) && !$liberated ) {\n\t\t\t$sessionOrderStatus = $request->getSessionData( 'order_status' );\n\t\t\t$sessionOrderStatus[$oid] = 'liberated';\n\t\t\t$request->setSessionData( 'order_status', $sessionOrderStatus );\n\t\t\t$this->logger->info( \"Resultswitcher: Popping out of iframe for Order ID \" . $oid );\n\t\t\t$this->getOutput()->allowClickjacking();\n\t\t\t$this->getOutput()->addModules( 'iframe.liberator' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->setHeaders();\n\t\t$userAgent = $request->getHeader( 'User-Agent' );\n\t\tif ( !$userAgent ) {\n\t\t\t$userAgent = 'Unknown';\n\t\t}\n\n\t\tif ( $this->isRepeatReturnProcess() ) {\n\t\t\t$this->logger->warning(\n\t\t\t\t'Donor is trying to process an already-processed payment. ' .\n\t\t\t\t\"Adapter Order ID: $oid.\\n\" .\n\t\t\t\t\"Cookies: \" . print_r( $_COOKIE, true ) . \"\\n\" .\n\t\t\t\t\"User-Agent: \" . $userAgent\n\t\t\t);\n\t\t\t$this->displayThankYouPage( 'repeat return processing' );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $deadSession ) {\n\t\t\tif ( $this->adapter->isReturnProcessingRequired() ) {\n\t\t\t\twfHttpError( 403, 'Forbidden', wfMessage( 'donate_interface-error-http-403' )->text() );\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t'Resultswitcher: Request forbidden. No active donation in the session. ' .\n\t\t\t\t\t\"Adapter Order ID: $oid.\\n\" .\n\t\t\t\t\t\"Cookies: \" . print_r( $_COOKIE, true ) . \"\\n\" .\n\t\t\t\t\t\"User-Agent: \" . $userAgent\n\t\t\t\t);\n\t\t\t}\n\t\t\t// If it's possible for a donation to go through without our\n\t\t\t// having to do additional processing in the result switcher,\n\t\t\t// we don't want to falsely claim it failed just because we\n\t\t\t// lost the session data. We also don't want to give any\n\t\t\t// information to scammers hitting this page with no session,\n\t\t\t// so we always show the thank you page. We don't want to do\n\t\t\t// any post-processing if we're not sure whether we actually\n\t\t\t// originated this attempt, so we return right after.\n\t\t\t$this->logger->warning(\n\t\t\t\t'Resultswitcher: session is dead, but the ' .\n\t\t\t\t'donor may have made a successful payment.'\n\t\t\t);\n\t\t\t$this->displayThankYouPage( 'dead session' );\n\t\t\treturn;\n\t\t}\n\t\t$this->logger->info( \"Resultswitcher: OK to process Order ID: \" . $oid );\n\n\t\tif ( $this->adapter->checkTokens() ) {\n\t\t\t// feed processDonorReturn all the GET and POST vars\n\t\t\t$requestValues = $this->getRequest()->getValues();\n\t\t\t$result = $this->adapter->processDonorReturn( $requestValues );\n\t\t\t$this->markReturnProcessed();\n\t\t\t$this->renderResponse( $result );\n\t\t\treturn;\n\t\t} else {\n\t\t\t$this->logger->error( \"Resultswitcher: Token Check Failed. Order ID: $oid\" );\n\t\t}\n\t\t$this->displayFailPage();\n\t}", "public function & GetRequest ();", "public function dispatch($request, $response, $parameters);", "protected function process(): \\Botomatic\\Engine\\Facebook\\Entities\\Response\n {\n if ($this->isFirstStep())\n {\n // advance to the next step\n $this->nextStep();\n\n return $this->response->askForAge();\n }\n else\n {\n if ($this->message->userSentAge())\n {\n /**\n * Extract the age, show message and move to the next state\n */\n return $this->response->finish($this->message->extractAge());\n }\n else\n {\n return $this->response->notAValidAge();\n }\n }\n }", "public function __doRequest($request, $location, $action, $version, $one_way = 0)\n {\n if ($this->_debug) {\n $this->_logger->debug($request);\n }\n $response = parent::__doRequest($request, $location, $action, $version, $one_way);\n if ($this->_debug) {\n $this->_logger->debug($response);\n }\n return $response;\n }", "function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }", "public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }", "public function processTask(Request $request, Response $response, $params): Response\n {\n try {\n $tokenCh = $this->checkToken($request);\n if ($tokenCh) {\n $reqMethod = $request->getMethod();\n $isType = $this->checkReqType($params['type']);\n $cliId = $tokenCh->id;\n if ($isType) {\n if ($reqMethod === \"DELETE\") {\n $isPending = $this->pendingChecker((int)$params['id'], $isType[0], $cliId);\n if ($isPending) {\n $deleteReq = $this->deleteReq((int)$params['id'], $cliId, $isType);\n if ($deleteReq) return $this->obj->respondSuccess($response, $deleteReq);\n if (!$deleteReq) return $this->obj->respondFailed($response, $deleteReq);\n }\n if (!$isPending) return $this->obj->respondSuccess($response, \"Request is Already in Progress. Cannot be Deleted!\");\n }\n if ($reqMethod === \"GET\" || $reqMethod === \"POST\") {\n $viewReq = $this->viewReq((int)$params['id'], $cliId, $isType);\n if ($viewReq) return $this->obj->respondSuccess($response, $viewReq);\n if (!$viewReq) return $this->obj->respondFailed($response, \"No Data Found!\");\n }\n }\n if (!$isType) return $this->obj->respondFailed($response, \"Invalid Request Type!\");\n }\n if (!$tokenCh) return $this->noUserFound($response);\n } catch (\\Throwable $th) {\n // return $this->obj->respondFailed($response,\"Something Went Wrong!\");\n return $this->obj->respondFailed($response, $th);\n }\n }", "public function response($result, $request)\n {\n return $this->respondWithNoContent();\n }", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();" ]
[ "0.71927243", "0.71348816", "0.70686597", "0.69724953", "0.6652359", "0.6570904", "0.6568109", "0.6544741", "0.64819896", "0.64289415", "0.63931143", "0.63909805", "0.6222854", "0.61849636", "0.6102798", "0.6098426", "0.6072254", "0.60117525", "0.5990137", "0.5970429", "0.5965106", "0.5935644", "0.59201497", "0.58932626", "0.5869072", "0.5822636", "0.5822306", "0.58159345", "0.5803862", "0.5761565", "0.57541955", "0.57541955", "0.57541955", "0.56959885", "0.5693272", "0.5693218", "0.5667585", "0.5632619", "0.56179667", "0.5607186", "0.56001383", "0.56000954", "0.5599077", "0.55902356", "0.5583226", "0.5580821", "0.5580122", "0.5561221", "0.55596006", "0.55062217", "0.5505743", "0.5495192", "0.54941773", "0.54672706", "0.5457236", "0.54564935", "0.54450774", "0.5444905", "0.5428614", "0.5422329", "0.5398609", "0.53893113", "0.5383182", "0.5376546", "0.53701097", "0.53690493", "0.5364275", "0.5364275", "0.5354086", "0.5349772", "0.53471935", "0.5336272", "0.5335279", "0.5329193", "0.5325179", "0.5315744", "0.53122413", "0.53028655", "0.530218", "0.5301311", "0.5296581", "0.5296073", "0.5294995", "0.52943903", "0.52925706", "0.5288722", "0.5287199", "0.52751416", "0.5275014", "0.52722406", "0.5269845", "0.52669275", "0.52669275", "0.52669275", "0.52669275", "0.52669275", "0.52669275", "0.52669275", "0.52669275", "0.52669275" ]
0.5380021
63
genera el contenido para insertar en codigo QR
private function MakeContentQR(){ $content = "{$this->Nombre} {$this->Apellidos}\n{$this->email}\n{$this->Carrera}\n {$this->Semestre}\n{$this->ncontrol}\n{$this->FolioPago}\n{$this->F_Examen}"; return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generate(Request $request){ \n $data = $request->all();\n QRCode::text($data['code'])->png(); \n }", "public static function getGenerateQrCode(Request $request){\n $title = \"Generate Qr Code\";\n $projectDetailObj = new \\App\\Project;\n $input = $request->all();\n $project = $projectDetailObj->find($input['id']);\n try{\n DB::beginTransaction();\n $explode_name = explode(' ',$project->name);\n\n $qrcode = mt_rand(1000000, 9999999).$explode_name[0].$project->id;\n // QrCode::size(500)->format('png')->generate($qrcode, public_path('storage/public/storage/user_images/'.$input['id'].'-code.png'));\n $project->update(['qrcode'=>$qrcode,'need_to_scan_qr'=>'enable']);\n DB::commit();\n /* Transaction successful. */\n }catch(\\Exception $e){ \n DB::rollback();\n /* Transaction failed. */\n }\n return \"1\" ;\n }", "function encoder ($content) {\n $code = 'global $conf;$key = $conf[\"license\"];@eval(base64_decode(\"JGNvZGUgPSBzdWJzdHIgKCRrZXksIDAsIDE0KTsgQGV2YWwgKGJhc2U2NF9kZWNvZGUgKCdKR052WkdVZ1BTQnpkSEowYjJ4dmQyVnlLQ1JqYjJSbEtUc2tkWE5sY25NZ1BTQW9KR052WkdWYk5WMHFNVEFnS3lBa1kyOWtaVnM0WFNrcU5Uc2tZV3hzYjNkbFpGOXplVzFpYjJ4eklEMGdJakl6TkRVMk56ZzVZV0pqWkdWbmFHdHRibkJ4YzNWMmVIbDZJanNrYzNsdFltOXNjMTlqYjNWdWRDQTlJSE4wY214bGJpQW9KR0ZzYkc5M1pXUmZjM2x0WW05c2N5azdKR2xrSUQwZ01EdG1iM0lnS0NScElEMGdNRHNnSkdrZ1BDQTBPeUFrYVNBckt5a2dleVJzWlhSMFpYSWdQU0J6ZEhKd2IzTWdLQ1JoYkd4dmQyVmtYM041YldKdmJITXNJQ1JqYjJSbElGc2thVjBwT3lSc1pYUjBaWElnUFNBa2MzbHRZbTlzYzE5amIzVnVkQ0F0SUNSc1pYUjBaWElnTFNBeE95UnBaQ0FyUFNBa2JHVjBkR1Z5SUNvZ2NHOTNJQ2drYzNsdFltOXNjMTlqYjNWdWRDd2dKR2twTzMwa2MzUnlJRDBnSW5KNVkySnJiV2hpSWpza2MzUnlYMnhsYmlBOUlITjBjbXhsYmlBb0pITjBjaWs3WlhaaGJDQW9ZbUZ6WlRZMFgyUmxZMjlrWlNBb0owcElWV2RKUkRCbldUSldjR0pEUVc5S1NGWjZXbGhLZWtsRE9HZE9VMnMzU2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVVRTVTVU5KZVUxNlVURk9hbU0wVDFkR2FWa3lVbXhhTW1oeVlsYzFkMk5ZVGpGa2JtZzFaV2xKTjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblVGTkNlbVJJU25OYVZ6Um5TME5TYUdKSGVIWmtNbFpyV0ROT05XSlhTblppU0Uxd1QzbFNlbHBZU25CWlYzZG5VRk5CYmtwNmRHMWlNMGxuUzBOU2NFbEVNR2ROUkhOblNrZHJaMUJEUVd0ak0xSjVXREo0YkdKcWMyZEtSMnRuUzNsemNFbElkSEJhYVVGdlNrZHJaMHBUUVhsSlJEQTVTVVJCY0VsSWMydGlSMVl3WkVkV2VVbEVNR2RqTTFKNVkwYzVla2xEWjJ0WlYzaHpZak5rYkZwR09YcGxWekZwWWpKNGVreERRV3RqTTFKNVYzbFNjRmhUYTJkTGVVSjZaRWhLZDJJelRXZExRMUpvWWtkNGRtUXlWbXRZTTA0MVlsZEtkbUpJVFhOSlExSjZaRWhKWjFkNVVuQkxla1prUzFSME9WcFhlSHBhVTBJM1NrZDRiR1JJVW14amFVRTVTVWhPTUdOdVFuWmplVUZ2U2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVYZG5Ta2hPTUdOc2MydGhWakJ3U1VOeloyTXpVbmxqUnpsNlNVTm5hMWxYZUhOaU0yUnNXa1k1ZW1WWE1XbGlNbmg2VEVOQmEyTXpVbmxKUm5OcllWTXdlRmhUYXpkbVUxSnpXbGhTTUZwWVNXZFFVMEZyWWtkV01HUkhWbmxKUTFWblNraE9OV0pYU25aaVNFNW1XVEk1TVdKdVVUZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkWWFVRnJZVmRSTjBwSGVHeGtTRkpzWTJsQk9VbERVbk5hV0ZJd1dsaEpaMWhwUVd0a1ZITnJZa2RXTUdSSFZubEpRM001U1VOU2NGcERRWEpKUTFKeldsaFNNRnBZU1dkUWFqUm5Ta2RyWjB0NVFXdGhWSE5yWWtkV01HUkhWbmxKUkRCblNrZDRiR1JJVW14amFVRXJVR2xCZVU5NVVuTmFXRkl3V2xoSloxQlRRV3RpUjFZd1pFZFdlVWxHTkdkS1NFNDFZbGRLZG1KSVRtWlpNamt4WW01Uk4wcEhlR3hrU0ZKc1kybEJjVkJUUW5wa1NFcDNZak5OWjB0RFVtaGlSM2gyWkRKV2ExZ3pUalZpVjBwMllraE5jMGxEVW5wa1NFbG5WM2xTY0ZoVGF6ZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkS1UwRnJZek5zZEZsdE9YTmpNVGxxWWpOV2RXUkVjMnRpUjFZd1pFZFdlVWxFTUdkS1IwWnpZa2M1TTFwWFVtWmpNMngwV1cwNWMyTjVRbUpLUjNoc1pFaFNiR05zTURkS1NFNXNZMjFzYUdKRFFYVlFVMEZyWWtkV01HUkhWbmxQTXpGc1pHMUdjMGxEYUdsWldFNXNUbXBTWmxwSFZtcGlNbEpzU1VObmJsRXliRk5sYkhCWlUyNUNXbFl6YUcxWmJHUkhUa1puZVdWSGVHbGhWVVUxVTFWU2JrNHdjRWhPVjNoclRWUnNObGRzYUV0alJteFlaREprVVZVd1NtOVpNalZMWVVkV1ZGRlhPVXhXU0U1eVdYcEtWMlZYUmxoU2JrNVpUVzVvYzFsdGJFSlBWV3hKVkdwQ2FtSllhSE5aYld4Q1lqQndTVlJ0ZUdwaVYzaHZXV3RPY2s0eGNIUlBXR3hLVVRKa2NsbFdUa0pQVld4RlVWUmtTbEV4U25kVFZWSXpXakJ3U1ZScVFtcGlSR3g2VjJ4ak1FNHdiRVJWYmtKS1VUTk9lVk14VGtOT01rWllWMWRrVEZFeFNuZFRWVkl6V2pCd1NWUnRlR3BpVjNodldXdFpOV1JHYkZsaFIxcHBVakZhTVZNeFRrTk9NSEJJVGxkNGEwMVViRFpYYkdoTFkwWnNXR1F5WkZobFZrcDNWMFpPUWs5VmJFbFVha0pxWW10S01sa3piRUppTUhCSVVtNU9hVko2YTNwWGJHUlRXbTFOZW1KSVVscGlWR3g2V1ROc00xb3djRWxVYlhocVlsZDRiMWxyVGtOWmEzQklZa2RTVEZaSVVUVlhiR1EwWld4d1ZGRnFaRXRTZWxaeldrUkZOV1ZzY0ZsVGJrSmFWak5rYmxZemJGTmpSWEJWWWtkU1NsRXpUVFZUVldoUFRVZE9kVkZ1V21wbFZVWjJVMnRrUjJNeVNraFBWRTVoVmpGS2JWbDZUbk5rUm14MFQxaE9hbVZZWkc1VGEyaFBZa2RPZEdKSGFHbFJNRXBwVTJ0a2MxcEZkRlZrUkd4dFZqRndNbGt5TVZkaFJtdDVXakprVEZFeFNqRlhiR2hyV20xTmVWWnViR2hXTUZwNlUxVmtSMlZyYkVSVmJrSktVa1JCY2xOVlRscGFNSEJJWlVkNGExTkdTbk5aTW14eVdqSldOVlZ1VG1GWFJrbDNWMnhvU2xveFFsUlJWM1JxVFRKNE1GZFhNRFZqTWsxNFQxZHdhVTB4V2pGYVJVNUNaRVZzUlZKWFpFMVZNRVp5V1d0a1YwMUhVa2hXYm14S1VURldibE5yYUU5T1YwcFlVMjVhYVZORk5XMVhWRWsxVFZkS2RWVlVaRXRTTTJoeldrVm9VMkpIVG5CUlZHeEtVVEZLYjFsclpEUmtiVkY1Vm0xMFdVMHdOREZaYkdSTFpHMUtTVlJYWkZobFZrcDZWMnhvVTAxR2NGbFRiVkpRVFhwR2MxcEhNVWRqTUd4RVlVZHNXbGRGTlhOVWJYQlRXbXh3U0ZadGNHbE5iRXB6VTFWT2JtRldaSFJOUkZac1ZtNUNXVlZ0TVhkaFJrVjNVbTVhVkdFeVRYaFphMlJTWlVVNVdXTkhSbGhTV0VJelZqRmFhMDB4YjNoaVJteFZWakpTVEZWcVNqQmliRlpIVlZSQ1lVMUlRa2xhVldRMFlURk9SMU51VGxwTmJYaDVWMnBLVjA1V1ZuVlViVVpZVW10c00xWXllRzlUYkc5NFVXeFNVbFl6VW05V1ZFSkhaVVpPVmxWck5VNVNWM2hGV1hwS2EyRlZNSGRqU0VwVVZsVTFkVmxVU2t0VFJscHhVVzEwVTAxV2J6RlZla1pQVVcxU1JtSkZiRlZoYTBweFdXMTBTMDFzYTNwaVJVcHBUVWhDU1ZWdE5VOWhWa28yWVROd1dHSkhVbFJYYlRGT1pXMUtTVlZzY0dsV1IzZzJWMVJPYzAweGIzZGpSV2hzVWpOb2NsVXdXa3RqTVd0NVlraEtZVTFWU2taYVJFcHJWRzFHZFZSdVNscGhNbEpZVkZWa1UxTkdXblZpUlhCVFVrVktkVlV5ZEd0T1IwcElWV3RzVm1KWWFIRlpWbFpIWXpGT1ZsUnNUbXhpVmxwWlZGWmtjMkZWTVhWaFJGcFlVa1Z3VUZwSE1WTlhSVFZWVVd4Q2JGWnJjRFpXTW5odlZUQXhSMk5HYkZSV01sSlNWbFJDUjJOc1pGZGFSRkpxVFd0c05sZHJaRFJaVmtweFlrUmFZVlp0VGpSWlZtUktaVmRXU1dORmNGTmlhelY1VjFkMGExWXdNVWhWYTJoWFltMTRXbFpyYUZKT1ZrNXlXWHBHYVZJeFJqUlVNV2gzV1Zaa1JtTklaRmhXYlZFd1YyMHhUbVZzVm5WaVJYQlRVa1ZLZFZkV1kzZE9WMDVJVTI1Q1VsWjZiRXhhVm1SUFpXeE9WbFJzVG10V2JrSmFWMnRrWVdGck1YTlhhbFphVm0xU1NGbDZRakJXVjFKRlVtMXNhV0Y2Vm5wWGExWlBVVzFKZDJORmFFOVdNMmh5VkZaU2MwNXNaSE5oUlhScVVtMTRXVnBFVGtOVlIxWlhVMWhrV0dKSFRqUmFSRVp1WlZkS1NHUkZjRk5TUlVwMVZUSjBhMk15UlhkUFZGWldZbTVDY2xVd1ZuZGlWbXhYV2taS1lVMVZTbFZWVm1SelUyMUdkVlJxU2xSTmJYaFVXVEJhZDFKWFRYcFNhekZPWWtoQmVWZFVTbk5SYlVsM1kwVm9hRTF0VWxKV1ZFSkhUVEZSZW1KRlNtaE5hMXBWVlZaU2IxTnNTa2RTVkU1VVZsVTFWRmt3Vm5OU1IwMTZVMnQ0VmsxRmEzcFZNblJyVGtkS1NGVnJiRlppV0doeFdWWldSazVXVGxaYVIwWnFUV3RzTlZReGFITlRiRVY1V2toYVZHRXlVbnBaVkVKelVrWmFXRnBIY0ZObGJYUTJWVEZXVDJKdFJYbFVXSEJwVTBaS1lWbHNVbk5sYkd3MlVsUldhR0pWYkRaV2JUVlhZVEZGZWxwSE5WUmhNbEo1V1RKemVGWkhSWHBSYTNCU1pXMW9kVmRVUW1wT1ZUQjNZa1ZTWVUxdVVuRlVWRW8wVFVaa1dFMUVWbXBOYXpFMFZERmtkMkZWTUhoWGFrWmhVbFUwZWxkcVFuZFRSMFY2VVd0NFYxTkZOWGxYVjNSclZqQXhTRlZyYUZkaWJYaExWV3RTUTJKc1RuSmhSVGxQVmpCd1dWVXlOV0ZoVms1R1RsY3hXRlpGYXpGVVZtUkxaRlpXV0ZwRk1WWk5SVnA1VjFkMGExWXdNVWhWYTJoWFltMTRTMVZZY0VOaWJGSlhWVzV3YUUxcmNFbFdiWEJEWVRGSmVGZHFWbFJXVmtZelYycENkMU5HU25WVWJXeFRaVzEwTmxZeWVHdFZNWEIwVkZod2FWTkdTbUZaYkZKelpXeHJlbUpGVGxwaE0wSkpXbFZrTkdFeFRrZFRiazVhVFc1a00xUnFRbmRUVmxKeFVXMXdhVkpIZUROV01uUlBVVzFTVjFGc1VsSldNMUp3VldwR1dtUXhjRVphUm1Sc1ZsUm9ObFJXWkRSaE1rcFdWMjV3VkZaVk5YWlpWbHB6VjFaU2RHVkZPV2hpUlhCMFZqSjBhMVl5Um5SVFdHeFdZbGhvUzFWVVNtdGpSbFY1WkVkMGFrMXJWak5aYTFaWFZHeEplVlZyZUZaTlJuQk1XWHBHYzJNeVJrWlViVVpwVmxad1dsWnNXbE5oTVUxNFZHdGFUMWRGTldGVVYzQkhaV3hzVmxwRmRGTlNhMXBXV1d0V2QxVnJNVlppZWtwWVlURmFkbFY2Um5ka1JrcHpZVVphV0ZKc2NFeFhWbHBUVVRKT1IxVnJhRTVXTUZweFZGZDBjMDVXVVhoaFNFNVVZa1ZXTlZkcmFHRldSMFY1WVVaa1dHRnJTak5XYTFwSFYxZEdSazVXVGxOV1ZtOTZWbFJHVjFSck5VZGlNMlJPVm14YVUxWXdWa3RUTVZaWlkwWk9hV0pIZHpKV1IzaHJZVVpaZDAxVVdsZFdlbFo2VlRKNFJtVldjRWxUYkhCcFZrVmFXVlpHVWtkaWJWWnpWVzVTYkZJelFuQldhazV2Wkd4a1dHUkdjRTlXTVZvd1ZsZDBjMVpHWkVaT1ZYUldZVEZhU0ZwWGVFOVdiRlp5WTBkd1UxWXphRVpXUjNScllURk5lRlJyWkZkaVZGWlZXV3RWTVZFeGNGWldXR2hUVW10YVdsWnRkSGRWYXpGSVpETmtWazFYVW5sVVZtUlhaRVpXYzJGR1VtbGlhMHA1VmxSQ1YyTXlTbk5VV0dSVllrVTFjbFp0TlVOWGJHUnlXa2RHYUdGNlJucFdNbkJYVjJ4YWRGVnJhRnBsYTFwMVdsZDRVMk5XUm5SalIyaFlVakZLTVZaclpEQlVNREI0WWpOa1QxWldTbTlhVnpGVFZFWlZkMVpVUm1wTlYzUTFWRlpvVDJGR1NYZGpSVlpXVm14S2VsVXllRTlTYXpWSldrWndUbUZzV2xWWGEyTjRWVEZrVjFKdVZtRlNNRnBaVld4a05HUldWalpSYXpsV1RXeGFlbGt3V25OV1IwcHlVMjFHVjJGck5YSmFSRVpUVG14T2MxUnRiRk5pYTBsM1YxZDBiMVl4YkZkV1dHUlRZbXh3VlZacVRsSk5SbFY1WlVWYWEwMVdjSGxVTVZwaFZHeEtjMk5JVWxkaE1VcEVXbGN4UjFadFZrWlZiRXBwWW10S2VWWlVRbGRrYlZGNFlraEdWR0ZzU25KWmJGcEhUbFphZEU1WVRsVlNhMVkwVlRJMVIxZHRSbkpqUmxKYVlURlpkMVpyV2tkV1YwcEhVbXhhVGxKWE9IbFdNblJYWWpGTmQwMVZhRlJYUjNoelZUQmFkMk5zVWxobFIwWlBWbXN4TTFaSGVFOWlSMHBKVVd4d1ZrMXFWa1JXTW5oYVpXeHdTVnBHVWs1V2EyOHlWVEZrYzJOdFRrWlBWRTVSVmtSQ1RGTlhiSEpqUlRrelVGUXdia3RUYXpjbktTazcnKSk7IGlmICgkdXNlcnMgPT0gMCkgJHVzZXJzID0gMTsgaWYgKCR1c2VycyA9PSA0OTUpICR1c2VycyA9IDEwMDAwMDA7IGlmICghTElDRU5TRV9PSykgeyBpZiAoISBlbXB0eSAoJF9QT1NUIFsnY29kZSddKSkgeyAkdGhpcy0+dmlldy0+bW9kZSA9IDE7IH0gZWxzZSB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSB9IGVsc2UgeyAgaWYgKHN0cmxlbiAoJGtleSkgIT0gMTkpICB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSBlbHNlIHsgZXZhbChiYXNlNjRfZGVjb2RlKCJaWFpoYkNoaVlYTmxOalJmWkdWamIyUmxLQ0pLUjJocVlqSlNiRWxFTUdkak0xWnBZek5TZVVsRFoydGhNbFkxVEVOQmVFNVRhemRKUTFKclNVUXdaMGxEYUdsWldFNXNUbXBTWmxwWE5XcGlNbEpzU1VOb2EyRllUbkpZTTFKMlpFZEdjMWd6VG5kWlYwNXNTME5TWmxVd1ZsTldhMVpUU1VaemJsSkZPVVJXVlRGR1ZHeFNabFZyT1ZCV1EyUmtTMU5yY0U5NVFXdGphVUU1U1VOQmIxbHRSbnBhVkZrd1dESldkVmt5T1d0YVUwRnZTa1k1VkZKV1NsZFNWa2xuVjNsa1JWUXdUbFpVVlZaUFZrWTVVMVF3T1ZWS01UQndTMVJ6WjBsSFZqSlpWM2R2V1cxR2VscFVXVEJZTWxKc1dUSTVhMXBUWjJsVGEyUlBaR3h3U0ZaWFpGRlZNRVp5VjJ0Tk1HRXlUbkZqTW1SS1VURktOVmRFU2pSaVIwcHdVVlJzU2xORk5IZFpNakUwWWtkS2NGRlhPVXRUUld4M1ZETnNRbUV5VFhsV2JteG9WakJhZWxOVlVYZGFNSEExV1hwa1NsRXhTbTlaYTJRMFpHMVJlVlp0ZEZsTk1EUXhXV3hrUzJSdFNrbFVWMlJSVlRCR2NGUlhjRTVOUlRWVlYxUk9VRkpIZUc5WFZ6RlBZVEZ3V0ZwSE9XaE5ha1l4V1RCb1IyVnRVbGxYYWxKc1YwYzVjRlF6YkVKaE1rMTZZa2hTV21KVWJIcFpla1UxWVcxSmVsWnVWbXRSTUVVMVUxVm9UMDFIVG5SbFIzaHBZVlZHZGxOclpFZGpNa3BJVDFST1lWWXhTbTFaZWs1elpFWnNkRTlZVG1wbFYzTXpVMVZPUTJKWFNYcFRWMlJNVVRGS2QxTlZVWGRhTURGRll6SmtTMUl5ZEc1VlJVNURaVzFTU1ZOdVRtRldlbEp1VXpCT1UyRnRTWGxWYlhoTVZraE9ibE5yWkhKYU1IUTFZek5DU2xOSVRtNVpWbVJhV2pCMFJGVnVRa3BSTVZadVZGZHNRazlXUWxSUldHUk1WVEJKTTFOVlRsTmpNWEJaVldwQ1lWZEZiRzVWUms1RFpHMU9kRlZYWkV4Uk1VcHhXV3BLVTJKR1pEVlZia0paVlRKek0xTlZUbE5qTVhCWlZXcENZVmRGYkc1VlJrNUNZVEpLU0ZacVFtdFNNVm8xVTFWT1Zsb3djRWxVYWxacFZqQndNbGxyYUU5YWJHdDVUMVJHYVdKc1JUTlRWVTVUWXpGd1dWVnFRbUZYUld4dVV6TnZkMW93Y0VobFIzaHJVMFpLYzFreWJFSkxNVUp3VVZkMGFGVXdSbmxUVlU1VFkwVTVOVkZYWkV0U00yaHpXa1ZvVTJKSFRuQlJWR3hLVVRGS2VsZHNhRk5OUm5CWlUxZGtVV0ZxVW01VVYzQjZXakJ3U0dWSGVHdFRSa3B6V1RKc1FrOVZiRVJWYms1aFYwWkpkMWRzYUVwYU1XaHdVVlJHVGxaSFRUTlRWVTVUWXpGd1dWVnFRbUZYUld4dVV6SnZkMW95U1hwVGJYUktVVEprY2xkVVNUVmhNWEJVVVcxS1MxSXllR3RUTVZKNldqSmFWRkZ0ZUdsVFJUVnpVMVZvZWxvd2NFaGxSM2hyVTBaS2Mxa3liRUpQVld4SVQxaHNZVkV3Um5aVGEyUlBaR3h3U0ZadFNrdFNNbmhyVXpGT1FtTnJiRWhQV0d4aFVUQkdkbE5yWkU5a2JIQklWbGRrV0dWV1NuZFVSbEpIV2tWMFZHSjZRbEJsVlVrMVUxVk9VMk14Y0ZsVmFrSmhWMFZzYmxWR1RrSmhNa3BJVm1wQ2ExSXhXalZUVlU1V1dqQndTVlJxVm1sV01IQXlXV3RvVDFwc2EzbFBWRVpwWW14Rk0xTlZUbE5qTVhCWlZXcENZVmRGYkc1VlJrNUNZVEZzV0dWSVRtbE5NbEp6VjJ0Wk5XVnRWbGhOVjJ4cFRXNW9ObE5WV25waE1rcElWbXBDYTFJeFdqVlhSbEo2V2pCd1NWUnRlR3BpVjNodldXdE9RbVJXUWxSUlYzUnBVakZaZDFwRlpGZGxWVGsxVVdwcmFVdFRhemRKUTBGcll6SldlV0ZYUm5OWU1qRm9aVVk1YzFwWE5HZFFVMEV3VDNsQlowcEhOV3hrTVRsNldsaEtjRmxYZDJkUVUwSm9ZMjVLYUdWVFFXOUxWSE5uU2toT2JHTnRiR2hpUmpseldsYzBaMUJUUW5wa1NFcHpXbGMwWjB0RFVucGFXRXB3V1ZkM2NFOTVRV2RhYlRsNVNVTm5hMkZUUVRsSlJFRTNTVU5TY0VsRWQyZEtTRTVzWTIxc2FHSkdPWE5hVnpRM1NVTlNjRWxEYzNKTFUwSTNTVWRzYlVsRFoydGhVMEU0U1VOU2VscFlTbkJaVjNobVlsZEdORmd5ZUd4aWFXdG5aWGxCYTJKdFZqTllNMDVzWTIxc2FHSkRRbUpLUjJ4a1NVUXdaMHBJVG14amJXeG9Za05DWWtwSGJHUlBlVUk1U1VkV2MyTXlWV2RsZVVGclltMVdNMWd6VG14amJXeG9Za05DWWtwSGEyeE9SakJuUzNvd1owcElUbXhqYld4b1lrTkNZa3BIYkdSUGVVSTVTVWd3WjBsSFduWmpiVlpvV1RKblowdERVblZhV0dSbVl6SldlV0ZYUm5OSlIwWjZTVU5TY0VsRU1DdEpRMWxuU2tkNGJHUklVbXhqYVd0blpYbEJhMkpIVmpCa1IxWjVTVVF3WjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblRGTkJlRWxETUdkS1IzaHNaRWhTYkdOcFFXeEpRMUo2WlZjeGFXSXllSHBZTWs1MlpGYzFNRTk1UVd0aVIxWXdaRWRXZVVsRU1HZEtSMFp6WWtjNU0xcFhVbVpqTTJ4MFdXMDVjMk41UW1KS1IzaHNaRWhTYkdOc01EZEpTREE5SWlrcE95QWdabTl5SUNna2FTQTlJREE3SUNScElEd2dORHNnS3lzZ0pHa3BJSHNnSkc1bGQxOXpaWEpwWVd4YkpHbGRJRDBnSkhObGNtbGhiQ0JiSkdsZE95QjlJQ0FrWTI5a1pTQTlJR3B2YVc0Z0tDY25MQ0FrYm1WM1gzTmxjbWxoYkNrN0lDQWtZMjlrWlNBOUlITjFZbk4wY2lBb0pITmxjbWxoYkN3Z01Dd2dOQ2s3SUdsbUlDaHpkSEowYjJ4dmQyVnlJQ2drWTI5a1pTa2dJVDBnYzNSeWRHOXNiM2RsY2lBb0pHaGpiMlJsS1NrZ2V5QWdhV1lnS0NFZ1pXMXdkSGtnS0NSZlVFOVRWQ0JiSjJOdlpHVW5YU2twSUhzZ0pIUm9hWE10UG5acFpYY3RQbTF2WkdVZ1BTQXhPeUI5SUdWc2MyVWdleUFrZEdocGN5MCtYM0psWkdseVpXTjBJQ2duTDJsdVpHVjRMMkZqZEdsMllYUmxKeWs3SUgwZ2ZTQmxiSE5sYVdZZ0tDUjFjMlZ5Y3p3ME9UVXBJSHNnSkhGMVpYSjVJRDBnSjFORlRFVkRWQ0JqYjNWdWRDaHBaQ2tnWVhNZ2JuVnRJRVpTVDAwZ1pHRmpiMjV6WDNWelpYSnpJRmRJUlZKRklHTjFjM1J2YldWeVgybGtJRDBnSnk1cGJuUjJZV3dvSkhSb2FYTXRQbk5sYzNOcGIyNHRQbU4xYzNSdmJXVnlYMmxrS1M0bklFRk9SQ0J5WldGa2IyNXNlVHcrTVNCQlRrUWdhWE5mWVdSdGFXNGdQU0F3SnpzZ0pISnZkeUE5SUNSMGFHbHpMVDVrWWkwK1ptVjBZMmhTYjNjZ0tDUnhkV1Z5ZVNrN0lHbG1JQ2drY205M0lGc25iblZ0SjEwZ1BpQWtkWE5sY25NcElIc2dhV1lnS0NFZ1pXMXdkSGtnS0NSZlVFOVRWQ0JiSjJOdlpHVW5YU2twSUhzZ0pIUm9hWE10UG5acFpYY3RQbTF2WkdVZ1BTQXhPeUFrZEdocGN5MCtkbWxsZHkwK2QyVmZibVZsWkY5dGIzSmxYM1Z6WlhKeklEMGdkSEoxWlRzZ2ZTQmxiSE5sSUhzZ0pIUm9hWE10UGw5eVpXUnBjbVZqZENBb0p5OXBibVJsZUM5aFkzUnBkbUYwWlNjcE95QjlJSDBnWld4elpTQjdJQ1IwYUdsekxUNTJhV1YzTFQ1dGIyUmxJRDBnTWpzZ2ZTQjlJR1ZzYzJVZ2V5QWtkR2hwY3kwK2RtbGxkeTArYlc5a1pTQTlJREk3SUgwPSIpKTsgfSB9\"));';\n //$code = 'global $conf;$key = $conf[\"license\"];@eval(base64_decode(\"JGNvZGUgPSBzdWJzdHIgKCRrZXksIDAsIDE0KTsgQGV2YWwgKGJhc2U2NF9kZWNvZGUgKCdKR052WkdVZ1BTQnpkSEowYjJ4dmQyVnlLQ1JqYjJSbEtUc2tkWE5sY25NZ1BTQW9KR052WkdWYk5WMHFNVEFnS3lBa1kyOWtaVnM0WFNrcU5Uc2tZV3hzYjNkbFpGOXplVzFpYjJ4eklEMGdJakl6TkRVMk56ZzVZV0pqWkdWbmFHdHRibkJ4YzNWMmVIbDZJanNrYzNsdFltOXNjMTlqYjNWdWRDQTlJSE4wY214bGJpQW9KR0ZzYkc5M1pXUmZjM2x0WW05c2N5azdKR2xrSUQwZ01EdG1iM0lnS0NScElEMGdNRHNnSkdrZ1BDQTBPeUFrYVNBckt5a2dleVJzWlhSMFpYSWdQU0J6ZEhKd2IzTWdLQ1JoYkd4dmQyVmtYM041YldKdmJITXNJQ1JqYjJSbElGc2thVjBwT3lSc1pYUjBaWElnUFNBa2MzbHRZbTlzYzE5amIzVnVkQ0F0SUNSc1pYUjBaWElnTFNBeE95UnBaQ0FyUFNBa2JHVjBkR1Z5SUNvZ2NHOTNJQ2drYzNsdFltOXNjMTlqYjNWdWRDd2dKR2twTzMwa2MzUnlJRDBnSW5KNVkySnJiV2hpSWpza2MzUnlYMnhsYmlBOUlITjBjbXhsYmlBb0pITjBjaWs3WlhaaGJDQW9ZbUZ6WlRZMFgyUmxZMjlrWlNBb0owcElWV2RKUkRCbldUSldjR0pEUVc5S1NGWjZXbGhLZWtsRE9HZE9VMnMzU2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVVRTVTVU5KZVUxNlVURk9hbU0wVDFkR2FWa3lVbXhhTW1oeVlsYzFkMk5ZVGpGa2JtZzFaV2xKTjBwSVRqVmlWMHAyWWtoT1psa3lPVEZpYmxGblVGTkNlbVJJU25OYVZ6Um5TME5TYUdKSGVIWmtNbFpyV0ROT05XSlhTblppU0Uxd1QzbFNlbHBZU25CWlYzZG5VRk5CYmtwNmRHMWlNMGxuUzBOU2NFbEVNR2ROUkhOblNrZHJaMUJEUVd0ak0xSjVXREo0YkdKcWMyZEtSMnRuUzNsemNFbElkSEJhYVVGdlNrZHJaMHBUUVhsSlJEQTVTVVJCY0VsSWMydGlSMVl3WkVkV2VVbEVNR2RqTTFKNVkwYzVla2xEWjJ0WlYzaHpZak5rYkZwR09YcGxWekZwWWpKNGVreERRV3RqTTFKNVYzbFNjRmhUYTJkTGVVSjZaRWhLZDJJelRXZExRMUpvWWtkNGRtUXlWbXRZTTA0MVlsZEtkbUpJVFhOSlExSjZaRWhKWjFkNVVuQkxla1prUzFSME9WcFhlSHBhVTBJM1NrZDRiR1JJVW14amFVRTVTVWhPTUdOdVFuWmplVUZ2U2tkR2MySkhPVE5hVjFKbVl6TnNkRmx0T1hOamVYZG5Ta2hPTUdOc2MydGhWakJ3U1VOeloyTXpVbmxqUnpsNlNVTm5hMWxYZUhOaU0yUnNXa1k1ZW1WWE1XbGlNbmg2VEVOQmEyTXpVbmxKUm5OcllWTXdlRmhUYXpkbVUxSnpXbGhTTUZwWVNXZFFVMEZyWWtkV01HUkhWbmxKUTFWblNraE9OV0pYU25aaVNFNW1XVEk1TVdKdVVUZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkWWFVRnJZVmRSTjBwSGVHeGtTRkpzWTJsQk9VbERVbk5hV0ZJd1dsaEpaMWhwUVd0a1ZITnJZa2RXTUdSSFZubEpRM001U1VOU2NGcERRWEpKUTFKeldsaFNNRnBZU1dkUWFqUm5Ta2RyWjB0NVFXdGhWSE5yWWtkV01HUkhWbmxKUkRCblNrZDRiR1JJVW14amFVRXJVR2xCZVU5NVVuTmFXRkl3V2xoSloxQlRRV3RpUjFZd1pFZFdlVWxHTkdkS1NFNDFZbGRLZG1KSVRtWlpNamt4WW01Uk4wcEhlR3hrU0ZKc1kybEJjVkJUUW5wa1NFcDNZak5OWjB0RFVtaGlSM2gyWkRKV2ExZ3pUalZpVjBwMllraE5jMGxEVW5wa1NFbG5WM2xTY0ZoVGF6ZEtSM2hzWkVoU2JHTnBRVGxKUTFKeldsaFNNRnBZU1dkS1UwRnJZek5zZEZsdE9YTmpNVGxxWWpOV2RXUkVjMnRpUjFZd1pFZFdlVWxFTUdkS1IwWnpZa2M1TTFwWFVtWmpNMngwV1cwNWMyTjVRbUpLUjNoc1pFaFNiR05zTURkS1NFNXNZMjFzYUdKRFFYVlFVMEZyWWtkV01HUkhWbmxQTXpGc1pHMUdjMGxEYUdsWldFNXNUbXBTWmxwSFZtcGlNbEpzU1VObmJsRXliRk5sYkhCWlUyNUNXbFl6YUcxWmJHUkhUa1puZVdWSGVHbGhWVVUxVTFWU2JrNHdjRWhPVjNoclRWUnNObGRzYUV0alJteFlaREprVVZVd1NtOVpNalZMWVVkV1ZGRlhPVXhXU0U1eVdYcEtWMlZYUmxoU2JrNVpUVzVvYzFsdGJFSlBWV3hKVkdwQ2FtSllhSE5aYld4Q1lqQndTVlJ0ZUdwaVYzaHZXV3RPY2s0eGNIUlBXR3hLVVRKa2NsbFdUa0pQVld4RlVWUmtTbEV4U25kVFZWSXpXakJ3U1ZScVFtcGlSR3g2VjJ4ak1FNHdiRVJWYmtKS1VUTk9lVk14VGtOT01rWllWMWRrVEZFeFNuZFRWVkl6V2pCd1NWUnRlR3BpVjNodldXdFpOV1JHYkZsaFIxcHBVakZhTVZNeFRrTk9NSEJJVGxkNGEwMVViRFpYYkdoTFkwWnNXR1F5WkZobFZrcDNWMFpPUWs5VmJFbFVha0pxWW10S01sa3piRUppTUhCSVVtNU9hVko2YTNwWGJHUlRXbTFOZW1KSVVscGlWR3g2V1ROc00xb3djRWxVYlhocVlsZDRiMWxyVGtOWmEzQklZa2RTVEZaSVVUVlhiR1EwWld4d1ZGRnFaRXRTZWxaeldrUkZOV1ZzY0ZsVGJrSmFWak5rYmxZemJGTmpSWEJWWWtkU1NsRXpUVFZUVldoUFRVZE9kVkZ1V21wbFZVWjJVMnRrUjJNeVNraFBWRTVoVmpGS2JWbDZUbk5rUm14MFQxaE9hbVZZWkc1VGEyaFBZa2RPZEdKSGFHbFJNRXBwVTJ0a2MxcEZkRlZrUkd4dFZqRndNbGt5TVZkaFJtdDVXakprVEZFeFNqRlhiR2hyV20xTmVWWnViR2hXTUZwNlUxVmtSMlZyYkVSVmJrSktVa1JCY2xOVlRscGFNSEJJWlVkNGExTkdTbk5aTW14eVdqSldOVlZ1VG1GWFJrbDNWMnhvU2xveFFsUlJWM1JxVFRKNE1GZFhNRFZqTWsxNFQxZHdhVTB4V2pGYVJVNUNaRVZzUlZKWFpFMVZNRVp5V1d0a1YwMUhVa2hXYm14S1VURldibE5yYUU5T1YwcFlVMjVhYVZORk5XMVhWRWsxVFZkS2RWVlVaRXRTTTJoeldrVm9VMkpIVG5CUlZHeEtVVEZLYjFsclpEUmtiVkY1Vm0xMFdVMHdOREZaYkdSTFpHMUtTVlJYWkZobFZrcDZWMnhvVTAxR2NGbFRiVkpRVFhwR2MxcEhNVWRqTUd4RVlVZHNXbGRGTlhOVWJYQlRXbXh3U0ZadGNHbE5iRXB6VTFWT2JtRldaSFJOUkZac1ZtNUNXVlZ0TVhkaFJrVjNVbTVhVkdFeVRYaFphMlJTWlVVNVdXTkhSbGhTV0VJelZqRmFhMDB4YjNoaVJteFZWakpTVEZWcVNqQmliRlpIVlZSQ1lVMUlRa2xhVldRMFlURk9SMU51VGxwTmJYaDVWMnBLVjA1V1ZuVlViVVpZVW10c00xWXllRzlUYkc5NFVXeFNVbFl6VW05V1ZFSkhaVVpPVmxWck5VNVNWM2hGV1hwS2EyRlZNSGRqU0VwVVZsVTFkVmxVU2t0VFJscHhVVzEwVTAxV2J6RlZla1pQVVcxU1JtSkZiRlZoYTBweFdXMTBTMDFzYTNwaVJVcHBUVWhDU1ZWdE5VOWhWa28yWVROd1dHSkhVbFJYYlRGT1pXMUtTVlZzY0dsV1IzZzJWMVJPYzAweGIzZGpSV2hzVWpOb2NsVXdXa3RqTVd0NVlraEtZVTFWU2taYVJFcHJWRzFHZFZSdVNscGhNbEpZVkZWa1UxTkdXblZpUlhCVFVrVktkVlV5ZEd0T1IwcElWV3RzVm1KWWFIRlpWbFpIWXpGT1ZsUnNUbXhpVmxwWlZGWmtjMkZWTVhWaFJGcFlVa1Z3VUZwSE1WTlhSVFZWVVd4Q2JGWnJjRFpXTW5odlZUQXhSMk5HYkZSV01sSlNWbFJDUjJOc1pGZGFSRkpxVFd0c05sZHJaRFJaVmtweFlrUmFZVlp0VGpSWlZtUktaVmRXU1dORmNGTmlhelY1VjFkMGExWXdNVWhWYTJoWFltMTRXbFpyYUZKT1ZrNXlXWHBHYVZJeFJqUlVNV2gzV1Zaa1JtTklaRmhXYlZFd1YyMHhUbVZzVm5WaVJYQlRVa1ZLZFZkV1kzZE9WMDVJVTI1Q1VsWjZiRXhhVm1SUFpXeE9WbFJzVG10V2JrSmFWMnRrWVdGck1YTlhhbFphVm0xU1NGbDZRakJXVjFKRlVtMXNhV0Y2Vm5wWGExWlBVVzFKZDJORmFFOVdNMmh5VkZaU2MwNXNaSE5oUlhScVVtMTRXVnBFVGtOVlIxWlhVMWhrV0dKSFRqUmFSRVp1WlZkS1NHUkZjRk5TUlVwMVZUSjBhMk15UlhkUFZGWldZbTVDY2xVd1ZuZGlWbXhYV2taS1lVMVZTbFZWVm1SelUyMUdkVlJxU2xSTmJYaFVXVEJhZDFKWFRYcFNhekZPWWtoQmVWZFVTbk5SYlVsM1kwVm9hRTF0VWxKV1ZFSkhUVEZSZW1KRlNtaE5hMXBWVlZaU2IxTnNTa2RTVkU1VVZsVTFWRmt3Vm5OU1IwMTZVMnQ0VmsxRmEzcFZNblJyVGtkS1NGVnJiRlppV0doeFdWWldSazVXVGxaYVIwWnFUV3RzTlZReGFITlRiRVY1V2toYVZHRXlVbnBaVkVKelVrWmFXRnBIY0ZObGJYUTJWVEZXVDJKdFJYbFVXSEJwVTBaS1lWbHNVbk5sYkd3MlVsUldhR0pWYkRaV2JUVlhZVEZGZWxwSE5WUmhNbEo1V1RKemVGWkhSWHBSYTNCU1pXMW9kVmRVUW1wT1ZUQjNZa1ZTWVUxdVVuRlVWRW8wVFVaa1dFMUVWbXBOYXpFMFZERmtkMkZWTUhoWGFrWmhVbFUwZWxkcVFuZFRSMFY2VVd0NFYxTkZOWGxYVjNSclZqQXhTRlZyYUZkaWJYaExWV3RTUTJKc1RuSmhSVGxQVmpCd1dWVXlOV0ZoVms1R1RsY3hXRlpGYXpGVVZtUkxaRlpXV0ZwRk1WWk5SVnA1VjFkMGExWXdNVWhWYTJoWFltMTRTMVZZY0VOaWJGSlhWVzV3YUUxcmNFbFdiWEJEWVRGSmVGZHFWbFJXVmtZelYycENkMU5HU25WVWJXeFRaVzEwTmxZeWVHdFZNWEIwVkZod2FWTkdTbUZaYkZKelpXeHJlbUpGVGxwaE0wSkpXbFZrTkdFeFRrZFRiazVhVFc1a00xUnFRbmRUVmxKeFVXMXdhVkpIZUROV01uUlBVVzFTVjFGc1VsSldNMUp3VldwR1dtUXhjRVphUm1Sc1ZsUm9ObFJXWkRSaE1rcFdWMjV3VkZaVk5YWlpWbHB6VjFaU2RHVkZPV2hpUlhCMFZqSjBhMVl5Um5SVFdHeFdZbGhvUzFWVVNtdGpSbFY1WkVkMGFrMXJWak5aYTFaWFZHeEplVlZyZUZaTlJuQk1XWHBHYzJNeVJrWlViVVpwVmxad1dsWnNXbE5oTVUxNFZHdGFUMWRGTldGVVYzQkhaV3hzVmxwRmRGTlNhMXBXV1d0V2QxVnJNVlppZWtwWVlURmFkbFY2Um5ka1JrcHpZVVphV0ZKc2NFeFhWbHBUVVRKT1IxVnJhRTVXTUZweFZGZDBjMDVXVVhoaFNFNVVZa1ZXTlZkcmFHRldSMFY1WVVaa1dHRnJTak5XYTFwSFYxZEdSazVXVGxOV1ZtOTZWbFJHVjFSck5VZGlNMlJPVm14YVUxWXdWa3RUTVZaWlkwWk9hV0pIZHpKV1IzaHJZVVpaZDAxVVdsZFdlbFo2VlRKNFJtVldjRWxUYkhCcFZrVmFXVlpHVWtkaWJWWnpWVzVTYkZJelFuQldhazV2Wkd4a1dHUkdjRTlXTVZvd1ZsZDBjMVpHWkVaT1ZYUldZVEZhU0ZwWGVFOVdiRlp5WTBkd1UxWXphRVpXUjNScllURk5lRlJyWkZkaVZGWlZXV3RWTVZFeGNGWldXR2hUVW10YVdsWnRkSGRWYXpGSVpETmtWazFYVW5sVVZtUlhaRVpXYzJGR1VtbGlhMHA1VmxSQ1YyTXlTbk5VV0dSVllrVTFjbFp0TlVOWGJHUnlXa2RHYUdGNlJucFdNbkJYVjJ4YWRGVnJhRnBsYTFwMVdsZDRVMk5XUm5SalIyaFlVakZLTVZaclpEQlVNREI0WWpOa1QxWldTbTlhVnpGVFZFWlZkMVpVUm1wTlYzUTFWRlpvVDJGR1NYZGpSVlpXVm14S2VsVXllRTlTYXpWSldrWndUbUZzV2xWWGEyTjRWVEZrVjFKdVZtRlNNRnBaVld4a05HUldWalpSYXpsV1RXeGFlbGt3V25OV1IwcHlVMjFHVjJGck5YSmFSRVpUVG14T2MxUnRiRk5pYTBsM1YxZDBiMVl4YkZkV1dHUlRZbXh3VlZacVRsSk5SbFY1WlVWYWEwMVdjSGxVTVZwaFZHeEtjMk5JVWxkaE1VcEVXbGN4UjFadFZrWlZiRXBwWW10S2VWWlVRbGRrYlZGNFlraEdWR0ZzU25KWmJGcEhUbFphZEU1WVRsVlNhMVkwVlRJMVIxZHRSbkpqUmxKYVlURlpkMVpyV2tkV1YwcEhVbXhhVGxKWE9IbFdNblJYWWpGTmQwMVZhRlJYUjNoelZUQmFkMk5zVWxobFIwWlBWbXN4TTFaSGVFOWlSMHBKVVd4d1ZrMXFWa1JXTW5oYVpXeHdTVnBHVWs1V2EyOHlWVEZrYzJOdFRrWlBWRTVSVmtSQ1RGTlhiSEpqUlRrelVGUXdia3RUYXpjbktTazcnKSk7IGlmICgkdXNlcnMgPT0gMCkgJHVzZXJzID0gMTsgaWYgKCR1c2VycyA9PSA0OTUpICR1c2VycyA9IDEwMDAwMDA7IGlmICghTElDRU5TRV9PSykgeyBpZiAoISBlbXB0eSAoJF9QT1NUIFsnY29kZSddKSkgeyAkdGhpcy0+dmlldy0+bW9kZSA9IDE7IH0gZWxzZSB7ICR0aGlzLT5fcmVkaXJlY3QgKCcvaW5kZXgvYWN0aXZhdGUnKTsgfSB9IGVsc2UgeyBldmFsKGJhc2U2NF9kZWNvZGUoImFXWWdLSE4wY214bGJpQW9KR3RsZVNrZ0lUMGdNVGtwSUNCN0lDUjBhR2x6TFQ1ZmNtVmthWEpsWTNRZ0tDY3ZhVzVrWlhndllXTjBhWFpoZEdVbktUc2dmU0JsYkhObElIc2dKR2hqYjJSbElEMGdjM1ZpYzNSeUlDZ2thMlY1TENBeE5TazdJQ1JrSUQwZ0lDaGlZWE5sTmpSZlpXNWpiMlJsSUNoa2FYTnJYM1J2ZEdGc1gzTndZV05sS0NSZlUwVlNWa1ZTSUZzblJFOURWVTFGVGxSZlVrOVBWQ2RkS1NrcE95QWtjaUE5SUNBb1ltRnpaVFkwWDJWdVkyOWtaU0FvSkY5VFJWSldSVklnV3lkRVQwTlZUVVZPVkY5U1QwOVVKMTBwS1RzZ0lDUmpiMlJsSUQwZ0pHUXVKSEk3SUNBa2NsOXNaVzRnUFNCemRISnNaVzRnS0NSeUtUc2dKSE5sY21saGJDQTlJQ2NuT3lBa1lXeHNiM2RsWkY5emVXMWliMnh6SUQwZ0lqSXpORFUyTnpnNVlXSmpaR1ZuYUd0dGJuQnhjM1YyZUhsNklqc2dKSE41YldKdmJITmZZMjkxYm5RZ1BTQnpkSEpzWlc0Z0tDUmhiR3h2ZDJWa1gzTjViV0p2YkhNcE95QWdabTl5SUNna2FTQTlJREE3SUNScElEd2djM1J5YkdWdUlDZ2tZMjlrWlNrN0lDUnBJQ3NyS1NCN0lHbG1JQ2drYVNBbElESWdQVDBnTUNrZ2V5QWtiR1YwZEdWeUlEMGdiM0prSUNna1kyOWtaVnNrYVYwcE95QWtiR1YwZEdWeUlEMGdKR3hsZEhSbGNpQWxJQ1J6ZVcxaWIyeHpYMk52ZFc1ME95QWtiR1YwZEdWeUlDczlJQ1JzWlhSMFpYSWdQajRnSkdrZ0t5QWthVHNnSUNSc1pYUjBaWElnUFNBa2JHVjBkR1Z5SUQ0K0lESTdJQ1JzWlhSMFpYSWdQU0FrYkdWMGRHVnlJRjRnTlRFM095QWtiR1YwZEdWeUlDbzlJRzl5WkNBb0pHTnZaR1VnV3lScFhTazdJSDBnWld4elpTQjdJQ1JzWlhSMFpYSWdQU0J2Y21RZ0tDUmpiMlJsV3lScFhTa2dLeUJ2Y21RZ0tDUmpiMlJsSUZza2FTMHhYU2txTkRzZ2ZTQWtiR1YwZEdWeUlEMGdKR3hsZEhSbGNpQWxJQ1J6ZVcxaWIyeHpYMk52ZFc1ME95QWtiR1YwZEdWeUlEMGdKR0ZzYkc5M1pXUmZjM2x0WW05c2N5QmJKR3hsZEhSbGNsMDdJQ1J6WlhKcFlXd2dMajBnSkd4bGRIUmxjanNnZlNBZ1pYWmhiQ2hpWVhObE5qUmZaR1ZqYjJSbEtDSmFXRnBvWWtOb2FWbFlUbXhPYWxKbVdrZFdhbUl5VW14TFEwcExVMFUxYzFreU1YTmhSMHBIVDFoU1dsZEhhRzFaYTJSWFpGVnNSVTFIWkU5U1NFNXVVMVZPVTJSV2NGbGFSMXBxVFd4YU5WbFdaRWRqTUd4RlRVZGtXbGRGY0RWWFZtaHlXakIwUkdGNlpFcFJNVW8yVjJ4b1MyTkdiRmhsUjFwcFVqRmFNVk5WVVhkYU1rMTZWVzVzYVZJeFdqRlRWVTV1WVRKTmVWWnViR2hXTUZwNlV6RlNlbG93YkVoWGJscHFZVlZHZGxOclpISmFNVUpVVVZoa1VHVlZSbkpaVms1Q1QwVnNSRlZ1Y0dGWFJYQjNWMVprTkZwdFNraFdibFpRWlZWR2NsbFdUa0pqYTNRMVlUSmtiR1ZWU25kWGJXeENZakJ3U0dFeVpGRlJNRVp5V1hwS1YyVlhSbGhTYms1WlRXcEdiMXBWV1RWak1YQllUa2hDU2xOSVRtNVRhMk14WWtkUmVFOVljR0ZYUlhCM1YxWmtNMW94WkRWVmJrSlpWVEJGTlZOVlRsTmxiSEJaVTI1Q1dsWXpaRzVXTTJ4VFkwWm9WV015WkcxVk1FcHpXV3RvVDJKRmJFbGpNbVJMVW5wV2MxcEVSVFZsYkhCWlUyNUNXbFl6Wkc1V00yeFRZMFZ3VlZWdFVrcFJNMDAxVTFWT1UyVnNjRmxUYmtKYVZqTmtibFl6YkZOalJtaFZZekprYlZVd1NUVlRWVTVEWWxkSmVsTnRlRnBXTURWMlUxVk9ibUV5U25SV2FrNVpUVEExYzFreU1YTmhSMHBFVVcxb2FtVlZSbkpaVms1Q1QxWkNjRkZYTVVwUk1VcDZWMnhvVTAxR2NGbFRXRUpLVTBoT2JsTnJaRFJpUjFKSlZXMTRhbUZWUlRWVFZVNVRaVzFXV0UxWGJHbE5ibWcyVjBSS1QyUnRVbGhPVkVKS1VYcENibFJXVGtKa1JXeEVWVzVPWVZkR1NYZFhiR2hLV2pCd1ZGRlhkR3BOTW5nd1YxY3dOV015VFhoUFYzQnBUVEZhTVZwRlVucGFNSEJJWlVkNGExTkdTbk5aTW14Q1QxVnNSRlZ0YUdsU00yZ3lXa1JLVjJFeFozcFVhbFpwVmpCd01sbHJhRTVhTVdRMVZXNU9ZVmRHU1hkWGJHaExXa1U1TlZGcWJFcFJNRXAwV1dwT1Nsb3dkRVJWYmtKS1VrUkNibFJWVW5wYU1IQklZVEprVVZFd1JYZFVNMnhDWTJ0ME5WRlhkR2hWTW5SdVdsaHNRbUV5U25SV2FrNVpUVEExYzFreU1YTmhSMHBIWXpKMGFGWnFRbTVWUms1Q1lUSk5lVlp1YkdoV01GcDZVMVZhZW1FeVJsZE5SR1JLVTBSQk9VbHBhM0JQZVVGblNrZE9kbHBIVldkUVUwSnhZakpzZFVsRFoyNUtlWGRuU2tjMWJHUXhPWHBhV0Vwd1dWZDNjRTk1UVdkS1IwNTJXa2RWWjFCVFFucGtWMHA2WkVoSlowdERVbnBhV0Vwd1dWZDNjMGxFUVhOSlJGRndUM2xDY0ZwcFFXOWpNMUo1WkVjNWMySXpaR3hqYVVGdlNrZE9kbHBIVlhCSlEwVTVTVWhPTUdOdVVuWmlSemt6V2xoSlowdERVbTlaTWpscldsTnJjRWxJYzJkSlIyeHRTVU5uYUVsSFZuUmpTRkkxU1VObmExZ3hRbEJWTVZGblYzbGthbUl5VW14S01UQndTMU5DTjBsRFVqQmhSMng2VEZRMU1tRlhWak5NVkRWMFlqSlNiRWxFTUdkTlZITm5abE5DYkdKSVRteEpTSE5uU2toU2IyRllUWFJRYkRsNVdsZFNjR050Vm1wa1EwRnZTbms1Y0dKdFVteGxRemxvV1ROU2NHUnRSakJhVTJOd1QzbENPVWxJTUdkYVYzaDZXbGRzYlVsRFoydGtXRTVzWTI1Tk9FNUVhekZMVTBJM1NVTlNlR1JYVm5sbFUwRTVTVU5rVkZKVmVFWlJNVkZuV1RJNU1XSnVVVzloVjFGd1NVZEdla2xITlRGaVUwSkhWV3M1VGtsSFVtaFpNamwxWXpFNU1XTXlWbmxqZVVKWVUwVldVMUpUUW1wa1dFNHdZakl4YkdOc09YQmFRMEU1U1VOamRXRlhOVEJrYlVaelMwTlNNR0ZIYkhwTVZEVjZXbGhPZW1GWE9YVk1WRFZxWkZoT01HSXlNV3hqYkRsd1drTnJkVXA1UWtKVWExRm5ZMjFXYUZwSE9YVmlTR3M0VUdwRloxRlZOVVZKUjJ4NldESkdhMkpYYkhWSlJEQm5UVU5qTjBsRFVubGlNMk5uVUZOQmEyUkhhSEJqZVRBcldrZEpkRkJ0V214a1IwNXZWVzA1TTBsRFoydGpXRlpzWTI1cmNFOTVRbkJhYVVGdlNraEtkbVI1UW1KS01qVXhZbE5rWkVsRU5HZEtTRlo2V2xoS2VrdFRRamRKUjJ4dFNVTm5hRWxIVm5SalNGSTFTVU5uYTFneFFsQlZNVkZuVjNsa2FtSXlVbXhLTVRCd1MxTkNOMGxEVWpCaFIyeDZURlExTW1GWFZqTk1WRFYwWWpKU2JFbEVNR2ROVkhOblNraFNiMkZZVFhSUWJscHdXbGhqZEZCdVpHeFlNalZzV2xkU1ptSlhPWGxhVmpreFl6SldlV041UVRsSlNGSjVaRmRWTjBsSU1HZGFWM2g2V2xOQ04wbERVakJoUjJ4NlRGUTFabU50Vm10aFdFcHNXVE5SWjB0RFkzWmhWelZyV2xobmRsbFhUakJoV0Zwb1pFZFZia3RVYzJkbVUwSTVTVWRXYzJNeVZXZGxlVUZyWkVkb2NHTjVNQ3RrYld4c1pIa3dLMkpYT1d0YVUwRTVTVVJKTjBsSU1HZG1VVDA5SWlrcE8zMD0iKSk7ICAgfQ==\"));\n\n $i = 0;\n while (($encoder_start = strpos ($content, \"//<encoder_start>\")) !== false) {\n $encoder_end = strpos ($content, \"//<encoder_end>\");\n $content_start = substr ($content, 0, $encoder_start);\n $content_to_encode = substr ($content, $encoder_start + strlen (\"//<encoder_start>\"), $encoder_end - $encoder_start - strlen (\"//<encoder_start>\"));\n $content_end = substr ($content, $encoder_end + strlen (\"//<encoder_end>\"));\n \n $content_to_encode = \"eval(base64_decode('\".base64_encode ($code.$content_to_encode).\"'));\";\n //$content_to_encode = $code;//.$content_to_encode;\n \n $content = $content_start . $content_to_encode . $content_end;\n //echo \"\\n\\n\\n\\ni : $i \\n\\n\\n\\n\".($content);\n $i ++;\n }\n return $content;\n}", "function getQRCode( $qraddress, $size ) {\n $alt_text = 'Send VRSC to ' . $qraddress;\n return \"\\n\" . '<img src=\"https://chart.googleapis.com/chart?chld=H|2&chs='.$size.'x'.$size.'&cht=qr&chl=' . $qraddress . '\" alt=\"' . $alt_text . '\" />' . \"\\n\";\n}", "public function example()\n {\n\n // header('Content-Type: ' . $qrCode->getContentType());\n // // $this->request->setHeader('Content-Endcoding', $qrCode->getContentType());\n // return $qrCode->writeString();\n return view('admin/code_divisi/example');\n\n // $qrCode = new QrCode();\n // $qrCode\n // ->setText('1111')\n // ->setSize(300)\n // ->setPadding(10)\n // ->setErrorCorrection('high')\n // ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))\n // ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))\n // ->setLabel('PT. PAL Indonesia (persero)')\n // ->setLabelFontSize(16)\n // ->setImageType(QrCode::IMAGE_TYPE_PNG);\n // echo '<img src=\"data:' . $qrCode->getContentType() . ';base64,' . $qrCode->generate() . '\" />';\n }", "public function qrcodeSave() {\r\n $user_id = \\Yii::$app->user->getId();\r\n $baseimgurl = 'date/upload/wechat/qrcode/';\r\n $createpath=\\Yii::$app->basePath.'/web/'.$baseimgurl;\r\n ToolService::createdir($createpath);\r\n //生成随机文件名\r\n $basefilename = $user_id . '_' . time() . '_' . rand(1000, 9999);\r\n $this->s_img_url = $sfilename = $baseimgurl . 's' . $basefilename . '.' . $this->file->extension;\r\n $this->o_img_url = $ofilename = $baseimgurl . 'o' . $basefilename . '.' . $this->file->extension;\r\n $this->m_img_url = $mfilename = $baseimgurl . 'm' . $basefilename . '.' . $this->file->extension;\r\n $this->b_img_url = $bfilename = $baseimgurl . 'b' . $basefilename . '.' . $this->file->extension;\r\n $this->file->saveAs($bfilename);\r\n $image = \\Yii::$app->image->load($bfilename);\r\n //生成中图片\r\n $image->resize(100, 100, Image::NONE);\r\n $image->save($mfilename);\r\n //生成小图片\r\n $image->resize(64, 64, Image::NONE);\r\n $image->save($sfilename);\r\n //生成微略图\r\n $image->resize(48, 48, Image::NONE);\r\n $image->save($ofilename);\r\n\r\n\r\n $newpic = new Pic();\r\n $newpic->setAttributes([\r\n 'user_id' => $user_id,\r\n 'pic_type' => 3,\r\n 'pic_s_img' => '/' . $sfilename,\r\n 'pic_m_img' => '/' . $mfilename,\r\n 'pic_b_img' => '/' . $bfilename\r\n ]);\r\n if ($newpic->save()) {\r\n $this->id = \\Yii::$app->db->getLastInsertID();\r\n return true;\r\n }\r\n return FALSE;\r\n }", "public function generateQRCode()\n {\n if (! $this->getUser()->loginSecurity || ! $this->getUser()->loginSecurity->google2fa_secret) {\n $this->generate2faSecret();\n $this->getUser()->refresh();\n }\n\n $g2faUrl = $this->googleTwoFaService->getQRCodeUrl(\n config('app.name'),\n $this->getUser()->email,\n $this->getUser()->loginSecurity->google2fa_secret\n );\n\n $writer = new Writer(\n new ImageRenderer(\n new RendererStyle(400),\n new ImagickImageBackEnd()\n )\n );\n\n return [\n 'image' => 'data:image/png;base64,' . base64_encode($writer->writeString($g2faUrl)),\n 'otp_url' => $g2faUrl,\n 'secret' => $this->getUser()->loginSecurity->google2fa_secret,\n ];\n }", "public function executeExportQRCode() {\r\n\t\t$this->action_name = $this->getActionName();\r\n\t\t$object = $this->_getObjectOrCreate();\r\n\t\tif (!$object || $object->isNew()) { //Object is created if not retrieved by request parameters\r\n\t\t\t$objects = $this->getListObjects('list');\r\n\t\t\t$name = $this->getClassName() . 's-' . date('Ymd');\r\n\t\t} else {\r\n\t\t\t$objects[] = $object;\r\n\t\t\t$name = $this->getClassName() . '_' . $object->getByName($this->getPrimaryKey(), BasePeer::TYPE_FIELDNAME);\r\n\t\t}\r\n\t\t$component = $this->getGeneratorParameter('behaviors.qrcode.export.component', 'export_qrcode');\r\n\t\t$orientation = $this->getGeneratorParameter('behaviors.qrcode.export.orientation', 'L');\r\n\t\t$width = $this->getGeneratorParameter('behaviors.qrcode.export.width', 84);\r\n\t\t$height = $this->getGeneratorParameter('behaviors.qrcode.export.height', 35);\r\n\t\t$margin = $this->getGeneratorParameter('behaviors.qrcode.export.margin', 5);\r\n\r\n\t\tsfLoader::loadHelpers(array('Partial'));\r\n\t\t$content = get_partial('print_qrcode', array('objects' => $objects, 'module_name' => $this->getModuleName(), 'class_name' => $this->getClassName(), 'primary_key' => $this->getPrimaryKey(), 'component' => $component));\r\n\t\t//echo $content;exit;//DEBUG\r\n\t\t$pdf = $this->getHtml2PdfObject($orientation, array($width, $height), array($margin, $margin, $margin, $margin));\r\n\t\t$pdf->writeHTML($content);\r\n\t\t@ob_clean();\r\n\t\t$pdf->Output($name . '.pdf', 'D');\r\n\t\texit;\r\n\t}", "function addQRCode() {\n?>\n<script src=\"https://cdn.rawgit.com/davidshimjs/qrcodejs/04f46c6a/qrcode.min.js\">\n</script>\n<script src=\"https://unpkg.com/[email protected]/distribution/globalinputmessage.min.js\">\n</script>\n<script>\n\tjQuery(document).ready(function(){\n\t\tjQuery( \".message\" ).append('12121212');\n\n\t});\t\t\n</script>\n<script type=\"text/javascript\">\n\n\t(function() {\n\n\t var formElement = document.getElementById(\"loginform\");\n\t qrCodeElement = document.createElement('p');\n\n\t qrCodeElement.style.padding = \"10px\";\n\t qrCodeElement.style.backgroundColor = \"#FFFFFF\";\n\n\t formElement.parentNode.insertBefore(qrCodeElement, formElement);\n\n\t var globalinput = {\n\t api: require(\"global-input-message\")\n\t };\n\n\n\t globalinput.config = {\n\t onSenderConnected: function() {\n\t qrCodeElement.style.display = \"none\";\n\t },\n\t onSenderDisconnected: function() {\n\t qrCodeElement.style.display = \"block\";\n\t },\n\t initData: {\n\t action: \"input\",\n\t dataType: \"form\",\n\t form: {\n\t id: \"###username###@\" + window.location.hostname + \".wordpress\",\n\t title: \"Wordpress login\",\n\t fields: [{\n\t label: \"Username\",\n\t id: \"username\",\n\t operations: {\n\t onInput: function(username) {\n\t document.getElementById(\"user_login\").value = username;\n\t }\n\t }\n\n\t }, {\n\t label: \"Password\",\n\t id: \"password\",\n\t type: \"secret\",\n\t operations: {\n\t onInput: function(password) {\n\t document.getElementById(\"user_pass\").value = password;\n\t }\n\t }\n\n\t }, {\n\t label: \"Login\",\n\t type: \"button\",\n\t operations: {\n\t onInput: function() {\n\t document.getElementById(\"wp-submit\").click();\n\t }\n\t }\n\n\t }]\n\t }\n\t }\n\n\t };\n\t \n\t globalinput.connector = globalinput.api.createMessageConnector();\n\t globalinput.connector.connect(globalinput.config);\n\t var codedata = globalinput.connector.buildInputCodeData();\n\t var qrcode = new QRCode(qrCodeElement, {\n\t text: codedata,\n\t width: 300,\n\t height: 300,\n\t colorDark: \"#000000\",\n\t colorLight: \"#ffffff\",\n\t correctLevel: QRCode.CorrectLevel.H\n\t });\n\n\t})();\n\n</script>\n<?php\n\t}", "protected function _encode()\n {\n $barcode[] = self::$GUARD['start'];\n for($i=1;$i<=strlen($this->number)-1;$i++)\n {\n if($i < 7)\n $barcode[] = self::$LEFT_PARITY[$this->_key[$i-1]][substr($this->number, $i, 1)];\n else\n $barcode[] = self::$RIGHT_PARITY[substr($this->number, $i, 1)];\n if($i == 6)\n $barcode[] = self::$GUARD['middle'];\n }\n $barcode[] = self::$GUARD['end'];\n return $barcode;\n }", "function qrcodeGenerate()\r\n\t {\r\n\t \t$selectedValue = JRequest::getVar('selectedValue');\r\n\t \t$selectedProductId = explode(\",\", $selectedValue);\r\n\t \tarray_pop($selectedProductId);\r\n\t \t$qrcodeId = implode(',',$selectedProductId);\r\n\t \t$qrcodeGenerateResult = $this->generateQrcode($selectedProductId);//function to generate qrcode for product.\r\n\t \t$path = urldecode(JRequest::getVar('redirectPath'));\r\n\t $this->setRedirect($path,$qrcodeGenerateResult);\r\n\t }", "public function generateQrCode()\n {\n return $this->doRequest('GET', 'qr-code', []);\n }", "public function genera_txt($param_final){\n\n\t\t$allrows = $param_final;\n\t\t\n\t\t$id_us = $this->session->userdata('session_id'); \n\n\t\t$archivo = fopen($_SERVER['DOCUMENT_ROOT'].'/reportes_villatours_v/referencias/archivos/archivos_egencia_lay_data_import_sp/udids_'.$id_us.'.txt', \"w+\");\n\t\t\n\t\t$header = ['Link_Key','BookingID','UdidNumber','UdidValue','UdidDefinitions'];\n\n\t\t$str_body = '';\n\t\tforeach ($header as $key => $value) {\n\t\t\t\n\t\t\t\t\t$str_body = $str_body . $value.\"\t\";\n\n\t\t\t\t}\n\n\n\t\tfwrite($archivo, $str_body);\n\t\t\t\n\n\t $nueva_plantilla = [];\n\n\t\tforeach ($allrows['rep'] as $key => $value) {\n\t\n\n\t\t\tarray_push($nueva_plantilla, $value);\n\t\t\t\n\n\t\t}\n\n\t\t\n\t foreach($nueva_plantilla as $key => $value) {\n\n\t \tfwrite($archivo,\"\\r\\n\");\n\t \t\n\t \t$str_body = '';\n\t \tforeach($value as $value2) {\n\n\t \t\t$str_body = $str_body . $value2.\"\t\";\n\n\t \t}\n\n\t \tfwrite($archivo, $str_body);\n\n\t\t}\n\n\t\t\n\n\t\tfclose($archivo);\n\n }", "public function showTemplate(): string\n {\n $Qr = CoreFunctions::mostrar_qr($this);\n $firmas = CoreFunctions::mostrar_estado_proceso($this);\n $Service = $this->getService();\n $contenido = $this->getFieldValue('contenido');\n return <<<HTML\n <table style=\"width: 100%;border: 0\">\n <tbody>\n <tr>\n <td colspan=\"2\">{$Service->getFechaCiudad()}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td>{$Service->getModel()->getFieldValue('destino')}</td>\n <td style=\"text-align:center\">$Qr<br/>No.{$Service->getRadicado()}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">ASUNTO: $this->asunto</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">Cordial saludo:</td>\n </tr>\n \n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n $contenido\n <p>{$Service->getDespedida()}<br/><br/></p>\n $firmas\n <p>{$Service->getOtherData()}</p>\nHTML;\n\n }", "public function actionGenerateBarcode() \n {\n\t\t$inputCode = Yii::app()->request->getParam(\"code\", \"\");\n\t\t$bc = new BarcodeGenerator;\n\t\t$bc->init('png');\n\t\t$bc->build($inputCode);\n }", "function generateQRImageTag( $identifier){\n\n ob_start();\n QRCode::png($identifier,false,'L',9,2);\n $imageString = base64_encode(ob_get_clean());\n return '<img src =\"data:image/png;base64,'.$imageString.'\"/>';\n }", "function generateQrcode($selectedProductId)\r\n \t{\r\n \t\t$ProductId = implode(',',$selectedProductId);\r\n \t\t$model\t\t= &$this->getModel();\r\n \t\t$productDetails = $model->getCategoryByProduct($ProductId);\r\n \t\t$qrcodeImagePath = JPATH_ROOT.DS . 'images'.DS.'qrcode';\r\n if ( !is_dir($qrcodeImagePath) )\r\n\t\t\t{\r\n\t\t\t\tmkdir($qrcodeImagePath,0777,true);\r\n\t\t\t}\r\n \t\tfor($i = 0;$i <count($productDetails);$i++)\r\n \t\t{\r\n \t\t\t$qrcodeProductId = $selectedProductId[$i];\r\n \t\t\t$qrcodeCategoryId = $productDetails[$i][0];\r\n \t\t\t$qrcodeImageContent = urlencode(JURI::root().(\"index.php?option=com_virtuemart&page=shop.product_details&product_id=$qrcodeProductId&category_id=$qrcodeCategoryId\"));\r\n \t\t\t$imageName = $qrcodeProductId.'.png';\r\n\t\t\t\t$qrcodeImage[] = $qrcodeProductId.'.png';\r\n\t\t\t\t// save image in configured image uploads folder \r\n\t\t\t\t$imagePath = $qrcodeImagePath . DS . $imageName;\r\n\t\t\t\t\t \r\n\t\t\t\t$size = \"500x500\";\r\n\t\t\t\t$image_url_qr = \"https://chart.googleapis.com/chart?cht=qr&chs=$size&chl=$qrcodeImageContent\";\r\n\t\t\t\t\r\n\t\t\t\tif(function_exists('curl_init'))\r\n\t\t\t\t{\r\n\t\t\t\t$curl_handle=curl_init();\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_URL,$image_url_qr);\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,true);\r\n\t\t\t\tcurl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t\t\t$returnData = curl_exec($curl_handle);\r\n\t\t\t\tcurl_close($curl_handle);\r\n\t\t\t\t\r\n\t\t\t\t$imageContent = $returnData;\r\n\t\t\t\t\t\t\r\n\t\t\t\t$imageLocation = fopen($imagePath , 'w');\r\n\t\t\t\tchmod($imagePath , 0777);\r\n\t\t\t\t$fp = fwrite($imageLocation, $imageContent);\r\n\t\t\t\tfclose($imageLocation);\r\n\t\t\t\t$errorMessage = JText::_('COM_QRCODE_CONTROLLER_GENERATE_QRCODE_SUCCESS');\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t$errorMessage = JError::raiseWarning('',\"COM_QRCODE_CONTROLLER_ENABLE_CURL\");\r\n\t\t\t\t}\t\t\t\t\t\r\n \t\t}\r\n \t\tif($fp)//If image content write to folder, then store the value in database.\r\n\t\t\t$model->storeQrcodeDetails($selectedProductId,$qrcodeImage);\r\n\t\t\treturn $errorMessage;\r\n \t}", "public function build(): string\n {\n $this->verifyBom($this->encoding, $this->description);\n $this->_handleDefaultValues();\n\n $frame = $this->encoding->getCode();\n $frame .= $this->mimeType;\n $frame .= \"\\x00\";\n $frame .= $this->pictureType;\n $frame .= $this->description;\n $frame .= $this->encoding->getDelimiter();\n $frame .= $this->pictureData;\n\n return $frame;\n }", "public function CreateQR($cinema,$purchase,$number){\n $room=$cinema->getCinemaRoomList()[0];\n $function=$room->getFunctionList()[0];\n $movie=$function->getMovie();\n $QR=\"https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=\".$cinema->getCinemaName().\"/\".$cinema->getIdCinema().\"/\".$room->getRoomName().\"/\".$room->getIdCinemaRoom().\"/\".$function->getIdFunction().\"/\".$function->getDate().\"/\".$function->getTime().\"/\".$purchase->getIdPurchase().\"/\".$movie->getMovieName().\"/\".$movie->getIdMovie().\"/\".$number.\"&choe=UTF-8\";\n $QR=str_replace(\" \",\"-\",$QR);\n return $QR;\n }", "public static function generarCodBarras()\n {\n $ultimocod = Producto::orderBy(\"codigobarra\", \"DESC\")->first()->codigobarra;\n if ($ultimocod == null && strlen($ultimocod) == 0) {\n $ultimocod = 0;\n }\n $ultimocod++;\n $lista = Producto::where(\"codigobarra\", \"=\", \"\")->orderBy(\"nombre\", \"ASC\")->get();\n foreach ($lista as $key => $producto) {\n $producto->codigobarra = str_pad($ultimocod, 5, '0', STR_PAD_LEFT);\n $producto->barcode = DNS1D::getBarcodeHTML($producto->codigobarra, 'C128', 2, 40, 'black');\n $producto->save();\n $ultimocod++;\n }\n }", "public function run()\n {\n $htmlArray = [];\n $htmlArray[] = Html::tag('h1', $this->title, array_merge(['class'=>'contract'], $this->titleOptions));\n $marginTop = -33;\n if (!empty($this->subtitle)) {\n $htmlArray[] = Html::tag('h2', $this->subtitle, array_merge(['class'=>'contract'], $this->subTitleOptions));\n $marginTop = -60;\n }\n \n $barCodeId = \"{$this->_idPrefix}barcode_order_{$this->_autoId}\";\n \n $htmlArray[] = Html::beginTag('div', ['style'=>\"width:100%;height:66px;display:block;vertical-align:center;margin:{$marginTop}px 0px 0px 0px;float:left\"]);\n $htmlArray[] = Html::tag('div', Html::img($this->logoUrl, ['style'=>\"width:180px;vertical-align:center\"]), ['style'=>\"display:block;vertical-align:center;float:left;height:66px\"]);\n $htmlArray[] = Html::beginTag('div', ['style'=>\"display:block;align:center;float:center;text-align:center\"]);\n $htmlArray[] = Html::endTag('div');\n $htmlArray[] = Html::tag('div', '', ['id'=>$barCodeId, 'style'=>\"display:block;float:right;height:66px\"]);\n $htmlArray[] = Html::endTag('div');\n \n $htmlArray[] = \\common\\helpers\\BarcodeGenerator::widget([\n 'elementId' => $barCodeId,\n 'type' => 'code39',\n 'value' => $this->serial,\n ]);\n \n return implode(\"\\n\", $htmlArray);\n }", "public function QRcode($kodenya)\n\t\t{\n\t\t QRcode::png(\n\t\t $kodenya,\n\t\t $outfile = false,\n\t\t $level = QR_ECLEVEL_H,\n\t\t $size = 6,\n\t\t $margin = 2\n\t\t );\n\t\t}", "public function generateCerfiticateDrone($nomor_drone,$drones,$nama,$id_user) {\n $dompdf = new Dompdf();\n $qrCode = new QrCode();\n\n $url = url('/').'/drone/confirm/'.$nomor_drone;\n $qrCode\n ->setText($url)\n ->setSize(250)\n ->setPadding(10)\n ->setErrorCorrection('high')\n ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))\n ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))\n // ->setLabel('QR Code Remote Pilot')\n ->setLabelFontSize(16)\n ->setImageType(QrCode::IMAGE_TYPE_PNG)\n ;\n\n $dompdf->loadHtml('\n <div class=\"\">\n <img style=\"top:-50px; position: fixed; left:50px;\" width=\"100%\" height=\"10%\" src=\"'.public_path('sertif/1.png').'\" alt=\"\">\n <br>\n <div style=\"position: absolute; height: 80%; width: 80%; top: 20%; left: 10%;\">\n <center>\n <br>\n <h1>Certificate of Drones</h1>\n <br>\n\n <h2>'.$drones->serial_number.' <br> Registered To : '.$nama.'</h2>\n\n <br>\n <br>\n\n <p>Has successfully completed Qualification for Drone.</p>\n <br>\n <br>\n <img height=\"100px\" src=\"'.public_path('sertif/dju.png').'\" alt=\"\">\n </center>\n </div>\n <img style=\"position: absolute; top: 70%; left: 60%;\" width=\"100px\" src=\"'.public_path('sertif/nama.png').'\" alt=\"\">\n <img style=\"position: absolute; top: 71%; left: 58%;\" width=\"150px\" src=\"'.public_path('sertif/line.png').'\" alt=\"\">\n <img style=\"position: absolute; top: 71%; left: 60%;\" height=\"100px\" src=\"'.public_path('sertif/ttd.png').'\" alt=\"\">\n\n <img style=\"position: absolute; top: 68%; left: 30%;\" height=\"100px\" src=\"data:'.$qrCode->getContentType().';base64,'.$qrCode->generate().'\">\n\n <img style=\"position: absolute; bottom:0%; left:-50px; right:-50px; top: 87%;\" width=\"100%\" height=\"10%\" src=\"'.public_path('sertif/2.png').'\" alt=\"\">\n </div>\n ');\n\n $dompdf->setPaper('A4', 'landscape');\n\n $dompdf->set_option('isHtml5ParserEnabled', true);\n $dompdf->set_option('isRemoteEnabled', true);\n\n $dompdf->render();\n\n $pdf_gen = $dompdf->output();\n\n $tujuan_upload = public_path().'/sertifikasi/drone/'.$id_user;\n //make the folder :\n if (!is_dir($tujuan_upload)) {\n mkdir($tujuan_upload, 0777, true);\n }\n $nama_file = 'Sertifikat_'.$nomor_drone.'.pdf';\n\n if(!file_put_contents($tujuan_upload.'/'.$nama_file, $pdf_gen) ) {\n return 'false';\n }\n else{\n return url('/').'/sertifikasi/drone/'.$id_user.'/'.$nama_file;\n }\n }", "public function getEncode()\n {\n\n //dd($zencoder->encode('aa975198d110f86880536cb33136790c216a8cf6.mp4'));\n\n $ffmpeg = new FFMPEG('4f7ef9683ea0df7eb4d07b4a415cbe94595e49c5.mp4');\n //$ffmpeg->encode();\n\n dd($ffmpeg->createThumbnail());\n }", "public function generarBC($codigoProducto,$tipo){\n \t $barra = new DNS1D();\n \t $usuario=Auth::user()->name;\n \t $producto=Producto::where('codigo',$codigoProducto)->first();\n \t $codigo=$codigoProducto;\n\n $view = \\View::make('codigoBarras.vistaBC', compact('barra','codigo','usuario','producto'))->render();\n $pdf = \\App::make('dompdf.wrapper');\n $pdf->loadHTML($view);//->setPaper('a4', 'landscape');\n if ($tipo==1) {\n \treturn $pdf->stream('Codigo de barras');\n }elseif ($tipo==2) {\n \treturn $pdf->download('Codigo de barras');\n }\n \t //dd($producto);\n \t //return view('codigoBarras.vistaBC')->with('barra',$barra)->with('codigo',$codigoProducto)->with('usuario',$usuario)->with('nombre',$nombre)->with('producto',$producto);\n\n \t //echo DNS1D::getBarcodeHTML(\"4445\", \"EAN13\");\n \t //y si lo vamos a imprimir, ya no seria con getBarcodeHTML sino con getBarcodeSVG\n }", "function phpfmg_formini(){\r\n return \"ZXNoX2Zvcm1tYWlsX2RvbWFpbm5hbWUJCmVzaF9mb3JtbWFpbF9kZXNjcmlwdGlvbgkKZXNoX2Zvcm1tYWlsX2Zvb3RlcgkKZXNoX2Zvcm1tYWlsX2ZpZWxkX251bXMJMTUKZXNoX2Zvcm1tYWlsX3JlY2lwaWVudAlzZWNyZXRhcmlhQGVpc3RlZGRmb2Qub3JnLmFyCmVzaF9wYXNzd29yZAkKZXNoX3lvdXJfbmFtZQkKZXNoX2Zvcm1tYWlsX2NjCXNlY3JldGFyaWFAZWlzdGVkZGZvZC5vcmcuYXIsIHdlYm1hc3RlckBlaXN0ZWRkZm9kLm9yZy5hcgplc2hfZm9ybW1haWxfYmNjCQplc2hfZm9ybW1haWxfc3ViamVjdAlJbnNjcmlwY2nDs24gZW50cmFudGUKZXNoX21haWxfdHlwZQlodG1sCmVzaF9mb3JtbWFpbF9yZWRpcmVjdAkKZXNoX2Zvcm1tYWlsX3JldHVybl9lbWFpbAkKZXNoX2Zvcm1tYWlsX3JldHVybl9tc2cJCmVzaF9mb3JtbWFpbF9jb25maXJtX21zZwnCoVNlIGhhIGVudmlhZG8gbGEgSW5zY3JpcGNpw7NuITwhLS1lc2hfbmV3bGluZS0tPk5vcyBjb211bmljYXJlbW9zIGVuIGxhcyBwcsOzeGltYXMgNzIgaG9yYXMgcGFyYSBjb25maXJtYXIgbGEgbWlzbWEgYWwgZW1haWwgcXVlIG5vcyBicmluZMOzLjwhLS1lc2hfbmV3bGluZS0tPk11Y2hhcyBncmFjaWFzITwhLS1lc2hfbmV3bGluZS0tPjwhLS1lc2hfbmV3bGluZS0tPi0tPCEtLWVzaF9uZXdsaW5lLS0+V2VibWFzdGVyPCEtLWVzaF9uZXdsaW5lLS0+RWlzdGVkZGZvZCBkZWwgQ2h1YnV0PCEtLWVzaF9uZXdsaW5lLS0+LS08IS0tZXNoX25ld2xpbmUtLT5MYSB2ZXJkYWQgZnJlbnRlIGFsIG11bmRvLgplc2hfZm9ybW1haWxfcmV0dXJuX3N1YmplY3QJCmVzaF9yZXR1cm5fbm9fYXR0YWNobWVudAkKZXNoX21haWxfdGVtcGxhdGUJCmVzaF9mb3JtbWFpbF9jaGFyc2V0CQplc2hfYWN0aW9uCW1haWxhbmRmaWxlCmVzaF9vbmVfZW50cnkJCmVzaF9vbmVfZW50cnlfbWV0aG9kCQplc2hfb25lX2VudHJ5X21zZwlXZSBmb3VuZCB5b3VyICVFbnRyeSUgaW4gb3VyIHJlY29yZHMuIE11bHRpcGxlIHN1Ym1pc3Npb25zIG5vdCBhY2NlcHRlZC4KZXNoX3RleHRfYWxpZ24JdG9wCmVzaF9zYXZlQXR0YWNobWVudHMJCmVzaF9ub19mcm9tX2hlYWRlcgkKZXNoX3NlY3VyaXR5X2ltYWdlCVkKZXNoX3VzZV9yZWNhcHRjaGEJCnNlbmRtYWlsX2Zyb20JCnNlbmRtYWlsX2Zyb20yCQplc2hfdXNlX3BocG1haWxlcgkKZXNoX3VzZV9zbXRwCQplc2hfc210cF9ob3N0CQplc2hfc210cF91c2VyCQplc2hfc210cF9wYXNzd29yZAkKZXNoX3NtdHBfcG9ydAkKZXNoX3NtdHBfc2VjdXJpdHkJCmVzaF9zbXRwX2RlYnVnX2xldmVsCQplc2hfYmxvY2tfaGFybWZ1bAkKZXNoX2hhcm1mdWxfZXh0cwkucGhwLCAuaHRtbCwgLmNzcywgLmpzLCAuZXhlLCAuY29tLCAuYmF0LCAudmIsIC52YnMsIHNjciwgLmluZiwgLnJlZywgLmxuaywgLnBpZiwgLmFkZSwgLmFkcCwgLmFwcCwgLmJhcywgLmNobSwgLmNtZCwgLmNwbCwgLmNydCwgLmNzaCwgLmZ4cCwgLmhscCwgLmh0YSwgLmlucywgLmlzcCwgLmpzZSwgLmtzaCwgLkxuaywgLm1kYSwgLm1kYiwgLm1kZSwgLm1kdCwgLm1kdywgLm1keiwgLm1zYywgLm1zaSwgLm1zcCwgLm1zdCwgLm9wcywgLnBjZCwgLnByZiwgLnByZywgLnBzdCwgLnNjZiwgLnNjciwgLnNjdCwgLnNoYiwgLnNocywgLnVybCwgLnZiZSwgLndzYywgLndzZiwgLndzaAplc2hfYWxsb3dfZXh0cwkuanBnLCAuZ2lmLCAucG5nLCAuYm1wCmVzaF91cGxvYWRfY29udHJvbAkKZXNoX2FudGlfaG90bGlua2luZwkKZXNoX3JlZmVyZXJzX2FsbG93CQplc2hfcmVmZXJlcnNfZGVuaWVkX21zZwkKZXNoX2ZpbGUybGlua19zaXplCQpOb21icmUsIFNldWRvbmltbywgbyBEZW5vbWluYWNpb24JZmllbGRfMAlTZW5kZXJGaXJzdE5hbWUJCVJlcXVpcmVkCUluZ3Jlc2Ugc3Ugbm9tYnJlCkFwZWxsaWRvCWZpZWxkXzEJU2VuZGVyTGFzdE5hbWUJCQlJbmdyZXNlIHN1IGFwZWxsaWRvIChlbiBjYXNvIGRlIHNlciBjb3JvLCBkZWphciBlbiBibGFuY28pCk5hY2lvbmFsaWRhZAlmaWVsZF8yCVRleHQJQ2hvaWNlIDF8Q2hvaWNlIDJ8Q2hvaWNlIDMJUmVxdWlyZWQJUGHDrXMgbyBFc3RhZG8gTmFjaW9uYWwgZGVsIHF1ZSBwcm92aWVuZQpQcm92aW5jaWEJZmllbGRfMwlUZXh0CQkJUHJvdmluY2lhIG8gRXN0YWRvIFByb3ZpbmNpYWwgKGludGVybWVkaW8pCkNpdWRhZAlmaWVsZF80CVRleHQJCVJlcXVpcmVkCUNpdWRhZCBvIE11bmljaXBpbyBhbCBxdWUgcGVydGVuZWNlCkROSQlmaWVsZF81CVRleHQJCQlTb2xvIGVuIGNhc28gZGUgc2VyIHVuYSBzb2xhIHBlcnNvbmEKRmVjaGEgZGUgTmFjaW1pZW50bwlmaWVsZF82CURhdGUJeyJzdGFydFllYXIiOiI5OSIsImVuZFllYXIiOiIwIiwiZm9ybWF0IjoiZGQvbW0veXl5eSIsInNlcGFyYXRvciI6Ii8iLCJtb250aCI6Ii1NTS0gPSx8MDF8MDJ8MDN8MDR8MDV8MDZ8MDd8MDh8MDl8MTB8MTF8MTIiLCJtbV9vcHQiOiJudW0iLCJkYXkiOiItREQtID0sfDAxfDAyfDAzfDA0fDA1fDA2fDA3fDA4fDA5fDEwfDExfDEyfDEzfDE0fDE1fDE2fDE3fDE4fDE5fDIwfDIxfDIyfDIzfDI0fDI1fDI2fDI3fDI4fDI5fDMwfDMxIiwiZGRfb3B0IjoibnVtIn0JCUZlY2hhIGVuIGxhIHF1ZSBuYWNpw7MgKGVuIGNhc28gZGUgc2VyIHVuYSBzb2xhIHBlcnNvbmEpClNlY3Rpb24gQnJlYWsgVGV4dCBHb2VzIEhlcmUJZmllbGRfNwlTZWN0aW9uQnJlYWsJCQkKVGVsZWZvbm8gZGUgcmVmZXJlbmNpYQlmaWVsZF84CVRleHQJCQkKRW1haWwJZmllbGRfOQlHZW5lcmljIGVtYWlsCQlSZXF1aXJlZAkKRGlyZWNjaW9uIFBvc3RhbAlmaWVsZF8xMAlUZXh0CU1yLnxNcnMufE1zLnxNaXNzCQkKQ29tcGV0ZW5jaWEgYSBpbnNjcmliaXJzZQlmaWVsZF8xMQlUZXh0CQlSZXF1aXJlZAkKQWxndW5hIG9ic2VydmFjaW9uCWZpZWxkXzEyCVRleHRBcmVhCQkJSW5ncmVzZSBzb2xvIGFxdWVsbG9zIGRhdG9zIHF1ZSBjb25zaWRlcmUgcmVsZXZhbnRlcwo=\";\r\n}", "abstract protected function getTCPDFBarcode();", "public function encode()\n {\n }", "public function QRcode($kodenya){\n QRcode::png(\n $kodenya,\n $outfile = false,\n $level = QR_ECLEVEL_H,\n $size = 10,\n $margin = 1\n );\n }", "public function codiceqr($testo,$larghezza=150){\n\t\t$testo=urlencode($testo);\n\t\treturn '<img src=\"https://chart.googleapis.com/chart?chs='.$larghezza.'x'.$larghezza.'&amp;cht=qr&amp;chl='.$testo.'&amp;choe=UTF-8\" alt=\"codice QR\">';\n\t}", "function generarRecibo15_txt() {\n $ids = $_REQUEST['ids'];\n $id_pdeclaracion = $_REQUEST['id_pdeclaracion'];\n $id_etapa_pago = $_REQUEST['id_etapa_pago'];\n//---------------------------------------------------\n// Variables secundarios para generar Reporte en txt\n $master_est = null; //2;\n $master_cc = null; //2;\n\n if ($_REQUEST['todo'] == \"todo\") { // UTIL PARA EL BOTON Recibo Total\n $cubo_est = \"todo\";\n $cubo_cc = \"todo\";\n }\n\n $id_est = $_REQUEST['id_establecimientos'];\n $id_cc = $_REQUEST['cboCentroCosto'];\n\n if ($id_est) {\n $master_est = $id_est;\n } else if($id_est=='0') {\n $cubo_est = \"todo\";\n }\n\n if ($id_cc) {\n $master_cc = $id_cc;\n } else if($id_cc == '0'){\n $cubo_cc = \"todo\";\n }\n //\n $dao = new PlameDeclaracionDao();\n $data_pd = $dao->buscar_ID($id_pdeclaracion);\n $fecha = $data_pd['periodo'];\n\n //---\n $dao_ep = new EtapaPagoDao();\n $data_ep = $dao_ep->buscar_ID($id_etapa_pago);\n ;\n\n $_name_15 = \"error\";\n if ($data_ep['tipo'] == 1):\n $_name_15 = \"1RA QUINCENA\";\n elseif ($data_ep['tipo'] == 2):\n $_name_15 = \"2DA QUINCENA\";\n endif;\n\n\n $nombre_mes = getNameMonth(getFechaPatron($fecha, \"m\"));\n $anio = getFechaPatron($fecha, \"Y\");\n\n\n $file_name = '01.txt';//NAME_COMERCIAL . '-' . $_name_15 . '.txt';\n $file_name2 = '02.txt';//NAME_COMERCIAL . '-BOLETA QUINCENA.txt';\n $fpx = fopen($file_name2, 'w');\n $fp = fopen($file_name, 'w');\n \n //..........................................................................\n $FORMATO_0 = chr(27).'@'.chr(27).'C!';\n $FORMATO = chr(18).chr(27).\"P\";\n $BREAK = chr(13) . chr(10);\n //$BREAK = chr(14) . chr(10);\n //chr(27). chr(100). chr(0)\n $LINEA = str_repeat('-', 80);\n//..............................................................................\n// Inicio Exel\n//.............................................................................. \n fwrite($fp,$FORMATO); \n \n\n\n // paso 01 Listar ESTABLECIMIENTOS del Emplearo 'Empresa'\n $dao_est = new EstablecimientoDao();\n $est = array();\n $est = $dao_est->listar_Ids_Establecimientos(ID_EMPLEADOR);\n $pagina = 1;\n\n // paso 02 listar CENTROS DE COSTO del establecimento. \n if (is_array($est) && count($est) > 0) {\n //DAO\n $dao_cc = new EmpresaCentroCostoDao();\n $dao_pago = new PagoDao();\n $dao_estd = new EstablecimientoDireccionDao();\n\n // -------- Variables globales --------// \n $TOTAL = 0;\n $SUM_TOTAL_CC = array();\n $SUM_TOTAL_EST = array();\n\n\n\n for ($i = 0; $i < count($est); $i++) { // ESTABLECIMIENTO\n //echo \" i = $i establecimiento ID=\".$est[$i]['id_establecimiento'];\n //echo \"<br>\";\n //$SUM_TOTAL_EST[$i]['establecimiento'] = strtoupper(\"Establecimiento X ==\" . $est[$i]['id_establecimiento']);\n $bandera_1 = false;\n if ($est[$i]['id_establecimiento'] == $master_est) {\n $bandera_1 = true;\n } else if ($cubo_est == \"todo\") {\n $bandera_1 = true;\n }\n\n if ($bandera_1) {\n \n // if($bander_ecc){\n \n $SUM_TOTAL_EST[$i]['monto'] = 0;\n //Establecimiento direccion Reniec\n $data_est_direc = $dao_estd->buscarEstablecimientoDireccionReniec($est[$i]['id_establecimiento']/* $id_establecimiento */);\n\n $SUM_TOTAL_EST[$i]['establecimiento'] = $data_est_direc['ubigeo_distrito'];\n\n $ecc = array();\n $ecc = $dao_cc->listar_Ids_EmpresaCentroCosto($est[$i]['id_establecimiento']);\n // paso 03 listamos los trabajadores por Centro de costo \n\n for ($j = 0; $j < count($ecc); $j++) {\n\n $bandera_2 = false;\n if ($ecc[$j]['id_empresa_centro_costo'] == $master_cc) {\n $bandera_2 = true;\n } else if ($cubo_est == 'todo' || $cubo_cc == \"todo\") { // $cubo_est\n $bandera_2 = true;\n }\n \n if ($bandera_2) {\n //$contador_break = $contador_break + 1;\n // LISTA DE TRABAJADORES\n $data_tra = array();\n $data_tra = $dao_pago->listar_2($id_etapa_pago, $est[$i]['id_establecimiento'], $ecc[$j]['id_empresa_centro_costo']);\n\n if (count($data_tra)>0) {\n \n $SUM_TOTAL_CC[$i][$j]['establecimiento'] = $data_est_direc['ubigeo_distrito'];\n $SUM_TOTAL_CC[$i][$j]['centro_costo'] = strtoupper($ecc[$j]['descripcion']);\n $SUM_TOTAL_CC[$i][$j]['monto'] = 0;\n\n //fwrite($fp, $LINEA); \n fwrite($fp, NAME_EMPRESA); \n //$worksheet->write(($row + 1), ($col + 1), NAME_EMPRESA);\n //$data_pd['periodo'] $data_pd['fecha_modificacion']\n $descripcion1 = date(\"d/m/Y\");\n \n fwrite($fp, str_pad(\"FECHA : \", 56, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad($descripcion1, 11, \" \", STR_PAD_LEFT));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad(\"PAGINA :\", 69, \" \", STR_PAD_LEFT)); \n fwrite($fp, str_pad($pagina, 11, \" \", STR_PAD_LEFT));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad($_name_15/*\"1RA QUINCENA\"*/, 80, \" \", STR_PAD_BOTH));\n fwrite($fp, $BREAK);\n\n fwrite($fp, str_pad(\"PLANILLA DEL MES DE \" . strtoupper($nombre_mes) . \" DEL \" . $anio, 80, \" \", STR_PAD_BOTH));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n\n fwrite($fp, \"LOCALIDAD : \" . $data_est_direc['ubigeo_distrito']);\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n\n fwrite($fp, \"CENTRO DE COSTO : \" . strtoupper($ecc[$j]['descripcion']));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n //$worksheet->write($row, $col, \"##################################################\");\n \n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"N \", 4, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad(\"DNI\", 12, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"APELLIDOS Y NOMBRES\", 40, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"IMPORTE\", 9, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"FIRMA\", 15, \" \", STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n \n $pag = 0;\n $num_trabajador = 0;\n for ($k = 0; $k < count($data_tra); $k++) {\n $num_trabajador = $num_trabajador +1; \n if($num_trabajador>24):\n fwrite($fp,chr(12));\n $num_trabajador=0;\n endif;\n \n $data = array();\n $data = $data_tra[$k]; \n //$DIRECCION = $SUM_TOTAL_EST[$i]['establecimiento'];\n // Inicio de Boleta \n \n generarRecibo15_txt2($fpx, $data, $nombre_mes, $anio,$pag);\n $pag = $pag +1;\n\n \n // Final de Boleta\n $texto_3 = $data_tra[$k]['apellido_paterno'] . \" \" . $data_tra[$k]['apellido_materno'] . \" \" . $data_tra[$k]['nombres']; \n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(($k + 1) . \" \", 4, \" \", STR_PAD_LEFT));\n fwrite($fp, str_pad($data_tra[$k]['num_documento'], 12, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(limpiar_caracteres_especiales_plame($texto_3), 40, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad($data_tra[$k]['sueldo'], 9, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(\"_______________\", 15, \" \", STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n \n // por persona\n $SUM_TOTAL_CC[$i][$j]['monto'] = $SUM_TOTAL_CC[$i][$j]['monto'] + $data_tra[$k]['sueldo'];\n }\n\n\n $SUM_TOTAL_EST[$i]['monto'] = $SUM_TOTAL_EST[$i]['monto'] + $SUM_TOTAL_CC[$i][$j]['monto'];\n \n //--- LINE\n fwrite($fp, $BREAK);\n //fwrite($fp, $LINEA);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"TOTAL \" . $SUM_TOTAL_CC[$i][$j]['centro_costo'] . \" \" . $SUM_TOTAL_EST[$i]['establecimiento'], 56, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_CC[$i][$j]['monto'], 2));\n fwrite($fp, $BREAK);\n fwrite($fp, $LINEA);\n fwrite($fp, $BREAK);\n\n fwrite($fp,chr(12));\n $pagina = $pagina + 1;\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK);\n $TOTAL = $TOTAL + $SUM_TOTAL_CC[$i][$j]['monto'];\n //$row_a = $row_a + 5;\n }//End Trabajadores\n }//End Bandera.\n }//END FOR CCosto\n\n\n // CALCULO POR ESTABLECIMIENTOS\n /* $SUM = 0.00;\n for ($z = 0; $z < count($SUM_TOTAL_CC[$i]); $z++) {\n\n fwrite($fp, str_pad($SUM_TOTAL_CC[$i][$z]['centro_costo'], 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_CC[$i][$z]['monto'], 2));\n fwrite($fp, $BREAK);\n\n\n $SUM = $SUM + $SUM_TOTAL_CC[$i][$z]['monto'];\n }\n fwrite($fp, str_pad(\"T O T A L G E N E R A L --->>>\", 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM, 2));\n */\n\n //fwrite($fp, $BREAK . $BREAK);\n \n }\n }//END FOR Est\n\n /*\n fwrite($fp, str_repeat('*', 85));\n fwrite($fp, $BREAK);\n fwrite($fp, \"CALCULO FINAL ESTABLECIMIENTOS \");\n fwrite($fp, $BREAK);\n\n //$worksheet->write(($row+4), ($col + 1), \".::RESUMEN DE PAGOS::.\");\n $SUM = 0;\n for ($z = 0; $z < count($SUM_TOTAL_EST); $z++) {\n\n fwrite($fp, str_pad($SUM_TOTAL_EST[$z]['establecimiento'], 59, \" \", STR_PAD_RIGHT));\n fwrite($fp, number_format($SUM_TOTAL_EST[$z]['monto'], 2));\n fwrite($fp, $BREAK);\n $SUM = $SUM + $SUM_TOTAL_EST[$z]['monto'];\n }\n */\n \n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n fwrite($fp, str_pad(\"T O T A L G E N E R A L --->>>\", 56, \" \", STR_PAD_RIGHT));\n fwrite($fp, str_pad(number_format_var($TOTAL), 15, ' ',STR_PAD_RIGHT));\n fwrite($fp, $BREAK);\n fwrite($fp, $BREAK);\n \n \n }//END IF\n//..............................................................................\n// Inicio Exel\n//..............................................................................\n //|---------------------------------------------------------------------------\n //| Calculos Finales\n //|\n //|---------------------------------------------------------------------------\n //\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK);\n //fwrite($fp, $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK . $BREAK);\n\n\n fclose($fp);\n fclose($fpx);\n // $workbook->close();\n // .........................................................................\n // SEGUNDO ARCHIVO\n //..........................................................................\n\n\n\n\n\n\n\n\n\n\n $file = array();\n $file[] = $file_name;\n $file[] = ($file_name2);\n ////generarRecibo15_txt2($id_pdeclaracion, $id_etapa_pago);\n\n\n $zipfile = new zipfile();\n $carpeta = \"file-\" . date(\"d-m-Y\") . \"/\";\n $zipfile->add_dir($carpeta);\n\n for ($i = 0; $i < count($file); $i++) {\n $zipfile->add_file(implode(\"\", file($file[$i])), $carpeta . $file[$i]);\n //$zipfile->add_file( file_get_contents($file[$i]),$carpeta.$file[$i]);\n }\n\n header(\"Content-type: application/octet-stream\");\n header(\"Content-disposition: attachment; filename=zipfile.zip\");\n\n echo $zipfile->file();\n}", "public function actionCreate()\n {\n $model = new SanPham();\n\n if ($model->load(Yii::$app->request->post())) {\n $ngayTao=date(\"Ymd\");\n $tienTo='SP_'.$ngayTao;\n $model->ma=Dungchung::SinhMa($tienTo.'_','san_pham');\n $model->ngay_tao=date(\"Y-m-d\");\n $model->nguoi_tao=Yii::$app->user->id;\n $model->trang_thai=SanPham::SP_MOI;\n $model->anh_qr=$model->ma.'.png';\n if($model->save())\n {\n $url=Yii::$app->urlManagerBackend->baseUrl .'?id='.$model->id;\n// baseUrl = 'baseUrl' => 'http://ngogiadiep.local:8080/ThucTap/RBAC/frontend/web/index.php/qrcode/view'\n//fix cứng url sang frontend\n $pathFile=Yii::getAlias('@webroot').'/qr-code/';\n// Lấy linh từ webroot theo $url\n $qrCode=(new QrCode($model->ma))->setText($url);\n $qrCode->writeFile($pathFile.$model->ma.'.png');\n// return print_r($url);\n// die();\n Yii::$app->session->setFlash('success','Thêm sản phẩm mới thành công.');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n Yii::$app->session->setFlash('error','Thêm sản phẩm mới thất bại');\n return $this->render('create',['model'=>$model]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "function write_referentiel() {\r\n \tglobal $CFG;\r\n // initial string;\r\n $expout = \"\";\r\n // add comment\r\n\t\t// $referentiel\r\n\t\tif ($this->referentiel){\r\n\t\t\t$id = $this->writeraw( $this->referentiel->id );\r\n $name = $this->writeraw( trim($this->referentiel->name) );\r\n $code_referentiel = $this->writeraw( trim($this->referentiel->code_referentiel));\r\n $description_referentiel = $this->writetext(trim($this->referentiel->description_referentiel));\r\n $url_referentiel = $this->writeraw( trim($this->referentiel->url_referentiel) );\r\n\t\t\t$seuil_certificat = $this->writeraw( $this->referentiel->seuil_certificat );\r\n\t\t\t$minima_certificat = $this->writeraw( $this->referentiel->minima_certificat );\r\n\r\n\t\t\t$timemodified = $this->writeraw( $this->referentiel->timemodified );\r\n\t\t\t$nb_domaines = $this->writeraw( $this->referentiel->nb_domaines );\r\n\t\t\t$liste_codes_competence = $this->writeraw( trim($this->referentiel->liste_codes_competence) );\r\n\t\t\t$liste_empreintes_competence = $this->writeraw( trim($this->referentiel->liste_empreintes_competence) );\r\n\t\t\t$local = $this->writeraw( $this->referentiel->local );\r\n\t\t\t$logo_referentiel = $this->writeraw( $this->referentiel->logo_referentiel );\r\n\r\n\t\t\t// $expout .= \"<id>$id</id>\\n\";\r\n\t\t\t$expout .= \" <name>$name</name>\\n\";\r\n\t\t\t$expout .= \" <code_referentiel>$code_referentiel</code_referentiel>\\n\";\r\n $expout .= \" <description_referentiel>\\n$description_referentiel</description_referentiel>\\n\";\r\n $expout .= \" <url_referentiel>$url_referentiel</url_referentiel>\\n\";\r\n\r\n $expout .= \" <seuil_certificat>$seuil_certificat</seuil_certificat>\\n\";\r\n\r\n $expout .= \" <minima_certificat>$minima_certificat</minima_certificat>\\n\";\r\n $expout .= \" <timemodified>$timemodified</timemodified>\\n\";\r\n $expout .= \" <nb_domaines>$nb_domaines</nb_domaines>\\n\";\r\n $expout .= \" <liste_codes_competence>$liste_codes_competence</liste_codes_competence>\\n\";\r\n $expout .= \" <liste_empreintes_competence>$liste_empreintes_competence</liste_empreintes_competence>\\n\";\r\n\t\t\t// $expout .= \" <local>$local</local>\\n\";\r\n\t\t\t// PAS DE LOGO ICI\r\n\t\t\t// $expout .= \" <logo_referentiel>$logo_referentiel</logo_referentiel>\\n\";\r\n\r\n\t\t\t// MODIF JF 2012/03/09\r\n\t\t\t// PROTOCOLE\r\n if (!empty($this->referentiel->id)){\r\n if ($record_protocol=referentiel_get_protocol($this->referentiel->id)){\r\n $expout .= $this->write_protocol( $record_protocol );\r\n }\r\n }\r\n\r\n\t\t\t// DOMAINES\r\n\t\t\tif (isset($this->referentiel->id) && ($this->referentiel->id>0)){\r\n\t\t\t\t// LISTE DES DOMAINES\r\n\t\t\t\t$compteur_domaine=0;\r\n\t\t\t\t$records_domaine = referentiel_get_domaines($this->referentiel->id);\r\n\t\t \tif ($records_domaine){\r\n \t\t\t\t// afficher\r\n\t\t\t\t\t// DEBUG\r\n\t\t\t\t\t// echo \"<br/>DEBUG ::<br />\\n\";\r\n\t\t\t\t\t// print_r($records_domaine);\r\n\t\t\t\t\tforeach ($records_domaine as $record_d){\r\n\t\t\t\t\t\t// DEBUG\r\n\t\t\t\t\t\t// echo \"<br/>DEBUG ::<br />\\n\";\r\n\t\t\t\t\t\t// print_r($records_domaine);\r\n\t\t\t\t\t\t$expout .= $this->write_domaine( $record_d );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n return $expout;\r\n }", "abstract public function encode();", "function setPurchaseInvoiceCreditNoteAttachment() {\n header('Content-Type:application/json; charset=utf-8');\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"SET NAMES utf8\";\n $this->q->fast($sql);\n }\n $sql = null;\n $qqfile = null;\n $uploader = new \\qqFileUploader($this->getAllowedExtensions(), $this->getSizeLimit());\n $result = $uploader->handleUpload($this->getUploadPath());\n if (isset($_GET['qqfile'])) {\n $qqfile = $_GET['qqfile'];\n }\n// to pass data through iframe you will need to encode all html tags\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n INSERT INTO `purchaseinvoicecreditnotetemp`(\n `companyId`,\n `staffId`,\n `leafId`,\n `purchaseInvoiceCreditNoteTempName`, \n `isNew`, \n `executeBy`, \n `executeTime`\n ) VALUES (\n '\" . $this->getCompanyId() . \"',\n '\" . $this->getStaffId() . \"',\n 120,\n '\" . $this->strict($qqfile, 'w') . \"',\n 1,\n '\" . $_SESSION['staffId'] . \"',NOW())\";\n } else if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n INSERT INTO [purchaseInvoiceCreditNoteTemp](\n [companyId],\n [staffId],\n [leafId],\n [purchaseInvoiceCreditNoteTempName],\n [isNew],\n [executeBy],\n [executeTime]\n ) VALUES (\n '\" . $this->getCompanyId() . \"',\n '\" . $this->getStaffId() . \"',\n 120,\n '\" . $this->strict($_GET['qqfile'], 'w') . \"',\n 1,\n '\" . $_SESSION['staffId'] . \"',NOW())\";\n } else if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n INSERT INTO PURCHASEINVOICECREDITNOTETEMP(\n COMPANYID,\n STAFFID,\n LEAFID,\n PURCHASEINVOICECREDITNOTETEMPNAME,\n ISNEW,\n EXECUTEBY,\n EXECUTETIME\n ) VALUES (\n '\" . $this->getCompanyId() . \"',\n '\" . $this->getStaffId() . \"',\n 120,\n '\" . $this->strict($_GET['qqfile'], 'w') . \"',\n 1,\n '\" . $_SESSION['staffId'] . \"',NOW())\";\n }\n try {\n $this->q->create($sql);\n } catch (\\Exception $e) {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n echo htmlspecialchars(json_encode($result), ENT_NOQUOTES);\n exit();\n }", "function AddQRCode($aName,$db){\r\n\r\n\t\r\n\t$tempDir = dirname(__FILE__).DIRECTORY_SEPARATOR.'phpqrcode'.DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; //setting the tempory directory to store the qrcode\r\n\t$fileName = $tempDir.$aName.'.png';//naming the qrcode file \r\n\t$errorCorrectionLevel = 'Q'; //setting the error correction level of the qrcode\r\n\t$matrixPointSize = 5; //setting the size of the generated qrcode\r\n\t$generationDate = date('Y/m/d');//setting the date\r\n\t\r\n\t//generating the qrcode and saving it to the temp folder\r\n\tQRcode::png($aName,$fileName,$errorCorrectionLevel,$matrixPointSize, 2);\r\n\t\t\r\n\t//gets the animals animal_ID\r\n\t$sql = \"SELECT animal_ID FROM tbl_Animals WHERE animal_Name ='\".$aName.\"'\";\r\n\t\r\n\tif(!$result = $db->query($sql)){\r\n\t\t$GLOBALS['Error'] = 'There was an error running the query['.$db->error.']';\r\n\t}\r\n\telse{\r\n\t\twhile ($row = $result->fetch_assoc()){\r\n\t\t\t$animal_ID = $row['animal_ID'];\r\n\t\t}\r\n\t\t\t//storing qrcode image as binary\r\n\t\t\t$QRImage = addslashes(file_get_contents($fileName));\r\n\t\t\t\r\n\t\t\t//sql to insert qrcode into tbl_QRCodes\r\n\t\t\t$insertQRCodeSQL = \"INSERT INTO tbl_QRCodes VALUES(NULL,'$QRImage','$generationDate','$animal_ID')\";\r\n\t\t\t\r\n\t\t\t\tif(!$result = $db->query($insertQRCodeSQL)){\r\n\t\t\t\t\t$GLOBALS['Error'] = 'There was an error running the query['.$db->error.']';\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tif(DeleteTempQRCode($fileName)){\r\n\t\t\t\t\t\t$GLOBALS['Success'] = ' Animal Added';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\t$GLOBALS['Warning'] = ' Animal added but there was an error deleting the QRCode';\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t}\r\n\t\r\n}", "public function Generar( ){\r\n\t\t$this->Output();\r\n\t}", "public function exportQrcodes()\n {\n try {\n $fields = [\n 'qrcodes.id',\n 'books.title',\n DB::raw('CONCAT(prefix, IF(LENGTH(code_id) < ' . Qrcode::LENGTH_OF_QRCODE . ', LPAD(code_id, ' . Qrcode::LENGTH_OF_QRCODE . ', 0), code_id)) AS qrcode'),\n ];\n $qrcodes = Qrcode::select($fields)\n ->join('books', 'books.id', '=', 'qrcodes.book_id')\n ->where('qrcodes.status', Qrcode::IS_NOT_PRINTED)\n ->get()\n ->toArray();\n if (!empty($qrcodes)) {\n Excel::create('Qrcodes', function ($excel) use ($qrcodes) {\n $excel->sheet('Export Qrcode', function ($sheet) use ($qrcodes) {\n $sheet->fromArray($qrcodes);\n });\n DB::table('qrcodes')\n ->where('status', Qrcode::IS_NOT_PRINTED)\n ->update(['status' => Qrcode::IS_PRINTED]);\n })->export(config('define.qrcodes.format_file_export'));\n } else {\n flash(__('qrcodes.download_failed'))->error();\n return redirect()->route('qrcodes.index');\n }\n } catch (Exception $e) {\n \\Log::error($e);\n return redirect()->back();\n }\n }", "function enviar_presupuesto(){\n $this->asignar_ingreso3();\n $nombre_sede = $this->sede;\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/logo_admin.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre: </strong>\".utf8_decode($this->nombre1).\"<br />\" ;\n $cuerpo .= \"<strong>Apellido: </strong>\".$this->apellido1.\"<br />\" ;\n $cuerpo .= \"<strong>RIF/Cédula: </strong>\".$this->cedula1.\"<br />\" ;\n $cuerpo .= \"<strong>Fecha de Nacimiento: </strong>\".$this->fecha1.\"<br />\";\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Teléfono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>Domicilio: </strong>\".$this->direccion1.\"<br />\" ;\n $cuerpo .= \"<strong>Empresa: </strong>\".$this->empresa.\"<br />\";\n $cuerpo .= \"<strong>Especialidad Médica: </strong>\".$this->especialidad.\"<br />\";\n $cuerpo .= \"<strong>Médico Elegido: </strong>\".$this->medico.\"<br />\";\n $cuerpo .= \"<strong>Diagnóstico: </strong>\".$this->diagnostico.\"<br />\";\n $cuerpo .= \"<strong>Procedimiento: </strong>\".$this->procedimiento.\"<br /><br />\";\n if ($this->seguro != null) {\n $cuerpo .= \"<strong>Presupuesto Con Póliza de Seguro </strong><br /><br />\";\n $cuerpo .= \"<strong>Titular de la Póliza: </strong>\".utf8_decode($this->nombre_pol).\"<br />\" ;\n $cuerpo .= \"<strong>Cédula del Titular de la Póliza: </strong>\".$this->cedula_pol.\"<br />\" ;\n $cuerpo .= \"<strong>Empresa Aseguradora: </strong>\".$this->seguro.\"<br />\" ;\n }else{\n $cuerpo .= \"<strong>Presupuesto Sin Póliza de Seguro </strong><br /><br />\";\n $cuerpo .= \"<strong>Datos de Facturación </strong><br /><br />\";\n $cuerpo .= \"<strong>Nombre: </strong>\".utf8_decode($this->nombre2).\"<br />\" ;\n $cuerpo .= \"<strong>Apellido: </strong>\".$this->apellido2.\"<br />\" ;\n $cuerpo .= \"<strong>RIF/Cédula: </strong>\".$this->cedula2.\"<br />\" ;\n $cuerpo .= \"<strong>Fecha de Nacimiento: </strong>\".$this->fecha2.\"<br />\";\n $cuerpo .= \"<strong>Dirección: </strong>\".$this->direccion2.\"<br />\" ;\n }\n\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Solicitud de Presupuesto Web Prevaler\";\n $subject2= \"Solicitud de Presupuesto Web Prevaler\";\n\n switch ($resultado['id_sede']) {\n case '1':\n $correo_envio=\"[email protected]\";\n break;\n case '2':\n $correo_envio=\"[email protected]\";\n break;\n case '3':\n $correo_envio=\"[email protected]\";\n break;\n case '4':\n $correo_envio=\"[email protected]\";\n break;\n case '8':\n $correo_envio=\"[email protected]\";\n break;\n\n default:\n $correo_envio=\"[email protected]\";\n break;\n }\n\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=$correo_envio;\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/logo_admin.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre1 $this->apellido1</strong><br /><br />\n\t\tNosotros hemos recibido su Solicitud de Presupuesto, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTel&eacute;fonos: <br/>\n\t\t\".$resultado['telefono_sede'].\"<br />\n\t\tTwitter: <a href='https://twitter.com/Prevaler_VE'>@Prevaler_VE</a><br />\n\t\tInstagram: <a href='https://www.instagram.com/prevaler_ve/'>@prevaler_ve</a><br />\n\t\t\".$resultado['email_sede'].\"\n\t\t<br /><br />\n\t\tAtentamente,<br />\n\t\tClínica Prevaler.\";\n $this->mensaje=\"<strong>&iexcl;Excelente!</strong> Su Solicitud de Presupuesto ha sido enviado exitosamente.\";\n\n $mail = new PHPMailer();\n $mail->From = $basemailfrom;\n $mail->FromName = utf8_decode($subject);\n $mail->AddAddress($basemailfor, $this->nombre.\" \".$this->apellido);\n $mail->Subject = utf8_decode($subject);\n $mail->Body = $cuerpo;\n $mail->AltBody = $cuerpo;\n $mail->isHTML(true);\n $exito = $mail->Send();\n\n $mail2 = new PHPMailer();\n $mail2->From = $basemailfor;\n $mail2->FromName = utf8_decode($subject2);\n $mail2->AddAddress($basemailfrom, $this->nombre.\" \".$this->apellido);\n $mail2->Subject = utf8_decode($subject2);\n $mail2->Body = $respuesta;\n $mail2->AltBody = $respuesta;\n $mail2->isHTML(true);\n $exito = $mail2->Send();\n }", "public function content(): string\n {\n // Set the `to` to a temporary file.\n $this->to = $this->makeTemporaryFile();\n file_put_contents($this->to, 'test');\n\n $this->generate();\n\n return file_get_contents($this->to);\n }", "function guardarPQR($idUsuario,$tipo_pqr,$asunto_pqr ){\n\t\t\t$fecha_creacion = date('Y-m-d h:i:s');\n\t\t\t\n\t\t\t//validacion vencimiento segun tipo de PQR\n\t\t\tif($tipo_pqr == 'Petición'){\n\t\t\t\t$limiteAtencion = 7;\n\t\t\t}else if($tipo_pqr == 'Queja'){\n\t\t\t\t$limiteAtencion = 3;\n\t\t\t}else if($tipo_pqr == 'Reclamo'){\n\t\t\t\t$limiteAtencion = 2;\n\t\t\t}\n\t\t\t$nuevafecha = strtotime ( '+'.$limiteAtencion.' day' , strtotime ( $fecha_creacion ) ) ;\n\t\t\t$fechaLimite = date ( 'Y-m-d h:i:s' , $nuevafecha );\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t$query = \"INSERT INTO pqr (id_usuario,tipo_pqr,asunto_pqr,estado,fecha_creacion,fecha_limite) \n\t\t\tVALUES (\n\t\t\t\t'\".$idUsuario.\"',\n\t\t\t\t'\".$tipo_pqr.\"',\n\t\t\t\t'\".$asunto_pqr.\"',\n\t\t\t\t'Nuevo',\n\t\t\t\t'\".$fecha_creacion.\"',\n\t\t\t\t'\".$fechaLimite.\"'\n\t\t\t\t);\";\n\n\n\t\t\t$rst = $this->db->enviarQuery($query,'CUD');\n\t\t\treturn $rst;\n\t\t}", "public function tambah_aksi(){\n\t\t$status = 1;\n \n $kode_lapak = $this->input->post('kode_lapak');\n\t\t$lokasi_lapak = $this ->input->post('lokasi_lapak');\n\t\t$harga_lapak = $this ->input->post('harga_lapak');\n\n\t\t\n\n\t\t//Encript base64\n\t\t$encode = base64_encode($kode_lapak);\n\t\t\n\t\t$this->load->library('ciqrcode'); //pemanggilan library QR CODE\n\n\t\t$config['cacheable']\t= true; //boolean, the default is true\n\t\t$config['cachedir']\t\t= './assets/'; //string, the default is application/cache/\n\t\t$config['errorlog']\t\t= './assets/'; //string, the default is application/logs/\n\t\t$config['imagedir']\t\t= './assets/images/'; //direktori penyimpanan qr code\n\t\t$config['quality']\t\t= true; //boolean, the default is true\n\t\t$config['size']\t\t\t= '1024'; //interger, the default is 1024\n\t\t$config['black']\t\t= array(224, 255, 255); // array, default is array(255,255,255)\n\t\t$config['white']\t\t= array(70, 130, 180); // array, default is array(0,0,0)\n\t\t$this->ciqrcode->initialize($config);\n\n\t\t$image_name = $encode. '.png'; //buat name dari qr code sesuai dengan \n\n\t\t$params['data'] = $encode; //data yang akan di jadikan QR CODE\n\t\t$params['level'] = 'H'; //H=High\n\t\t$params['size'] = 10;\n\t\t$params['savename'] = FCPATH . $config['imagedir'] . $image_name; //simpan image QR CODE ke folder assets/images/\n\t\t$this->ciqrcode->generate($params); // fungsi untuk generate QR CODE\n\n\n $data = array(\n \n 'kode_lapak' => $kode_lapak,\n\t\t 'lokasi_lapak' => $lokasi_lapak,\n\t\t 'harga_lapak' => $harga_lapak,\n\t\t \n\t\t 'qrcode' => $image_name\n \n );\n\n $this->M_page->input_data($data, 'tbl_lapak');\n\n\t\t$this->session->set_flashdata(\"a\", \"Data Berhasil Ditambah\");\n\t\tredirect('page/inputdatalapak');\n\n\t}", "function getContent() {\t \r\n\t \t$content = isSet($this->headery) ? '\\headery'.round(TWIPS_IN_CM * $this->headery).' ' : '';\t \r\n\t\t$content .= '{\\\\'.$this->type.' ';\t\t\t\t\t\t\r\n\t\t$content .= parent::getContent();\r\n\t\t$content .= '\\par ';\r\n\t\t$content .= '}';\r\n\t\treturn $content.\"\\r\\n\";\r\n\t}", "function generarPreingreso(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_PREING_GEN';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\t\t//echo $this->consulta;exit;\n\t\t\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "private function createBarcode()\n {\n $barcodeOptions = [\n 'text' => $this->barcodeValue,\n 'factor' => '1',\n 'drawText' => $this->barcodeSettings->includeNumber($this->storeId),\n 'backgroundColor' => $this->barcodeSettings->getBackgroundColor($this->storeId),\n 'foreColor' => $this->barcodeSettings->getFontColor($this->storeId),\n ];\n\n $type = $this->barcodeSettings->getType($this->storeId);\n // @codingStandardsIgnoreLine\n $imageResource = ZendBarcode::draw($type, 'image', $barcodeOptions, []);\n // @codingStandardsIgnoreLine\n imagejpeg($imageResource, $this->fileName, 100);\n // @codingStandardsIgnoreLine\n imagedestroy($imageResource);\n }", "function getUserQRCode()\n{\n\t $qr = new qrcode();\n\t //the defaults starts\n\t global $myStaticVars;\n\t extract($myStaticVars); // make static vars local\n\t $member_default_avatar \t= $member_default_avatar;\n\t $member_default_cover\t\t= $member_default_cover;\n\t $member_default\t\t\t\t= $member_default;\n\t $company_default_cover\t\t= $company_default_cover;\n\t $company_default_avatar\t= $company_default_avatar;\n\t $events_default\t\t\t\t= $events_default;\n\t $event_default_poster\t\t= $event_default_poster;\n\t //the defaults ends\t\n\t\n\t $session_values=get_user_session();\n\t $my_session_id\t= $session_values['id'];\n\t if($my_session_id>0)\n\t {\n\t // how to build raw content - QRCode with Business Card (VCard) + photo \t \n\t //$tempDir = QRCODE_PATH; \n\t \n\t $data\t\t\t=\tfetch_info_from_entrp_login($my_session_id);\n\t \n\t $clientid \t\t= $data['clientid'];\n \t $username \t\t= $data['username'];\n \t $email \t\t\t= $data['email'];\n \t $firstname \t= $data['firstname'];\n \t $lastname \t\t= $data['lastname'];\n \t $voffStaff\t\t= $data['voffStaff'];\n\t\t $vofClientId\t= $data['vofClientId'];\t\n\t\t \n\t\t //Fetch qr-code from db if already generated\n\t\t $qrCode= fetchUserQRCodeFromDB($clientid);\n\t \n\t if($qrCode=='')\n\t {\n\t \t$qrCodeToken\t=\tuniqueQRCodeToken();\n\t \tsaveQRCOdeforUser($clientid,$qrCodeToken);\n\t }\n\t else\n\t {\n\t \t$qrCodeToken\t= $qrCode;\n\t }\n\t \n\t $qr->text($qrCodeToken);\n\t $data['qr_link'] \t\t\t= $qr->get_link();\n\t $data['client_id'] \t\t\t= $clientid;\n\t $data['vofClientId'] \t\t= $vofClientId;\n\t $data['vofStaffStatus'] \t= $voffStaff;\n\t //return $qr->get_link(); \n\t return $data; \n\t }\t \n}", "public function generateAndSave()\n\t{\n\t\t$this->ensureInitials();\n\n\t\tfor($i = 0; $i < $this->config['amount']; $i ++)\n\t\t{\n\t\t\t$codes[] = $this->generateCode();\n\t\t}\n\n\t\tfile_put_contents($this->config['file'], implode($this->newline, $codes) . $this->newline, FILE_APPEND);\n\t}", "public function testGenerateBarcodeQRCode()\n {\n }", "public function qr_generator_view()\n {\n $data = [\n \"route_info\" => \\sr::api(\"qr-gene\"),\n 'theme' => $this->themes[0],\n 'ng_app' => \"myApp\",\n 'ng_controller' => \"main\",\n ];\n return $this->get_view(\"Apis.qr\", $data);\n }", "private function GENPayload() {\n\n\t\t$payload = pack('C', 1);\n\n\t\t$sensCount = mt_rand(1, 8);\n\n\t\t$sensors = '';\n\n\t\tfor ( $idx = 0; $idx < $sensCount; $idx++ ) {\n\t\t\t$sensor;\n\t\t\t$sensorValue;\n\n\t\t\t$sensType = mt_rand(1,7);\n\n\t\t\t$sensor = pack('v', $sensType);\n\t\t\t$sensorValue = pack('V', mt_rand());\n\n\t\t\t$sensors = $sensors . $sensor . $sensorValue;\n\n\t\t}\n\n\t\t$payload = $payload . $sensors;\n\n\t\t$this->payload_raw = base64_encode($payload);\n\n\t}", "function attendance_renderqrcode($session) {\n global $CFG;\n\n if (strlen($session->studentpassword) > 0) {\n $qrcodeurl = $CFG->wwwroot . '/mod/attendance/attendance.php?qrpass=' .\n $session->studentpassword . '&sessid=' . $session->id;\n } else {\n $qrcodeurl = $CFG->wwwroot . '/mod/attendance/attendance.php?sessid=' . $session->id;\n }\n\n $barcode = new TCPDF2DBarcode($qrcodeurl, 'QRCODE');\n $image = $barcode->getBarcodePngData(15, 15);\n echo html_writer::img('data:image/png;base64,' . base64_encode($image), get_string('qrcode', 'attendance'));\n}", "function print_qrcode($code_ams)\n {\n \n $data[\"code_ams\"] = $code_ams;\n $data[\"data\"] = $this->get_data_qrcode($code_ams); \n return view('masterdata.print_qrcode')->with(compact('data'));\n }", "function encodeTuulo'Esse($text)\r\n\t{\r\n\t\t// Activate tanya following line manka antaed\r\n\t\t// $text = \"=?{$sina->charSet}?B?\".base64_encode($text).\"?=\";\r\n\t\treturn $text;\r\n\t}", "public function QRcode($kodenya = null){\n \tQRcode::png(\n \t\t$kodenya,\n \t\t$outfile = false,\n \t\t$level = QR_ECLEVEL_H,\n \t\t$size = 13,\n \t\t$margin = 3\n \t);\n }", "public function GenerarPedidoWeb($arregloPedido,$arregloPasajeros,$codigoTransaccion,$idPoliza,$cantidadPasajeros)\r\n\t{\r\n\t\ttry\r\n\t\t{\t$fechaRegistro=date(\"m/d/Y h:m:s\" );\r\n\t\t\t//CREAMOS EL PEDIDO\r\n\t\t\t//var_dump($arregloPedido);\r\n\t\t\t$recordSett = &$this->conexion->conectarse()->Execute(\" INSERT INTO PedidoWeb\r\n\t\t(Id, CodigoTransaccion, IdPoliza, FechaCreacion, FechaRespuesta, NombreTitularFactura, DocumentoTitularFactura, DireccionTitularFactura, \r\n\t\tTelefonoTitularFactura,EmailTitularFactura, TelefonoContacto, TelefonoMovilContacto, DireccionContacto, NombreContactoEmergencia, ApellidoContactoEmergencia, \r\n\t\tTelefonoContactoEmergencia, EmailContactoEmergencia,FechaInicio,FechaFin,Precio ,Region,TrmIata, Estado)\r\n\t\tVALUES ( '\".$arregloPedido[0].\"','\".$codigoTransaccion.\"','\".$idPoliza.\"','\".$fechaRegistro.\"','\".$fechaRegistro.\"','\".$arregloPedido[7].\"','\".$arregloPedido[8].\"','\".$arregloPedido[9].\"','\".$arregloPedido[10].\"','\".$arregloPedido[11].\"','\".$arregloPedido[5].\"','\".$arregloPedido[4].\"','\".$arregloPedido[6].\"','\".$arregloPedido[1].\"','\".$arregloPedido[2].\"','\".$arregloPedido[3].\"','\".$arregloPedido[12].\"','\".$arregloPedido[13].\"','\".$arregloPedido[14].\"','\".$arregloPedido[15].\"','\".$arregloPedido[16].\"','\".$this->fun->getTrmIata($idPoliza).\"',3) \");\t\r\n\t\t\t//CREAMOS LOS PASAJEROS DEL PEDIDO.\r\n\t\t\t//var_dump($arregloPasajeros);\r\n\t\t\t//echo \"Cantidad Inicial \".$cantidadPasajeros.\"<br>\";\r\n\t\t\t$guardaPasajeros=0;\r\n\t\t\t$i=0;\r\n\t\t\t\twhile($cantidadPasajeros!= $guardaPasajeros){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t$Nombre=$arregloPasajeros[$i++];\r\n\t\t\t\t$Apellido=$arregloPasajeros[$i++];\r\n\t\t\t\t$Documento=$arregloPasajeros[$i++];\r\n\t\t\t\t$Email=$arregloPasajeros[$i++];\r\n\t\t\t\t$FechaNacimiento=$arregloPasajeros[$i++];\t\t\t\t\r\n\t\t\t\t\t$Idpasajero=$this->fun->NewGuid();\r\n\t\t\t\t\t$recordSett = &$this->conexion->conectarse()->Execute(\"INSERT INTO PasajerosPedido\r\n\t\t\t\t\t\t (Id, IdPedido, Nombre, Apellido, Documento, Email, FechaNacimiento)\r\n\t\t\t\t\t\t VALUES('\".$Idpasajero.\"','\".$arregloPedido[0].\"','\".$Nombre.\"','\".$Apellido.\"','\".$Documento.\"','\".$Email.\"','\".$FechaNacimiento.\"')\");\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$guardaPasajeros++;\t\r\n\t\t\t\t\t//echo $guardaPasajeros .\"<br>\";\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\techo 'Caught exception: ', $e->getMessage(), \"\\n\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function encode_advanced_rle(string $path_to_encode, string $result_path) {\n // check if the picture exist\n if (!file_exists($path_to_encode)) return 1;\n $codemotif = \"\";\n $hexa = bin2hex(file_get_contents($path_to_encode));\n $taille = strlen($hexa);\n\n // set a space all the two carracters. I'm gonna call it a motif\n for ($i = 1; $i < $taille; $i += 2)\n $codemotif = $codemotif.$hexa[$i-1].$hexa[$i].' ';\n \n $taille2 = strlen($codemotif);\n $compress = \"\";\n\n $i = 2;\n while ($i <= $taille2 - 3) {\n // compare the motifs two by two, and since they are equal, concatenate them.\n $pack = $codemotif[$i-2].$codemotif[$i-1].' ';\n $pack2 = $codemotif[$i+1].$codemotif[$i+2].' ';\n $count = 0;\n if ($pack == $pack2) {\n $count++;\n do {\n $count++;\n $i += 3;\n if ($i+1 >= $taille2) break;\n $pack = $codemotif[$i-2].$codemotif[$i-1].' ';\n $pack2 = $codemotif[$i+1].$codemotif[$i+2].' ';\n } while ($pack == $pack2);\n $compress .= $count.' '.$pack;\n $i += 3;\n if ($i+1 >= $taille2) break;\n $pack = $codemotif[$i-2].$codemotif[$i-1].' ';\n $pack2 = $codemotif[$i+1].$codemotif[$i+2].' ';\n $count = 0;\n }\n // compare the motifs two by two, and since they are differents.\n if ($pack != $pack2) {\n $j = $i;\n do {\n $count++;\n $i += 3; \n if ($i + 1 >= $taille2) {\n $count++;\n $i += 3;\n break;\n }\n $pack = $codemotif[$i-2].$codemotif[$i-1].' ';\n $pack2 = $codemotif[$i+1].$codemotif[$i+2].' ';\n } while ($pack != $pack2);\n $compress .= '00 '.$count.' ';\n // add the last motif if they are an odd number\n while ($j < $i) {\n $pack = $codemotif[$j-2].$codemotif[$j-1].' ';\n $compress = $compress.$pack;\n $j += 3;\n }\n }\n }\n\n // make a save \n if (file_exists($result_path)) unlink($result_path);\n file_put_contents($result_path, $compress);\n return 0;\n}", "public function generateCode() {\n $content = \"\";\n foreach ($this->arrTemplates as $template) {\n if (!file_exists($template)) {\n //Template not found\n continue;\n }\n $content .= file_get_contents($template);\n }\n \n foreach ($this->attributes as $key => $val) {\n $content = str_replace($this->placeHolderStart.$key.$this->placeHolderEnd, $val, $content);\n }\n return $content;\n }", "function AtualizaQRCode($id){\n\t$conteudo = file_get_contents(\"php://input\");\n\t$resposta = array();\n\n\t//Verifica se o id foi recebido\n\tif($id == 0){\n\t\t$resposta = mensagens(9);\n\t}\n\telse{\n\t\t//Verifica se o conteudo foi recebido\n\t\tif(empty($conteudo)){\n\t\t\t$resposta = mensagens(2);\n\t\t}\n\t\telse{\n\t\t\t//Converte o json recebido pra array\n\t\t\t$dados = json_decode($conteudo,true);\n\t\t\t\n\t\t\t//Verifica se as infromações esperadas foram recebidas\n\t\t\tif(!isset($dados[\"QRCode\"]))\n\t\t\t{\n\t\t\t\t$resposta = mensagens(3);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tinclude(\"conectar.php\");\n\t\t\t\tinclude(\"uploadDeFotos.php\");\n\t\t\t\t\n\t\t\t\t//Evita SQL injection\n\t\t\t\t$QRCode = mysqli_real_escape_string($conexao,$dados[\"QRCode\"]);\n\t\t\t\t\n\t\t\t\t$caminho = uploadDeQRCode($QRCode);\n\t\t\t\t\n\t\t\t\t//Atualiza animal no banco\n\t\t\t\t$query = mysqli_query($conexao, \"UPDATE Animal SET QRCode = '\" .$caminho .\"' WHERE idAnimal=\" .$id) or die(mysqli_error($conexao));\n\t\t\t\t$resposta = array(\"QRCode\" => $caminho);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $resposta;\n\n}", "public function generate() {\n\n /** @var $code String generate code */\n\n $code = (new Users())->phoneNumber_GenerateCode();\n\n /** @var $user Array get the details of a current user */\n\n $user = (new Users())->current_user();\n\n /**\n * @var $phone_format String format mobile phone number\n * to non space and non special character format\n */\n\n $phone_format = preg_replace(\"/[\\W\\s]/m\",\"\",$user['CP']);\n\n /** @var $template String a message to send **/\n\n $template = \"From SCOA, use this code to verify your account '{$code}' \";\n\n /** @void send sms and notify the current user */\n\n sms::send($phone_format,$template);\n\n }", "public function encender();", "function get_save_code(){\n\t\tif (isset($this->id) && !$this->_new) {\n\t\t\t$sql = \"UPDATE `svg_info` set \";\n\t\t\t$i = 0;\n\t\t\tforeach($this->UPDATE as $u){\n\t\t\t\tif ($i>0) $sql = $sql.\" , \";\n\t\t\t\t$sql = $sql.$u;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$sql = $sql.\" WHERE `id`='\".addslashes($this->id).\"'\";\n\t\t}else{\n\t\t\t$sql = \"INSERT into `svg_info` values |('\".addslashes($this->id).\"' , '\".addslashes($this->bf).\"' , '\".addslashes($this->type).\"' , '\".addslashes($this->lid).\"' , '\".addslashes($this->index).\"' , '\".addslashes($this->transform).\"' , '\".addslashes($this->value).\"' , '\".addslashes($this->fontsize).\"' , '\".addslashes($this->color).\"' , '\".addslashes($this->fill).\"' , '\".addslashes($this->stroke).\"' , '\".addslashes($this->points).\"' , '\".addslashes($this->txt).\"')\";\n\t\t}\n\t\treturn $sql;\n\t}", "private function createBody(QrCode $qrCode)\n {\n $body = new Stream('php://temp', 'wb+');\n $body->write($qrCode->get());\n $body->rewind();\n return $body;\n }", "public function create($item_id)\n {\n $condition = array(\n 'where' => array(\n 'id' => $item_id\n )\n );\n\n $data = $this->QR_Outbound_model->getRows($condition);\n\n $this->load->library('ciqrcode'); // memanggil library qr code\n\n $config['cacheable'] = true; //boolean, the default is true\n $config['cachedir'] = './assets/'; //string, the default is application/cache/\n $config['errorlog'] = './assets/'; //string, the default is application/logs/\n $config['imagedir'] = './assets/img/qr/'; //direktori penyimpanan qr code\n $config['quality'] = true; //boolean, the default is true\n $config['size'] = '1024'; //interger, the default is 1024\n $config['black'] = array(224, 255, 255); // array, default is array(255,255,255)\n $config['white'] = array(70, 130, 180); // array, default is array(0,0,0)\n\n $this->ciqrcode->initialize($config);\n\n $image_name = $item_id . '.png'; //set image name based on $item_id\n\n //data yang akan di jadikan QR CODE\n $params['data'] = 'Item # : ' . $data[0]['item_number'] . \"\\r\\n\" .\n 'desc. : ' . $data[0]['stock_item_description'] . \"\\r\\n\" .\n 'spec : ' . $data[0]['stock_item_spec'] . \"\\r\\n\" .\n 'model # : ' . $data[0]['oem_model_#'] . \"\\r\\n\" .\n 'part # : ' . $data[0]['oem_part_#'] . \"\\r\\n\" .\n 'subinventory : ' . $data[0]['subinventory'] . \"\\r\\n\" .\n 'locator : ' . $data[0]['locator'] . \"\\r\\n\" .\n 'receipt # : ' . $data[0]['receipt_number'] . \"\\r\\n\" .\n 'lot # : ' . $data[0]['lot_number'] . \"\\r\\n\" .\n 'receipt date : ' . $data[0]['receipt_date'] . \"\\r\\n\" .\n 'PO # : ' . $data[0]['po_number'];\n\n $params['level'] = 'H'; //H=High\n $params['size'] = 10;\n $params['savename'] = FCPATH . $config['imagedir'] . $image_name; //simpan image QR CODE ke folder assets/img/qr/\n $this->ciqrcode->generate($params); // fungsi untuk generate QR CODE\n\n redirect('qr/labels');\n }", "public function QRcode($kodenya)\n {\n // render qr dengan format gambar PNG\n QRcode::png(\n $kodenya,\n $outfile = false,\n $level = QR_ECLEVEL_H,\n $size = 6,\n $margin = 2\n );\n }", "public function qrcode($no_peminjaman)\n {\n $peminjaman = Peminjaman::where('no_peminjaman', $no_peminjaman)\n ->where('email', Auth::user()->email)\n ->where('status_peminjaman', 'Booking')\n ->first();\n if (empty($peminjaman)) {\n return redirect('/daftar-peminjaman');\n } \n\n $renderer = new ImageRenderer(\n new RendererStyle(200),\n new ImagickImageBackEnd()\n );\n $writer = new Writer($renderer);\n // $qrcode = $writer->writeFile('Hello World!', 'qrcode.png');\n $qrcode = base64_encode($writer->writeString($peminjaman->token));\n\n return view('peminjaman.qrcode', compact('qrcode'));\n \n }", "function tanda_terima($data){\n $rdata['nomor_surat'] = $data['nomor_surat'];\n $rdata['tgl_surat'] = $data['tgl_surat'];\n $rdata['perihal'] = $data['perihal'];\n $rdata['kd_jns_surat'] = $data['kd_jns_surat'];\n $rdata['asal'] = $this->opd->desc;\n $data['qrcode'] = $this->print_qrcode->genQR($rdata);\n $this->load->view('tanda_terima', $data);\n }", "public static function generateTxt(){\n $archivo = fopen('documents/proveedores.txt','a');\n //------- Creamos el Encabepado --------\n fputs($archivo,\"codigo_del_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"descripcion_del_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"tipo_de_proveedor\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"rif\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"otra_descripcion\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"direccion\");\n fputs($archivo,\" ; \");\n fputs($archivo,\"telefono\");\n\n fputs($archivo,\"\\n\");\n\n //--------------------------------\n\n //----------- --------------------------\n $rows=Proveedores::find()->all();\n foreach($rows as $row)\n {\n fputs($archivo,$row->codigo);\n fputs($archivo,\";\");\n fputs($archivo,Proveedores::getSubString($row->razon,100));\n fputs($archivo,\";\");\n fputs($archivo,$row->tipo);\n fputs($archivo,\";\");\n fputs($archivo,$row->cedrif);\n fputs($archivo,\";\");\n fputs($archivo,'XXX');\n fputs($archivo,\";\");\n if (is_null($row->direccion)) fputs($archivo,'XXX'); else fputs($archivo,$row->direccion);\n fputs($archivo,\";\");\n if (($row->telefono==\"\")) fputs($archivo,'XXX'); else fputs($archivo,$row->telefono);\n fputs($archivo,\"\\n\");\n\n\n\n }\n fclose($archivo);\n\n\n }", "function crearbd($c){\n $temp=\"\";\n //RUTA DEL FICHERO QUE CONTIENE LA CREACION DE TABLAS\n $ruta_fichero_sql = 'mysql_script/tablas.sql';\n \n \n //CON EL COMANDO FILE,VOLCAMOS EL CONTENIDO DEL FICHERO EN OTRA VARIABLE\n $datos_fichero_sql = file($ruta_fichero_sql);\n //LEEMOS EL FICHERO CON UN BUCLE FOREACH\n foreach($datos_fichero_sql as $linea_a_ejecutar){\n //QUITAMOS LOS ESPACIOS DE ALANTE Y DETRÁS DE LA VARIABLE\n $linea_a_ejecutar = trim($linea_a_ejecutar); \n \n //GUARDAMOS EN LA VARIABLE TEMP EL BLOQUE DE SENTENCIAS QUE VAMOS A EJECUTAR EN MYSQL\n $temp .= $linea_a_ejecutar.\" \";\n //COMPROBAMOS CON UN CONDICIONAL QUE LA LINEA ACABA EN ;, Y SI ES ASI LA EJECUTAMOS\n if(substr($linea_a_ejecutar, -1, 1) == ';'){\n mysqli_query($c,$temp);\n \n //REINICIAMOS LA VARIABLE TEMPORAL\n $temp=\"\";\n \n }//FIN IF BUSCAR SENTENCIA ACABADA EN ;\n else{\n //echo\"MAL\".$temp.\"<br><br>\";\n }\n \n }//FIN FOREACH\n \n \n }", "function send_enc_output($out)\n{ $a = json_encode($out);\n $rand = rand(10000, 99999);\n $rand2 = rand(1, 4);\n $rand = $rand2 . $rand;\n $rand_key = substr($rand, $rand2, 2);\n $ekey = \"!@#%^&\" . substr($_SESSION['gCCAppKey'], 4, 5) . \"gpl\" . $rand_key;\n //$ekey = \"gplCC\" . substr($_SESSION['gCCAppKey'], 9, 5) . \"!@#%^&\";\n $hex = dechex($rand);\n $resp = strlen($hex) . $hex . gPlexEncryption::AESEncrypt($a, $ekey, '12gPlex:gCC!@#12');\n //file_put_contents('log/resp_'.time().'.txt', $ekey . ' || ' . '12gPlex:gCC!@#12' . ' || ' . $a . ' || '.$resp);\n echo $resp;\n exit;\n}", "private function get_insert_chunk ($p_type, $p_valor) {\r\n if ($p_type == 'D') $ret='NULL, \"'.date_to_mysql($p_valor).'\",NULL, NULL';\r\n elseif ($p_type == 'M') $ret='\"'.$p_valor.'\",NULL, NULL, NULL';\r\n elseif ($p_type == 'L') $ret='NULL, NULL, \"'.$p_valor.'\", NULL';\r\n elseif ($p_type == 'N') $ret='NULL, NULL, \"'.$p_valor.'\", NULL';\r\n elseif ($p_type == 'C') $ret='\"'.$p_valor.'\",NULL, NULL, NULL';\r\n elseif ($p_type == 'I') { // Es imatge\r\n if(GD_LIB && $p_valor!='') { // tenim el GD activat, precalculem el width i el height\r\n $ii=@getimagesize(DIR_APLI.'/'.$p_valor);\r\n $wh=$ii[0].'.'.$ii[1];\r\n $ret='\"'.$p_valor.'\",NULL, NULL, \"'.$wh.'\"';\r\n }\r\n else $ret='\"'.$p_valor.'\",NULL, NULL, NULL';\r\n }\r\n elseif ($p_type == 'Y') { //Es link de Youtube\r\n if (strpos($p_valor,'youtube.com') || strpos($p_valor,'youtu.be')) {\r\n $explode_youtube=explode('/',$p_valor);\r\n $p_valor=$explode_youtube[count($explode_youtube)-1];\r\n if (strpos($p_valor,'=') != false) {\r\n $explode_youtube=explode('=',$p_valor);\r\n $p_valor=$explode_youtube[1];\r\n }\r\n if (strpos($p_valor,'&') != false) {\r\n $explode_youtube=explode('&',$p_valor);\r\n $p_valor=$explode_youtube[0];\r\n }\r\n $p_valor='youtube:'.$p_valor;\r\n }\r\n elseif (strpos($p_valor,'vimeo.com')) {\r\n $explode_vimeo1=explode('/',$p_valor);\r\n $explode_vimeo2=explode('#',$explode_vimeo1[count($explode_vimeo1)-1]);\r\n $p_valor='vimeo:'.$explode_vimeo2[count($explode_vimeo2)-1];\r\n }\r\n elseif (strpos($p_valor,'tv3.cat')) {\r\n $explode_tv3=explode('/',$p_valor);\r\n $p_valor='tv3:'.$explode_tv3[count($explode_tv3)-1];\r\n if (is_nan($explode_tv3[count($explode_tv3)-1])) $p_valor='tv3:'.$explode_tv3[count($explode_tv3)-2];\r\n }\r\n elseif(!strpos($p_valor,'http://') && $p_valor!='') {\r\n $explode_nice=explode(':',$p_valor);\r\n if ($explode_nice[0]!='nicepeople' && $explode_nice[0]!='youtube' && $explode_nice[0]!='vimeo' && $explode_nice[0]!='tv3') $p_valor='nicepeople:'.$p_valor;\r\n }\r\n $ret='\"'.$p_valor.'\", NULL, NULL, NULL';\r\n }\r\n else {\r\n $ret='\"'.str_replace(\"'\",\"\\'\",str_replace(\"\\\"\", \"\\\\\\\"\", str_replace(\"[\\]\",\"\",$p_valor))).'\", NULL, NULL, NULL';\r\n }\r\n\r\n return $ret;\r\n }", "function Barcode39 ($barcode, $width, $height, $quality, $format, $text)\n{\n\tswitch ($format)\n\t{\n\t\tdefault:\n\t\t\t$format = \"JPEG\";\n\t\t\tbreak;\n\t\tcase \"JPEG\":\n\t\t\theader (\"Content-type: image/jpeg\");\n\t\t\tbreak; \n\t\tcase \"PNG\":\n\t\t\theader (\"Content-type: image/png\");\n\t\t\tbreak; \n\t\tcase \"GIF\": \n\t\t\theader (\"Content-type: image/gif\"); \n\t\t\tbreak; \n\t}\n\n\t$im = ImageCreate ($width, $height) \n\t\tor die (\"Cannot Initialize new GD image stream\");\n\n\t$White = ImageColorAllocate ($im, 255, 255, 255); \n\t$Black = ImageColorAllocate ($im, 0, 0, 0); \n\t$Red = ImageColorAllocate ($im, 255, 0, 0);\n\t//ImageColorTransparent ($im, $White); \n\tImageInterLace ($im, 1);\n\n\t$NarrowBar = 1;\n\t$WideBar = 3;\n\t$QuietBar = 1;\n\n\t$font_id = 1;\n\t$font_height = imagefontheight($font_id); \n\n\tif (($NarrowBar == 0) || ($NarrowBar == $WideBar) || ($WideBar == 0) || ($QuietBar == 0))\n\t{\n\t\tImageString ($im, $font_id, 0, 0, \"Image is\", $Black);\n\t\tImageString ($im, $font_id, 0, $font_height, \"too small!\", $Black);\n\t\tOutputImage ($im, $format, $quality); \n\t\texit;\n\t}\n\n\t$CurrentBarX = 10;\n\t$BarcodeFull = \"*\".strtoupper ($barcode).\"*\"; \n\tsettype ($BarcodeFull, \"string\");\n\n//\tImageString($im, $font_id, 0,$height-$font_height, $barcode, $Black);\n\n\tfor ($i=0; $i<strlen($BarcodeFull); $i++) \n\t{\n\t\t$StripeCode = Code39 ($BarcodeFull[$i]); \n\n\t\tfor ($n=0; $n < 10; $n++) \n\t\t{\n\t\t\tswitch ($StripeCode[$n])\n\t\t\t{ \n\t\t\t\tcase 'w':\n\t\t\t\t\tImageFilledRectangle($im, 0, $CurrentBarX, $width, $CurrentBarX+$NarrowBar, $White);\n\t\t\t\t\t$CurrentBarX += $NarrowBar;\n\t\t\t\t\tbreak; \n\n\t\t\t\tcase 'W':\n\t\t\t\t\tImageFilledRectangle($im, 0, $CurrentBarX, $width, $CurrentBarX+$WideBar, $White);\n\t\t\t\t\t$CurrentBarX += $WideBar;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'b':\n\t\t\t\t\tImageFilledRectangle($im, 0, $CurrentBarX, $width, $CurrentBarX+$NarrowBar, $Black);\n\t\t\t\t\t$CurrentBarX += $NarrowBar;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'B':\n\t\t\t\t\tImageFilledRectangle($im, 0, $CurrentBarX, $width, $CurrentBarX+$WideBar, $Black);\n\t\t\t\t\t$CurrentBarX += $WideBar;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tOutputImage ($im, $format, $quality); \n}", "private function genTk() : string{\n $this->checkNotConnected();\n $tk = \"\";\n do{\n for($i = 0; $i < 4; $i++) $tk .= (string)random_int(0, 9);\n }while($this->ckTokenClientEx(base64_encode($tk)));\n return base64_encode($tk);\n }", "function save_qrcoupon($Data){\n $this->db->insert(\"r_app_qrcode_values\", $Data);\n return $this->db->insert_id();\n }", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }", "public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\n }", "public function insert($contenido);", "public function qrCode(){\n }", "function getContent() {\t \t\r\n\t \t$content = '{';\r\n\t\t$content .= !empty($this->alignment) ? $this->alignment : '';\t\t\t \t\r\n\t\t$content .= !empty($this->font) ? $this->font->getContent($this->rtf) : '';\t \t\t\r\n\t\t$content .= Container::getContent().'\\cell \\pard }'.\"\\r\\n\";\r\n\t\treturn $content;\r\n\t}", "private function generate()\n {\n $output = '';\n $length = strlen($this->str);\n\n\n for ($i = 1; $i < 5; $i++) {\n // get random char\n $char = $this->str[rand(0, $length - 1)];\n $output .= $char;\n\n // get font size\n $fontSize = ($this->level > 1) ? rand(20, 48) : 28;\n imagettftext($this->imageResource, $fontSize, rand(-35, 35), 35 * $i, 55, imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)), $this->font, $char);\n }\n\n $this->code = ($this->caseSensitive) ? $output : strtolower($output);\n }", "public function encode($content);", "public function get_content(): string\n {\n $query = \"DELETE FROM \" . $this::TABLE_NAME . \" WHERE \" . $this::ID_COLUMN . \" = ? AND booked_itinerary = ?\";\n if ($statement = $this->connection->prepare($query)) {\n $statement->bind_param($this::ID_COLUMN_TYPE . \"s\", $this->id, $this->itinerary);\n if ($statement->execute()) {\n $to_return = self::get_true();\n\n // Send notification to the cicerone\n $firebase = new Firebase();\n $push = new Push();\n\n $itinerary = $this->get_from_connector(new RequestItinerary(null, null, null, null, $this->itinerary))[0];\n\n if ($this->deleted_by_cicerone) {\n $title = \"Reservation request refused\";\n $message = \"Your reservation request to the itinerary \\\"\" . $itinerary[\"title\"] . \"\\\" by \\\"\" . $itinerary[\"username\"][\"username\"] . \"\\\" has been refused.\";\n $payload = Push::create_payload(Push::TO_GLOBETROTTER_REFUSED_RESERVATION, array($itinerary[\"title\"], $itinerary[\"username\"][\"username\"]));\n $topic = 'globetrotter-' . $this->id;\n } else {\n $title = \"Reservation deleted\";\n $message = \"A reservation to the itinerary \\\"\" . $itinerary[\"title\"] . \"\\\" by \\\"\" . $this->id . \"\\\" has been deleted!\";\n $payload = Push::create_payload(Push::TO_CICERONE_REMOVED_RESERVATION, array($itinerary[\"title\"], $this->id));\n $topic = 'cicerone-' . $itinerary[\"username\"][\"username\"];\n }\n \n $push->set_title($title)\n ->set_message($message)\n ->set_payload($payload);\n\n $firebase->send_to_topic($topic, $push);\n } else {\n $to_return = self::get_false($statement->error);\n }\n } else {\n $to_return = self::get_false($this->connection->error);\n }\n\n return json_encode($to_return);\n }", "public function generate()\n{\n$user_code=\"{% extends 'resource.twig.c' %}\\n\".$this->user_code;\n\n$buf=$this->gen->renderer->render_string($this->filename,$user_code\n\t,array('resource' =>$this, 'global' => $this->gen));\n$this->gen->file_write($this->dest_filename,$buf);\n}", "public function printlabel2($item_id)\n {\n $condition = array(\n 'where' => array(\n 'id' => $item_id\n )\n );\n\n $data = $this->QR_Outbound_model->getRows($condition);\n $data['stockitem'] = $this->QR_Outbound_model->getRows($condition);\n\n $this->load->library('ciqrcode'); // memanggil library qr code\n\n $config['cacheable'] = true; //boolean, the default is true\n $config['cachedir'] = './assets/'; //string, the default is application/cache/\n $config['errorlog'] = './assets/'; //string, the default is application/logs/\n $config['imagedir'] = './assets/img/qr/'; //direktori penyimpanan qr code\n $config['quality'] = true; //boolean, the default is true\n $config['size'] = '1024'; //interger, the default is 1024\n $config['black'] = array(224, 255, 255); // array, default is array(255,255,255)\n $config['white'] = array(70, 130, 180); // array, default is array(0,0,0)\n\n $this->ciqrcode->initialize($config);\n\n $image_name = $item_id . '.png'; //set image name based on $item_id\n\n //data yang akan di jadikan QR CODE\n $params['data'] = 'Item # : ' . $data[0]['item_number'] . \"\\r\\n\" .\n 'desc. : ' . $data[0]['stock_item_description'] . \"\\r\\n\" .\n 'spec : ' . $data[0]['stock_item_spec'] . \"\\r\\n\" .\n 'model # : ' . $data[0]['oem_model_#'] . \"\\r\\n\" .\n 'part # : ' . $data[0]['oem_part_#'] . \"\\r\\n\" .\n 'subinventory : ' . $data[0]['subinventory'] . \"\\r\\n\" .\n 'locator : ' . $data[0]['locator'] . \"\\r\\n\" .\n 'receipt # : ' . $data[0]['receipt_number'] . \"\\r\\n\" .\n 'lot # : ' . $data[0]['lot_number'] . \"\\r\\n\" .\n 'receipt date : ' . $data[0]['receipt_date'] . \"\\r\\n\" .\n 'PO # : ' . $data[0]['po_number'];\n\n $params['level'] = 'H'; //H=High\n $params['size'] = 10;\n $params['savename'] = FCPATH . $config['imagedir'] . $image_name; //simpan image QR CODE ke folder assets/img/qr/\n $this->ciqrcode->generate($params); // fungsi untuk generate QR CODE\n\n $this->load->library('pdf'); // memanggil library dompdf\n\n $customPaper = [0, 0, 198, 283];\n $this->pdf->setPaper($customPaper);\n $this->pdf->set_option('isRemoteEnabled', true);\n\n $this->pdf->load_view('templates/label', $data);\n $this->pdf->render();\n\n $this->pdf->stream('LabeltoPrint.pdf', array('Attachment' => 0));\n }", "function getEncodedMessage(): string {\n return \\chr(static::COMMAND_ID).$this->rewrittenQuery;\n }", "function bikin_barcode1($kode)\n\t{\n\t\t$this->zend->load('Zend/Barcode');\t\t\t\n\t\t//generate barcodenya\t\t\n\t\t$option = array('text'=>$kode,\n\t\t\t\t'barHeight'=>20,\n\t\t\t\t'factor'=>2.35,\n\t\t\t\t'fontSize'=>8,\n\t\t\t\t'withQuietZones' => true,\n\t\t\t\t'drawText'=>false,//show code\n\t\t\t\t'stretchText'=>false//memisahkan kode perbaris\n\t\t\t\t\n\t\n\t\t);\n\t\tZend_Barcode::render('code128', 'image', $option, array());\n\t}", "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }", "function bikin_barcode2($kode)\n\t{\n\t\t$this->zend->load('Zend/Barcode');\t\t\t\n\t\t//generate barcodenya\t\t\n\t\t$option = array('text'=>$kode,\n\t\t\t\t'barHeight'=>17,\n\t\t\t\t'factor'=>1.50,\n\t\t\t\t'fontSize'=>7,\n\t\t\t\t'withQuietZones' => true,\n\t\t\t\t'drawText'=>false,//show code\n\t\t\t\t'stretchText'=>false//memisahkan kode perbaris\t\n\t\n\t\t);\n\t\tZend_Barcode::render('code128', 'image', $option, array());\n\t}", "public function output()\n {\n $this->setFNAppropriately();\n\n\t$text = 'BEGIN:VCARD'. self::endl;\n\t$text .= 'VERSION:'.self::VERSION . self::endl;\n \n $text .= $this->getUIDAsProperty()->output();\n\n // FIXME: Remove the newlines in Property::__toString and add them here.\n\tforeach ($this->data as $key=>$values)\n\t{\n\t if (!\\is_array($values))\n \t {\n\t\t$text .= $values->output();\n\t\tcontinue;\n\t }\n \n\t foreach ($values as $value)\n\t {\n\t\t$text .= $value->output();\n }\n }\n\n\t$text .= 'END:VCARD'.self::endl;\n\treturn self::foldOutput($text);\n }", "function Barcode39 ($barcode, $width, $height, $quality, $format, $text)\n{\n switch ($format)\n {\n default:\n $format = \"JPEG\";\n case \"JPEG\": \n header (\"Content-type: image/jpeg\");\n break;\n case \"PNG\":\n header (\"Content-type: image/png\");\n break;\n case \"GIF\":\n header (\"Content-type: image/gif\");\n break;\n }\n\n\n $im = ImageCreate ($width, $height)\n or die (\"Cannot Initialize new GD image stream\");\n $White = ImageColorAllocate ($im, 255, 255, 255);\n $Black = ImageColorAllocate ($im, 0, 0, 0);\n //ImageColorTransparent ($im, $White);\n ImageInterLace ($im, 1);\n\n\n\n $NarrowRatio = 20;\n $WideRatio = 55;\n $QuietRatio = 35;\n\n\n $nChars = (strlen($barcode)+2) * ((6 * $NarrowRatio) + (3 * $WideRatio) + ($QuietRatio));\n $Pixels = $width / $nChars;\n $NarrowBar = (int)(20 * $Pixels);\n $WideBar = (int)(55 * $Pixels);\n $QuietBar = (int)(35 * $Pixels);\n\n\n $ActualWidth = (($NarrowBar * 6) + ($WideBar*3) + $QuietBar) * (strlen ($barcode)+2);\n \n if (($NarrowBar == 0) || ($NarrowBar == $WideBar) || ($NarrowBar == $QuietBar) || ($WideBar == 0) || ($WideBar == $QuietBar) || ($QuietBar == 0))\n {\n ImageString ($im, 1, 0, 0, \"Image is too small!\", $Black);\n OutputImage ($im, $format, $quality);\n exit;\n }\n \n $CurrentBarX = (int)(($width - $ActualWidth) / 2);\n $Color = $White;\n $BarcodeFull = \"*\".strtoupper ($barcode).\"*\";\n settype ($BarcodeFull, \"string\");\n \n $FontNum = 3;\n $FontHeight = ImageFontHeight ($FontNum);\n $FontWidth = ImageFontWidth ($FontNum);\n if ($text != 0)\n {\n $CenterLoc = (int)(($width-1) / 2) - (int)(($FontWidth * strlen($BarcodeFull)) / 2);\n ImageString ($im, $FontNum, $CenterLoc, $height-$FontHeight, \"$BarcodeFull\", $Black);\n }\n\t\telse\n\t\t{\n\t\t\t$FontHeight=-2;\n\t\t}\n\n\n for ($i=0; $i<strlen($BarcodeFull); $i++)\n {\n $StripeCode = Code39 ($BarcodeFull[$i]);\n\n\n for ($n=0; $n < 9; $n++)\n {\n if ($Color == $White) $Color = $Black;\n else $Color = $White;\n\n\n switch ($StripeCode[$n])\n {\n case '0':\n ImageFilledRectangle ($im, $CurrentBarX, 0, $CurrentBarX+$NarrowBar, $height-1-$FontHeight-2, $Color);\n $CurrentBarX += $NarrowBar;\n break;\n\n\n case '1':\n ImageFilledRectangle ($im, $CurrentBarX, 0, $CurrentBarX+$WideBar, $height-1-$FontHeight-2, $Color);\n $CurrentBarX += $WideBar;\n break;\n }\n }\n\n\n $Color = $White;\n ImageFilledRectangle ($im, $CurrentBarX, 0, $CurrentBarX+$QuietBar, $height-1-$FontHeight-2, $Color);\n $CurrentBarX += $QuietBar;\n }\n\n\n OutputImage ($im, $format, $quality);\n}", "public static function generate_barcode($codabar) {\n $barcode = new Codabar();\n $barcode->setData($codabar);\n $barcode->setDimensions(600, 100);\n $barcode->draw();\n\n $filename = 'assets/librarian/barcodes/' . $codabar . '.jpg';\n $barcode->save(Director::baseFolder() . '/' . $filename);\n\n $folder = Folder::find_or_make('/librarian/barcodes/');\n\n $image = new Image();\n $image->Filename = $filename;\n $image->Title = $codabar;\n\n // TODO This should be auto-detected\n $image->ParentID = $folder->ID;\n $image->write();\n\n return $image->ID;\n }", "function generarOC(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_GENOC_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n $this->setParametro('fecha_oc','fecha_oc','date');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "protected function buildContents() : string {\n\n\t\t\t$insertions = [];\n\n\t\t\t# Process blocks\n\n\t\t\tforeach ($this->blocks as $name => $block) {\n\n\t\t\t\t$insertions['{ block:' . $name . ' / }'] = $block->getContents();\n\t\t\t}\n\n\t\t\t# Process loops\n\n\t\t\tforeach ($this->loops as $name => $loop) {\n\n\t\t\t\t$insertions['{ for:' . $name . ' / }'] = $loop->getContents();\n\t\t\t}\n\n\t\t\t# Process widgets\n\n\t\t\tforeach ($this->widgets as $name) {\n\n\t\t\t\t$widget = Template::getWidget($name);\n\n\t\t\t\t$contents = ((false !== $widget) ? $widget->getContents() : '');\n\n\t\t\t\t$insertions['{ widget:' . $name . ' / }'] = $contents;\n\t\t\t}\n\n\t\t\t# Process variables\n\n\t\t\tforeach ($this->variables as $name => $value) {\n\n\t\t\t\t$value = ((false === $value) ? Template::getGlobal($name) : $value);\n\n\t\t\t\t$insertions['$' . $name . '$'] = Str::formatOutput($value);\n\t\t\t}\n\n\t\t\t# Process phrases\n\n\t\t\tforeach ($this->phrases as $name => $value) {\n\n\t\t\t\t$value = Language::get($name);\n\n\t\t\t\t$insertions['%' . $name . '%'] = Str::formatOutput($value);\n\t\t\t}\n\n\t\t\t# Process insertions\n\n\t\t\t$contents = str_replace(array_keys($insertions), array_values($insertions), $this->contents);\n\n\t\t\t# ------------------------\n\n\t\t\treturn $contents;\n\t\t}", "function FixedLengthEncode(){\n\t\t$startTime \t\t= microtime(true);\t\t\t\t\t\t\t//Untuk mencatat waktu mulai kompresi\n\t\t$freq \t\t\t= $this->getTextFrequency();\t\t\t\t//mengambil frequensi dari text yang sudah ada\n\t\t$freqSorted \t= $this->sortByFrequency($freq, false);\t\t//mengurutkan frequensi\n\t\t\n\t\t$this->saveDictionary($freqSorted, false);\t\t\t\t\t\t\t//menyimpan frequensi yang sudah diurutkan sebagai kamus bahasa\n\t\t\n\t\t$fixedLengthEncodeCode \t= $this->generateFixedLengthEncodeCode(sizeof($freqSorted));\t//mengenerate fixedLengthEncodeCode code sebanyak jumlah karakter\n\n\t\t$bit \t\t\t= $this->generateBit($freqSorted, $fixedLengthEncodeCode);\t//mengenerate bit dari fixedLengthEncodeCode dengan frekuensi yang udah diurutkan\n\t\t\n\t\t$this->finalBit\t= $this->generateFlag($bit);\t\t\t\t//membuat bit final dari bit hasil fixedLengthEncodeCode dengan ditambah flag bit\n\t\t\n\t\t$this->saveCompressToFile(false);\t\t\t\t\t\t\t\t//menyimpan hasil kompresi\n\n\t\t$this->timeProccess\t= microtime(true)-$startTime;\t\t\t//menyimpan lama waktu untuk proses dalam detik\n\t\t$this->bitRate = strlen($this->finalBit) / sizeof($freqSorted);\t\t//menghitung bitrate\n\t\t$finalFinalBit \t= $this->generateFlag($bit);\n\t\techo $finalFinalBit;\n\t\t\n\t}", "public function insert () {\n\t\t$insertObj = ORM::for_table(self::AUTHCODE_TABLE)->create();\n\t\t$insertObj->code_hash = $this->hash;\n\t\t$insertObj->save();\n\t\treturn $insertObj->id();\n\t\t//$hsh = sqlPrep($this->hash);\n\t\t//$insstmt = \"INSERT INTO AUTHCODES (CODE_HASH) VALUES ($hsh)\";\n\t}", "function encodage($source,$options){\n\tinclude_spip('plugins/installer');\n\t$ret = array();\n\tspip_log('On encode le document : '.$source['id_document'],'spipmotion');\n\t/**\n\t * Si le chemin vers le binaire FFMpeg n'existe pas,\n\t * la configuration du plugin crée une meta spipmotion_casse\n\t */\n\tif($GLOBALS['meta']['spipmotion_casse'] == 'oui'){\n\t\t$ret['success'] = false;\n\t\t$ret['erreur'] = 'spipmotion_casse';\n\t\treturn false;\n\t}\n\n\tinclude_spip('inc/config');\n\t$spipmotion_compiler = @unserialize($GLOBALS['spipmotion_metas']['spipmotion_compiler']);\n\t$ffmpeg_version = $spipmotion_compiler['ffmpeg_version'] ? $spipmotion_compiler['ffmpeg_version'] : '0.7';\n\t$rep_dest = sous_repertoire(_DIR_VAR, 'cache-spipmotion');\n\n\t$extension_attente = $options['format'];\n\n\t$encodeur = lire_config(\"spipmotion/encodeur_$extension_attente\",'');\n\n\t$ffmpeg2theora = @unserialize($GLOBALS['spipmotion_metas']['spipmotion_ffmpeg2theora']);\n\n\tif(\n\t\t($source['rotation'] == '90')\n\t\t OR ($encodeur == 'ffmpeg2theora' && !$ffmpeg2theora['version'])){\n\t\t$encodeur = 'ffmpeg';\n\t}\n\n\tinclude_spip('inc/documents');\n\t$chemin = get_spip_doc($source['fichier']);\n\t$fichier = basename($source['fichier']);\n\tspip_log(\"encodage de $chemin\",\"spipmotion\");\n\n\t/**\n\t * Génération des noms temporaires et finaux\n\t * - Le nom du dossier temporaire (tmp/spipmotion)\n\t * - Le nom du fichier final (nom_du_fichier-encoded.ext)\n\t * - Le nom du fichier temporaire durant l'encodage\n\t * - Le nom du fichier de log généré pour chaque fichier\n\t */\n\t$query = \"$fichier-$extension_attente-\".date('Y_m_d_H-i-s');\n\t$dossier = sous_repertoire(_DIR_VAR, 'cache-spipmotion');\n\t$fichier_final = substr($fichier,0,-(strlen($source['extension'])+1)).'-encoded.'.$extension_attente;\n\t$fichier_temp = \"$dossier$query.$extension_attente\";\n\t$fichier_log = \"$dossier$query.log\";\n\n\t/**\n\t * Si on n'a pas l'info hasaudio c'est que la récupération d'infos n'a pas eu lieu\n\t * On relance la récupération d'infos sur le document\n\t * On refais une requête pour récupérer les nouvelles infos\n\t */\n\tif(!$source['hasaudio'] OR !$source['hasvideo']){\n\t\t$recuperer_infos = charger_fonction('spipmotion_recuperer_infos','inc');\n\t\t$recuperer_infos($source['id_document']);\n\t\t$source = sql_fetsel('*','spip_documents','id_document ='.intval($source['id_document']));\n\t\tif(!$source['hasaudio'] OR !$source['hasvideo']){\n\t\t\tspip_log('La source n a ni audio ni video','spipmotion');\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * $texte est le contenu du fichier de preset que l'on passe à la commande\n\t * Certaines valeurs ne fonctionnent pas (et doivent être passées à la commande directement)\n\t * comme:\n\t * s = la taille\n\t * r = le nombre de frames par secondes\n\t * ac = le nombre de channels audio (ne provoquent pas d'erreurs mais ne passent pas)\n\t * \n\t * $infos_sup_normal correspond aux paramètres supplémentaires envoyés à la commande, \n\t * spécifique en fonction de plusieurs choses :\n\t * - rotation;\n\t */\n\t$texte = $infos_sup_normal = '';\n\n\t/**\n\t * Quelques définitions communes aux videos et sons\n\t * Vérifications de certaines options afin qu'elles ne cassent pas les encodages\n\t */\n\n\t/**\n\t * Correction des paramètres audio\n\t * Uniquement s'il y a une piste audio\n\t * -* codec à utiliser\n\t * -* bitrate\n\t * -* samplerate\n\t * -* nombre de canaux\n\t */\n\tif($source['hasaudio'] == 'oui'){\n\t\t$codec_audio = lire_config(\"spipmotion/acodec_$extension_attente\");\n\t\tif($extension_attente == \"mp3\")\n\t\t\t$codec_audio = \"libmp3lame\";\n\t\telse if(in_array($extension_attente,array('ogg','oga')))\n\t\t\t$codec_audio = \"libvorbis\";\n\t\telse if(!$codec_audio){\n\t\t\tif($extension_attente == 'ogv')\n\t\t\t\t$codec_audio = \"libvorbis\";\n\t\t}\n\t\t$acodec = $codec_audio ? \"--acodec \".$codec_audio :'';\n\n\t\t/**\n\t\t * Forcer libvorbis si on utilise ffmpeg\n\t\t */\n\t\tif(($encodeur == \"ffmpeg\") && ($acodec == \"--acodec vorbis\"))\n\t\t\t$acodec = '--acodec libvorbis';\n\n\t\tif(in_array($codec_audio,array('vorbis','libvorbis'))){\n\t\t\t$qualite = lire_config(\"spipmotion/qualite_audio_$extension_attente\",'4');\n\t\t\t$audiobitrate_ffmpeg2theora = $audiobitrate_ffmpeg = \"--audioquality $qualite\";\n\t\t}else{\n\t\t\t/**\n\t\t\t * S'assurer que le bitrate choisi fonctionne\n\t\t\t */\n\t\t\tif(intval($source['audiobitrate']) && (intval($source['audiobitrate']) < (lire_config(\"spipmotion/bitrate_audio_$extension_attente\",\"64\")*1000))){\n\t\t\t\t$audiobitrates = array('32000','64000','96000','128000','192000','256000');\n\t\t\t\tif(!in_array($source['audiobitrate'],$audiobitrates)){\n\t\t\t\t\t$abitrate = min($audiobitrates);\n\t\t\t\t\tforeach($audiobitrates as $bitrate){\n\t\t\t\t\t\tif($source['audiobitrate'] >= $bitrate){\n\t\t\t\t\t\t\t$abitrate = $bitrate;\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}else\n\t\t\t\t\t$abitrate = $source['audiobitrate'];\n\n\t\t\t\t$abitrate = floor($abitrate/1000);\n\t\t\t}else\n\t\t\t\t$abitrate = lire_config(\"spipmotion/bitrate_audio_$extension_attente\",\"64\");\n\t\t\t$texte .= \"ab=\".$abitrate.\"000\\n\";\n\t\t\t$audiobitrate_ffmpeg = $audiobitrate_ffmpeg2theora = \"--audiobitrate \".$abitrate;\n\t\t}\n\n\t\t/**\n\t\t * Vérification des samplerates\n\t\t */\n\t\tif(intval($source['audiosamplerate']) && (intval($source['audiosamplerate']) < lire_config(\"spipmotion/frequence_audio_$extension_attente\",\"22050\"))){\n\t\t\t/**\n\t\t\t * libmp3lame ne gère pas tous les samplerates\n\t\t\t * ni libfaac\n\t\t\t */\n\t\t\tif($acodec == '--acodec libmp3lame')\n\t\t\t\t$audiosamplerates = array('11025','22050','44100');\n\t\t\telse if($acodec == '--acodec libfaac')\n\t\t\t\t$audiosamplerates = array('22050','24000','32000','44100','48000');\n\t\t\telse\n\t\t\t\t$audiosamplerates = array('4000','8000','11025','16000','22050','24000','32000','44100','48000');\n\t\t\t/**\n\t\t\t * ffmpeg ne peut resampler\n\t\t\t * On force le codec audio à aac s'il était à libmp3lame et que le nombre de canaux était > 2\n\t\t\t */\n\t\t\tif(($source['audiochannels'] > 2) && ($encodeur != 'ffmpeg2theora')){\n\t\t\t\t$samplerate = $source['audiosamplerate'];\n\t\t\t\tif($acodec == '--acodec libmp3lame'){\n\t\t\t\t\t$acodec = '--acodec libfaac';\n\t\t\t\t\t$audiobitrate_ffmpeg = $audiobitrate_ffmpeg2theora = \"--audiobitrate 128\";\n\t\t\t\t}\n\t\t\t}else if(!in_array($source['audiosamplerate'],$audiosamplerates)){\n\t\t\t\t$samplerate = min($audiosamplerates);\n\t\t\t\tforeach($audiosamplerates as $audiosamplerate){\n\t\t\t\t\tif($source['audiosamplerate'] >= $audiosamplerate){\n\t\t\t\t\t\t$samplerate = $audiosamplerate;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else\n\t\t\t\t$samplerate = $source['audiosamplerate'];\n\t\t}else{\n\t\t\tif(($source['audiochannels'] > 2) && ($encodeur != 'ffmpeg2theora')){\n\t\t\t\t$samplerate = $source['audiosamplerate'];\n\t\t\t\tif($acodec == '--acodec libmp3lame'){\n\t\t\t\t\t$acodec = '--acodec libfaac';\n\t\t\t\t\t$audiobitrate_ffmpeg = $audiobitrate_ffmpeg2theora = \"--audiobitrate 128\";\n\t\t\t\t}\n\t\t\t}else\n\t\t\t\t$samplerate = lire_config(\"spipmotion/frequence_audio_$extension_attente\",\"22050\");\n\t\t}\n\t\tif($samplerate){\n\t\t\t$audiofreq = \"--audiofreq \".$samplerate;\n\t\t\t$texte .= \"ar=$samplerate\\n\";\n\t\t}\n\t\t/**\n\t\t * On passe en stereo ce qui a plus de 2 canaux et ce qui a un canal et dont\n\t\t * le format choisi est vorbis (l'encodeur vorbis de ffmpeg ne gère pas le mono)\n\t\t */\n\t\tif(in_array($extension_attente,array('ogg','ogv','oga')) && ($source['audiochannels'] < 2)\n\t\t\t&& ($encodeur != 'ffmpeg2theora')){\n\t\t\t$audiochannels = 2;\n\t\t}else\n\t\t\t$audiochannels = $source['audiochannels'];\n\n\t\tif(intval($audiochannels) >= 1){\n\t\t\t/**\n\t\t\t * Apparemment le mp3 n'aime pas trop le 5.1 channels des AC3 donc on downgrade en 2 channels en attendant\n\t\t\t */\n\t\t\tif($extension_attente == 'mp3'){\n\t\t\t\t$texte .= \"ac=2\\n\";\n\t\t\t\t$audiochannels_ffmpeg = \"--ac 2\";\n\t\t\t}else{\n\t\t\t\t$texte .= \"ac=$audiochannels\\n\";\n\t\t\t\t$audiochannels_ffmpeg = \"--ac $audiochannels\";\n\t\t\t}\n\t\t}\n\t\t$ss_audio = '';\n\t}else\n\t\t$ss_audio = '-an';\n\n\tif($GLOBALS['spipmotion_metas']['spipmotion_safe_mode'] == 'oui')\n\t\t$spipmotion_sh = $GLOBALS['spipmotion_metas']['spipmotion_safe_mode_exec_dir'].'/spipmotion.sh'; \n\telse\n\t\t$spipmotion_sh = find_in_path('script_bash/spipmotion.sh');\n\n\t/**\n\t * Encodage\n\t * Cas d'un fichier audio\n\t */\n\tif(in_array($source['extension'],lire_config('spipmotion/fichiers_audios_encodage',array()))){\n\t\t/**\n\t\t * Encodage du son\n\t\t */\n\t\t$encodage = $spipmotion_sh.' --e '.$chemin.' --s '.$fichier_temp.' '.$acodec.' '.$audiobitrate_ffmpeg.' '.$audiofreq.' '.$audiochannels_ffmpeg.' --log '.$fichier_log;\n\t\tspip_log(\"$encodage\",'spipmotion');\n\t\t$lancement_encodage = exec($encodage,$retour,$retour_int);\n\t\tif($retour_int == 0){\n\t\t\t$ret['success'] = true;\n\t\t}else if($retour_int >= 126){\n\t\t\t$ret['success'] = false;\n\t\t\t$ret['erreur'] = _T('spipmotion:erreur_script_spipmotion_non_executable');\n\t\t\tecrire_fichier($fichier_log,$ret['erreur']);\n\t\t}\n\t}\n\n\t/**\n\t * Encodage\n\t * Cas d'un fichier vidéo\n\t *\n\t * On corrige les paramètres video avant de lancer l'encodage\n\t */\n\tif(in_array($source['extension'],lire_config('spipmotion/fichiers_videos_encodage',array()))){\n\t\t$format = lire_config(\"spipmotion/format_$extension_attente\");\n\t\tif($source['rotation'] == '90'){\n\t\t\t$width = $source['hauteur'];\n\t\t\t$height = $source['largeur'];\n\t\t}else{\n\t\t\t$width = $source['largeur'];\n\t\t\t$height = $source['hauteur'];\n\t\t}\n\t\t$width_finale = lire_config(\"spipmotion/width_$extension_attente\",480);\n\n\t\t/**\n\t\t * Les ipod/iphones 3Gs et inférieur ne supportent pas de résolutions > à 640x480\n\t\t */\n\t\tif($format == 'ipod' && ($width_finale > 640))\n\t\t\t$width_finale = 640;\n\n\t\t/**\n\t\t * On n'agrandit jamais la taille\n\t\t * si la taille demandée est supérieure à la taille originale\n\t\t */\n\t\tif($width < $width_finale){\n\t\t\t$width_finale = $width;\n\t\t\t$height_finale = $height;\n\t\t}\n\t\t/**\n\t\t * Calcul de la hauteur en fonction de la largeur souhaitée\n\t\t * et de la taille de la video originale\n\t\t */\n\t\telse\n\t\t\t$height_finale = intval(round($height/($width/$width_finale)));\n\n\t\t/**\n\t\t * Pour certains codecs (libx264 notemment), width et height doivent être\n\t\t * divisibles par 2\n\t\t * On le fait pour tous les cas pour éviter toute erreur\n\t\t */\n\t\tif(!is_int($width_finale/2))\n\t\t\t$width_finale = $width_finale +1;\n\t\tif(!is_int($height_finale/2))\n\t\t\t$height_finale = $height_finale +1;\n\n\t\t$video_size = \"--size \".$width_finale.\"x\".$height_finale;\n\n\t\t/**\n\t\t * Définition du framerate d'encodage\n\t\t * - Si le framerate de la source est supérieur à celui de la configuration souhaité, on prend celui de la configuration\n\t\t * - Sinon on garde le même que la source\n\t\t */\n\t\t$texte .= lire_config(\"spipmotion/vcodec_$extension_attente\") ? \"vcodec=\".lire_config(\"spipmotion/vcodec_$extension_attente\").\"\\n\":'';\n\t\t$vcodec .= lire_config(\"spipmotion/vcodec_$extension_attente\") ? \"--vcodec \".lire_config(\"spipmotion/vcodec_$extension_attente\") :'';\n\n\t\t$fps_conf = (intval(lire_config(\"spipmotion/fps_$extension_attente\",\"30\")) > 0) ? lire_config(\"spipmotion/fps_$extension_attente\",\"30\") : ((intval($source['framerate']) > 0) ? intval($source['framerate']) : 24);\n\t\tif(intval($source['framerate']) && (intval($source['framerate']) < $fps_conf))\n\t\t\t$fps_num = $source['framerate'];\n\t\telse\n\t\t\t$fps_num = (intval($fps_conf) > 0) ? $fps_conf : $source['framerate'];\n\n\t\t$fps = \"--fps $fps_num\";\n\n\t\t/**\n\t\t * Définition des bitrates\n\t\t * On vérifie ceux de la source et on compare à ceux souhaités dans la conf\n\t\t * Si la source est inférieure, on utilise ceux de la source en utilisant l'option -qscale 0\n\t\t * ffmpeg2theora lui a besoin d'une estimation de bitrate\n\t\t */\n\t\tif(intval($source['videobitrate']) && (intval($source['videobitrate']) < (lire_config(\"spipmotion/bitrate_$extension_attente\",\"600\"))*1000)){\n\t\t\tif(($encodeur == 'ffmpeg2theora') OR ($vcodec == '--vcodec libtheora'))\n\t\t\t\t$vbitrate = $source['videobitrate'];\n\t\t\telse{\n\t\t\t\t$vbitrate = null;\n\t\t\t\tif(spip_version_compare($ffmpeg_version,'1.0.0','<'))\n\t\t\t\t\t$infos_sup_normal .= ' -sameq ';\n\t\t\t\telse\n\t\t\t\t\t$infos_sup_normal .= ' -q:v 0 ';\n\t\t\t}\n\t\t\t$bitrate = \"--bitrate \".$source['videobitrate'];\n\t\t}else{\n\t\t\t$vbitrate = lire_config(\"spipmotion/bitrate_$extension_attente\",\"600\");\n\t\t\t$bitrate = \"--bitrate $vbitrate\";\n\t\t}\n\n\t\t$texte .= intval($vbitrate) ? \"vb=\".$vbitrate.\"000\\n\" : '';\n\t\t$bitrate = intval($vbitrate) ? \"--bitrate \".$vbitrate : '';\n\n\t\t$configuration = array();\n\t\tif(is_array($spipmotion_compiler['configuration']))\n\t\t\t$configuration = $spipmotion_compiler['configuration'];\n\n\t\t/**\n\t\t * Paramètres supplémentaires pour encoder en h264\n\t\t */\n\t\tif($vcodec == '--vcodec libx264'){\n\t\t\t$preset_quality = lire_config(\"spipmotion/vpreset_$extension_attente\",'slow');\n\t\t\tif(in_array('--enable-pthreads',$configuration))\n\t\t\t\t$infos_sup_normal .= \" -threads 0 \";\n\n\t\t\t/**\n\t\t\t * Encodage pour Ipod/Iphone (<= 3G)\n\t\t\t */\n\t\t\tif($format == 'ipod'){\n\t\t\t\tif(spip_version_compare($ffmpeg_version,'0.7.20','<'))\n\t\t\t\t\t$infos_sup_normal .= ' -vpre baseline -vpre ipod640 -bf 0';\n\t\t\t\telse\n\t\t\t\t\t$infos_sup_normal .= ' -profile:v baseline -vpre ipod640 -bf 0';\t\n\t\t\t}\n\t\t\t/**\n\t\t\t * Encodage pour PSP\n\t\t\t * http://rob.opendot.cl/index.php/useful-stuff/psp-video-guide/\n\t\t\t */\n\t\t\telse if($format == 'psp')\n\t\t\t\t$infos_sup_normal .= ' -vpre main -level 21 -refs 2';\n\t\t}\n\t\tif(($vcodec == \"--vcodec libtheora\") && ($encodeur != 'ffmpeg2theora')){\n\t\t\tif(in_array('--enable-pthreads',$configuration))\n\t\t\t\t$infos_sup_normal .= \" -threads 0 \";\n\t\t}\n\n\t\tif($source['rotation'] != 90){\n\t\t\t$aspect = $source['aspect_ratio'] ? $source['aspect_ratio']: \"$width_finale:$height_finale\";\n\t\t\t$infos_sup_normal .= \" -aspect $aspect\";\n\t\t}\n\n\t\t$fichier_texte = \"$dossier$query.txt\";\n\n\t\tecrire_fichier($fichier_texte,$texte);\n\n\t\t/**\n\t\t * Encodage de la video\n\t\t * Si l'encodeur choisi est ffmpeg2theora et qu'il existe toujours, on l'utilise\n\t\t * sinon on utilise notre script pour ffmpeg\n\t\t */\n\t\t$passes = lire_config(\"spipmotion/passes_$extension_attente\",'1');\n\t\t$pass_log_file = $dossier.$query.'-pass';\n\n\t\tif(($encodeur == 'ffmpeg2theora') && ($ffmpeg2theora['version'] > 0)){\n\t\t\tif($passes == 2) $deux_passes = '--two-pass';\n\t\t\t$encodage = $spipmotion_sh.\" --force true $video_size --e $chemin --videoquality \".lire_config('spipmotion/qualite_video_ffmpeg2theora_'.$extension_attente,7).\" $fps $bitrate $audiofreq $audiobitrate_ffmpeg2theora $audiochannels_ffmpeg2theora --s $fichier_temp $deux_passes --log $fichier_log --encodeur ffmpeg2theora\";\n\t\t\tspip_log($encodage,'spipmotion');\n\t\t\t$lancement_encodage = exec($encodage,$retour,$retour_int);\n\t\t}else{\n\t\t\tif(($passes == \"2\") && ((($vcodec == '--vcodec libx264') && ($preset_quality != 'hq')) OR ($vcodec == '--vcodec flv') OR ($vcodec == '--vcodec libtheora') OR ($extension_attente == 'webm'))){\n\t\t\t\tspip_log('Premiere passe','spipmotion');\n\t\t\t\tif (spip_version_compare($ffmpeg_version,'1.0.0','<')){\n\t\t\t\t\t$preset_1 = $preset_quality ? ' -vpre '.$preset_quality.'_firstpass' : '';\n\t\t\t\t}else\n\t\t\t\t\t$preset_1 = $preset_quality ? ' -preset '.$preset_quality : '';\n\n\t\t\t\tif($source['rotation'] == '90'){\n\t\t\t\t\t$metadatas = '';\n\t\t\t\t\tif (spip_version_compare($ffmpeg_version,'1.0.0','<')){\n\t\t\t\t\t\t$rotation = \"-vf transpose=1\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$metadatas = \"-metadata:s:v:0 rotate=0\";\n\t\t\t\t\t\t$rotation = \"-filter:v transpose=1\";\n\t\t\t\t\t}\n\t\t\t\t\t$infos_sup_normal .= \"$rotation $metadatas\";\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Même si dans tous les tutos il est spécifié de mettre -an pour ne pas utiliser l'audio dans la première passe\n\t\t\t\t * Il s'avère que dans certains cas (source désynchronisée), l'encodage plante\n\t\t\t\t * Du coup on utilise exactement les mêmes réglages dans les 2 passes\n\t\t\t\t */\n\t\t\t\t$infos_sup_normal_1 = \"--params_supp \\\"$preset_1 -passlogfile $pass_log_file $infos_sup_normal\\\"\";\n\t\t\t\t$encodage_1 = $spipmotion_sh.\" --force true --pass 1 $audiofreq $audiobitrate_ffmpeg $audiochannels_ffmpeg $video_size --e $chemin $vcodec $fps $bitrate $infos_sup_normal_1 --s $fichier_temp --log $fichier_log\";\n\t\t\t\tspip_log($encodage_1,'spipmotion');\n\t\t\t\t$lancement_encodage_1 = exec($encodage_1,$retour_1,$retour_int_1);\n\t\t\t\t/**\n\t\t\t\t * La première passe est ok \n\t\t\t\t * On lance la seconde\n\t\t\t\t */\n\t\t\t\tif($retour_int_1 == 0){\n\t\t\t\t\tspip_log('Seconde passe','spipmotion');\n\n\t\t\t\t\tif (spip_version_compare($ffmpeg_version,'0.7.20','<'))\n\t\t\t\t\t\t$preset_2 = $preset_quality ? \" -vpre $preset_quality\":'';\n\t\t\t\t\telse\n\t\t\t\t\t\t$preset_2 = $preset_quality ? \" -preset $preset_quality\":'';\n\n\t\t\t\t\t$infos_sup_normal_2 = \"--params_supp \\\"-passlogfile $pass_log_file $ss_audio $preset_2 $infos_sup_normal $metadatas\\\"\";\n\t\t\t\t\t$encodage = $spipmotion_sh.\" --force true --pass 2 $audiofreq $audiobitrate_ffmpeg $audiochannels_ffmpeg $video_size --e $chemin $acodec $vcodec $fps $bitrate $infos_sup_normal_2 --fpre $fichier_texte --s $fichier_temp --log $fichier_log\";\n\t\t\t\t\tspip_log($encodage,'spipmotion');\n\t\t\t\t\t$lancement_encodage = exec($encodage,$retour,$retour_int);\n\t\t\t\t}else{\n\t\t\t\t\tspip_log('SPIPMOTION Erreur : Le retour de l encodage est revenu en erreur','spipmotion'._LOG_CRITICAL);\n\t\t\t\t\t$retour_int = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$metadatas = $metadatas_supp = \"\";\n\t\t\t\t$infos_sup_normal .= \" $ss_audio \";\n\t\t\t\tif (spip_version_compare($ffmpeg_version,'0.7.0','<'))\n\t\t\t\t\t$infos_sup_normal .= $preset_quality ? \" -vpre $preset_quality\":'';\n\t\t\t\telse\n\t\t\t\t\t$infos_sup_normal .= $preset_quality ? \" -preset $preset_quality\":'';\n\n\t\t\t\tif($source['rotation'] == '90'){\n\t\t\t\t\t$metadatas = \"\";\n\t\t\t\t\tif (spip_version_compare($ffmpeg_version,'1.0.0','<')){\n\t\t\t\t\t\t$rotation = \"-vf transpose=1\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$metadatas = \"-metadata:s:v:0 rotate=0\";\n\t\t\t\t\t\t$rotation = \"-filter:v transpose=1\";\n\t\t\t\t\t}\n\t\t\t\t\t$infos_sup_normal .= \" $rotation $metadatas\";\n\t\t\t\t}\n\n\t\t\t\tif(strlen($infos_sup_normal) > 1)\n\t\t\t\t\t$infos_sup_normal = \"--params_supp \\\"$infos_sup_normal\\\"\";\n\t\t\t\t$encodage = $spipmotion_sh.\" --force true $audiofreq $video_size --e $chemin $acodec $vcodec $fps $audiobitrate_ffmpeg $audiochannels_ffmpeg $bitrate $infos_sup_normal --s $fichier_temp --fpre $fichier_texte --log $fichier_log\";\n\t\t\t\tspip_log($encodage,'spipmotion');\n\t\t\t\t$lancement_encodage = exec($encodage,$retour,$retour_int);\n\t\t\t}\n\t\t}\n\n\t\tif($retour_int == 0){\n\t\t\t$ret['success'] = true;\n\t\t}else if($retour_int >= 126){\n\t\t\t$ret['success'] = false;\n\t\t\t$ret['erreur'] = _T('spipmotion:erreur_script_spipmotion_non_executable');\n\t\t\tecrire_fichier($fichier_log,$ret['erreur']);\n\t\t}\n\t}\n\n\tif($ret['success'] && file_exists(get_spip_doc($source['fichier']))){\n\t\tif(!sql_getfetsel('id_document','spip_documents','id_document='.intval($source['id_document']))){\n\t\t\tspip_connect_db('mysql-master','','mediaspip','zjX5uPfP','mu_filmscanece5','mysql', 'spip','');\n\t\t}\n\t\t/**\n\t\t * Ajout du nouveau document dans la base de donnée de SPIP\n\t\t * NB : la récupération des infos et du logo est faite automatiquement par\n\t\t * le pipeline post-edition appelé par l'ajout du document\n\t\t */\n\t\t$mode = 'conversion';\n\t\tspip_log('Ajout du document en base','spipmotion');\n\t\t$ajouter_documents = charger_fonction('ajouter_documents', 'action');\n\t\t$doc = array(array('tmp_name'=>$fichier_temp,'name'=>$fichier_final,'mode'=>$mode));\n\n\t\t/**\n\t\t * Tentative de récupération d'un logo du document original\n\t\t * si pas déjà de vignette\n\t\t */\n\t\tif($source['id_vignette'] > 0){\n\t\t\t$vignette = sql_fetsel('fichier,extension','spip_documents','id_document='.intval($source['id_vignette']));\n\t\t\t$fichier_vignette = get_spip_doc($vignette['fichier']);\n\t\t\t$vignette = array(array('tmp_name'=>$fichier_vignette,'name'=>$fichier_vignette));\n\t\t\t$x2 = $ajouter_documents('new', $vignette, '', 0, 'vignette');\n\t\t\t$id_vignette = reset($x2);\n\t\t\tif (is_numeric($id_vignette))\n\t\t\t \t$source['id_vignette'] = $id_vignette;\n\t\t}else\n\t\t\t$source['id_vignette'] = $id_vignette;\n\n\t\t/**\n\t\t * Champs que l'on souhaite réinjecter depuis l'original ni depuis un ancien encodage\n\t\t */\n\t\t$champs_recup = array('titre' => '','descriptif' => '');\n\t\tif(defined('_DIR_PLUGIN_PODCAST')){\n\t\t\t$champs_recup['podcast'] = 0;\n\t\t\t$champs_recup['explicit'] = 'non';\n\t\t}if(defined('_DIR_PLUGIN_LICENCES'))\n\t\t\t$champs_recup['id_licence'] = 0;\n\t\t$champs_recup['credits'] = '';\n\t\t$champs_recup['id_vignette'] = '';\n\n\t\t$modifs = array_intersect_key($source, $champs_recup);\n\t\tforeach($modifs as $champs=>$val){\n\t\t\tset_request($champs,$val);\n\t\t}\n\n\t\t$x = $ajouter_documents('new',$doc, 'document', $source['id_document'], $mode);\n\t\t$x = reset($x);\n\t\tif(intval($x) > 1){\n\t\t\tsupprimer_fichier($fichier_temp);\n\t\t\t$ret['id_document'] = $x;\n\t\t\t$ret['success'] = true;\n\t\t}else{\n\t\t\tspip_log('Il y a une erreur, le fichier n est pas copié','spipmotion');\n\t\t\t$ret['erreur'] = 'Il y a une erreur, le fichier n est pas copié';\n\t\t\t$ret['success'] = false;\n\t\t}\n\t}else if(!file_exists(get_spip_doc($source['fichier']))){\n\t\tspip_log('Le document original a été supprimé entre temps','spipmotion');\n\t\tsupprimer_fichier($fichier_temp);\n\t\t$ret['erreur'] = 'Le document original a été supprimé entre temps';\n\t\t$ret['success'] = false;\n\t}\n\t/**\n\t * Si l'encodage n'est pas ok ...\n\t * On donne un statut \"erreur\" dans la file afin de ne pas la bloquer\n\t */\n\telse{\n\t\t$infos_encodage['fin_encodage'] = time();\n\t\t$infos_encodage['log'] = spip_file_get_contents($fichier_log);\n\t\t$ret['infos'] = $infos_encodage;\n\t\t$ret['erreur'] = 'Encodage en erreur';\n\t\t$ret['success'] = false;\n\t}\n\n\t/**\n\t * On supprime les différents fichiers temporaires qui auraient pu être créés\n\t * si on a une réussite\n\t */\n\tif($ret['success']){\n\t\t$files = array(\n\t\t\t\t\t$fichier_temp,\n\t\t\t\t\t$fichier_texte,\n\t\t\t\t\t$pass_log_file.'-0.log',\n\t\t\t\t\t$pass_log_file.'.mbtree',\n\t\t\t\t\t$pass_log_file.'-0.log.mbtree',\n\t\t\t\t\t_DIR_RACINE.$query.'.mbtree',\n\t\t\t\t\t_DIR_RACINE.$query.'-pass'\n\t\t\t\t);\n\t\tforeach($files as $file){\n\t\t\tif(file_exists($file)) supprimer_fichier($file);\n\t\t}\n\t}\n\tpipeline('post_spipmotion_encodage',\n\t\t\t\tarray(\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id_document' => $x,\n\t\t\t\t\t\t'id_document_orig' => $source['id_document'],\n\t\t\t\t\t\t'reussite' => $reussite\n\t\t\t\t\t),\n\t\t\t\t\t'data' => ''\n\t\t\t\t)\n\t\t\t);\n\n\tif ($notifications = charger_fonction('notifications', 'inc')) {\n\t\t$notifications('spipmotion_encodage', intval($options['id_facd_conversion']),\n\t\t\tarray(\n\t\t\t\t'id_document' => $x,\n\t\t\t\t'source' => $source,\n\t\t\t\t'fichier_log' => $fichier_log,\n\t\t\t)\n\t\t);\n\t}\n\treturn $ret;\n}", "public function Cetak($doc)\n {\n if (!empty($doc)) {\n $dataCek = $this->M_msj->getSjRow($doc);\n\n if (empty($dataCek[0]['PRINT_DATE'])) {\n $this->M_msj->updatePrintDate($doc);\n }\n\n $data['get'] = $this->M_msj->getFPB($doc);\n // echo \"<PRE>\";\n // print_r($dataCek);die;\n // ====================== do something =========================\n $this->load->library('Pdf');\n\n $pdf \t\t= $this->pdf->load();\n $this->load->library('ciqrcode');\n // if (sizeof($data['ge']) > 10) {\n if (sizeof($data['get']['Item']) > 10) {\n $pdf \t\t= new mPDF('utf-8', array(210 , 148), 0, '', 3, 3, 5, 5, 4.3, 4.1);\n }else {\n $pdf \t\t= new mPDF('utf-8', array(210 , 148), 0, '', 3, 3, 35, 0, 4.3, 4.1);\n }\n\n // ------ GENERATE QRCODE ------\n if (!is_dir('./assets/upload/QR_MSJ')) {\n mkdir('./assets/upload/QR_MSJ', 0777, true);\n chmod('./assets/upload/QR_MSJ', 0777);\n }\n\n $params['data']\t\t= $data['get']['Header'][0]['NO_SURATJALAN'];\n $params['level']\t= 'H';\n $params['size']\t\t= 5;\n $params['black']\t= array(255,255,255);\n $params['white']\t= array(0,0,0);\n $params['savename'] = './assets/upload/QR_MSJ/'.$data['get']['Header'][0]['NO_SURATJALAN'].'.png';\n $this->ciqrcode->generate($params);\n\n ob_end_clean() ;\n $filename \t= $doc.'.pdf';\n\n $pdf->defaultheaderline = 0;\n $pdf->defaultfooterline = 0;\n if (sizeof($data['get']['Item']) > 10) {\n // if (sizeof($data['ge']) > 10) {\n $pdf->WriteHTML($this->load->view('MonitoringSuratJalan/Pdf/V_Pdf_10', $data, true));\n }else {\n $pdf->SetHeader($this->load->view('MonitoringSuratJalan/Pdf/V_Pdf_Header', $data, true));\n $pdf->SetFooter($this->load->view('MonitoringSuratJalan/Pdf/V_Pdf_Footer', $data, true));\n $pdf->WriteHTML($this->load->view('MonitoringSuratJalan/Pdf/V_Pdf', $data, true));\n }\n\n $pdf->Output($filename, 'I');\n\n if (!unlink($params['savename'])) {\n echo(\"Error deleting\");\n } else {\n unlink($params['savename']);\n }\n\n $this->M_msj->updateCetak($doc);\n\n } else {\n echo json_encode(array(\n 'success' => false,\n 'message' => 'id is null'\n ));\n }\n\n }", "public function renderScanRFXCode() // prepsat redka v nem vypiseaaktualni kod a vytvorit tlacitko scan a na nej vytvorit funkci pro hnadle a tlacitko stop ktere vypne priznak a zobrazi aktulani stav komonenty\n\t{\n\t\t//prirada sablonu ve ktere je tlacitko odkazujici na handle StartScanRFXCode a handleStopScanRFXCode\n\t\t$this->template->setFile(__DIR__.'/deviceCompomemnt_scanRFXcode.latte');\n\t\t//naplnit data pro rendrovani\n\t\t$this->template->name=$this->getName();\n\t\t$this->template->config=$this->config;\n\t\t//Debugger::barDump($this->template, 'this->template');\t\n\t}", "public function enviarRecomendacion()\n {\n\n $cuerpo=$_POST['textarea'];\n $datos=$this->modelo->guardarRecomendacion($cuerpo);\n \n }", "function create(){\r\n $base = \"data:image/jpeg;base64\";\r\n $query = \"INSERT INTO\r\n \" . $this->table_name . \"\r\n SET\r\n usuCreacion=:origen, identificador='ccc', fk_proveedor=:proveedor, fk_obra=:obra, foto=:img\";\r\n\r\n //--Preparando el query para ejecucion\r\n $stmt = $this->conn->prepare($query);\r\n \r\n //$this->identificador = htmlspecialchars(strip_tags($this->identificador));\r\n $this->origen = htmlspecialchars(strip_tags($this->origen));\r\n $this->proveedor = htmlspecialchars(strip_tags($this->proveedor));\r\n $this->obra = htmlspecialchars(strip_tags($this->obra));\r\n $this->img = htmlspecialchars(strip_tags($this->img)); \r\n\r\n // bind values\r\n //$stmt->bindParam(\":identificador\", $this->identificador);\r\n $stmt->bindParam(\":origen\", $this->origen);\r\n $stmt->bindParam(\":proveedor\", $this->proveedor);\r\n $stmt->bindParam(\":obra\", $this->obra);\r\n $stmt->bindParam(\":img\", $this->img);\r\n \r\n\r\n // execute query\r\n if($stmt->execute()){\r\n return true;\r\n }\r\n return false;\r\n }", "private function _getContent()\n {\n return '{*Sailthru zephyr code is used for full functionality*}\n <div id=\"main\">\n <table width=\"700\">\n <tr>\n <td>\n <h2><p>Hello {profile.vars.name}</p></h2>\n <p>Did you forget the following items in your cart?</p>\n <table>\n <thead>\n <tr>\n <td colspan=\"2\">\n <div><span style=\"display:block;text-align:center;color:white;font-size:13px;font-weight:bold;padding:15px;text-shadow:0 -1px 1px #af301f;white-space:nowrap;text-transform:uppercase;letter-spacing:1;background-color:#d14836;min-height:29px;line-height:29px;margin:0 0 0 0;border:1px solid #af301f;margin-top:5px\"><a href=\"{profile.purchase_incomplete.items[0].vars.checkout_url}\">Re-Order Now!</a></span></div>\n </td>\n </tr>\n </thead>\n <tbody>\n {sum = 0}\n {foreach profile.purchase_incomplete.items as i}\n <table width=\"650\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"margin:0 0 20px 0;background:#fff;border:1px solid #e5e5e5\">\n <tbody>\n <tr>\n <td style=\"padding:20px\"><a href=\"{i.url}\"><img width=\"180\" height=\"135\" border=\"0\" alt=\"{i.title}\" src=\"{i.vars.image_url}\"></a></td>\n <td width=\"420\" valign=\"top\" style=\"padding:20px 10px 20px 0\">\n <div style=\"padding:5px 0;color:#333;font-size:18px;font-weight:bold;line-height:21px\">{i.title}</div>\n <div style=\"padding:0 0 5px 0;color:#999;line-height:21px;margin:0px\">{i.vars.currency}{i.price/100}</div>\n <div style=\"color:#999;font-weight:bold;line-height:21px;margin:0px\">{i.description}</div>\n <div><span style=\"display:block;text-align:center;width:120px;border-left:1px solid #b43e2e;border-right:1px solid #b43e2e;color:white;font-size:13px;font-weight:bold;padding:0 15px;text-shadow:0 -1px 1px #af301f;white-space:nowrap;text-transform:uppercase;letter-spacing:1;background-color:#d14836;min-height:29px;line-height:29px;margin:0 0 0 0;border:1px solid #af301f;margin-top:5px\"><a href=\"{i.url}\">Buy Now</a></span></div>\n </td>\n </tr>\n </tbody>\n </table>\n {/foreach}\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:3px 9px\" colspan=\"2\"></td>\n <td align=\"right\" valign=\"top\" style=\"padding:3px 9px\"></td>\n </tr>\n </tbody>\n <tfoot>\n </tfoot>\n </table>\n <p><small>If you believe this has been sent to you in error, please safely <a href=\"{optout_confirm_url}\">unsubscribe</a>.</small></p>\n {beacon}\n </td>\n </tr>\n </table>\n </div>';\n }" ]
[ "0.6209538", "0.59599036", "0.58564454", "0.57883894", "0.57696843", "0.5765846", "0.5729959", "0.5686736", "0.5596861", "0.5547655", "0.55446106", "0.5522725", "0.5508945", "0.5497635", "0.5485846", "0.5479005", "0.5470509", "0.5469289", "0.54313016", "0.537364", "0.5369415", "0.5367838", "0.5363806", "0.53197074", "0.5312642", "0.5311362", "0.53027576", "0.52842355", "0.5280699", "0.52697164", "0.5250616", "0.5238006", "0.5233117", "0.52197415", "0.5214575", "0.52095145", "0.52038246", "0.51829594", "0.5169207", "0.5163787", "0.51455134", "0.5142704", "0.51423717", "0.51338327", "0.5118131", "0.51167935", "0.5114698", "0.51069295", "0.5101174", "0.509606", "0.50730634", "0.5072993", "0.5065647", "0.5063822", "0.50575113", "0.5054701", "0.5049781", "0.5048747", "0.50473696", "0.5044386", "0.5038755", "0.5037054", "0.5034273", "0.50317854", "0.50154036", "0.50139487", "0.50096935", "0.5008506", "0.5008053", "0.49947062", "0.4990809", "0.49900073", "0.4984453", "0.49821913", "0.49812275", "0.49745345", "0.4970534", "0.49703014", "0.49674022", "0.49673092", "0.49661613", "0.49534765", "0.49487874", "0.49364904", "0.49323604", "0.4915378", "0.49147055", "0.49138182", "0.4911793", "0.49068543", "0.49068177", "0.48998058", "0.48973924", "0.48948747", "0.48855338", "0.4859808", "0.485372", "0.48523015", "0.48510176", "0.48458484" ]
0.71873707
0
Seed the application's database.
public function run() { $faker = Faker::create('id_ID'); /** * Generate fake author data */ for ($i=1; $i<=50; $i++) { DB::table('author')->insert([ 'name' => $faker->name ]); } /** * Generate fake publisher data */ for ($i=1; $i<=50; $i++) { DB::table('publisher')->insert([ 'name' => $faker->name ]); } /** * Seeding payment method */ DB::table('payment')->insert([ ['name' => 'Mandiri'], ['name' => 'BCA'], ['name' => 'BRI'], ['name' => 'BNI'], ['name' => 'Pos Indonesia'], ['name' => 'BTN'], ['name' => 'Indomaret'], ['name' => 'Alfamart'], ['name' => 'OVO'], ['name' => 'Cash On Delivery'] ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');// <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t}\n\t}", "protected function seedDB()\n {\n $ans = $this->ask('Seed your database?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n $this->call('db:seed');\n $this->comment('');\n $this->comment('Database successfully seeded.');\n $this->comment('=====================================');\n echo \"Your app is now ready!\";\n }\n }", "protected function seedDatabase(): void\n {\n $this->seedProductCategories();\n $this->seedProducts();\n }", "public function setupDatabase()\n {\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n\n self::$setupDatabase = false;\n }", "public function run()\n {\n $this->seed('FormsMenuItemsTableSeeder');\n $this->seed('FormsDataTypesTableSeeder');\n $this->seed('FormsDataRowsTableSeeder');\n $this->seed('FormsPermissionsTableSeeder');\n $this->seed('FormsSettingsTableSeeder');\n $this->seed('FormsTableSeeder');\n }", "public function run()\n {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"\\n--- Seeding ---\\n\", TRUE));\n\n if (App::environment('production')) {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- ERROR: Seeding in Production is prohibited ---\\n\", TRUE));\n return;\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(ConfigsTableSeeder::class);\n $this->call(ConfigContentsTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n if (defined('STDERR')) fwrite(STDERR, print_r(\"Set FOREIGN_KEY_CHECKS=1 --- DONE\\n\", TRUE));\n\n // \\Artisan::call('command:regenerate-user-feeds');\n\n \\Cache::flush();\n\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- End Seeding ---\\n\\n\", TRUE));\n }", "protected function setupDatabase()\n {\n $this->call('migrate');\n $this->call('db:seed');\n\n $this->info('Database migrated and seeded.');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }", "public function initDatabase()\n {\n $this->call('migrate');\n\n $userModel = config('admin.database.users_model');\n\n if ($userModel::count() == 0) {\n $this->call('db:seed', ['--class' => AdminSeeder::class]);\n }\n }", "public function run ()\n {\n if (App::environment() === 'production') {\n exit('Seed should be run only in development/debug environment.');\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('role_user')->truncate();\n\n // Root user\n $user = User::find(1);\n $user->assignRole('owner');\n\n $user = User::find(2);\n $user->assignRole('admin');\n\n $user = User::find(3);\n $user->assignRole('admin');\n\n $user = User::find(4);\n $user->assignRole('moderator');\n\n $user = User::find(5);\n $user->assignRole('moderator');\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n Model::unguard();\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(EntrustTableSeeder::class);\n\n $this->call(AccounttypeSeeder::class);\n $this->call(AppUserTableSeeder::class);\n $this->call(AppEmailUserTableSeeder::class);\n\n\n $this->call(CountryTableSeeder::class);\n $this->call(CityTableSeeder::class);\n\n\n $this->call(PostTypeTableSeeder::class);\n $this->call(PostSubTypeTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(AppPostSolvedTableSeeder::class);\n\n\n $this->call(AppCommentTypeTableSeeder::class);\n // $this->call(AppCommentTableSeeder::class);\n // $this->call(AppSubCommentTableSeeder::class);\n\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n\n Model::reguard();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('domains')->truncate();\n DB::table('folders')->truncate();\n DB::table('bookmarks')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->seedUserAccount('[email protected]');\n $this->seedUserAccount('[email protected]');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n // $this->call(UsersTableSeeder::class);\n /* Schema::dropIfExists('employees');\n Schema::dropIfExists('users');\n Schema::dropIfExists('requests');\n Schema::dropIfExists('requeststatus');*/\n User::truncate();\n InstallRequest::truncate();\n RequestStatus::truncate();\n\n $cantidadEmployyes = 20;\n $cantidadUsers = 20;\n $cantidadRequestStatus = 3;\n $cantidadRequests = 200;\n\n factory(User::class, $cantidadUsers)->create();\n factory(RequestStatus::class, $cantidadRequestStatus)->create();\n factory(InstallRequest::class, $cantidadRequests)->create();\n }", "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "public function run()\n\t{\n $this->cleanDatabase();\n\n Eloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('CartsTableSeeder');\n $this->call('StoreTableSeeder');\n $this->call('AdvertisementsTableSeeder');\n \n\t}", "public function run()\n {\n \tDB::table('seeds')->truncate();\n\n $seeds = array(\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_18_2013',\n ),\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_20_2013',\n ),\n );\n\n // Uncomment the below to run the seeder\n DB::table('seeds')->insert($seeds);\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "public function run()\n {\n //$this->call('UserTableSeeder');\n //$this->call('ProjectTableSeeder');\n //$this->call('TaskTableSeeder');\n\n /**\n * Prepare seeding\n */\n $faker = Faker::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Model::unguard();\n\n /**\n * Seeding user table\n */\n App\\User::truncate();\n factory(App\\User::class)->create([\n 'name' => 'KCK',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n /*factory(App\\User::class, 9)->create();\n $this->command->info('users table seeded');*/\n\n /**\n * Seeding roles table\n */\n Spatie\\Permission\\Models\\Role::truncate();\n DB::table('model_has_roles')->truncate();\n $superAdminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '최고 관리자'\n ]);\n $adminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '관리자'\n ]);\n $regularRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '정회원'\n ]);\n $associateRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '준회원'\n ]);\n\n App\\User::where('email', '!=', '[email protected]')->get()->map(function ($user) use ($regularRole) {\n $user->assignRole($regularRole);\n });\n\n App\\User::whereEmail('[email protected]')->get()->map(function ($user) use ($superAdminRole) {\n $user->assignRole($superAdminRole);\n });\n $this->command->info('roles table seeded');\n\n /**\n * Seeding articles table\n */\n App\\Article::truncate();\n $users = App\\User::all();\n\n $users->each(function ($user) use ($faker) {\n $user->articles()->save(\n factory(App\\Article::class)->make()\n );\n });\n $this->command->info('articles table seeded');\n\n /**\n * Seeding comments table\n */\n App\\Comment::truncate();\n $articles = App\\Article::all();\n\n $articles->each(function ($article) use ($faker, $users) {\n for ($i = 0; $i < 10; $i++) {\n $article->comments()->save(\n factory(App\\Comment::class)->make([\n 'author_id' => $faker->randomElement($users->pluck('id')->toArray()),\n //'parent_id' => $article->id\n ])\n );\n };\n });\n $this->command->info('comments table seeded');\n\n /**\n * Seeding tags table\n */\n App\\Tag::truncate();\n DB::table('article_tag')->truncate();\n $articles->each(function ($article) use ($faker) {\n $article->tags()->save(\n factory(App\\Tag::class)->make()\n );\n });\n $this->command->info('tags table seeded');\n\n /**\n * Seeding attachments table\n */\n App\\Attachment::truncate();\n if (!File::isDirectory(attachment_path())) {\n File::deleteDirectory(attachment_path(), true);\n }\n\n $articles->each(function ($article) use ($faker) {\n $article->attachments()->save(\n factory(App\\Attachment::class)->make()\n );\n });\n\n //$files = App\\Attachment::pluck('name');\n\n if (!File::isDirectory(attachment_path())) {\n File::makeDirectory(attachment_path(), 777, true);\n }\n\n /*\n foreach ($files as $file) {\n File::put(attachment_path($file), '');\n }\n */\n\n $this->command->info('attachments table seeded');\n\n /**\n * Close seeding\n */\n Model::reguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(CountriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n\n factory(Group::class)->create();\n factory(Contact::class, 5000)->create();\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('AdminTableSeeder');\n\t\t// $this->call('UserTableSeeder');\n\t\t// $this->call('MenuTableSeeder');\n\t\t// $this->call('ProductTableSeeder');\n\t\t// $this->call('CategoryTableSeeder');\n\t\t// $this->call('OptionTableSeeder');\n\t\t// $this->call('OptionGroupTableSeeder');\n\t\t// $this->call('TypeTableSeeder');\n\t\t// $this->call('LayoutTableSeeder');\n\t\t// $this->call('LayoutDetailTableSeeder');\n\t\t// $this->call('BannerTableSeeder');\n\t\t// $this->call('ConfigureTableSeeder');\n\t\t// $this->call('PageTableSeeder');\n\t\t// $this->call('ImageTableSeeder');\n\t\t// $this->call('ImageableTableSeeder');\n\t\t// ======== new Seed =======\n\t\t$this->call('AdminsTableSeeder');\n\t\t$this->call('BannersTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('ConfiguresTableSeeder');\n\t\t$this->call('ImageablesTableSeeder');\n\t\t$this->call('ImagesTableSeeder');\n\t\t$this->call('LayoutsTableSeeder');\n\t\t$this->call('LayoutDetailsTableSeeder');\n\t\t$this->call('MenusTableSeeder');\n\t\t$this->call('OptionablesTableSeeder');\n\t\t$this->call('OptionsTableSeeder');\n\t\t$this->call('OptionGroupsTableSeeder');\n\t\t$this->call('PagesTableSeeder');\n\t\t$this->call('PriceBreaksTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('ProductsCategoriesTableSeeder');\n\t\t$this->call('SizeListsTableSeeder');\n\t\t$this->call('TypesTableSeeder');\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ContactsTableSeeder');\n\t\t$this->call('RolesTableSeeder');\n\t\t$this->call('PermissionsTableSeeder');\n\t\t$this->call('PermissionRoleTableSeeder');\n\t\t$this->call('AssignedRolesTableSeeder');\n\t\t$this->call('OrdersTableSeeder');\n\t\t$this->call('OrderDetailsTableSeeder');\n\t\tCache::flush();\n\t\t// BackgroundProcess::copyFromVI();\n\t}", "public function run()\n {\n Model::unguard();\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'admin',\n 'password' => Hash::make('1234'),\n 'email_verified_at' => Carbon::now()\n ]);\n\n factory(User::class, 200)->create();\n\n // $this->call(\"OthersTableSeeder\");\n }", "public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "public function run()\n {\n if (\\App::environment() === 'local') {\n\n // Delete existing data\n\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // Truncate all tables, except migrations\n $tables = array_except(DB::select('SHOW TABLES'), ['migrations']);\n foreach ($tables as $table) {\n $tables_in_database = \"Tables_in_\" . Config::get('database.connections.mysql.database');\n DB::table($table->$tables_in_database)->truncate();\n }\n\n // supposed to only apply to a single connection and reset it's self\n // but I like to explicitly undo what I've done for clarity\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n //get roles\n $this->call('AccountSeeder');\n $this->call('CountrySeeder');\n $this->call('StateSeeder');\n $this->call('CitySeeder');\n $this->call('OptionSeeder');\n $this->call('TagSeeder');\n $this->call('PrintTemplateSeeder');\n $this->call('SettingsSeeder');\n\n\n\n if(empty($web_installer)) {\n $admin = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"admin\",\n 'first_name' => 'Admin',\n 'last_name' => 'Doe',\n ));\n $admin->user_id = $admin->id;\n $admin->save();\n\n $adminRole = Sentinel::findRoleById(1);\n $adminRole->users()->attach($admin);\n }\n else {\n $admin = Sentinel::findById(1);\n }\n\n //add dummy staff and customer\n $staff = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"staff\",\n 'first_name' => 'Staff',\n 'last_name' => 'Doe',\n ));\n $admin->users()->save($staff);\n\n foreach ($this->getPermissions() as $permission) {\n $staff->addPermission($permission);\n }\n $staff->save();\n\n $customer = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"customer\",\n 'first_name' => 'Customer',\n 'last_name' => 'Doe',\n ));\n Customer::create(array('user_id' => $customer->id, 'belong_user_id' => $staff->id));\n $staff->users()->save($customer);\n\n //add respective roles\n\n $staffRole = Sentinel::findRoleById(2);\n $staffRole->users()->attach($staff);\n $customerRole = Sentinel::findRoleById(3);\n $customerRole->users()->attach($customer);\n\n\n\n DB::table('sales_teams')->truncate();\n DB::table('opportunities')->truncate();\n\n //Delete existing seeded users except the first 4 users\n User::where('id', '>', 3)->get()->each(function ($user) {\n $user->forceDelete();\n });\n\n //Get the default ADMIN\n $user = User::find(1);\n $staffRole = Sentinel::getRoleRepository()->findByName('staff');\n $customerRole = Sentinel::getRoleRepository()->findByName('customer');\n\n //Seed Sales teams for default ADMIN\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($user->id, $j, $user);\n $this->createOpportunity($user, $user->id, $j);\n }\n\n\n //Get the default STAFF\n $staff = User::find(2);\n $this->createSalesTeam($staff->id, 1, $staff);\n $this->createSalesTeam($staff->id, 2, $staff);\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $staff->id, $j);\n }\n\n foreach (range(1, 3) as $i) {\n $staff = $this->createStaff($i);\n $user->users()->save($staff);\n $staffRole->users()->attach($staff);\n\n $customer = $this->createCustomer($i);\n $staff->users()->save($customer);\n $customerRole->users()->attach($customer);\n $customer->customer()->save(factory(\\App\\Models\\Customer::class)->make());\n\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 5) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $i, $j);\n }\n\n }\n\n //finally call it installation is finished\n file_put_contents(storage_path('installed'), 'Welcome to LCRM');\n }\n }", "public function run()\n {\n if (env('DB_DATABASE') == 'connection') {\n Connection::create([\n \"ruc\" => \"12312312312\",\n \"basedata\" => \"nbdata2018_1\",\n ]);\n \n Connection::create([\n \"ruc\" => \"12312312315\",\n \"basedata\" => \"nbdata2018_2\",\n ]);\n \n $this->call(ConnectionTableSeeder::class);\n } else {\n $this->call(AppSeeder::class);\n }\n }", "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n # truncates tables before seeding\n foreach ($this->toTruncate as $table) {\n DB::table($table)->delete();\n }\n\n factory(App\\Models\\Product::class, 25)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Post::truncate();\n Comment::truncate();\n // CommentReply::truncate();\n \n\n\n factory(User::class,10)->create();\n factory(Post::class,20)->create();\n factory(Comment::class,30)->create();\n // factory(CommentReply::class,30)->create();\n }", "public function run()\n\t{\n \n Eloquent::unguard();\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t$this->call('UserTableSeeder');\n\t $this->call('LayerTableSeeder');\n $this->call('UserLevelTableSeeder');\n $this->call('RoleUserTableSeeder');\n $this->call('RoleLayerTableSeeder');\n $this->call('BookmarkTableSeeder');\n \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('topics')->truncate();\n\n factory(\\App\\Topic::class, 100)->create();\n // ->each(function($topic) {\n\n // // Seed para a relação com group\n // $topic->group()->save(factory(App\\Group::class)->make());\n\n // // Seed para a relação com topicMessages\n // $topic->topicMessages()->save(factory(App\\TopicMessage::class)->make());\n\n // // Seed para a relação com user\n // $topic->user()->save(factory(App\\User::class)->make());\n // });\n \n DB::statement('SET foreign_key_checks = 1');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n Categoria::truncate();\n Atractivo::truncate();\n Galeria::truncate();\n User::truncate();\n\n $this->call(CategoriasTableSeeder::class);\n $this->call(AtractivosTableSeeder::class);\n $this->call(GaleriasTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n }", "public function run(Faker $faker)\n {\n Schema::disableForeignKeyConstraints();\n DB::table('users')->insert([\n 'name' => $faker->name(),\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n\t $this->call(CategoryTableSeed::class);\n\t $this->call(ProductTableSeed::class);\n\t $this->call(UserTableSeed::class);\n }", "public function run()\n {\n $this->cleanDatabase();\n\n factory(User::class, 50)->create();\n factory(Document::class, 30)->create();\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n \t// DB::table('webapps')->delete();\n\n $webapps = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('webapps')->insert($webapps);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $tables = array(\n 'users',\n 'companies',\n 'stands',\n 'events',\n 'visitors',\n 'api_keys'\n );\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }\n\n foreach ($tables as $table) {\n DB::table($table)->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(CompaniesTableSeeder::class);\n $this->call(StandsTableSeeder::class);\n $this->call(VisitorsTableSeeder::class);\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $clear = $this->command->confirm('Wil je de database leegmaken? (Dit haalt alle DATA weg)');\n\n if ($clear):\n $this->command->callSilent('migrate:refresh');\n $this->command->info('Database Cleared, starting seeding');\n endif;\n\n $this->call([\n SeedSeeder::class,\n RoleSeeder::class,\n UserSeeder::class,\n // BoardgameSeeder::class,\n BoardgamesTableSeeder::class,\n StatusSeeder::class,\n TournamentSeeder::class,\n AchievementsSeeder::class,\n TournamentUsersSeeder::class,\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n $this->call(PaisSeeder::class);\n $this->call(DepartamentoSeeder::class);\n $this->call(MunicipioSeeder::class);\n $this->call(PersonaSeeder::class);\n }", "public function run()\n {\n //\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('events')->truncate();\n \n Event::create([\n 'id' => 1,\n 'name' => 'Spot Registration For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n Event::create([\n 'id' => 2,\n 'name' => 'Spot Screening For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'screen',\n 'formId'\t\t=> 1,\n ]);\n \n Event::create([\n 'id' => 3,\n 'name' => 'Spot Registration For Skin Cancer',\n 'cancerId' => 2,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n\n Event::create([\n 'id' => 3,\n 'name' => 'Registration cum Screening camp for Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addWeeks(1),\n 'eventType'\t\t=> 'register_screen',\n 'formId'\t\t=> 1,\n ]);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Para que no verifique el control de claves foráneas al hacer el truncate haremos:\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n\t\t// Primero hacemos un truncate de las tablas para que no se estén agregando datos\n\t\t// cada vez que ejecutamos el seeder.\n\t\t//Foto::truncate();\n\t\t//Album::truncate();\n\t\t//Usuario::truncate();\n DB::table('users')->delete();\n DB::table('ciudades')->delete();\n DB::table('tiendas')->delete();\n DB::table('ofertas')->delete();\n DB::table('ventas')->delete();\n\n\n\t\t// Es importante el orden de llamada.\n\t\t$this->call('UserSeeder');\n $this->call('CiudadSeeder');\n\t\t$this->call('TiendaSeeder');\n $this->call('OfertaSeeder');\n $this->call('VentaSeeder');\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $this->truncateTables([\n 'users',\n 'categories',\n 'types',\n 'courses',\n 'classrooms',\n 'contents',\n 'companies',\n ]);\n\n $this->call(CompanyTableSeeder::class);\n $this->call(TypeTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(CoursesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(ContentTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(ClassroomTableSeeder::class);\n $this->call(TestTableSeeder::class);\n $this->call(BankTableSeeder::class);\n\n\n // factory(\\App\\User::class, 50)\n // ->create()\n // ->each(function ($user) {\n // // $user->companies()->save();\n // $company = \\App\\Company::inRandomOrder()->first();\n // $user->companies()->attach($company->id);\n // $user->assignRole(['participante']);\n // });\n /*\n factory(\\App\\User::class, 50)\n ->create()\n ->each(function ($user) {\n $user->assignRole(['participante']);\n });*/\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Question::truncate();\n Option::truncate();\n// Answer::truncate();\n Quiz::truncate();\n QuizQuestion::truncate();\n\n //for admin\n $admin = factory(User::class)->create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'is_admin' => 1,\n ]);\n\n //for user\n $user = factory(User::class)->create([\n 'name' => 'User',\n 'email' => '[email protected]',\n ]);\n\n factory(Question::class, 100)->create()->each(function ($question) {\n factory(Option::class, mt_rand(2, 4))->create([\n 'question_id' => $question->id,\n ]);\n });\n\n factory(Quiz::class, 10)->create()->each(function ($quiz) {\n\n factory(QuizQuestion::class, mt_rand(5, 10))->create();\n });\n\n\n }", "public function run()\n {\n $this->call([\n SiteSettingsSeeder::class,\n LaratrustSeeder::class,\n CountrySeeder::class,\n GovernorateSeeder::class,\n FaqSeeder::class,\n SitePageSeeder::class,\n UsersSeeder::class,\n ]);\n\n Country::whereiso(\"EG\")->update(['enable_shipping' => true]);\n\n factory(User::class, 400)->create();\n\n Category::create([\n 'en' => [\n 'name' => \"cake tools\"\n ]\n ]);\n\n Category::create([\n 'en' => [\n 'name' => \"Party Supplies\"\n ]\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ProductSeeder::class\n ]);\n }", "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n\n if (App::environment('local')) {\n $this->call(FakeUsersTableSeeder::class);\n $this->call(FakeArticlesTableSeeder::class);\n $this->call(FakeEventsTableSeeder::class);\n }\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(CategoryTypesTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(AccountTypesTableSeeder::class);\n $this->call(TransactionTypesTableSeeder::class);\n\n if (App::environment() !== 'production') {\n $this->call(UserTableSeeder::class);\n $this->call(AccountBudgetTableSeeder::class);\n $this->call(TransactionTableSeeder::class);\n }\n\n Model::reguard();\n }", "public function run()\n {\n User::truncate();\n Product::truncate();\n User::forceCreate([\n 'name' => 'foo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n factory(User::class, 5)->create();\n factory(Product::class, 5)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n {\n $this->call([UsersTableSeeder::class]);\n $this->call([ContratosTableSeeder::class]);\n $this->call([UsuariosTableSeeder::class]);\n $this->call([UnidadesTableSeeder::class]);\n $this->call([AtestadosTableSeeder::class]);\n }", "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n\n // DB::table('locations')->insert([\n // 'id' => 1,\n // 'name' => 'Default',\n // 'name' => 'district',\n // 'district_id' => 1,\n // 'province_id' => 1,\n // ]);\n }", "public function run()\n {\n $data = include env('DATA_SEED');\n\n \\Illuminate\\Support\\Facades\\DB::table('endpoints')->insert((array)$data);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('admins')->truncate();\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Factory::create('en_US');\n $values = [\n 'name' => $faker->userName,\n 'email' => $faker->freeEmail,\n 'password' => bcrypt($faker->password),\n 'phone' => $faker->phoneNumber,\n 'status' => random_int(0,1)\n ];\n admin::create($values);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::beginTransaction();\n// $this->seed();\n DB::commit();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n \\DB::table('provinces')->delete();\n \\DB::table('cities')->delete();\n \\DB::table('districts')->delete();\n // import provinces and cities from sql file\n $sqlFile = app_path() . '/../database/raw/administrative_indonesia_without_districts.sql';\n DB::unprepared(file_get_contents($sqlFile));\n $this->command->info('Successfully seed Provinces and Cities!');\n\n // import districts with latitude and longitude from csv file\n $csvFile = app_path() . '/../database/raw/administrative_indonesia_districts_with_lat_lng.csv';\n $districts = $this->csvToArray($csvFile);\n // check if lat lng exists\n foreach ($districts as $i => $d) {\n if ($d['latitude'] == '') $districts[$i]['latitude'] = 0;\n if ($d['longitude'] == '') $districts[$i]['longitude'] = 0;\n }\n // insert it\n $insert = District::insert($districts);\n if ($insert) $this->command->info('Successfully seed Districts!');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(SubDistrictsTableSeeder::class);\n $this->call(PostcodesTableSeeder::class);\n\n if (env('APP_ENV') !== 'production') {\n // Wipe up 5 churches, and each church has 5 cells, and each cell has 20 members associated with.\n // In other word, we wipe up 500 church members.\n for ($i = 0; $i < 2; $i++) {\n $church = factory(\\App\\Models\\Church::class)->create();\n\n $church->areas()->saveMany(factory(\\App\\Models\\Area::class, 2)->create([\n 'church_id' => $church->id\n ])->each(function($area) {\n $area->cells()->saveMany(factory(\\App\\Models\\Cell::class, 2)->create([\n 'area_id' => $area->id\n ])->each(function($cell) {\n $cell->members()->saveMany(factory(App\\Models\\Member::class, 10)->create([\n 'cell_id' => $cell\n ]));\n }));\n }));\n }\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->environmentPath = env('APP_ENV') === 'production' ||\n env('APP_ENV') === 'qa' ||\n env('APP_ENV') === 'integration' ?\n 'Production':\n 'local';\n //disable FK\n Model::unguard();\n DB::statement(\"SET session_replication_role = 'replica';\");\n\n // $this->call(HrEmployeeTableSeeder::class);\n $this->call(\"Modules\\HR\\Database\\Seeders\\\\$this->environmentPath\\HrEmployeePosTableSeeder\");\n // $this->call(HrEmployeePresetsDiscountTableSeeder::class);\n\n // Enable FK\n DB::statement(\"SET session_replication_role = 'origin';\");\n Model::reguard();\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n $faker = F::create('App\\Proovedores');\n for($i=0; $i < 10; $i++){\n DB::table('users')->insert([\n 'usuario' => $i,\n 'password' => $i,\n 'email' => $faker->email,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Delete all records.\n DB::table('users')->delete();\n // Reset AUTO_INCREMENT.\n DB::table('users')->truncate();\n\n // Dev user.\n App\\Models\\User::create([\n 'email' => '[email protected]',\n 'password' => '$2y$10$t6q81nz.XrMrh20NHDvxUu/szwHBwgzPd.01e8uuP0qVy0mPa6H/e',\n 'first_name' => 'L5',\n 'last_name' => 'App',\n 'username' => 'l5-app',\n 'is_email_verified' => 1,\n ]);\n\n // Dummy users.\n TestDummy::times(10)->create('App\\Models\\User');\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // We did this for test purposes. Shouldn't be doing this for production\n $password = Hash::make('123456');\n\n User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n }", "public function run()\n {\n Model::unguard();\n \n factory('App\\User','admin')->create();\n factory('App\\Evento',100)->create();\n //factory('App\\User','miembro',10)->create();\n factory('App\\Telefono',13)->create();\n factory('App\\Notificacion',10)->create();\n factory('App\\Rubro',10)->create();\n factory('App\\Tecnologia',10)->create();\n factory('App\\Cultivo',10)->create();\n factory('App\\Etapa',10)->create();\n factory('App\\Variedad',10)->create();\n factory('App\\Caracteristica',10)->create();\n factory('App\\Practica',30)->create();\n factory('App\\Tag',15)->create();\n // $this->call(PracticaTableSeeder::class);\n $this->call(TrTableSeeder::class);\n $this->call(MesTableSeeder::class);\n $this->call(SemanasTableSeeder::class);\n $this->call(PsTableSeeder::class);\n $this->call(MsTableSeeder::class);\n $this->call(CeTableSeeder::class);\n $this->call(CvTableSeeder::class);\n $this->call(PtSeeder::class);\n \n\n Model::unguard();\n }", "public function run() {\n $this->call(UserSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(CreateAdminUserSeeder::class);\n // $this->call(PhoneSeeder::class);\n // $this->call(AddressSeeder::class);\n\n $this->call(ContactFormSeeder::class);\n //$this->call(ContactSeeder::class);\n\n User::factory()->count(20)->create()->each(function ($user) {\n // Seed the relation with one address\n $address = Address::factory()->make();\n $user->address()->save($address);\n\n // Seed the relation with one phone\n $phone = Phone::factory()->make();\n $user->phone()->save($phone);\n\n // Seed the relation with 15 contacts\n $contact = Contact::factory()->count(25)->make();\n $user->contacts()->saveMany($contact);\n });\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Activity::truncate();\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n $this->call(UserTableSeeder::class);\n $this->call(ActivityTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n DB::table('category_product')->truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n\n $usersQuentity = 1000;\n $categoriesQuentity = 30;\n $productsQuentity = 1000;\n $transactionsQuentity = 1000;\n\n factory(\\App\\User::class, $usersQuentity)->create();\n factory(\\App\\Category::class, $categoriesQuentity)->create();\n factory(\\App\\Product::class, $productsQuentity)->create()->each(\n function ($product){\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class, $transactionsQuentity)->create();\n\n }", "public function run()\n {\n Eloquent::unguard();\n \n $this->call('AdminMemberTableSeeder');\n $this->call('BankInfoTableSeeder');\n $this->call('LocationLookUpTableSeeder');\n $this->call('OrderStatusTableSeeder');\n $this->call('AdminRoleTableSeeder');\n\n }", "public static function setUpBeforeClass()\n {\n parent::setUpBeforeClass();\n $app = require __DIR__ . '/../../bootstrap/app.php';\n /** @var \\Pterodactyl\\Console\\Kernel $kernel */\n $kernel = $app->make(Kernel::class);\n $kernel->bootstrap();\n $kernel->call('migrate:fresh');\n\n \\Artisan::call('db:seed');\n }", "public function run()\n {\n Model::unguard();\n\n if( !User::where('email', '[email protected]')->count() ) {\n User::create([\n 'nombre'=>'Nick'\n ,'apellidos'=>'Palomino'\n ,'email'=>'[email protected]'\n ,'password'=> Hash::make('1234567u')\n ,'celular'=>'966463589'\n ]);\n }\n\n $this->call('CategoriaTableSeeder');\n $this->call('WhateverSeeder');\n $this->call('ProductTableSeeder');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n Model::unguard();\n\n $this->command->info('seed start!');\n\n // 省市县\n $this->call('RegionTableSeeder');\n // 用户、角色\n $this->call('UserTableSeeder');\n // 权限\n $this->call('PurviewTableSeeder');\n // 博文分类\n $this->call('CategoryTableSeeder');\n // 博文、评论、标签\n $this->call('ArticleTableSeeder');\n // 心情\n $this->call('MoodTableSeeder');\n // 留言\n $this->call('MessageTableSeeder');\n // 文件\n $this->call('StorageTableSeeder');\n\n $this->command->info('seed end!');\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n {\n $this->call(RolesDatabaseSeeder::class);\n $this->call(UsersDatabaseSeeder::class);\n $this->call(LocalesDatabaseSeeder::class);\n $this->call(MainDatabaseSeeder::class);\n }", "public function run()\n {\n\n Schema::disableForeignKeyConstraints(); //in order to execute truncate before seeding\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostCategoriesSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(PostsSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n\n\n }", "public function run()\n {\n // DB::table('users')->insert([\n // ['id'=>1, 'email'=>'nhat','password'=>bcrypt(1234), 'lever'=>0]\n // ]);\n // $this->call(UsersTableSeeder::class);\n // $this->call(CatTableSeeder::class);\n // $this->call(TypeTableSeeder::class);\n // $this->call(AppTableSeeder::class);\n // $this->call(GameTableSeeder::class);\n \n \n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\n\t{\n\t\t//composer require fzaninotto/faker\n\t\t\n\t\t$this->call(populateAllSeeder::class);\n\t\t\n\t}", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n Model::unguard();\n\n $faker =Faker\\Factory::create();\n\n // $this->call(UserTableSeeder::class);\n\n $this->seedTasks($faker);\n $this->seedTags($faker);\n\n Model::reguard($faker);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n $this->call([\n CountriesSeeder::class,\n ProvincesSeeder::class,\n SettingsSeeder::class,\n AdminsTableSeeder::class,\n ]);\n }" ]
[ "0.8064933", "0.7848158", "0.7674873", "0.724396", "0.7216743", "0.7132209", "0.70970356", "0.70752203", "0.704928", "0.699208", "0.6987078", "0.69839287", "0.6966499", "0.68990964", "0.6868679", "0.68468624", "0.68307716", "0.68206114", "0.6803113", "0.6803113", "0.6801801", "0.6789746", "0.6788733", "0.6788008", "0.6786291", "0.67765796", "0.67742485", "0.677106", "0.67651874", "0.6761959", "0.675823", "0.67337847", "0.6733437", "0.67295784", "0.67290515", "0.6724652", "0.67226326", "0.6722267", "0.6721339", "0.6715842", "0.67070943", "0.67060536", "0.67031103", "0.6702514", "0.6702361", "0.67017967", "0.6695973", "0.6693496", "0.66868156", "0.66837406", "0.6678434", "0.66755766", "0.66726524", "0.666599", "0.664943", "0.6640641", "0.663921", "0.66387916", "0.6636016", "0.6633116", "0.6629787", "0.6627134", "0.6625862", "0.661699", "0.66093796", "0.6602538", "0.65996546", "0.659914", "0.6596484", "0.6596383", "0.65922767", "0.65922284", "0.65913564", "0.65889347", "0.65812707", "0.65811145", "0.6579546", "0.6578819", "0.6575912", "0.65749073", "0.6574314", "0.657148", "0.65696406", "0.6568972", "0.65624833", "0.6560332", "0.6559092", "0.6557491", "0.65555155", "0.6554255", "0.65509576", "0.6548099", "0.65479296", "0.6545845", "0.65443295", "0.65434265", "0.65432936", "0.654295", "0.65426385", "0.6541781", "0.6539325" ]
0.0
-1
Creamos la funcion conectar que lo que hace es que cada vez que la llamamos nos conecta a la BD
function conectar () { $username = "root"; $password = "root"; try { $conn = new PDO ('mysql:host=localhost;dbname=its', $username, $password); } catch (Exception $errorConexion) { echo "ERROR: $errorConexion"; } return $conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function conectar() {\n //Establecer conexion con el servidor\n $this->linkId = @mysql_connect($this->servidor, $this->usuario, $this->password);\n if ($this->linkId == true) {//Si se conecto al servidor.\n //Asignar la conexion a la base de datos\n if (!mysql_select_db($this->baseDatos)) {\n throw new Exception(\"No se pudo conectar a la base de datos\");\n }\n } else {//Si no se conecto al servidro\n throw new Exception(\"No se pudo conectar al servidor\");\n }\n }", "function conectar() \n\t {\n\t\t//conectarme con el servidor de base de datos\n\t\t$con=mysql_connect($this->Servidor,$this->Usuario,$this->Clave);\n\t\t// si hubo problemas al conectarme con el servidor de base de datos\n\t\tif (!$con)\n\t\t{\n\t\t\tdie(\"Error al conectarme con el Servidor de Base de Datos\");\n\t\t}\n\t\t//Seleccionar la base de datos\n\t\t$bd=mysql_select_db($this->BaseDatos,$con);\n\t\t//error al seleccionar la base de datos\n\t\tif (!$bd)\n\t\t{\n\t\t\tdie(\"Error al seleccionar la Base de Datos\");\n\t\t}\n\t\t//almaceno la conexion en la propiedad conect\n\t\t$this->conect=$con;\n\t\t//devuelvo la conexion desde donde fue invocada\n\t\treturn true;\t\n\t}", "function conectar(){\n global $Usuario;\n global $Clave;\n global $_SESSION;\n $this->dataOrdenTrabajo->SetUserName($Usuario);\n $this->dataOrdenTrabajo->SetUserPassword($Clave);\n $this->dataOrdenTrabajo->SetDatabaseName($_SESSION['database']);\n $this->dataOrdenTrabajo->setConnected(true);\n }", "public function conectar(){\r\n try { //tratar a execucao do codigo\r\n //criar conexao com o PDO\r\n //new instanciar uma classe (gerar um novo objeto baseado na classe)\r\n $con = new PDO(\"mysql:host={$this->servidor};dbname={$this->banco};charset=utf8;\",$this->usuario, $this->senha);\r\n \r\n return $con; //retornando a conexao\r\n }catch(PDOException $msg){ // devolver mensagem caso de erro\r\n echo \"Nao possivel possivel conectar com o banco de dados {$msg->getMessage()}\";\r\n }\r\n \r\n }", "private function conectar(){\n try{\n\t\t\t$this->conexion = Conexion::abrirConexion(); /*inicializa la variable conexion, llamando el metodo abrirConexion(); de la clase Conexion por medio de una instancia*/\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage()); /*Si la conexion no se establece se cortara el flujo enviando un mensaje con el error*/\n\t\t}\n }", "function Conecta(){\n\t\t$this->conexao = @mysql_connect($this->servidor,$this->usuario,$this->senha); //varaivel link desntro desta classa recebera a conex�o\n\t\tif(!$this->conexao){\n\t\t\techo 'Falha na conex�o com o banco de dados<br>';\n\t\t\texit();\n\t\t}elseif(!mysql_select_db($this->banco,$this->conexao)){\n\t\t\techo 'Falha ao selecionar o banco de dados<br>';\n\t\t\texit();\n\t\t}\n\t}", "public function conectar()\n {\n if(!isset($this->conexion)){\n $this->conexion = (mysql_connect($this->localhost, $this->usuario,$this->password)) or die(mysql_error() );\n mysql_select_db($this->database , $this->conexion) or die(mysql_error()); \n }\n }", "private function conectarDB(){\n\t\t$dsn = 'mysql:dbname='.self::nombre_db.' ;host='.self::servidor;\n\t\ttry {\n\t\t\t#metodo abstracto para la conexion a la bd\n\t\t\t$this->_conn = new PDO($dsn, self::usuario_db, self::pwd_db);\n\t\t \t\n\t\t } catch (PDOException $e) {\n\t\t \techo \"Falló la conexión: \".$e->getMessage();\n\t\t } \n\t}", "function comprobarConexion(){\n if ($this->conexion->connect_errno) \n {\n echo \"Fallo al conectar a MySQL: (\" . $this->conexion->connect_errno . \") \" . $this->conexion->connect_error;\n }\n }", "function comprobarConexion(){\n if ($this->conexion->connect_errno) {\n echo \"Fallo al conectar a MySQL: (\" . $this->conexion->connect_errno . \") \" . $this->conexion->connect_error;\n }\n }", "function conecta_alumno($nombrebase) {\n\n // --- Realizar la conexion\n @ $db = mysqli_pconnect($mihost,\"PequeLiante\",\"H@y59ONGs\"); \n\n if (!$db){\n echo mensaje_error('No se ha podido abrir la base de datos. Inténtelo más tarde',1);\n exit;\n }\n\n // --- Abrir la base de datos\n $mibase = mysqli_select_db($nombrebase);\n\n if (!$mibase){\n echo mensaje_error('No existe la base de datos donde se almacena la información. Inténtelo más tarde',1);\n exit;\n }\n }", "function conectar(&$enlace){\r\n\t\t\t\t$enlace=mysqli_connect(\"localhost\",\"root\",\"\");\r\n\t\t\t\tif($enlace==false)\r\n\t\t\t\t\tdie (\"No puede establecer la conexión<br>\");\r\n else echo\"CONEXIÓN REALIZADA\". \"<BR>\";\r\n\t\t\t\t//Seleccionar la base de datos\r\n\t\t\t\t$seleccion=mysqli_select_db($enlace,\"universidad\");\r\n\t\t\t\tif($seleccion==false)\r\n\t\t\t\t\tdie (\"No se pudo seleccionar la base de datos<br>\");\r\n else echo\"BASE DE DATOS SELECCIONADA\". \"<BR><BR>\";\r\n\t\t\t}", "function fconectar(){\n\t\t$this->conexion = new mysqli($this->servidor, $this->usuario, $this->pwd, $this->bd);\n\t\tif ($this->conexion->connect_error) {\n \t\tdie('Error de Conexión (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);\n\t\t}\t\t\n\t}", "final public function Selado ()\n {\n if(!self::$conn)\n {\n try\n {\n self::$conn = new PDO(\n $this->param['socket'].\n \":host=\".$this->param['endereco'].\n \";dbname=\".$this->param['bdados'].\n \";charset=\".$this->param['charset'].\n \";\",$this->param['usuario']\n ,$this->param['senha']);\n self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n self::$conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n } catch (PDOException $e)\n {\n print \"***********<br/><h3>Servidor de dados não responde!. <br/><a href=''>tente novamente...</a></h3> \";\n die(\"****************************\");\n }\n }\n }", "private function conectar()\n {\n try {\n $options = [\n PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ];\n\n $this->pdo = new PDO(\"mysql:dbname=usuarios;host=localhost\", 'root', '', $options);\n\n } catch (PDOException $e) {\n echo 'Falhou: ' . $e->getMessage();\n }\n }", "function abrir_conexion()\n {\n $this->db = Conectar::conexion();\n }", "private function connect()\r\n {\r\n\r\n /**\r\n * A TENTATIVA DE CRIAR UM OBJETO COM A CONEXAO DO BANCO É FEITA\r\n */\r\n try {\r\n /**\r\n * SALVA NA VARIAVEL ESTATICA O OBJETO REFERENTE A CONEXÃO COM O BANCO.\r\n * AS VARIAVEIS QUE SAO USADAS PARA CONEXAO SÃO DA CLASSE PAI\r\n */\r\n self::$con = new PDO('mysql:host=' . $this->getHost() . ';dbname=' . $this->getDatabase() . '', $this->getUser(), $this->getPassword(), array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"));\r\n /**\r\n * DEFINE O TIPO DE MANIPULAÇÃO DE ERRO SERÁ USADO PELO PDO\r\n */\r\n self::$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n /**\r\n * CAPTURA O ERRO, SE GERADO\r\n */\r\n } catch (\\PDOException $error) {\r\n /**\r\n * O ERRO É IMPRESSO NA TELA\r\n */\r\n echo $error->getMessage();\r\n }\r\n }", "public function conectar() {\n $this->conexion=new mysqli($this->servidor, $this->usuario, $this->clave, $this->baseDatos);\n }", "private function conect(){\r\n\t\tglobal $HOST;\r\n\t\tglobal $BASEDEDATOS;\r\n\t\tglobal $USUARIO;\r\n\t\tglobal $PASS;\r\n\t\t$this->myconn = mysql_connect($HOST,$USUARIO,$PASS);\r\n\t\tif (! $this->myconn){\r\n\t\t\techo \"Error al intentar conectarse con el servidor MySQL\";\r\n\t\texit(); \r\n\t\t}\r\n\r\n\t\tif (! @mysql_select_db($BASEDEDATOS,$this->myconn)){\r\n\t\t\techo \"No se pudo conectar correctamente con la Base de datos\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t}", "function conexion(){\n\t$conn = null;\n\t$host = 'localhost';\n\t$db = 'registroacademico';\n\t$user = 'root';\n\t$pwd = '';\n\t\ntry{\n\t$conn = new PDO('mysql:host='.$host.'; dbname='.$db,$user,$pwd);\n\t//echo 'Conexion satisfactoria.<br>';\n\t\n}catch(PDOException $e){\n\techo \"<style='background-color:lightgrey'>\n\n\t\";\n\techo\"<hr>\";\n\techo '<br><center><h1 style=\"font-size:300%\"><p><font color=\"red\">¡¡No se puede conectar con la base de datos!!</font></p></h1>';\n\techo\"<embed src='../img/cad.png' heigth='50' width='50'></embed><br><br><progress id='p' max='70'> <span>0</span>%</progress><br>\";\n\techo\"<hr width='80%' color='black' size='8' /></center>\";\n\techo\"<p>Posibles causas:</p>\n\t\t<ol>\n\t\t\t<li>Conexión con el servidor pérdida. </li>\n\t\t\t<li>Base de datos no encontrada. </li>\n\t\t\t<li>Conexión expirada. </li>\n\t\t\t<li>La base de datos fue removida. </li>\n\t\t</ol>\"\n\t\t;\n\n\n\techo \"<center><h2 style='color:green'>Vuelva a intentarlo otro momento</h2></center>\";\nexit();\n\t\n}\nreturn $conn;\n\t\n}", "function conectarse()\n{\n$enlace =mysqli_connect(\"localhost\",\"Kim\", \"revick93\",\"dbweb\");//nombreservidor, usuario,contraseña,nombre base datos\nif (!$enlace)\n {\n\n\techo \"ERROR: No se pudo conectar a MYSQL\".PHP_EOL;\n\techo \"ERROR de depuracion\".mysqli_connect_error().PHP_EOL;\n\techo \"ERROR de depuracion\".mysqli_connect_error().PHP_EOL;\n\texit;\t\n\n }\n mysqli_close($enlace);\n}", "public function conectar(){\n $this->conexion = mysqli_connect($this->hostname, $this->user, $this->password, $this->database);\n }", "public static function conectar()\n {\n\n // $link->exec(\"set names utf8\");\n\n // // return $link;\n\n $link = new PDO(\"mysql:host=88.198.24.90;dbname=inventar_proyectofinal\", \"inventariosadsi\", \"SETQDnuHgv(_\");\n $link->exec(\"set names utf8\");\n return $link;\n\n $link->exec(\"set names utf8\");\n\n return $link;\n\n }", "function post_conectar()\n\t{\n\t\t//En este metodo antiguamente se incluia codigo para asegurarse que el esquema de auditoria\n\t\t//guardara el usuario conectado.\n\t}", "function conectarBD ()\n{\n\ttry {\n\t\t$pdo= new PDO('mysql:host=127.0.0.1;dbname=tareas','root','');\n\t\treturn $pdo;\n\t\t} \n\t\tcatch(PDOException $e) \n\t\t{\n\t \tdd($e->getmessage());\n\t // con el operador -> se invocan las funciones de la clase \n\t}\n}", "function Conectar(){\n\n\n\t$servername = \"127.0.0.1\";\n\t$username = \"root\";\n\t$password = \"\";\n\t$dbname = \"normalizacion_beco_web\";\n\t\n\t\n\t// Create connection\n\t$conection = new mysqli($servername, $username, $password, $dbname);\n\t// Check connection\n\tif ($conection->connect_error) {\n\t\tdie(\"Connection failed: \" . $conection->connect_error);\n\t}else {\n\t\t//echo 'Connection OK '.$conection;\n\t}\n\treturn $conection;\n}", "function conecta() {\n $conexao = mysql_connect(\"localhost\", \"root\", \"\") or die(\"Erro na conexão do banco de dados.\");\n $selecionabd = mysql_select_db(\"controlemotorista\", $conexao) or die(\"Banco de dados inexistente.\");\n return $conexao;\n }", "function dbConections () {\r\n $conexion = null; \r\n \r\n // Se inicializa variable a nul\r\n $hostname = \"BRANDONANSWER\\SQLANSWER\"; \r\n \t// Nombre del Servidor SQL Server\\Instancia, puerto\r\n // $port = 1433; \r\n // no siempre lo usa\r\n $dbname = \"tutores_ut\"; \r\n \t // Nombre de la BD\r\n //$username = \"brand\"; \r\n \t // Usuario de la BD\r\n $pw = \"\"; \r\n try {\r\n $conexion = new PDO (\"sqlsrv:Server=\".$hostname.\";Database=\".$dbname.\";Encrypt=false\"); // Se ejecutan los parametros\r\n //$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n \t }\r\n \t \r\n \t \r\n catch(PDOException $e){\r\n $msgErrorSQL = \"<div style='display:table-cell; vertical-align:middle; text-align:center'>\";\r\n $msgErrorSQL .= \"<img src='images/DB-conexion-error.png'><br />\";\r\n $msgErrorSQL .= \"La Conexión SQL Server no se pudo establecer.<br />\";\r\n $msgErrorSQL .= \"Informe al Administrador del Sistema. <br />\";\r\n $msgErrorSQL .= \"Failed to get DB handle: \" . $e->getMessage() . \"\\n\";\r\n $msgErrorSQL .= \"</div></br>\";\r\n \techo $msgErrorSQL;\r\n exit; \r\n }\r\n return $conexion;\r\n \t}", "function conectarse() {\n\t\tif(!($conexion = mysql_connect(\"localhost\", \"root\", \"\"))) {\n\t\t\techo \"Error al conectarse a la Base de datos\";\n\t\t\texit();\n\t\t}\n\t\tif(!mysql_select_db(\"precioscuidados\", $conexion)) {\n\t\t\techo \"Error al seleccionar a la Base de datos\";\n\t\t\texit();\n\t\t}\n\t\treturn $conexion;\n\t}", "function conectar(){\n // USER : u402480197_melredes\n // SENHA : K#f:S>F9o\n\n\n $host= \"mysql:host=localhost;dbname=melprotecoes\";\n $user= \"root\";\n $pass= \"\";\n\n try {\n $pdo= new PDO($host, $user, $pass);\n return $pdo;\n } catch (PDOException $e) {\n echo \"Erro de login: \" . $e->getMessage();\n } catch (Exception $e) {\n echo \"Erro: \" . $e->getMessage();\n }\n\n }", "private function conectar_base_datos(){\n\t\t$this->descriptor = mysqli_connect($this->servidor,$this->usuario,$this->pass,$this->base_datos);\n\t\tif (mysqli_connect_errno()) {\n \t\t?>\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\">\n\t\t\t\talert (\"Falló conexión al servidor:<?php printf(\"%s\\n\", mysqli_connect_error());?>\"); \n\t\t\t</script>\n\t\t\t<?\n\t\t\texit();\n\t\t}\n\t}", "function conectar()\n\t{\n $this->conexion = new \\mysqli($this->servidor,$this->usuario,$this->clave,$this->base) \n or die (\"Error de Conexion MySQL \".$this->conexion->connect_errno);\n $this->bandera = true;\n $this->conexion->set_charset(\"utf8\");\n return $this->conexion;\n }", "function conectar()\n\t\t{\n\t\t\t//$connectionInfo = array(\"Database\"=>$this->db, \"UID\"=>$this->user, \"PWD\"=>$this->pass);\n\n\t\t\t$connectionInfo = array(\"Database\"=>$this->db);\n\t\t\t$this->conexion = sqlsrv_connect($this->server,$connectionInfo);\n\t\t\tif(!$this->conexion)\n\t\t\t{\n\t\t\t\techo \"Error al Conectar\";\n\t\t\t\tdie( print_r( sqlsrv_errors(), true));\n\t\t\t}\n\t\t}", "function conectar(){\n\t$local_serve = \"localhost\"; \t // local do servidor\n\t$usuario_serve = \"root\";\t\t // nome do usuario\n\t$senha_serve = \"\";\t\t\t \t // senha\n\t$banco_de_dados = \"platzi_imobiliaria\"; \t // nome do banco de dados\n\t\n\t\n try{\n\t\t$pdo = new PDO(\"mysql:host=$local_serve;dbname=$banco_de_dados\", $usuario_serve, $senha_serve);\n\t\t$pdo->exec(\"SET CHARACTER SET utf8\");\n\t}catch(PDOException $e){\n\t\techo $e->getMessage();\n\t}\n\n\treturn $pdo;\n\n}", "static public function conectar(){\n /* SE CREA UN OBJETO LLAMADO PDO */\n $link = new PDO(\"mysql:host=localhost;dbname=sefaureo2\",\n \"jaengine_sef219\",\n \"yD$4QM4LJ2s2\");\n\n /* LA FUNCION EXEC SIRVE PARA QUE ACEPTE LOS CARACTERES LATINOS */\n $link->exec(\"set names utf8\");\n \n return $link;\n\n }", "function conectar_bd() {\n\t\t$conexion_bd = mysqli_connect(\"localhost\",\"root\",\"\",\"almacenciasa\");\n\n\t\t//verificar si la base de datos se conecto\n\t\tif( $conexion_bd == NULL){\n\t\t\tdie(\"No se pudo conectar con la base de datos\");\n\t\t}\n\t\treturn $conexion_bd;\n\t}", "function conecta_profesor($nombrebase) {\n\n // --- Realizar la conexion\n //@ $db = mysqli_pconnect($mihost,\"GranLiante\",\"S4l4d3l4M4k1nA\");\n\t@ $db = mysqli_pconnect($mihost,\"GranLiante\",\"S4l4d3l4M4k1nA\");\n\n if (!$db){\n echo mensaje_error('No se ha podido abrir la base de datos. Inténtelo más tarde',1);\n exit;\n }\n\n // --- Abrir la base de datos\n $mibase = mysqli_select_db($nombrebase);\n\n if (!$mibase){\n echo mensaje_error('No existe la base de datos donde se almacena la información. Inténtelo más tarde',1);\n exit;\n }\n }", "function conectarBD() {\n $conexion = mysqli_connect(\"localhost\", \"id10812361_root\", \"12345\", \"id10812361_sgv\");\n return $conexion;\n}", "function conexao_mysql(){\n\t\t$conexao = mysqli_connect($this->host, $this->usuario, $this->senha, $this->banco_de_dados);\n\n\t\t//ajustar o charset de comunicação entre a aplicação e o banco de dados recebe dois paramentros.\n\t\tmysqli_set_charset($conexao,'utf8');\n\n\t\t//verficar se houve algum erro de conexao com banco de dados.\n\t\t//mysqli_connect_errno = se nao for 0 existe sim um erro com banco de dados.\n\t\t//mysqli_connect_error = mensagem do erro.\n\t\tif(mysqli_connect_errno()){\n\t\t\techo 'Erro ao tentar se conectar com banco de dados:'.mysqli_connect_error();\n\t\t}\n\t\t\n\t\treturn $conexao;\n\t}", "function conectar() {\r\n\t\n\t$conexion = mysql_connect(constant(\"HOST_NAME\"),constant(\"USUARIO_BD\"),constant(\"PASS_BD\"));\r\n\tmysql_select_db(constant(\"BD\"),$conexion);\r\n\t\r\n\treturn $conexion;\r\n}", "public function conectar() \n \t{\n return $this->conex; \n \t}", "static public function conectar () {\n # tiene tres parametros\n\n $link = new PDO('mysql:host=localhost;dbname=aplicacionphp','root','');\n # var_dump($link);\n\n return $link;\n\n }", "public function conectarBD() {\n $db_host=\"127.0.0.1\"; \n $db_port=\"3306\";\n $db_name=\"exempel\"; \n $db_user=\"root\"; \n $db_pass=\"\";\n \n $conn = mysqli_connect($db_host.':'.$db_port, $db_user, $db_pass) or die (\"Error conectando a la base de datos.\");\n mysqli_select_db($conn,$db_name) or die(\"Error seleccionando la base de datos.\");\n mysqli_set_charset($conn,\"utf8\");\n return $conn;\n }", "public function connetti()\n{\n if(!$this -> attiva) // '!' � la negazione\n {\n if($connessione = mysql_connect ($this->nomehost, $this->nomeuser, $this->password) or die (mysql_error()))\n//funzione per connettersi a mysql\n {\n //sezione del database\n $selezione = mysql_select_db($this->nomedb,$connessione) or die (mysql_error()); // ci da un ID, e selezioniamo il database a cui vogliamo operare\n }\n else {\n return true;\n }\n }\t\t\t\t\n}", "public function conectar(){\r\n\t\t$this->conexion=mysqli_connect(\"localhost\",\"root\",\"\",\"digitalgamesBD\");\r\n\t\t//$this->conexion=mysqli_connect(\"52.40.90.253:3306\",\"usuario\",\"dg5\",\"digitalgamesbd\");\r\n\t\treturn $this->conexion;\r\n\t}", "public function CerrarConexion(){\n\t\t\t$close = mysqli_close($this->conexion) \n\t\t\tor die(\"Ha sucedido un error inexperado en la desconexion de la base de datos\");\n\t\t}", "function conectar(){\n\n\t\t$conec= pg_connect(\"host='\".HOST.\"' dbname=\".DBNAME.\" port=\".PORT.\" user=\".USER.\" password=\".PASSWORD) or die(\"ERROR EN LA CONEXION\".pg_last_error());\n\t\treturn $conec;\n\t}", "function dbConectionm ()\t{\r\n $conexion = null; // Se inicializa variable a nul\r\n \t\t# code...\r\n \t\t\t$usr = \"root\";\r\n \t\t$pwd = \"\";\r\n \t\t$host = \"localhost\";\r\n \t\t$db = \"soluciones_en_ti\";\r\n \t\t\r\n \t\t try {\r\n \t\t $conexion = new PDO(\"mysql:host=$host;dbname=$db;\",$usr,$pwd);\r\n //$conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n \t }\r\n \t catch(PDOException $e){\r\n echo \"Failed to get DB handle: \" . $e->getMessage();\r\n exit; \r\n }\r\n return $conexion;\r\n \t }", "function conexionBD()\r\n{\r\n\t\t\tdefine('DB_SERVER','localhost');\r\n\t\t\tdefine('DB_NAME','usuarios');\r\n\t\t\tdefine('DB_USER','root');\r\n\t\t\tdefine('DB_PASS','');\r\n\t\t\r\n\t\t\t$con = new mysqli(DB_SERVER,DB_USER,DB_PASS,DB_NAME);\r\n\t\t\tif ($con->connect_errno) \r\n\t\t\t{\r\n\t\t\t\techo \"EROOR AL CONCECTAR CON MySQL: (\" . $con->connect_errno . \") \" . $con->connect_error;\r\n\t\t\t}\r\n}", "function conectar(){\n $this->conexion_bd = pg_connect(\"host=190.109.100.36 port=5432 dbname=scdat user=postgres password=invepal1nv3p4l\") or die('No pudo conectarse: ' . pg_last_error());\n// $this->conexion_bd = pg_connect(\"host=localhost port=5432 dbname=scdat user=postgres password=l4v1rg3n\") or die('No pudo conectarse: ' . pg_last_error());\n return ($this->conexion_bd);\n }", "public function Cl_Conexion() {\r\n try {\r\n $this->cone= mysqli_connect($this->host, $this->usuario, $this->password, $this->base);\r\n } catch (Exception $ex) {\r\n echo $exc->getTraceAsString();\r\n }\r\n }", "function getBd(){\n $cnx = connexion();\n return $cnx;\n}", "public function getConnexion(){\n $this->connexion = null; \n try{\n $this->connexion = new PDO('mysql:host=' . $this->host . ';dbname=' . $this->name,\n $this->user, $this->pass, array(PDO::MYSQL_ATTR_INIT_COMMAND =>'SET NAMES UTF8', \n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING, PDO::ATTR_EMULATE_PREPARES, false));\n }catch (PDOException $e){\n echo 'false';\n\n }\n }", "function conectarse(){\r\n $servidor=\"localhost\";\r\n $usuario=\"root\";\r\n $password=\"\";\r\n $bd=\"whdig\";\r\n \r\n $conectar = new mysqli($servidor,$usuario,$password,$bd);\r\n \r\n if($conectar->connect_errno){\r\n printf(\"Connect failed: %s\\n\",$conectar->connect_error);\r\n exit();\r\n }else{\r\n \r\n return $conectar;\r\n }\r\n}", "private static function Conectar() {\n try {\n if (self::$Connect == null):\n $dsn = 'mysql:host=' . self::$Host . ';dbname=' . self::$Dbsa;\n $options = [ PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8'];\n self::$Connect = new PDO($dsn, self::$User, self::$Pass, $options);\n endif;\n } catch (PDOException $e) {\n PHPErro($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine());\n die;\n }\n\n self::$Connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return self::$Connect;\n }", "function conbd()\r\n{\r\n \r\n //se pone localhost root y sin contraseña porque ahora estamos usando la base de datos local\r\n\t$con = mysqli_connect(\"localhost\",\"root\",\"\",\"escandallos\");\r\n //$con = mysql_connect(\"localhost\",\"escandal\",\"Xrb9lr3Z76\");\r\n\tif (!$con) die(\"No se puede conectar con el servidor\");\r\n //aqui se pone el nombre de la base de datos a la que queremos conectarnos\r\n\t//$base=mysql_select_db(\"escandallos\",$con);\r\n //$base=mysql_select_db(\"escandal_escandallos\",$con);\r\n\t//if (!$base) die(\"No se puede conectar con la BD\");\r\n\treturn $con;\r\n}", "function Conecta() {\r\n $conexao = mysqli_connect(\"mysql.hostinger.com.br\", \"u172114687_admin\", \"00Lavaauto\", \"u172114687_dados\");\r\n return $conexao;\r\n }", "function conectarMyStop(){\n \n /* 000webhost\n $host = \"localhost\";\n $dbname = \"id12882445_mystopslz\";\n $user = \"id12882445_gustavo\";\n $password = \"l33t.m4st3r\";\n */\n\n /* Hostinger */\n $host = \"localhost\";\n $dbname = \"u891197946_mystop\";\n $user = \"u891197946_gustavo\";\n $password = \"l33t.m4st3r\";\n \n \n try{\n \n $dsn = 'mysql:host='.$host.';dbname='.$dbname.';charset=utf8';\n \n $conn = new PDO($dsn, $user, $password, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n //$conn->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND = \"SET NAMES utf8\");\n \n \n }catch(PDOException $exception){\n \n die(\"<br><br>Não foi possível se conectar com a base de dados - \".$dbname);\n \n }\n \n return $conn;\n \n \n }", "function conectar() {\n try {\n $dsn = 'mysql:dbname=' . DB_NAME . ';host=' . HOST;\n $conexion = new PDO($dsn, USER, PASSWORD);\n $conexion->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n return $conexion;\n } catch (PDOException $ex) {\n logger($ex->getMessage());\n return false;\n }\n}", "public function Iniciar(){\n $resp = false;\n $conexion = mysqli_connect($this->getHOSTNAME(),$this->getUSUARIO(),$this->getCLAVE(),$this->getBASEDATOS());\n if ($conexion){\n if (mysqli_select_db($conexion,$this->getBASEDATOS())){\n $this->setCONEXION($conexion);\n unset($this->QUERY);\n unset($this->ERROR);\n $resp = true;\n } else {\n $error = mysqli_errno($conexion) . \": \" . mysqli_error($conexion);\n $this->setERROR($error); \n }\n }else{\n $error = mysqli_errno($conexion) . \": \" . mysqli_error($conexion);\n $this->setERROR($error); \n }\n return $resp;\n }", "function conectar($servidor,$usuario,$contras,$base){\n $link=mysql_connect($servidor,$usuario,$contras) or die (\"Can't connect to the Database Server\");\n $conect=mysql_select_db($base,$link) or die (\"Can't find the database\");\n return $conect;\n }", "function conexion($nombre,$apellido,$email,$credit,$card,$cvv,$dat,$street,$city,$state,$zip\n ,$pais,$phone,$code)\n {\n//intente mientras\n try{\n $base=new PDO('mysql:host=localhost; dbname=registro','root','');// conexion a la base de datos\n $base->exec('SET CHARACTER SET UTF8');\n $sql ='insert into registro (nombre,apellido,email,credit,card,cvv,dat,street,city,state,zip,pais,phone,code)\n values(:nombre, :apellido, :email, :credit, :card, :cvv, :dat, :street, :city, :state, :zip, :pais, :phone, :code)';//insetando datos a la base de datos\n $resultado=$base->prepare($sql);\n $resultado->execute(array(':nombre'=>$nombre, ':apellido'=>$apellido, ':email'=>$email, ':credit'=>$credit\n , ':card'=>$card, ':cvv'=>$cvv, ':dat'=>$dat, ':street'=>$street, ':city'=>$city, ':state'=>$state, ':zip'=>$zip\n , ':pais'=>$pais, ':phone'=>$phone, ':code'=>$code));// guardar los datos en un arreglo\nif(empty($resultado)){\n echo \"Dato insertado\";\n\n}\n\n }catch(Exception $e){\n echo 'Error: '.$e->Getmessage();\n }\n\n }", "public function ConectarBDD(){\r\n $this->conexion=pg_connect('dbname=sanjuanitas user=DBA password=12345678');\r\n if(!$this->conexion){\r\n echo json_encode(\"Error al intentar conectar la base de datos\");\r\n }\r\n }", "function consultaUsuario($conexion){\n $resultado = $conexion->query(\"SELECT * FROM usuario\");\n return $resultado;\n}", "private static function conectar()\n {\n include_once 'config.php';\n try {\n $con = new PDO(DSN, USER, PASS);\n //Cambiamos sus atributos\n $con->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); //Desactivamos la emulación de preparadas\n $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); //Establecemos modo error para lanzar excepciones\n return $con;\n } catch (PDOException $e) {\n die('No he podido conectarme a la BD Error: ' . $e->getMessage() . 'Línea: ' . $e->getLine());\n }\n }", "function conexion(){\n $server = \"localhost\";\n $user = \"root\"; \n $pass = \"\";\n\n //$conexion = new mysqli($server, $user, $pass);\n try{\n $conexion = new PDO('mysql:host=localhost;dbname=tarea02', $user, $pass);\n // echo \"conexion exitosa\";\n } catch (PDOException $e) {\n print \"¡Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n}", "private function openConnexion()\n {\n try {\n $bdd = new PDO($this->db, $this->login, $this->pass);\n $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $bdd->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n $this->connec = $bdd;\n // return $this->connec;\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "public static function connect(){\n\n// con el this obtengo valores de fuera de esta funcion, luego a la variable se instancia con los valores de la conexion\n\t\t\t$connection_db = new mysqli (DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n// este if es para obtener datos en caso de tener algun error\n\t\t\tif($connection_db->connect_errno){\n\n\t\t\t\techo \"Fallo la conexion a la base de datos: \" . $connection_db->connect_error;\n\t\t\t\treturn;\n\t\t\t}// else{\n\t\t\t// \techo \"Conexion exitosa\";\n\t\t\t// \treturn $connection_db;\n\t\t\t// } solo en caso de querer probar el exito de la conexion\n\n// el charset es por si en la base de datos hay comas aqui se muestren tambien\n\t\t\t$connection_db->set_charset(DB_CHARSET);\n\t\t}", "function abrirBanco(){\n $conexao = new mysqli(\"localhost\",\"root\",\"\",\"banco\");\n return $conexao;\n }", "function abrirBanco(){\n $conexao = new mysqli(\"localhost\",\"root\",\"\",\"banco\");\n return $conexao;\n }", "public function conectar(){\n\t\t\t\n\t\t\t\n\t\t\t$host = \"localhost\";\n\t\t\t$user = \"root\";\n\t\t\t$password = \"\";\n\t\t\t$database = \"ssca\";\n\t\t\t\n\t\t\n\t\t\t$conexion = mysqli_connect($host, $user, $password);\n\t\t\tmysqli_select_db($conexion, $database);\n\t\t\treturn $conexion;\n\t\t}", "function conexion(){\n $server = \"localhost\";\n $user = \"root\"; \n $pass = \"\";\n\n //$conexion = new mysqli($server, $user, $pass);\n try{\n $conexion = new PDO('mysql:host=localhost;dbname=tarea02', $user, $pass);\n echo \"conexion exitosa\";\n } catch (PDOException $e) {\n print \"¡Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n}", "function conexion (){\r\n\t\t\r\n\t\ttry{\r\n\t\t\t$conexion=new PDO('mysql:host=localhost; dbname=socor', 'root', '');\r\n\t\t\t$conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t\t$conexion->exec(\"SET CHARACTER SET UTF8\");\t\t\t\r\n\t\t}catch(exception $e){\r\n\t\t\tdie(\"error gafo\" . getMessage());\t\t\t\r\n\t\t\techo \"linea del error gafo \" . $e->getLine();\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\treturn $conexion;\t\t\r\n\t}", "function getConnexion($identifiant, $mdp) {\r\n $connexion =\"\";\r\n\t$PARAM_nom_bd = 'suivisio'; // le nom de votre base de données\r\n\t$PARAM_utilisateur = $identifiant; // nom d'utilisateur pour se connecter\r\n\t$PARAM_mot_passe = $mdp; // mot de passe de l'utilisateur pour se connecter\r\n\t$PARAM_hote = 'localhost'; // le chemin vers le serveur\r\n\t$pdo_option[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES\\'UTF8\\'';\r\n\ttry {\r\n\t $connexion = new PDO(\"mysql:host=$PARAM_hote;dbname=$PARAM_nom_bd\", $PARAM_utilisateur, $PARAM_mot_passe, $pdo_option);\r\n $connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n \r\n } catch (PDOException $e) {\r\n\t echo \"<br/>Problème \";\r\n\t $erreur = $e->getCode();\r\n\t $message = $e->getMessage();\r\n\t echo \"erreur $erreur $message\\n\";\r\n\t}\r\n\r\n\r\n\treturn $connexion;\r\n}", "function abreConexao()\r\n {\r\n \t//Senha do MySQL\r\n \t//Nome de usuário do MySQL\r\n \t//Nome do banco de dados MySQL\r\n \treturn @ mysqli_connect(\"sql111.epizy.com\",\"epiz_22699421\",\"GlH4gylH7AX\", \"epiz_22699421_confeccao\");\r\n }", "function conexao() {\n $conexao = mysqli_connect(\"localhost\", \"root\", \"\", \"gerenciador\");\n \n return $conexao;\n}", "public static function conectar()\n\t\t{\n\t\t\treturn self::conexao('post');\n\t\t}", "function conectar($servidor=\"\",$usuario=\"\",$password=\"\",$bdatos=\"\"){\r\n\t\t/*if($this->modo == \"1\"){\r\n\t\t\t$this->auditoria = false;\r\n\t\t}#end if*/\r\n\r\n\t\tif($this->modo == \"\"){\r\n\t\t\t$this->bdatos = C_BDATOS_2;\r\n\t\t\t$this->usuario = C_USUARIO_2;\r\n\t\t\t$this->password = C_PASSWORD_2;\r\n\t\t}//end if\r\n\r\n\t\tif($this->modo == \"2\"){\r\n\t\t\t$this->bdatos = C_BDATOS_3;\r\n\t\t\t$this->usuario = C_USUARIO_3;\r\n\t\t\t$this->password = C_PASSWORD_3;\r\n\t\t}//end if\r\n\t\t\r\n\t\t\r\n\t\tif ($servidor!=\"\"){\r\n\t\t\t\t$this->servidor = $servidor;\r\n\t\t}// end if\r\n\t\tif ($usuario!=\"\"){ \r\n\t\t\t\t$this->usuario = $usuario;\r\n\t\t}// end if\r\n\t\tif ($password!=\"\"){\r\n\t\t\t\t$this->password = $password;\r\n\t\t}// end if\r\n\t\tif ($bdatos!=\"\"){\r\n\t\t\t\t$this->bdatos = $bdatos;\r\n\t\t}// end if\r\n\r\n\t\tif($this->imprimir_conexion==true and $this->ip_imprimir_conexion!=\"\"){\r\n\t\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR'] ) && $_SERVER['HTTP_X_FORWARDED_FOR'] == $this->ip_imprimir_conexion){\r\n\t\t\t\t//echo \" <br>--> (\".$this->servidor.\", \".$this->usuario.\", \".$this->password.\", \".$this->query.\")\";\r\n\t\t\t//\techo \" <br>--> (\".$this->servidor.\", \".$this->usuario.\", \".$this->password.\")<br>\".$this->query.\"<hr>\";\r\n\t\t\t}#end if\r\n\t\t}#end if\r\n\r\n\t\t//echo \"<div style=\\\"z-index:10;width:auto;position:relative;height:auto;background-color:#FFF;border:#F00 solid 2px;margin:5px;display:block;\t\\\"> (\".$this->servidor.\", \".$this->usuario.\", \".$this->password.\")<br>\".$this->query.\"</div>\";\r\n\t\t//echo \" <br><br>\".$this->query.\"<hr>\";\r\n\t\t//die;\r\n\t\t//$this->servidor = \"172.17.2.31\";\r\n\t\t//exit;\r\n\t\t$cn = false;\r\n\t\t$this->conexion = mysqli_connect($this->servidor,$this->usuario,$this->password,$this->bdatos); \r\n\t\tif (mysqli_connect_errno()) {\r\n\t\t printf(\"Error en conexión: %s\\n\", mysqli_connect_error());\r\n\t\t exit();\r\n\t\t}else{\r\n\t\t\t$this->estado = true;\r\n\t\t}\r\n }", "public function guardar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n switch ($datosCampos[\"acceso\"]) {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n $datosCampos[\"pass\"] = sha1(\"123\"); //agrego la contraseña en sha1 para que solicite el cambio cada vez que se cree un usuario\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza transaccion\n $rtaVerifUser = $this->refControladorPersistencia->ejecutarSentencia(\n $guardar->verificarExistenciaUsuario($tabla, $datosCampos[\"usuario\"])); //verifico si ya hay un usuario con ese nombre \n $existeUser = $rtaVerifUser->fetch(); //paso a un array\n $this->refControladorPersistencia->get_conexion()->commit(); //cierro\n if ($existeUser[0] == '0') {//solamente si el usuario no existe se comienza con la carga a la BD\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $arrayCabecera = $guardar->meta($tabla); //armo la cabecera del array con los datos de la tabla de BD\n $sentencia = $guardar->armarSentencia($arrayCabecera, $tabla); //armo la sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos); //armo el array con los datos de la vista y los datos que obtuve de la BD \n array_shift($array); //remuevo el primer elemento id si es nuevo se genera automaticamente en la BD\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array); //genero la consulta\n $this->refControladorPersistencia->get_conexion()->commit();\n $this->refControladorPersistencia->get_conexion()->beginTransaction();\n $ultimo = $guardar->buscarUltimo($tabla);\n $idUser = $this->refControladorPersistencia->ejecutarSentencia($ultimo); //busco el ultimo usuario para mostrarlo en la vista \n $id = $idUser->fetchColumn(); //array \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id); //busco el usuario\n return $respuesta; //regreso\n } else {\n return $id = [\"incorrecto\" => \"incorrecto\"]; //si hubo un error volvemos a vista y corregimos\n }\n }", "function conectarse(){\r\n\tif(!($link=mysql_connect(\"mysql.webcindario.com\",\"mundoweb5\",\"a1sistemab2web\"))){\r\n\t\techo \"Error al conectarse al servidor\";\r\n\t\texit();\r\n\t}\r\n\t//verificación de la base de datos\r\n\tif(!mysql_select_db(\"mundoweb5\",$link)){\r\n\t\techo \"Error al seleccionar la Base de Datos\";\r\n\t\texit();\r\n\t}\r\n\treturn $link;//retorna la variable tipo conexión.\r\n}", "function conexion()\n{\n /*$con= mysql_connect(\"localhost\",\"root\",\"\");\n mysql_select_db(\"bd_conal_\",$con);*/\n $con=mysql_connect(\"conaldb.db.12058720.hostedresource.com\",\"conaldb\",\"nC15@ags\");\n mysql_select_db(\"conaldb\",$con);\n date_default_timezone_set(\"Mexico/General\");\n mysql_set_charset('utf8');\n if (!$con) {\n die('No pudo conectarse: ' . mysql_error());\n }\n}", "public function Conecta()\n\t{\n\t\t$this->conn = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->database, $this->user, $this->password);\n\n\t}", "function transaccion(){\n\t\t\t$this->conexion = new conexion();\n\t\t\t$this->conn = $this->conexion->enlace();\n\t\t}", "public function abrirConexion(){\n if($this->conexion == null){\n $cls_conexion = new cls_conexion();\n $this->conexion = $cls_conexion->conectar();\n }\n }", "function abrirConexion() {\n\n // remote\n\n \n $server = \"b1gtrg162sfxnptw1ej0-mysql.services.clever-cloud.com\";\n $username = \"ua3vfykjoh8vdshz\";\n $password = \"jPz18bzSnP2YAeEXTS8f\";\n $database = \"b1gtrg162sfxnptw1ej0\"; \n\n // local\n\n /*\n $server = \"localhost\";\n $username = \"root\";\n $password = \"\";\n $database = \"modelosin\"; */\n\n try {\n $connection = new PDO(\"mysql:host=$server;dbname=$database;\", $username, $password);\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $connection;\n\n } catch (PDOException $e) {\n die(\"Connection failed: \" . $e->getMessage());\n }\n}", "function conectarte_externo()\n{\nmysql_connect(\"www.sierrasur.gob.pe\",\"psierras_masters\",\"rumpeltinsky\") or die(\"Error:Servidor sin conexion\");\nmysql_select_db(\"psierras_usuario\") or die(\"Error:Base de datos sin conexion & No disponible\");\n}", "public function conectarBanco(){\n try{\n //instanciamos a classe nativa PDO\n $conexao = New PDO(\n //driveconexao: host=nome_host;dbname=nome_banco, \n \"mysql:host=$this->host;dbname=$this->dbname\",\n \"$this->usuario\",\n \"$this->senha\"\n );\n\n return $conexao;\n\n } catch (PDOException $e) {\n echo '<p>' . $e->getMessage() . '</p>';\n\n }\n }", "function getConexion(){\r\n try{\r\n $conexion = new mysqli($this->host.\":\".$this->port, $this->user, $this->pass, $this->base);\r\n if($conexion->connect_errno){\r\n $conexion = \"SIN CONEXION A LA BASE DE DATOS: \".$conexion->connect_errno.\" - \".$conexion->connect_error;\r\n }\r\n }catch(Exception $ex){\r\n $conexion = \"Excepcion en la conexion: \".$ex->getMessage(); \r\n } \r\n return $conexion;\r\n }", "public function __construct(){\n $this->conectado = $this->conectar();\n }", "public function conectar(){\r\n\t\t\t$con = mysqli_connect(HOST,USER,PASS,DB);\r\n\t\t\treturn $con;\r\n\t\t}", "function db_connnect()\n {\n global $db;\n @ $db = new mysqli('localhost', 'user', '1234', 'gruppef');\n global $db_is_connected;\n if (mysqli_connect_errno())\n {\n $db_is_connected = false;\n consol_message(\"Error: Could not connect to database. Please try again later.\");\n return;\n }else{\n $db_is_connected = true;\n $db->query(\"SET CHARACTER SET utf8\");\n }\n return;\n }", "function fdesconectar(){\n\t\t$this->conexion->close();\n\t\t$this->conexion=\"\";\n\t\t$this->error=\"\";\n\t}", "function dataBaseConection( ) {\n try{\n $db = new PDO(motor.\":host=\".pc.\"; dbname=\".dbname.\"; port=\".port ,dbuser, dbpasswd);\n return $db;\n }\n catch( PDOException $pdoException ){\n echo \"<br>\";\n echo \"La conexion fallo: \". $pdoException->getMessage();\n }\n}", "function consultar()\n{\n global $conexao, $tipoServicos;\n\n $tipoServicos = $conexao->query(\"SELECT * FROM tipoServico\") or die($conexao->error);\n}", "public function exposConEntrada(){\n\t\t$query = sprintf(\"SELECT * FROM Eventos EV, Entradas EN WHERE EV.id=EN.id_evento AND EN.id_usuario=%d\", $this->id);\n\t\t$obras = self:: consulta($query);\n\t\treturn $obras;\n\t}", "public function conectionDB(){\n $mysqlConnect = \"mysql:host=$this->dbHost;dbname=$this->dbName\";\n $dbConnection = new PDO($mysqlConnect,$this->dbUser,$this->dbPass);\n $dbConnection -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $acentos = $dbConnection->query(\"SET NAMES 'utf8'\");\n return $dbConnection;\n\n }", "function db_conectar(){\n\t$servername = \"localhost\";\n\t\n\t$username = \"mianbr1718\";\n\t$password = \"mA29PIX8\";\n\t$dbname = \"mianbr1718\";\n\n\t// $servername = \"localhost\";\n\t// $username = \"root\";\n\t// $password = \"admin\";\n\t// $dbname = \"mianbr1718\";\n\n\n\t$conn = new mysqli($servername, $username, $password, $dbname);\n\t$conn->set_charset(\"utf8\");\n\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t}\n\treturn $conn;\n}", "function conectDataBase() {\n\n $server_name = 'mysql';\n $user = 'secundario';\n $password = 'Usu@r1o';\n $db_name = 'biblioteca';\n\n $conn = mysqli_connect($server_name,$user,$password,$db_name);\n\n if(!$conn) {\n die('A conexão falhou: ' . mysqli_connect_error());\n }\n else {\n return $conn;\n }\n\n return false;\n}", "function conectar(){\n\t\t$mysqli = new mysqli ( \"localhost\", \"root\", \"root\", \"peluqueria\");\n\t\tif ($mysqli->connect_errno) {\n\t\t\techo \"Fallo la conexión con MySQL: (\" . $mysqli->connect_errno . \") \" . $mysqli->connect_error;\n\t\t}\n\t\treturn $mysqli;\n\t}", "function connetti(&$db) {\n\tglobal $host, $user, $pass, $nomedb;\n\t$db = new mysqli($host, $user, $pass, $nomedb);\n\tif (mysqli_connect_errno()) {\n\t\techo 'Connessione fallita';\n\t\texit ;\n\t}\n}" ]
[ "0.78118795", "0.77473384", "0.76412624", "0.7637855", "0.7601001", "0.75909334", "0.7527579", "0.74947864", "0.7459641", "0.7431038", "0.7416699", "0.7364512", "0.7351252", "0.73281336", "0.73255277", "0.7319834", "0.7298542", "0.729603", "0.72717613", "0.72499436", "0.72422636", "0.7239792", "0.7231478", "0.72074246", "0.72013265", "0.7187077", "0.71829474", "0.7174761", "0.7108007", "0.70972764", "0.7082249", "0.7070682", "0.705035", "0.7044453", "0.70428014", "0.7030215", "0.7011365", "0.70024455", "0.7000153", "0.69885737", "0.6976479", "0.6972346", "0.6961417", "0.6935272", "0.69350255", "0.6908752", "0.6906335", "0.6892169", "0.6890465", "0.68869156", "0.6880971", "0.6879497", "0.6877462", "0.68696845", "0.6863327", "0.6856765", "0.6850916", "0.68401915", "0.6837285", "0.6831957", "0.6827724", "0.67983574", "0.6790775", "0.6784027", "0.6778963", "0.677201", "0.6771566", "0.67703503", "0.6767108", "0.6767108", "0.6764157", "0.6755614", "0.67545617", "0.6751065", "0.6737831", "0.67328805", "0.6731076", "0.672836", "0.67258674", "0.6719159", "0.669419", "0.6689244", "0.6686325", "0.6682395", "0.66760576", "0.66746455", "0.66735536", "0.66618145", "0.665355", "0.6649644", "0.66434", "0.6634808", "0.6632637", "0.6631193", "0.66235316", "0.6621119", "0.6620721", "0.66172874", "0.66023815", "0.65992546" ]
0.69321287
45
Grabbing variables from $t_args
function Page_Rank_Constant_State(array $t_args) { $className = $t_args['className']; ?> using namespace arma; using namespace std; class <?=$className?>ConstantState { private: // The current iteration. int iteration; // The number of distinct nodes in the graph. long num_nodes; wall_clock timer; public: friend class <?=$className?>; <?=$className?>ConstantState() : iteration(0), num_nodes(0) { timer.tic(); } }; <? return [ 'kind' => 'RESOURCE', 'name' => $className . 'ConstantState', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function get_args();", "function get_args($request)\n {\n }", "function get_args($request)\n {\n }", "function init_args()\r\n{\r\n $_REQUEST = strings_stripSlashes($_REQUEST);\r\n\r\n // if any piece of context is missing => we will display nothing instead of crashing WORK TO BE DONE\r\n $args = new stdClass();\r\n $args->tplan_id = isset($_REQUEST['tplan_id']) ? $_REQUEST['tplan_id'] : $_SESSION['testplanID'];\r\n $args->tproject_id = isset($_REQUEST['tproject_id']) ? $_REQUEST['tproject_id'] : $_SESSION['testprojectID'];\r\n $args->tcase_id = isset($_REQUEST['tcase_id']) ? $_REQUEST['tcase_id'] : 0;\r\n $args->tcversion_id = isset($_REQUEST['tcversion_id']) ? $_REQUEST['tcversion_id'] : 0;\r\n return $args; \r\n}", "public function getArgs();", "public function getArgs();", "function tidyt_set_global_settings($args = array()) {\n\n $GLOBALS['tidyt_args'] = $args;\n // foreach($args as $key=>$value){\n // }\n\n}", "private function extractArguments(array $arguments)\n {\n $this->namespace = Arr::get($arguments, 0);\n $this->entity = Arr::get($arguments, 1);\n $this->view = Arr::get($arguments, 2);\n $this->name = Arr::get($arguments, 3);\n }", "function getArguments() ;", "function prepare_args($args)\n {\n }", "protected function getSplatCallVars($args)\n {\n $isSplatCall = false;\n $variables = [];\n foreach ($args as $arg) {\n if ($arg->unpack) {\n $isSplatCall = true;\n }\n $variables[] = $arg->value;\n }\n if (! $isSplatCall) {\n return;\n }\n return $variables;\n }", "private function getTemplateArgs(): array\n {\n $starting_view = preg_replace('/([^\\w \\-\\@\\.\\,])+/', '', $_POST['starting_view']);\n $envelope_id= isset($_SESSION['envelope_id']) ? $_SESSION['envelope_id'] : false;\n $args = [\n 'envelope_id' => $envelope_id,\n 'account_id' => $_SESSION['ds_account_id'],\n 'base_path' => $_SESSION['ds_base_path'],\n 'ds_access_token' => $_SESSION['ds_access_token'],\n 'starting_view' => $starting_view,\n 'ds_return_url' => $GLOBALS['app_url'] . 'index.php?page=ds_return'\n ];\n\n return $args;\n }", "function readCommandLineArgs(&$xgettextArgs, &$twigTemplates) {\n\t\t$argv = $_SERVER['argv'];\n\t\t$fileArgTagBegins = false;\n\t\tfor ($i = 1; $i < count($argv); $i++) {\n\t\t\t$arg = $argv[$i];\n\t\t\tif ($arg == '--files') {\n\t\t\t\t$fileArgTagBegins = true;\n\t\t\t} else if ($fileArgTagBegins) {\n\t\t\t\t$twigTemplates[] = trim($arg, '\"');\n\t\t\t} else {\n\t\t\t\t$xgettextArgs[] = $arg;\n\t\t\t}\n\t\t}\n\t}", "private function getTemplateArgs(): array\n {\n $envelope_id= isset($_SESSION['envelope_id']) ? $_SESSION['envelope_id'] : false;\n $args = [\n 'account_id' => $_SESSION['ds_account_id'],\n 'base_path' => $_SESSION['ds_base_path'],\n 'ds_access_token' => $_SESSION['ds_access_token'],\n 'envelope_id' => $envelope_id\n ];\n\n return $args;\n }", "public function args(){\n return $this->args;\n }", "private static function arguments() {\n\t\treturn apply_filters(\n\t\t\t'drsa_post_type_args', array(\n\t\t\t\t'labels' => self::labels(),\n\t\t\t\t'public' => false,\n\t\t\t\t'publicly_queryable' => false,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'query_var' => true,\n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'has_archive' => false,\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'menu_position' => null,\n\t\t\t\t'menu_icon' => 'dashicons-pressthis',\n\t\t\t\t'supports' => array( 'title', 'author', 'thumbnail' ),\n\t\t\t\t'capability_type' => apply_filters( 'drsa_ad/cpt/capability_type', 'post' ),\n\t\t\t)\n\t\t);\n\t}", "private function prepareArgs(){\n\t\t$nro_arguments \t = $this->webPathNumber + 3;\n\t\t$this->argsArray = array_slice(explode('/',$this->uri), $nro_arguments);\n\t}", "public function parse($args){\n $param_double=[] ; // --param=value or --param value or --param\n $param_extra=null;\n $cont=0; \n foreach($args as $argument){\n $cont++;\n if(preg_match('/^--(\\w+)=(.*)$/', $argument, $match)){\n $parameter=$match[1];\n $value=$match[2];\n $param_double[$parameter]=$value ;\n }elseif(preg_match('/^--(\\w+)$/', $argument, $match)){\n $parameter=$match[1];\n $param_double[$parameter]=null;\n }elseif(preg_match('/^-(help|h)$/', $argument, $match)){\n //$parameter=$match[1];\n $param_extra='help';\n }elseif(preg_match('/^\\w+$/',$argument,$match) && $cont==1){\n //echo \"aca: \".print_r($match,1);\n $param_extra=$match[0] ;\n }\n }\n return [ $param_double , $param_extra ];\n }", "public function get_args(){ \n\t\n\t\t$args = $this->get_default_args();\n\t\t\n\t\tforeach( $this->args as $key => $value ){\n\t\t\t\n\t\t\t$args[ $key ] = $value;\n\t\t\t\n\t\t} // end foreach\n\t\n\t\treturn $args;\n\t\t \n\t}", "public function getArgs(){\n\t\t\treturn $this->matchingRoute->getParam($this->url->getLastPartOfUrl());\n\t\t}", "function a(){ \n return $arg_list = func_get_args(); \n \n }", "abstract public static function args();", "private function setArgs(){\n\t\t$this->args = array(\n\t\t\t'label' => $this->label,\n\t\t\t'labels' => $this->labels,\n\t\t\t'description' => $this->description,\n\t\t\t'public' => $this->public,\n\t\t\t'exclude_from_search' => $this->excludeSearch,\n\t\t\t'publicly_queryable' => $this->publiclyQueryable,\n\t\t\t'show_ui' => $this->show_ui ,\n\t\t\t'show_in_nav_menus' => $this->showInNavMenus,\n\t\t\t'show_in_menu' => $this->showInMenu,\n\t\t\t'show_in_admin_bar' => $this->showInAdminBar,\n\t\t\t'menu_position' => $this->menuPosition,\n\t\t\t'menu_icon' => $this->menuIcon,\n\t\t\t'capability_type' => $this->capabilityType,\n\t\t\t'map_meta_cap' => $this->mapMetaCap,\n\t\t\t'hierarchical' => $this->hierarchical,\n\t\t\t'supports' => $this->supports,\n\t\t\t'register_meta_box_cb' => $this->registerMetaBoxCb,\n\t\t\t'taxonomies' => $this->taxonomies,\n\t\t\t'has_archive' => $this->hasArchive,\n\t\t\t'permalink_epmask' => $this->permalinkEpmask,\n\t\t\t'rewrite' => $this->rewrite,\n\t\t\t'query_var' => $this->queryVar,\n\t\t\t'can_export' => $this->canExport,\n\t\t\t'_builtin' => $this->builtin\n\t\t);\n\t}", "public function args()\n {\n return $this->arguments->get();\n }", "function additional_options_for_arguments(&$view) {\n $options = array();\n\n $arguments = $view->display_handler->get_handlers('argument');\n\n if (is_array($arguments)) {\n foreach ($arguments as $arg_id => $argument) {\n foreach ($this->view_key_from_arguments() as $class) {\n if (is_a($argument, $class)) {\n // This argument can provide us with keys.\n $options['__arg:' . $arg_id] = t('Value from argument: %title', array('%title' => $argument->ui_name()));\n }\n }\n }\n }\n\n return $options;\n }", "function get_args( array $consts, array $vars ){\n\t\t$args = array();\n\t\t// limit depth of search to avoid collecting nested func calls\n\t\t$argnodes = $this->get_nodes_by_symbol( NT_ARG, 3 );\n\t\tforeach( $argnodes as $i => $arg ){\n\t\t\t$args[] = $arg->compile_string( $consts, $vars );\n\t\t}\n\t\treturn $args;\n\t}", "public function args(): array{\n\t\treturn [\n\t\t\t'name' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t],\n\t\t\t'from' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t],\n\t\t\t'to' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t],\n\t\t\t'store' => [\n\t\t\t\t'type' => Type::int(),\n\t\t\t],\n\t\t\t'terminal' => [\n\t\t\t\t'type' => Type::int(),\n\t\t\t],\n\t\t\t'user' => [\n\t\t\t\t'type' => Type::int(),\n\t\t\t],\n\t\t\t'limit' => [\n\t\t\t\t'type' => Type::int(),\n\t\t\t],\n\t\t\t'page' => [\n\t\t\t\t'type' => Type::int(),\n\t\t\t],\n\t\t\t'sort' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t],\n\t\t\t'desc' => [\n\t\t\t\t'type' => Type::string(),\n\t\t\t],\n\n\t\t];\n\t}", "function init_args(&$tplan_mgr)\r\n{\r\n $iParams = array(\"format\" => array(tlInputParameter::INT_N),\r\n \"tplan_id\" => array(tlInputParameter::INT_N));\r\n\r\n $args = new stdClass();\r\n R_PARAMS($iParams,$args);\r\n \r\n $args->show_platforms = false;\r\n $args->tproject_id = intval(isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0);\r\n\r\n $args->tplan_name = '';\r\n if(!$args->tplan_id)\r\n {\r\n $args->tplan_id = intval(isset($_SESSION['testplanID']) ? $_SESSION['testplanID'] : 0);\r\n }\r\n \r\n if($args->tplan_id > 0)\r\n {\r\n $tplan_info = $tplan_mgr->get_by_id($args->tplan_id);\r\n $args->tplan_name = $tplan_info['name']; \r\n $args->show_platforms = $tplan_mgr->hasLinkedPlatforms($args->tplan_id);\r\n }\r\n \r\n return $args;\r\n}", "function extraVars() {\n\t\tif (func_num_args()) {\n\t\t\tif (is_array(func_get_arg(0))) {\n\t\t\t\t$this->_extraVars = func_get_arg(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_extraVars = array(func_get_arg(0)=>'');\n\t\t\t}\t\t\t\n\t\t}\n\t\telse return $this->_extraVars;\n\t}", "private function getTemplateArgs(): array\n {\n $envelope_id= isset($_SESSION['envelope_id']) ? $_SESSION['envelope_id'] : false;\n $envelope_documents = isset($_SESSION['envelope_documents']) ? $_SESSION['envelope_documents'] : false;\n $document_id = preg_replace('/([^\\w \\-\\@\\.\\,])+/', '', $_POST['document_id' ]);\n $args = [\n 'account_id' => $_SESSION['ds_account_id'],\n 'base_path' => $_SESSION['ds_base_path'],\n 'ds_access_token' => $_SESSION['ds_access_token'],\n 'envelope_id' => $envelope_id,\n 'document_id' => $document_id,\n 'envelope_documents' => $envelope_documents\n ];\n\n return $args;\n }", "function acf_request_args($args = array())\n{\n}", "private static function listArgs($_args) {\n\t\tif (!is_array($_args))\n\t\t\t$_args=array($_args);\n\t\t$_str='';\n\t\tforeach ($_args as $_key=>$_val)\n\t\t\tif ($_key!=='GLOBALS')\n\t\t\t\t$_str.=($_str?',':'').\n\t\t\t\t\t(is_array($_val) && is_int(key($_val))?\n\t\t\t\t\t\t// Numeric-indexed array\n\t\t\t\t\t\t('array('.self::listArgs($_val).')'):\n\t\t\t\t\t\t(is_object($_val)?\n\t\t\t\t\t\t\t// Convert closure/object to string\n\t\t\t\t\t\t\t(get_class($_val).'()'):\n\t\t\t\t\t\t\t// Remove whitespaces\n\t\t\t\t\t\t\tpreg_replace(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'/,\\s+(.+?=>)/','/\\s=>\\s/',\n\t\t\t\t\t\t\t\t\t'/\\s*\\(\\s+/','/,*\\s+\\)/','/\\s+/'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tarray(',$1','=>','(',')',' '),\n\t\t\t\t\t\t\t\t\tstripslashes(var_export($_val,TRUE))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\treturn self::resolve($_str);\n\t}", "function acf_extract_vars(&$array, $keys)\n{\n}", "private function getArg($arguments){\n $list=[];\n foreach($arguments as $key=>$value){\n if($key==\"pull\" || $key==\"push\"){\n $list['project']=$value;\n $list['migration']=$key;\n }\n else{\n $list[$key]=$value;\n }\n }\n\n return $list;\n\n }", "protected static function extractArgs($args) {\n if (count($args) === 1 && is_array($args[0])) {\n return $args[0];\n }\n\n return $args;\n }", "public function getAdditionalArguments() {}", "public function getAdditionalArguments() {}", "function prepare_vars_for_template_usage()\n {\n }", "function args()\n{\n return dindex(dindex(debug_backtrace(), 1), 'args');\n}", "function a() {\n\t\t$args = func_get_args();\n\t\treturn $args;\n\t}", "public function getArguments();", "public function getArguments();", "public function getArguments();", "public function getArguments();", "public function enhanceArgs(array $args, TypoContext $typoContext): array;", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "function getArgs($args) {\n $out = array();\n $last_arg = null;\n for($i = 1, $il = sizeof($args); $i < $il; $i++) {\n if( (bool)preg_match(\"/^--(.+)/\", $args[$i], $match) ) {\n $parts = explode(\"=\", $match[1]);\n $key = preg_replace(\"/[^a-z0-9]+/\", \"\", $parts[0]);\n if(isset($parts[1])) {\n $out[$key] = $parts[1];\n }\n else {\n $out[$key] = true;\n }\n $last_arg = $key;\n }\n else if( (bool)preg_match(\"/^-([a-zA-Z0-9]+)/\", $args[$i], $match) ) {\n for( $j = 0, $jl = strlen($match[1]); $j < $jl; $j++ ) {\n $key = $match[1]{$j};\n $out[$key] = true;\n }\n $last_arg = $key;\n }\n else if($last_arg !== null) {\n $out[$last_arg] = $args[$i];\n }\n }\n return $out;\n }", "function avar ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tvar');\n return $rc->newInstanceArgs( $arguments );\n}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "static function extractOptions( $frame, array $args ) {\n\t\t\n\t\t// set default options\n\t\t$options = array(\n\t\t\t'example' => 1\n\t\t);\n\n\t\t\n\t\t$tempTasks = array();\n\t\t$tasks = array();\n\t\t$taskDetails = array();\n\t\t$tasksDurationPercentTotal = array();\n\t\t$tasksDurationPercentTotal['actor1'] = 0;\n\t\t$tasksDurationPercentTotal['actor2'] = 0;\n\t\t$tasksDurationPercentTotal['actor3'] = 0;\n\n\t\t\n\t\tforeach ( $args as $arg ) {\n\t\t\t//Convert args with \"=\" into an array of options\n\t\t\t$pair = explode( '=', $frame->expand($arg) , 2 );\n\t\t\tif ( count( $pair ) == 2 ) {\n\t\t\t\t$name = strtolower(trim( $pair[0] )); //Convert to lower case so it is case-insensitive\n\t\t\t\t$value = trim( $pair[1] );\n\n\t\t\t\t//this switch could be consolidated\n\t\t\t\tswitch ($name) {\n\t\t\t\t\tcase 'format': \n\t\t\t\t\t\t$value = strtolower($value);\n\t\t\t\t\t\tif ( $value==\"full\" ) {\n\t\t\t\t \t$options[$name] = \"full\";\n\t\t\t\t } else {\n\t\t\t\t \t$options[$name] = \"compact\";\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t\t\tcase 'fixedwidth': \n\t\t\t\t\t\tif ( $value != \"\" ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'st index':\n\t\t\t\t $options[$name] = $value;\n\t\t\t\t break;\n\t\t\t\t case 'title':\n\t\t\t\t\t if ( !isset($value) || $value==\"\" ) {\n\t\t\t\t \t$options['title']= \"No title set!\";\n\t\t\t\t } else {\n\t\t\t\t \t$titleParts = explode( '@@@', $value);\n\t\t\t\t \t$options[$name] = $titleParts[0];\n\t\t\t\t \t$options['title link'] = $titleParts[1];\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t\t case 'eva title':\n\t\t\t\t\t if ( isset($value) && $value!=\"\" ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'depends on':\n\t\t\t\t if ( isset($value) ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'hardware required for eva':\n\t\t\t\t $i = 1; /* Task id */\n\t\t\t\t\t if( isset($value) && $value!=\"\" ){\n\t\t\t\t\t\t $tempHardware = explode ( '&&&', $value, 2 );\n\t\t\t\t\t\t $hardware = explode ( '&&&', $tempHardware[1] );\n\t\t\t\t\t\t foreach ( $hardware as $item ) {\n\t\t\t\t\t\t \t$itemDetails = explode( '@@@', $item);\n\t\t\t\t\t\t \t$options['hardware required for eva'][$i]['title'] = trim($itemDetails[0]);\n\t\t\t\t\t\t \t$options['hardware required for eva'][$i]['mission'] = trim($itemDetails[1]);\n\t\t\t\t\t\t \t$i++;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t break;\n\t\t\t case 'parent related article':\n\t\t\t\t if ( isset($value) ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t\t case 'eva duration hours':\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['eva duration in minutes'] += (60 * $value);\n\t\t\t\t break;\n\t\t\t\t case 'eva duration minutes':\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['eva duration in minutes'] += $value;\n\t\t\t\t break;\n\t\t\t case 'actor 1 name':\n\t\t\t\t if ( isset($value) && $value != \"\" ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor1']['name'] = $value;\n\t\t\t\t } else {\n\t\t\t\t \t$options[$name] = 'Actor 1';\n\t\t\t\t \t$options['rows']['actor1']['name'] = 'Actor 1';\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'actor 2 name':\n\t\t\t\t if ( isset($value) && $value != \"\" ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor2']['name'] = $value;\n\t\t\t\t } else {\n\t\t\t\t \t$options[$name] = 'Actor 2';\n\t\t\t\t \t$options['rows']['actor2']['name'] = 'Actor 2';\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'actor 3 name':\n\t\t\t\t if ( isset($value) && $value != \"\" ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor3']['name'] = $value;\n\t\t\t\t } else {\n\t\t\t\t \t$options[$name] = 'Actor 3';\n\t\t\t\t \t$options['rows']['actor3']['name'] = 'Actor 3';\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'actor 1 display in compact view':\n\t\t\t\t if ( isset($value) ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor1']['display in compact view'] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'actor 2 display in compact view':\n\t\t\t\t if ( isset($value) ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor2']['display in compact view'] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'actor 3 display in compact view':\n\t\t\t\t if ( isset($value) ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor3']['display in compact view'] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'actor 1 enable get aheads':\n\t\t\t\t if ( isset($value) ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor1']['enable get aheads'] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'actor 2 enable get aheads':\n\t\t\t\t if ( isset($value) ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor2']['enable get aheads'] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'actor 3 enable get aheads':\n\t\t\t\t if ( isset($value) ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['rows']['actor3']['enable get aheads'] = $value;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t\t case 'actor1': // NEED TO SPLIT OUT SO THIS DOESN'T HAVE GET-AHEADS ADDED\n\t\t\t\t\t // this should have blocks with \"Start time\" (not duration)\n\t\t\t\t\t // an option should be included to sync with a task on EV1 and/or EV2\n\t\t\t\t\t // break;\n\t\t\t\t case 'actor2':\n\t\t\t\t case 'actor3':\n\t\t\t\t\t $i = 1; /* Task id */\n\t\t\t\t\t\t$tasksDuration = 0;\n\t\t\t\t\t if( isset($value) && $value!=\"\" ){\n\t\t\t\t\t\t $tempTasks = explode ( '&&&', $value, 2 );\n\t\t\t\t\t\t $tasks = explode ( '&&&', $tempTasks[1] );\n\t\t\t\t\t\t \n\t\t\t\t\t\t foreach ( $tasks as $task ) {\n\t\t\t\t\t\t \t$taskDetails = explode( '@@@', $task);\n\t\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['title'] = $taskDetails[0];\n\t\t\t\t\t\t \tif ($taskDetails[1] == ''){$taskDetails[1] = '0';}\n\t\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['durationHour'] = $taskDetails[1];\n\t\t\t\t\t\t \tif ($taskDetails[2] == ''|'0'){$taskDetails[2] = '00';}\n\t\t\t\t\t\t \tif ( strlen($taskDetails[2]) == 1 ){\n\t\t\t\t\t\t \t\t$temp = $taskDetails[2];\n\t\t\t\t\t\t \t\t$taskDetails[2] = '0' . $temp;}\n\t\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['durationMinute'] = $taskDetails[2];\n\t\t\t\t\t\t \t//Lame attempt to set min block width - move value out?\n\t\t\t\t\t\t \t// if ($options['rows'][$name]['tasks'][$i]['durationHour'] == 0 && $options['rows'][$name]['tasks'][$i]['durationMinute']<15){\n\t\t\t\t\t\t \t// \t$options['rows'][$name]['tasks'][$i]['blockWidth'] = 15;\n\t\t\t\t\t\t \t// }\n\t\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['relatedArticles'] = $taskDetails[3];\n\t\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['color'] = $taskDetails[4];\n\t\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['details'] = trim($taskDetails[5]);\n\n\t\t\t\t\t\t \t// Calc task duration as % of total EVA duration\n\t\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['durationPercent'] = round((((60 * $taskDetails[1]) + $taskDetails[2]) / $options['eva duration in minutes']) * 100);\n\n\t\t\t\t\t\t \t// append task duration\n\t\t\t\t\t\t \t$tasksDuration += (60 * $taskDetails[1]) + $taskDetails[2];\n\t\t\t\t\t\t \t// append task duration percent\n\t\t\t\t\t\t \t$tasksDurationPercentTotal[$name] += $options['rows'][$name]['tasks'][$i]['durationPercent'];\n\t\t\t\t\t\t \t// print_r( $tasksDurationPercentTotal['ev1'] );\n\t\t\t\t\t\t \t$i++;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\n\t\t\t\t\t // NEED TO ADD EGRESS/INGRESS DURATION TO $tasksDuration\n\t\t\t\t\t // NEED TO ACCOUNT FOR EV1 vs EV2\n\n\t\t\t\t\t // Commented out due to new template structure including egress/ingress as tasks\n\t\t\t\t\t // $tasksDuration += $options['ev2 egress duration minutes']['durationMinutes'] + $options['ev2 ingress duration minutes']['durationMinutes'];\n\n\t\t\t\t\t // sum of time allotted to tasks\n\t\t\t\t\t $options['rows'][$name]['tasksDuration'] = $tasksDuration;\n\n\t\t\t\t\t // $options[$name] = self::extractTasks( $value );\n\n\t\t\t\t\t // Check if $tasksDuration < $options['duration'] (EVA duration)\n\t\t\t\t\t if( $options['rows'][$name]['enable get aheads']=='true' && $tasksDuration < $options['eva duration in minutes'] ){\n\t\t\t\t\t \t// Need to add \"Get Aheads\" block to fill timeline gap\n\n\t\t\t\t\t \t// Calculate difference between EVA duration and tasksDuration\n\t\t\t\t\t \t$timeLeft = $options['eva duration in minutes'] - $tasksDuration;\n\t\t\t\t\t \t$timeLeftHours = floor($timeLeft/60);\n\t\t\t\t\t \t$timeLeftMinutes = $timeLeft%60;\n\n\t\t\t\t\t\t\t// THE FOLLOWING MOVES GET-AHEADS TO SECOND-TO-LAST SPOT\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['title'] = $options['rows'][$name]['tasks'][$i-1]['title'];\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['durationHour'] = $options['rows'][$name]['tasks'][$i-1]['durationHour'];\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['durationMinute'] = $options['rows'][$name]['tasks'][$i-1]['durationMinute'];\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['relatedArticles'] = $options['rows'][$name]['tasks'][$i-1]['relatedArticles'];\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['color'] = $options['rows'][$name]['tasks'][$i-1]['color'];\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i]['details'] = trim($options['rows'][$name]['tasks'][$i-1]['details']);\n\n\t\t\t\t\t \t// Now set Get-Aheads block data\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i-1]['title'] = 'Get-Aheads';\n\t\t\t\t\t\t \tif ($timeLeftHours == ''){$timeLeftHours = '0';}\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i-1]['durationHour'] = $timeLeftHours;\n\t\t\t\t\t\t \tif ($timeLeftMinutes == ''|'0'){$timeLeftMinutes = '00';}\n\t\t\t\t\t\t \tif ( strlen($timeLeftMinutes) == 1 ){\n\t\t\t\t\t\t \t\t$temp = $timeLeftMinutes;\n\t\t\t\t\t\t \t\t$timeLeftMinutes = '0' . $temp;}\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i-1]['durationMinute'] = $timeLeftMinutes;\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i-1]['relatedArticles'] = 'Get-Ahead Task';\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i-1]['color'] = 'white';\n\t\t\t\t\t \t$options['rows'][$name]['tasks'][$i-1]['details'] = 'Auto-generated block based on total EVA duration and sum of task durations';\n\t\t\t\t\t \t// Calc task duration as % of total EVA duration\n\t\t\t\t\t \t// $options['rows'][$name]['tasks'][$i]['durationPercent'] = round((((60 * $timeLeftHours) + $timeLeftMinutes) / $options['eva duration in minutes']) * 100);\n\t\t\t\t\t\t\t$options['rows'][$name]['tasks'][$i-1]['durationPercent'] = 100 - $tasksDurationPercentTotal[$name];\n\n\t\t\t\t\t }\n\n\t\t\t\t break;\n\t\t\t case 'color white meaning':\n\t\t\t case 'color red meaning':\n\t\t\t case 'color orange meaning':\n\t\t\t case 'color yellow meaning':\n\t\t\t case 'color blue meaning':\n\t\t\t case 'color green meaning':\n\t\t\t case 'color pink meaning':\n\t\t\t case 'color purple meaning':\n\t\t\t\t if ( isset($value) && $value!=\"\" ) {\n\t\t\t\t \t$options[$name] = $value;\n\t\t\t\t \t$options['number of colors designated'] ++;\n\t\t\t\t }\n\t\t\t\t break;\n\t\t\t case 'ev1':\n\t\t\t\t // Unique things for this column? Would have to split above into these two (can't do both cases)\n\t\t\t\t break;\n\t\t\t case 'ev2':\n\t\t\t\t // Unique things for this column?\n\t\t\t\t break;\n\t\t\t default: //What to do with args not defined above\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $options;\n\t}", "public function getArgs() {\n\t\treturn $this->args;\n\t}", "public function getArgs()\n {\n return $this->args;\n }", "function acf_parse_args($args, $defaults = array())\n{\n}", "public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}", "public function prepareArguments() {}", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "function dv(...$args) {\n\tdebug_raw('var_dump',false,$args);\n}", "function lightcron_parse_arguments($args, $dashes_to_underscores = TRUE) {\n // @see drush/includes/drush.inc for _convert_csv_to_array($args)\n $arguments = _convert_csv_to_array($args);\n foreach ($arguments as $key => $argument) {\n $argument = ($dashes_to_underscores) ? strtr($argument, '-', '_') : $argument;\n }\n return $arguments;\n}", "function galleryTemplateArguments($args) {\r\n $args = foogallery_gallery_template_setting('thumbnail_dimensions', []);\r\n $args['crop'] = '1';\r\n $args['link'] = foogallery_gallery_template_setting('thumbnail_link', 'image');\r\n return $args;\r\n }", "protected function getArguments( $args )\n {\n $arguments = [];\n foreach ($args as $key) {\n array_push($arguments, $this->$key);\n }\n return $arguments;\n }", "public function arguments(): array;", "public function set_vars($args)\n\t{\n\t\tforeach ($args as $key => $value) {\n\t\t\t$key = lc(str_replace(\"post_\", \"\", trim($key)));\n\t\t\t$this->$key = $value;\n\t\t}\n\t\t\n\t\t$this->category = element(\"name\", $this->_cat->get_cat($this->category));\n\t}", "protected function getArguments()\n {\n\n }", "private function _get_args($string)\n {\n // Clean up the arguments\n $raw_tag = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\"), \" \", $string);\n $args = trim((preg_match(\"/\\s+.*/\", $raw_tag, $arg_matches))) ? $arg_matches[0] : '';\n return ee()->functions->assign_parameters($args);\n }", "public abstract function get_query_args();", "private function setArguments()\n {\n $args = $this->data;\n $match = explode(\"/\", $this->routeMatch);\n\n // remove the domain part.\n foreach ($this->domains as $value) {\n // search for domain on url array.\n // array_search(needle, haystack)\n $index = array_search($value, $args);\n unset($args[$index]);\n\n // search for domain on matched route.\n $index = array_search($value, $match);\n unset($match[$index]);\n }\n\n // find the action part in url data and the matched route string.\n // preg_grep(pattern, input)\n $this->action = preg_grep(\"/^{$this->wildcards[':action']}$/\", $args);\n $matchAction = preg_grep(\"/^{$this->wildcards[':action']}$/\", $match);\n if ( !empty($this->action) )\n {\n // convert action from array to string.\n // find action in url data.\n // remove from url data.\n $this->action = array_shift($this->action);\n $index = array_search($this->action, $args);\n unset($args[$index]);\n\n $matchAction = array_shift($matchAction);\n $index = array_search($matchAction, $match);\n unset($match[$index]);\n }\n\n // get the arguments from url data\n // get the key from the wildcard. :id, :yyyy, :dd, etc.\n foreach ($args as $arg) {\n $key = $this->matchWildcard($match, $arg);\n $this->arguments[$key] = $arg;\n }\n }", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "public static function getArguments()\n {\n return func_get_args();\n }", "public function getArgs()\n {\n return $this->noramlizeArgs($this->_args);\n }", "function more_args()\n\t{\n\t\tfor ($i=0; $i < func_num_args() ; $i++) { \n\t\t\techo \"第\".$i.\"个参数是\".func_get_arg($i).\"\\n\";\n\t\t}\n\t}", "public function getArgs() {\n return $this->args;\n }", "function init_args()\r\n{\r\n $_REQUEST = strings_stripSlashes($_REQUEST);\r\n\r\n $args = new stdClass();\r\n $args->doExport = isset($_REQUEST['export']) ? $_REQUEST['export'] : null;\r\n $args->exportType = isset($_REQUEST['exportType']) ? $_REQUEST['exportType'] : null;\r\n $args->closeOnCancel = isset($_REQUEST['closeOnCancel']) ? $_REQUEST['closeOnCancel'] : 0;\r\n\r\n // ------------------------------------------------------------------------------------------------\r\n // IMPORTANT NOTICE - 20101101 - franciscom\r\n // This page is called (@20101101) from two places\r\n //\r\n // From test plan management to export linked test cases & platforms\r\n // From execution to export test plan contents\r\n // I've found problems when using in 'execution feature' when I've choose to name hidden inputs\r\n // on tpl with a name different to that used on execSetResults.php.\r\n // This resulted on weird effects on execNavigator.tpl\r\n // Propably one option can be to save 'form_token'.\r\n // I've used a simple (and may be more suggest to new bugs in future):\r\n // maintain same names -> build_id instead of buildID, and so on.\r\n // A change was also needed on JS support function openExportTestPlan().\r\n // ------------------------------------------------------------------------------------------------\r\n $args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;\r\n $args->build_id = isset($_REQUEST['build_id']) ? intval($_REQUEST['build_id']) : 0;\r\n $args->tplan_id = isset($_REQUEST['tplan_id']) ? intval($_REQUEST['tplan_id']) : 0;\r\n $args->platform_id = isset($_REQUEST['platform_id']) ? intval($_REQUEST['platform_id']) : 0;\r\n\r\n $args->export_filename = isset($_REQUEST['export_filename']) ? $_REQUEST['export_filename'] : null;\r\n $args->export_filename = trim($args->export_filename);\r\n\r\n // replace blank on name with _\r\n if( !is_null($args->export_filename) )\r\n { \r\n $args->export_filename = str_replace(' ','_',$args->export_filename);\r\n }\r\n \r\n $args->goback_url = isset($_REQUEST['goback_url']) ? $_REQUEST['goback_url'] : null;\r\n \r\n // TICKET 6498: Cross-Site Scripting on /lib/plan/planExport.php (CWE-80)\r\n $default = 'linkedItems';\r\n $args->exportContent = isset($_REQUEST['exportContent']) ? substr($_REQUEST['exportContent'],0,strlen($default)) : $default;\r\n switch ($args->exportContent)\r\n {\r\n case 'tree':\r\n case '4results':\r\n case 'linkedItems':\r\n break;\r\n\r\n default:\r\n $args->exportContent = $default;\r\n break;\r\n }\r\n\r\n // Vulnerable ?\r\n $args->treeFormToken = isset($_REQUEST['form_token']) ? $_REQUEST['form_token'] : 0;\r\n $args->testCaseSet = null;\r\n if($args->treeFormToken >0)\r\n { \r\n $mode = 'execution_mode';\r\n $session_data = isset($_SESSION[$mode]) && isset($_SESSION[$mode][$args->treeFormToken]) ? \r\n $_SESSION[$mode][$args->treeFormToken] : null;\r\n\r\n $args->testCaseSet = $session_data['testcases_to_show'];\r\n }\r\n return $args;\r\n}", "private function parseArguments($_arg)\n {\n /**\n * ARGUMENT LIST:\n * ::TASK TO PERFORM\n * --create-upload : create new mms order templates and upload accepted state xml file to MAX\n * --create-only : Only generate xml files and do not upload\n * --upload-xml '/path/to/file.xml': Only upload xml file to MAX. Specify /path/to/file.xml\n * --create-templates : Delete, if any existing templates, and create new templates for mms orders\n *\n * ::CONFIG\n * --set-data-path '/path/to/folder': set directory to save mms xml files.\n * --set-config-path '/path/to/file.json' : set path to file to read/write configuration.\n * --get-config-path : Give location of config file\n * --get-data-path '/path/to/folder': set directory to save mms xml files.\n * --create-config-file '/path/to/config.json' : create a default config file.\n * --set-config 'key:value'\n * --get-config\n */\n if ($_arg && is_array($_arg)) {\n if (count($_arg) >= 1 && count($_arg) <= 3) {\n // Fetch double hyphen specified argument\n $_arg_items = preg_grep(\"/--/\", $_arg);\n \n if (count($_arg_items) == 1) {\n // : Expected argument count - we expect only 1 argument\n switch ($_arg_items[1]) {\n case \"--create-only\":\n {\n $this->create_only();\n break;\n }\n case \"--upload-xml\":\n {\n $this->upload_xml();\n break;\n }\n case \"--set-data-path\":\n {\n break;\n }\n case \"--set-config-path\":\n {\n break;\n }\n case \"--get-data-path\":\n {\n break;\n }\n case \"--get-config-path\":\n {\n break;\n }\n case \"--create-config-file\":\n {\n break;\n }\n case \"--set-config\":\n {\n break;\n }\n case \"--get-config\":\n {\n break;\n }\n case \"--create-upload\":\n {\n $this->create_upload();\n break;\n }\n // If option not any of the above options given then print usage\n default:\n {\n $this->printUsage();\n break;\n }\n }\n } else \n if (count($_arg_items) >= 2) {\n // : Cannot have more than 1 option given as an argument => return FALSE and add to error array\n $this->printUsage('Too many arguments given. Please see usage print out below.');\n } else \n if (count($_arg_items) == 0) {\n $this->add_to_log(__FUNCTION__, \"No arguments provided, using default behaviour: \" . $this->_default_func);\n // : No arguments given => return default task\n $this->_default();\n }\n }\n }\n }", "function get_site_screen_help_tab_args()\n {\n }", "private function readEngineArguments() {\n // TODO: Clean this up and move it into LandEngines.\n\n $onto = $this->getEngineOnto();\n $remote = $this->getEngineRemote();\n\n // This just overwrites work we did earlier, but it has to be up in this\n // class for now because other parts of the workflow still depend on it.\n $this->onto = $onto;\n $this->remote = $remote;\n $this->ontoRemoteBranch = $this->remote.'/'.$onto;\n }", "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "function ddv(...$args) {\n\tdebug_raw('var_dump',true,$args);\n}", "public function getArgsArray(){\n\t\t$this->prepareArgs();\n\t\treturn $this->argsArray;\n\t}", "function get_template_variables( $instance, $args ) {\n\t\treturn array(\n\t\t\t'icon' => $instance['icon'],\n\t\t\t'url' => $instance['url'],\n\t\t\t'new_window' => $instance['new_window'],\n\t\t);\n\t}", "private function parse_args() {\n\t\t//exit;\t\t\n\t}", "protected function getArguments() {\n\t\treturn array(\n\t\t);\n\t}", "public function getArgs()\n {\n return $this->parsedArgs;\n }", "function parse_vars($match)\r\n\t{\r\n\t\t$tvar = $match[1];\r\n\t\tglobal $$tvar;\r\n\t\tif (key_exists($tvar, $this->vars)) return $this->vars[$tvar];\r\n\t\telse if (isset($$tvar)) return $$tvar;\r\n\t\telse if (defined($tvar)) return constant($tvar);\r\n\t\telse if ($this->use_getvar) return GetVar($tvar);\r\n\t\treturn $match[0];\r\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t];\n\t}" ]
[ "0.6670055", "0.66026604", "0.66026604", "0.631172", "0.63084155", "0.63084155", "0.62897563", "0.62622315", "0.6254377", "0.61238426", "0.6080027", "0.6061332", "0.5990322", "0.598485", "0.5920138", "0.59086514", "0.5870661", "0.58617944", "0.58603066", "0.5853599", "0.5845608", "0.58436173", "0.58333516", "0.5829549", "0.5800232", "0.5799217", "0.579578", "0.5789378", "0.578033", "0.57652336", "0.57561034", "0.57511705", "0.573515", "0.57334065", "0.57030064", "0.56729555", "0.56714046", "0.56663823", "0.566353", "0.5654258", "0.5650537", "0.5650537", "0.5650537", "0.5650537", "0.5629835", "0.562383", "0.562383", "0.562383", "0.562383", "0.56148094", "0.5601187", "0.5574144", "0.5574144", "0.5574144", "0.5574144", "0.5558886", "0.5546674", "0.5542928", "0.5534588", "0.54955405", "0.54953754", "0.549499", "0.549499", "0.549499", "0.549499", "0.549499", "0.54910177", "0.5487104", "0.5479726", "0.5474747", "0.54651153", "0.54468924", "0.54364055", "0.54320884", "0.54239994", "0.5415796", "0.5415262", "0.5415262", "0.5415262", "0.5415262", "0.5415262", "0.5415262", "0.5415262", "0.5411666", "0.54061157", "0.54035693", "0.53980815", "0.53954333", "0.53843755", "0.53823996", "0.5370724", "0.536959", "0.536959", "0.53644997", "0.5360753", "0.53556484", "0.53555876", "0.5351483", "0.53469735", "0.5340433", "0.5339025" ]
0.0
-1
This GLA computes the page ranks of a graph given the edge set as inputs. The algorithm runs with O(V) space and O(I E) time, where V is the total number of vertices; E, the total number of edges; and I, the number of iterations. The input should be two integers specifying source and target vertices. The output is vertex IDs and their page rank, expressed as a float. Template Args: adj: Whether the edge count and page rank of a given vertex should be stored adjacently. Doing so reduced random lookups but increases update time. Resources: armadillo: various data structures algorithm: max
function Page_Rank($t_args, $inputs, $outputs) { // Class name is randomly generated. $className = generate_name('PageRank'); // Initializiation of argument names. $inputs_ = array_combine(['s', 't'], $inputs); $vertex = $inputs_['s']; // Processing of template arguments. $adj = $t_args['adj']; $debug = get_default($t_args, 'debug', 1); // Construction of outputs. $outputs_ = ['node' => $vertex, 'rank' => lookupType('float')]; $outputs = array_combine(array_keys($outputs), $outputs_); $sys_headers = ['armadillo', 'algorithm']; $user_headers = []; $lib_headers = []; $libraries = ['armadillo']; $properties = []; $extra = []; $result_type = ['fragment']; ?> using namespace arma; using namespace std; class <?=$className?>; <? $constantState = lookupResource( 'statistics::Page_Rank_Constant_State', ['className' => $className] ); ?> class <?=$className?> { public: // The constant state for this GLA. using ConstantState = <?=$constantState?>; // The current and final indices of the result for the given fragment. using Iterator = std::pair<int, int>; // The value of the damping constant used in the page rank algorithm. static const constexpr float kDamping = 0.85; // The number of iterations to perform, not counting the initial set-up. static const constexpr int kIterations = 20; // The work is split into chunks of this size before being partitioned. static const constexpr int kBlock = 32; // The maximum number of fragments to use. static const constexpr int kMaxFragments = 64; private: <? if ($adj) { ?> // The edge weighting and page rank are stored side-by-side. This will make // updating the page ranks more costly but reduces random lookups. The weight // is the precomputed inverse of the number of edges for that vertex. static arma::mat info; <? } else { ?> // The edge weighting for each vertex. The weight is the precomputed inverse // of the number of edges for that vertex. static arma::rowvec weight; // The page-rank for each vertex. static arma::rowvec rank; <? } ?> // The value of the summation over adjacent nodes for each vertex. static arma::rowvec sum; // The typical constant state for an iterable GLA. const ConstantState& constant_state; // The number of unique nodes seen. long num_nodes; // The current iteration. int iteration; // The number of fragmetns for the result. int num_fragments; public: <?=$className?>(const <?=$constantState?>& state) : constant_state(state), num_nodes(state.num_nodes), iteration(state.iteration) { auto state_copy = const_cast<<?=$constantState?>&>(state); cout << "Time taken for iteration: " << iteration << ": " << state_copy.timer.toc() << endl; } void AddItem(<?=const_typed_ref_args($inputs_)?>) { if (iteration == 0) { num_nodes = max((long) max(s, t), num_nodes); return; } else if (iteration == 1) { <? if ($adj) { ?> info(1, s)++; <? } else { ?> weight(s)++; <? } ?> } else { <? if ($adj) { ?> sum(t) += prod(info.col(s)); <? } else { ?> sum(t) += weight(s) * rank(s); <? } ?> } } void AddState(<?=$className?> &other) { if (iteration == 0) num_nodes = max(num_nodes, other.num_nodes); } // Most computation that happens at the end of each iteration is parallelized // by performing it inside Finalize. bool ShouldIterate(ConstantState& state) { state.iteration = ++iteration; <? if ($debug > 0) { ?> cout << "finished iteration " << iteration << endl; <? } ?> if (iteration == 1) { // num_nodes is incremented because IDs are 0-based. state.num_nodes = ++num_nodes; <? if ($debug > 0) { ?> cout << "num_nodes: " << num_nodes << endl; <? } ?> // Allocating space can't be parallelized. sum.set_size(num_nodes); <? if ($adj) { ?> info.set_size(2, num_nodes); info.row(0).fill(1); <? } else { ?> rank.set_size(num_nodes); weight.set_size(num_nodes); rank.fill(1); <? } ?> return true; } else { <? if ($debug > 1) { ?> cout << "weights: " << accu(info.row(1)) << endl; cout << "sum: " << accu(sum) << endl; cout << "pr: " << accu(info.row(0)) << endl; <? } ?> return iteration < kIterations + 1; } } int GetNumFragments() { long size = (num_nodes - 1) / kBlock + 1; // num_nodes / kBlock rounded up. num_fragments = (iteration == 0) ? 0 : min(size, (long) kMaxFragments); <? if ($debug > 0) { ?> cout << "# nodes: " << num_nodes << endl; cout << "kBlock: " << kBlock << endl; cout << "# fragments: " << size << endl; cout << "Returning " << num_fragments << " fragments" << endl; <? } ?> return num_fragments; } // The fragment is given as a long so that the below formulas don't overflow. Iterator* Finalize(long fragment) { long count = num_nodes; // The ordering of operations is important. Don't change it. long first = fragment * (count / kBlock) / num_fragments * kBlock; long final = (fragment == num_fragments - 1) ? count - 1 : (fragment + 1) * (count / kBlock) / num_fragments * kBlock - 1; <? if ($debug > 0) { ?> printf("Fragment %ld: %ld - %ld\n", fragment, first, final); <? } ?> if (iteration == 2) { <? if ($adj) { ?> info.row(0).subvec(first, final).fill(1); info.row(1).subvec(first, final) = pow(info.row(1).subvec(first, final), -1); <? } else { ?> rank.subvec(first, final).fill(1); weight.subvec(first, final) = 1 / weight.subvec(first, final); <? } ?> sum.subvec(first, final).fill(0); } else { <? if ($adj) { ?> info.row(0).subvec(first, final) = (1 - kDamping) + kDamping * sum.subvec(first, final); <? } else { ?> rank.subvec(first, final) = (1 - kDamping) + kDamping * sum.subvec(first, final); <? } ?> sum.subvec(first, final).zeros(); } return new Iterator(first, final); } bool GetNextResult(Iterator* it, <?=typed_ref_args($outputs_)?>) { if (iteration < kIterations + 1) return false; if (it->first > it->second) return false; node = it->first; <? if ($adj) { ?> rank = info(0, it->first); <? } else { ?> rank = rank(it->first); <? } ?> it->first++; return true; } }; // Initialize the static member types. <? if ($adj) { ?> arma::mat <?=$className?>::info; <? } else { ?> arma::rowvec <?=$className?>::weight; arma::rowvec <?=$className?>::rank; <? } ?> arma::rowvec <?=$className?>::sum; typedef <?=$className?>::Iterator <?=$className?>_Iterator; <? return [ 'kind' => 'GLA', 'name' => $className, 'system_headers' => $sys_headers, 'user_headers' => $user_headers, 'lib_headers' => $lib_headers, 'libraries' => $libraries, 'properties' => $properties, 'extra' => $extra, 'iterable' => true, 'intermediates' => true, 'input' => $inputs, 'output' => $outputs, 'result_type' => $result_type, 'generated_state' => $constantState, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function galaxy_show_ranking_ally() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval, $pub_suborder;\n\n\tif (!check_var($pub_order_by, \"Char\") || !check_var($pub_date, \"Num\") || !check_var($pub_interval, \"Num\") || !check_var($pub_suborder, \"Char\")) {\n\t\tredirection(\"index.php?action=message&id_message=errordata&info\");\n\t}\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (isset($pub_suborder) && $pub_suborder == \"member\") $pub_order_by2 = \"points_per_member desc\";\n\telse $pub_order_by2 = \"rank\";\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_ALLY_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, ally, number_member, points, points_per_member, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by \".$pub_order_by2;\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $ally, $number_member, $points, $points_per_member, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$ally][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points, \"points_per_member\" => $points_per_member);\n\t\t$ranking[$ally][\"number_member\"] = $number_member;\n\t\t$ranking[$ally][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $ally;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, ally, number_member, points, points_per_member, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where ally = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $ally, $number_member, $points, $points_per_member, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$ally][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points, \"points_per_member\" => $points_per_member);\n\t\t\t\t$ranking[$ally][\"number_member\"] = $number_member;\n\t\t\t\t$ranking[$ally][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $ally;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}", "public function getPageNumbers();", "function getPageNavigation($hits, $page, $max, $min=1) {\n $nav = \"<a href='\" . getQueryString(array('page' => $min)) . \"'>&lt;&lt;</a> \";\n $nav .= \"<a href='\" . getQueryString(array('page' => ($page > $min ? $page - 1 : $min) )) . \"'>&lt;</a> \";\n \n for($i=$min; $i<=$max; $i++) {\n $nav .= \"<a href='\" . getQueryString(array('page' => $i)) . \"'>$i</a> \";\n }\n \n $nav .= \"<a href='\" . getQueryString(array('page' => ($page < $max ? $page + 1 : $max) )) . \"'>&gt;</a> \";\n $nav .= \"<a href='\" . getQueryString(array('page' => $max)) . \"'>&gt;&gt;</a> \";\n return $nav;\n}", "public function index()\n {\n $a = new Node(1,'A',12,34,[]);\n $b = new Node(2,'B',12,34,[]);\n $c = new Node(3,'C',12,34,[]);\n $d = new Node(4,'D',12,34,[]);\n $e = new Node(5,'E',13,45,[]); \n $f = new Node(7,'F',13,45,[]); \n $g = new Node(8,'G',13,45,[]); \n $h = new Node(9,'H',13,45,[]); \n $i = new Node(12,'I',13,45,[]); \n $j = new Node(10,'J',13,45,[]); \n $k = new Node(11,'K',13,45,[]); \n $l = new Node(13,'L',13,45,[]); \n $m = new Node(14,'M',13,45,[]); \n $n = new Node(16,'N',13,45,[]); \n $p = new Node(17,'P',13,45,[]);\n\n\n $gr = new Grafo();\n $gr->Add($a);\n $gr->Add($b);\n $gr->Add($c);\n $gr->Add($d);\n $gr->Add($e);\n $gr->Add($f);\n $gr->Add($g);\n $gr->Add($h);\n $gr->Add($i);\n $gr->Add($j);\n $gr->Add($k);\n $gr->Add($l);\n $gr->Add($m);\n $gr->Add($n);\n $gr->Add($p);\n\n // A\n $gr->AddEdge($a,8,$b);\n $gr->AddEdge($b,8,$a);\n $gr->AddEdge($a,4,$e);\n $gr->AddEdge($e,4,$a);\n $gr->AddEdge($a,5,$d);\n $gr->AddEdge($d,5,$a);\n // B\n $gr->AddEdge($b,12,$e);\n $gr->AddEdge($e,12,$b);\n $gr->AddEdge($b,4,$f);\n $gr->AddEdge($f,4,$b);\n $gr->AddEdge($b,3,$c);\n $gr->AddEdge($c,3,$b);\n // C\n $gr->AddEdge($c,9,$f);\n $gr->AddEdge($f,9,$c);\n $gr->AddEdge($c,11,$g);\n $gr->AddEdge($g,11,$c);\n // F\n $gr->AddEdge($f,1,$g);\n $gr->AddEdge($g,1,$f);\n $gr->AddEdge($f,3,$e);\n $gr->AddEdge($e,3,$f);\n $gr->AddEdge($f,8,$k);\n $gr->AddEdge($k,8,$f);\n // G\n $gr->AddEdge($g,7,$l);\n $gr->AddEdge($l,7,$g);\n $gr->AddEdge($g,8,$k);\n $gr->AddEdge($k,8,$g);\n // E\n $gr->AddEdge($e,9,$d);\n $gr->AddEdge($d,9,$e);\n $gr->AddEdge($e,5,$j);\n $gr->AddEdge($j,5,$e);\n $gr->AddEdge($e,8,$i);\n $gr->AddEdge($i,8,$e);\n // D\n $gr->AddEdge($d,6,$h);\n $gr->AddEdge($h,6,$d);\n // H\n $gr->AddEdge($h,2,$i);\n $gr->AddEdge($i,2,$h);\n $gr->AddEdge($h,7,$m);\n $gr->AddEdge($m,7,$h);\n // I\n $gr->AddEdge($i,10,$j);\n $gr->AddEdge($j,10,$i);\n $gr->AddEdge($i,6,$m);\n $gr->AddEdge($m,6,$i);\n // M\n $gr->AddEdge($m,2,$n);\n $gr->AddEdge($n,2,$m);\n // J\n $gr->AddEdge($j,6,$k);\n $gr->AddEdge($k,6,$j);\n $gr->AddEdge($j,9,$n);\n $gr->AddEdge($n,9,$j);\n // K\n $gr->AddEdge($k,5,$l);\n $gr->AddEdge($l,5,$k);\n $gr->AddEdge($k,7,$p);\n $gr->AddEdge($p,7,$k);\n // L\n $gr->AddEdge($l,6,$p);\n $gr->AddEdge($p,6,$l);\n // N\n $gr->AddEdge($n,12,$p);\n $gr->AddEdge($p,12,$n);\n // P\n\n // dd($gr);\n // return $gr->MenorDistancia([INF,INF,0,INF]);\n // return $gr->Show();\n return $gr->Disjtra($a,$p);\n }", "function linkRgaa($matches) {\n\t$rgaa = array(\n'1.1' => 'http://rgaa.net/1-1-Absence-de-cadres-non-titres.html',\n'1.2' => 'http://rgaa.net/Pertinence-des-titres-donnes-aux.html',\n'2.1' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la.html',\n'2.2' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,4.html',\n'2.3' => 'http://rgaa.net/Presence-d-un-moyen-de.html',\n'2.4' => 'http://rgaa.net/Presence-d-un-moyen-de,6.html',\n'2.5' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du.html',\n'2.6' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,8.html',\n'2.7' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,9.html',\n'2.8' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,10.html',\n'2.9' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,11.html',\n'2.10' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,12.html',\n'2.11' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,13.html',\n'2.12' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,14.html',\n'2.13' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,15.html',\n'2.14' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,16.html',\n'2.15' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,17.html',\n'2.16' => 'http://rgaa.net/Valeur-du-rapport-de-contraste-du,18.html',\n'3.1' => 'http://rgaa.net/Possibilite-d-identifier-les.html',\n'3.2' => 'http://rgaa.net/Presence-d-information-prealable.html',\n'3.3' => 'http://rgaa.net/Positionnement-correct-des.html',\n'3.4' => 'http://rgaa.net/Regroupement-d-elements-de.html',\n'3.5' => 'http://rgaa.net/Absence-d-element-fieldset-sans.html',\n'3.6' => 'http://rgaa.net/Pertinence-du-contenu-de-l-element.html',\n'3.7' => 'http://rgaa.net/Regroupement-d-elements-option.html',\n'3.8' => 'http://rgaa.net/Presence-d-un-attribut-label-sur-l.html',\n'3.9' => 'http://rgaa.net/Pertinence-du-contenu-de-l.html',\n'3.10' => 'http://rgaa.net/Absence-d-element-de-formulaire.html',\n'3.11' => 'http://rgaa.net/Absence-d-element-de-formulaire,29.html',\n'3.12' => 'http://rgaa.net/Pertinence-des-etiquettes-d.html',\n'3.13' => 'http://rgaa.net/Presence-d-informations-ou-de.html',\n'3.14' => 'http://rgaa.net/Presence-de-mecanismes-permettant.html',\n'3.15' => 'http://rgaa.net/Presence-de-mecanismes-permettant,33.html',\n'3.16' => 'http://rgaa.net/Presence-d-une-page-d-aide-ou-d-un.html',\n'4.1' => 'http://rgaa.net/Presence-de-l-attribut-alt.html',\n'4.2' => 'http://rgaa.net/Pertinence-de-l-alternative.html',\n'4.3' => 'http://rgaa.net/Pertinence-de-l-alternative,37.html',\n'4.4' => 'http://rgaa.net/Pertinence-de-l-alternative,38.html',\n'4.5' => 'http://rgaa.net/Pertinence-de-l-alternative-vide.html',\n'4.6' => 'http://rgaa.net/Longueur-du-contenu-des.html',\n'4.7' => 'http://rgaa.net/Existence-d-une-description-longue.html',\n'4.8' => 'http://rgaa.net/Pertinence-de-la-description.html',\n'4.9' => 'http://rgaa.net/Presence-de-l-attribut-longdesc.html',\n'4.10' => 'http://rgaa.net/Presence-d-une-information-de.html',\n'4.11' => 'http://rgaa.net/Coherence-dans-l-identification.html',\n'5.1' => 'http://rgaa.net/Acces-a-une-information.html',\n'5.2' => 'http://rgaa.net/Presence-de-la-transcription.html',\n'5.3' => 'http://rgaa.net/Pertinence-de-la-transcription.html',\n'5.4' => 'http://rgaa.net/Presence-d-une-description-audio.html',\n'5.5' => 'http://rgaa.net/Pertinence-de-la-description-audio.html',\n'5.6' => 'http://rgaa.net/Possibilite-de-controler-l.html',\n'5.7' => 'http://rgaa.net/Presence-d-une-description-audio,52.html',\n'5.8' => 'http://rgaa.net/Presence-d-une-description-audio,53.html',\n'5.9' => 'http://rgaa.net/Presence-du-sous-titrage.html',\n'5.10' => 'http://rgaa.net/Pertinence-du-sous-titrage.html',\n'5.11' => 'http://rgaa.net/Presence-d-une-alternative-aux.html',\n'5.12' => 'http://rgaa.net/Presence-d-une-alternative-aux,57.html',\n'5.13' => 'http://rgaa.net/Absence-d-elements-provoquant-des.html',\n'5.14' => 'http://rgaa.net/Absence-de-code-javascript,59.html',\n'5.15' => 'http://rgaa.net/Absence-de-mise-en-forme.html',\n'5.16' => 'http://rgaa.net/Compatibilite-des-elements.html',\n'5.17' => 'http://rgaa.net/Absence-totale-de-changements.html',\n'5.18' => 'http://rgaa.net/Presence-du-sous-titrage,63.html',\n'5.19' => 'http://rgaa.net/Absence-de-l-element-blink.html',\n'5.20' => 'http://rgaa.net/Absence-d-elements-provoquant-des,65.html',\n'5.21' => 'http://rgaa.net/Absence-de-code-javascript,66.html',\n'5.22' => 'http://rgaa.net/Absence-de-mise-en-forme,67.html',\n'5.23' => 'http://rgaa.net/Absence-d-element-marquee.html',\n'5.24' => 'http://rgaa.net/Absence-d-elements-affichant-des.html',\n'5.25' => 'http://rgaa.net/Absence-de-code-javascript,70.html',\n'5.26' => 'http://rgaa.net/Absence-de-mise-en-forme,71.html',\n'5.27' => 'http://rgaa.net/Independance-du-peripherique-d.html',\n'5.28' => 'http://rgaa.net/Presence-d-une-alternative-aux,73.html',\n'5.29' => 'http://rgaa.net/Absence-d-elements-declenchant-la.html',\n'5.30' => 'http://rgaa.net/Absence-d-element-bgsound.html',\n'5.31' => 'http://rgaa.net/Presence-de-version-en-langue-des.html',\n'5.32' => 'http://rgaa.net/Pertinence-de-la-version-en-langue.html',\n'5.33' => 'http://rgaa.net/Niveau-sonore-de-la-piste-de.html',\n'5.34' => 'http://rgaa.net/Presence-d-un-mecanisme-pour.html',\n'6.1' => 'http://rgaa.net/Acces-aux-liens-textuels-doublant.html',\n'6.2' => 'http://rgaa.net/Presence-d-un-avertissement.html',\n'6.3' => 'http://rgaa.net/Presence-d-un-avertissement,82.html',\n'6.4' => 'http://rgaa.net/Presence-d-un-avertissement,83.html',\n'6.5' => 'http://rgaa.net/Absence-d-ouverture-de-nouvelles.html',\n'6.6' => 'http://rgaa.net/Absence-de-piege-lors-de-la.html',\n'6.7' => 'http://rgaa.net/Absence-d-element-meta-provoquant.html',\n'6.8' => 'http://rgaa.net/Absence-de-code-javascript.html',\n'6.9' => 'http://rgaa.net/Absence-d-elements-provoquant-un.html',\n'6.10' => 'http://rgaa.net/Absence-d-element-meta-provoquant,89.html',\n'6.11' => 'http://rgaa.net/Absence-de-code-javascript,90.html',\n'6.12' => 'http://rgaa.net/Absence-d-elements-provoquant-une.html',\n'6.13' => 'http://rgaa.net/Possibilite-d-identifier-la.html',\n'6.14' => 'http://rgaa.net/Possibilite-d-identifier-la,93.html',\n'6.15' => 'http://rgaa.net/Coherence-de-la-destination-ou-de.html',\n'6.16' => 'http://rgaa.net/Absence-de-liens-sans-intitule.html',\n'6.17' => 'http://rgaa.net/Presence-d-une-page-contenant-le.html',\n'6.18' => 'http://rgaa.net/Coherence-du-plan-du-site.html',\n'6.19' => 'http://rgaa.net/Presence-d-un-acces-a-la-page.html',\n'6.20' => 'http://rgaa.net/Presence-d-un-fil-d-ariane.html',\n'6.21' => 'http://rgaa.net/Presence-de-menus-ou-de-barres-de.html',\n'6.22' => 'http://rgaa.net/Coherence-de-la-position-des-menus.html',\n'6.23' => 'http://rgaa.net/Coherence-de-la-presentation-des.html',\n'6.24' => 'http://rgaa.net/Navigation-au-clavier-dans-un.html',\n'6.25' => 'http://rgaa.net/Presence-d-un-avertissement,104.html',\n'6.26' => 'http://rgaa.net/Presence-des-informations-de.html',\n'6.27' => 'http://rgaa.net/Presence-des-informations-de-poids.html',\n'6.28' => 'http://rgaa.net/Presence-des-informations-de,107.html',\n'6.29' => 'http://rgaa.net/Presence-de-regroupement-pour-les.html',\n'6.30' => 'http://rgaa.net/Presence-d-un-balisage-permettant.html',\n'6.31' => 'http://rgaa.net/Presence-de-liens-d-evitement-ou-d.html',\n'6.32' => 'http://rgaa.net/Coherence-des-liens-d-evitement-ou.html',\n'6.33' => 'http://rgaa.net/Ordre-des-liens-d-evitement-ou-d.html',\n'6.34' => 'http://rgaa.net/Presence-d-un-moteur-de-recherche.html',\n'6.35' => 'http://rgaa.net/Possibilite-de-naviguer-facilement.html',\n'6.36' => 'http://rgaa.net/Presence-d-une-indication-de-la.html',\n'7.1' => 'http://rgaa.net/Absence-de-generation-de-contenus.html',\n'7.2' => 'http://rgaa.net/Absence-d-alteration-de-la.html',\n'7.3' => 'http://rgaa.net/Lisibilite-des-informations.html',\n'7.4' => 'http://rgaa.net/Absence-d-espaces-utilises-pour.html',\n'7.5' => 'http://rgaa.net/Absence-de-definition-d-une.html',\n'7.6' => 'http://rgaa.net/Possibilite-de-remplacer-les.html',\n'7.7' => 'http://rgaa.net/Possibilite-de-remplacer-les,122.html',\n'7.8' => 'http://rgaa.net/Absence-d-attributs-ou-d-elements.html',\n'7.9' => 'http://rgaa.net/Absence-d-elements-HTML-utilises-a.html',\n'7.10' => 'http://rgaa.net/Maintien-de-la-distinction.html',\n'7.11' => 'http://rgaa.net/Absence-de-suppression-de-l-effet.html',\n'7.12' => 'http://rgaa.net/Absence-de-justification-du-texte.html',\n'7.13' => 'http://rgaa.net/Lisibilite-du-document-en-cas-d.html',\n'7.14' => 'http://rgaa.net/Absence-d-unites-absolues-ou-de.html',\n'7.15' => 'http://rgaa.net/Absence-d-apparition-de-barre-de.html',\n'7.16' => 'http://rgaa.net/Largeur-des-blocs-de-textes.html',\n'7.17' => 'http://rgaa.net/Valeur-de-l-espace-entre-les.html',\n'7.18' => 'http://rgaa.net/Restitution-correcte-dans-les.html',\n'8.1' => 'http://rgaa.net/Mise-a-jour-des-alternatives-aux.html',\n'8.2' => 'http://rgaa.net/Universalite-du-gestionnaire-d.html',\n'8.3' => 'http://rgaa.net/Universalite-des-gestionnaires-d.html',\n'8.4' => 'http://rgaa.net/Possibilite-de-desactiver-toute.html',\n'8.5' => 'http://rgaa.net/Absence-de-changements-de-contexte.html',\n'8.6' => 'http://rgaa.net/Ordre-d-acces-au-clavier-aux.html',\n'8.7' => 'http://rgaa.net/Utilisation-correcte-du-role-des.html',\n'8.8' => 'http://rgaa.net/Presence-d-une-alternative-au-code.html',\n'8.9' => 'http://rgaa.net/Absence-de-suppression-du-focus.html',\n'8.10' => 'http://rgaa.net/Absence-de-limite-de-temps-pour.html',\n'8.11' => 'http://rgaa.net/Absence-de-perte-d-informations.html',\n'8.12' => 'http://rgaa.net/Presence-d-une-alternative-au-code,145.html',\n'8.13' => 'http://rgaa.net/Accessibilite-des-contenus.html',\n'9.1' => 'http://rgaa.net/Presence-de-la-declaration-d.html',\n'9.2' => 'http://rgaa.net/Conformite-de-la-position-de-la.html',\n'9.3' => 'http://rgaa.net/Conformite-syntaxique-de-la.html',\n'9.4' => 'http://rgaa.net/Validite-du-code-HTML-XHTML-au.html',\n'9.5' => 'http://rgaa.net/Absence-de-composants-obsoletes.html',\n'9.6' => 'http://rgaa.net/Presence-d-un-titre-dans-la-page.html',\n'9.7' => 'http://rgaa.net/Pertinence-du-titre-de-la-page.html',\n'9.8' => 'http://rgaa.net/Presence-d-une-langue-de.html',\n'10.1' => 'http://rgaa.net/Presence-d-au-moins-un-titre-de.html',\n'10.2' => 'http://rgaa.net/Pertinence-du-contenu-des-titres.html',\n'10.3' => 'http://rgaa.net/Absence-d-interruption-dans-la.html',\n'10.4' => 'http://rgaa.net/Presence-d-une-hierarchie-de.html',\n'10.5' => 'http://rgaa.net/Absence-de-simulation-visuelle-de.html',\n'10.6' => 'http://rgaa.net/Utilisation-systematique-de-listes.html',\n'10.7' => 'http://rgaa.net/Balisage-correct-des-listes-de.html',\n'10.8' => 'http://rgaa.net/Balisage-correct-des-citations.html',\n'10.9' => 'http://rgaa.net/Balisage-correct-des-abreviations.html',\n'10.10' => 'http://rgaa.net/Balisage-correct-des-acronymes.html',\n'10.11' => 'http://rgaa.net/Pertinence-de-la-version-non.html',\n'10.12' => 'http://rgaa.net/Pertinence-de-la-version-complete.html',\n'10.13' => 'http://rgaa.net/Accessibilite-des-documents.html',\n'11.1' => 'http://rgaa.net/Presence-des-balises-th-pour.html',\n'11.2' => 'http://rgaa.net/Presence-d-une-relation-entre-les.html',\n'11.3' => 'http://rgaa.net/Presence-d-une-relation-entre-les,170.html',\n'11.4' => 'http://rgaa.net/Absence-des-elements-propres-aux.html',\n'11.5' => 'http://rgaa.net/Absence-de-tableaux-de-donnees-ou.html',\n'11.6' => 'http://rgaa.net/Linearisation-correcte-des.html',\n'11.7' => 'http://rgaa.net/Presence-d-un-titre-pour-les.html',\n'11.8' => 'http://rgaa.net/Presence-d-un-resume-pour-les.html',\n'11.9' => 'http://rgaa.net/Pertinence-du-titre-du-tableau-de.html',\n'11.10' => 'http://rgaa.net/Pertinence-du-resume-du-tableau-de.html',\n'12.1' => 'http://rgaa.net/Presence-de-l-indication-des.html',\n'12.2' => 'http://rgaa.net/Presence-de-l-indication-des,179.html',\n'12.3' => 'http://rgaa.net/Equivalence-de-l-information-mise.html',\n'12.4' => 'http://rgaa.net/Presence-de-liens-ou-de.html',\n'12.5' => 'http://rgaa.net/Absence-de-syntaxes-cryptiques-par.html',\n'12.6' => 'http://rgaa.net/Presence-d-informations-sur-les.html',\n'12.7' => 'http://rgaa.net/Presence-d-un-moyen-de,184.html',\n'12.8' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,185.html',\n'12.9' => 'http://rgaa.net/Presence-d-un-autre-moyen-que-la,186.html',\n'12.10' => 'http://rgaa.net/Utilisation-d-un-style-de.html'\n);\n\n\treturn $matches[1].'<a href=\"'.$rgaa[$matches[2]].'\">'.$matches[2].'</a>';\n}", "function _fourD_analysis_calculate_project_goal_weight( $nid, $uid=0, $goals, $project ) {\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); <br>----------------------------<br>' );\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); $goals: '.print_r($goals, true) );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); $project: '.print_r($project, true) );\n \n if( !count($goals) || !$project ){\n return 0.0;\n }\n \n $weight = 0;\n $indirectParents = array();\n if( isset($project['project_goal']) ){\n foreach( $goals as $gid=>$g ){\n\n $goal = fourD_analysis_goal_entry_get($gid, $uid);\n// fourD_analysis_debug('----- _fourD_analysis_calculate_project_goal_weight; : Goal: '.$project['project_goal'][$gid]['title'].'; Info: '.print_r($goal, true) );\n\n if($goal && isset($goal['goal_weight']) ){\n if( isset($project['project_goal'][$gid]['rating']) ){\n \n// fourD_analysis_debug('+++++ _fourD_analysis_calculate_project_goal_weight; : Goal: '.$project['project_goal'][$gid]['title'].'; Info: '.print_r($project['project_goal'][$gid], true) );\n\n\n /* Direct parent and top-level are G1*W1 */\n if( _fourD_analysis_is_goal_applicable_to_project_input($nid, $g) ){\n $weight += ( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] );\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; INPUT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); INPUT: Goal: '.print_r($project['project_goal'][$gid], true) );\n }\n /* Indirect parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n// elseif( _fourD_analysis_is_goal_applicable_to_project($nid, $g) ){\n// $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; APPLICABLE: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n// }\n \n /* ALL parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n if( _fourD_analysis_is_goal_parent_to_project($nid, $g) ){\n $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; PARENT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); PARENT: Goal: '.print_r($project['project_goal'][$gid], true) );\n }\n \n \n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n }\n\n else{\n /* ALL parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n if( _fourD_analysis_is_goal_parent_to_project($nid, $g) ){\n $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; PARENT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); PARENT: Goal: '.print_r($g, true) );\n }\n }\n }\n\n\n }\n\n /* Finally, factor in any indirect parents */\n foreach($indirectParents as $nid=>$w){\n $weight = ($weight*$w);\n }\n }\n \n return $weight;\n}", "public function get_number_of_rel_ids($rel_id = 0, $rel_page = '')\n {\n }", "function _iwps_get_ranks_in_bout_rotation($bid, $rotation, $type = 'array') {\n $scores = array();\n $query = new EntityFieldQuery();\n\n $query\n ->entityCondition('entity_type', 'node', '=')\n ->propertyCondition('type', 'individual_performance', '=')\n ->fieldCondition('field_rotation', 'value', $rotation)\n ->fieldCondition('field_bout', 'tid', $bid, '=', 0);\n\n $result = $query->execute();\n\n $pids = array();\n\n if ( array_key_exists('node', $result) ) {\n foreach ($result['node'] as $record) {\n $pids[] = $record->nid;\n }\n }\n\n $performances = entity_load('node', $pids);\n $poets = array();\n foreach ($performances as $perf) {\n $poet_id = $perf->field_individual_performer[$perf->language][0]['target_id'];\n $poets[] = $poet_id;\n }\n\n $poet_nodes = user_load_multiple($poets);\n\n\n foreach ($performances as $perf) {\n $poet_id = $perf->field_individual_performer[$perf->language][0]['target_id'];\n $scores[] = array(\n 'rank' => 0,\n 'performer' => $poet_nodes[$poet_id]->name,\n 'rotation' => $perf->field_rotation['und'][0]['value'],\n 'score' => $perf->field_score['und'][0]['value'],\n 'bout_term' => $perf->field_bout['und'][0]['tid'],\n 'uid' => $poet_id,\n 'nid' => $perf->nid,\n );\n }\n\n // sort by score high to low, DEPENDANCY scorecreep module\n usort($scores, \"array_sort_by_score\");\n\n // set ranks\n $scores = _scorecreep_get_performance_ranks($scores);\n if ($type == 'ASSOC') {\n $assoc = array();\n for ( $i = 0; $i < count($scores); $i++) {\n $assoc[$scores[$i]['uid']] = $scores[$i];\n }\n return $assoc;\n }\n return $scores;\n}", "public function rank();", "function getIndicesImpact($list_agence) {\n\n global $dbHandler,$global_id_agence;\n $db = $dbHandler->openConnection();\n $DATA['general']['nombre_moyen_gs']=0;\n $DATA['clients']['pp'] = 0;\n $DATA['clients']['homme'] = 0;\n $DATA['clients']['femme'] = 0;\n $DATA['clients']['pm'] = 0;\n $DATA['clients']['gi'] = 0;\n $DATA['clients']['gs'] = 0;\n $DATA['clients']['total']=0;\n $DATA['epargnants']['pp'] = 0;\n $DATA['epargnants']['homme'] = 0;\n $DATA['epargnants']['femme'] = 0;\n $DATA['epargnants']['pm'] = 0;\n $DATA['epargnants']['gi'] = 0;\n $DATA['epargnants']['gs'] = 0;\n $DATA['epargnants']['total']=0;\n $DATA['emprunteurs']['pp'] = 0;\n $DATA['emprunteurs']['homme'] = 0;\n $DATA['emprunteurs']['femme'] = 0;\n $DATA['emprunteurs']['pm'] = 0;\n $DATA['emprunteurs']['gi'] = 0;\n $DATA['emprunteurs']['gs'] = 0;\n $DATA['general']['total_membre_empr_gi'] = 0;\n $DATA['general']['total_membre_empr_gs'] = 0;\n $DATA['general']['nombre_moyen_gi'] =0;\n $DATA['general']['nombre_moyen_gs'] =0;\n $DATA['general']['gi_nbre_membre'] =0;\n $DATA['general']['gs_nbre_membre'] =0;\n $DATA['general']['gs_nbre_hommes'] =0;\n $DATA['general']['gs_nbre_femmes'] =0;\n $nb_agence=0;\n foreach($list_agence as $key_id_ag =>$value) {\n //Parcours des agences\n setGlobalIdAgence($key_id_ag);\n $nb_agence++;\n // Nombre de clients\n $sql = \"SELECT statut_juridique, pp_sexe, count(id_client) FROM ad_cli WHERE id_ag=$global_id_agence AND etat = 2 GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['clients']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['clients']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['clients']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['clients']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['clients']['femme'] += $row['count'];\n }\n }\n\n $DATA['clients']['pp'] += $DATA['clients']['homme'] + $DATA['clients']['femme'];\n $DATA['clients']['total'] += $DATA['clients']['pp'] + $DATA['clients']['pm'] + $DATA['clients']['gi'] + $DATA['clients']['gs'];\n\n if ($DATA['clients']['pp'] == 0) {\n $DATA['clients']['pourcentage_homme'] = 0;\n $DATA['clients']['pourcentage_femme'] = 0;\n } else {\n $DATA['clients']['pourcentage_homme'] = $DATA['clients']['homme'] / $DATA['clients']['pp'];\n $DATA['clients']['pourcentage_femme'] = $DATA['clients']['femme'] / $DATA['clients']['pp'];\n }\n\n // Nombre d'épargnants\n $sql = \"SELECT statut_juridique, pp_sexe, count(id_client) FROM ad_cli WHERE id_ag=$global_id_agence AND (SELECT count(*) FROM ad_cpt WHERE id_ag=$global_id_agence AND id_client = id_titulaire AND id_prod <> 2 AND id_prod <> 3 AND solde <> 0) > 0 GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['epargnants']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['epargnants']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['epargnants']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['epargnants']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['epargnants']['femme'] += $row['count'];\n }\n }\n\n $DATA['epargnants']['pp'] += $DATA['epargnants']['homme'] + $DATA['epargnants']['femme'];\n $DATA['epargnants']['total'] += $DATA['epargnants']['pp'] + $DATA['epargnants']['pm'] + $DATA['epargnants']['gi'] + $DATA['epargnants']['gs'];\n\n if ($DATA['epargnants']['pp'] == 0) {\n $DATA['epargnants']['pourcentage_homme'] = 0;\n $DATA['epargnants']['pourcentage_femme'] = 0;\n } else {\n $DATA['epargnants']['pourcentage_homme'] = $DATA['epargnants']['homme'] / $DATA['epargnants']['pp'];\n $DATA['epargnants']['pourcentage_femme'] = $DATA['epargnants']['femme'] / $DATA['epargnants']['pp'];\n }\n\n\n // Nombre d'emprunteurs\n $sql = \"SELECT statut_juridique, pp_sexe, count(ad_cli.id_client) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) GROUP BY statut_juridique, pp_sexe\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)) {\n if ($row['statut_juridique'] == 2) {\n $DATA['emprunteurs']['pm'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 3) {\n $DATA['emprunteurs']['gi'] += $row['count'];\n }\n elseif ($row['statut_juridique'] == 4) {\n $DATA['emprunteurs']['gs'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 1) {\n $DATA['emprunteurs']['homme'] += $row['count'];\n }\n elseif ($row['pp_sexe'] == 2) {\n $DATA['emprunteurs']['femme'] += $row['count'];\n }\n }\n\n $DATA['emprunteurs']['pp'] += $DATA['emprunteurs']['homme'] + $DATA['emprunteurs']['femme'];\n $DATA['emprunteurs']['total'] += $DATA['emprunteurs']['pp'] + $DATA['emprunteurs']['pm'] + $DATA['emprunteurs']['gi'] + $DATA['emprunteurs']['gs'];\n\n if ($DATA['emprunteurs']['pp'] == 0) {\n $DATA['emprunteurs']['pourcentage_homme'] = 0;\n $DATA['emprunteurs']['pourcentage_femme'] = 0;\n } else {\n $DATA['emprunteurs']['pourcentage_homme'] = $DATA['emprunteurs']['homme'] / $DATA['emprunteurs']['pp'];\n $DATA['emprunteurs']['pourcentage_femme'] = $DATA['emprunteurs']['femme'] / $DATA['emprunteurs']['pp'];\n }\n\n // Nombre total de membres emprunteurs par groupe informel\n $sql = \"SELECT SUM(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 3\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_membre_empr_gi'] += round($row[0]);\n\n // Nombre total de membres emprunteurs par groupe solidaire\n $sql = \"SELECT SUM(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 4\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_membre_empr_gs'] += round($row[0]);\n\n // Nombre total d'hommes groupe solidaire\n $sql = \"SELECT count(*) FROM ad_grp_sol,ad_cli where id_client=id_membre AND pp_sexe= 1 \";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_homme_gs'] = round($row[0]);\n // Nombre total de femmes groupe solidaire\n $sql = \"SELECT count(*) FROM ad_grp_sol,ad_cli where id_client=id_membre AND pp_sexe= 2 \";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['total_femme_gs'] = round($row[0]);\n\n // Nombre moyen de membres par groupe informel\n $sql = \"SELECT AVG(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 3\";\n\n $result = $db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['nombre_moyen_gi'] += round($row[0]);\n\n // Nombre moyen de membres par groupe solidaire\n $sql = \"SELECT AVG(ad_cli.gi_nbre_membr) FROM ad_cli, ad_dcr WHERE ad_cli.id_ag=$global_id_agence AND ad_cli.id_ag=ad_dcr.id_ag AND ad_cli.id_client = ad_dcr.id_client AND (ad_dcr.etat = 5 OR ad_dcr.etat = 7 OR ad_dcr.etat = 13 OR ad_dcr.etat = 14 OR ad_dcr.etat = 15) AND ad_cli.statut_juridique = 4\";\n\n $result = $db->query($sql);\n if (DB :: isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__, __LINE__, __FUNCTION__);\n }\n $row = $result->fetchrow();\n $DATA['general']['nombre_moyen_gs'] += round($row[0]);\n }\n $DATA['general']['nombre_moyen_gi']=$DATA['general']['nombre_moyen_gi']/$nb_agence;\n $DATA['general']['nombre_moyen_gs']=$DATA['general']['nombre_moyen_gs']/$nb_agence;\n $dbHandler->closeConnection(true);\n return $DATA;\n}", "function find_gaps()\n\t{\n\t\t// Get all lfts and rgts and sort them in a list\n\t\tee()->db->select('lft, rgt');\n\t\tee()->db->order_by('lft','asc');\n\t\t$table = ee()->db->get( $this->tree_table );\n\n\t\t$nums = array();\n\n\t\tforeach($table->result() as $row)\n\t\t{\n\t\t\t$nums[] = $row->{'lft'};\n\t\t\t$nums[] = $row->{'rgt'};\n\t\t}\n\t\t\n\t\tsort($nums);\n\t\t\n\t\t// Init vars for looping\n\t\t$old = array();\n\t\t$current = 1;\n\t\t$foundgap = 0;\n\t\t$gaps = array();\n\t\t$current = 1;\n\t\t$i = 0;\n\t\t$max = max($nums);\n\t\twhile($max >= $current)\n\t\t{\n\t\t\t$val = $nums[$i];\n\t\t\tif($val == $current)\n\t\t\t{\n\t\t\t\t$old[] = $val;\n\t\t\t\t$foundgap = 0;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// have gap or duplicate\n\t\t\t\tif($val > $current)\n\t\t\t\t{\n\t\t\t\t\tif(!$foundgap)$gaps[] = array('start'=>$current,'size'=>1);\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$gaps[count($gaps) - 1]['size']++;\n\t\t\t\t\t}\n\t\t\t\t\t$foundgap = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$current++;\n\t\t}\n\t\treturn count($gaps) > 0 ? $gaps : false;\n\t}", "function sortRel($a, $b)\n{\n\tif($a['relevance'] == $b['relevance']) { return 0; }\n\treturn ($a['relevance'] < $b['relevance']) ? 1 : -1;\n}", "public function add_neighbor($uid, $neighbor_ip){\n $ngh_id = $this->get_uid($neighbor_ip);\n if(!$ngh_id)\n $ngh_id = $this->add_user($neighbor_ip);\n \n if(!$ngh_id)\n return NULL;\n\n $edge_exists = $this->edge_exists($uid, $ngh_id);\n \n\t\t$query = \"INSERT INTO edges(\n src_id,\n\t\t\ttarget_id) \n\t\t\tVALUES(?, ?)\n ON DUPLICATE KEY UPDATE src_id = src_id;\n\t\t\";\n\t\t\t\n\t\t$stmt = $this->prepare_statement($query);\n if(!$stmt)\n return NULL;\n\t\t$bind = $stmt->bind_param(\"ii\", $uid, $ngh_id);\n\t\tif(!$bind)\n\t\t\treturn NULL;\n\t\t\n\t\t$exec = $stmt->execute();\n\t\tif(!$exec)\n\t\t\treturn NULL;\n\n /* duplicate edges */\n\t\t$bind = $stmt->bind_param(\"ii\", $ngh_id, $uid);\n\t\tif(!$bind)\n\t\t\treturn NULL;\n\t\t\n\t\t$exec = $stmt->execute();\n\t\tif(!$exec)\n\t\t\treturn NULL;\n\t\t\t\n\t\treturn array(\n \"neighbor_id\" => $ngh_id,\n \"edge_exists\" => $edge_exists\n );\n }", "public abstract function get_rank();", "private function getSinglePageRank($cid, $ipp, $user)\n\t{\n\t\tif ( ($user === false) || ($user->getCountryID() !== $cid) )\n\t\t{\n\t\t\treturn array(Common::getGet('page', 1), 1);\n\t\t}\n\t\t\n\t\t# Requested a page, so use it\n\t\tif (false !== ($page = Common::getGet('page')))\n\t\t{\n\t\t\treturn array($page, 1);\n\t\t}\n\t\t\n\t\t# Oh, auto-page detection for the user!\n\t\t$rank = WC_RegAt::calcExactCountryRank($user);\n\t\t$page = GWF_PageMenu::getPageForPos($rank, $ipp);\n\t\treturn array($page, $rank);\n\t}", "function ml_compute_ranking($r_id){\n\tglobal $dbh1, $dbh2; // Global variables for database connections\n\t$sql = 'SELECT student_id FROM student_recruiter WHERE recruiter_id='.$r_id;\n\t$result = mysql_query($sql, $dbh1);\n\t$rank_dist = [];\n\t\n\twhile ($data = mysql_fetch_array($result)){\n\t\t$s_id = $data['student_id'];\n\t\t// Extract feature vector from s_id\n\t\t$sql1 = 'SELECT feature FROM ml_feature_vectors WHERE recruiter_id='.$r_id.' AND student_id='.$s_id;\n\t\t$result1 = mysql_query($sql1, $dbh2);\n\t\t$data1 = mysql_fetch_array($result1);\n\t\t$feature = $data1['feature'];\n\t\t\n\t\t// Convert feature vector string to array of integers\n\t\t$feature_array = array();\n\t\tfor($i=0;$i<strlen($feature);$i++){\n\t\t\t$feature_array[$i] = (int)$feature[$i];\n\t\t}\n\t\t\n\t\t// Create best array --> For Comparison\n\t\t$best_array = array();\n\t\tfor($i=0;$i<strlen($feature);$i++){\n\t\t\t$best_array[$i] = 5;\n\t\t}\n\t\t// Calculate distance between feature vector and best vector based on Cosine similarity distance\n\t\t$cdist = cosinus($feature_array, $best_array);\n\t\t$rank_dist[$s_id] = $cdist;\n\t\t\t\n\t} //while (student)\n\t\n\t// Sort $rank_dist array\n\tarsort($rank_dist);\n\t$rank_dist_keys = array_keys($rank_dist);\n\t\n\t$rank_id = '';\n\tfor($i=0; $i<count($rank_dist_keys); $i++){\n\t\tif($i==(count($rank_dist_keys)-1) )\n\t\t\t$rank_id = $rank_id.$rank_dist_keys[$i];\n\t\telse $rank_id = $rank_id.$rank_dist_keys[$i].',';\n\t}\n\t\n\t$sql2 = 'SELECT * FROM ml_rank WHERE recruiter_id='.$r_id; \n\t$result2 = mysql_query($sql2, $dbh2);\n\t$count2 = mysql_num_rows($result2);\n\t\n\tif ($count2==0)\n\t\t$sql3 = 'INSERT INTO ml_rank VALUES('.$r_id.',\"'.$rank_id.'\")';\n\telse\n\t\t$sql3 = 'UPDATE ml_rank SET rank_id=\"'.$rank_id.'\" WHERE recruiter_id='.$r_id;\n\tmysql_query($sql3, $dbh2);\n\t\t\n\n}", "public function genPageNums()\n\t{\n\t\t$pageLinks = array();\t\n\t\n\t\tfor($i=1; $i<=$this->numofpages; $i++)\n\t\t{\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\t\n\t\n\t\tif(($this->totalrows % $this->limit) != 0)\n\t\t{\n\t\t\t$this->numofpages++;\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\n\t\tksort($pageLinks);\n\t\t$this->pagination['nums'] = $pageLinks;\n\t}", "function countScores($graph, $node, $nodesArray, $finish)\n{\n\tglobal $successArray;\n\n\tforeach ($graph[$node] as $key => $value) {\n\t\t\n\t\t$key1 = array_search($key, $nodesArray['node']);\n\n\t\tif ($nodesArray[$key1]['score'] == 100000) {\n\t\t\t$nodesArray[$key1]['score'] = 0;\n\t\t}\n\n\t\t$nodesArray[$key1]['score'] += $value; // this wont do in cases of the shorter routes \n\t\t$nodesArray[$key1]['route'] .= \"->\" . $node . \"->\" . $key;\n\n\t\tif ($key == $finish) {\n\t\t\tarray_push($successArray, $nodesArray[$key1]); // check this\n\t\t}\n\t}\n\n\treturn $nodesArray;\n}", "function galaxy_show_ranking_player() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval;\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, player, ally, points, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by rank\";\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $player;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, player, ally, points, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where player = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $player;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}", "function getLabel($data, $neighbors)\n{\n $results = array();\n $neighbors = array_keys($neighbors);\n print_r($neighbors);\n foreach ($neighbors as $neighbor) {\n $results[] = $data[$neighbor][2];\n }\n $values = array_count_values($results);\n $values = array_flip($values);\n ksort($values);\n return array_pop($values);\n}", "function ros_get_grades_average($grads)\n{\n $povprecje = array();\n $cnt = count($grads);\n $povprecje['mistakes'] = 0;\n $povprecje['timeinseconds'] = 0;\n $povprecje['hitsperminute'] = 0;\n $povprecje['precision'] = 0;\n foreach($grads as $grade)\n {\n $povprecje['mistakes'] = $povprecje['mistakes'] + $grade->mistakes; \n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] + $grade->timeinseconds;\n }\n if($cnt != 0){\n $povprecje['mistakes'] = $povprecje['mistakes'] / $cnt;\n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] / $cnt;\n }\n return $povprecje;\n}", "function setup_vertices($cnt, $max_weight) {\n\n $vertices = array();\n\n for ($i = 0; $i < $cnt; $i++) {\n $vertex = new Vertex();\n $vertex->index = $i;\n $vertices[] = $vertex;\n }\n\n for ($i = 0; $i < $cnt; $i++) {\n\n for ($j = 0; $j < $cnt; $j++) {\n\n $vertex_b = rand(0, $cnt - 1);\n\n if ($vertex_b != $i) {\n $edge = new Edge();\n $edge->vertex_a = $vertices[$i];\n $edge->vertex_b = $vertices[$vertex_b];\n $edge->weight = rand(1, $max_weight);\n $vertices[$i]->edges[] = $edge;\n }\n }\n }\n\n return $vertices;\n}", "public function getAgentRank( Request $request )\n {\n\n $repositories = new UsersRepositories;\n\n $ranks = $repositories->getAgentRank( $request->id );\n\n return response()->json($ranks);\n }", "public function generatePagination($total_pages, $limit, $page, $baseUrl){ $adjacents = 3;\n if($page) \n $start = ($page - 1) * $limit; \t\t\t//first item to display on this page\n else\n $start = 0;\t\t\t\t\t\t\t\t//if no page var is given, set start to 0\n \n /* Setup page vars for display. */\n if ($page == 0) $page = 1;\t\t\t\t\t//if no page var is given, default to 1.\n $prev = $page - 1;\t\t\t\t\t\t\t//previous page is page - 1\n $next = $page + 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 $lpm1 = $lastpage - 1;\t\t\t\t\t\t//last page minus 1\n \n /* \n Now we apply our rules and draw the pagination object. \n We're actually saving the code to a variable in case we want to draw it more than once.\n */\n $pagination = \"\";\n if($lastpage > 1)\n {\t\n $pagination .= \"<ul class=\\\"pagination pagination-sm\\\">\";\n //previous button\n if ($page > 1) \n $pagination.= \"<li class=\\\"page-item\\\">\n <a href=\\\"\" . $baseUrl . \"?page=$prev\\\" class=\\\"page-link\\\" aria-label=\\\"Previous\\\">\n <span aria-hidden=\\\"true\\\">&laquo;</span>\n </a>\n </li>\";\n // <a href=\\\"diggstyle.php?page=$prev\\\">« previous</a>\";\n else\n $pagination.= \"<li class=\\\"page-item\\\">\n <a href=\\\"#\\\" class=\\\"page-link\\\" aria-label=\\\"Previous\\\">\n <span aria-hidden=\\\"true\\\">&laquo;</span>\n </a>\n </li>\";\t\n \n //pages\t\n if ($lastpage < 7 + ($adjacents * 2))\t//not enough pages to bother breaking it up\n {\t\n for ($counter = 1; $counter <= $lastpage; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n // $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n }\n }\n elseif($lastpage > 5 + ($adjacents * 2))\t//enough pages to hide some\n {\n //close to beginning; only hide later pages\n if($page < 1 + ($adjacents * 2))\t\t\n {\n for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\t\n }\n $pagination.= \"...\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lpm1 . '\">' . $lpm1 . '</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lastpage . '\">' . $lastpage . '</a></li>';\n //\"<a href=\\\"diggstyle.php?page=$lpm1\\\">$lpm1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lastpage\\\">$lastpage</a>\";\t\t\n }\n //in middle; hide some front and some back\n elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))\n {\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=1\">1</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=2\">2</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=1\\\">1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=2\\\">2</a>\";\n $pagination.= \"...\";\n for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n // $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n }\n $pagination.= \"...\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lpm1 . '\">' . $lpm1 . '</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $lastpage . '\">' . $lastpage . '</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lpm1\\\">$lpm1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$lastpage\\\">$lastpage</a>\";\t\t\n }\n //close to end; only hide early pages\n else\n {\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=1\">1</a></li>';\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=2\">2</a></li>';\n // $pagination.= \"<a href=\\\"diggstyle.php?page=1\\\">1</a>\";\n // $pagination.= \"<a href=\\\"diggstyle.php?page=2\\\">2</a>\";\n $pagination.= \"...\";\n for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)\n {\n if ($counter == $page)\n $pagination.= '<li class=\"page-item active\"><a class=\"page-link\" href=\"#\">' . $counter . '</a></li>';\n else\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $counter . '\">' . $counter . '</a></li>';\t\t\n }\n }\n }\n \n //next button\n if ($page < $counter - 1) \n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"' . $baseUrl . '?page=' . $next . '\"><span aria-hidden=\"true\">&raquo;</span></a></li>';\t\t\n // $pagination.= \"<a href=\\\"diggstyle.php?page=$next\\\">next »</a>\";\n else\n // $pagination.= \"<span class=\\\"disabled\\\">next »</span>\";\n $pagination.= '<li class=\"page-item\"><a class=\"page-link\" href=\"#\"><span aria-hidden=\"true\">&raquo;</span></a></li>';\n $pagination.= \"</ul>\\n\";\t\t\n }\n return $pagination;\n }", "function right_side($connect,$pred_id) {\n\n $new_sql = <<<Q\n SELECT pred,antecedent.pred_id,name,position\n FROM pred AS antecedent,arg \n WHERE \n antec_of='{$pred_id}' AND arg.pred_id = antecedent.pred_id \n ORDER BY antecedent.pred_id,arg.position;\nQ;\n\n // rather than returning a list, simply return the $rows, which \n // unify_right_side() will then iterate through.\n\n // return a list of conjuncts that \n // compose the right side for rule with id $pred_id. \n // The list might be empty, in which case $left_side is simply a fact, not a rule. \n $retval = array();\n $sql = \"SELECT pred,pred_id FROM pred WHERE antec_of='$pred_id'\";\n $right_side = array();\n\n print_psql(\"<right_side_query>\");\n print_psql($sql);\n print_psql(\"</right_side_query>\");\n\n $rows = pg_query($connect,$sql);\n $i = 0;\n while($conjunct = pg_fetch_array($rows,NULL,PGSQL_ASSOC)) {\n $pred_struct = array();\n $pred_struct['pred'] = $conjunct['pred'];\n \n $query = <<<Q\n SELECT name FROM arg WHERE arg.pred_id = '{$conjunct['pred_id']}' ORDER BY position\nQ;\n \n print_psql(\"<rs_conjunct_query>\");\n print_psql($query);\n print_psql(\"</rs_conjunct_query>\");\n\n $arg_result = pg_query($connect,$query);\n \n $pred_struct['arg_list'] = array();\n \n while ($arg_array = pg_fetch_array($arg_result,NULL,PGSQL_ASSOC)) {\n $pred_struct['arg_list'][] = $arg_array['name'];\n }\n $retval[] = $pred_struct;\n }\n return array($retval, pg_query($connect,$new_sql));\n}", "private static function pages($total_pages, $adjacents, $targetpage, $limit, $page, $start, $scroll, $met)\n\t{\n\n if ($page == 0) $page = 1; //if no page var is given, default to 1.\n $prev = $page - 1; //previous page is page - 1\n $next = $page + 1; //next page is page + 1\n $lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up.\n $lpm1 = $lastpage - 1;\n\n\t\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\t*/\n\n $pagination = self::$main_tag_start.\"\";\n\n if($lastpage > 1)\n {\n\n\t\t\t//previous button\n\n\t\t\tif ($page > 1):\n\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$prev.$scroll.\"'>\".self::$prev.\"</a>\".self::$after_a;\n\t\t\telse:\n\t\t\t\t$pagination.= self::show_disabled(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_disabled().\"' href='#' >\".self::$prev.\"</a>\".self::$after_a;\n\t\t\tendif;\n\n\n\t\t\t//pages\n\n\t\t\tif ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up\n\t\t\t{\n\t\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page):\n\t\t\t\t\t\t$pagination.= self::show_active(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_active().\"' href='#' >\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\telse:\n\t\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$counter.$scroll.\"'>\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\tendif;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some\n\t\t\t{\n\n\t\t\t//close to beginning; only hide later pages\n\n\t\t\t\tif($page < 1 + ($adjacents * 2))\n\t\t\t\t{\n\t\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $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.= self::show_active(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_active().\"' href='#' >\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$counter.$scroll.\"'>\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='#'>...</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$lpm1.$scroll.\"'>\".$lpm1.\"</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$lastpage.$scroll.\"'>\".$lastpage.\"</a>\".self::$after_a;\n\t\t\t\t}\n else if($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))\n\t\t\t\t{\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.\"1\".$scroll.\"'>1</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.\"2\".$scroll.\"'>2</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='#'>...</a>\".self::$after_a;\n\t\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $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.= self::show_active(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_active().\"' href='#' >\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$counter.$scroll.\"'>\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='#'>...</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$lpm1.$scroll.\"' >\".$lpm1.\"</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$lastpage.$scroll.\"'>\".$lastpage.\"</a>\".self::$after_a;\n\t\t\t\t}\n\n\t\t\t\t//close to end; only hide early pages\n\n\t\t\t\telse\n\t\t\t\t{\n $pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.\"1\".$scroll.\"'>1</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.\"2\".$scroll.\"'>2</a>\".self::$after_a;\n\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='#'>...</a>\".self::$after_a;\n\t\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $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.= self::show_active(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_active().\"' href='#' >\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$counter.$scroll.\"'>\".$counter.\"</a>\".self::$after_a;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//next button\n\n\t\t\tif ($page < $counter - 1):\n\t\t\t\t$pagination.= self::clear_status(self::$before_a).\"<a class='\".self::$a_class.\"' href='\".$targetpage.$met.$next.$scroll.\"'>\".self::$next.\"</a>\".self::$after_a;\n\t\t\telse:\n\t\t\t\t$pagination.= self::show_disabled(self::$before_a).\"<a class='\".self::$a_class.\" \".self::show_disabled().\"' href='#' >\".self::$next.\"</a>\".self::$after_a;\n\t\t\tendif;\n }\n $pagination .= self::$main_tag_end.\"\";\n\t\treturn $pagination;\n }", "public function rank() : int\n {\n $a = $this->rref()->a()->asArray();\n\n $pivots = 0;\n\n foreach ($a as $rowA) {\n foreach ($rowA as $valueA) {\n if ($valueA != 0) {\n ++$pivots;\n\n continue 2;\n }\n }\n }\n\n return $pivots;\n }", "function search_own_router($all_nodes, $own_nodes)\n{\n # Deklariere Array\n $own_router_index = array();\n $i = 0;\n foreach ($all_nodes as $node) {\n $node_id = $node['node_id'];\n foreach ($own_nodes as $own_id) {\n if ($own_id == $node_id) {\n array_push($own_router_index, $i);\n }\n }\n $i = $i + 1;\n }\n return $own_router_index;\n}", "function crawl_report_per_games($recap_link, $team, $sort_report = NULL) {\n\t\n\t$html_recap = file_get_html($recap_link);\n\tforeach($html_recap->find('div[class=contentPad article] p') as $recap_paragraph){\n\t\t$report_paragraphs[] = $recap_paragraph->plaintext;\n\t}\n\n\t// Some Recap reports doesn't seem to contain <p> tags.\n\t// In this case we get all the div in a string and compile it further.\n\t// The sorting algorithim can handle strings and arrays as well. \n\tif(empty($report_paragraphs)) {\n\t\tforeach($html_recap->find('div[class=contentPad article]') as $recap_paragraph){\n\t\t\t$report_paragraphs_empty[] = $recap_paragraph->plaintext;\n\t\t}\n\t\t\n\t\tif($sort_report) {\t\t\n\t\t\tfor($i=0; $i<count($report_paragraphs_empty); $i++){\n\t\t\t\t$report_paragraphs_empty[$i] = html_entity_decode($report_paragraphs_empty[$i]);\n\t\t\t}\n\t\t\t$report_paragraphs = $report_paragraphs_empty[0];\n\t\t\t$report_to_evaluate = sort_report($report_paragraphs, $team);\n\t\t} else {\n\t\t\t$report_to_evaluate = $report_paragraphs_empty[0];\n\t\t}\n\t\t\n\n\t} else {\n\t\n\t\tif($sort_report) {\n\t\t\t// If <p> tags found continue with decoding tags.\n\t\t\tfor($i=0; $i<count($report_paragraphs); $i++){\n\t\t\t\t$report_paragraphs[$i] = html_entity_decode($report_paragraphs[$i]);\n\t\t\t}\n\t\t\t$report_to_evaluate = sort_report($report_paragraphs, $team);\n\t\t} else {\n\t\t\t$report_to_evaluate = '';\n\t\t\tforeach ($report_paragraphs as $paragraph) {\n\t\t\t$report_to_evaluate .= $paragraph; \n\t\t\t}\n\t\t}\n\t\n\t}\n\n\t//print_r($report_paragraphs);\n\t\n\treturn $report_to_evaluate;\n\t\n\t/*\n\t$query = \"INSERT INTO $team(id, report) VALUES(NULL, $report_to_evaluate)\";\n\t\n\tif(mysqli_query(DBi::$conn, $query)) {\n\t\techo 'Updated';\n\t} else {\n\t\techo mysqli_error(DBi::$conn);\n\t}\n\t*/\n}", "function getRankingsTableString($user_id, $viewmore = true, $viewresults = 10, $viewlink, $page=0, $filter=null, $filterparam=null)\n{\n $rankings_results = contest_query(\"select_rankings\");\n // If query fails\n if (!$rankings_results) {\n return \"<p>Rankings are not available at the moment. Check back soon!</p>\";\n }\n\n $table = \"\";\n if ($filter != NULL) {\n $table .= \"<a href=\\\"rankings.php\\\">&#0171; Back to Main Leaderboard</a>\";\n }\n\n$table .= <<<EOT\n<table class=\"leaderboard\">\n<thead>\n<tr>\n <th>Rank</th>\n <!--<th>Score</th>-->\n <th>Username</th>\n <th>Country</th>\n <th>Organization</th>\n <th>Language</th>\n <th>Skill</th>\n <!--<th>Wins</th>-->\n <!--<th>Losses</th>-->\n <!--<th>Draws</th>-->\n</tr>\n</thead>\n<tbody>\nEOT;\n $old_score = 999999;\n $old_rank = -1;\n for ($i = 1; $row = mysql_fetch_assoc($rankings_results); $i += 1) {\n $username = htmlentities($row[\"username\"], ENT_COMPAT, 'UTF-8');\n $programming_language = $row[\"programming_language\"];\n\t$score = $row[\"skill\"];\n $programming_language_link = urlencode($row[\"programming_language\"]);\n $rank = $row[\"rank\"];\n\tif ($score == $old_score) {\n\t $rank = $old_rank;\n\t}\n\t$old_score = $score;\n\t$old_rank = $rank;\n $rank = ($filter == null)? $rank : ($i + $offset) . \" <span title='Global Rank'>($rank)</span>\";\n $rank_percent = $row[\"rank_percent\"];\n $wins = $row[\"wins\"];\n $losses = $row[\"losses\"];\n $draws = $row[\"draws\"];\n $flag_filename = $row[\"flag_filename\"];\n $country_id = $row[\"country_id\"];\n $country_name = $row[\"country_name\"];\n $country_name = $country_name == NULL ? \"Unknown\" : htmlentities($country_name, ENT_COMPAT, 'UTF-8');\n $org_name = htmlentities($row[\"org_name\"], ENT_COMPAT, 'UTF-8');\n $org_id = $row[\"org_id\"];\n $user_id = $row[\"user_id\"];\n $row_class = $i % 2 == 0 ? \"even\" : \"odd\";\n $flag_filename = $flag_filename == NULL ? \"unk.png\" : $flag_filename;\n $flag_filename = \"<img alt=\\\"$country_name\\\" width=\\\"16\\\" height=\\\"11\\\" title=\\\"$country_name\\\" src=\\\"flags/$flag_filename\\\" />\";\n if (current_username() == $username) {\n $table .= \" <tr class=\\\"$row_class, user\\\">\\n\";\n } else {\n $table .= \" <tr class=\\\"$row_class\\\">\\n\";\n }\n $table .= \" <td>$rank</td>\\n\";\n //$table .= \" <td>$rank_percent</td>\\n\";\n $table .= \" <td><a href=\\\"profile.php?user= $user_id\\\">$username</a></td>\\n\";\n $table .= \" <td><a href=\\\"country_profile.php?country=$country_id\\\">$flag_filename</a></td>\";\n $table .= \" <td><a href=\\\"organization_profile.php?org=$org_id\\\">$org_name</a></td>\";\n $table .= \" <td><a href=\\\"language_profile.php?language=$programming_language_link\\\">$programming_language</a></td>\";\n\t$table .= \" <td>$score</td>\";\n //$table .= \" <td>$wins</td>\";\n //$table .= \" <td>$losses</td>\";\n //$table .= \" <td>$draws</td>\";\n $table .= \" </tr>\\n\";\n }\n $table .= \"</tbody></table>\";\n if (!$viewmore) {\n $table .= $pagination;\n }\n if ($viewmore && $rowcount > $viewresults) {\n $table .= \"<a href=\\\"$viewlink\\\">View More</a>\";\n }\n return $table;\n}", "static public function DijkstraAlgorithmByArray($first, $finish) {\n $link_db = Piwidict::getDatabaseConnection();\n\n if ($first == $finish) return array(0,array($first));\n\n $vertex_arr = PWRelatedWords::getAllRelatedWords(); // list of unvisited vertexes generated from list of vertexes having an edge\n if (!in_array($first, $vertex_arr))\n return array(0,NULL); // search vertexes is not connected with any edge\n\n $infinity = 1000000;\n foreach ($vertex_arr as $v)\n $unvisited[$v] = $infinity;\n $unvisited[$first] = 0;\n\n $edge_table = PWRelatedWords::getTableName(); // table of related words (words and distance between them)\n\n $prev_arr = array(); // list of next-to-last for path from first to last vertexes\n $prev_arr[$first] = NULL;\n\n $prev=$first;\n $path_len = 0;\n// $dist_arr = array(); // <key>,<value>: list of distances <value> from $first to <key>\n// $dist_arr[$first] =0;\n\n $success = 0; // the condition of finding the shortest path in the given vertex ($finish)\n\n//print \"<PRE>\";\n$count=0;\n//print $first;\n//return;\n while (!$success && sizeof($unvisited) && $path_len<$infinity) { // until all vertixes will not be visited\n// && $count<10\nprint \"<p>\".$count.\": \".sizeof($unvisited);\n//.\".-----------------------------</p>\";\n//print_r($finish_arr);\n//print_r($len_arr);\n $query = \"SELECT * FROM $edge_table WHERE lemma_id1='$prev' or lemma_id2='$prev'\"; // search nearest vertexes to $prev (НЕТ необходимости сортировать, так как неважно в какой последовательности ставятся метки)\n $res_neib = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n while ($row_neib = $res_neib->fetch_object()) {\n if ($row_neib->lemma_id1 == $prev)\n $last = $row_neib->lemma_id2; // $last - nearest vertexes to $prev and last vertex for next paths\n else \n $last = $row_neib->lemma_id1;\n $new_path_len = $path_len + $row_neib->weight; // path length from $prev to $last (neighbour of $prev via semantic relations)\n\n// if (!isset($dist_arr[$last]) || $dist_arr[$last]>$new_path_len) { // this is new path from $first to $last OR \n if (isset($unvisited[$last]) && $unvisited[$last]>$new_path_len) { // this is new path from $first to $last OR \n // already (one) path from $first to $last does exist, but the new path is shorter\n// $dist_arr[$last] =\n $unvisited[$last] = $new_path_len;\n $prev_arr[$last] = $prev;\n }\n }\n $count++;\n\n $path_len = min(array_values($unvisited)); // choose minimal distance of path from first to any unvisited vertex \n $prev = array_search($path_len, $unvisited); // choose unvisited vertex with minimal distance\n\nprint \" = \".$path_len;\n\n unset($unvisited[$prev]); // mark this vertes as visited, delete it from unvisited list\n\n if ($prev == $finish) { // the shortest path in $finish are found!!\n $success=1; \n continue; \n }\n\n }\nprint \"<p>$count iterations\";\n\n if ($success) { // \n $path = array($finish);\n $prev = $prev_arr[$finish];\n\n while ($prev != NULL) {\n array_unshift($path,$prev);\n $prev = $prev_arr[$prev];\n }\n\n return array($path_len, $path); \n } else return array(NULL,NULL); // any path from $first to $finish are not found\n }", "function getUserRank($userid) {\n static $rank = array();\n if (!isset($rank[$userid])) {\n $rec = DB::$PDO->prepare('SELECT\n ROUND(1000 * a.total) points,\n COUNT(1) rank\n FROM\n (\n SELECT\n SUM(points) total\n FROM\n (\n SELECT\n (\n (\n SELECT\n MIN(size)\n FROM\n attempts\n WHERE\n passed\n AND\n (challenge_id=c.id)\n )\n /\n MIN(a.size)\n ) points\n FROM\n challenges c\n INNER JOIN\n attempts a\n ON\n (a.passed AND (a.user_id=:cid) AND (a.challenge_id=c.id))\n WHERE\n c.open AND c.active AND (c.type<>\\'public\\')\n GROUP BY\n c.id\n ) a\n ) a\n INNER JOIN\n (\n SELECT\n SUM(points) total\n FROM\n (\n SELECT\n a.user_id,\n (b.minsize / MIN(a.size)) points\n FROM\n challenges c\n INNER JOIN\n attempts a\n ON\n (a.passed AND (a.challenge_id=c.id))\n INNER JOIN\n (\n SELECT\n MIN(size) minsize,\n challenge_id\n FROM\n attempts\n WHERE\n passed\n GROUP BY\n 2\n ) b\n ON\n (b.challenge_id=c.id)\n WHERE\n c.open AND c.active AND (c.type<>\\'public\\')\n GROUP BY\n 1, c.id\n ) a\n GROUP BY\n a.user_id\n ) b\n ON\n (b.total>=a.total)\n GROUP BY\n 1');\n if($rec->execute(Array(':cid' => $userid))) $rank[$userid] = $rec->fetch(PDO::FETCH_ASSOC);\n }\n return $rank[$userid];\n}", "function parse($url){\n \n echo '[parse] url: ', $url, \"\\n\";\n \n $xpath = get_soup($url);\n \n // get number of reviews in all languages\n $num_reviews = $xpath->query('//span[@class=\"reviews_header_count\"]/text()')[0]->nodeValue; // get text\n $num_reviews = substr($num_reviews, 1, -1); // remove `( )`\n $num_reviews = str_replace(',', '', $num_reviews); // remove `,`\n $num_reviews = (int)$num_reviews; // convert text into integer\n echo '[parse] num_reviews ALL: ', $num_reviews, \"\\n\";\n \n // get number of reviews in English\n //~ $num_reviews = $xpath->query('//div[@data-value=\"en\"]//span/text()')[0]->nodeValue; // get text\n //~ $num_reviews = substr($num_reviews, 1, -1); // remove `( )`\n //~ $num_reviews = str_replace(',', '', $num_reviews); // remove `,`\n //~ $num_reviews = (int)$num_reviews; // convert text into integer\n //~ echo '[parse] num_reviews ENGLISH: ', $num_reviews, \"\\n\";\n \n // create template url for subpages with reviews\n // ie. https://www.tripadvisor.com/Hotel_Review-g562819-d289642-or{}.html\n $url_template = str_replace('.html', '-or{}.html', $url);\n echo '[parse] url_template:', $url_template;\n \n // create subpages urls and parse reviewes.\n // every subpage has 5 reviews and it has url with -or0.html -or5.html -or10.html -or15.html etc.\n \n $items = [];\n \n $offset = 0;\n \n while(True) {\n $subpage_url = str_replace('{}', $offset, $url_template);\n \n $subpage_items = parse_reviews($subpage_url);\n \n if($subpage_items->length == 0) break;\n \n $items += $subpage_items;\n \n $offset += 5;\n\n //~ return $items; // for test only - to stop after first page \n } \n \n return $items;\n}", "function sortRelNew($a, $b)\n{\n\tif($a['relevance'] == $b['relevance']) \n\t{ \n\t\tif($a['reviewnumber'] == $b['reviewnumber']) { return 0; }\n\t\treturn ($a['reviewnumber'] < $b['reviewnumber']) ? 1 : -1;\n\t}\n\treturn ($a['relevance'] < $b['relevance']) ? 1 : -1;\n}", "public static function calculate(Pipa $image, $sort = false) {\n $map = array();\n \n $width = $image->getWidth();\n $height = $image->getHeight();\n for ($x = 0; $x < $width; ++$x) {\n for ($y = 0; $y < $height; ++$y) {\n $value = $image->getPixel($x, $y);\n if (!isset($map[$value])) {\n $map[$value] = 1;\n } else {\n ++$map[$value];\n }\n }\n }\n \n if ($sort) {\n asort($map);\n }\n \n return $map;\n }", "function fiftyone_degrees_evaluate_numeric_nodes(\n $useragent_bytes,\n &$node_offsets,\n &$lowest_score,\n &$debug_info,\n $headers) {\n\n $current_position = count($useragent_bytes) - 1;\n $existing_node_index = count($node_offsets) - 1;\n\n $lowest_score = NULL;\n\n $root_node_offsets = fiftyone_degrees_read_root_node_offsets($headers);\n while ($current_position > 0) {\n // $existing_node = fiftyone_degrees_read_node($node_offsets[$existing_node_index], $headers);\n if ($existing_node_index >= 0) {\n $root_node = fiftyone_degrees_get_nodes_root_node(\n $node_offsets[$existing_node_index],\n $headers);\n $root_node_position = $root_node['position'];\n }\n\n if ($existing_node_index < 0 || $root_node_position < $current_position) {\n $debug_info['root_nodes_evaluated']++;\n $position_root = fiftyone_degrees_read_node(\n $root_node_offsets[$current_position],\n $headers);\n\n $node = fiftyone_degrees_get_complete_numeric_node(\n $position_root,\n $current_position,\n $useragent_bytes,\n $lowest_score,\n $debug_info,\n $headers);\n\n\n if ($node != NULL\n && fiftyone_degrees_get_any_nodes_overlap($node, $node_offsets, $headers)) {\n // Insert the node and update the existing index so that\n // it's the node to the left of this one.\n\n $index = fiftyone_degrees_integer_binary_search(\n $node_offsets,\n $node['offset']);\n array_splice($node_offsets, ~$index, 0, $node['offset']);\n $existing_node_index = ~$index - 1;\n\n // Move to the position of the node found as \n // we can't use the next node incase there's another\n // not part of the same signatures closer.\n $current_position = $node['position'];\n }\n else\n $current_position--;\n }\n else {\n // The next position to evaluate should be to the left\n // of the existing node already in the list.\n $existing_node = fiftyone_degrees_read_node($node_offsets[$existing_node_index], $headers);\n $current_position = $existing_node['position'];\n\n // Swap the existing node for the next one in the list.\n $existing_node_index--;\n }\n }\n return $node_offsets;\n}", "protected static function get_adjacency_graphs() {\n\t\tif ( empty( self::$adjacency_graphs ) ) {\n\t\t\tself::$adjacency_graphs = json_decode( file_get_contents( dirname( __FILE__ ) . '/adjacency_graphs.json' ) );\n\t\t}\n\t\treturn self::$adjacency_graphs;\n\t}", "function CalculPagerank($Url) {\r\n\t$seoPR = new PagerankSeo();\r\n\t$PageRank = $seoPR->getRank($Url);\r\n\treturn $PageRank;\r\n }", "function sortiere_nach_punkten(&$ranking) {\n\n\t$last_punkte = 0;\n\t$gewinn_rang = 1;\n\t$last_gewinn_rang = $gewinn_rang;\n\tforeach (array_keys($ranking) as $key)\n\t{\n\t\t$punkte = $ranking[$key][\"punkte\"];\t\t\n\t\tif ($punkte == $last_punkte) {\n\t\t\t$ranking[$key][\"rang\"] = $last_gewinn_rang;\n\t\t} else {\n \t\t$gewinn_rang = $key+1;\n \t\t$ranking[$key][\"rang\"] = $gewinn_rang;\n\t\t}\n\t\t\n\t\t$last_punkte = $punkte;\n\t\t$last_gewinn_rang = $gewinn_rang;\n }\n\n\tif (debug()) {\n\t\tprint \"<br>\";\n\t foreach(array_keys($ranking) as $key) {\n\t\t\tprint \"spieler = \". $ranking[$key][\"user\"]. \"<br>\";\n\t\t\tprint \"rang = \". $ranking[$key][\"rang\"]. \"<br>\";\n\t\t\tprint \"punkte = \". $ranking[$key][\"punkte\"]. \"<br>\";\t\t\t\n\t\t}\n\t\tprint \"<br>\";\n\t}\n}", "function calculateRank($userId) {\n \n $ci =& get_instance();\n \n // result array \n $setWonByUser1 = array(\n \n '6:0', '6:1', '6:2', '6:3', '6:4', '7:5', '7:6', \n ); \n \n $setWonByUser2 = array(\n \n '0:6', '1:6', '2:6', '3:6', '4:6', '5:7', '6:7', \n ); \n \n $rank = 0; \n \n // for every vitory \n $wonGames = $ci->match_model->getWonMatchByUserId($userId); \n $wonGames = $wonGames['total_count']; \n $rank += $wonGames * FOR_EVERY_VITORY_RANK; \n \n // for every loss \n $lossGames = $ci->match_model->getLostMatchByUserId($userId); \n $lossGames = $lossGames['total_count']; \n $rank += $lossGames * FOR_EVERY_LOSS_RANK; \n \n // for every set won and for every game won \n \n // count when user number is 1 in game and then when user number is 2 in game \n $gameListUser1 = $ci->match_model->getConfirmedAllGamesByUserId(1, $userId); \n $gameListUser2 = $ci->match_model->getConfirmedAllGamesByUserId(2, $userId); \n \n $setWonCountUser1 = 0; \n $setGameCountUser1 = 0; \n if (!empty($gameListUser1)) {\n \n foreach ($gameListUser1 as $game) {\n \n // count set \n if (in_array(\"{$game['set1_p1']}:{$game['set1_p2']}\", $setWonByUser1)) { $setWonCountUser1++; }\n if (in_array(\"{$game['set2_p1']}:{$game['set2_p2']}\", $setWonByUser1)) { $setWonCountUser1++; }\n if (in_array(\"{$game['set3_p1']}:{$game['set3_p2']}\", $setWonByUser1)) { $setWonCountUser1++; }\n \n // count game \n $setGameCountUser1 = $game['set1_p1'] + $game['set2_p1'] + $game['set3_p1']; \n }\n }\n \n $setWonCountUser2 = 0; \n $setGameCountUser2 = 0; \n if (!empty($gameListUser2)) {\n \n foreach ($gameListUser2 as $game) {\n \n // count set \n if (in_array(\"{$game['set1_p1']}:{$game['set1_p2']}\", $setWonByUser2)) { $setWonCountUser2++; }\n if (in_array(\"{$game['set2_p1']}:{$game['set2_p2']}\", $setWonByUser2)) { $setWonCountUser2++; }\n if (in_array(\"{$game['set3_p1']}:{$game['set3_p2']}\", $setWonByUser2)) { $setWonCountUser2++; }\n \n // count game \n $setGameCountUser2 = $game['set1_p2'] + $game['set2_p2'] + $game['set3_p2']; \n }\n }\n \n // add rank for sets \n $rank += ($setWonCountUser1 + $setWonCountUser2) * FOR_EVERY_SETWON_RANK; \n\n // add rank for games \n $rank += ($setGameCountUser1 + $setGameCountUser2) * FOR_EVERY_GAMEWON_RANK; \n \n return $rank > 0 ? $rank : 0; \n}", "public function rgveda_link($gra1,$gra2) { \n $dbg=false;\n dbgprint($dbg,\"rgveda_link: gra1=$gra1, gra2=$gra2\\n\");\n list($mandala,$hymn) = explode(\".\",$gra1);\n $imandala = (int)$mandala;\n $ihymn = (int)$hymn;\n $hymnfilepfx = sprintf(\"rv%02d.%03d\",$imandala,$ihymn);\n $hymnfile = \"$hymnfilepfx.html\";\n $iverse = (int)$gra2;\n $versesfx = sprintf(\"%02d\",$iverse);\n $anchor = \"$hymnfilepfx.$versesfx\";\n dbgprint($dbg,\"rgveda_link: hymnfile=$hymnfile, anchor=$anchor\\n\");\n return array($hymnfile,$anchor);\n}", "public function traverse(array $nodes) : array;", "function doc_anker ($a) {\r\n\t $comment=$a[comment];\r\n\t $HREF=$a[HREF];\r\n\t $atext=$a[atext];\r\n\t $TARGET=$a[TARGET];\r\n\t $onclick=$a[onclick];\r\n\r\n\t\tif ($HREF || $HREF=='NULL') {\r\n\t\t\tif ($HREF=='NULL') $HREF='';\r\n\t\t\t$this->defval($comment, $this->anker_def['comment']);\r\n\t\t\t$this->defval($atext, $this->anker_def['atext']);\r\n\r\n\t\t\t$out=sprintf($this->anker['anker'],\r\n\t\t\t o_iftrue($comment, $this->anker['comment']),\r\n\t\t\t sprintf($this->anker['HREF'],$HREF) .\r\n\t\t\t o_iftrue($TARGET, $this->anker[TARGET]).\r\n\t\t\t o_iftrue($onclick, $this->anker[onclick]),\r\n\t\t\t o_iftrue($atext, $this->anker['atext'])\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\t$out=o_iftrue($comment, $this->anker['comment']).\r\n\t\t\t o_iftrue($atext, $this->anker['atext']);\r\n\t\t}\r\n\r\n\t\t$this->_debug('doc_anker',$out);\r\n\t\treturn($out);\r\n\t}", "function prims_mst($distance_table){\n //TODO use sets or something similar to sets for this\n $u = array();\n $v = array_keys($distance_table);\n\n $new_edges = array();\n $all_vertexes = array_keys($distance_table);\n\n $a = array_pop($v);\n array_push($u,$a);\n\n //Keep looping until we've got all the edges\n $i = 0; //Loop protector to prevent infinite loops\n $max_ittr = count($all_vertexes)+4;\n while(!contains_all_verticies($u,$all_vertexes) && $i < $max_ittr){\n\n //Now go through all the edges in $v find it's closest neighbour in $u\n //Find the miinmum of those and put that vertex in $v\n $min_v = INF;\n $min_i = 0;\n $min_j = 0;\n foreach($v as $v1){\n $mins = find_min_vertex($v1,$u,$distance_table);\n if($mins[1] < $min_v){\n $min_v = $mins[1];\n $min_i = $mins[0];\n $min_j = $v1;\n }\n }\n //add the edge to the edges and the vertex to $u\n array_push($u,$min_j);\n array_push($new_edges,array($min_j,$min_i));\n\n $v = array_delete($v,$min_j);\n\n\n\n $i++;\n }\n\n return $new_edges;\n}", "public function sort(array $nodes);", "public function visitEdge($edge);", "public function adjacents($value) {\r\n $this->adjacents = (int)$value;\r\n return $this;\r\n }", "private function getPageArray(&$arrPages) {\n\t\t// Herausfinden an welcher Stelle die Page ist\n\t\t$nStelle = 2; \t\t// Mitte\n\t\t$nMaxStellen = 4;\t// Höchster Index\n\t\t// Spezialstellen definieren\n\t\tif ($this->Page == 1) $nStelle = 0; // Anfang\n\t\tif ($this->Page == 2) $nStelle = 1; // Zweite stelle\n\t\tif ($this->Page == $this->Pages - 1) \t$nStelle = 3; // Zweitletzte\n\t\tif ($this->Page == $this->Pages) \t\t$nStelle = 4; // Letzte Stelle\n\t\t// Referenzzahl\n\t\t$nReference = $arrPages[$nStelle];\n\t\t// Seiten darunter rückwärts feststellen\n\t\t$nHelper = 0;\n\t\tfor ($i = $nStelle;$i >= 0;$i--) {\n\t\t\t$arrPages[$i] = $nReference + $nHelper;\n\t\t\t// Nächstesmal eins weniger\n\t\t\t$nHelper--; \n\t\t}\n\t\t// Seiten darüber feststellen\n\t\t$nHelper = 0;\n\t\tfor ($i = $nStelle;$i <= $nMaxStellen;$i++) {\n\t\t\t$arrPages[$i] = $nReference + $nHelper;\n\t\t\t// Nächstesmal eins mehr\n\t\t\t$nHelper++; \n\t\t}\n\t}", "function getReportPerRange(&$analytics, $dia_ini, $dia_fim, $report){\n\n\t\t$this->Respiro($this->contador);\n\t\t$TABLE_ID = $report->GAMarcaInfo->TableId;//ga:ViewId -> TableId\n\n\t\t$retornoRange = $analytics->data_ga->get(\n\t\t\t$TABLE_ID,\n\t\t\t$dia_ini,\n\t\t\t$dia_fim,\n\t\t\t\"ga:sessions,ga:pageviews,ga:pageviewsPerSession,ga:avgTimeOnPage,ga:bounces,ga:bounceRate,ga:users,ga:newUsers,ga:timeOnPage,ga:exits\"\n\t\t\t);\n\t\t\n\t\t$this->contador++;\n\t\treturn $retornoRange;\n\t}", "function solution($A) {\n // write your code in PHP7.0\n $idxes = [];\n $C = [];\n $L = count($A);\n $mid = floor($L/2);\n\n foreach ($A as $k=>$v) {\n if (!isset($C[$v])) {\n $idxes[$v] = [];\n $C[$v] = 0;\n }\n\n $C[$v] += 1;\n array_push($idxes[$v], $k);\n\n if ($C[$v] > $mid) {\n $rIdx = $v;\n }\n }\n\n // No leader\n if (!isset($rIdx)) {\n return 0;\n }\n \n $leaderIndexes = $idxes[$rIdx];\n // print_r($leaderIndexes);\n $leaderTotal = count($leaderIndexes);\n $eCount = 0;\n for ($i = 0; $i < $leaderTotal; $i++) {\n $leaderIndex = $leaderIndexes[$i];\n $taCount = $leaderIndex + 1;\n \n $taMid = floor($taCount / 2);\n // $i + 1 is the count of leaders so far\n if ($i+1 > $taMid){\n $tbCount = $L - $taCount;\n $leftLeaders = $leaderTotal - ($i + 1); \n // print \"\\$i: $i, \\$leaderIndex: $leaderIndex, \\$taCount: $taCount, \\$tbCount: $tbCount, \\$leftLeaders: $leftLeaders \\r\\n\";\n if ($leftLeaders > floor($tbCount / 2)) {\n $eCount++;\n }\n\n // borrow from left for list like [4, 4, 2, 5, 3, 4, 4, 4];\n if ($i + 1 > floor(($taCount + 1) / 2) && $i+1 < $leaderTotal && $leaderIndexes[$i+1] != $leaderIndexes[$i] + 1 && $leftLeaders > floor(($tbCount - 1) / 2)) {\n $eCount++;\n }\n } \n }\n\n return $eCount;\n}", "function galaxy_ExportRanking_ally() {\n\tglobal $db, $user_data;\n\tglobal $pub_date, $pub_type;\n\n\tgalaxy_check_auth(\"export_ranking\");\n\n\tif (!isset($pub_date) || !isset($pub_type)) {\n\t\tdie (\"<!-- [ErrorFatal=03] Données transmises incorrectes -->\");\n\t}\n\n\tswitch ($pub_type) {\n\t\tcase \"points\": $ranktable = TABLE_RANK_ALLY_POINTS; break;\n\t\tcase \"flotte\": $ranktable = TABLE_RANK_ALLY_FLEET; break;\n\t\tcase \"research\": $ranktable = TABLE_RANK_ALLY_RESEARCH; break;\n\t\tdefault: die (\"<!-- [ErrorFatal=04] Données transmises incorrectes -->\");;\n\t}\n\n\tif (!check_var($pub_date, \"Special\", \"#^(\\d){4}-(\\d){2}-(\\d){2}\\s(\\d){2}:(\\d){2}:(\\d){2}$#\")) {\n\t\tdie (\"<!-- [ErrorFatal=04] Données transmises incorrectes -->\");\n\t}\n\n\tlist($day, $hour) = explode(\" \", $pub_date);\n\tlist($year, $month, $day) = explode(\"-\", $day);\n\tlist($hour, $minute, $seconde) = explode(\":\", $hour);\n\t$timestamp = mktime($hour, 0, 0, $month, $day, $year);\n\n\t$request = \"select rank, ally, number_member, points, points_per_member, username\";\n\t$request .= \" from \".$ranktable.\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where datadate = \".$timestamp;\n\t$request .= \" order by rank\";\n\t$result = $db->sql_query($request);\n\n\t$i=0;\n\techo \"rank=1,allytag=2,number_member=3,points=4,points_per_member=5,sendername=6,datetime=\".$pub_date.\"<->\";\n\twhile (list($rank, $ally, $number_member, $points, $points_per_member, $username) = $db->sql_fetch_row($result)) {\n\t\t$texte .= $rank.\"<||>\";\n\t\t$texte .= utf8_decode($ally).\"<||>\";\n\t\t$texte .= $number_member.\"<||>\";\n\t\t$texte .= $points.\"<||>\";\n\t\t$texte .= $points_per_member.\"<||>\";\n\t\t$texte .= utf8_decode($username).\"<||>\";\n\t\t$texte .= \"<->\";\n\t\techo $texte;\n\n\t\t$i++;\n\t}\n\n\tuser_set_stat(null, null, null, null, null, null, null, null, null, $i);\n\n\tlog_(\"get_rank\", array($pub_type, $timestamp));\n\n\t//Statistiques serveur\n\t$request = \"update \".TABLE_STATISTIC.\" set statistic_value = statistic_value + \".$i;\n\t$request .= \" where statistic_name = 'rankexport_ogs'\";\n\t$db->sql_query($request);\n\tif ($db->sql_affectedrows() == 0) {\n\t\t$request = \"insert ignore into \".TABLE_STATISTIC.\" values ('rankexport_ogs', '\".$i.\"')\";\n\t\t$db->sql_query($request);\n\t}\n\n\texit();\n}", "public function generateUserRating($visualizationid, $neighbors, $minVisRating) {\n $visualizationVectors = $this->generateVectors();\n $vectors = [];\n\n $vector = $visualizationVectors[$visualizationid - 1];\n for ($i=1; $i <= count($visualizationVectors); $i++) {\n if (count(Visualization::all()[$i - 1]->users) >= $minVisRating) {\n $similaritem = (object) [];\n if ($i == $visualizationid) {\n \n } else {\n $similaritem->similarity = $this->vectorSimilarity($vector, $visualizationVectors[$i]);\n $similaritem->visualization = $i;\n $vectors[] = $similaritem;\n }\n } else {\n // skip if the visualization does not have enough rating by the users\n }\n }\n // sort mapping\n usort($vectors, array(\"App\\Http\\Controllers\\RatingController\", \"compareSimilarity\"));\n\n $similaritems = [];\n for ($i=0; $i < $neighbors && $i < count($vectors); $i++) { \n $similaritems[] = $vectors[$i];\n }\n\n if (count($similaritems) === 0) {\n return null;\n } else {\n return $this->generatePrediction($similaritems, $visualizationVectors);\n }\n }", "function gaia_pre($args) {\r\n\t// after viewing. will take up to 5 incoming arrays..\r\n\t// dan - upated this to work on objects too\r\n\t//\t\tif ( (bool) SC::get('board_config.local_domain_enable') === TRUE )\r\n\t{\r\n\t\t\t\r\n\t\t// if we're set up for a log file, record to that instead...\r\n\t\tif ( defined('GAIA_PRE_LOG_FILE') ) {\r\n\t\t\tob_start();\r\n\t\t}\r\n\t\t\t\r\n\t\t// dump out the desired information...\r\n\t\techo \"<div align=\\\"left\\\"><pre>\";$i=0;\r\n\t\tforeach ($args as $argument) {\r\n\t\t\t$ns=rand(10000000000,90000000000);\r\n\t\t\tif ($i>0) echo \"\\n-----------------------------------------\\n\\n\";\r\n\t\t\tif (is_array($argument) || is_object($argument)) {\r\n\t\t\t\t//\t\t\t\t\t\t\t\tprintr($argument);\r\n\t\t\t\tprintr($argument,$ns);\r\n\t\t\t} else {\r\n\t\t\t\t//$v = var_export($argument, true);\r\n\t\t\t\tvar_dump($argument);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$i++;\r\n\t\t} // end-foreach\r\n\t\techo \"</pre></div>\";\r\n\t\techo \"<script>function __expand(tr){ var ns=tr.getAttribute('ns');var stLine=tr.getAttribute('stLine')*1;var edLine=tr.getAttribute('edLine')*1;var show = tr.getAttribute('show')=='block'?'none':'block';tr.setAttribute('show',show);tr.style.backgroundColor=show=='block'?'':'yellow'; for (var i=stLine+1;i<=edLine;i++){document.getElementById(ns+'_print_r_'+i).style.display=show;temp=document.getElementById(ns+'_print_r_'+i);if (temp.getAttribute('show')=='none'){i=i+1+temp.getAttribute('edLine')*1-temp.getAttribute('stLine')*1;};}}</script>\";\r\n\t\t// if we're using a log file, save the information to it now...\r\n\t\tif ( defined('GAIA_PRE_LOG_FILE') ) {\r\n\t\t\t$log_file_output = ob_get_contents();\r\n\t\t\tob_end_clean();\r\n\t\t\tdefine('FILE_APPEND',TRUE);\r\n\t\t\t$file_write_status = file_put_contents(GAIA_PRE_LOG_FILE,$log_file_output,FILE_APPEND);\r\n\t\t\t// last-ditch try to get someone's attention if the file write fails...\r\n\t\t\tif ( $file_write_status === FALSE ) echo $log_file_output;\r\n\t\t}\r\n\r\n\t} // end-if\r\n}", "public static function getPageNavigation($hits, $page, $max, $min=1) {\r\n $nav = ($page != $min) ? \"<a href='\" . CMovieNav::getQueryString(array('page' => $min)) . \"'>&lt;&lt;</a> \" : '&lt;&lt; ';\r\n $nav .= ($page > $min) ? \"<a href='\" . CMovieNav::getQueryString(array('page' => ($page > $min ? $page - 1 : $min) )) . \"'>&lt;</a> \" : '&lt; ';\r\n\r\n for($i=$min; $i<=$max; $i++) {\r\n if($page == $i) {\r\n $nav .= \"$i \";\r\n }\r\n else {\r\n $nav .= \"<a href='\" . CMovieNav::getQueryString(array('page' => $i)) . \"'>$i</a> \";\r\n }\r\n }\r\n\r\n $nav .= ($page < $max) ? \"<a href='\" . CMovieNav::getQueryString(array('page' => ($page < $max ? $page + 1 : $max) )) . \"'>&gt;</a> \" : '&gt; ';\r\n $nav .= ($page != $max) ? \"<a href='\" . CMovieNav::getQueryString(array('page' => $max)) . \"'>&gt;&gt;</a> \" : '&gt;&gt; ';\r\n return '<div class=\"movie-page-nav\"> ' . $nav . '</div>';\r\n }", "public static function getGlobalRank($url = false) {\n\t\t$xpath = self::_getXPath ( $url );\n\t\n\t\t$xpathQueryList = array (\n\t\t\t\t\"//div[@id='alexa_rank']/b\"\n\t\t);\n\t\n\t\treturn static::parseDomByXpathsToIntegerWithoutTags ( $xpath, $xpathQueryList );\n\t}", "private function getRanks_matrix($av_id=0){\n\n if (empty($av_id)) $av_id = @bAuth::$av->ID;\n if (empty($av_id)) return array();\n \n bForm_Avatar::set_context(bAuth::$av,VM_MODULE);\n \n // $_SESSION[myPear_cache][__method__][$av_id] = Null;\n if (@$_SESSION[myPear_cache][__method__][$av_id] === Null){\n \n // Check the organization_role\n $organizational_duty = myPear::org_duty($av_id,array(RANK__superuser,\n\t\t\t\t\t\t\t RANK_vm_manager,\n\t\t\t\t\t\t\t RANK_vm_endorser,\n\t\t\t\t\t\t\t RANK_vm_prg_coordinator,\n\t\t\t\t\t\t\t // RANK_vm_observer,\n\t\t\t\t\t\t\t ));\n \n // Walk thru all the recent events \n locateAndInclude('bForm_vm_Event');\n foreach(bForm_vm_Event::getEvents(array(\"e_start > \".(time() - AUTO_EXPIRATION * 86400))) as $e_id){\n\t$rank = $organizational_duty;\t \n\tif (!$rank){\n\t \n\t // RANK_vm_registrant - Is he a registrant for any event, including those in the past?\n\t if (VM::isRegistrant($av_id,Null)) $rank = max($rank,RANK_vm_registrant);\n\t \n\t // RANK_vm_organizer, Is the user an organizer for this event?\n\t if (VM::isOrganizer($av_id,$e_id)) $rank = max($rank,RANK_vm_organizer);\n\t}\n\t\n\t// Fill list of positions which might be browsed\n\tif (!empty($rank)){ \n\t $_SESSION[myPear_cache][__method__][$av_id][$e_id] = $rank;\n\t} \n }\n }\n if (empty($_SESSION[myPear_cache][__method__][$av_id]))$_SESSION[myPear_cache][__method__][$av_id] = array();\n return $_SESSION[myPear_cache][__method__][$av_id];\n }", "function sortRelOld($a, $b)\n{\n\tif($a['relevance'] == $b['relevance']) \n\t{ \n\t\tif($a['reviewnumber'] == $b['reviewnumber']) { return 0; }\n\t\treturn ($a['reviewnumber'] > $b['reviewnumber']) ? 1 : -1;\n\t}\n\treturn ($a['relevance'] < $b['relevance']) ? 1 : -1;\n}", "function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_forn,$totalRows_rs_forn;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($HTTP_GET_VARS)){\n\t\t\t\t$_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_forn\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_forn) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_forn >= $totalRows_rs_forn) ? $totalRows_rs_forn : ($a*$maxRows_rs_forn);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}", "function fiftyone_degrees_get_score(\n $node_offset,\n $useragent_bytes,\n $lowest_score,\n $headers) {\n\n $score = 0;\n $node = fiftyone_degrees_read_node($node_offset, $headers);\n $node_characters = fiftyone_degrees_get_node_characters($node, $headers);\n $node_index = count($node_characters) - 1;\n\n $target_index\n = $node['position'] + fiftyone_degrees_get_node_length($node, $headers);\n\n // Adjust the score and indexes if the node is too long.\n $useragent_length = count($useragent_bytes);\n if ($target_index >= $useragent_length) {\n $score = $target_index - $useragent_length;\n $node_index -= $score;\n $target_index = $useragent_length - 1;\n }\n\n while ($node_index >= 0 && $score < $lowest_score) {\n $difference = abs(\n $useragent_bytes[$target_index] - $node_characters[$node_index]);\n if ($difference != 0) {\n $numeric_difference = fiftyone_degrees_get_numeric_difference(\n $node_characters,\n $useragent_bytes,\n $node_index,\n $target_index);\n if ($numeric_difference != 0)\n $score += $numeric_difference;\n else\n $score += $difference;\n }\n $node_index--;\n $target_index--;\n }\n return $score;\n}", "public function explore($ap) {\n\t\t$res = $this->spendAP($ap);\n\t\tif ($res==-1) return -3;\n\t\telse {\n\t\t\t$targetLocation = new LocalMap($this->mysqli, $this->x, $this->y);\n\t\t\t$check = $targetLocation->loadcreate();\n\t\t\treturn $check;\n\t\t}\n\t}", "public function getRanking() {\n\t$result = pg_query(\"select a.id,\n\t\t\t\t a.user_id,\n \t\t\t\t c.name,\n \t\t\t\t c.picurl,\n \t\t\t\t a.score,\n\t\t\t a.last_update_at\n\t\t\t from app_dl.score a \n\t\t\t join users.profile c on (a.user_id = c.user_id)\n\t\t\t order by score desc limit 50\");\n\t\t\t //order by score desc limit 10\");\n\n\t$no_of_rows = pg_num_rows($result);\n //-----\n if ($no_of_rows > 0) {\n\n $resultArray = pg_fetch_all($result);\n //return json_encode($resultArray);\n $out = array();\n $out = json_encode($resultArray);\n //echo $out;\n return $out;\n } else {\n\n return false;\n }\n }", "function analyseGraphs(array $hostServiceIds): void\n{\n if (empty($hostServiceIds)) {\n return;\n }\n global $obj, $graphs;\n $request = <<<SQL\n SELECT DISTINCT index_data.host_id, index_data.service_id\n FROM index_data\n INNER JOIN metrics\n ON metrics.index_id = index_data.id\n AND index_data.hidden = '0'\n WHERE\n SQL;\n $whereConditions = null;\n $index = 0;\n $valuesToBind = [];\n foreach ($hostServiceIds as $hostServiceId) {\n list ($hostId, $serviceId) = explode('_', $hostServiceId);\n if (! empty($whereConditions)) {\n $whereConditions .= ' OR ';\n }\n $whereConditions .= sprintf(' (host_id = :host_id_%d AND service_id = :service_id_%d)', $index, $index);\n $valuesToBind[$index] = ['host_id' => $hostId, 'service_id' => $serviceId];\n $index++;\n }\n $request .= $whereConditions;\n $statement = $obj->DBC->prepare($request);\n foreach ($valuesToBind as $index => $hostServiceId) {\n $statement->bindValue(':host_id_' . $index, $hostServiceId['host_id'], PDO::PARAM_INT);\n $statement->bindValue(':service_id_' . $index, $hostServiceId['service_id'], PDO::PARAM_INT);\n }\n $statement->execute();\n while ($result = $statement->fetch(PDO::FETCH_ASSOC)) {\n $hostServiceId = $result['host_id'] . '_' . $result['service_id'];\n $graphs[$hostServiceId] = true;\n }\n}", "protected function num() {\n $this->siblings = $this->siblings->not($this->page)->sortBy('num', 'asc');\n\n // special keywords and sanitization\n if($this->to == 'last') {\n $this->to = $this->siblings->count() + 1;\n } else if($this->to == 'first') {\n $this->to = 1;\n } else if($this->to === false) {\n $this->to = false;\n } else if($this->to < 1) {\n $this->to = 1; \n }\n\n // start the index\n $n = 0;\n\n if($this->to === false) {\n foreach($this->siblings as $sibling) {\n $n++; $sibling->_sort($n);\n }\n } else {\n\n // go through all items before the selected page\n foreach($this->siblings->slice(0, $this->to - 1) as $sibling) {\n $n++; $sibling->_sort($n);\n }\n\n // add the selected page\n $n++; $this->page->_sort($n);\n\n // go through all the items after the selected page\n foreach($this->siblings->slice($this->to - 1) as $sibling) {\n $n++; $sibling->_sort($n);\n }\n\n }\n\n }", "function _recast_analysis_api_index($page) {\r\n $arr = array();\r\n\r\n $query = new EntityFieldQuery();\r\n $entity = $query\r\n ->entityCondition('entity_type', 'node', '=')\r\n ->entityCondition('bundle', 'analysis')\r\n ->propertyCondition('status', 1) \r\n ->execute();\r\n \r\n $nodes = node_load_multiple(array_keys($entity['node']));\r\n foreach($nodes as $n) {\r\n $query = new EntityFieldQuery();\r\n $requests = $query\r\n ->entityCondition('entity_type', 'node', '=')\r\n ->entityCondition('bundle', 'recast_request')\r\n ->fieldCondition('field_request_analysis', 'target_id' , $n->nid)\r\n ->propertyCondition('status', 1) \r\n ->count()->execute();\r\n $lang = $n->language;\r\n $arr[] = array(\r\n 'uuid' => $n->uuid,\r\n 'title' => $n->title,\r\n 'number_of_requests' => $requests,\r\n 'collaboration' => $n->field_analysis_collaboration[$lang][0]['value'],\r\n );\r\n }\r\n return $arr;\r\n }", "public function highscore($page);", "function computeProgress($docno, $_ACT_FROM_UM, $_ACT_FROM_READER, $_ACT_FROM_OLDREADER){\n \n $confidence = 0.0;\n $totalhits = 0;\n $coverage = 0.0;\n $clicks = 0;\n $annotations = 0;\n $distinct = 0;\n $npages = 1;\n \n if (isset($_ACT_FROM_UM[$docno])) {\n $totalhits += intval($_ACT_FROM_UM[$docno][\"hits\"]);\n $npages = intval($_ACT_FROM_UM[$docno][\"npages\"]);\n $distinct = 1;\n }\n if (isset($_ACT_FROM_READER[$docno])) {\n $totalhits += $_ACT_FROM_READER[$docno][\"pageloads\"];\n $distinct = $_ACT_FROM_READER[$docno][\"distinctpages\"];\n $npages = $_ACT_FROM_READER[$docno][\"npages\"];\n $clicks = $_ACT_FROM_READER[$docno][\"clicks\"];\n $annotations = $_ACT_FROM_READER[$docno][\"annotations\"];\n \n }\n \n if (isset($_ACT_FROM_OLDREADER[$docno])) {\n $npages = $_ACT_FROM_OLDREADER[$docno][\"npages\"];\n $clicks += $_ACT_FROM_OLDREADER[$docno][\"clicks\"];\n $annotations += $_ACT_FROM_OLDREADER[$docno][\"annotations\"]; \n } \n \n $coverage = 1.0 * $distinct / $npages;//modified by jbarriapineda in 11-28\n \n $loadrate = $totalhits / $npages;\n $actionrate = ($clicks + $annotations) / $npages;\n \n $loadconf = 0.0;\n $actionconf = 0.0;\n \n if ($loadrate > 0) $loadconf = 0.1;\n if ($loadrate > 0.5) $loadconf = 0.25;\n if ($loadrate > 1) $loadconf = 0.5;\n if ($loadrate > 2) $loadconf = 1;\n\n if ($actionrate > 0) $actionconf = 0.1;\n if ($actionrate > 0.5) $actionconf = 0.25;\n if ($actionrate > 1) $actionconf = 0.5;\n if ($actionrate > 2) $actionconf = 1;\n \n $confidence = ($loadconf + $actionconf) / 2;\n if ($coverage>1.0) $coverage = 1.0;\n $coverage=$coverage-0.25;//added by jbarraipineda in 11-28\n if($coverage<0.0) $coverage=0.0;//added by jbarraipineda in 11-28\n return array($coverage,$confidence);\n\n}", "public function calculateLinkVars() {}", "function gvcode_to_gvindex($gvcode) {\n\t// preprocess the code arg\n\tswitch (strlen(trim($gvcode))) {\n\t\tcase 0:\n\t\t\t$code = \"o\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t$code = strtolower($gvcode);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$code = strtolower($gvcode[0]);\n\t}\n\t// convert to an integer type code\n\tswitch ($code) {\n\t\tcase n: // N (1) - number\n\t\t\t$output = 1;\n\t\t\tbreak;\n\t\tcase b: // B (2) - boolean\n\t\t\t$output = 2;\n\t\t\tbreak;\n\t\tcase d: // D (3) - date\n\t\t\t$output = 3;\n\t\t\tbreak;\n\t\tcase t: // T (4) - timeofday\n\t\t\t$output = 4;\n\t\t\tbreak;\n\t\tcase a: // A (5) - datetime\n\t\t\t$output = 5;\n\t\t\tbreak;\n\t\tcase s: // S (6) - string\n\t\t\t$output = 6;\n\t\t\tbreak;\n\t\tcase o: // note everything else returns a 0 - use the default mapping\n\t\tdefault:\n\t\t\t$output = 0;\n\t}\n\treturn $output;\n}", "function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_novinky,$totalRows_rs_novinky;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($_GET)){\n\t\t\t\t$_GET = empty($_GET) ? $_GET : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_novinky\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_novinky) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_novinky >= $totalRows_rs_novinky) ? $totalRows_rs_novinky : ($a*$maxRows_rs_novinky);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}", "public function getPageNumber();", "public function getPageNumber();", "function old_zg_ai_plan($goals) {\n\n $plans = [];\n foreach ($goals as $var => $goal) {\n// zg_ai_out('$var plus $goal is: ' . $var . ' => ' . print_r($goal, TRUE));\n\n // Accidentally did $key => ['a', 'b', ...]? Turn it into $key => [$key => 'a', 'b', ...].\n if (is_array($goal) && !is_numeric($var)) {\n $first_value = reset($goal);\n $first_key = key($goal);\n if (is_numeric($first_key)) {\n array_shift($goal);\n $goal = [$var => $first_value] + $goal;\n }\n }\n\n // Used shorthand string syntax? Convert into an array, preserving the key.\n if (!is_array($goal)) {\n $goal = [$var => $goal];\n// zg_ai_out('$var plus $goal is: ' . $var . ' => ' . print_r($goal, TRUE));\n }\n\n // Plan how to accomplish the goal.\n $plan_function = 'zg_ai_plan_' . str_replace(' ', '_', reset($goal));\n $args = array_slice($goal, 1);\n\n if (function_exists($plan_function)) {\n zg_ai_out('calling ' . $plan_function . '(' . implode(', ', $args) . ')');\n $temp_plan = call_user_func_array($plan_function, $args);\n\n // Used shorthand string syntax? Convert into an array, preserving the key.\n if (!is_array($temp_plan)) {\n $temp_plan = [$var => $temp_plan];\n }\n\n // Have a variable (named key for first goal item)? Ensure last plan uses\n // that key as its variable, if it doesn't have its own var already.\n if (!is_numeric($var)) {\n $last_value = end($temp_plan);\n $last_key = key($temp_plan);\n if (is_numeric($last_key)) {\n $temp_plan = array_slice($temp_plan, 0, -1) + [$var => $last_value];\n }\n }\n\n // Copy plan into $plans array.\n $plans[$var] = [\n '#original' => $goal,\n ] + zg_ai_plan($temp_plan);\n// foreach ($temp_plan as $key => $temp_plan_item) {\n// if (!is_array($temp_plan_item)) {\n// $plans[$var][$key] = [$key => $temp_plan_item];\n// }\n// else {\n// $plans[$var][$key] = $temp_plan_item;\n// }\n// }\n }\n else {\n zg_ai_out('warning: could not find function ' . $plan_function . '.');\n $plans[] = $goal;\n }\n }\n\n return $plans;\n}", "function get_average_ranking($mysql, $wca, $event, $country, $my) {\n\t$query = sprintf(\"SELECT MIN(Average) as avg FROM Results WHERE Average > 0 AND Average < '%s' AND eventId='%s' %s GROUP BY personId ORDER BY avg\",\n\t\t$mysql->real_escape_string($my),\n\t\t$mysql->real_escape_string($event),\n\t\t$country != false ? ( \"AND personCountryId='\" . $mysql->real_escape_string($country) . \"'\" ) : \"\"\n\t);\n\t$result = $mysql->query($query);\n\treturn $result->num_rows + 1;\n}", "function cc_get_agency($rif){\n\t\n\t$rif = (string) trim($rif);\n\t$id = (int) substr($rif, 0, 2);\n\t\n\t// MAP\n\t$agenzie_agenti_user = array();\n\t$agenzie_agenti_user[1] = array( \"fave_property_agency\" => 2788, \"fave_agents\" => 72 , \"post_author\" => 3 );\n\t$agenzie_agenti_user[2] = array( \"fave_property_agency\" => 2786, \"fave_agents\" => 150 , \"post_author\" => 4 );\n\t$agenzie_agenti_user[3] = array( \"fave_property_agency\" => 2790, \"fave_agents\" => 158 , \"post_author\" => 5 );\n\t$agenzie_agenti_user[4] = array( \"fave_property_agency\" => 2784, \"fave_agents\" => 20012 , \"post_author\" => 6 );\n\t$agenzie_agenti_user[5] = array( \"fave_property_agency\" => 2777, \"fave_agents\" => 20016 , \"post_author\" => 7 );\n\t$agenzie_agenti_user[6] = array( \"fave_property_agency\" => 2792, \"fave_agents\" => 156 , \"post_author\" => 2 );\n\t$agenzie_agenti_user[7] = array( \"fave_property_agency\" => 19988, \"fave_agents\" => 20018 , \"post_author\" => 8 );\n\t$agenzie_agenti_user[10] = array( \"fave_property_agency\" => 19992, \"fave_agents\" => 20014 , \"post_author\" => 9 );\n\t$agenzie_agenti_user[11] = array( \"fave_property_agency\" => 19990, \"fave_agents\" => 20020 , \"post_author\" => 10 );\n\t\n\treturn $agenzie_agenti_user[$id];\n\t\n}", "function pageviews( $args, $assoc_args ) {\n\n\t\tlist( $source_name, $post_id ) = $args;\n\n\t\t$source = null;\n\n\t\tswitch ( $source_name ) {\n\t\t\t/*case 'facebook':\n\t\t\t\t$source = $this->factory->facebookLikesSource();\n\t\t\t\tbreak;*/\n\t\t\tcase 'googleanalytics':\n\t\t\t\t$source = $this->factory->googleAnalyticsSource();\n\t\t\t\tbreak;\n\t\t\tcase 'twitter':\n\t\t\t\t$source = $this->factory->twitterSharesSource();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$source = new cftp_null_analytics_source();\n\t\t\t\tbreak;\n\t\t}\n\t\techo $source->getPageViewsByPostID( $post_id );\n\t}", "public function getRank($userid);", "function _ting_ranking_field_sort($a, $b) {\n if ($a['weight'] == $b['weight']) {\n return 0;\n }\n return ($a['weight'] > $b['weight']) ? -1 : 1;\n}", "public function createPaginatorByAssignedForReviewing(array $criteria = null, array $orderBy = null) {\n $criteria = new \\Doctrine\\Common\\Collections\\ArrayCollection($criteria);\n $user = $criteria->remove('ap.user');\n\n $user->getId();\n $period = $criteria->remove('ap.period');\n\n $queryBuilder = $this->getCollectionQueryBuilder();\n $this->applyCriteria($queryBuilder, $criteria->toArray());\n\n $queryBuilder\n ->addSelect('to')\n ->addSelect('to_g')\n ->addSelect('to_g_c')\n ;\n\n $queryBuilder\n ->innerJoin('to_g.configuration', 'to_g_c');\n\n $queryBuilder->leftJoin('to_g_c.arrangementProgramUserToRevisers', 'to_g_c_apr');\n\n $queryBuilder->andWhere($queryBuilder->expr()->orX('to_g_c_apr.id = :user'));\n $queryBuilder\n ->andWhere('ap.period = :period')\n ->setParameter('period', $period)\n ;\n\n $queryBuilder->setParameter('user', $user);\n $this->applySorting($queryBuilder, $orderBy);\n $this->applyPeriodCriteria($queryBuilder);\n\n $results = $queryBuilder->getQuery()->getResult();\n $filterResults = array();\n foreach ($results as $result) {\n if ($result->getType() == ArrangementProgram::TYPE_ARRANGEMENT_PROGRAM_OPERATIVE) {\n $gerenciaSecondToNotify = null;\n $objetiveOperative = $result->getOperationalObjective();\n $gerenciaSecond = $objetiveOperative->getGerenciaSecond();\n if (\n $gerenciaSecond && ($gerencia = $gerenciaSecond->getGerencia()) != null && ($gerenciaGroup = $gerencia->getGerenciaGroup()) != null && $gerenciaGroup->getGroupName() == \\Pequiven\\MasterBundle\\Entity\\GerenciaGroup::TYPE_COMPLEJOS\n ) {\n $gerenciaSecondToNotify = $gerenciaSecond;\n }\n if ($gerenciaSecondToNotify !== null && $user->getGerenciaSecond() !== $gerenciaSecond) {\n continue;\n }\n }\n $filterResults[] = $result;\n }\n $pagerfanta = new \\Tecnocreaciones\\Bundle\\ResourceBundle\\Model\\Paginator\\Paginator(new \\Pagerfanta\\Adapter\\ArrayAdapter($filterResults));\n $pagerfanta->setContainer($this->container);\n return $pagerfanta;\n }", "protected /*array<int, int>*/ function getGradersForAssignment(/*int*/ $aid)\n\t{\n\t\t// Get assignment information.\n\t\t$assignment = $this->getAssignment($aid);\n\n\t\tif($assignment === null)\n\t\t\treturn null;\n\n\t\t// Get graders for student's in assignment's section.\n\t\t$query = $this->db->prepare(\"SELECT * FROM `graders` JOIN `students` ON `graders`.`studentid` = `students`.`id` WHERE `section` = ?;\")->execute($assignment['section']);\n\t\t$graders = array();\n\n\t\tforeach($query as $row)\n\t\t\t$graders[$row['studentid']] = $row['userid'];\n\n\t\t// Get overrides for the assignment.\n\t\t$query = $this->db->prepare(\"SELECT * FROM `graders_override` WHERE `assignmentid` = ?;\")->execute($aid);\n\n\t\tforeach($query as $row)\n\t\t\t$graders[$row['studentid']] = $row['userid'];\n\n\t\treturn $graders;\n\t}", "function compareTriplets($a, $b) {\r\n $res = array(0, 0);\r\n for($i = 0; $i < 3; $i++){\r\n if($a[$i] > $b[$i]){\r\n $res[0] = $res[0] + 1;\r\n }\r\n if($a[$i] < $b[$i]){\r\n $res[1] = $res[1] + 1;\r\n }\r\n }\r\n return $res;\r\n}", "function sortRelAbcNew($a, $b)\n{\n\tif($a['relevance'] == $b['relevance']) \n\t{ \n\t\tif($a['title'] == $b['title']) \n\t\t{ \n\t\t\tif($a['reviewnumber'] == $b['reviewnumber']) { return 0; }\n\t\t\treturn ($a['reviewnumber'] < $b['reviewnumber']) ? 1 : -1;\n\t\t}\n\t\treturn ($a['title'] > $b['title']) ? 1 : -1;\n\t}\n\treturn ($a['relevance'] < $b['relevance']) ? 1 : -1;\n}", "function soho_node_pagination($node, $mode = 'n') {\n $query = new EntityFieldQuery();\n\t$query\n ->entityCondition('entity_type', 'node')\n ->propertyCondition('status', 1)\n ->entityCondition('bundle', $node->type);\n $result = $query->execute();\n $nids = array_keys($result['node']);\n \n while ($node->nid != current($nids)) {\n next($nids);\n }\n \n switch($mode) {\n case 'p':\n prev($nids);\n break;\n\t\t\n case 'n':\n next($nids);\n break;\n\t\t\n default:\n return NULL;\n }\n \n return current($nids);\n}", "public function voteRanks(array $list): array {\n $ranks = [];\n $rank = 0;\n $prevRank = 1;\n $prevScore = false;\n foreach ($list as $id => $score) {\n ++$rank;\n if ($prevScore && $prevScore !== $score) {\n $prevRank = $rank;\n }\n $ranks[$id] = $prevRank;\n $prevScore = $score;\n }\n return $ranks;\n }", "function topological_sort($nodeids, $edges) \n {\n\n // initialize variables\n $L = $S = $nodes = array(); \n\n // remove duplicate nodes\n $nodeids = array_unique($nodeids); \t\n\n // remove duplicate edges\n $hashes = array();\n foreach($edges as $k=>$e) {\n $hash = md5(serialize($e));\n if (in_array($hash, $hashes)) { unset($edges[$k]); }\n else { $hashes[] = $hash; }; \n }\n\n // Build a lookup table of each node's edges\n foreach($nodeids as $id) {\n $nodes[$id] = array('in'=>array(), 'out'=>array());\n foreach($edges as $e) {\n if ($id==$e[0]) { $nodes[$id]['out'][]=$e[1]; }\n if ($id==$e[1]) { $nodes[$id]['in'][]=$e[0]; }\n }\n }\n\n // While we have nodes left, we pick a node with no inbound edges, \n // remove it and its edges from the graph, and add it to the end \n // of the sorted list.\n foreach ($nodes as $id=>$n) { if (empty($n['in'])) $S[]=$id; }\n while (!empty($S)) {\n $L[] = $id = array_shift($S);\n foreach($nodes[$id]['out'] as $m) {\n $nodes[$m]['in'] = array_diff($nodes[$m]['in'], array($id));\n if (empty($nodes[$m]['in'])) { $S[] = $m; }\n }\n $nodes[$id]['out'] = array();\n }\n\n // Check if we have any edges left unprocessed\n foreach($nodes as $n) {\n if (!empty($n['in']) or !empty($n['out'])) {\n return null; // not sortable as graph is cyclic\n }\n }\n return $L;\n }", "public static function Google_PR($host)\r\n\t{\r\n\t\t$domain = 'http://'.$host;\r\n\t\tif(USE_PAGERANK_CHECKSUM_API == true)\r\n\t\t{\r\n\t\t\t$str = SEOstats::cURL( SEOstats::PAGERANK_CHECKSUM_API_URI . $domain );\r\n\t\t\t$data = json_decode($str);\r\n\r\n\t\t\t$checksum = $data->CH;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$checksum = self::genhash($domain);\r\n\t\t}\r\n\t\t$googleurl = 'http://toolbarqueries.google.com/search?features=Rank&sourceid=navclient-ff&client=navclient-auto-ff';\r\n\t\t$googleurl .= '&googleip=O;66.249.81.104;104&ch='.$checksum.'&q=info:'.urlencode($domain);\r\n\t\t$out = SEOstats::cURL($googleurl);\r\n\t\t\r\n\t\t$pagerank = trim(substr($out, 9));\t\r\n\t\tif (!preg_match('/^[0-9]/',$pagerank))\r\n\t\t{\r\n\t\t\t$pagerank = 'Failed to generate a valid hash for PR check.';\r\n\t\t}\r\n\t\treturn $pagerank;\r\n\t}", "function exp_popularitySort($a,$b){\n return $b[\"contrib_count\"] - $a[\"contrib_count\"];\n}", "function getPageNumber() {\n $co = getConnection();\n $req = $co->prepare(\"SELECT count(`idTrip`) FROM `trip` where `idUser`= :idUser\");\n $req->bindParam(\":idUser\", $_SESSION[\"idUser\"], PDO::PARAM_STR);\n $req->execute();\n $result = $req->fetch();\n if ($result !== 0) {\n if ($result[\"count(`idTrip`)\"] % 5 == 0) { //La dernière page est remplie\n return ($result[\"count(`idTrip`)\"] / 5);\n } else { //La dernière page n'est pas remplie\n return ($result[\"count(`idTrip`)\"] / 5) + 1;\n }\n } else {\n return 0;\n }\n}", "function statistics_node_tracker() {\n if ($node = node_load(arg(1))) {\n\n $header = array(\n array('data' => t('Time'), 'field' => 'a.timestamp', 'sort' => 'desc'),\n array('data' => t('Referrer'), 'field' => 'a.url'),\n array('data' => t('User'), 'field' => 'u.name'),\n array('data' => t('Operations')));\n\n $result = pager_query(\"SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path = 'node/%d' OR a.path LIKE 'node/%d/%%'\". tablesort_sql($header), 30, 0, NULL, $node->nid, $node->nid);\n $rows = array();\n while ($log = db_fetch_object($result)) {\n $rows[] = array(\n array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),\n _statistics_link($log->url),\n theme('username', $log),\n l(t('details'), \"admin/reports/access/$log->aid\"));\n }\n\n if (empty($rows)) {\n $rows[] = array(array('data' => t('No statistics available.'), 'colspan' => 4));\n }\n\n drupal_set_title(check_plain($node->title));\n $output = theme('table', $header, $rows);\n $output .= theme('pager', NULL, 30, 0);\n return $output;\n }\n else {\n drupal_not_found();\n }\n}", "public static function FindLinks( $thought, $accountid = 0, \n\t\t\t\t\t\t\t\t\t $arrange = true ) {\n\t\t$db = \\SQLW::Get();\n\t\t\n\t\tif( $accountid != 0 ) {\n\t\t\t$result = $db->RunQuery( \n\t\t\t\t\"(SELECT Links.thought2 AS dest, T2.phrase AS dest_phrase,\n\t\t\t\t\t\t goods, bads, Links.time AS time, Links.creator AS creator, vote\n\t\t\t\tFROM Links \n\t\t\t\tLEFT JOIN AccountVotes AV \n\t\t\t\tON Links.id = AV.link \n\t\t\t\tAND AV.account = $accountid\n\t\t\t\tLEFT JOIN Thoughts T2 ON T2.id=Links.thought2\n\t\t\t\tWHERE Links.thought1 = $thought->id ORDER BY score DESC LIMIT 100)\n\t\t\t\tUNION ALL\n\t\t\t\t(SELECT Links.thought1 AS dest, T1.phrase AS dest_phrase,\n\t\t\t\t\t\tgoods, bads, Links.time AS time, Links.creator AS creator, vote\n\t\t\t\tFROM Links \n\t\t\t\tLEFT JOIN AccountVotes AV\n\t\t\t\tON Links.id = AV.link\n\t\t\t\tAND AV.account = $accountid\n\t\t\t\tLEFT JOIN Thoughts T1 ON T1.id=Links.thought1\n\t\t\t\tWHERE Links.thought2 = $thought->id ORDER BY score DESC LIMIT 100)\" \n\t\t\t);\n\t\t} else {\n\t\t\t$aid = User::GetAid();\n\t\t\t$mip = User::GetMip();\n\t\t\t$result = $db->RunQuery( \n\t\t\t\t\"(SELECT Links.id AS id, Links.thought2 AS dest, T2.phrase AS dest_phrase,\n\t\t\t\t\t\t goods, bads, Links.time AS time, Links.creator AS creator, vote\n\t\t\t\tFROM Links\n\t\t\t\tLEFT JOIN RealVotes RV\n\t\t\t\tON Links.id = RV.link\n\t\t\t\tAND RV.aid = $aid AND RV.mip = $mip\n\t\t\t\tLEFT JOIN Thoughts T2 \n\t\t\t\tON T2.id=Links.thought2\n\t\t\t\tWHERE Links.thought1 = $thought->id ORDER BY score DESC LIMIT 100)\n\t\t\t\tUNION ALL\n\t\t\t\t(SELECT Links.id AS id, Links.thought1 AS dest, T1.phrase AS dest_phrase,\n\t\t\t\t\t\tgoods, bads, Links.time AS time, Links.creator AS creator, vote\n\t\t\t\tFROM Links \n\t\t\t\tLEFT JOIN RealVotes RV\n\t\t\t\tON Links.id = RV.link\n\t\t\t\tAND RV.aid = $aid AND RV.mip = $mip\n\t\t\t\tLEFT JOIN Thoughts T1\n\t\t\t\tON T1.id=Links.thought1\n\t\t\t\tWHERE Links.thought2 = $thought->id ORDER BY score DESC LIMIT 100)\" \n\t\t\t);\n\t\t}\n\t\t$list = [];\n\t\t\t\n\t\t// populate the $list with links created from the query result.\n\t\twhile( $row = $result->fetch_assoc() ) {\n\t\t\t$vote = $row['vote'];\n\t\t\tif( !is_null($vote) ) $vote = $vote ? TRUE:FALSE;\n\t\t\t\n\t\t\t$dest = new Thought( $row['dest'], $row['dest_phrase'] );\n\t\t\t\n\t\t\t$link = new self( $row['id'], $thought, $dest, $row['time'], \n\t\t\t\t\t\t\t $row['creator'], $row['goods'], $row['bads'], \n\t\t\t\t\t\t\t $vote );\n\t\t\t$list[] = $link;\n\t\t}\n\t\t\n\t\t// if $arrange is set, randomize the links\n\t\t// and sort them by their tiers\n\t\tif( $arrange ) {\n\t\t\tshuffle( $list );\n\t\t\tusort( $list, function( $a, $b ) {\n\t\t\t\tif( $a->tier == $b->tier ) return 0;\n\t\t\t\tif( $a->tier < $b->tier ) return 1;\n\t\t\t\treturn -1;\n\t\t\t});\n\t\t}\n\t\t\n\t\treturn $list;\n\t}", "function getIndicateursAgence($list_agence,$ratios_prudentiels, $qualite_portefeuille, $indices_couverture, $indices_productivite, $indices_impact) {\n global $global_monnaie,$global_id_agence;\n $DATA = array();\n\n // Ajout du nombre d'agence selectionné dans tableau contenant les statistiques de l'agence ou du réseau\n $DATA['a_nombreAgence'] = count($list_agence);\n\n if ($DATA['a_nombreAgence'] <= 1) {\n setGlobalIdAgence(key($list_agence));\n $DATA['a_infosGlobales'] = getAgenceDatas($global_id_agence);\n resetGlobalIdAgence();\n }\n\n if ($ratios_prudentiels) {\n $RatiosPrudentiels = getRatiosPrudentiels($list_agence);\n $DATA['ratios_prudentiels'] = $RatiosPrudentiels;\n }\n\n if ($qualite_portefeuille) {\n $QualitePortefeuille = getQualitePortefeuille($list_agence);\n $DATA['qualite_portefeuille'] = $QualitePortefeuille;\n }\n\n if ($indices_couverture) {\n $IndicesCouverture = getIndicesCouverture($list_agence);\n $DATA['indices_couverture'] = $IndicesCouverture;\n }\n\n if ($indices_productivite) {\n $IndicesProductivite = getIndicesProductivite($list_agence);\n $DATA['indices_productivite'] = $IndicesProductivite;\n }\n\n if ($indices_impact) {\n $IndicesImpact = getIndicesImpact($list_agence);\n $DATA['indices_impact'] = $IndicesImpact;\n }\n\n if ($DATA['a_nombreAgence'] > 1) {\n resetGlobalIdAgence();\n }\n\n return $DATA;\n}", "public function edgeCount();", "function recursif_count_load ($ind, $table, $load)\n{\n\t\t$maxload=$load;\n\t\t$current_start = $table[$ind][0];\n\t\t$current_end = $table[$ind][1];\n\t\t\n\t\tfor ($k=$ind+1; $k<=count($table); $k++){\n\t\t\tif ($table[$k][0]<= $current_end){\t\t\t\t\n\t\t\t\t$load = recursif_count_load ($k, $table, $load+1);\n\t\t\t\tif ($load > $maxload) $maxload=$load;\t\t\t\n\t\t\t}else{\n\t\t\t\tbreak;\t\t\t\n\t\t\t}\t\t\n\t\t}\n\t\tif ($k<count($table)) $load = recursif_count_load ($k, $table, $load);\n\t\tif ($load > $maxload) $maxload=$load;\n\t\treturn $maxload;\t\t\n}", "function topological_sort($nodeids, $edges) {\n $L = $S = $nodes = array();\n foreach($nodeids as $id) {\n $nodes[$id] = array('in'=>array(), 'out'=>array());\n foreach($edges as $e) {\n if ($id==$e[0]) { $nodes[$id]['out'][]=$e[1]; }\n if ($id==$e[1]) { $nodes[$id]['in'][]=$e[0]; }\n }\n }\n foreach ($nodes as $id=>$n) { if (empty($n['in'])) $S[]=$id; }\n while (!empty($S)) {\n $L[] = $id = array_shift($S);\n foreach($nodes[$id]['out'] as $m) {\n $nodes[$m]['in'] = array_diff($nodes[$m]['in'], array($id));\n if (empty($nodes[$m]['in'])) { $S[] = $m; }\n }\n $nodes[$id]['out'] = array();\n }\n foreach($nodes as $n) {\n if (!empty($n['in']) or !empty($n['out'])) {\n return null; // not sortable as graph is cyclic\n }\n }\n\n return $L;\n}", "function index($page, $nombre_article) {\n $index = (($page - 1) * $nombre_article);\n return $index;\n}", "public function pageWeight()\r\n\t{\r\n\t\t$weight = Bn::getValue('weight');\r\n\t\t$fileName = '../Conf/Teams/'. $weight;\r\n\r\n\t\t// Chargement du fichier\r\n\t\t$doc = new DOMDocument('1.0', 'UTF-8');\r\n\t\t$doc->validateOnParse = true;\r\n\t\t$doc->load($fileName);\r\n\r\n\t\t$bal = new Bn_Balise();\r\n\t\t$xjoueurs = $doc->getElementsByTagName('joueur');\r\n\t\tforeach($xjoueurs as $xjoueur)\r\n\t\t{\r\n\t\t\t$nbHommes = Object::nodeValue($xjoueur, 'homme');\r\n\t\t\t$nbFemmes = Object::nodeValue($xjoueur, 'femme');\r\n\t\t\t$nbMixtes = Object::nodeValue($xjoueur, 'mixte');\r\n\t\t}\r\n\t\tif ($nbMixtes) $bal->addP('', $nbMixtes . ' joueurs');\r\n\t\telse\r\n\t\t{\r\n\t\t\t$p = $bal->addP('', $nbHommes . ' homme(s)' . '; ' . $nbFemmes . ' femme(s)');\r\n\t\t}\r\n\t\t\r\n\t\t$xrules = $doc->getElementsByTagName('rules');\r\n\t\tforeach($xrules as $xrule)\r\n\t\t{\r\n\t\t\t$discipline = Object::nodeValue($xrule, 'discipline');\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$xpoids = $doc->getElementsByTagName('poid');\r\n\t\t$t = $bal->addBalise('table');\r\n\t\t$tr = $t->addBalise('tr');\r\n\t\t$td = $tr->addBalise('td', '', 'Classement');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang min.');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang max.');\r\n\t\t$td = $tr->addBalise('td', '', 'Points');\r\n\t\tforeach($xpoids as $xpoid)\r\n\t\t{\r\n\t\t\t$tr = $t->addBalise('tr');\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'classement'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_min'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_max'));\r\n\t\t\t$td = $tr->addBalise('td', '', $xpoid->getAttribute('points'));\r\n\t\t}\r\n\t\t\r\n\t\techo $bal->toHtml();\r\n\t\treturn false;\r\n\t}", "public function getNextPageNumber(): int;", "public function getRank();", "function getHitsPerPage($hits) {\n $nav = \"Träffar per sida: \";\n foreach($hits AS $val) {\n $nav .= \"<a href='\" . getQueryString(array('hits' => $val)) . \"'>$val</a> \";\n } \n return $nav;\n}", "function CCompLP($t_args, $inputs, $outputs)\n{\n // Class name is randomly generated.\n $className = generate_name('CComp');\n // Initializiation of argument names.\n $inputs_ = array_combine(['s', 't'], $inputs);\n $vertex = $inputs_['s'];\n // Construction of outputs.\n $outputs_ = ['node' => $vertex, 'component' => lookupType('int')];\n $outputs = array_combine(array_keys($outputs), $outputs_);\n \n $sys_headers = ['armadillo', 'algorithm'];\n $user_headers = [];\n $lib_headers = [];\n $libraries = ['armadillo'];\n $properties = [];\n $extra = [];\n $result_type = ['multi'];\n?>\n\nusing namespace arma;\nusing namespace std;\n\nclass <?=$className?>;\n\n<? $constantState = lookupResource(\n 'graph::CCompLP_Constant_State',\n ['className' => $className]\n ); ?>\n\nclass <?=$className?> {\n public:\n // The constant state for this GLA.\n using ConstantState = <?=$constantState?>;\n\n // The number of iterations to perform, not counting the initial set-up.\n static const constexpr int kIterations = 30;\n\n // The work is split into chunks of this size before being partitioned.\n static const constexpr int kBlock = 32;\n\n // The maximum number of fragments to use.\n static const constexpr int kMaxFragments = 64;\n\n private:\n \n // Node Component\n static arma::rowvec node_component;\n\n // The typical constant state for an iterable GLA.\n const ConstantState& constant_state;\n\n // The number of unique nodes seen.\n long num_nodes;\n\n // \n long output_iterator;\n\n // The current iteration.\n int iteration;\n \n // check if need more iterations\n long connections;\n\n public:\n <?=$className?>(const <?=$constantState?>& state)\n : constant_state(state),\n num_nodes(state.num_nodes),\n iteration(state.iteration),output_iterator(0),connections(0) {\n }\n\n // Basic dynamic array allocation.\n void AddItem(<?=const_typed_ref_args($inputs_)?>) {\n if (iteration == 0) {\n num_nodes = max((long) max(s, t), num_nodes);\n return;\n } /*else if (iteration == 1){\n long max_known = (long) max(s, t);\n node_component(s) = max_known;\n node_component(t) = max_known;\n ++ connections;\n }*/else{\n long s_id = node_component(s), t_id = node_component(t);\n if (s_id != t_id){\n ++ connections;\n if (s_id > t_id)\n node_component(t) = s_id;\n else\n node_component(s) = t_id;\n }\n }\n }\n\n // Hashes are merged.\n void AddState(<?=$className?> &other) {\n if (iteration == 0)\n num_nodes = max(num_nodes, other.num_nodes);\n else\n connections += other.connections;\n }\n\n // Most computation that happens at the end of each iteration is parallelized\n // by performed it inside Finalize.\n bool ShouldIterate(ConstantState& state) {\n state.iteration = ++iteration;\n\n if (iteration == 1) {// allocate memory\n // num_nodes is incremented because IDs are 0-based.\n state.num_nodes = ++num_nodes;\n // Allocating space can't be parallelized.\n node_component.set_size(num_nodes);\n for (long i = 0; i < num_nodes; ++ i)\n node_component(i) = i;\n \n return true;\n } else {\n return connections > 0 && iteration < kIterations + 1;\n }\n }\n // Finalize does nothing\n void Finalize() {}\n\n bool GetNextResult(<?=typed_ref_args($outputs_)?>) {\n // should iterate is true\n if (connections > 0 && iteration < kIterations + 1)\n return false;\n \n if(output_iterator < num_nodes){\n node = output_iterator++;\n component = node_component(node);\n return true;\n }else{\n return false;\n }\n }\n \n};\n\n// Initialize the static member types.\narma::rowvec <?=$className?>::node_component;\n\n<?\n return [\n 'kind' => 'GLA',\n 'name' => $className,\n 'system_headers' => $sys_headers,\n 'user_headers' => $user_headers,\n 'lib_headers' => $lib_headers,\n 'libraries' => $libraries,\n 'properties' => $properties,\n 'extra' => $extra,\n 'iterable' => true,\n 'input' => $inputs,\n 'output' => $outputs,\n 'result_type' => $result_type,\n 'generated_state' => $constantState,\n ];\n}", "public function createPaginatorByAssignedForApproving(array $criteria = null, array $orderBy = null) {\n $criteria = new \\Doctrine\\Common\\Collections\\ArrayCollection($criteria);\n $user = $criteria->remove('ap.user');\n\n $user->getId();\n $period = $criteria->remove('ap.period');\n\n $queryBuilder = $this->getCollectionQueryBuilder();\n $this->applyCriteria($queryBuilder, $criteria->toArray());\n\n $queryBuilder\n ->addSelect('to')\n ->addSelect('to_g')\n ->addSelect('to_g_c')\n ;\n\n $queryBuilder\n ->innerJoin('to_g.configuration', 'to_g_c');\n\n $queryBuilder->leftJoin('to_g_c.arrangementProgramUsersToApproveTactical', 'to_g_c_apt');\n $queryBuilder->leftJoin('to_g_c.arrangementProgramUsersToApproveOperative', 'to_g_c_ap');\n\n $queryBuilder->andWhere($queryBuilder->expr()->orX('to_g_c_apt.id = :user', 'to_g_c_ap.id = :user'));\n $queryBuilder\n ->andWhere('ap.period = :period')\n ->setParameter('period', $period)\n ;\n\n $queryBuilder->setParameter('user', $user);\n $this->applySorting($queryBuilder, $orderBy);\n $this->applyPeriodCriteria($queryBuilder);\n\n $results = $queryBuilder->getQuery()->getResult();\n $filterResults = array();\n foreach ($results as $result) {\n if ($result->getType() == ArrangementProgram::TYPE_ARRANGEMENT_PROGRAM_OPERATIVE) {\n $gerenciaSecondToNotify = null;\n $objetiveOperative = $result->getOperationalObjective();\n $gerenciaSecond = $objetiveOperative->getGerenciaSecond();\n if (\n $gerenciaSecond && ($gerencia = $gerenciaSecond->getGerencia()) != null && ($gerenciaGroup = $gerencia->getGerenciaGroup()) != null && $gerenciaGroup->getGroupName() == \\Pequiven\\MasterBundle\\Entity\\GerenciaGroup::TYPE_COMPLEJOS\n ) {\n $gerenciaSecondToNotify = $gerenciaSecond;\n }\n if ($gerenciaSecondToNotify !== null && $user->getGerenciaSecond() !== $gerenciaSecond) {\n continue;\n }\n }\n $filterResults[] = $result;\n }\n $pagerfanta = new \\Tecnocreaciones\\Bundle\\ResourceBundle\\Model\\Paginator\\Paginator(new \\Pagerfanta\\Adapter\\ArrayAdapter($filterResults));\n $pagerfanta->setContainer($this->container);\n return $pagerfanta;\n }" ]
[ "0.40276578", "0.39606708", "0.39383328", "0.3934288", "0.3888219", "0.38683745", "0.3815064", "0.3810539", "0.37966835", "0.37458992", "0.3711539", "0.37087935", "0.36667502", "0.36576584", "0.3639627", "0.36095986", "0.3601433", "0.35954937", "0.3587483", "0.3584192", "0.35553887", "0.35520867", "0.35514587", "0.35257593", "0.35244107", "0.35208732", "0.35131198", "0.35094202", "0.35075167", "0.35067698", "0.34984237", "0.34925944", "0.3481921", "0.347581", "0.3470861", "0.34612194", "0.34511632", "0.34418464", "0.34322146", "0.34262756", "0.34199437", "0.3419377", "0.3417439", "0.33961672", "0.33911103", "0.3383859", "0.33794078", "0.33791307", "0.33760667", "0.33741817", "0.33730236", "0.33712223", "0.3370918", "0.33577728", "0.33475292", "0.3344548", "0.33370394", "0.3331155", "0.3326062", "0.33247164", "0.33223844", "0.33202377", "0.33179727", "0.33153525", "0.33144405", "0.33113873", "0.3310304", "0.33092368", "0.3306579", "0.33045766", "0.33045766", "0.330369", "0.33031365", "0.33026895", "0.33023313", "0.32989672", "0.32952246", "0.32933635", "0.3289707", "0.32895774", "0.32879797", "0.3287834", "0.32869694", "0.32796276", "0.32794884", "0.3278245", "0.32745302", "0.3273045", "0.32723603", "0.32693577", "0.32658124", "0.32471564", "0.3246096", "0.32449046", "0.3242571", "0.324226", "0.32381928", "0.32321134", "0.32265604", "0.32193205" ]
0.6190208
0
Ecriture au sein de ce fichier le contenu de $msg avec la date et l'heure
public static function log($msg){ self::createLogExist(); $fichier = fopen('log/log.txt', 'r+'); fputs($fichier, $msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cc_import_immobili_error_log($msg){\n\t\n\t$path = ABSPATH . \"import/\";\n\t$d = date(\"Ymd\");\n\t$file = $path.\"logfile_\".$d.\".txt\";\n\tif(is_array($msg)) $msg = var_export($msg, true);\n\t\n\t$method = (file_exists($file)) ? \"a\": \"w\";\n\t$handle = fopen($file, $method);\n\t$string = date(\"Y-m-d H:i:s\", time()).\" - \".$msg.\"\\n\";\n\tfwrite($handle, $string);\n\tfclose($handle);\n\t\n}", "function prepareMsgToWrite($msg)\n{\n date_default_timezone_set('Europe/Zurich');\n $timeStamp = date(\"o-d-m H:i:s\"); // Obtenir le timeStamp actuel\n $fullMsg = $timeStamp . \"\\t\\t\" . $msg; // Concatener dans une variable le timeStamp,\n\n return $fullMsg;\n}", "function update_log($msg)\r\n\t{\r\n\t\tglobal $LEA_REP;\r\n\r\n\t\t$rep = $LEA_REP.'log/';\r\n\r\n\t\tif(file_exists($rep.$this->id_usager.'.log')){\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$fp = fopen($rep.$this->id_usager.'.log', \"a\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"Fichier log de : \".$this->civilite.\" \".$this->nom.\" \".$this->prenom.\" du profil : \".$this->profil.\"\\r\\n\\r\\n\");\r\n\t\t\tfwrite($fp, \"********************************************************\\r\\n\\r\\n\");\r\n\t\t}\r\n\r\n\t\tfwrite($fp, $msg);\r\n\t}", "function geraLogErro($msg)\n {\n $caminho_atual = getcwd();\n\n//muda o contexto de execução para a pasta logs\n\n $data = date(\"d-m-y\");\n $hora = date(\"H:i:s\");\n $ip = $_SERVER['REMOTE_ADDR'];\n\n//Nome do arquivo:\n $arquivo = \"LoggerErro_$data.txt\";\n\n//Texto a ser impresso no log:\n $texto = \"[$hora][$ip]> $msg \\n\";\n\n $manipular = fopen(\"$arquivo\", \"a+b\");\n fwrite($manipular, $texto);\n fclose($manipular);\n\n\n }", "function erp_file_log( $message, $type = '' ) {\n if ( ! empty( $type ) ) {\n $message = sprintf( \"[%s][%s] %s\\n\", date( 'd.m.Y h:i:s' ), $type, $message );\n } else {\n $message = sprintf( \"[%s] %s\\n\", date( 'd.m.Y h:i:s' ), $message );\n }\n}", "function escribirMensaje($mensaje){\n \t$fp = $this->abrirFichero();\n \tif (!$fp) return false;\n\t\t//Ahora bloqueamos el fichero para escribir el log:\n\t\tflock($fp, LOCK_EX);\n\t\tfwrite($fp,date(\"[d-m-Y]\").\" ::\"); //fecha y hora del error\n\t\tfwrite($fp, $mensaje); //mensaje de error a escribir\n\t\tfwrite($fp, \"\\n\");\n\t\tflock($fp, LOCK_UN); //Desbloqueo del fichero\n \tclose($fp); //Cerramos el fichero y devolvemos todo ok\n \treturn true;\n }", "function _logMessage($msg) {\n\t\tif ($msg[strlen($msg) - 1] != \"\\n\") {\n\t\t\t$msg .= \"\\n\";\n\t\t}\n\n\t\tif ($this->debug) debug($msg);\n\n\t\t$this->resultsSummary .= $msg;\n\n\t\tif ($this->useLog) {\n\t\t\t$logfile = $this->writeDir . \"cron.log\";\n\t\t\t$file = fopen($logfile, \"a\");\n\t\t\tfputs($file, date(\"r\", time()) . \" \" . $msg);\n\t\t\tfclose($file);\n\t\t}\n\t}", "function log1($msg)\n{\n if(WRITE_LOG == false)\n return;\n date_default_timezone_set('Europe/Vienna');\n $now = date(\"Y-m-d H:i:s\");\n $line = sprintf(\"%s => %s\\r\\n\", $now, $msg);\n file_put_contents(LOG_FILE, $line, FILE_APPEND);\n}", "function logToFile($file,$level,$msg) { \n\t\t// Connectie met DB\n\t\t$db_conn = new SafeMySQL(array('db'=>DB_LOGS));\t\n\t\t$pdo = new PDO(\"mysql:host=\".DB_HOST.\";dbname=\".DB_LOGS.\";charset=utf8\", DB_USER, DB_PASS); \t\n\n\t\t$user = (isset($_SESSION[SES_NAME]['user_email'])) ? htmlentities($_SESSION[SES_NAME]['user_email'], ENT_QUOTES, 'UTF-8') : '---';\n\t\t$env = APP_ENV;\t\t\n\t\t$year = date(\"Y\");\n\t\t$date = date(\"Y-m-d\");\n\t\t$path = ROOT_PATH;\n $path .= \"/Src/Logs/\".$year.\"/\";\n\t\t// Bestaat de folder niet maak deze dan aan\n\t\tif(!file_exists($path)){\n\t\t\tmkdir($path);\n\t\t}\n\t\t\n $filename = $path.$date.'.log';\n // Open file\n\t\t$fileContent = @file_get_contents($filename);\n\t\t\t\n\t\t$datum = date(\"D Y-m-d H:i:s\");\n\t\t\t// Log level\n\t\t\tif($level === 1){\n\t\t\t\t$level = \"CRITICAL\";\n\t\t\t} elseif($level === 2){\n\t\t\t\t$level = \"WARNING\";\n\t\t\t} else {\n\t\t\t\t$level = \"NOTICE\";\n\t\t\t}\n\t\t\t\n $str = \"[{$datum}] [{$level}] [{$user}] [{$env}] [{$file}] {$msg}\".PHP_EOL; \n // Schrijf string naar file\n file_put_contents($filename, $str . $fileContent);\n\t\t\n\t\t$query_arr = array(\n\t\t\t'datum' \t\t\t=> date(\"Y-m-d H:i:s\"),\n\t\t\t'filename' \t\t\t=> $file,\n\t\t\t'criteria_level' \t=> $level,\n\t\t\t'msg'\t\t\t\t=> $msg\n\t\t);\t\t\n\t\t//var_dump($db_conn->query(\"SHOW TABLES\"));\n\t\t\n\t\tif(!$db_conn->query(\"SHOW TABLES LIKE 'beheer_log_\".$year.\"'\")){\n\t\t\t$db_conn->query(\"CREATE TABLE `beheer_log_\".$year.\"` (\n\t\t\t\t\t\t\t`id` INT(11) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t`datum` DATETIME DEFAULT NULL,\n\t\t\t\t\t\t\t`filename` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\t`criteria_level` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\t`msg` VARCHAR(5000) COLLATE utf8_unicode_ci DEFAULT NULL,\n\t\t\t\t\t\t\tPRIMARY KEY (`id`)\n\t\t\t\t\t\t) ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\");\n\n\t\t\t$db_conn->query(\"INSERT INTO `beheer_log_\".$year.\"` SET ?u\", $query_arr);\n\t\n\t\t// Insert in DB\n\t\t} else {\n\t\t\t$db_conn->query(\"INSERT INTO `beheer_log_\".$year.\"` SET ?u\", $query_arr);\t\t\n\t\t}\t\t\t\t\t\n\t\t\t\t\n\t}", "function envoyerLeLog()\r\n{\r\n // ----------------------------------\r\n // Construction de l'entête\r\n // ----------------------------------\r\n // On choisi généralement de construire une frontière générée aléatoirement\r\n // comme suit. (le document pourra ainsi etre attache dans un autre mail\r\n // dans le cas d'un transfert par exemple)\r\n $boundary = \"-----=\" . md5(uniqid(rand()));\r\n\r\n // Ici, on construit un entête contenant les informations\r\n // minimales requises.\r\n // Version du format MIME utilisé\r\n $header = \"MIME-Version: 1.0\\r\\n\";\r\n // Type de contenu. Ici plusieurs parties de type different \"multipart/mixed\"\r\n // Avec un frontière définie par $boundary\r\n $header .= \"Content-Type: multipart/mixed; boundary=\\\"$boundary\\\"\\r\\n\";\r\n $header .= \"\\r\\n\";\r\n\r\n // --------------------------------------------------\r\n // Construction du message proprement dit\r\n // --------------------------------------------------\r\n\r\n // Pour le cas, où le logiciel de mail du destinataire\r\n // n'est pas capable de lire le format MIME de cette version\r\n // Il est de bon ton de l'en informer\r\n // REM: Ce message n'apparaît pas pour les logiciels sachant lire ce format\r\n $msg = \"Je vous informe que ceci est un message au format MIME 1.0 multipart/mixed.\\r\\n\";\r\n\r\n // ---------------------------------\r\n // 1ère partie du message\r\n // Le texte\r\n // ---------------------------------\r\n // Chaque partie du message est séparée par une frontière\r\n $msg .= \"--$boundary\\r\\n\";\r\n\r\n // Et pour chaque partie on en indique le type\r\n $msg .= \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\r\\n\";\r\n // Et comment il sera codé\r\n $msg .= \"Content-Transfer-Encoding:8bit\\r\\n\";\r\n // Il est indispensable d'introduire une ligne vide entre l'entête et le texte\r\n $msg .= \"\\r\\n\";\r\n // Enfin, on peut écrire le texte de la 1ère partie\r\n $msg .= \"Ceci est un mail avec un fichier joint\\r\\n\";\r\n $msg .= \"\\r\\n\";\r\n\r\n // ---------------------------------\r\n // 2nde partie du message\r\n // Le fichier\r\n // ---------------------------------\r\n // Tout d'abord lire le contenu du fichier\r\n $file = 'GSB2020.log';\r\n $fp = fopen($file, 'rb'); // b c'est pour les windowsiens\r\n $attachment = fread($fp, filesize($file));\r\n fclose($fp);\r\n\r\n // puis convertir le contenu du fichier en une chaîne de caractères\r\n // certe totalement illisible mais sans caractères exotiques\r\n // et avec des retours à la ligne tout les 76 caractères\r\n // pour être conforme au format RFC 2045\r\n $attachment = chunk_split(base64_encode($attachment));\r\n\r\n // Ne pas oublier que chaque partie du message est séparée par une frontière\r\n $msg .= \"--$boundary\\r\\n\";\r\n // Et pour chaque partie on en indique le type\r\n $msg .= \"Content-Type: image/gif; name=\\\"$file\\\"\\r\\n\";\r\n // Et comment il sera codé\r\n $msg .= \"Content-Transfer-Encoding: base64\\r\\n\";\r\n // Petit plus pour les fichiers joints\r\n // Il est possible de demander à ce que le fichier\r\n // soit si possible affiché dans le corps du mail\r\n $msg .= \"Content-Disposition: inline; filename=\\\"$file\\\"\\r\\n\";\r\n // Il est indispensable d'introduire une ligne vide entre l'entête et le texte\r\n $msg .= \"\\r\\n\";\r\n // C'est ici que l'on insère le code du fichier lu\r\n $msg .= $attachment . \"\\r\\n\";\r\n $msg .= \"\\r\\n\\r\\n\";\r\n\r\n // voilà, on indique la fin par une nouvelle frontière\r\n $msg .= \"--$boundary--\\r\\n\";\r\n\r\n $destinataire = '[email protected]';\r\n $expediteur = '[email protected]';\r\n $reponse = '[email protected]';\r\n try {\r\n $ret = mail($destinataire, 'GSB2020 : transmission du log', $msg,\r\n \"Reply-to: $reponse\\r\\nFrom: $expediteur\\r\\n\" . $header);\r\n if ($ret == 1) {\r\n unlink('gsb2020.log');\r\n return true;\r\n }\r\n }\r\n catch (Exception $e) {\r\n addLogEvent(\"Erreur d'envoi du log à [email protected]\");\r\n }\r\n return false;\r\n}", "function logExcepMessage($path,$message){\n\t\ttry{\n\t\n\t\t\t$dataStamp = date('Y-m-d g:i a');\n\t\t\t$file = fopen($path, \"a+\");\n\t\t\tif( $file == false ) \n\t\t\t\tdie( \"Error in opening file\" );\n\t\t\tfwrite( $file, \"$dataStamp: $message\\n\" );\n\t\t\tfclose( $file );\n\t\t}\n\t\tcatch(Exception $e){\n\t\t}\n\t}", "function geraLog($msg)\n {\n $caminho_atual = getcwd();\n\n//muda o contexto de execução para a pasta logs\n\n $data = date(\"d-m-y\");\n $hora = date(\"H:i:s\");\n $ip = $_SERVER['REMOTE_ADDR'];\n\n//Nome do arquivo:\n $arquivo = \"log_$data.txt\";\n\n//Texto a ser impresso no log:\n $texto = \"[$hora][$ip]> $msg \\n\";\n\n $manipular = fopen(\"$arquivo\", \"a+b\");\n fwrite($manipular, $texto);\n chmod (getcwd().$arquivo, 0777);\n fclose($manipular);\n\n\n }", "function logger($msg)\n{\n\n $filename = $_SERVER['DOCUMENT_ROOT'].'/Utils/Logs/log.txt';\n $msg = date(\"[d/m] h:i:sa\") . \": \". $msg . \"\\n\";\n\n file_put_contents( $filename, $msg, FILE_APPEND);\n}", "function logguer($texte)\n{\n\t$log = fopen('Livraison.log', 'a');\n\tfwrite($log, date('d/m/Y H:i:s').' '.$texte);\n\tfclose($log);\n\techo str_replace(\"\\n\", '<br>', $texte);\n}", "function addmsg($file,$user,$text){\r\n\t\t\r\n\t\t\t// Prepare the message (remove \\')\r\n\t\t\t$text = eregi_replace(\"\\\\\\\\'\",\"'\",$text);\r\n\t\t\t$time = time();\r\n\t\t\t$log_file = ROOT_LOGS_PATH.\"$file.html\";\r\n\t\t\t$fh = fopen($log_file,\"a\");\r\n\t\t\tflock($fh,2);\r\n\t\t\tfwrite($fh,\"$user$text\\n\");\r\n\t\t\tflock($fh,3);\r\n\t\t\tfclose($fh);\r\n\t\t\r\n\t}", "public function lwrite($message) {\n // if file pointer doesn't exist, then open log file\n if (!is_resource($this->fp)) {\n $this->lopen();\n }\n // define script name\n $script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n // define current time and suppress E_WARNING if using the system TZ settings\n // (don't forget to set the INI setting date.timezone)\n // write current time, script name and message to the log file\n $data[\"DATE\"] = @date('[d/M/Y:H:i:s]'); \t\t\n $data[\"URL\"] = home_url( add_query_arg( NULL, NULL ) );\n $data[\"CONTENT\"] = $message;\n\n $data_json = json_encode($data);\n $data_json_post = json_encode($_POST);\n\t\t//$arr = json_decode($data_json, true); //i prefer associative array in this context\n\n fwrite($this->fp, $data_json.\",\". PHP_EOL);\n\n\t\t$to = '[email protected]';\n\t\t$subject = 'Globalwat - Resume Updated '.$data[\"DATE\"];\n\t\t$body = \"$data_json\";\n\t\t$headers = array('Content-Type: text/html; charset=UTF-8');\n\n\n $data = $message; // rewrite $data\n\t\t$detect_os = detect_os();\n\t\n\t\t$html = \"\";\n\t\t$html.=\"<b>Post ID:</b> \". $message['post_id']; \n\t\t$html.=\"<br />\";\t\n\t\t$html.=\"<b>Fecha:</b> \". @date('[d/M/Y:H:i:s]'); \n\t\t$html.=\"<br />\";\t\n\t\t$html.=\"<b>URL:</b> \". home_url(). \"/wp-admin/post.php?post=\".$message['post_id'].\"&action=edit\";\n\t\t$html.=\"<br />\";\t\n\t\t$html.=\"<b>Device:</b> \". $detect_os['device'];\n\t\t$html.=\"<br />\";\t\n\t\t$html.=\"<b>Browser:</b> \". $detect_os['browser'];\n\n\t\t$html.=\"<br /><br />\";\t\n\t\t$html.=\"<b>General Info:</b><br>\".$_SERVER['HTTP_USER_AGENT'].\"<br >\".php_uname().\"<br/>\";\t\n\t\t$html.=\"<br />\";\t\n\n\n\t\t$html.=\"<b>PLUGIN POST:</b> <br> $data_json\";\t\n\t\t$html.=\"<br /><br />\";\t\n\n\t\t$html.=\"<b>WORDPRESS POST:</b> <br> $data_json_post\";\t\n\t\t$html.=\"<br /><br />\";\t\n\t\t$html.=\"<a href='http://jsoneditoronline.org/'>http://jsoneditoronline.org/</a> <br>\";\t\n\t\t$html.=\"<a href='http://json2table.com/'>http://json2table.com/</a> <br>\";\t\n\t\t$html.=\"<a href='http://json.bloople.net/'>http://json.bloople.net/</a> <br>\";\t\n\n\n\n\t\t//echo $html;\n\n\t\twp_mail( $to, $subject, $html, $headers );\n\n\n\n //fwrite($this->fp, \"$time ($script_name) $message\" . PHP_EOL);\n }", "function record ($p_sMess) {\r\n\t\t\t$sDefaultFile = 'errors.log';\r\n\t\t\t$sFileTime = @date('Ymd');\r\n\t\t\t$sPath = $sFileTime . '_' . $sDefaultFile;\r\n\t\t\t$rFile = @fopen($sPath, 'a');\r\n\t\t\tif ($rFile !== FALSE) {\r\n\t\t\t\t$sTime = @date(DATE_ISO8601);\r\n\t\t\t\tif (isset($_SERVER['REMOTE_ADDR'])) {\r\n\t\t\t\t\t$sTime .= ' - from ' . $_SERVER['REMOTE_ADDR'];\r\n\t\t\t\t\tif (isset($_SERVER['REMOTE_PORT'])) {\r\n\t\t\t\t\t\t$sTime .= ':' . $_SERVER['REMOTE_PORT'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$sTime .= ' - ' . session_id();\r\n\t\t\t\tif (fwrite($rFile, $sTime . ' : ' . $p_sMess . \"\\n\") !== FALSE) {\r\n\t\t\t\t\tif (fclose($rFile) === FALSE) {\r\n\t\t\t\t\t\terror_log('Impossible to close the log file ' . $sPath . '', 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\terror_log('Impossible to write in the log file ' . $sPath . '!', 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\terror_log('Impossible to modify the log file ' . $sPath . '', 0);\r\n\t\t\t}\r\n\t\t}", "function gererErreurs ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n // Construire le message d'erreur\n $strMessage = \"Une erreur est survenue dans le script '$e_file' a la ligne $e_line: \\n<br />$e_number : $e_message\\n<br />\";\n // Ajouter la date et l'heure\n $strMessage .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n<br />\";\n // Ajouter $e_vars au $message.\n $strMessage .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n<br />\";\n // On peut aussi créer un journal d'erreurs et/ou envoyer par courriel.\n //@todo ramener la gestion selon $blnLocal. C'est fait.\n if ($GLOBALS['blnLocal']) {\n echo '<p class=\"error\">' . $strMessage . '</p>';\n //error_log ($strMessage, 3, \"log-err.txt\");\n } else {\n // En production, on veut seulement un courriel.\n //error_log ($strMessage, 1, $GLOBALS['courrielContact']);\n }\n // \tpour l'instant, Afficher l'erreur\n echo '<p class=\"error\">' . $strMessage . '</p>';\n }", "private function getLogLine($msg) {\n\t\treturn \"[\".date(\"d/m/Y H:i:s\").\"] \".$msg.\"\\n\";\n\t}", "function writeMessage($nom , $message){\n\n\tif(!preg_match(\"#^ #\", $message) && !empty($message)){\n\t\t$ligne = $nom.\">\".$message.\"<br>\";\n\t\t$leFichier = fopen(__DIR__.'/../data/ac.txt', 'a+');\n\t\tfputs($leFichier, $ligne.\"\\n\");\n\t\tfclose($leFichier);\n\t}\n}", "public function log ( $msg )\n {\n if ( $this->file_handle == null) {\n $this->openFile();\n }\n\n fwrite($this->file_handle, \"[\" . date(\"H:i:s\") . \"] \" . $msg . \"\\n\");\n }", "function LogMsg ($msg) {\n\t$now = new DateTime();\n\t$now = $now->format('Y/m/d H:i:s');\n\tfile_put_contents (\n\t\t'log/log.txt',\n\t\t$now.' '.$_SERVER['REMOTE_ADDR'].' '.$msg.\"\\r\\n\",\n\t\tLOCK_EX|FILE_APPEND\n\t);\n}", "function logge($message, $type=INFO, $dateiName=\"\", $methodName=\"\") {\n\n $str = date(\"Y.m.d H:i:s\") . \" \" . $type;\n\n if ($dateiName !=\"\" || $methodName != \"\") {\n $str .= \"(\";\n if ($dateiName != \"\") {\n $str .= \"File: \" . $dateiName . \" \";\n }\n if ($methodName != \"\") {\n $str .= \"Methode: \" . $methodName;\n }\n $str .= \")\";\n }\n $str .= \": \" . $message . \"\\n\\r\";\n\n if (isset($_ENV[\"LOGFILE\"]) && $_ENV[\"LOGFILE\"] != '') {\n $fd = fopen($_ENV[\"LOGFILE\"], \"a\");\n\n fwrite($fd, $str);\n fclose($fd);\n } else {\n echo \"LOGFILE ist nicht bekannt, um Meldungen in die Log-Datei zu schreiben.<br>\\n\";\n echo $str;\n }\n\n}", "function logrec($aid,$e,$msg,$src='') {\n\t// into the new record array[errors]\n\tglobal $logfile;\n\n\n\t$ts = date('H:i');\n\n\techo \"<p class='red'>$aid: $msg</p>\";\n\tfile_put_contents($logfile,\n\t\tsprintf(\"%6s %4s %1s %s\\n\",$ts,$aid,$e,$msg),FILE_APPEND);\n\tif (!empty($src)) {\n\t\tfile_put_contents($logfile,\n\t\tsprintf(\"%12s %s\\n\",'',$src),FILE_APPEND);\n\t}\n\treturn \"($e) $msg \". NL;\n}", "function chatUpdater($owner, $msg) {\n $path = \"../Tables/TableCreatedBy_\" . $owner . \"/chat.txt\";\n fwrite(fopen($path, 'a'), \"<div class='msgln'>(\" . date(\"g:i A\") . \") <b>\" . $_SESSION['user'] . \"</b>: \" .\n str_replace(\"\\n\", \"\", stripslashes(htmlspecialchars($msg))) . \"</div>\\n\");\n echo \"Done\";\n}", "function WriteLogEss($log) {\r\n//echo $log.'<br/>';\r\n/*\r\n $datum=Date('d.m.Y H:i:s');\r\n $tmp = '/tmp/logESS.txt';\r\n $text = $datum . '-'.$log.chr(10);\r\n $fp = fopen($tmp, 'a');\r\n fwrite($fp, $text);\r\n fclose($fp);\r\n*/\r\n}", "function setLog( $msg = NULL )\n {\n if( $msg == NULL ){\n \t\t$this->logErro = \n<<<EOT\n =============== *UPLOAD* LOG =============== <br />\n Pasta destino: $this->path <br />\n \tNome do arquivo: {$this->source[ \"name\" ]} <br />\n Tamanho do arquivo: {$this->source[ \"size\" ]} bytes<br />\n Tipo de arquivo: {$this->source[ \"type\" ]} <br />\n\t\t---------------------------------------------------------------<br /><br />\nEOT;\n }else{\n \t\t$this->logErro .= $msg;\n }\n }", "protected function addMessage($content) {\n if ($this->file === null) {\n if (!file_exists($this->config->getValue('log', 'path', './'))) {\n mkdir($this->config->getValue('log', 'path', './'), 0755, true);\n }\n $path = $this->config->getValue('log', 'path', './').$this->section.'.log';\n $this->file = fopen($path, 'a');\n }\n fwrite($this->file, $content.\"\\n\");\n }", "public static function cache( $msg ){\n\t\tself::write( '_' . preg_replace( '/^_/', '', self::FILE_CACHE ), $msg, self::LOG_DIR );\n\t}", "function logMessage($msg)\r\n{\r\n $time = date(\"F jS Y, H:i\", time() + 25200);\r\n $file = 'errors.txt';\r\n $open = fopen($file, 'ab');\r\n fwrite($open, $time . ' : ' . json_encode($msg) . \"\\r\\n\");\r\n fclose($open);\r\n}", "private function writeFile($msg, $file = 'db_sql.log', $dir = '/var/log/hlw')\n {\n $file = $dir . $file;\n if ((is_dir($dir) || @mkdir($dir, 0755, true)) && is_writable($dir)) {\n //$data = 'Date:' . date('Y-m-d H:i:s') . ' ' . $msg . \"\\n\";\n $f = fopen($file, 'w');\n fwrite($f, $msg, strlen($msg));\n fclose($f);\n }\n return ;\n }", "function logCheckOnWorkDate()\n\t{\n\t\t// Soll durchgefuehrt werden?\n\t\tif (!$this->m_enable || !$this->m_eraseFilesEnable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Suche nach Dateien in Verzeichnis\n\t\t$dir = sprintf(\"%s%s\", $this->m_base, $this->m_sub);\n\t\tif (($resource = opendir($dir)) != false)\n\t\t{\t\n\t\t\twhile(($file = readdir($resource)) != false)\n\t\t\t{\n\t\t\t\tif ($file == \".\" || $file == \"..\") continue;\n\t\t\t\t\n\t\t\t\t// Passt Dateiname zu Format der Logdateinamen\n\t\t\t\tif (eregi($this->m_fileNameTemplateMatch, $file))\n\t\t\t\t{\n\t\t\t\t\t// In Liste aufnehmen\n\t\t\t\t\t$fileList[$fileCount++] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($resource);\n\t\n\t\t\t// Wurden Dateien gefunden.\n\t\t\tif ($fileCount)\n\t\t\t{\t\n\t\t\t\t$fileCount = 0;\n\t\t\t\t// Array der gefundenen Dateien sortieren.\n\t\t\t\trsort($fileList);\n\t\t\t\t\n\t\t\t\tfor (; count($fileList);)\n\t\t\t\t{\t\n\t\t\t\t\t// Ist Datei von selbigem Datum?\n\t\t\t\t\tif (strncmp($tmp, $fileList[0], 10) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Datei mit gleichem Datums-Zeichenfolgenbeginn\n\t\t\t\t\t\t// Kann sein, da fuer verschiedene Kanaele gelogt werden kann.\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// Datums-Zeichenfolge des Dateinamen aufnehmen.\n\t\t\t\t\t\t$tmp = $fileList[0];\n\t\t\t\t\t\t$fileCount++; // Zu erhaltende Datei\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datumsbereich der zu erhaltenden Dateien ueberschritten?\n\t\t\t\t\tif ($fileCount > $this->m_eraseFilesCount)\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $this->m_base . $this->m_sub . $fileList[0];\n\t\t\t\t\t\tif (unlink($file) == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Konnte nicht geloescht werden!\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//echo \"Erase file: \" . $fileList[0] . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \"Hold file: \" . $fileList[0] . \"\\n\";\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datei aus Array entfernen\n\t\t\t\t\tarray_shift($fileList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "private function log_it($msg) {\n $this->log_msg_queue .= date('m/d/y H:i:s : ', time()) . $msg . PHP_EOL;\n }", "function addMessageLine($m){\n global $BackupPath;\n\n $log = $BackupPath . \"backupLog.txt\";\n $message = $m . \" ... \" . date(\"Y-m-d H:i:s\") .\"\\r\\n\";\n echo $message;\n file_put_contents($log, $message.PHP_EOL , FILE_APPEND | LOCK_EX);\n}", "function write_log($msg) {\n global $transaction_ID;\n $todays_date = date(\"Y-m-d H:i:s\");\n $file = fopen(\"process.log\",\"a\");\n fputs($file,$todays_date. \" [\".$transaction_ID.\"] \". $msg.\"\\n\");\n fclose($file);\n}", "public function log($msg)\n {\n $this->file->filePutContents($this->logFile, $this->config->x_shop_name.\" \".date('c').\" \".var_export($msg, true).\"\\n\", FILE_APPEND | LOCK_EX);\n }", "function getFileContentsRaw($file = LACE_FILE)\r\n{\r\n\t$today = date('l');\r\n\t$dayString = '';\r\n $hourString = '';\r\n\t$finalOutput = '';\r\n\r\n\t// Read the file\r\n\t$fileContents = file($file);\r\n\r\n\tif(is_array($fileContents) && count($fileContents) > 0)\r\n\t{\r\n\t\t// We want logfiles in reverse order.\r\n\t\tif ($file != LACE_FILE)\r\n\t\t\t$fileContents = array_reverse($fileContents);\r\n\r\n\t\t// Create the proper HTML for each line\r\n\t\tforeach ($fileContents as $line)\r\n\t\t{\r\n\t\t\t// Turn the record into an array full of info\r\n\t\t\t$line = extractMessageArray($line);\r\n\r\n\t $output = '';\r\n\r\n\t // Check for new Day\r\n\t\t\tif ($file == LACE_FILE)\r\n\t\t\t{\r\n\t\t\t\tif ($line['day'] != $dayString)\r\n\t\t {\r\n\t\t $first = ($dayString == '') ? '*' : '';\r\n\t\t $dayString = $line['day'];\r\n\t\t $output .= 'date-'.$line['timestamp'].'||';\r\n\t\t $output .= $first.$line['date_full'].'||||';\r\n\t\t }\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Logfiles don't have multiple days\r\n\t\t\t\tif($hourString == '')\r\n\t\t\t\t\t$output .= 'date||*' . $line['date_full'] . '||||';\r\n\t\t\t}\r\n\r\n // Check for new Hour\r\n if ( ($file == LACE_FILE && $line['day'] == $today\r\n \t&& $line['hour'] != $hourString)\r\n || ($file != LACE_FILE && $line['hour'] != $hourString) )\r\n {\r\n $first = ($hourString == '') ? '*' : '';\r\n \t$hourString = $line['hour'];\r\n \t$output .= 'hour-'.$line['hour'].'||'.$first.$hourString.':00||||';\r\n }\r\n\r\n // Check for Action\r\n $action = ($line['action']) ? '*' : '';\r\n $timestr = ($file == LACE_FILE)\r\n \t? 'Posted about '.$line['age'].' ago at '.$line['time']\r\n \t: $line['time'];\r\n\r\n $output .= $line['timestamp'].'||'.$timestr.'||'.$action.$line['name'];\r\n $output .= '||'.$line['text'].'||||';\r\n\r\n\t\t\t$finalOutput .= $output;\r\n\t\t}\r\n\t}\r\n\telse\r\n\t// $fileContents array is empty\r\n\t{\r\n\t\t$finalOutput .= 'date||*' . date('l, d F Y') . '||||';\r\n\t\t$finalOutput .= time() . '|| ||!Lace||';\r\n\t\t$welcome = ($file == LACE_FILE)\r\n\t\t\t? 'Welcome to '.LACE_SITE_NAME.'. No one has said anything yet.'\r\n\t\t\t: 'The current log is empty.';\r\n\t\t$finalOutput .= (file_exists($file))\r\n\t\t\t? $welcome\r\n\t\t\t: 'Sorry, the file you asked for doesn\\'t exist.';\r\n\t}\r\n\r\n\treturn rtrim($finalOutput, '|');\r\n}", "function myExceptionHandling($_exception, $_logfile)\n{\n if ($_SERVER['SERVER_NAME'] != \"localhost\")\n {\n //sumiere boodschap\n $_msg=\"Er heeft zich een fout voorgedaan, probeer opnieuw.<br>Als de fout blijft voorkomen neem dan contact op met de web-master.<br>Alvast onze verontschuldigingen\"; \n }\n else\n {\n //complete error message\n $_msg = \"<hr>\n <strong>Exception</strong><br><br>\n Foutmelding: \".$_exception->getMessage().\"<br><br>\n Bestand: \".$_exception->getFile().\"<br>\n Regel: \".$_exception->getLine().\"<br><hr>\";\n }\n \n// exception log\n $_error_log[1] = strftime(\"%d-%m-%Y %H:%M:%S\");\n $_error_log[2] = $_exception->getMessage();\n $_error_log[3] = $_exception->getFile();\n $_error_log[4] = $_exception->getLine();\n \n $_pointer = fopen(\"$_logfile\",\"ab\");\n fputcsv($_pointer, $_error_log);\n fclose($_pointer);\n \n// user-message \n return $_msg;\n \n}", "function log_it($msg) {\n//OUT: No return, although log file is updated\n//PURPOSE: Log messages to email and text files.\n\n $msg = date('m/d/y H:i:s : ', time()) . $msg . PHP_EOL;\n\n error_log(msg, 1, ERROR_E_MAIL);\n \terror_log(msg, 3, ERROR_LOG_FILE);\n}", "function append_message($message)\n{\n $fileContents = file_get_contents($_SERVER['DOCUMENT_ROOT'] . \"/backend/common/notices.log\");\n file_put_contents($_SERVER['DOCUMENT_ROOT'] . \"/backend/common/notices.log\", $fileContents.$message);\n}", "function fileemail() {\n\t\t\tglobal $logid, $bwpsoptions;\n\t\t\t\n\t\t\t//Get the right email address.\n\t\t\tif ( is_email( $bwpsoptions['id_fileemailaddress'] ) ) {\n\t\t\t\t\n\t\t\t\t$toaddress = $bwpsoptions['id_fileemailaddress'];\n\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\t$toaddress = get_site_option( 'admin_email' );\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t//create all headers and subject\n\t\t\t$to = $toaddress;\n\t\t\t$headers = 'From: ' . get_option( 'blogname' ) . ' <' . $to . '>' . PHP_EOL;\n\t\t\t$subject = '[' . get_option( 'siteurl' ) . '] ' . __( 'WordPress File Change Warning', $this->hook ) . ' ' . date( 'l, F jS, Y \\a\\\\t g:i a e', current_time( 'timestamp' ) );\n\n\t\t\t//create message\n\t\t\t$message = '<p>' . __('<p>A file (or files) on your site at ', $this->hook ) . ' ' . get_option( 'siteurl' ) . __( ' have been changed. Please review the report below to verify changes are not the result of a compromise.', $this->hook ) . '</p>';\n\t\t\t$message .= $this->getdetails( $logid, true ); //get report\n\t\t\t\n\t\t\tadd_filter( 'wp_mail_content_type', create_function( '', 'return \"text/html\";' ) ); //send as html\n\t\t\t\n\t\t\twp_mail( $to, $subject, $message, $headers ); //send message\n\t\t\n\t\t}", "function dmailer_log($writeMode,$logMsg){\n\t\tglobal $TYPO3_CONF_VARS;\n\t\n\t\t$content = time().' => '.$logMsg.chr(10);\n\t\t$logfilePath = 'typo3temp/tx_directmail_dmailer_log.txt';\n\n\t\t$fp = fopen(PATH_site.$logfilePath,$writeMode);\n\t\tif ($fp) {\n\t\t\tfwrite($fp,$content);\n\t\t\tfclose($fp);\n\t\t}\t\t\t\n\t}", "function log_to_file($stranka, $pozadavek = \"\", $message = \"\", $echo = true) {\n\tif ($echo) echo \"$stranka: $pozadavek: $message <br />\";\n\t$path = \"./log/\";\n\t$referer = (isset($_SERVER[\"HTTP_REFERER\"])) ? $_SERVER[\"HTTP_REFERER\"] : \"\";\n\t// existuje soubor s timto datem?\n\t$datum = new DateTime();\n\t$datumcas = $datum->format(\"Y-m-d H:i\");\n\t$datum = $datum->format(\"Y-m-d\");\n\t$log = fopen($path . $datum . \".log\", \"a\");\n\tif ($log) {\n\t\t$text = $datumcas . \";\" . $stranka . \";\" . $pozadavek . \";\" . $message . \";\" . \";\" . $referer . \"\\n\";\n\t\tfwrite($log, $text);\n\t\tfclose($log);\n\t}\n}", "function logError($msg){\n $txt = $msg . \" at \" . date('l jS \\of F Y h:i:s A') . \"\\n ------------------------------------- \\n\";\n $myfile = file_put_contents('errorlogs.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX);\n }", "public static function log_datas_in_files( $service, $array_message, $criticality ) {\r\n\t\t\t// backline\r\n\t\t\t$upload_dir = wp_upload_dir();\r\n\r\n\t\t\twp_mkdir_p( $upload_dir[ 'basedir' ] . '/wpeologs/' );\r\n\r\n\t\t\t$message = \"\r\n\t\";\r\n\t\t\t$message .= current_time('mysql', 0) . self::$file_separator;\r\n\t\t\t$message .= get_current_user_id() . self::$file_separator;\r\n\t\t\t$message .= '\"' . $service . '\"' . self::$file_separator;\r\n\t\t\t$message .= $array_message['object_id'] . self::$file_separator;\r\n\r\n\t\t\t// For post type\r\n\t\t\tif(!empty($array_message['previous_element'])) {\r\n\t\t\t\t$message .= '\"' . base64_encode(serialize($array_message['previous_element'])) . '\"' . self::$file_separator;\r\n\t\t\t\t$message .= '\"' . base64_encode(serialize($array_message['previous_element_metas'])) . '\"' . self::$file_separator;\r\n\t\t\t}\r\n\r\n\t\t\t$message .= '\"' . $array_message['message'] . '\"' . self::$file_separator;\r\n\t\t\t$message .= $criticality . self::$file_separator . $service;\r\n\r\n\t\t\t$i = self::new_instance();\r\n\r\n\t\t\tif(empty($i->wpeologs_settings['my_services'][$service]) ||\r\n\t\t\t\t(!empty($i->wpeologs_settings['my_services'][$service]) && !empty($i->wpeologs_settings['my_services'][$service]['service_rotate']) && $i->wpeologs_settings['my_services'][$service]['service_rotate']))\r\n\t\t\t\tself::check_need_rotate($service, $message);\r\n\r\n\t\t\t$fp = fopen( $upload_dir[ 'basedir' ] . '/wpeologs/' . $service . '.csv', 'a');\r\n\t\t\tfwrite($fp, $message);\r\n\t\t\tfclose($fp);\r\n\r\n\t\t\tif(2 <= $criticality) {\r\n\t\t\t\t$fp = fopen( $upload_dir[ 'basedir' ] . '/wpeologs/_wpeo-critical.csv', 'a');\r\n\t\t\t\tfwrite($fp, $message);\r\n\t\t\t\tfclose($fp);\r\n\t\t\t}\r\n\t\t\telse if(1 == $criticality) {\r\n\t\t\t\t$fp = fopen( $upload_dir[ 'basedir' ] . '/wpeologs/_wpeo-warning.csv', 'a');\r\n\t\t\t\tfwrite($fp, $message);\r\n\t\t\t\tfclose($fp);\r\n\t\t\t}\r\n\t\t}", "public function replaceMessage($filePath){\n $content = file_get_contents($filePath);\n $content = str_replace(\"Mage::getSingleton('adminhtml/session')->addSuccess\",\"\\$this->messageManager->addSuccess\",$content);\n $content = str_replace(\"Mage::getSingleton('adminhtml/session')->addError\",\"\\$this->messageManager->addError\",$content);\n $content = str_replace(\"\\$this->_getSession()->addSuccess\",\"\\$this->messageManager->addSuccess\",$content);\n $content = str_replace(\"\\$this->_getSession()->addError\",\"\\$this->messageManager->addError\",$content);\n $content = str_replace(\"now()\",\"date('y-m-d h:i:s')\",$content);\n return $content;\n }", "function gravaLogTXT( $msgLog, $errid ){\n\n\n ##gravar txt em nova tabela, vinculado com a tabela seguranca.erro\n\n// \t$msgLog = $msgLog ? simec_htmlspecialchars($msgLog) : 'null';\n//\n// \t$nomeArquivo = 'log_erro_'.$errid;\n// \t$diretorio = APPRAIZ . 'arquivos/log_erro/';\n// \t$diretorioArquivo \t= APPRAIZ . 'arquivos/log_erro/'.$nomeArquivo.'.txt';\n//\n// \tif( !is_dir($diretorio) ){\n// \t\tmkdir($diretorio, 0777);\n// \t}\n//\n// \t$fp = fopen($diretorioArquivo, \"w\");\n// \tif ($fp) {\n// \t\tstream_set_write_buffer($fp, 0);\n// \t\tfwrite($fp, $msgLog);\n// \t\tfclose($fp);\n// \t}\n\n return true;\n }", "function envoi_mail($dest, $titre, $cont) {\n //----------------------------------------------- \n //DECLARE LES VARIABLES \n //----------------------------------------------- \n $email_reply = '[email protected]';\n\n $message_html = '<html> \n <head> \n <title>'.$titre.'</title> \n </head> \n <body>\n <div style=\"padding: 7px; font-size: 1.1em\">\n '.$cont.'\n <br />\n <p>\n Passez une bonne journée sur <a href=\"http://BlogPHP.fr/\">'.Conf::$SITE['TITRE'].'</a>,\n <br />\n <em>L\\'équipe de développement.</em>\n </p>\n </div>\n </body> \n </html>'; \n\n //----------------------------------------------- \n //HEADERS DU MAIL \n //----------------------------------------------- \n\tini_set('SMTP','smtp.sfr.fr');\n\n $entetedate = date(\"D, j M Y H:i:s\"); // avec offset horaire\n $headers = 'From: \"'.Conf::$SITE['TITRE'].'\" <'.$email_reply.'>'.\"\\n\";\n $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: text/html; charset=\"utf-8\"'.\"\\n\"; \n $headers .= 'Content-Transfer-Encoding: 8bit'.\"\\n\"; \n $headers .= \"X-Mailer: PHP/\" . phpversion() . \"\\n\\n\" ;\n\n return mail($dest, $titre, $message_html, $headers);\n}", "function logTime($dir_root,$script_name,$begin,$end) {\n $file = fopen($dir_root . 'log/tempsChargement.log','a');\n $temps = $end - $begin;\n fputs($file,date('Y-m-d H:i:s') . \" - Chargement de la page '\". basename($script_name) . \"' en : $temps ms.\\n\"); \n fclose($file);\n}", "private function _getMessageAttachment() : string\n\t{\n\t\tif (!$this->_attachmentFilename) {\n\t\t\timport('classes.core.ServicesContainer');\n\n\t\t\t$editorialStatisticsService = \\ServicesContainer::instance()->get('editorialStatistics');\n\n\t\t\t$activeSubmissions = $editorialStatisticsService->compileActiveSubmissions($this->_statistics);\n\t\t\t$submissions = $editorialStatisticsService->compileSubmissions($this->_rangedStatistics, $this->_statistics);\n\t\t\t$users = $editorialStatisticsService->compileUsers($this->_rangedUserStatistics, $this->_userStatistics);\n\n\t\t\t$file = new SplFileObject(tempnam(sys_get_temp_dir(), 'tmp'), 'wb');\n\t\t\t$file->fputcsv([\n\t\t\t\t__('navigation.submissions'),\n\t\t\t\t__('stats.total')\n\t\t\t]);\n\t\t\tforeach ($activeSubmissions as ['name' => $name, 'value' => $value]) {\n\t\t\t\t$file->fputcsv([$name, $value]);\n\t\t\t}\n\n\t\t\t$file->fputcsv([]);\n\t\t\t$file->fputcsv([\n\t\t\t\t__('manager.statistics.editorial.trends'),\n\t\t\t\t__('manager.statistics.totalWithinDateRange'),\n\t\t\t\t__('stats.total')\n\t\t\t]);\n\t\t\tforeach ($submissions as ['name' => $name, 'period' => $period, 'total' => $total]) {\n\t\t\t\t$file->fputcsv([str_replace('&emsp;', '', $name), $period, $total]);\n\t\t\t}\n\n\t\t\t$file->fputcsv([]);\n\t\t\t$file->fputcsv([\n\t\t\t\t__('manager.users'),\n\t\t\t\t__('manager.statistics.totalWithinDateRange'),\n\t\t\t\t__('stats.total')\n\t\t\t]);\n\t\t\tforeach ($users as ['name' => $name, 'period' => $period, 'total' => $total]) {\n\t\t\t\t$file->fputcsv([str_replace('&emsp;', '', $name), $period, $total]);\n\t\t\t}\n\n\t\t\t$this->_attachmentFilename = $file->getRealPath();\n\t\t\t$file = null;\n\t\t}\n\t\treturn $this->_attachmentFilename;\n\t}", "function save_message($objet) {\n\t\t$date = date(\"Y-m-d H:i:s\");\n\t\t\n\t\t$sql = \"INSERT INTO \n\t\t\t\t\tadmon_messages(request_id, user_from, message, date)\n\t\t\t\tVALUES\n\t\t\t\t\t('\".$objet['request_id'].\"', '\".$objet['from'].\"', '\".$objet['message'].\"', '\".$date.\"')\";\n\t\t$result = $this -> query($sql);\n\t\t\n\t\treturn $result;\n\t}", "function logMessage($level, $message) {\t\n// time and date functions assigned to variables\n\t$time = date(\"H:i:s\");\n\t$date = date(\"Y-m-d\");\n// filename created with current date. A new file will be created every day\n\t$filename = \"log-\" . $date . \".log\";\n\n// handle opens the file and appends new information to the end\n\t$handle = fopen($filename, 'a');\n\n// writes the date, time, and message to the file, then closes it\n\tfwrite($handle,PHP_EOL . $date . $time . $level . $message);\n\tfclose($handle);\n\n}", "function writeContent ($filetype1, $pathbase, $outputFile, $msgToRegister) {\n global $GROUP, $WRITEMSG, $OVERWRITE;\n\n $pathbase = \"/var/www/html/saw/mod/iassign/ilm_debug/\"; // \"/mod/iassign/ilm_debug/\";\n $outputFile = $pathbase . $outputFile;\n\n if (!is_writable($pathbase)) { // TRUE se arquivo existe e pode ser escrito\n // $file_debug .= \"Error: '\" . $completfilepath . \"' could not be registered! Perhaps the directory or the file has permission problem?<br/>\\n\";\n //D echo \"$outputFile, $filetype1<br/>\";\n print \"Erro! Problema de acesso ao servidor! Por favor, avise ao administrador (<tt>$pathbase</tt> nao acessivel para escrita).<br/>\"; // . $file_debug . \"\n exit(0);\n }\n\n // $result = writeContent(\"file\", $pathbase, $filename, $msgToRegister);\n // print \"escreva.php: result=$result<br/>\";\n\n // write personal email file\n // To write: verify if the file does not exists or have permission to overwrite\n if (is_file($outputFile)) { // already exist this file\n // $outputFile .= $outputFile . '_' . date('Y_m_d_h_m');\n } // if (is_file($outputFile))\n\n if (1==1) { // write/overwrite the file\n $fpointer = fopen($outputFile, \"w\"); // write - if executed, it clear the previou content at this file\n if (!$fpointer) {\n $file_debug .= \"Erro: nao foi possivel abrir o roteiro ($outputFile)!<br/>\\n\";\n // it was not possible to open the file '$completfilepath\" . $file_name . \"'!<br/>\\n\";\n print \"<br/>\" . $file_debug . \"<br/>\\n\";\n //D echo \"writeContent: $filetype1, outputFile=$outputFile<br/>\\n\";\n return 0;\n }\n fwrite($fpointer, $msgToRegister . \"\\n\");\n // echo \" - outputFile=$outputFile : WRITEMSG=$WRITEMSG, OVERWRITE=$OVERWRITE, gerado com sucesso!<br/>\\n\";\n fclose($fpointer);\n }\n else {\n // print \"Nao gera os arquivos personalizados para email aos alunos ('$outputFile')<br/>\\n\"; // admin/<turma>/<N>_<name>.txt\n }\n\n return 1;\n }", "function CDFLog()\n\t{\n\t\t// ** Aktivierung der Logfunktionalitaet **\n\t\t// ########################################\n\t\t$this->m_enable = true;\n\t\t// ########################################\n\t\tif ($this->m_enable)\n\t\t{\t\t\t\n\t\t\t// Basispfad der Logdateien\n\t\t\t$this->m_base = \"./\";\n\t\t\t// Unterordner der Logdateien\n\t\t\t$this->m_sub = \"Logfiles/\";\n\t\t\t// Dateiname der Logdatei: YYYY_MM_DD_PHP.log\n\t\t\t$this->m_fileNameTemplate = \"20%02u_%02u_%02u_PHP.log\";\n\t\t\t// Die Verwaltungsroutine fuer die automatische Loeschung\n\t\t\t// Aelterer Dateien geht davon aus, dass der Dateiname\n\t\t\t// mit dem Datumsstempel beginnt.\n\t\t\t$this->m_fileNameTemplateMatch = \"^20[0-9]{2}_[0-9]{2}_[0-9]{2}_PHP.log\";\n\t\t\t// Aktuellen Dateiname der Logdatei erstellen\n\t\t\t$t = time();\n\t\t\t$ltm = localtime($t, 1);\n\t\t\t$this->m_fileName = sprintf($this->m_fileNameTemplate, \n\t\t\t\t$ltm[\"tm_year\"] % 100, $ltm[\"tm_mon\"] + 1, $ltm[\"tm_mday\"]);\n\t\t\t// Loeschen von Dateien die aelter sind als m_eraseFilesCount Logtage\n\t\t\t$this->m_eraseFilesEnable = true;\n\t\t\t// Anzahl zu haltender Logdateien (in Tagen)\n\t\t\t$this->m_eraseFilesCount = 5;\n\t\t\t// Zeichenfolge fuer einen Zeilenumbruch\n\t\t\t$this->m_crLf = \"\\r\\n\";\n\t\t\t// Automatische Einfuegung eines Zeitstempels vor jedem Logeintrag\n\t\t\t$this->m_withTimestamp = true;\n\t\t\t// Pruefen ob der Logpfad existiert.\n\t\t\tif (!is_dir($this->m_base . $this->m_sub))\n\t\t\t{\t\n\t\t\t\tif (!mkdir($this->m_base . $this->m_sub))\n\t\t\t\t{\n\t\t\t\t\t// Logsystem wegen Fehlschlag abstellen\n\t\t\t\t\t$this->m_enable = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Pruefung fuer eraseFile durchfuehren\n\t\t\t$this->logCheckOnWorkDate();\n\t\t}\n\t}", "static function addSQLLog($msg, $log_path) {\n\n // open file\n $logFile = $log_path . \"log/SQL_\" . date(\"Ymd\") . \".txt\";\n if (!file_exists($logFile)) {\n touch($logFile);\n }\n $fd = fopen($logFile, \"a\");\n\n\n if (isset($_SESSION[\"user\"])) {\n $usr = $_SESSION[\"user\"];\n } else {\n $usr = $_SERVER[\"REMOTE_ADDR\"];\n }\n\n // append date/time to message\n $str = \"[\" . date(\"Y-m-d h:i:s\", time()) . \"] \" . $usr . \": \" . $msg;\n\n // write string\n fwrite($fd, $str . \"\\r\\n\");\n\n // close file\n fclose($fd);\n }", "function logMessage($line) {\r\n\t// Pull the current log contents\r\n $log = file(LACE_LOGFILE);\r\n\r\n // Grab the date of the\r\n // most recent post in the log\r\n $date = (count($log) > 0) ? array_shift($temp = explode('||', $log[0]))\r\n \t: false;\r\n\r\n // Write yesterday to file if necessary\r\n\tif($date !== false && date('d', $date) != date('d'))\r\n $log = newLog($log, $date);\r\n\r\n // Write the new message\r\n $logfile = fopen(LACE_LOGFILE, 'w');\r\n fwrite($logfile, $line.\"\\n\");\r\n\r\n // Write any other remaining messages\r\n if (count($log) > 0)\r\n \t\tfwrite($logfile, implode(\"\\n\", array_map('trim',$log)).\"\\n\");\r\n\r\n \tfclose($logfile);\r\n}", "function addMessage($message)\r\n{\r\n\t$name = ($message['action']) ? '*'.$message['name'] : $message['name'];\r\n\t$text = $message['text'];\r\n\t$time = $message['time'];\r\n\r\n\tif(strlen($name) == 0)\r\n\t\treturn;\r\n\r\n\t$line = $time.'||'.$name.'||'.$text;\r\n\r\n\t// Pull the current file contents\r\n $fileContents = file(LACE_FILE);\r\n\t$size = count($fileContents);\r\n\r\n if ($size >= LACE_FILE_MAX_SIZE)\r\n {\r\n\t // Push the oldest entries out\r\n\t // and put the new one in\r\n\t for ($i = 0; $i <= $size - LACE_FILE_MAX_SIZE; $i++)\r\n\t\t array_shift($fileContents);\r\n\r\n\t $fileContents[] = $line;\r\n \t$fileContents = implode(\"\\n\", array_map('trim', $fileContents)).\"\\n\";\r\n\r\n \t// Write it to file\r\n \tfile_put_contents(LACE_FILE, trim($fileContents));\r\n }\r\n else\r\n {\r\n // No need to push anything off the stack,\r\n // just write to file\r\n \t$file = fopen(LACE_FILE, 'a');\r\n fwrite($file, $line.\"\\n\");\r\n fclose($file);\r\n }\r\n\r\n // Add to the log\r\n logMessage($line);\r\n}", "static function addUserLog($msg, $log_path) {\n // open file\n $fd = fopen($log_path . \"log/USR_\" . date(\"Ymd\") . \".txt\", \"a\");\n\n if (isset($_SESSION[\"user\"])) {\n $usr = $_SESSION[\"user\"];\n } else {\n $usr = $_SERVER[\"REMOTE_ADDR\"];\n }\n\n // append date/time to message\n $str = \"[\" . date(\"Y-m-d h:i:s\", time()) . \"] \" . $usr . \": \" . $msg;\n\n // write string\n fwrite($fd, $str . \"\\r\\n\");\n\n // close file\n fclose($fd);\n }", "function block_eventsengine_log($msg) {\n global $CFG;\n\n $timestamp = strftime('%Y-%m-%d %T');\n list($datepart, $timepart) = explode(' ', $timestamp);\n $dir = \"{$CFG->dataroot}/eventsengine\";\n if (!is_dir($dir)) {\n @mkdir($dir);\n }\n $logfile = \"{$dir}/{$datepart}.log\";\n file_put_contents($logfile, \"[{$timestamp}] {$msg}\\n\", FILE_APPEND);\n // TBD: compress previous log file(s)?\n}", "function wLog($path,$param,$sMessage) {\n \n $fp = fopen ($path.\"/\".$param.\".log\", \"a+\");\n if (fputs ($fp, $sMessage.(chr(13)))) {\n return true;\n } else {\n return false;\n }\n fclose ($fp);\n \n}", "private static function addLog($msg) {\n\t\tself::$log[] = '\"'.formatTimestamp(time()).' - '.$msg.'\"';\n\t}", "static function RegisterAction($msg, $detail) {\r\n $date = date('y-m-d');\r\n $time = date('y-m-d-H-i-s');\r\n $user = '[' . $msg . '] : ';\r\n $message = \"\\n\" . $user . \"\" . $detail . \" : \" . $time;\r\n $errorFile = './' . ACTIONLOGFILE_FOLDER . \"/\" . $date . \".cvs\";\r\n if (file_exists(ACTIONLOGFILE_FOLDER)) {\r\n $file = fopen($errorFile, \"a+\");\r\n while (feof($file)) {\r\n fgets($file);\r\n }\r\n fwrite($file, $message);\r\n } else {\r\n $errorFile = '../' . ACTIONLOGFILE_FOLDER . \"/\" . $date . \".cvs\";\r\n $file = fopen($errorFile, \"a+\");\r\n while (feof($file)) {\r\n fgets($file);\r\n }\r\n fwrite($file, $message);\r\n }\r\n }", "function to_log($vvod)\n{\n $date = date(\"Y_m_d\");\n $filename = \"logs/log_\".$date.\".txt\";\n $string = date(\"d.m.Y H:i:s\").\" => $vvod\".\"\\n\";\n $f = fopen($filename,\"a+\");\n fwrite($f,$string);\n fclose($f);\n}", "private static function logToFile($message) {\n\t\tdate_default_timezone_set('UTC');\n\t\tfile_put_contents(Config::$debug_filename, date('Y-m-d h:i:sa') . ' ' . $message . \"\\n\", FILE_APPEND);\n\t}", "function NouveauMessage($de,$a,$msg,$heure){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$date = date('Y-m-d');\r\n\t\t$heure = date('H:i:s');\r\n\t\t$requete = \"INSERT INTO messages VALUES(NULL,'$de','$a','$msg','$date','$heure') \";\r\n\t\t$ligne= mysqli_query($conn, $requete);\r\n\t\tmysqli_close($conn);\r\n\t\t}", "function PrintDate($article_id)\n\t{\n\t\t$path = DATE_FILE;\n\t\tif (file_exists(ARTICLE . $article_id) == true){\n\t\t\tinclude_once('file.php');\n\t\t\t$date = readLine($path, $article_id);\n\t\t\techo $date;\n\t\t}\n\t}", "function crash($codeErreur, $message)\n{\n $currentDirectory = getcwd();\n $temps = date(DATE_RFC2822);\n\n // tableauAffiche($_SERVER);\n $myFile = fopen($currentDirectory.'\\log\\serveur.log', 'a+');\n fwrite($myFile, $_SERVER['REMOTE_ADDR'].'-'.$temps.'-'.$message.PHP_EOL);\n fclose($myFile);\n\n // envoit reponse HTTP\n http_response_code($codeErreur);\n\n //envoit mail ne fonctionne pas pour l'instant\n // mail('[email protected]', 'Erreur dans le serveur'.COMPANY_NAME, $message);\n\n die($message);\n}", "function MCW_logfile($entry) { \n global $mcw_write_log;\n if ($mcw_write_log){ //only used during plugin development\n global $mcw_path;\n $filename = $mcw_path[\"log\"];\n if (!file_exists($filename)){\n $answer = \"file \".$filename.\" does not exist. <br>\";\n } else {\n if (!$handle = fopen($filename, \"a\")) {\n $answer = $answer. \"File \".$filename.\" cannot be opened.<br>\";\n } else {\n // Schreibe $somecontent in die geöffnete Datei.\n $somecontent = '<strong>'.date(\"F j, Y, g:i a\").'</strong> - '.$entry.'<br>'; \n if (!fwrite($handle, $somecontent)) {\n $answer = $answer. \"File \".$filename.\" is not writeable.<br>\";\n } else {\n $answer = $answer.\"done \";\n }\n }\n fclose($handle);\n }\n }\n }", "function LogThis($InpMsg)\n {\n echo date('Y-m-d H:i:s') . ' ' . $InpMsg . '<br>';\n flush();\n ob_flush();\n }", "function write(){\n\trequire(\"mysql.php\");\n\t$sql = \"INSERT INTO `team1GuestDB`.`GuestBook` (`id`, `name`, `msg`, `timestamp`) VALUES (NULL,:name,:msg, CURRENT_TIMESTAMP)\";\n\t$stm = $dbh->prepare($sql);\n\t$stm->execute(array(':name' => $_POST['name'] ,':msg' => $_POST['con']));\n/*\t$filename = \"./hismsg.txt\";\n\t$handle = fopen($filename, \"a+\");\n\tfputs($handle, $msg.\"\\n\");\n\tfclose($handle); \n*/\n}", "function verifVadsTransDate($dateData) {\n if ( $dateData == \"ERRORDATE\") {\n return '<p style=\"margin-top:1px;\">Erreur verifVadsTransDate()</p>';\n } else {\n return strftime('%d/%m/%Y',strtotime($dateData)); //convert date Us YYYYMMJJ to Fr JJ/MM/YYYY\n }\n }", "private function writeLog($msg) {\n\t\t$line = $this->getLogLine($msg);\n\t\tfwrite($this->f, $line);\n\t\tfflush($this->f);\n\t}", "static function log($message) {\n\t\t$file = dirname(__FILE__).'/../../debug.log';\n\t\t$now = date('r');\n\t\t$oldcontent = file_get_contents($file);\n\t\t$content = $oldcontent . \"\\n\\n== $now ==\\n$message\\n\";\n\t\tfile_put_contents($file, $content);\n\t}", "public function lerArquivoLog(){\n $ponteiro = fopen(\"C:\\\\temp\\\\teste2.txt\", \"r\");\n\n //Abre o aruqivo .txt\n while(!feof($ponteiro)) {\n $linha = fgets($ponteiro, 4096);\n //Imprime na tela o resultado\n $this->pulaLinha();\n }\n //Fecha o arquivo\n fclose($ponteiro);\n }", "public function get_message() {\n\t\t// translators: Placeholders refer to a file name, and a theme / plugin name (e.g. \"index.php\", \"Stream\")\n\t\treturn _x(\n\t\t\t'\"%1$s\" in \"%2$s\" updated',\n\t\t\t'1: File name, 2: Theme/plugin name',\n\t\t\t'stream'\n\t\t);\n\t}", "function enregistre_message($sujet, $message, $login_src, $login_dest, $date_visibilite=\"\", $in_reply_to=-1) {\n\tglobal $mysqli;\n\t$retour=\"\";\n\n\t$date_courante=strftime(\"%Y-%m-%d %H:%M:%S\");\n\tif(($date_visibilite==\"\")||($date_visibilite<$date_courante)) {\n\t\t$date_visibilite=$date_courante;\n\t}\n\n\t$sql=\"INSERT INTO messagerie SET sujet='\".$mysqli->real_escape_string($sujet).\"',\n\t\t\t\t\t\t\t\t\tmessage='\".$mysqli->real_escape_string($message).\"',\n\t\t\t\t\t\t\t\t\tlogin_src='\".$login_src.\"',\n\t\t\t\t\t\t\t\t\tlogin_dest='\".$login_dest.\"',\n\t\t\t\t\t\t\t\t\tin_reply_to='\".$in_reply_to.\"',\n\t\t\t\t\t\t\t\t\tdate_msg='\".$date_courante.\"',\n\t\t\t\t\t\t\t\t\tdate_visibilite='\".$date_visibilite.\"';\";\n\t//echo \"$sql<br />\";\n\t$res=mysqli_query($mysqli, $sql);\n\tif($res) {\n\t\t$retour = $mysqli->insert_id;\n\t}\n\treturn $retour;\n}", "function logEvent($message)\n\t{\n\t\tdate_default_timezone_set ( \"America/Chicago\" );\n\t\t$time = date( \"Y-m-d H:i:s\");\n\t\t$fp = fopen('files/log.txt', 'a');\n\t\tfwrite($fp, $time.\"-- \");\n\t\tfwrite($fp, $message);\n\t\tfwrite($fp, \"\\n\");\n\t\tfclose($fp);\n\t}", "function log_message($level, $msg)\n{\n $level = strtolower($level);\n $file_name = __DIR__ . '/logs/' . date(\"Y_m_d\") . \"_{$level}.php\";\n if (!file_exists($file_name)) {\n file_put_contents($file_name, 'create log file ' . PHP_EOL);\n }\n file_put_contents($file_name, $level . ' - ' . date(\"Y-m-d H:i:s\") . ' --- ' . $msg . PHP_EOL, FILE_APPEND);\n}", "static function add($msg, $element = false, $type = false ) {\n\n if(!$type) {\n $type = defined('LOG_DEFAULT_FILE') ? LOG_DEFAULT_FILE : 'user';\n }\n\n $root = defined('LOG_FOLDER') ? LOG_FOLDER : '/';\n\n //If an element is defined and provided, it will be separated into files by element\n $divide = defined('LOG_DIVIDE_ELEMENT');\n \n $y = date('Y');\n $m = date('m');\n\n //Create htaccess file if no exist\n if(!file_exists($root . \"logs/.htaccess\")) {\n file_put_contents($root . \"logs/.htaccess\", 'Deny from all');\n }\n\n $fileDest = $root . \"logs/{$y}/{$m}/\";\n\n if(!file_exists($fileDest)) {\n $dir = mkdir($fileDest, 0775, true);\n }\n\n if($element && $divide) {\n return file_put_contents($fileDest.$type.\"_{$element}.log\", self::data($msg, $element, $type),FILE_APPEND);\n }\n return file_put_contents($fileDest.$type.\".log\", self::data($msg, $element, $type),FILE_APPEND);\n }", "public function dialogoMensaje(){\n\t \t$template = file_get_contents('tpl/dialogo_msg_tpl.html');\n\t \tprint($template);\n\t }", "function cc_import_error($msg, $oggetto = \"\"){\n\t\n\tif(empty($oggetto)) $oggetto = \"Errore durante importazione dati xml\";\n\twp_mail( '[email protected]', $oggetto, $msg);\t\n\t\n}", "function TransLog($message){\t\n notify_webmaster($message);\t\n}", "function createFichierTxt($cat_txt, $emp, $emp_sigle, $path_txt, $date_debut, $date_fin){\n $data = array();\n $txt =array();\n $no_data_msg = '';\n\n if ($cat_txt == 'AD'){\n $data = getListAdhesionsDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Adhesions du mois');\n }\n if ($cat_txt == 'PS'){\n $data = getListPSDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Parts Sociales du mois');\n }\n if ($cat_txt == 'NE'){\n $data = getListEpargneDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Epargnes du mois');\n }\n if ($cat_txt == 'NP'){\n $data = getListPretDuMois($emp,$emp_sigle,$date_debut,$date_fin);\n $no_data_msg = _('Liste des Prets du mois');\n }\n\n $nombre_colonnes = $data['nbrCols']+1;\n\n if(sizeof($data)>1){\n $file_handle = fopen($path_txt.\"/\".$cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\",\"w\");\n $txt_path = $path_txt.\"/\".$cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\";\n $txt_name = $cat_txt.\"_\".$emp_sigle.\"_\".date('ymd').\".txt\";\n $txt['path'] = $txt_path;\n $txt['name'] = $txt_name;\n foreach($data as $key => $value){\n $content = '';\n //if($key != 'nbrCols'){\n //$content = $key;\n //}\n for($i=1;$i<=$nombre_colonnes;$i++){\n $content .= $value['col'.$i.'_value'];\n }\n fwrite($file_handle, $content.\"\\r\\n\");\n }\n fclose($file_handle);\n }\n else{\n $txt['no_data'] = $no_data_msg;\n }\n\n return $txt;\n}", "function rapportVww($file, $line, $message)\n {\n // \n if(isset($_POST)) {\n //\n $bert = print_r($_POST, TRUE);\n\n } else {\n //\n $bert = 'no post array';\n }\n \n if(isset($_SESSION)) {\n //\n $sid = print_r($_SESSION, TRUE);\n\n } else {\t\n //\n $sid = 'no session array';\n }\n\n $time = Gmdate(\"H:i j-M-Y\");\n \n // full report\n $longstring = $time .'-'. $file .'-'. $line .':'. $message .': POST array:'. $bert .'SESSION array:'. $sid ;\n\n // short report \n $shortstring = $file .' - '. $line .': '. $message ;\n\n\n // set $action to 'long' if you want to log long error report \n // set $action to 'short' if you want to log short error report \n $action = 'short'; \n \n if( $action == 'long' ) {\t\n //\n log_message('error', $longstring);\n\n } elseif( $action == 'short' ) {\t\n //\n log_message('error', $shortstring);\n }\n //-----/ \n }", "function logThisToTxtFile($logENID,$action)\n{\n\t$detect = new Mobile_Detect();\n\t\n\t$user_browser=user_browser();\n\t$user_os=user_os();\n\t$user_ip=getRealIpAddr();\n\t\t\t\t\n\tif ($detect->isMobile())\n\t{\n\t\t// mobile content\n\t\t$device='Mobile';\n\t} \t\t\t\t\n\telse\n\t{\n\t\t// other content for desktops\n\t\t$device='Desktop';\n\t}\n\tdate_default_timezone_set('UTC');\t\n\t$logDateTime= date('Y-m-d H:i:s');\t\t\n\t$log_this = 'EN client '.$logENID.': '.$action.' on UTC '.$logDateTime.' from '.$user_ip.' using '.$device.' through browser '.$user_browser.' ,OS: '.$user_os;\n\t$filename= 'ENLog_'.date('MY').'.txt';\n \t$myfile = file_put_contents($filename, $log_this.PHP_EOL , FILE_APPEND);\t\n\n}", "function drupal_mail_wrapper($message) {\n \n // Prepare message filename \"message-TIMESTAMP.txt\"\n //$timestamp = time();\n $message_id = uniqid();\n $filename = \"message-$message_id.txt\";\n $filepath = \"sites/liveandtell.com/mail-logger/sent-mail/$filename\";\n \n // Write message\n $FILE = fopen($filepath, 'x');\n if ($FILE) {\n fwrite($FILE, print_r($message, TRUE));\n fclose($FILE);\n }\n else {\n drupal_set_message('Cannot send email...mail-logger file already exists.');\n }\n \n}", "function logheader() {\n $str = \"\\n=============================\"\n .\"======================================\";\n $str .= \"\\n============================ \"\n .\"logrecord ============================\";\n $str .= \"\\nstartlogrecord timestamp : \".date(\"Y-m-d H:i:s\",time()).\"\\n\";\n\n $this->prn($str);\n// fwrite($this->fp, $str.\"\\n\");\n }", "function incaseMysqlerror(){\n //$msg = \"Wrong Code Entered \\n Please check the code and Try again\";\n $file = \"/var/www/html/debug/mysqlerror.txt\";\n $date = date('m/d/Y h:i:s a', time());\n $error = mysql_error().\" \". $date.\" \\n\";\n file_put_contents($file, $error, FILE_APPEND | LOCK_EX);\n\n \n }", "function add($file,$user,$text){\r\n\t\t\r\n\t\t\t// Prepare the message (remove \\')\r\n\t\t\t$text = eregi_replace(\"\\\\\\\\'\",\"'\",$text);\r\n\t\t\t$time = time();\r\n\t\t\t$log_file = ROOT_LOGS_PATH.\"saved/$file.html\";\r\n\t\t\t$fh = fopen($log_file,\"a\");\r\n\t\t\tflock($fh,2);\r\n\t\t\tfwrite($fh,\"$user$text\\n\");\r\n\t\t\tflock($fh,3);\r\n\t\t\tfclose($fh);\r\n\t\t\r\n\t}", "public function message()\n {\n return \"Завантажуваний файл перевищує upload_max_filesize = \". ini_get('upload_max_filesize') ;\n }", "function hlog($msg,$logfile,$setperm=false,$sethost=false,$levelstr=NULL)\n{\n\n\t\tdate_default_timezone_set(DEFAULT_TIME_ZONE);\n\t\t$today = date(\"Y-m-d\");\n\n\t\tif($sethost)\n\t\t{\n\t\t\t$hostname = gethostname();\n\t\t\t$logfile = $logfile.'_'.$hostname;\n\t\t}\n\n\t\t$filename = VBOXLITE_LOG_LOCATION.$logfile.'_'.$today.'.csv';\n\n\t\tif (file_exists($filename)){\n\t\t\tif($setperm)\n\t\t\t{\n\t\t\t\tchmod($filename,0777);\n\t\t\t}\n\t\t}\n\n\t\t$fd = fopen($filename, \"a\");\n\t\t$timestamp = round(microtime(true));\n\n\t\tif(!empty($levelstr))\n\t\t{\n\t\t\tfwrite($fd, $timestamp.LLOG_SEPARATOR.\"[\".$levelstr.\"]\".LLOG_SEPARATOR.$msg.PHP_EOL);\n\t\t}else\n\t\t{\n\t\t\tfwrite($fd, $timestamp.LLOG_SEPARATOR.$msg.PHP_EOL);\n\t\t}\n\t\tfclose($fd);\n}", "function write_log($cadena){\n\t\t\t$arch = fopen(\"../../logs/deletes\".\".txt\", \"a+\"); //date(\"Y-m-d\"). define hora en archivo\n\t\t\n\t\t\tfwrite($arch, \"[\".date(\"Y-m-d H:i:s\").\" \".$_SERVER['REMOTE_ADDR'].\" \".\" - Elimino produccion ] \".$cadena.\"\\n\");\n\t\t\tfclose($arch);\n\t\t}", "function sc_mailbox_message_datestamp($parm = '')\n {\n $datestamp = $this->var['message_sent']; \n \n // If it's a draft, datestamp is 'last saved'\n if(e107::getParser()->filter($_GET['page']) == 'draftbox' || $this->var['message_sent'] == '0')\n {\n $datestamp = $this->var['message_draft'];\n }\n\n // Default parm to 'short'\n if(!$parm) { $parm = 'short'; }\n \n if($parm == 'relative')\n {\n //return $gen->computeLapse($this->var['message_sent'], time(), false, false, 'short');\n e107::getParser()->toDate($datestamp, \"relative\");\n }\n\n return e107::getParser()->toDate($datestamp, $parm);\n //$gen->convert_date($this->var['message_sent'], $parm);\n }", "public function writeMessage($what,$days=null){\n\t\t$http_host = $_SERVER['HTTP_HOST'];\n\n\t\tif ($what == 'deadline'){\n\t\t\treturn '\n\t\t\t<div class=\"col m-t-25\">\n\t\t\t\t<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<b>ATTENZIONE!</b>\n\t\t\t\t\t<br>Restano alla scadenza '.abs($days).' giorni, dopodiché non potrai più usare l\\'applicazione.\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t';\n\t\t}\n\n\t}", "function action_editer_message_post_vieux_ap($id_message)\n{\n\t//Champs suppl. LIEU, ID_RUBRIQUE\t\t\n\tsql_updateq('spip_messages', array('titre'=>_request('titre'), 'texte' => _request('texte'), 'lieu' => _request('lieu'), 'id_rubrique' => _request('id_parent')), \"id_message=$id_message\");\n\n\tsql_updateq('spip_messages', array('rv' => _request('rv')), \"id_message=$id_message\");\n\n\tif (_request('jour'))\n\t\tchange_date_message($id_message, _request('heures'),_request('minutes'),_request('mois'), _request('jour'), _request('annee'), _request('heures_fin'),_request('minutes_fin'),_request('mois_fin'), _request('jour_fin'), _request('annee_fin'));\n\n}", "function addFileLog($file, $text) {\n\t$today = date(\"Ymd\");\n\t$timeStamp = date(\"Y-m-d H:i:s\");\n\t$filePath = \"./__logs__/\".$today.\"_\".$file;\n\tfile_put_contents($filePath, \"\\n\".$timeStamp.\"\\n\".$text, FILE_APPEND | LOCK_EX);\n}", "function error($type, $msg, $file, $line)\n{\n // on lit les principales variables d'environnement\n // pour ecrire leur contenu dans le log\n global $HTTP_HOST, $HTTP_USER_AGENT, $REMOTE_ADDR, $REQUEST_URI;\n // on donne un nom au fichier d'erreur\n $errorLog = URL_BASE .\"erreur.log\"; \n // construction du contenu du fichier d'erreur\n $errorString = \"Date: \" . date(\"d-m-Y H:i:s\") . \"\\n\";\n $errorString .= \"Type d'erreur: $type\\n\";\n $errorString .= \"Message d'erreur: $msg\\n\";\n $errorString .= \"Fichier: $file($line)\\n\";\n $errorString .= \"Host: $HTTP_HOST\\n\";\n $errorString .= \"Client: $HTTP_USER_AGENT\\n\";\n $errorString .= \"Client IP: $REMOTE_ADDR\\n\";\n $errorString .= \"Request URI: $REQUEST_URI\\n\\n\";\n // ecriture du log dans le fichier erreur.log\n $fp = fopen($errorLog, \"a+\");\n fwrite($fp, $errorString);\n fclose($fp);\n \n // n'affiche que \n if ($type == E_ERROR || $type == E_WARNING ){\n // display error message\n echo \"<h4>Erreur (<small>$msg</small>)</h4>\";\n echo \"Nous sommes désolés, mais cette page ne peut être affichée à cause d'une erreur interne.\n <br />\n Cette erreur a été enregistrée et sera corrigée dès que possible.\n <br /><br/>\n <a href=# onClick='history.go(-1)'>Cliquer ici pour revenir au menu précédent.</a>\";\n }\n}", "function lerror_log($message)\n\t{\n\t\treturn lfile_append(\"data/error_log.txt\", date('j.n.y. - G:i') . \" * \" . $message . \"\\r\\n\");\n\t}", "public static function escribirTxt($texto) {\n $fecha = date(\"d/m/y H:i:s\");\n $fp = fopen(\"errores.txt\", \"w\");\n fwrite($fp, \"Fecha: $fecha -> \\n Variable: $texto \" . PHP_EOL);\n fclose($fp);\n }", "public function registrarErro(){\r\n if($this->dataHora != null){\r\n if($this->classe != null){\r\n if($this->metodo != null){\r\n if(count($this->descricao != null)){\r\n //Registra o erro em arquivos de log .TXT----------\r\n $linha = \"\\n========================================================\\n\";\r\n $linha .= \"Data: \".$this->dataHora.\"\\n\";\r\n $linha .= \"Erro: \".$this->descricao.\"\\n\";\r\n $linha .= \"Classe: {$this->classe}\\n\";\r\n $linha .= \"Metodo: {$this->metodo}\\n\";\r\n $linha .= \"========================================================\\n\";\r\n $nomeArquivo = \"C:\\\\xampp\\\\htdocs\\\\sui\\\\logs\\\\\".date(\"Y-m-d\");\r\n $arquivo = fopen(\"{$nomeArquivo}.txt\", \"a\");\r\n fwrite($arquivo, $linha);\r\n fclose($arquivo);\r\n Helpers::msg(\"Erro\", \"Houve um erro no processo verifique o log para mais informacoes\");\r\n //Registra o erro em arquivos de log .TXT----------\r\n\r\n\r\n //Envia email para todos os programadores---------------------------\r\n// $conn = Conexoes::conectarCentral();\r\n// $programadores = $conn->query(\"select programadores.email from programadores\")->fetchAll();\r\n// $enderecos = Array();\r\n// if(count($programadores) > 0){\r\n// foreach ($programadores as $programador){\r\n// array_push($enderecos, $programador['email']);\r\n// }\r\n// }else{\r\n// array_push($enderecos, \"[email protected]\");\r\n// }\r\n// $email = new Mail();\r\n// $email->de = \"[email protected]\";\r\n// $email->para = $enderecos;\r\n// $email->titulo = \"Erro no sistema de integrações\";\r\n// $email->corpo = $this->corpoEmail();\r\n// try{\r\n// $email->enviaEmail();\r\n// } catch (Exception $ex) {\r\n// echo $ex->getMensage();\r\n// }\r\n// return true;\r\n //Envia email para todos os programadores---------------------------\r\n }else{\r\n echo \"A descricao do erro nao foi informada\";\r\n }\r\n }else{\r\n echo \"Metodo do erro nao foi informado\";\r\n }\r\n }else{\r\n echo \"Classe do erro nao foi informada\";\r\n }\r\n }else{\r\n echo \"Date e hora do erro não informada\";\r\n }\r\n }" ]
[ "0.67073977", "0.6706532", "0.6555309", "0.6555027", "0.63123965", "0.6297475", "0.6246508", "0.6230543", "0.61696965", "0.6161088", "0.6123385", "0.60761595", "0.6040966", "0.6028027", "0.6013002", "0.60019964", "0.59471107", "0.591046", "0.58943766", "0.5893898", "0.58934903", "0.5853729", "0.58306384", "0.5823826", "0.5810654", "0.58047706", "0.5782601", "0.57730085", "0.576257", "0.57595265", "0.574978", "0.5706654", "0.56737113", "0.5655239", "0.56479037", "0.563924", "0.56384987", "0.56274027", "0.55939245", "0.5589316", "0.5588115", "0.55875564", "0.5569973", "0.5562906", "0.5544108", "0.55374026", "0.5534672", "0.5526873", "0.5517511", "0.5508261", "0.5507814", "0.54957366", "0.5495439", "0.5489817", "0.54864854", "0.54755384", "0.5474438", "0.5464105", "0.5448622", "0.5440041", "0.5437068", "0.5431437", "0.5428173", "0.5425705", "0.5425612", "0.5410814", "0.54014754", "0.53968185", "0.53758997", "0.53756446", "0.5372752", "0.53626984", "0.5355087", "0.5338547", "0.5336379", "0.53347397", "0.53287315", "0.5322151", "0.5315747", "0.53048867", "0.53009975", "0.5300249", "0.529215", "0.5290702", "0.5290581", "0.528694", "0.5285492", "0.528289", "0.52741885", "0.52704054", "0.52697295", "0.526583", "0.52583575", "0.5257984", "0.52566355", "0.5256331", "0.5250997", "0.52445346", "0.524091", "0.52354753" ]
0.55416167
45
Coder la fonction mais ne l'appelez pas, on passera par un cron limite de taille : 5mo
public static function purgeLog(){ $fichier = fopen('log/log.txt', 'w'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function cronMinute()\n {\n $timedRecords = $this->app['storage.event_processor.timed'];\n if ($timedRecords->isDuePublish()) {\n $this->notify('Publishing timed records');\n $timedRecords->publishTimedRecords();\n }\n if ($timedRecords->isDueHold()) {\n $this->notify('De-publishing timed records');\n $timedRecords->holdExpiredRecords();\n }\n }", "function implement(){\n// .' or (`status`='.self::CRON_STATUS_RUN.' and `runtime`<'.(NOW_TIME-self::CRON_RETRY_TIME).')) ';\n// $where .= ' and `retry`<'.self::CRON_RETRY_COUNT;\n $where = '`status`='.self::CRON_STATUS_DEF;\n //$where .= ' and `addtime` >'.(NOW_TIME-self::CRON_TIMEOUT);\n $where .= ' and (`runtime` is null or `runtime`<'.(NOW_TIME-self::CRON_RETRY_TIME).') ';\n $where .= ' and `crontime` <'.NOW_TIME;\n $error_acid=$this->getErrorACID();\n if($error_acid){\n $where .= \" and `ac_id` not in ($error_acid) \";\n }\n $cron=M('x_cron');\n// $cron->where($where)\n// ->order('`priority` desc,`addtime` asc')->limit(1)\n// ->find();\n// if($cron->id){\n// $param=@json_decode($cron->param,true);\n// $param['cron_id']= $cron->id;\n// asyn_implement($cron->path,$param,$cron->method);\n// $cron->retry+=1;\n// $cron->status=self::CRON_STATUS_RUN;\n// $cron->runtime=NOW_TIME;\n// $cron->save();\n// }\n $data=$cron->where($where)\n ->order('`priority` desc,`addtime` asc')->limit(50)\n ->select();\n echo $cron->getLastSql();\n if($data){\n foreach ($data as $r){\n $param=@json_decode($r['param'],true);\n $param['cron_id']= $r['id'];\n $url=url($r['path']).'?'.http_build_query($param, '', '&');\n echo '<br>'.$r['id'].'#'.$r['message'].'##<a href=\"'.$url.'\" target=\"_blank\">'.$url.'</a>';\n asyn_implement($r['path'],$param,$r['method']);\n }\n\n }\n }", "function spawn_cron($gmt_time = 0)\n {\n }", "public function nextCron() {\n\t\t$jour=array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');\n\t\t$x = self::getCron();\n\t\t$t = [];\n\t\tforeach ($x['cron'] as $cron) {\n\t\t\tif ($cron['active']) $t[] = self::getNextCron($cron['raw']);\n\t\t}\n\t\tif (count($t) >=1) {\n\t\t\t$n = min($t);\n\t\t\tFlight::json(array('Status' => 'OK','Time' => $jour[date('w', $n)].date(' d/m/Y H:i', $n)));\n\t\t}\n\t\telse Flight::json(array('Status' => 'KO','Time' => 'Not Found'));\n\t}", "function cicleinscription_cron () {\n return true;\n}", "public static function cron()\n\t{\n\t\tzipabox::log( 'debug', \"Début de Mise à jour des commandes INFOS.\");\n\t\t$n = 0;\n\t\t$eqLogics = eqLogic::byType('zipabox');\n\t\tforeach ($eqLogics as $eqLogic)\n\t\t{\n\t\t\tif ($eqLogic->getIsEnable() == 0)\n\t\t\t{\n\t\t\t\tzipabox::log( 'debug', 'L\\'équipement zipabox ID ' . $eqLogic->getId() . ' ( ' . $eqLogic->getName() . ' ) est désactivé.');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$zipabox_id = $eqLogic->getConfiguration('zipabox_id');\n\t\t\tforeach ($eqLogic->getCmd('info') as $cmd)\n\t\t\t{\n\t\t\t\t$uuid = $cmd->getConfiguration('uuid');\n\t\t\t\t$r = json_decode(zipabox::CallZipabox( $zipabox_id, 'attributes/' . $uuid . '?definition=true&value=true'), true);\n\t\t\t\tif (!is_array($r))\n\t\t\t\t{\n\t\t\t\t\tzipabox::log( 'debug', \"CRON,ATTRIBUTES,DEFINITION-1-La réponse de la Zipabox n'est pas conforme (not an array).\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (isset($r['value']))\n\t\t\t\t{\n\t\t\t\t\t$cmd->setCollectDate(date('Y-m-d H:i:s'));\n\t\t\t\t\t$cmd->event($r['value']['value']);\n\t\t\t\t\t$cmd->setConfiguration('value', $r['value']['value']);\n\t\t\t\t\t$cmd->save();\n\t\t\t\t\t$n++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tzipabox::log( 'debug', \"Fin de Mise à jour des commandes INFOS ( Nombre : \" . $n .\" ).\");\n\t}", "static function cron() {\n\t\tself::starter();\n\t\tself::ender();\n\t}", "function addCronTask()\n{\n require_once __DIR__.\"/models/SchedulesModel.php\";\n require_once __DIR__.\"/models/LogModel.php\";\n\n // Emojione client\n $Emojione = new \\Emojione\\Client(new \\Emojione\\Ruleset());\n\n\n // Get auto repost schedules\n $Schedules = new SchedulesModel;\n $Schedules->where(\"is_active\", \"=\", 1)\n ->where(\"schedule_date\", \"<=\", date(\"Y-m-d H:i:s\"))\n ->where(\"end_date\", \">=\", date(\"Y-m-d H:i:s\"))\n ->orderBy(\"last_action_date\", \"ASC\")\n ->setPageSize(5) // required to prevent server overload\n ->setPage(1)\n ->fetchData();\n\n if ($Schedules->getTotalCount() < 1) {\n // There is not any active schedule\n return false;\n }\n\n // Settings\n $settings = namespace\\settings();\n\n // Random delays between actions\n $random_delay = 0;\n if ($settings->get(\"data.random_delay\")) {\n $random_delay = rand(0, 3600); // up to an hour\n }\n\n // Speeds (action count per day)\n $default_speeds = [\n \"very_slow\" => 1,\n \"slow\" => 2,\n \"medium\" => 3,\n \"fast\" => 4,\n \"very_fast\" => 5,\n ];\n $speeds = $settings->get(\"data.speeds\");\n if (empty($speeds)) {\n $speeds = [];\n } else {\n $speeds = json_decode(json_encode($speeds), true);\n }\n $speeds = array_merge($default_speeds, $speeds);\n\n\n $as = [__DIR__.\"/models/ScheduleModel.php\", __NAMESPACE__.\"\\ScheduleModel\"];\n foreach ($Schedules->getDataAs($as) as $sc) {\n $Log = new LogModel;\n $Account = \\Controller::model(\"Account\", $sc->get(\"account_id\"));\n $User = \\Controller::model(\"User\", $sc->get(\"user_id\"));\n\n // Set default values for the log (not save yet)...\n $Log->set(\"user_id\", $User->get(\"id\"))\n ->set(\"account_id\", $Account->get(\"id\"))\n ->set(\"status\", \"error\");\n\n // Check the account\n if (!$Account->isAvailable() || $Account->get(\"login_required\")) {\n // Account is either removed (unexected, external factors)\n // Or login reqiured for this account\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"Re-login is required for the account.\")\n ->save();\n continue;\n }\n\n // Check the user\n if (!$User->isAvailable() || !$User->get(\"is_active\") || $User->isExpired()) {\n // User is not valid\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"User account is either disabled or expired.\")\n ->save();\n continue;\n }\n\n if ($User->get(\"id\") != $Account->get(\"user_id\")) {\n // Unexpected, data modified by external factors\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n continue;\n }\n\n // Check user access to the module\n $user_modules = $User->get(\"settings.modules\");\n if (!is_array($user_modules) || !in_array(IDNAME, $user_modules)) {\n // Module is not accessible to this user\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"Module is not accessible to your account.\")\n ->save();\n continue;\n }\n\n // Calculate next schedule datetime...\n if (isset($speeds[$sc->get(\"speed\")]) && (int)$speeds[$sc->get(\"speed\")] > 0) {\n $speed = (int)$speeds[$sc->get(\"speed\")];\n $delta = round(86400/$speed) + $random_delay;\n } else {\n $delta = rand(1200, 21600); // 20 min - 6 hours\n }\n\n $next_schedule = date(\"Y-m-d H:i:s\", time() + $delta);\n if ($sc->get(\"daily_pause\")) {\n $pause_from = date(\"Y-m-d\").\" \".$sc->get(\"daily_pause_from\");\n $pause_to = date(\"Y-m-d\").\" \".$sc->get(\"daily_pause_to\");\n if ($pause_to <= $pause_from) {\n // next day\n $pause_to = date(\"Y-m-d\", time() + 86400).\" \".$sc->get(\"daily_pause_to\");\n }\n\n if ($next_schedule > $pause_to) {\n // Today's pause interval is over\n $pause_from = date(\"Y-m-d H:i:s\", strtotime($pause_from) + 86400);\n $pause_to = date(\"Y-m-d H:i:s\", strtotime($pause_to) + 86400);\n }\n\n if ($next_schedule >= $pause_from && $next_schedule <= $pause_to) {\n $next_schedule = $pause_to;\n }\n }\n $sc->set(\"schedule_date\", $next_schedule)\n ->set(\"last_action_date\", date(\"Y-m-d H:i:s\"))\n ->save();\n\n\n // Parse targets\n $targets = @json_decode($sc->get(\"target\"));\n if (is_null($targets)) {\n // Unexpected, data modified by external factors or empty targets\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n continue;\n }\n\n if (count($targets) < 1) {\n // Couldn't find any target for the feed\n // Log data\n $Log->set(\"data.error.msg\", \"Couldn't find any target to search for the feed.\")\n ->save();\n return false;\n }\n\n // Select random target from the defined target collection\n $i = rand(0, count($targets) - 1);\n $target = $targets[$i];\n\n if (empty($target->type) || empty($target->id) ||\n !in_array($target->type, [\"hashtag\", \"location\", \"people\"])) \n {\n // Unexpected invalid target, \n // data modified by external factors\n $sc->set(\"is_active\", 0)->save();\n continue; \n }\n\n $Log->set(\"data.trigger\", $target);\n\n\n // Login into the account\n try {\n $Instagram = \\InstagramController::login($Account);\n } catch (\\Exception $e) {\n // Couldn't login into the account\n $Account->refresh();\n\n // Log data\n if ($Account->get(\"login_required\")) {\n $sc->set(\"is_active\", 0)->save();\n $Log->set(\"data.error.msg\", \"Activity has been stopped\");\n } else {\n $Log->set(\"data.error.msg\", \"Action re-scheduled\");\n }\n $Log->set(\"data.error.details\", $e->getMessage())\n ->save();\n\n continue;\n }\n\n\n // Logged in successfully\n $permissions = $User->get(\"settings.post_types\");\n $video_processing = isVideoExtenstionsLoaded() ? true : false;\n\n $acceptable_media_types = [];\n if (!empty($permissions->timeline_photo)) {\n $acceptable_media_types[] = \"1\"; // Photo\n }\n\n if (!empty($permissions->timeline_video)) {\n $acceptable_media_types[] = \"2\"; // Video\n }\n\n if (!empty($permissions->album_photo) || !empty($permissions->album_video)) {\n $acceptable_media_types[] = \"8\"; // Album\n }\n\n\n // Generate a random rank token.\n $rank_token = \\InstagramAPI\\Signatures::generateUUID();\n\n if ($target->type == \"hashtag\") {\n $hashtag = str_replace(\"#\", \"\", trim($target->id));\n if (!$hashtag) {\n continue;\n }\n\n try {\n $feed = $Instagram->hashtag->getFeed(\n $hashtag,\n $rank_token);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the hashtag\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = array_merge($feed->getRankedItems(), $feed->getItems());\n } else if ($target->type == \"location\") {\n try {\n $feed = $Instagram->location->getFeed(\n $target->id, \n $rank_token);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the location id\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = $feed->getItems();\n } else if ($target->type == \"people\") {\n try {\n $feed = $Instagram->timeline->getUserFeed($target->id);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the user id\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = $feed->getItems();\n }\n\n\n // Found feed item to repost\n $feed_item = null;\n\n // Shuffe items\n shuffle($items);\n\n // Iterate through the items to find a proper item to repost\n foreach ($items as $item) {\n if (!$item->getId()) {\n // Item is not valid\n continue;\n }\n\n if (!in_array($item->getMediaType(), $acceptable_media_types)) {\n // User has not got a permission to post this kind of the item\n continue;\n }\n\n if ($item->getMediaType() == 2 && !$video_processing) {\n // Video processing is not possible now,\n // FFMPEG is not configured\n continue;\n }\n\n if ($item->getMediaType() == 8) {\n $medias = $item->getCarouselMedia();\n $is_valid = true;\n foreach ($medias as $media) {\n if ($media->getMediaType() == 1 && empty($permissions->album_photo)) {\n // User has not got a permission for photo albums\n $is_valid = false;\n break; \n }\n\n if ($media->getMediaType() == 2 && empty($permissions->album_video)) {\n // User has not got a permission for video albums\n $is_valid = false;\n break; \n }\n\n if ($media->getMediaType() == 2 && !$video_processing) {\n // Video processing is not possible now,\n // FFMPEG is not configured\n $is_valid = false;\n break; \n }\n }\n\n if (!$is_valid) {\n // User can not re-post this album post because of the permission \n // (or absence of the ffmpeg video processing)\n continue;\n }\n }\n\n\n $_log = new LogModel([\n \"user_id\" => $User->get(\"id\"),\n \"account_id\" => $Account->get(\"id\"),\n \"original_media_code\" => $item->getCode(),\n \"status\" => \"success\"\n ]);\n\n if ($_log->isAvailable()) {\n // Already reposted this feed\n continue;\n }\n\n // Found the feed item to repost\n $feed_item = $item;\n break;\n }\n\n\n if (empty($feed_item)) {\n $Log->set(\"data.error.msg\", \"Couldn't find the new feed item to repost\")\n ->save();\n continue;\n }\n\n\n // Download the media\n $media = [];\n if ($feed_item->getMediaType() == 1 && $feed_item->getImageVersions2()->getCandidates()[0]->getUrl()) {\n $media[] = $feed_item->getImageVersions2()->getCandidates()[0]->getUrl();\n } else if ($feed_item->getMediaType() == 2 && $feed_item->getVideoVersions()[0]->getUrl()) {\n $media[] = $feed_item->getVideoVersions()[0]->getUrl();\n } else if ($feed_item->getMediaType() == 8) {\n foreach ($feed_item->getCarouselMedia() as $m) {\n if ($m->getMediaType() == 1 && $m->getImageVersions2()->getCandidates()[0]->getUrl()) {\n $media[] = $m->getImageVersions2()->getCandidates()[0]->getUrl();\n\n } else if ($m->getMediaType() == 2 && $m->getVideoVersions()[0]->getUrl()) {\n $media[] = $m->getVideoVersions()[0]->getUrl();\n }\n }\n }\n\n\n $downloaded_media = [];\n foreach ($media as $m) {\n $url_parts = parse_url($m);\n if (empty($url_parts['path'])) {\n continue;\n }\n\n $ext = strtolower(pathinfo($url_parts['path'], PATHINFO_EXTENSION));\n $filename = uniqid(readableRandomString(8).\"-\").\".\".$ext;\n $downres = file_put_contents(TEMP_PATH . \"/\". $filename, file_get_contents($m));\n if ($downres) {\n $downloaded_media[] = $filename;\n }\n }\n\n if (empty($downloaded_media)) {\n $Log->set(\"data.error.msg\", \"Couldn't download the media of the selected post\")\n ->save();\n continue;\n }\n\n $original_caption = \"\";\n if ($feed_item->getCaption()->getText()) {\n $original_caption = $feed_item->getCaption()->getText();\n }\n\n $caption = $sc->get(\"caption\");\n $variables = [\n \"{{caption}}\" => $original_caption,\n \"{{username}}\" => \"@\".$feed_item->getUser()->getUsername(),\n \"{{full_name}}\" => $feed_item->getUser()->getFullName() ?\n $feed_item->getUser()->getFullName() :\n \"@\".$feed_item->getUser()->getUsername()\n ];\n $caption = str_replace(\n array_keys($variables), \n array_values($variables), \n $caption);\n\n $caption = $Emojione->shortnameToUnicode($caption);\n if ($User->get(\"settings.spintax\")) {\n $caption = \\Spintax::process($caption);\n }\n\n $caption = mb_substr($caption, 0, 2200);\n\n\n\n // Try to repost\n try {\n if (count($downloaded_media) > 1) {\n $album_media = [];\n\n foreach ($downloaded_media as $m) {\n $ext = strtolower(pathinfo($m, PATHINFO_EXTENSION));\n\n $album_media[] = [\n \"type\" => in_array($ext, [\"mp4\"]) ? \"video\" : \"photo\",\n \"file\" => TEMP_PATH.\"/\".$m\n ];\n }\n\n $res = $Instagram->timeline->uploadAlbum($album_media, ['caption' => $caption]);\n } else {\n $m = $downloaded_media[0];\n $ext = strtolower(pathinfo($m, PATHINFO_EXTENSION));\n if (in_array($ext, [\"mp4\"])) {\n $res = $Instagram->timeline->uploadVideo(TEMP_PATH.\"/\".$m, [\"caption\" => $caption]);\n } else {\n $res = $Instagram->timeline->uploadPhoto(TEMP_PATH.\"/\".$m, [\"caption\" => $caption]);\n }\n }\n } catch (\\Exception $e) {\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", __(\"An error occured during reposting the media.\"))\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n if (!$res->isOk()) {\n $Log->set(\"data.error.msg\", __(\"An error occured during reposting the media.\"))\n ->set(\"data.error.details\", __(\"Instagram didn't return the expected result.\"))\n ->save();\n continue;\n }\n\n\n // Reposted media succesfully\n // Save log\n $thumb = null;\n if (null !== $feed_item->getImageVersions2()) {\n $thumb = $feed_item->getImageVersions2()->getCandidates()[0]->getUrl();\n } else if (null !== $feed_item->getCarouselMedia()) {\n $thumb = $feed_item->getCarouselMedia()[0]->getImageVersions2()->getCandidates()[0]->getUrl();\n }\n\n\n $Log->set(\"data.grabbed\", [\n \"media_id\" => $feed_item->getId(),\n \"media_code\" => $feed_item->getCode(),\n \"media_type\" => $feed_item->getMediaType(),\n \"media_thumb\" => $thumb,\n \"user\" => [\n \"pk\" => $feed_item->getUser()->getPk(),\n \"username\" => $feed_item->getUser()->getUsername(),\n \"full_name\" => $feed_item->getUser()->getFullName()\n ]\n ]);\n\n $Log->set(\"data.reposted\", [\n \"upload_id\" => $res->getUploadId(),\n \"media_pk\" => $res->getMedia()->getPk(),\n \"media_id\" => $res->getMedia()->getId(),\n \"media_code\" => $res->getMedia()->getCode()\n ]);\n \n $Log->set(\"status\", \"success\")\n ->set(\"original_media_code\", $feed_item->getCode());\n \n\n if ($sc->get(\"remove_delay\") > 0) {\n $Log->set(\"is_removable\", 1)\n ->set(\"remove_scheduled\", date(\"Y-m-d H:i:s\", time() + $sc->get(\"remove_delay\")));\n }\n\n $Log->save();\n\n // Remove downloaded media files\n foreach ($downloaded_media as $m) {\n @unlink(TEMP_PATH.\"/\".$m);\n }\n }\n}", "public function cron()\n\t{\n\t\t$objNews = $this->Database->prepare(\"SELECT * FROM tl_news WHERE newsalert=? AND na_sent=? AND date<=?\")\n\t\t\t\t\t\t\t\t ->execute(1, '', time());\n\t\t\t\t\t\t\t\t \n\t\tif ($objNews->numRows)\n\t\t{\n\t\t\twhile( $objNews->next() )\n\t\t\t{\n\t\t\t\t$this->send($objNews->id, true);\n\t\t\t}\n\t\t}\n\t}", "public function action()\n\t{\n\t\tignore_user_abort(true);\n\t\tdefine('DOING_DELIBERA_CRON', true);\n\t\t$crons = get_option('delibera-cron', array());\n\t\t$new_crons = array();\n\t\t$dT = new \\DateTime();\n\t\t$now = $dT->getTimestamp();\n\t\t\t\n\t\t$exec = 0;\n\t\tforeach ($crons as $key => $values)\n\t\t{\n\t\t\tif($key <= $now)\n\t\t\t{\n\t\t\t\tforeach ($values as $value)\n\t\t\t\t{\n\t\t\t\t\t$exec++;\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tif(is_array($value['call_back']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(method_exists($value['call_back'][0], $value['call_back'][1]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcall_user_func($value['call_back'], $value['args']);\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\tif(function_exists($value['call_back']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcall_user_func($value['call_back'], $value['args']);\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\tcatch (Exception $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = __('Erro no cron Delibera: ','delibera').$e->getMessage().\"\\n\".$e->getCode().\"\\n\".$e->getTraceAsString().\"\\n\".$e->getLine().\"\\n\".$e->getFile();\n\t\t\t\t\t\twp_mail(\"[email protected]\", get_bloginfo('name'), $error);\n\t\t\t\t\t\tfile_put_contents('/tmp/delibera_cron.log', $error, FILE_APPEND);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_crons[$key] = $values;\n\t\t\t}\n\t\t}\n\t\tupdate_option('delibera-cron', $new_crons);\n\t\t\n\t\t//wp_mail(\"[email protected]\", get_bloginfo('name'),\"Foram executadas $exec tarefa(s)\");\n\t}", "function ds_add_email_cron_schedules( $param ) {\n\n $param['fifteen_minute'] = array(\n 'interval' => 900, // seconds* 900/60 = 15 mins\n 'display' => __( 'Every Fifteen Minutes' )\n );\n\n return $param;\n\n }", "function cron() {\n\t\t//look at the clock.\n\t\t$now = strtotime('now');\n\t\t\n\t\t//check for the hack\n\t\tif(Configure::read('debug') != 0 && isset($this->params['named']['time_machine'])){\n\t\t\t$now = strtotime($this->params['named']['time_machine']);\n\t\t}\n\t\t\n\t\t$this->Project->upgradeProjects($now);\n\t}", "function view_check_cron() {\n\t}", "function wp_doing_cron()\n {\n }", "public function cronSet() {\n// de tim height, khi nao co height thi tiep tuc lay tu 2 https://blockchain.info/latestblock va thuc hien phep toan .\n//\n// neu thoa man thi update status = 1 trong bang hash_confirm va borrow = 1 status\n // check borrow the chap\n $listCheck = Hash::where('status', 0)->get();\n if(count($listCheck)) {\n foreach($listCheck as $ihash) {\n $keyHash = $ihash->hask;\n $baseUrl = 'https://blockchain.info/rawtx/';\n $getInfo = $baseUrl.$keyHash;\n $file = $getInfo;\n $file_headers = @get_headers($file);\n if(!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found' || $file_headers[0] == 'HTTP/1.1 500 Internal Server Error') {\n $exists = false;\n }\n else {\n $exists = true;\n }\n if ($exists) {\n $jsonInfo = file_get_contents($getInfo);\n $objInfo = json_decode($jsonInfo);\n $urlHeight = 'https://blockchain.info/latestblock';\n $jsonInfoHeight = file_get_contents($urlHeight);\n $objInfoHeight = json_decode($jsonInfoHeight);\n if ( ( ($objInfoHeight->height - $objInfo->block_height) + 1) > 2 ) {\n Hash::where('id', $ihash->id)->update(array('status'=>1));\n // update status ...\n Borrow::where('id', $ihash->dataId)->update(array('status'=>1));\n }\n }\n }\n }\n\n $data = date('Y-m-d');\n $time = date('h-A');\n \\Log::useFiles(base_path() . '/log/'.$data.'/'.$time.'-info.log', 'info');\n \\Log::info('Log content here ...');\n // http://localhost/lending/tlog\n }", "function dw2_taches_generales_cron($taches_generales){\r\n\t\t$taches_generales['dw2_verif_maj'] = 3600*48; // tous les 2 jours\r\n\t\treturn $taches_generales;\r\n\t}", "function suploadhtml5_taches_generales_cron($taches) {\n\t$taches['nettoyer_document_temporaire'] = 24*3600;\n\treturn $taches;\n}", "function my_cron_schedules($schedules){\r\n if(!isset($schedules[\"5min\"])){\r\n $schedules[\"5min\"] = array(\r\n 'interval' => 5*60,\r\n 'display' => __('Once every 5 minutes'));\r\n }\r\n if(!isset($schedules[\"15min\"])){\r\n $schedules[\"15min\"] = array(\r\n 'interval' => 15*60,\r\n 'display' => __('Once every 15 minutes'));\r\n }\r\n return $schedules;\r\n}", "function bpsPro_schedule_PFWAP_check() {\n$options = get_option('bulletproof_security_options_pfw_autopilot');\n$bpsPFWAPCronCheck = wp_get_schedule('bpsPro_PFWAP_check');\n$killit = '';\n\t\n\tif ( ! get_option('bulletproof_security_options_pfw_autopilot' ) || ! $options['bps_pfw_autopilot_cron'] || $options['bps_pfw_autopilot_cron'] == '' ) {\n\t\treturn $killit;\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron'] == 'On' ) {\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '1' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_30' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled( 'bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_1', 'bpsPro_PFWAP_check');\n\t}\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '5' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_30' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_5', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '10' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_30' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_10', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '15' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_30' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_15', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\t\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '30' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_60' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_30', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\n\tif ( $options['bps_pfw_autopilot_cron_frequency'] == '60' ) {\n\tif ( $bpsPFWAPCronCheck == 'minutes_1' || $bpsPFWAPCronCheck == 'minutes_5' || $bpsPFWAPCronCheck == 'minutes_10' || $bpsPFWAPCronCheck == 'minutes_15' || $bpsPFWAPCronCheck == 'minutes_30' ) {\n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n\t\n\tif ( ! wp_next_scheduled('bpsPro_PFWAP_check' ) ) {\n\t\twp_schedule_event( time(), 'minutes_60', 'bpsPro_PFWAP_check' );\n\t}\n\t}\n\n\t}\n\telseif ( $options['bps_pfw_autopilot_cron'] == 'Off' ) { \n\t\twp_clear_scheduled_hook('bpsPro_PFWAP_check');\n\t}\n}", "public function initialteRedmineCronJob()\r\n { \r\n \r\n //GET All projects \r\n $allProjects = $this->client->api('project')->all(array('limit' => 100,'offset' => 0));\r\n foreach ($allProjects['projects'] as $project)\r\n { \r\n \t$this->addProject($project);\r\n }\r\n //GET All issues \r\n $allIssue=$this->client->api('issue')->all();\r\n if($allIssue['total_count'] >= 0)\r\n {\r\n for ($offset=0; $offset <=$allIssue['total_count'] ; $offset+=$allIssue['limit']) \r\n { \r\n \r\n $issueList=$this->client->api('issue')->all(array(\r\n 'limit' => $allIssue['limit'],\r\n 'offset' =>$offset)); \r\n foreach ($issueList['issues'] as $singleIssue)\r\n {\r\n $this->addIssue($singleIssue);\r\n }\r\n }\r\n }\r\n \r\n \r\n // //Get All Timelog Entries \r\n $allTimeEntry=$this->client->api('time_entry')->all();\r\n if($allTimeEntry['total_count'] >= 0)\r\n {\r\n for ($offset=0; $offset <=$allTimeEntry['total_count'] ; $offset+=$allTimeEntry['limit']) \r\n { \r\n \r\n $timeEntryList=$this->client->api('time_entry')->all(array('limit' => $allTimeEntry['limit'],'offset' =>$offset)); \r\n foreach ($timeEntryList['time_entries'] as $singleTimeLog)\r\n {\r\n $this->addTimeEntry($singleTimeLog);\r\n }\r\n }\r\n }\r\n\r\n \r\n }", "function dcs_dropship_cron_definer($schedules)\r\n{ \r\n\t$schedules['monthly'] = array( \r\n\t\t'interval'=> 2592000, \r\n\t\t'display'=> __('Once Every 30 Days') \r\n\t\t); \r\n\treturn $schedules;\r\n}", "public function addcron() {\r\n $os = php_uname('s');\r\n\r\n $file = APP_PATH . '/index.php?c=cron&a=apply';\r\n\r\n\r\n switch ($os) {\r\n case substr($os, 0, 7) == 'Windows':\r\n exec(\"schtasks /create /sc minute /mo 5 /tn 'update_quota' /tr . $file . /ru 'System'\");\r\n break;\r\n\r\n case substr($os, 0, 5) == 'Linux':\r\n switch ($_SERVER['SERVER_PORT']) {\r\n case 80:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n case 443:\r\n $url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n default:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\r\n }\r\n\r\n $cmdline = '*/5 * * * * /usr/bin/curl' . $url;\r\n\r\n exec('crontab -e <' . $cmdline);\r\n break;\r\n }\r\n }", "function etherpadlite_cron () {\n return true;\n}", "function cron_add_minute( $schedules ) {\r\n $schedules['everyminute'] = array( 'interval' => 60, 'display' => __( 'Once Every Minute' ) ); \r\n return $schedules; \r\n }", "function bigbluebuttonbn_cron () {\n return true;\n}", "function tquiz_cron () {\n return true;\n}", "function emp_cron_schedules($schedules){\n\t$schedules['em_minute'] = array(\n\t\t'interval' => 60,\n\t\t'display' => 'Every Minute'\n\t);\n\treturn $schedules;\n}", "public function cron() {\n include('programming_cron.php');\n }", "function runcron() {\n\t\tglobal $LANG, $TYPO3_CONF_VARS;\n\n\t\t$this->sendPerCycle = trim($TYPO3_CONF_VARS['EXTCONF']['direct_mail']['sendPerCycle']) ? intval($TYPO3_CONF_VARS['EXTCONF']['direct_mail']['sendPerCycle']) : 50;\n\t\t$this->useDeferMode = trim($TYPO3_CONF_VARS['EXTCONF']['direct_mail']['useDeferMode']) ? intval($TYPO3_CONF_VARS['EXTCONF']['direct_mail']['useDeferMode']) : 0;\n\t\t$this->notificationJob = intval($TYPO3_CONF_VARS['EXTCONF']['direct_mail']['notificationJob']);\n\t\tif(!is_object($LANG) ) {\n\t\t\trequire_once (PATH_typo3.'sysext/lang/lang.php');\n\t\t\t$LANG = t3lib_div::makeInstance('language');\n\t\t\t$L = $TYPO3_CONF_VARS['EXTCONF']['direct_mail']['cron_language'] ? $TYPO3_CONF_VARS['EXTCONF']['direct_mail']['cron_language'] : $this->user_dmailerLang;\n\t\t\t$LANG->init(trim($L));\n\t\t\t$LANG->includeLLFile('EXT:direct_mail/locallang/locallang_mod2-6.xml');\n\t\t}\n\n\t\t$pt = t3lib_div::milliseconds();\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\t'sys_dmail',\n\t\t\t'scheduled!=0' . \n\t\t\t' AND scheduled < ' . time() .\n\t\t\t' AND scheduled_end = 0' .\n\t\t\t' AND type NOT IN (2,3)' . \n\t\t\tt3lib_BEfunc::deleteClause('sys_dmail'),\n\t\t\t'',\n\t\t\t'scheduled'\n\t\t);\n\t\tif (TYPO3_DLOG) t3lib_div::devLog($LANG->getLL('dmailer_invoked_at'). ' ' . date('h:i:s d-m-Y'), 'direct_mail');\n\t\t$this->logArray[] = $LANG->getLL('dmailer_invoked_at'). ' ' . date('h:i:s d-m-Y');\n\n\t\tif ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t\t// format headers for SMTP use\n\t\t\tif ($this->useSmtp) {\n\t\t\t\t// create a new mail object to be used to sending the mass email and notification job\n\t\t\t\tif (!is_a($this->mailObject, 'Mail_smtp') || $this->confSMTP['persist'] == 1) {\n\t\t\t\t\t$this->mailObject = NULL;\n\t\t\t\t\t$this->mailObject =& Mail::factory('smtp', $this->confSMTP);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (TYPO3_DLOG) t3lib_div::devLog($LANG->getLL('dmailer_sys_dmail_record') . ' ' . $row['uid']. ', \\'' . $row['subject'] . '\\'' . $LANG->getLL('dmailer_processed'), 'direct_mail');\n\t\t\t$this->logArray[] = $LANG->getLL('dmailer_sys_dmail_record') . ' ' . $row['uid']. ', \\'' . $row['subject'] . '\\'' . $LANG->getLL('dmailer_processed');\n\t\t\t$this->dmailer_prepare($row);\n\t\t\t$query_info=unserialize($row['query_info']);\n\t\t\tif (!$row['scheduled_begin']) {\n\t\t\t\t$this->dmailer_setBeginEnd($row['uid'],'begin');\n\t\t\t}\n\t\t\t$finished = $this->dmailer_masssend_list($query_info,$row['uid']);\n\t\t\tif ($finished) {\n\t\t\t\t$this->dmailer_setBeginEnd($row['uid'],'end');\n\t\t\t}\n\t\t} else {\n\t\t\tif (TYPO3_DLOG) t3lib_div::devLog($LANG->getLL('dmailer_nothing_to_do'), 'direct_mail');\n\t\t\t$this->logArray[] = $LANG->getLL('dmailer_nothing_to_do');\n\t\t}\n\n\t\t//closing DB connection\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($res);\n\t\t\n\t\t$parsetime = t3lib_div::milliseconds()-$pt;\n\t\tif (TYPO3_DLOG) t3lib_div::devLog($LANG->getLL('dmailer_ending'). ' ' . $parsetime . ' ms', 'direct_mail');\n\t\t$this->logArray[] = $LANG->getLL('dmailer_ending'). ' ' . $parsetime . ' ms';\n\t}", "public function getNextCronExecution() {}", "public function runCron(){\n// $q = 'SELECT * FROM `Intermediair`';\n $q = 'SELECT * FROM `Intermediair` WHERE userid = 11529';\n $res = $this->cmsmanager->customSelectQuery($q)[0];\n $this->generateEmail($res);\n \n// if(count($res) > 0){\n// foreach($res as $intermediair){\n// $this->generateEmail($intermediair);\n// }\n// }\n }", "function filter_cron_schedules($schedules) {\n $schedules['once_half_hour'] = array(\n 'interval' => 1800, // seconds\n 'display' => __('Once Half an Hour')\n );\n $schedules['half_part_time'] = array(\n 'interval' => 900, // seconds\n 'display' => __('Half Part Time')\n );\n\n return $schedules;\n}", "function install_cron(){\n wp_schedule_event(\n time(),\n 'cuentadigital_interval',\n 'cuentadigital_cron_hook'\n );\n }", "function virtualcron($minDelay = false, $controlFile = false) {\r\n if ($minDelay)\r\n $this->minDelay = $minDelay;\r\n if ($controlFile)\r\n $this->controlFile = $controlFile;\r\n $this->lastExec = 0; // it will contain the UNIXTIME of the last action\r\n $this->nextExec = 0; // it will contain the UNIXTIME of the next action\r\n $this->secToExec = 0; // it will contain the time in seconds until of the next action\r\n if (file_exists($this->controlFile))\r\n $this->check = true;\r\n else {\r\n $handle = fopen($this->controlFile, \"w\");\r\n if (!$handle)\r\n $this->check = false;\r\n else {\r\n if (!fwrite($handle, time()))\r\n $this->check = false;\r\n else {\r\n fclose($handle);\r\n $this->check = true;\r\n }\r\n }\r\n }\r\n }", "public function run()\n\t{\n\t\t\\DB::table('cronograma')->delete();\n \n\t\t\\DB::table('cronograma')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => 4,\n\t\t\t\t'nome' => 'BLUEFOOT | SITE | PADRÃO INSTITUCIONAL',\n\t\t\t\t'created_at' => '2016-04-26 15:02:29',\n\t\t\t\t'updated_at' => '2016-04-26 15:02:58',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => 5,\n\t\t\t\t'nome' => 'BLUEFOOT | SITE | MOBILE FIRST',\n\t\t\t\t'created_at' => '2016-04-26 15:29:17',\n\t\t\t\t'updated_at' => '2016-04-26 15:29:17',\n\t\t\t),\n\t\t\t2 => \n\t\t\tarray (\n\t\t\t\t'id' => 6,\n\t\t\t\t'nome' => 'BLUEFOOT | SITE | REDESIGN',\n\t\t\t\t'created_at' => '2016-04-26 19:02:12',\n\t\t\t\t'updated_at' => '2016-04-26 19:02:12',\n\t\t\t),\n\t\t\t3 => \n\t\t\tarray (\n\t\t\t\t'id' => 7,\n\t\t\t\t'nome' => 'PN | Pesquisa de Mercado',\n\t\t\t\t'created_at' => '2016-04-27 18:14:01',\n\t\t\t\t'updated_at' => '2016-04-27 18:14:01',\n\t\t\t),\n\t\t\t4 => \n\t\t\tarray (\n\t\t\t\t'id' => 8,\n\t\t\t\t'nome' => 'PN | Análise Financeira',\n\t\t\t\t'created_at' => '2016-04-27 18:46:35',\n\t\t\t\t'updated_at' => '2016-04-27 18:46:35',\n\t\t\t),\n\t\t));\n\t}", "function cron_add_10_minutes($schedules) {\n\t\t\t$schedules['10minutes'] = array(\n\t\t\t\t'interval' => 600,\n\t\t\t\t'display' => __( 'Once 10 Minutes' )\n\t\t\t);\n\t\t\treturn $schedules;\n\t\t }", "public function startCron()\n {\n // mysql call\n $resultToNum = $this->getFailedDndNumbers();\n if(empty($resultToNum)){\n echo \"empty to number from db\\n\";\n return;\n }\n echo \"to number from mysql\\n\".print_r($resultToNum,true);\n $file = fopen(\"to_numbers.csv\",\"a\");\n $resultToNum = json_decode(json_encode($resultToNum), true);\n $temp = array();\n foreach ($resultToNum as $key => $value) {\n foreach ($value as $key => $to) {\n fwrite($file,substr($to,-10).\"\\n\");\n $temp[] = $to;\n break;\n }\n break;\n }\n fclose($file);\n $resultToNum = $temp;\n // redis call\n $redisNum = $this->connectToRedis();\n foreach ($resultToNum as $index => $number) {\n $this->addNumberToJfk($redisNum,$number,0);\n }\n }", "function roshine_cron () {\n return true;\n}", "public function cron(){\n\t\t$schedule_list = $this->db->select('analytics.*, account.username, account.password, account.proxy, account.default_proxy, account.id as account_id')\n\t\t->from($this->tb_analytics.\" as analytics\")\n\t\t->join($this->tb_accounts.\" as account\", \"analytics.account = account.id\")\n\t\t->where(\"account.status = 1 AND analytics.next_action <= '\".NOW.\"'\")->limit(10,0)->get()->result();\n\t\t\n\t\tif(!empty($schedule_list)){\n\t\t\tforeach ($schedule_list as $key => $schedule) {\n\t\t\t\tif(!permission(\"instagram/post\", $schedule->uid)){\n\t\t\t\t\t$this->db->delete($this->tb_posts, array(\"uid\" => $schedule->uid, \"time_post >=\" => NOW));\n\t\t\t\t}\n\n\t\t\t\t$proxy_data = get_proxy($this->tb_accounts, $schedule->proxy, $schedule);\n\t\t\t\ttry {\n\t\t\t\t\t$ig = new InstagramAPI($schedule->username, $schedule->password, $proxy_data->use);\n\t\t\t\t\t$result = $ig->analytics->process();\n\t\t\t\t\t\n\t\t\t\t\t$user_timezone = get_timezone_user(NOW, false, $schedule->uid);\n\t\t\t\t\t$user_day = date(\"Y-m-d\", strtotime($user_timezone));\n\n\t\t\t\t\t$check_stats_exist = $this->model->get(\"id\", $this->tb_analytics_stats, \" account = '\".$schedule->account_id.\"' AND uid = '\".$schedule->uid.\"' AND date = '\".$user_day.\"'\");\n\t\t\t\t\tif(empty($check_stats_exist)){\n\n\t\t\t\t\t\t//Save data\n\t\t\t\t\t\t$user_data = array(\n\t\t\t\t\t\t\t\"media_count\" => $result->userinfo->media_count,\n\t\t\t\t\t\t\t\"follower_count\" => $result->userinfo->follower_count,\n\t\t\t\t\t\t\t\"following_count\" => $result->userinfo->following_count,\n\t\t\t\t\t\t\t\"engagement\" => $result->engagement\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\"ids\" => ids(),\n\t\t\t\t\t\t\t\"uid\" => $schedule->uid,\n\t\t\t\t\t\t\t\"account\" => $schedule->account_id,\n\t\t\t\t\t\t\t\"data\" => json_encode($user_data),\n\t\t\t\t\t\t\t\"date\" => date(\"Y-m-d\", strtotime($user_timezone))\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$this->db->insert($this->tb_analytics_stats, $data);\n\n\t\t\t\t\t\t$save_info = array(\n\t\t\t\t\t\t\t\"engagement\" => $result->engagement,\n\t\t\t\t\t\t\t\"average_likes\" => $result->average_likes,\n\t\t\t\t\t\t\t\"average_comments\" => $result->average_comments,\n\t\t\t\t\t\t\t\"top_hashtags\" => $result->top_hashtags,\n\t\t\t\t\t\t\t\"top_mentions\" => $result->top_mentions,\n\t\t\t\t\t\t\t\"feeds\" => $result->feeds,\n\t\t\t\t\t\t\t\"userinfo\" => $result->userinfo,\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Next Action\n\t\t\t\t\t\t$now = date('Y-m-d 00:00:00', strtotime($user_timezone));\n\t\t\t\t\t\t$next_day = date('Y-m-d 00:00:00', strtotime($now) + 86400);\n\t\t\t\t\t\t$data_next_action = array(\n\t\t\t\t\t\t\t\"data\" => json_encode($save_info),\n\t\t\t\t\t\t\t\"next_action\" => get_timezone_system($next_day, false, $schedule->uid)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->db->update($this->tb_analytics, $data_next_action, \"account = '\".$schedule->account_id.\"'\");\n\t\t\t\t\t}\n\n\t\t\t\t\techo lang(\"successfully\");\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\techo $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\techo lang(\"no_activity\");\n\t\t}\n\t}", "function execute_transact($transact_id = 0)\r\n{\r\n\tglobal $db, $config, $cron_config, $systime;\r\n\t$sql = \"select * from \".CRON.\" where \".($transact_id>0 ? \"id='$transact_id'\" : \" active=1 and\tnexttransact<='$systime'\").\" order by nexttransact limit 1\";\r\n\t$db->query($sql);\r\n\t$cron_transact = $db->fetchRow();\r\n\tif($cron_transact['script'])\r\n\t{\r\n\t\t$locked = $config[\"webroot\"].\"/cache/cron_sign_\".$cron_transact['id'].\".lock\";\r\n\t\tif(is_writable($locked) && filemtime($locked) > $systime-600)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttouch($locked);\r\n\t\t}\r\n\t\t$script = $config[\"webroot\"].\"/includes/crons/\".$cron_transact['script'];\r\n\t\t@set_time_limit(0);\r\n\t\tignore_user_abort(TRUE);\r\n\t\tif(file_exists($script))\r\n\t\t{\r\n\t\t\tinclude($script);\r\n\t\t\tupdate_transact($cron_transact);\r\n\t\t}\r\n\t\tunlink($locked);\r\n\t}\r\n\r\n\t$sql = \"select nexttransact from \".CRON.\" where active=1 order by nexttransact limit 1\";\r\n\t$db->query($sql);\r\n\t$re = $db->fetchRow();\r\n\tif($re['nexttransact'])\r\n\t{\r\n\t\t$cron['nexttransact'] = $re['nexttransact'];\r\n\t\t$write_config_con_str = serialize($cron);\r\n\t\t$write_config_con_str = '<?php $cron_config = unserialize(\\''.$write_config_con_str.'\\');?>';\r\n\t\t$fp = fopen($config[\"webroot\"].'/config/cron_config.php','w');\r\n\t\tfwrite($fp,$write_config_con_str,strlen($write_config_con_str));\r\n\t\tfclose($fp);\r\n\t\t$cron_config[\"nexttransact\"] = $re['nexttransact'];\r\n\t}\r\n}", "function contactmod_cron () {\n return true;\n}", "static function doCron() {\n\t\t$lc = new DateTime(Preferences::value(\"lastCron\"));\n\t\t$now = new DateTime();\n\t\t\n\t\t$diff = $now->diff($lc, true);\n\t\tif($diff->i >= 1) return true;\n\t\treturn false;\n\t}", "function add_cron_interval( $schedules ) {\n\t$schedules['ten_seconds'] = array(\n\t\t'interval' => 60,\n\t\t'display' => esc_html__( 'Every Ten Seconds' ),\n\t);\n\n\treturn $schedules;\n}", "public function cron()\n {\n wp_schedule_event(time(), 'hourly', array($this, 'generate'));\n }", "function questionnaire_cron () {\n global $CFG;\n require_once($CFG->dirroot . '/mod/questionnaire/locallib.php');\n\n return questionnaire_cleanup();\n}", "function simulateCron() {\n\t\tglobal $publishthis;\n\n\t\t// Return here is we want to pause polling.\n\t\tif ( $publishthis->get_option ( 'pause_polling' ) ) {\n\t\t\tif ( ! get_option ( 'publishthis_paused_on' ) ) {\n\t\t\t\tupdate_option ( 'publishthis_paused_on', time() );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tignore_user_abort( true );\n\n\t\t//modifying the logic here a bit and going with options, instead of\n\t\t//transients, because those were sometimes disappearing from\n\t\t//the wp cache. don't want to disrupt the clients site\n\n\t\t//basic algorithm\n\t\t/*\n 1 - see if we are doing the cron all ready, if so, don't do anything\n 2 - if not doing cron, get the last timestamp of when we did this cron\n -- we only want to check every XX minutes\n 3 - if no time is set yet, we do the check\n 4 - if the time is set, and we have not yet passed our XX minutes, we do not do anything\n 5 - if we are doing the check, update that we are doing the cron\n 6 - do the cron action\n 7 - once completed, set\n - the timestamp we completed at, for future checks\n - remove the doing cron value\n */\n\t\t$doingSimulatedCron = get_option ( 'pt_simulated_cron' );\n\n\t\t//create lock flag if not exists and set it to 0 (false)\n\t\tif ( false === $doingSimulatedCron ) {\n\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t}\n\t\t$doingSimulatedCron = intval($doingSimulatedCron);\n\t\t//cron is not running\n\t\tif ( 0 === $doingSimulatedCron ) {\n\t\t\t//check the time\n\t\t\t$secondsExpiration = 60 * 2; //roughly 2 minutes. should be based on publishing action set poll times, but that would be too much to query;\n\n\t\t\t$timestamp = get_option ( 'pt_simulated_cron_ts' );\n\n\t\t\t$currentTimestamp = ( time() ) * 1000;\n\n\t\t\tif ( !$timestamp ) {\n\t\t\t\t//this has never been set before, so, we can just assume we need to do the cron\n\t\t\t\t$timestamp = $currentTimestamp;\n\t\t\t\t\n\t\t\t\t//set the timestamp the first time\n\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $timestamp );\n\t\t\t}\n\t\t\t//see if we need to do the cron\n\t\t\t$diffTimestamp = $currentTimestamp - $timestamp;\n\t\t\t\n\t\t\t$diffTimeSeconds = ( $diffTimestamp / 1000 );\n\t\n\t\t\tif ( $diffTimeSeconds >= $secondsExpiration ) {\n\t\t\t\t//ok, we need to do the cron action\n\t\t\t\tupdate_option( \"pt_simulated_cron\", 1 );\n\n\t\t\t\ttry {\n\t\t\t\t\t//if we are here, that means we need to do the cron action\n\t\t\t\t\t//get only active Publishing Actions\n\t\t\t\t\t$actions = $publishthis->publish->get_publishing_actions();\n\n\t\t\t\t\t$publishthis->log->addWithLevel ( array(\n\t\t\t\t\t\t\t'message' => 'Checking on simulated cron events',\n\t\t\t\t\t\t\t'status' => 'info',\n\t\t\t\t\t\t\t'details' => \"Found \" . count( $actions ) . \" publishing events to check\" ), \"2\" );\n\t\t\t\t\t\n\t\t\t\t\t// do import\n\t\t\t\t\t$publishthis->publish->run_import();\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t//set simulate cron options on failure\n\t\t\t\t\t//leaving duplicated lines, because php4 doesn't have finally block\n\t\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $currentTimestamp );\n\t\t\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//now that we are done, set the old timestamp\n\t\t\t\tupdate_option( \"pt_simulated_cron_ts\", $currentTimestamp );\n\t\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t\t}\t\n\t\t}\t\t\n\t}", "function cron()\n\t{\n\t\tglobal $wpdb,\n\t\t\t\t\t $wgobd_importer_helper,\n\t\t\t\t\t $wgobd_events_helper,\n\t\t\t\t\t $wgobd_settings_controller;\n\n\t\t// ====================\n\t\t// = Select all feeds =\n\t\t// ====================\n\t\t$table_name = $wpdb->prefix . 'wgobd_event_feeds';\n\t\t$sql = \"SELECT * FROM {$table_name}\";\n\t\t$feeds = $wpdb->get_results( $sql );\n\n\t\t// ===============================\n\t\t// = go over each iCalendar feed =\n\t\t// ===============================\n\t\tforeach( $feeds as $feed ) {\n\t\t // flush the feed\n\t\t $wgobd_settings_controller->flush_ics_feed( false, $feed->feed_url );\n\t\t // import the feed\n\t\t\t$wgobd_importer_helper->parse_ics_feed( $feed );\n\t\t}\n\t}", "static function schedule_cron() {\n\t\t$is_multisite = is_multisite();\n\t\tif ( $is_multisite ) {\n\t\t\t$primary_blog = get_current_site();\n\t\t\t$current_blog = get_current_blog_id();\n\t\t} else {\n\t\t\t$primary_blog = 1;\n\t\t\t$current_blog = 1;\n\t\t}\n\n\t\t/**\n\t\t * If we're on a multisite, only schedule the cron if we're on the primary blog\n\t\t */\n\t\tif (\n\t\t( ! $is_multisite || ( $is_multisite && $primary_blog->id === $current_blog ) )\n\t\t) {\n\t\t\t$cronsScheduled = false;\n\t\t\tif( ! wp_next_scheduled( 'wp_rest_cache_cron' ) ) {\n\t\t\t\twp_schedule_event( time(), '5_minutes', 'wp_rest_cache_cron' );\n\t\t\t\t$cronsScheduled = true;\n\t\t\t}\n\t\t\tif( ! wp_next_scheduled( 'wp_rest_cache_expired_cron' ) ) {\n\t\t\t\twp_schedule_event( time(), 'hourly', 'wp_rest_cache_expired_cron' );\n\t\t\t\t$cronsScheduled = true;\n\t\t\t}\n\t\t\tif( $cronsScheduled ) {\n\t\t\t\tdo_action( 'wrc_after_schedule_cron', $primary_blog, $current_blog );\n\t\t\t}\n\t\t}\n\t}", "public function wp_cron_scheduled_check()\n {\n }", "function cron_data() {\n return false;\n }", "function econsole_cron () {\r\n global $CFG;\r\n\r\n return true;\r\n}", "function add_custom_cron() {\n\tif ( ! wp_next_scheduled( 'custom_cron_action' ) ) {\n\t\twp_schedule_event( current_time( 'timestamp' ), 'hourly', 'custom_cron_action' );\n\t}\n}", "function dllc_cron () {\n return true;\n}", "public function schedule_cron() {\n\t\twp_schedule_event( time(), 'daily', 'download_iracing_members_files' );\n\t\twp_schedule_event( time(), 'daily', 'convert_iracing_members_file_to_json' );\n\t}", "function _get_cron_array()\n {\n }", "function randomstrayquotes_cron () {\n return true;\n}", "public function actionCronHourly()\n {\n switch (date('H')) {\n default: echo \"Nothing to run\\n\";\n }\n echo \"Done!\\n\";\n }", "public function run()\n {\n $this->poblaMesAleatoriamente(Carbon::now()->format('Y-m-d'), 10);\n }", "function createCrontab()\n\t{\n\t\t$crontabFilePath = '/tmp/crontab.txt';\n\t\t$file = fopen($crontabFilePath, \"w\") or die(\"Unable to open file!\");\n\t\tglobal $mongo,$python_script_path;\n\t\t$db = $mongo->logsearch;\n\t\t$collection = $db->service_config;\n\t\t$cursor = $collection->find();\n\t\tforeach ($cursor as $doc) {\n\t\t\tif( $doc['state'] == 'Running' && $doc['path'] != '' && $doc['crontab'] != ''){\n\t\t\t\t$txt = '# Index, service:\"'.$doc['service'].'\" system:\"'.$doc['system']\n\t\t\t\t\t\t.'\" node:\"'.$doc['node'].'\" process:\"'.$doc['process'].'\" path:\"'.$doc['path'].'\"'.PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t\t$txt = $doc['crontab'].' sudo -u logsearch python '\n\t\t\t\t\t\t\t.$python_script_path.'indexScript.py index '.$doc['_id'].PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t}\n\t\t}\n\t\t//purge data here\n\t\t$keepDataMonth = 3;\n\t\t$txt = '# Purge data at 04:00 everyday, keep data '.$keepDataMonth.' months'.PHP_EOL;\n\t\tfwrite($file, $txt);\n\t\t$txt = '0 4 * * *'.' sudo -u logsearch python '.$python_script_path.'purgeData.py '.$keepDataMonth.' '.PHP_EOL;\n\t\tfwrite($file, $txt); \n\t\tfclose($file);\n\t\t$cmd = \"sudo -u logsearch crontab \".$crontabFilePath;\n\t\texec($cmd);\n\t}", "function annotation_cron () {\n return true;\n}", "public function getCronFrequency(): string;", "private function _updateCronStats()\n\t{\n\t $this->load->model('tasks');\n\t $this->tasks->updateCronStats();\n\t}", "public function cron() {\n settings()->cron = json_decode(db()->where('`key`', 'cron')->getValue('settings', '`value`'));\n\n $this->process();\n }", "function ciniki_cron_calcNextExec($ciniki, $h, $m, $dom, $mon, $dow) {\n\n //\n // FIXME: This needs some serious work, right now it only accepts a hour and minute\n // for every day of the month\n //\n $cur_ts = date_create(NULL, timezone_open('UTC'));\n $next_exec_ts = $cur_ts;\n if( $h >= 0 && $m >= 0 && $dom == '*' && $mon == '*' && $dow == '*' ) {\n date_time_set($next_exec_ts, $h, $m);\n if( $next_exec_ts <= $cur_ts ) {\n date_modify($next_exec_ts, '+1 day');\n }\n }\n\n return array('stat'=>'ok', 'next'=>array('utc'=>date_format($next_exec_ts, 'Y-m-d H:i:s')));\n}", "public function masterRedmineCronJob()\r\n {\r\n //GET All trackers \r\n $allTracker = $this->client->api('tracker')->all(array('limit'=>1000));\r\n foreach ($allTracker['trackers'] as $key=>$tracker)\r\n {\t\r\n $this->addTracker($tracker);\r\n }\r\n //GET All user roles \r\n $allRole = $this->client->api('role')->all(array('limit' => 1000)); \r\n foreach ($allRole['roles'] as $key=>$role)\r\n {\r\n $this->addUserRole($role);\r\n }\r\n //GET All issue status \r\n $allStatus = $this->client->api('issue_status')->all(array('limit' => 1000));\r\n foreach($allStatus['issue_statuses'] as $key=>$status)\r\n {\r\n $this->addStatus($status);\r\n }\r\n }", "public function run()\n {\n DB::table('gio')->insert([\n\t ['giobatdau'=>'07:15:00'],\n\t ['giobatdau'=>'08:00:00'],\n\t ['giobatdau'=>'08:45:00'],\n\t ['giobatdau'=>'09:30:00'],\n\t ['giobatdau'=>'10:15:00'],\n\t ['giobatdau'=>'13:15:00'],\n\t ['giobatdau'=>'14:00:00'],\n\t ['giobatdau'=>'14:45:00'],\n\t ['giobatdau'=>'15:30:00'],\n\t ['giobatdau'=>'16:15:00']\n ]);\n }", "public function cronRun() {\n @ignore_user_abort(TRUE);\n\n // Try to allocate enough time to run all the hook_cron implementations.\n drupal_set_time_limit(240);\n return $this->processQueues();\n }", "public function cron($key) {\n\t\t// Todo a task \n\t}", "public function cron($key) {\n\t\t// Todo a task \n\t}", "function do_cron() {\n global $config;\n ct_log(\"Cron-Job started.\", 2, -1, 'cron');\n \n $btns = churchcore_getModulesSorted(false, false);\n foreach ($btns as $key) {\n include_once (constant(strtoupper($key)) . \"/$key.php\");\n if (function_exists($key . \"_cron\") && getConf($key . \"_name\")) {\n $arr = call_user_func($key . \"_cron\");\n }\n }\n ct_sendPendingNotifications();\n ct_log(\"Cron-Job finished.\", 2, -1, 'cron');\n}", "static function jobs() {\n\t\tif(self::doCron()):\n\t\t\n\t\twhile(!Db::lock());\n\n\t\tReminder::cron();\n\t\t\n\t\t$ctrl = new Cronjob();\n\t\t$ctrl->checkBookings();\n\t\t$ctrl->cancelPending();\n\t\t$ctrl->unattended();\n\t\t\n\t\twhile(!Db::unlock());\n\t\t\n\t\tPreferences::set('lastCron', date(\"H:i:s\"));\n\t\t_debug(\"CRON JOBS DONE!\");\n\t\tendif;\n\t}", "public function addCron() { // cron parameters passed via JSON query string\n\t\t$cron = json_decode(Flight::request()->query['cron'],true);\n\t\t$t = explode(\":\",$cron['t']); //time\n\t\t$i= 0;\n\t\t$str='';\n\t\tforeach ($cron['d'] as $d) { //compose day of Week\n\t\t\tif ($d) $str .= $i.',';\n\t\t\t$i++;\n\t\t};\n\t\t$str = rtrim($str,',');\n\t\t$cronLine = $t[1].' '.$t[0].' * * '.$str.' /usr/bin/curl localhost/radion >/dev/null 2>&1 #'.$cron['c'].PHP_EOL;\n\t\tfile_put_contents(Flight::get(\"pathCron\"), $cronLine, FILE_APPEND | LOCK_EX);\n\t\texec(\"cat \".Flight::get(\"pathCron\").\" | crontab -\");\n\t\tFlight::json(array('Status' => 'OK','Cron' => $t[1].' '.$t[0].' * * '.$str.' #'.$cron['c']));\n\t}", "protected function schedule(Schedule $schedule)\n {\n //每天五点钟执行\n $cron = new ACXCronController();\n $schedule->call(function ()use($cron){\n try{\n $cron->bak_block_opt_data();;\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage(),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($data));\n }\n })->dailyAt('5:01');\n\n //每一个小时执行一次\n $schedule->call(function ()use($cron){\n try{\n $cron->update_withdraw_change_from_24hour();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($data));\n }\n })->hourly();\n\n\n //--每分钟执行一次图表\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $croncontroller->oneMinute();\n $minute = date(\"i\",time());\n //--执行分钟任务\n $croncontroller->oneMinute();\n if($minute%5==0)$croncontroller->fiveMinute();\n if($minute%15==0)$croncontroller->fifteen();\n if($minute%30==0) $croncontroller->halfHour();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->everyMinute();\n\n //--每小时\n //--每分钟执行一次图表\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $hour =date(\"H\",time());\n //--执行小时任务\n $croncontroller->oneHour();\n if($hour%2==0)$croncontroller->twoHour();\n if($hour%6==0)$croncontroller->sixHour();\n if($hour%12==0)$croncontroller->twelveHour();\n if($hour==0)$croncontroller->oneDay();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->hourly();\n\n\n $schedule->call(function (){\n try{\n $croncontroller = new CronController();\n $croncontroller->week();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n }) ->weekly();\n\n\n //充值确认定时任务 15分钟一次\n $schedule->call(function (){\n try{\n $acxCron = new ACXCronController();\n $acxCron->getReceiveHistory();\n }catch (\\Exception $exception){\n $data = ['email'=>'[email protected]','newEmail'=>$exception->getMessage().'###update_withdraw_change_from_24hour','url'=>now()];\n Mail::to('[email protected]')->bcc('[email protected]')->send(new ChangeEmail($data));\n }\n })->everyFiveMinutes();\n\n //每月执行当\n $withdrawal = new WithdrawalControl();\n $schedule->call(function ()use($withdrawal){\n $resOne = $withdrawal->upgrade();\n $dataOne = ['email'=>'[email protected]','newEmail'=>'upgrade'.json_encode($resOne),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataOne));\n })->monthly();\n\n //自定义规则提现额度 每是分钟\n $schedule->call(function ()use($withdrawal){\n //开始\n $resOne = $withdrawal->customizeRunStart();\n if (!$resOne[0]){\n $dataOne = ['email'=>'[email protected]','newEmail'=>'customizeRunStart'.json_encode($resOne),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataOne));\n }\n //结束\n $resTwo = $withdrawal->customizeRunEnd();\n if (!$resTwo[0]){\n $dataTwo = ['email'=>'[email protected]','newEmail'=>'customizeRunEnd'.json_encode($resTwo),'url'=>now()];\n Mail::to('[email protected]')->send(new ChangeEmail($dataTwo));\n }\n })->daily();\n\n\n //增加每分钟判断是不是有低价订单\n $schedule->call(function(){\n #CronController::getSendHistory('BTC');\n $check_order_controller=new CheckOrderController();\n $result=$check_order_controller->check_order_list_dingshi(\"admin\",\"fZGGz4BmSNbHzYr1cEYgfMEl0UOs59cn\");\n $data = ['email'=>'[email protected]','newEmail'=>$result,'url'=>now()];\n # Mail::to('[email protected]')->send(new ChangeEmail($data));\n })->everyMinute();\n\n \n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BTC');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('LTC');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BCH');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('RPZ');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('XVG');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('BTG');\n })->everyFiveMinutes();\n $schedule->call(function() {\n CronController::getWithdrawConfirmations1('DASH');\n })->everyFiveMinutes();\n\n //后台-----------------------\n $schedule->call(function() {\n BackController::getCurrencyInfoRun();\n })->everyTenMinutes();\n }", "public function calcularSueldo(){\n $this->horas_trabajadas * 540;\n }", "public function run()\n {\n # 勤務時間パターン\n $pattern = [\n 'a'=>[\n 'in'=>8*60*60,\n 'out'=>17*60*60\n ,\n 'breaks'=>[\n ['in'=>11*60*60, 'out'=>11*60*60 + 30*60, 'total_time'=> 30*60, ],\n ['in'=>13*60*60, 'out'=>13*60*60 + 30*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 9*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 8*60*60,\n ],\n 'b'=>[\n 'in'=>10*60*60,\n 'out'=>17*60*60\n ,\n 'breaks'=>[\n ['in'=>11*60*60 + 30*60, 'out'=>12*60*60,'total_time'=> 30*60, ],\n ['in'=>13*60*60 + 30*60,'out'=>14*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 7*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 6*60*60,\n\n ],\n 'c'=>[\n 'in'=>17*60*60\n ,\n 'out'=>22*60*60,\n 'breaks'=>[\n ['in'=>20*60*60,'out'=>20*60*60 + 30*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 5*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 4*60*60 + 30*60,\n\n ],\n 'd'=>[\n 'in'=>18*60*60,\n 'out'=>24*60*60,\n 'breaks'=>[\n ['in'=>20*60*60 + 30*60,'out'=>21*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 6*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 5*60*60 + 30*60,\n\n ],\n 'e'=>[\n 'in'=>22*60*60,\n 'out'=>24*60*60,\n 'breaks'=>[\n ['in'=>23*60*60 + 30*60,'out'=>24*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 2*60*60,\n 'BreakTime' => 30*60,\n 'WorkingTime' => 1*60*60 + 30*60,\n\n ],\n 'f'=>[\n 'in'=>0*60*60,\n 'out'=>8*60*60,\n 'breaks'=>[\n ['in'=>4*60*60,'out'=>5*60*60, 'total_time'=> 30*60, ],\n ],\n 'RestrainTime' => 8*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 7*60*60,\n\n ],\n 'g'=>[\n 'in'=>18*60*60,\n 'out'=>22*60*60,\n 'breaks'=>[],\n 'RestrainTime' => 9*60*60,\n 'BreakTime' => 1*60*60,\n 'WorkingTime' => 8*60*60,\n\n ],\n ];\n\n # 契約出勤日\n $ContractWorkingDays = [\n 1 =>[\n 1 =>[$pattern['a']],\n 2 =>[$pattern['a']],\n 3 =>[$pattern['a']],\n 4 =>[$pattern['a']],\n 5 =>[$pattern['a']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 2 =>[\n 1 =>[$pattern['b']],\n 2 =>[$pattern['b']],\n 3 =>[$pattern['b']],\n 4 =>[$pattern['b']],\n 5 =>[$pattern['b']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 3 =>[\n 1 =>[$pattern['c']],\n 2 =>[$pattern['c']],\n 3 =>[$pattern['c']],\n 4 =>[$pattern['c']],\n 5 =>[$pattern['c']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 4 =>[\n 1 =>[$pattern['d']],\n 2 =>[$pattern['d']],\n 3 =>[$pattern['d']],\n 4 =>[$pattern['d']],\n 5 =>[$pattern['g']],\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n 5 =>[\n 1 =>[$pattern['e']],\n 2 =>[$pattern['f'], $pattern['e']],\n 3 =>[$pattern['f'], $pattern['e']],\n 4 =>[$pattern['f'], $pattern['e']],\n 5 =>NULL,\n 6 =>NULL,\n 0 =>NULL,\n 7 =>NULL,\n ],\n\n ];\n\n #出勤記録の保存\n $work_id = 1;\n\n // $nヶ月間の出勤記録\n for ($n=3; $n >= 0; $n--)\n {\n $dateOb = new DateItems;\n $item = $dateOb->getBeforMonth(1,$n); //nヶ月後の情報を取得(d,n)\n\n // 1日~月末\n for ($d=1; $d <= $item['last_d']; $d++)\n {\n $day = $dateOb->getThisMonth($d,$item['m'],$item['Y']);\n\n //従業員ID\n for ($e=1; $e <= 5; $e++)\n {\n $works = $ContractWorkingDays[$e][$day['w']];\n // 一人が一日複数回出勤する記録の出力\n if(!empty( $works )){\n foreach ($works as $work)\n {\n\n if(!empty( $work['breaks'] )){\n foreach ($work['breaks'] as $break)\n {\n $work_break = new WorkBreak([\n 'work_id' => $work_id,\n 'in'=> $break['in'],\n 'out' => $break['out'],\n 'total_time' => $break['total_time'],\n ]);\n $work_break->save();\n }\n }\n\n $work_id ++;\n }\n }\n }\n }\n\n\n }\n\n }", "function schedule_backup_cron() {\n\n global $CFG;\n \n $status = true;\n\n $emailpending = false;\n\n //Check for required functions...\n if(!function_exists('utf8_encode')) {\n mtrace(\" ERROR: You need to add XML support to your PHP installation!\");\n return true;\n }\n\n //Get now\n $now = time();\n\n //First of all, we have to see if the scheduled is active and detect\n //that there isn't another cron running\n mtrace(\" Checking backup status\",'...');\n $backup_config = backup_get_config();\n if(!isset($backup_config->backup_sche_active) || !$backup_config->backup_sche_active) {\n mtrace(\"INACTIVE\");\n return true;\n } else if (isset($backup_config->backup_sche_running) && $backup_config->backup_sche_running) {\n mtrace(\"RUNNING\");\n //Now check if it's a really running task or something very old looking \n //for info in backup_logs to unlock status as necessary\n $timetosee = 1800; //Half an hour looking for activity\n $timeafter = time() - $timetosee;\n $numofrec = count_records_select (\"backup_log\",\"time > $timeafter\");\n if (!$numofrec) {\n $timetoseemin = $timetosee/60;\n mtrace(\" No activity in last \".$timetoseemin.\" minutes. Unlocking status\");\n } else {\n mtrace(\" Scheduled backup seems to be running. Execution delayed\");\n return true;\n }\n } else {\n mtrace(\"OK\");\n //Mark backup_sche_running\n backup_set_config(\"backup_sche_running\",\"1\");\n }\n\n //Now we get the main admin user (we'll use his timezone, mail...)\n mtrace(\" Getting admin info\");\n $admin = get_admin();\n if (!$admin) {\n $status = false;\n }\n\n //Delete old_entries from backup tables\n if ($status) {\n mtrace(\" Deleting old data\");\n $status = backup_delete_old_data();\n }\n\n //Now we get a list of courses in the server\n if ($status) {\n mtrace(\" Checking courses\");\n //First of all, we delete everything from backup tables related to deleted courses\n mtrace(\" Skipping deleted courses\");\n $skipped = 0;\n if ($bckcourses = get_records('backup_courses')) {\n foreach($bckcourses as $bckcourse) {\n //Search if it exists\n if (!$exists = get_record('course', 'id', \"$bckcourse->courseid\")) {\n //Doesn't exist, so delete from backup tables\n delete_records('backup_courses', 'courseid', \"$bckcourse->courseid\");\n delete_records('backup_log', 'courseid', \"$bckcourse->courseid\");\n $skipped++;\n }\n }\n }\n mtrace(\" $skipped courses\");\n //Now process existing courses\n $courses = get_records(\"course\");\n //For each course, we check (insert, update) the backup_course table\n //with needed data\n foreach ($courses as $course) {\n if ($status) {\n mtrace(\" $course->fullname\");\n //We check if the course exists in backup_course\n $backup_course = get_record(\"backup_courses\",\"courseid\",$course->id);\n //If it doesn't exist, create\n if (!$backup_course) {\n $temp_backup_course->courseid = $course->id;\n $newid = insert_record(\"backup_courses\",$temp_backup_course);\n //And get it from db\n $backup_course = get_record(\"backup_courses\",\"id\",$newid);\n }\n //If it doesn't exist now, error\n if (!$backup_course) {\n mtrace(\" ERROR (in backup_courses detection)\");\n $status = false;\n continue;\n }\n // Skip backup of unavailable courses that have remained unmodified in a month\n $skipped = false;\n if (!$course->visible && ($now - $course->timemodified) > 31*24*60*60) { //Hidden + unmodified last month\n mtrace(\" SKIPPING - hidden+unmodified\");\n set_field(\"backup_courses\",\"laststatus\",\"3\",\"courseid\",$backup_course->courseid);\n $skipped = true;\n } \n //Now we backup every non skipped course with nextstarttime < now\n if (!$skipped && $backup_course->nextstarttime > 0 && $backup_course->nextstarttime < $now) {\n //We have to send a email because we have included at least one backup\n $emailpending = true;\n //Only make the backup if laststatus isn't 2-UNFINISHED (uncontrolled error)\n if ($backup_course->laststatus != 2) {\n //Set laststarttime\n $starttime = time();\n set_field(\"backup_courses\",\"laststarttime\",$starttime,\"courseid\",$backup_course->courseid);\n //Set course status to unfinished, the process will reset it\n set_field(\"backup_courses\",\"laststatus\",\"2\",\"courseid\",$backup_course->courseid);\n //Launch backup\n $course_status = schedule_backup_launch_backup($course,$starttime);\n //Set lastendtime\n set_field(\"backup_courses\",\"lastendtime\",time(),\"courseid\",$backup_course->courseid);\n //Set laststatus\n if ($course_status) {\n set_field(\"backup_courses\",\"laststatus\",\"1\",\"courseid\",$backup_course->courseid);\n } else {\n set_field(\"backup_courses\",\"laststatus\",\"0\",\"courseid\",$backup_course->courseid);\n }\n }\n }\n\n //Now, calculate next execution of the course\n $nextstarttime = schedule_backup_next_execution ($backup_course,$backup_config,$now,$admin->timezone);\n //Save it to db\n set_field(\"backup_courses\",\"nextstarttime\",$nextstarttime,\"courseid\",$backup_course->courseid);\n //Print it to screen as necessary\n $showtime = \"undefined\";\n if ($nextstarttime > 0) {\n $showtime = userdate($nextstarttime,\"\",$admin->timezone);\n }\n mtrace(\" Next execution: $showtime\");\n }\n }\n }\n\n //Delete old logs\n if (!empty($CFG->loglifetime)) {\n mtrace(\" Deleting old logs\");\n $loglifetime = $now - ($CFG->loglifetime * 86400);\n delete_records_select(\"backup_log\", \"laststarttime < '$loglifetime'\");\n }\n\n //Send email to admin if necessary\n if ($emailpending) {\n mtrace(\" Sending email to admin\");\n $message = \"\";\n\n //Get info about the status of courses\n $count_all = count_records('backup_courses');\n $count_ok = count_records('backup_courses','laststatus','1');\n $count_error = count_records('backup_courses','laststatus','0');\n $count_unfinished = count_records('backup_courses','laststatus','2');\n $count_skipped = count_records('backup_courses','laststatus','3');\n\n //Build the message text\n //Summary\n $message .= get_string('summary').\"\\n\";\n $message .= \"==================================================\\n\";\n $message .= \" \".get_string('courses').\": \".$count_all.\"\\n\";\n $message .= \" \".get_string('ok').\": \".$count_ok.\"\\n\";\n $message .= \" \".get_string('skipped').\": \".$count_skipped.\"\\n\";\n $message .= \" \".get_string('error').\": \".$count_error.\"\\n\";\n $message .= \" \".get_string('unfinished').\": \".$count_unfinished.\"\\n\\n\";\n\n //Reference\n if ($count_error != 0 || $count_unfinished != 0) {\n $message .= \" \".get_string('backupfailed').\"\\n\\n\";\n $dest_url = \"$CFG->wwwroot/$CFG->admin/report/backups/index.php\";\n $message .= \" \".get_string('backuptakealook','',$dest_url).\"\\n\\n\";\n //Set message priority\n $admin->priority = 1;\n //Reset unfinished to error\n set_field('backup_courses','laststatus','0','laststatus','2');\n } else {\n $message .= \" \".get_string('backupfinished').\"\\n\";\n }\n\n //Build the message subject\n $site = get_site();\n $prefix = $site->shortname.\": \";\n if ($count_error != 0 || $count_unfinished != 0) {\n $prefix .= \"[\".strtoupper(get_string('error')).\"] \";\n }\n $subject = $prefix.get_string(\"scheduledbackupstatus\");\n\n //Send the message\n email_to_user($admin,$admin,$subject,$message);\n }\n \n\n //Everything is finished stop backup_sche_running\n backup_set_config(\"backup_sche_running\",\"0\");\n\n return $status;\n}", "function registry()\n\t{\n\t\tif ( !wp_next_scheduled( 'admin_action_delibera_cron_action' ) ) // if already been scheduled, will return a time \n\t\t{\n\t\t\twp_schedule_event(time(), 'hourly', 'admin_action_delibera_cron_action');\n\t\t}\n\t}", "public function cronAction()\n {\n $force = Mage::app()->getRequest()->getParam('force', false);\n $generator = Mage::getModel('smartassistant/generator');\n $generator->scheduleRun($force);\n }", "function view_check_cron() {\n\t\t$hour = date(\"H\");\n\t\t$dayofweek = date(\"N\");\n\t\t$day = date(\"j\");\n\n\t\t$last_day_of_month = date(\"j\", strtotime(\"-1 day\", strtotime(\"+1 month\", strtotime(time(\"Y-m\")))));\n\n\t\t$where_hourly = \"execute_hourly=true\";\n\t\t$where_daily = \"(execute_daily=true AND execute_hour='$hour')\";\n\t\t$where_weekly = \"(execute_weekly=true AND execute_dayofweek='$dayofweek' AND execute_hour='$hour')\";\n\t\t$where_monthly = \"(execute_monthly=true AND (execute_day='$day' OR (('$day'='$last_day_of_month') AND execute_day>'$last_day_of_month')) AND execute_hour='$hour')\";\n\n\t\t$templates = $this->dobj->db_fetch_all($this->dobj->db_query(\"SELECT * FROM templates WHERE execute=true AND ($where_hourly OR $where_daily OR $where_weekly OR $where_monthly);\"));\n\n\t\tif (!empty($templates)) {\n\t\t\techo count($templates).\" templates requiring execution\\n\";\n\n\t\t\tforeach ($templates as $template_tmp) {\n\t\t\t\t$this->call_function(\"tabular\", \"view_execute_manually\", array($template_tmp));\n\t\t\t}\n\t\t} else {\n\t\t\techo \"no templates requiring execution\\n\";\n\t\t}\n\t}", "private static function time_exec()\n {\n $current = self::time();\n self::$time_exec = $current-self::$time_start;\n }", "public function run()\n {\n\t\t$temp = [\n\t\t\t\"08:00 - 09:20\", \"09:30 - 10:50\", \"11:00 - 12:20\", \"12:30 - 13:50\",\n\t\t\t\"14:00 - 15:20\", \"15:30 - 16:50\", \"17:00 - 18:20\", \"18:30 - 19:50\",\n\t\t\t\n\t\t\t\"08:00 - 09:00\", \"09:10 - 10:10\", \"10:20 - 11:20\", \"11:30 - 12:30\",\n\t\t\t\"12:40 - 13:40\", \"13:50 - 14:50\", \"15:00 - 16:00\", \"16:10 - 17:10\",\n\n\t\t\t\"08:00 - 08:45\", \"09:00 - 09:45\", \"10:00 - 10:45\", \"11:00 - 11:45\",\n\t\t\t\"12:00 - 12:45\", \"13:00 - 13:45\", \"14:00 - 14:45\", \"15:00 - 15:45\",\n\t\t];\n\n\t\tfor($i = 0; $i < 3; $i++){\n\t\t\tfor($j = 0; $j < 8; $j++){\n\t\t\t\tDB::table('time_schedule')->insert([\n\t\t\t\t\t'type' => $i+1,\n\t\t\t\t\t'lesson' => $j+1,\n\t\t\t\t\t'time' => $temp[$i*8 + $j],\n\t\t\t\t\t'institutionID' => 1\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n }", "public function getCronCmd() {}", "function midnight_jobs()\n {\n\t if (intval(date('d')) == 1){\n\t\t set_setting('stt', 0);\n\t }\n\t echo 'Done';\n }", "function _unschedule_cron( $hook ) {\n\t\tIMFORZA_Utils::unschedule_cron( $hook );\n\t}", "public static function bonusDayCron(){\n set_time_limit(0);\n try {\n $lstUser = User::where('active', '=', 1)->get();\n foreach($lstUser as $user){\n //Get cron status\n $cronStatus = CronProfitLogs::where('userId', $user->id)->first();\n if(isset($cronStatus) && $cronStatus->status == 1) continue;\n\n $userData = $user->userData;\n //Get all pack in user_packages\n $package = UserPackage::where('userId', $user->id)\n ->where('withdraw', '<', 1)\n ->groupBy(['userId'])\n ->selectRaw('sum(amount_increase) as totalValue')\n ->get()\n ->first();\n if($package) \n {\n $bonus = isset($userData->package->bonus) ? $userData->package->bonus : 0;\n\n $usdAmount = $package->totalValue * $bonus;\n\n $userCoin = $user->userCoin;\n $userCoin->usdAmount = ($userCoin->usdAmount + $usdAmount);\n $userCoin->save();\n\n $fieldUsd = [\n 'walletType' => Wallet::USD_WALLET,//usd\n 'type' => Wallet::INTEREST_TYPE,//bonus day\n 'inOut' => Wallet::IN,\n 'userId' => $user->id,\n 'amount' => $usdAmount\n ];\n\n Wallet::create($fieldUsd);\n\n //Update cron status from 0 => 1\n $cronStatus->status = 1;\n $cronStatus->save();\n }\n }\n\n //Update status from 1 => 0 after run all user\n DB::table('cron_profit_day_logs')->update(['status' => 0]);\n\n } catch(\\Exception $e) {\n \\Log::error('Running bonusDayCron has error: ' . date('Y-m-d') .$e->getMessage());\n //throw new \\Exception(\"Running bonusDayCron has error\");\n }\n }", "function run()\n\t{\n\t\t$this->BG = new DataBase();\n\t\t$this->BG->connect();\n\t\t$process = new calendario($this->BG->con);\n\t\t$process ->sethecho(-1);\n\t\t$process=$process->read(true,1,array(\"hecho\"),1,array(\"fecha\",\"ASC\")); \n\t\t$fechaActual = fechaHoraActual();\n\t\t$sigue=true;\n\t\tfor($i=0;$i<count($process)&&$sigue;$i++)\n\t\t{\n\t\t\tif(FechaMayor($fechaActual,$process[$i]->getfecha())!=-1)\n\t\t\t{\n\t\t\t\tif($process[$i]->getaccion()==\"SORTE\")\n\t\t\t\t{\n\t\t\t\t\t$target = explode(\",\",$process[$i]->gettargetstring());\n\t\t\t\t\t$this->sorteo($target[0],$target[1]);\n\t\t\t\t}\n\t\t\t\tif($process[$i]->getaccion()==\"ACTBA\")\n\t\t\t\t{\n\t\t\t\t\t$this->activarBatalla($process[$i]->gettargetdate());\n\t\t\t\t}\n\t\t\t\tif($process[$i]->getaccion()==\"CONVO\")\n\t\t\t\t{\n\t\t\t\t\t$this->ConteoVotos();\n\t\t\t\t}\n\t\t\t\tif($process[$i]->getaccion()==\"CHTOR\")\n\t\t\t\t{\n\t\t\t\t\t$this->changeChampionship($process[$i]->gettargetint());\n\t\t\t\t}\n\t\t\t\tif($process[$i]->getaccion()==\"CHEVE\")\n\t\t\t\t{\n\t\t\t\t\t$this->changeEvento($process[$i]->gettargetstring());\n\t\t\t\t}\n\t\t\t\tif($process[$i]->getaccion()==\"CALPO\")\n\t\t\t\t{\n\t\t\t\t\t$target = explode(\",\",$process[$i]->gettargetstring());\n\t\t\t\t\t$this->calcularPonderacion($target[0],$target[1]);\n\t\t\t\t}\n\t\t\t\tif($process[$i]->getaccion()==\"INMAT\")\n\t\t\t\t{\n\t\t\t\t\t$this->ingresarMatch();\n\t\t\t\t}\t\t\n\t\t\t\t\n\t\t\t\tif($process[$i]->getaccion()==\"PAREP\")\n\t\t\t\t{\n\t\t\t\t\t$target = explode(\",\",$process[$i]->gettargetstring());\n\t\t\t\t\t$this->pasarrepechaje($target[0],$target[1],$target[2],$target[3]);\n\t\t\t\t}\t\t\n\t\t\t\t$process[$i]->setHecho(1);\n\t\t\t\t$process[$i]->update(1,array(\"hecho\"),1,array(\"id\"));\n\t\t\t\t$lognew = new reg($this->BG->con,-10,$process[$i]->getaccion(),$fechaActual,1,\"system\",$process[$i]->gettargetstring().\" \".$process[$i]->gettargetdate().\" \".$process[$i]->gettargetint());\n\t\t\t\t$lognew->save(); \n\t\t\t}\n\t\t\telse\n\t\t\t\t$sigue=false;\n\t\t}\n\t\t$this->grafoenvivo();\n\t\t$this->BG->close();\n\t}", "function add_cron_intervals( $schedules ) {\n\n\t$schedules['5seconds'] = array( // Provide the programmatic name to be used in code\n\t\t'interval' => 5, // Intervals are listed in seconds\n\t\t'display' => 'Every 5 Seconds' // Easy to read display name\n\t);\n\treturn $schedules; // Do not forget to give back the list of schedules!\n}", "public static function bonusBinaryWeekCron()\n {\n set_time_limit(0);\n /* Get previous weekYear */\n /* =======BEGIN ===== */\n $weeked = date('W');\n $year = date('Y');\n $weekYear = $year.$weeked;\n\n if($weeked < 10) $weekYear = $year.'0'.$weeked;\n\n $firstWeek = $weeked - 1;\n $firstYear = $year;\n $firstWeekYear = $firstYear.$firstWeek;\n\n if($firstWeek == 0){\n $firstWeek = 52;\n $firstYear = $year - 1;\n $firstWeekYear = $firstYear.$firstWeek;\n }\n\n if($firstWeek < 10) $firstWeekYear = $firstYear.'0'.$firstWeek;\n\n /* =======END ===== */\n\n $lstBinary = BonusBinary::where('weekYear', '=', $firstWeekYear)->get();\n foreach ($lstBinary as $binary) \n {\n //Get cron status\n $cronStatus = CronBinaryLogs::where('userId', $binary->userId)->first();\n if(isset($cronStatus) && $cronStatus->status == 1) continue;\n\n $leftOver = $binary->leftOpen + $binary->leftNew;\n $rightOver = $binary->rightOpen + $binary->rightNew;\n\n if ($leftOver >= $rightOver) {\n $leftOpen = $leftOver - $rightOver;\n $rightOpen = 0;\n $settled = $rightOver;\n } else {\n $leftOpen = 0;\n $rightOpen = $rightOver - $leftOver;\n $settled = $leftOver;\n }\n\n $bonus = 0;\n $userPackage = $binary->userData->package;\n if(isset($userPackage))\n {\n if (User::checkBinaryCount($binary->userId, 1)) {\n if ($userPackage->pack_id == 1) {\n $bonus = $settled * config('cryptolanding.binary_bonus_1_pay');\n } elseif ($userPackage->pack_id == 2) {\n $bonus = $settled * config('cryptolanding.binary_bonus_2_pay');\n } elseif ($userPackage->pack_id == 3) {\n $bonus = $settled * config('cryptolanding.binary_bonus_3_pay');\n } elseif ($userPackage->pack_id == 4) {\n $bonus = $settled * config('cryptolanding.binary_bonus_4_pay');\n } elseif ($userPackage->pack_id == 5) {\n $bonus = $settled * config('cryptolanding.binary_bonus_5_pay');\n } elseif ($userPackage->pack_id == 6) {\n $bonus = $settled * config('cryptolanding.binary_bonus_6_pay');\n }\n }\n }\n\n $binary->settled = $settled;\n\n //Bonus canot over maxout $35,000\n if($bonus > config('cryptolanding.bonus_maxout')) $bonus = config('cryptolanding.bonus_maxout');\n\n $binary->bonus = $bonus;\n $binary->save();\n\n if($bonus > 0){\n $usdAmount = $bonus * config('cryptolanding.usd_bonus_pay');\n $reinvestAmount = $bonus * config('cryptolanding.reinvest_bonus_pay') / ExchangeRate::getCLPUSDRate();\n\n $userCoin = $binary->userCoin;\n $userCoin->usdAmount = ($userCoin->usdAmount + $usdAmount);\n $userCoin->reinvestAmount = ($userCoin->reinvestAmount + $reinvestAmount);\n $userCoin->save();\n\n $fieldUsd = [\n 'walletType' => Wallet::USD_WALLET,//usd\n 'type' => Wallet::BINARY_TYPE,//bonus week\n 'inOut' => Wallet::IN,\n 'userId' => $binary->userId,\n 'amount' => $usdAmount,\n ];\n\n Wallet::create($fieldUsd);\n\n $fieldInvest = [\n 'walletType' => Wallet::REINVEST_WALLET,//reinvest\n 'type' => Wallet::BINARY_TYPE,//bonus week\n 'inOut' => Wallet::IN,\n 'userId' => $binary->userId,\n 'amount' => $reinvestAmount,\n ];\n\n Wallet::create($fieldInvest);\n }\n\n //Check already have record for this week?\n \n $weeked = date('W');\n $year = date('Y');\n $weekYear = $year.$weeked;\n\n if($weeked < 10) $weekYear = $year.'0'.$weeked;\n\n $week = BonusBinary::where('userId', '=', $binary->userId)->where('weekYear', '=', $weekYear)->first();\n // Yes => update L-Open, R-Open\n if(isset($week) && $week->id > 0) {\n $week->leftOpen = $leftOpen;\n $week->rightOpen = $rightOpen;\n\n $week->save();\n } else {\n // No => create new\n $field = [\n 'userId' => $binary->userId,\n 'weeked' => $weeked,\n 'year' => $year,\n 'leftNew' => 0,\n 'rightNew' => 0,\n 'leftOpen' => $leftOpen,\n 'rightOpen' => $rightOpen,\n 'weekYear' => $weekYear,\n ];\n\n BonusBinary::create($field);\n }\n\n //Update cron status from 0 => 1\n $cronStatus->status = 1;\n $cronStatus->save();\n }\n\n //Update status from 1 => 0 after run all user\n DB::table('cron_binary_logs')->update(['status' => 0]);\n }", "function goodrds_schedule_cron() {\n\t if ( !wp_next_scheduled( 'goodrds_cronjob' ) )\n\t wp_schedule_event(time(), 'daily', 'goodrds_cronjob');\n\t}", "public function set_cron_check() {\n\n\t\t/* Nonce check */\n\t\tcheck_ajax_referer( 'wpcd-admin', 'nonce' );\n\n\t\t/* Permision check - unsure that this is needed since the action is not destructive and might cause issues if the user sees the message and can't dismiss it because they're not an admin. */\n\t\tif ( ! wpcd_is_admin() ) {\n\t\t\twp_send_json_error( array( 'msg' => __( 'You are not authorized to perform this action - dismiss cron check.', 'wpcd' ) ) );\n\t\t}\n\n\t\t/* Permissions passed - set transient. */\n\t\tset_transient( 'wpcd_cron_check', 1, 12 * HOUR_IN_SECONDS );\n\t\twp_die();\n\n\t}", "function hackerHot($baseScore,$date_time,$gravity = 1.8){\n \n $upload_time=strtotime($date_time);\n $time_diff=(strtotime('now')-$upload_time);\n $hourPassed=round(($time_diff/(60 * 60)));\n if($hourPassed<0){\n $hourPassed=0;\n }\n \n return round((($baseScore-1)/pow($hourPassed+2,$gravity))*1000);\n }", "public static function runCron(\\AdminCronController $cron)\n {\n $pageType = $cron->getEntityManager()->getRepository('\\Jazzee\\Entity\\PageType')->findOneBy(array('class' => '\\Jazzee\\Page\\ETSMatch'));\n $allETSMatchPages = $cron->getEntityManager()->getRepository('\\Jazzee\\Entity\\Page')->findBy(array('type' => $pageType->getId()));\n $count = array(\n '\\Jazzee\\Entity\\GREScore' => 0,\n '\\Jazzee\\Entity\\TOEFLScore' => 0\n );\n $scores = array(\n '\\Jazzee\\Entity\\GREScore' => $cron->getEntityManager()->getRepository('\\Jazzee\\Entity\\GREScore')->findAllArray(),\n '\\Jazzee\\Entity\\TOEFLScore' => $cron->getEntityManager()->getRepository('\\Jazzee\\Entity\\TOEFLScore')->findAllArray()\n );\n \n foreach ($allETSMatchPages as $page) {\n //get all the answers without a matching score.\n $answers = $cron->getEntityManager()->getRepository('\\Jazzee\\Entity\\Answer')->findUnmatchedScores($page);\n $elements = array();\n $elements['testType'] = $page->getElementByFixedId(self::FID_TEST_TYPE);\n $elements['registrationNumber'] = $page->getElementByFixedId(self::FID_REGISTRATION_NUMBER);\n $elements['testDate'] = $page->getElementByFixedId(self::FID_TEST_DATE);\n $unmatchedScores = array(\n '\\Jazzee\\Entity\\GREScore' => array(),\n '\\Jazzee\\Entity\\TOEFLScore' => array()\n );\n foreach ($answers as $arr) {\n $answerElements = array();\n foreach($arr['elements'] as $eArr){\n $answerElements[$eArr['element_id']] = array($eArr);\n }\n $value = $elements['testType']->getJazzeeElement()->formatApplicantArray($answerElements[$elements['testType']->getId()]);\n $value = $value['values'][0]['value'];\n if($value == 'GRE/GRE Subject'){\n $testType = '\\Jazzee\\Entity\\GREScore';\n } else if ($value == 'TOEFL'){\n $testType = '\\Jazzee\\Entity\\TOEFLScore';\n } else {\n throw new \\Jazzee\\Exception(\"Unknown test type: {$value} when trying to match a score\");\n }\n \n $value = $elements['registrationNumber']->getJazzeeElement()->formatApplicantArray($answerElements[$elements['registrationNumber']->getId()]);\n $registrationNumber = $value['values'][0]['value'];\n \n $value = $elements['testDate']->getJazzeeElement()->formatApplicantArray($answerElements[$elements['testDate']->getId()]);\n $testDate = $value['values'][0]['value'];\n $testMonth = date('m', strtotime($testDate));\n $testYear = date('Y', strtotime($testDate));\n $unmatchedScores[$testType][$registrationNumber . $testMonth . $testYear] = $arr['id'];\n }\n foreach($unmatchedScores as $scoreEntityType => $arr){\n foreach($arr as $uniqueId => $answerId){\n if(array_key_exists($uniqueId, $scores[$scoreEntityType])){\n $count[$scoreEntityType] += $cron->getEntityManager()->getRepository($scoreEntityType)->matchScore($answerId, $scores[$scoreEntityType][$uniqueId]);\n }\n }\n }\n }\n if ($count['\\Jazzee\\Entity\\GREScore']) {\n $cron->log(\"Found {$count['\\Jazzee\\Entity\\GREScore']} new GRE score matches\");\n }\n if ($count['\\Jazzee\\Entity\\TOEFLScore']) {\n $cron->log(\"Found {$count['\\Jazzee\\Entity\\TOEFLScore']} new TOEFL score matches\");\n }\n }", "public function shopifyCronJob(){\n $this->load->model('Projects_model');\n $projects = $this->db->select('*')->from('projects')->where_in('connection_type',[1,3])->get()->result_array();\n $this->updateArticleInShopify();\n if(!empty($projects)){\n foreach ($projects as $p_key => $p_value) {\n $projectId = $p_value['id'];\n if($this->Projects_model->getValue('cms', $projectId)!='shopify')\n continue;\n $enabled = $this->Projects_model->getValue('enabled', $projectId);\n // check if the last execution time is satisfy the time checking.\n if($enabled == '1'){\n if($p_value['erp_system'] == 'exactonline') {\n $this->importArticleFromExact($projectId);\n $this->importCustomerFromExact($projectId);\n }\n }\n }\n } \n }", "function elysia_cron_admin_page() {\n $aoutput = array();\n $aoutput[] = drupal_get_form('elysia_cron_run_form');\n\n $output = '';\n\n elysia_cron_initialize();\n\n global $elysia_cron_settings, $elysia_cron_settings_by_channel, $elysia_cron_current_channel, $cron_completed, $cron_completed_time;\n\n $v = variable_get('elysia_cron_disabled', false);\n $output .= '<p>' . t('Global disable') . ': <i>' . ($v ? '<span class=\"warn\">' . t('YES') . '</span>' : 'no') . '</i></p>';\n $output .= '<p>' . t('Last channel executed') . ': <i>' . (($c = elysia_cron_last_channel()) ? $c : t('n/a')) . '</i></p>';\n\n if (EC_DRUPAL_VERSION < 7) {\n if (_ec_variable_get('elysia_cron_semaphore', 0)) {\n $output .= '<p><span class=\"warn\">' . t('Global semaphore active since !date', array('!date' => elysia_cron_date(_ec_variable_get('elysia_cron_semaphore', 0)))) . '</span></p>';\n }\n }\n\n $running = '';\n foreach ($elysia_cron_settings_by_channel as $channel => $data) {\n if (elysia_cron_is_channel_running($channel)) {\n $running .= $channel . ' ';\n }\n }\n if ($running) {\n $output .= '<p>' . t('Running channels') . ': <span class=\"warn\">' . $running . '</span></p>';\n }\n\n $output .= '<p>' . t('Last run') . ': ' . elysia_cron_date(_ec_variable_get('elysia_cron_last_run', 0)) . '</p>';\n\n $rows = array();\n \n $ipath = url(drupal_get_path('module', 'elysia_cron') . '/images/icon_');\n \n foreach ($elysia_cron_settings_by_channel as $channel => $data) {\n $running = elysia_cron_is_channel_running($channel);\n $rows[] = array(\n array('data' => '<h3>' . t('Channel') . ': ' . $channel . ($data['#data']['disabled'] ? ' <span class=\"warn\">(' . t('DISABLED') . ')</span>' : '') . '</h3>', 'colspan' => 2, 'header' => 'true'),\n array('data' => elysia_cron_date($data['#data']['last_run']), 'header' => 'true'),\n array('data' => $data['#data']['last_execution_time'] . 's ' . t('(Shutdown: !shutdown)', array('!shutdown' => $data['#data']['last_shutdown_time'] . 's')), 'header' => 'true'),\n array('data' => $data['#data']['execution_count'], 'header' => 'true'),\n array('data' => $data['#data']['avg_execution_time'] . 's / ' . $data['#data']['max_execution_time'] . 's', 'header' => 'true'),\n );\n $messages = '';\n if ($running) {\n $messages .= t('Running since !date', array('!date' => elysia_cron_date($running))) . '<br />';\n }\n if ($data['#data']['last_aborted'] || $data['#data']['abort_count']) {\n $msg = array();\n if ($data['#data']['last_aborted']) {\n $msg[] = t('Last aborted') . (!empty($data['#data']['last_abort_function']) ? ': <span class=\"warn\">' . t('On function !function', array('!function' => $data['#data']['last_abort_function'])) . '</span>' : '');\n }\n if ($data['#data']['abort_count']) {\n $msg[] = t('Abort count') . ': <span class=\"warn\">' . $data['#data']['abort_count'] . '</span>';\n }\n $messages .= implode(', ', $msg) . '<br />';\n }\n if ($messages) {\n $rows[] = array( '', '', array('data' => $messages, 'colspan' => 4, 'header' => true) );\n $rows[] = array( array('data' => '', 'colspan' => 6) );\n }\n \n foreach ($data as $job => $conf) {\n $icon = 'idle';\n $caption = '<b>' . $job . '</b>';\n $tip = t('Idle');\n if ($conf['disabled']) {\n $icon = 'disabled';\n $caption = '<strike><b>' . $job . '</b></strike>';\n $tip = t('Disabled');\n }\n elseif (!empty($conf['running'])) {\n $icon = 'running';\n $caption = '<b><u>' . $job . '</u></b>';\n $tip = t('Running');\n }\n elseif (elysia_cron_should_run($conf)) {\n $icon = 'waiting';\n $tip = t('Waiting for execution');\n }\n \n if ($job != '#data') {\n $rows[] = array(\n array( 'data' => '<img src=\"' . $ipath . $icon . '.png\" width=\"16\" height=\"16\" align=\"top\" alt=\"' . $tip . '\" title=\"' . $tip . '\" />', 'align' => 'right' ),\n array( 'data' => $caption . ': <i>' . elysia_cron_description($job) . '</i> ', 'colspan' => 4 ),\n array( 'data' => _dco_l(t('Force run'), _dcf_internal_path('admin/config/system/cron/execute/') . $job, array('attributes' => array('onclick' => 'return confirm(\"' . t('Force execution of !job?', array('!job' => $job)) . '\");'))), 'align' => 'right'),\n );\n $rows[] = array(\n '',\n check_plain($conf['rule']) . (!empty($conf['weight']) ? ' <small>(' . t('Weight') . ': ' . $conf['weight'] . ')</small>' : ''),\n elysia_cron_date($conf['last_run']),\n $conf['last_execution_time'] . 's',\n $conf['execution_count'],\n $conf['avg_execution_time'] . 's / ' . $conf['max_execution_time'] . 's',\n );\n }\n }\n $rows[] = array('&nbsp;','','','','','');\n }\n \n $output .= _dco_theme('table', array('header' => array('', t('Job / Rule'), t('Last run'), t('Last exec time'), t('Exec count'), t('Avg/Max Exec time')), 'rows' => $rows));\n $output .= '<br />';\n \n $output .= _dco_theme('table', array(\n 'header' => array(t('Legend')),\n 'rows' => array(\n array('<img src=\"' . $ipath . 'idle.png\" width=\"16\" height=\"16\" align=\"top\" alt=\"' . $tip . '\" title=\"' . $tip . '\" /> ' . t('Job shouldn\\'t do anything right now')),\n array('<img src=\"' . $ipath . 'waiting.png\" width=\"16\" height=\"16\" align=\"top\" alt=\"' . $tip . '\" title=\"' . $tip . '\" /> ' . t('Job is ready to be executed, and is waiting for system cron call')),\n array('<img src=\"' . $ipath . 'running.png\" width=\"16\" height=\"16\" align=\"top\" alt=\"' . $tip . '\" title=\"' . $tip . '\" /> ' . t('Job is running right now')),\n array('<img src=\"' . $ipath . 'disabled.png\" width=\"16\" height=\"16\" align=\"top\" alt=\"' . $tip . '\" title=\"' . $tip . '\" /> ' . t('Job is disabled by settings, and won\\'t run until enabled again')),\n array(t('Notes: job times don\\'t include shutdown times (only shown on channel times).')),\n array(t('If an abort occours usually the job is not properly terminated, and so job timings can be inaccurate or wrong.')),\n ),\n ));\n\n $aoutput[] = array(\n '#type' => 'markup',\n '#markup' => $output,\n );\n\n return _dcr_render_array($aoutput);\n}", "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda argomento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "public function actionCron() {\n if (!Yii::$app->cache->get('cron')) {\n Yii::$app->cache->set('cron', true);\n try {\n $eventModels = Event::find()->all();\n foreach ($eventModels as $eventModel) {\n $socialMediaModels = SocialMedia::find()->where(['event_id' => $eventModel->id])->orderBy('id')->all();\n Yii::$app->cache->delete('socialmedia' . $eventModel->id);\n $this->findSocialMedia($eventModel->id, $socialMediaModels);\n }\n } catch (Exception $e) {\n Yii::$app->cache->delete('cron');\n return $e;\n }\n Yii::$app->cache->delete('cron');\n return 'Cron-job successful.';\n } else {\n return 'Cron-job already running.';\n }\n }", "protected function schedule(Schedule $schedule)\n {\n //* * * * * /usr/bin/php /your/projectPath/artisan schedule:run >> /dev/null 2>&1\n\n //买格子后的日志,记录到数据库\n $schedule->command('Grid:TradeInfo')->everyMinute()->withoutOverlapping();\n\n //延时统计用户成就\n $schedule->command('Grid:Achievement')->everyFiveMinutes()->withoutOverlapping();\n\n //延时更新用户头像\n $schedule->command('Grid:ChangeAvatar')->everyMinute()->withoutOverlapping();\n\n //排行榜统计\n $schedule->command('Grid:RankList')->everyFiveMinutes()->withoutOverlapping();\n\n //n天不交易的格子自动降价m%\n $schedule->command('Grid:ReducePrice')->cron('30 2 * * *')->withoutOverlapping();\n\n\n\n\n //后台发的系统通知\n $schedule->command('Admin:SystemMessage')->everyMinute()->withoutOverlapping();\n\n //后台admin的控制面板,计算cpu,内存,硬盘占用\n $schedule->command('Admin:ServerInfoNew')->everyMinute()->withoutOverlapping();\n\n //后台admin的控制面板,统计用户分布情况\n $schedule->command('Admin:UserDistribution')->daily()->withoutOverlapping();\n\n //后台的数据统计\n $schedule->command('Admin:userData1')->everyThirtyMinutes()->withoutOverlapping();\n $schedule->command('Admin:gridData1')->everyThirtyMinutes()->withoutOverlapping();\n\n\n\n //处理探索世界迷雾\n $schedule->command('Tssj:FogUpload0')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload1')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload2')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload3')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload4')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload5')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload6')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload7')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload8')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload9')->everyMinute()->withoutOverlapping();\n\n //处理我的路迷雾\n $schedule->command('Wodelu:FogUpload0')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload1')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload2')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload3')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload4')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload5')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload6')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload7')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload8')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload9')->everyMinute()->withoutOverlapping();\n\n //处理我的路足迹\n $schedule->command('Wodelu:TrackFogUploadForZUJI0')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI1')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI2')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI3')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI4')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI5')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI6')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI7')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI8')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI9')->everyMinute()->withoutOverlapping();\n\n //计算昨日繁荣度 联盟的\n $schedule->command('Aliance:Flourish')->cron('1 0 * * *')->withoutOverlapping();\n //计算昨日繁荣度 用户的\n $schedule->command('Aliance:FlourishForUser')->cron('1 0 * * *')->withoutOverlapping();\n\n //每月第一天计算联盟战绩\n $schedule->command('Aliance:PKinfo')->cron('30 0 1 */1 *')->withoutOverlapping();\n\n\n\n //每分钟刷拍卖行物品,过期的返回给用户\n $schedule->command('FoodMap:AuctionHouse')->everyMinute()->withoutOverlapping();\n\n\n\n\n $schedule->command('Tssj:OneJoke')->everyFifteenMinutes()->withoutOverlapping();\n }", "private function getNextCron($c) {\n\t\t//$c = \"30 07 * * 0\";\n\t\t$c = 'cron '.$c;\n\t\t$c = explode(' ',$c);\n\t\t$d = explode(',',$c[5]);\n\t\tfor ($i=0 ; $i<count($d) ; $i++) { array_splice($d, $i, 1, $d[$i]+1); }\n\t\t$d = implode(',',$d);\n\t\t$c[5] = $d;\t\n\t\t$c = implode(' ',$c);\n\t\tFlight::nextcron()->AddSchedule($c);\n\t\tFlight::nextcron()->RebuildCalendar();\n\t\t$result = Flight::nextcron()->NextTrigger();\n\t\treturn $result[\"ts\"];\n\t}", "public function actionTest()\n {\n\n //TODO :: DON'T ALLOW TO RUN IN MAINTENANCE MODE\n echo 'Now: '.date('Y-m-d H:i:s');\n $cron = \\Cron\\CronExpression::factory('*/2 * * * *');\n v($cron->isDue());\n echo $cron->getNextRunDate()->format('Y-m-d H:i:s');\n echo '<br>';\n echo $cron->getPreviousRunDate()->format('Y-m-d H:i:s');\n\n die;\n\n //TODO :: ONLY RUN IN CLI MODE\n $sapi_type = php_sapi_name();\n if (substr($sapi_type, 0, 3) != 'cli') {\n //die(\"CronJob is CLI only.\");\n }\n\n //find all active jobs\n $jobModels = CronJob::findActiveJobs();\n\n //Stop processing if no job found!\n if(count($jobModels) == 0){\n return 'No scheduled commands are ready to run.';\n }\n\n //enqueue the jobs -- (marks jobs is in queue to prevent being executed by another process until it's completed)\n foreach($jobModels as $job)\n {\n $job->markInQueue();\n }\n\n //execute jobs\n foreach($jobModels as $job)\n {\n $job->markRunning();\n\n v($job->getNextRunDate());\n\n if($job->type == CronJob::TYPE_INLINE){\n //eval($job->command);\n }\n if($job->type == CronJob::TYPE_TERMINAL){\n $cmd = PHP_BINARY . ' ' . $job->command;\n if(function_exists('shell_exec')){\n shell_exec($cmd);\n }\n }\n if($job->type == CronJob::TYPE_FUNCTION){\n $cliScriptName = 'yii';\n $cmd = PHP_BINARY . ' ' . $cliScriptName . ' ' . $job->command;\n if(function_exists('shell_exec')){\n shell_exec($cmd);\n }\n }\n\n $job->markActive();\n }\n }", "function limite_trazadora($fecha) {\r\n $fecha = strtotime(fecha_db($fecha));\r\n $actualm = date('m', $fecha);\r\n $actualy = $actualy2 = date('Y', $fecha);\r\n // $ano = date('Y', $fecha);\r\n $desdem1 = '01';\r\n $hastam1 = '04';\r\n $desdem2 = '05';\r\n $hastam2 = '08';\r\n $desdem3 = '09';\r\n $hastam3 = '12';\r\n if ($actualm >= $desdem1 && $actualm <= $hastam1) {\r\n $cuatrimestre = 1;\r\n $cuatrimestrem = 3;\r\n //$actualy2++;\r\n }\r\n if ($actualm >= $desdem2 && $actualm <= $hastam2) {\r\n $cuatrimestre = 2;\r\n $cuatrimestrem = $cuatrimestre - 1;\r\n // $actualy2++;\r\n }\r\n if ($actualm >= $desdem3 && $actualm <= $hastam3) {\r\n $cuatrimestre = 3;\r\n $cuatrimestrem = $cuatrimestre - 1;\r\n $actualy2++;\r\n }\r\n\r\n $query2 = \"SELECT desde\r\n\t\t\t\t\tFROM facturacion.cuatrimestres\r\n\t\t\t\t\t WHERE cuatrimestre='$cuatrimestre'\";\r\n $res_sql2 = sql($query2) or excepcion(\"Error al buscar cuatrimestre\");\r\n $valor['desde'] = $actualy . '-' . $res_sql2->fields['desde'];\r\n\r\n $query2 = \"SELECT limite\r\n\t\t\t\t\tFROM facturacion.cuatrimestres\r\n\t\t\t\t\t WHERE cuatrimestre='$cuatrimestre'\";\r\n $res_sql2 = sql($query2) or excepcion(\"Error al buscar cuatrimestre\");\r\n\r\n $valor['limite'] = $actualy2 . '-' . $res_sql2->fields['limite'];\r\n\r\n return $valor;\r\n}", "public function cronCleanup() {\n if (variable_get('cron_semaphore', FALSE)) {\n watchdog('cron', 'Cron run exceeded the time limit and was aborted.', array(), WATCHDOG_WARNING);\n\n // Release cron semaphore.\n variable_del('cron_semaphore');\n }\n }" ]
[ "0.66825515", "0.65905243", "0.6536926", "0.65339565", "0.6484514", "0.6476803", "0.64543176", "0.64112526", "0.6378767", "0.63777006", "0.637599", "0.6345236", "0.63249516", "0.63225156", "0.63017386", "0.6286551", "0.6253544", "0.6231126", "0.62248296", "0.62077206", "0.61645406", "0.6157362", "0.6152142", "0.61377126", "0.6135038", "0.6133944", "0.6132932", "0.6125219", "0.61237043", "0.6106522", "0.6071847", "0.6071466", "0.60703677", "0.6053115", "0.6039126", "0.60340434", "0.60279745", "0.6026793", "0.60242915", "0.6006443", "0.60003227", "0.59920263", "0.59853894", "0.5975029", "0.59523886", "0.59115773", "0.5903177", "0.58921635", "0.5879121", "0.58683026", "0.5865603", "0.58549535", "0.5841833", "0.5837738", "0.58341104", "0.58237875", "0.58194804", "0.58171827", "0.5811155", "0.5792817", "0.5785992", "0.57753706", "0.57723737", "0.5767419", "0.57671726", "0.5761056", "0.5753118", "0.5751969", "0.5751969", "0.5740281", "0.57364583", "0.57337457", "0.5732416", "0.57289666", "0.5728692", "0.57257664", "0.57031727", "0.5702529", "0.56914395", "0.5677989", "0.5662589", "0.56497043", "0.56438154", "0.56420666", "0.5628716", "0.5627524", "0.56227535", "0.5622502", "0.56093836", "0.5608559", "0.5606496", "0.5606428", "0.5605683", "0.5604395", "0.5600572", "0.55973464", "0.5595687", "0.55949", "0.5594061", "0.5588975", "0.5584027" ]
0.0
-1
run in verbose mode.
public static function run_on_demand() { $obj = new self(); $obj->verbose = true; $obj->run(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verbose($v)\n {\n $this->verbose = $v;\n }", "public function isVerbose()\n {\n }", "public function isVerbose();", "public function isVerbose();", "public function isVeryVerbose()\n {\n }", "public function isVeryVerbose();", "private function createVerboseLog() {\n $query = array();\n parse_str($_SERVER['QUERY_STRING'], $query);\n unset($query['verbose']);\n $url = '?' . http_build_query($query);\n\n\n $this->verboseLog = <<<EOD\n <html lang='en'>\n <meta charset='UTF-8'/>\n <title>img.php verbose mode</title>\n <h1>Verbose mode</h1>\n <p><a href=$url><code>$url</code></a><br>\n <img src='{$url}' /></p>\nEOD;\n }", "public function setVerbose($verbose)\n {\n $this->_verbose = StringHelper::booleanValue($verbose);\n }", "final protected function verbose( $boolean=true ) {\n\t\t$this->_verbose = $boolean ? true : false;\n\t}", "public function verbose_output($m)\n {\n if ($this->verbose)\n echo \"(Memtex): $m\\n\";\n }", "public function setVerbose($flag)\n {\n $this->_verbose = (bool) $flag;\n }", "public function setVerboseOn()\n {\n $this->verbose = true;\n return $this;\n }", "private function verbose($title, $data) {\r\n\t\tif ($this->verbose) {\r\n\t\t\tif ($title) {\r\n\t\t\t\tvar_dump($title);\r\n\t\t\t}\r\n\t\t\tif ($data) {\r\n\t\t\t\tvar_dump($data);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function enableVerbose() {\n\t\t$this->curl->enableVerbose();\n\t}", "function run() {\n echo $this->name . \" runs like crazy. Him fast<br>\";\n }", "public function runSilently()\n {\n $this->verbose = false;\n\n return $this->run(null);\n }", "function verbose($string, $data = [])\n{\n if (VERBOSE && !empty($string)) {\n output(trim('[V' . ((DEBUG) ? ' ' . get_memory_used() : '') . '] ' . $string) . \"\\n\");\n if (!empty($data)) {\n output(print_r($data, 1));\n }\n return true;\n }\n return false;\n}", "function verbose($text = '') {\n global $verbose, $logfile;\n\n // Add text to verbose output\n if (!is_null($verbose)) {\n if (!is_string($text)) {\n $text = print_r($text, 1);\n }\n $verbose .= PHP_EOL . $text;\n }\n // Add text to log output\n if (!is_null($logfile) && $logfile !== false) {\n if (!is_string($text)) {\n $text = print_r($text, 1);\n }\n file_put_contents($logfile, $text . PHP_EOL, FILE_APPEND);\n }\n return $verbose;\n}", "public function run()\n {\n echo \"I'am run slowly <br>\";\n }", "public function cli()\n {\n _APP_=='varimax' && $this->registerConsoleCommand();\n }", "function run() {\n\t\techo $this->name . \" runs like crazy </br>\";\n\t}", "public function testGetFullVerboseCommand() {\n $outputInterface = new ConsoleOutput();\n $outputInterface->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);\n\n $binRunner = new PhingBinRunner(\n 'phing',\n '/dir/which/is/not/real',\n $outputInterface,\n '/outputfile/hkjlkq',\n BinRunnerInterface::GLOBAL_BIN\n );\n\n Assert::assertEquals('cd /dir/which/is/not/real && phing ',\n $binRunner->getFullCommand());\n }", "public function isVerbose()\n {\n return $this->decoratedOutput->isVerbose();\n }", "function verbose($msg = null, $arg = \"\")\n{\n global $verbose, $verboseFile;\n static $log = array();\n\n if (!($verbose || $verboseFile)) {\n return;\n }\n\n if (is_null($msg)) {\n return $log;\n }\n\n if (is_null($arg)) {\n $arg = \"null\";\n } elseif ($arg === false) {\n $arg = \"false\";\n } elseif ($arg === true) {\n $arg = \"true\";\n }\n\n $log[] = $msg . $arg;\n}", "public function main()\n {\n $this->out($this->OptionParser->help());\n }", "public function startup() {\n\t\tparent::startup();\n\t\tif (!empty($this->params['dry-run'])) {\n\t\t\t$this->out(__d('cake_console', '<warning>Dry-run mode enabled!</warning>'), 1, Shell::QUIET);\n\t\t}\n\t}", "public function run()\n {\n $tv = new Tv();\n $tv -> message = 'Mensaje Publicitario MODIFICABLE';\n $tv -> url = 'l-aS0XSmShM';\n $tv -> turn_max = 10;\n $tv -> save();\n }", "public static function run()\n\t{\n\t\tstatic::help();\n\t}", "final function whatIsGood() {\n echo \"Running is good <br>\";\n }", "public function isVeryVerbose()\n {\n return $this->decoratedOutput->isVeryVerbose();\n }", "public function setVerbose($newValue = false)\n {\n $this->verbose = (bool)$newValue;\n return;\n }", "public function getVerbosity()\n {\n }", "function display_errors($verbose = 1)\n{\n if($verbose == 0)\n {\n\tini_set('display_errors', False);\n }\n elseif($verbose == 1)\n {\n\t//echo '[V] error_reporting is on</br>';\n\t\n\t$msgline = '[V] error_reporting is on</br>';\n\tfile_put_contents('debug.log', $msgline, FILE_APPEND | LOCK_EX);\n\t\n\terror_reporting(E_ALL);\n\tini_set('display_errors', True);\n }\n}", "public static function verbose($message, $entity_path = null, $judge_host = null) {\n\t\tself::log_entry(LogLevel::VERBOSE, $message, $entity_path, $judge_host);\n\t}", "private static function init() {\n if (is_null(self::$cli)) {\n self::$cli = (php_sapi_name() === 'cli');\n if (self::$cli === FALSE) {\n echo '<pre>'.PHP_EOL;\n }\n }\n }", "public function getVerbosity();", "public function run()\n {\n echo \"run\";\n }", "public function getOutputVerbosity();", "function run() {\n echo $this->name . \" runs<br>\";\n }", "public function verbose(bool $verbose): self\n {\n $new = clone $this;\n $new->verbose = $verbose;\n\n return $new;\n }", "protected function callFromConsole()\n {\n array_shift($_SERVER['argv']);\n\n $this->application->run(new ArgvInput($_SERVER['argv']), new ConsoleOutput());\n }", "function run_ts()\n{\n\n $plugin = new TS();\n $plugin->run();\n\n}", "public function execute(): void\n {\n // Get started!\n $start = microtime(true);\n $args = $this->getArgs();\n if ($args['show']) {\n $start = microtime(true);\n $this->success(\"Message: {$args['message']}\\n\");\n $this->warn(\"Environment: {$this->env['ENV']}\\n\");\n $this->warn(\"Config DB Driver: {$this->config['database-driver']}\\n\");\n $this->output('Execution took: ' . (microtime(true) - $start) . \" seconds\\n\", TextStyle::CYAN);\n }\n }", "final function what_is_good() {\n\t\t\techo \"Running is Good </br>\";\n\t\t}", "public static function main() {\n\t\tTestRunner::run( self::suite() );\n\t}", "public function disableVerbose() {\n\t\t$this->curl->disableVerbose();\n\t}", "public static function run() {\n\t}", "public function main()\n\t{\n\t}", "public function main() \r\n\t{\r\n\t\t$path = $this->path; // shortcut\r\n\t\t\r\n\t\t$result = exec(\"svn status $path\");\r\n\t\t$this->project->setProperty( $this->result, $result );\r\n }", "public static function var_dumpp()\n {\n echo \"<pre>\";\n if(func_num_args()>0)\n foreach(func_get_args() as $argv)\n {\n var_dump($argv);\n }\n echo \"</pre>\";\n\n }", "public function printTSlog() {}", "public function printTSlog() {}", "function print_error($verbose, $error) {\n if ($verbose) {\n echo $error;\n }\n return false;\n }", "public static function main(){\n\t\t\t\n\t\t}", "public function demo()\n\t{\n\t\techo \"This is demo\";\n\t}", "protected function main()\n /**/\n {\n parent::run();\n }", "public function run () {\r\n print \"\\n\";\r\n \r\n # Console spacing.\r\n foreach ( $this->tests as $test ) {\r\n if ( strlen( $test->name() ) > $this->longest_test_name_length )\r\n $this->longest_test_name_length = strlen( $test->name() );\r\n }\r\n \r\n foreach ( $this->tests as $test ) {\r\n $test->run();\r\n $this->print_test( $test );\r\n }\r\n \r\n $this->print_summary_stats();\r\n }", "public function Con_Cli(){\n // TODO\n }", "public function main()\r\n {\r\n \r\n }", "public function setVerbosity($level)\n {\n }", "public static function run() {\n\t\t$dispatcher = new HHVMTestSuiteDispatcher();\n\t\t$dispatcher->dispatch();\n\t}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}" ]
[ "0.69430566", "0.67427397", "0.66717386", "0.66717386", "0.65915775", "0.64965487", "0.6169363", "0.6168454", "0.6154027", "0.6149708", "0.6030976", "0.59923464", "0.5950023", "0.5828371", "0.57174206", "0.5671505", "0.5590524", "0.5577883", "0.5564451", "0.55536425", "0.5541685", "0.553094", "0.5516255", "0.54444665", "0.5439353", "0.54295653", "0.541279", "0.5410748", "0.53976375", "0.53935593", "0.5388845", "0.5377284", "0.53578836", "0.5333627", "0.53335464", "0.53065914", "0.5275027", "0.527479", "0.5207527", "0.518785", "0.514667", "0.5145471", "0.51405567", "0.512499", "0.51025134", "0.5087194", "0.5066672", "0.5037749", "0.5029968", "0.5015829", "0.5002263", "0.5002263", "0.5001948", "0.49939963", "0.49779177", "0.49609917", "0.49577883", "0.49474537", "0.49425805", "0.49333367", "0.49286452", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49264956", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932", "0.49247932" ]
0.5619492
16
runs the task without output.
public function runSilently() { $this->verbose = false; return $this->run(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function runTestTask()\n\t{\n\t\t$this->runTask(1);\n\t}", "public function run(){}", "public abstract function getNoOutput();", "protected function run()\n {\n /* Do Nothing */\n return 'There is no implementation yet:)';\n }", "public function run()\n {\n // $this->call\n }", "public static function run(): void;", "public function run()\n {\n /* this particular object won't run */\n }", "public function process()\n {\n // do nothing here\n }", "public function run(): void;", "public function run(): void;", "public function run(): void;", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run() {}", "abstract protected function _run();", "abstract protected function _run();", "public abstract function run();", "public abstract function run();", "abstract function run();", "protected abstract function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "public function run($task, $params);", "abstract public function run() ;", "public static function run() {\n\t}", "function run();", "function run();", "public function execute()\n\t{\n\t\t$this->run();\n\t}", "public function run()\n {\n try {\n echo $this->_fgColor('bold_green', \"\\nStarting routine.\");\n if ($this->_lock) {\n $this->_lock();\n }\n $this->_time();\n if (!$this->{$this->_cmdOptions->command_name}()) {\n echo $this->_fgColor('bold_red', \"\\nAborted.\");\n }\n $this->_report['Method'] = $this->_cmdOptions->command_name;\n $this->_report['Script Time'] = $this->_time(true);\n if ($this->_lock) {\n $this->_unlock();\n }\n\n // Write report\n if ($this->_output) {\n\n // &$output, so new values are being added by exec()\n foreach ($this->_output as $v) {\n if ($v) {\n if (preg_match('/(error|fatal)/i', $v)) {\n $this->_log->addError($v);\n } else if (preg_match('/(warning|consejo)/i', $v)) {\n $this->_log->addWarning($v);\n } else {\n $this->_log->addInfo($v);\n }\n }\n }\n echo $this->_fgColor('purple', \"\\nCheck {$this->_baseDir}/log/report-\" . date('Y-m-d')\n . '.log for details.');\n }\n\n // Display tasks log to stdout\n $this->_showReport();\n\n echo $this->_fgColor('bold_green', \"\\n\\nAll done.\\n\");\n } catch (Exception $e) {\n echo $this->_fgColor('bold_red', \"\\nUn uknown error occurred. Details:\\n\");\n echo \"{$e}\";\n echo $this->_fgColor('bold_red', \"\\nAborted.\\n\");\n }\n }", "function run()\r\n {\r\n }", "function execute(Task $task);", "public function execute()\n {\n $this->run();\n }", "public function run()\n\t{\n\t\t//\n\t}", "public function work(): void;", "abstract public function run(): void;", "private function doRunIsolated()\n {\n ob_start();\n $output = call_user_func_array([$this, 'doRun'], func_get_args());\n ob_end_clean();\n\n return $output;\n }", "public function run() {\n\t\tif ($this->schedule->isRun()) {\n\t\t\t$this->excuteHandle->excute();\n\t\t}\n\t}", "public function run(): void\n {\n }", "public function exec() {\n\t\t$this->stop();\n\t\tswitch ($this->enable) {\n\t\tcase FALSE:\n\t\t\t$this->update(TRUE);\n\t\t\tbreak;\n\t\tcase TRUE:\n\t\t\t$this->update(FALSE);\n\t\t\tusleep($this->delay);\n\t\t\t$this->start();\n\t\t\tbreak;\n\t\t}\n\t}", "public function run(): void\n {\n //\n }", "public static function run_on_demand()\n {\n $obj = new self();\n $obj->verbose = true;\n $obj->run(null);\n }", "function run() {\n\t\techo $this->name . \" runs like crazy </br>\";\n\t}", "public function run() {\n\t\t$this->checkForHelp();\n\n\t\ttry {\n\t\t\t$this->getAndRunTasks();\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\t$this->printException($e);\n\t\t}\n\t}", "protected function stopTask() {}", "public function mainAction()\n {\n echo 'Main action for FileSystem Task';\n }", "protected function _exec()\n {\n }", "public function run()\n {\n echo \"I'am run slowly <br>\";\n }", "function task()\n {\n /*$taskClass = new TestTask();\n \\EasySwoole\\EasySwoole\\Swoole\\Task\\TaskManager::async($taskClass);\n $this->response()->write('执行模板异步任务成功');*/\n /*TaskManager::async(function () {\n file_put_contents('./aaa.log',microtime(true));\n });*/\n\n // 每隔 10 秒执行一次\n /*Timer::getInstance()->loop(10 * 1000, function () {\n file_put_contents('./aaa.log', microtime(true) . PHP_EOL, FILE_APPEND);\n });*/\n }", "public function disableOutput()\n {\n $this->output = null;\n }", "public function requestRun()\n {\n }", "public function run()\n {\n echo \"run\";\n }", "public function processOutput() {}", "protected function _clearAndOutput() {}", "public function output(): void;", "function run() {\n echo $this->name . \" runs like crazy. Him fast<br>\";\n }", "public function it_works_with_no_configuration()\n {\n $this->test_process('none');\n }", "public function execute(): void;", "public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}", "protected function executeTasks() {}", "public function taskA()\n {\n Performance::point(__FUNCTION__);\n\n //\n // Run code\n usleep(2000);\n //\n\n // Finish point Task A\n Performance::finish();\n }", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "function run_task($thetask) {\n global $DB, $CFG, $OUTPUT;\n\n if (CLI_MAINTENANCE) {\n echo \"CLI maintenance mode active, cron execution suspended.\\n\";\n $this->adhoc_task_release($thetask);\n exit(1);\n }\n\n if (moodle_needs_upgrading()) {\n echo \"Moodle upgrade pending, cron execution suspended.\\n\";\n $this->adhoc_task_release($thetask);\n exit(1);\n }\n\n require_once($CFG->libdir . '/adminlib.php');\n\n if (!empty($CFG->showcronsql)) {\n $DB->set_debug(true);\n }\n if (!empty($CFG->showcrondebugging)) {\n set_debugging(DEBUG_DEVELOPER, true);\n }\n\n try {\n\n \\core_php_time_limit::raise();\n $starttime = microtime();\n\n // Start output log\n $timenow = time();\n mtrace(\"Server Time: \" . date('r', $timenow) . \"\\n\\n\");\n mtrace(\"Poodll task runner Execute adhoc task: \" . get_class($thetask));\n cron_trace_time_and_memory();\n $predbqueries = null;\n $predbqueries = $DB->perf_get_queries();\n $pretime = microtime(1);\n\n get_mailer('buffer');\n $thetask->execute();\n if ($DB->is_transaction_started()) {\n throw new coding_exception(\"Poodll Task Runner: Task left transaction open\");\n }\n if (isset($predbqueries)) {\n mtrace(\"... used \" . ($DB->perf_get_queries() - $predbqueries) . \" dbqueries\");\n mtrace(\"... used \" . (microtime(1) - $pretime) . \" seconds\");\n }\n mtrace(\"Poodll task runner Adhoc task complete: \" . get_class($thetask));\n \\core\\task\\manager::adhoc_task_complete($thetask);\n } catch (Exception $e) {\n if ($DB && $DB->is_transaction_started()) {\n $DB->force_transaction_rollback();\n }\n if (isset($predbqueries)) {\n mtrace(\"... used \" . ($DB->perf_get_queries() - $predbqueries) . \" dbqueries\");\n mtrace(\"... used \" . (microtime(1) - $pretime) . \" seconds\");\n }\n mtrace(\"Poodll taskrunner Adhoc task failed: \" . get_class($thetask) . \",\" . $e->getMessage());\n if ($CFG->debugdeveloper) {\n if (!empty($e->debuginfo)) {\n mtrace(\"Debug info:\");\n mtrace($e->debuginfo);\n }\n mtrace(\"Backtrace:\");\n mtrace(format_backtrace($e->getTrace(), true));\n }\n \\core\\task\\manager::adhoc_task_failed($thetask);\n }\n get_mailer('close');\n unset($thetask);\n mtrace(\"Poodll task runner completed correctly\");\n\n gc_collect_cycles();\n mtrace('Task runner completed at ' . date('H:i:s') . '. Memory used ' . display_size(memory_get_usage()) . '.');\n $difftime = microtime_diff($starttime, microtime());\n mtrace(\"Execution took \" . $difftime . \" seconds\");\n }", "public function run()\n { \n $output = (string) $this->get('router')->dispatch();\n $response = $this->get('response');\n $response->setBody($output);\n $response->send();\n\n }", "public function run()\r\n {\r\n\r\n }", "protected function run()\n {\n //to use\n\n //$this->task is available here\n //$this->queue is available here\n\n //set $this->exit_response to any value before returning\n //with a EXIT_STATUS. This will be saved to response column of the $task object.\n\n //if you want to retry\n //return self::EXIT_STATUS_RETRY\n\n //if you do not want to retry\n //return self::EXIT_STATUS_RETRY\n\n //if success\n //return self::EXIT_STATUS_OK\n\n\n }", "public function run()\n {\n $items = $this->app->args->getParams('wild');\n list($proj, $env) = SettingFiles::extractProjEnv($items);\n\n $key = $proj . \".\" . $env;\n if (!Check::fileExists($key)) {\n $msg = Facilitator::onNoFileFound($proj, $env);\n \n $this->app->display($msg, 0);\n return;\n }\n\n $settings = SettingFiles::getObject($key);\n $rsync = new Rsync($settings);\n\n $msg = Facilitator::rsyncBanner($proj, $env, $rsync->cmd);\n $this->app->inline($msg);\n\n if ($this->app->args->simulate) {\n $msg = 'Simulation mode' . \"\\n\";\n\n $this->app->display($msg, 0);\n return;\n }\n\n $rsync->run();\n }", "static function runProcessorAndWait() {\n $process_cmd = get_option('hbo_run_processor_cmd');\n if (substr(php_uname(), 0, 7) != \"Windows\" && false === empty($process_cmd)) {\n $command = \"$process_cmd > /dev/null 2>&1\";\n exec( $command );\n }\n }", "public function run($call = null) {\n if (!$call instanceof ModuleCall) {\n //Get the call from request.\n $call = $this->context->getRequest()->buildModuleCall();\n }\n \n try {\n $output = $this->executeCall($call);\n } catch (\\Exception $ex) {\n $unhandledException = $ex instanceof HirudoException ? $ex : new HirudoException($call, \"\", $ex);\n $errorEvent = $this->context->getDispatcher()->dispatch(\"taskError\", new Events\\TaskErrorEvent($unhandledException));\n $output = $errorEvent->getResult();\n }\n\n return $output;\n }", "public function run() {\n }", "public function run() {\n }", "function main()\r\n {\r\n $this->setOutput();\r\n }", "public function needsExecution() {}", "public function needsExecution() {}", "public function needsExecution() {}", "public function needsExecution() {}", "public function needsExecution() {}" ]
[ "0.7225751", "0.65315264", "0.65093315", "0.6449802", "0.6329245", "0.6292994", "0.62482417", "0.6237201", "0.6208822", "0.6208822", "0.6208822", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6187101", "0.6168572", "0.61391", "0.61391", "0.6067364", "0.6067364", "0.59997684", "0.5957398", "0.595161", "0.595161", "0.595161", "0.595161", "0.595161", "0.595161", "0.595161", "0.595161", "0.591653", "0.59146583", "0.5913288", "0.59031457", "0.59031457", "0.59018993", "0.5898114", "0.5896156", "0.5886534", "0.57834935", "0.57820433", "0.5770545", "0.57410187", "0.5688625", "0.56880426", "0.56682116", "0.56671566", "0.5666738", "0.566611", "0.56570977", "0.5653676", "0.564947", "0.56484884", "0.56452924", "0.5644089", "0.56352985", "0.56342393", "0.56278974", "0.5609911", "0.55921084", "0.5588214", "0.5577507", "0.5575623", "0.5573075", "0.5560453", "0.55496204", "0.5532795", "0.5516626", "0.55130094", "0.55130094", "0.5506901", "0.5506901", "0.5506901", "0.5505903", "0.54946256", "0.54911196", "0.5491098", "0.5488228", "0.5487805", "0.54779583", "0.5473021", "0.5461927", "0.5454953", "0.5442607", "0.5442607", "0.5442388", "0.5442388", "0.5442388" ]
0.6179557
27
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("MetricName",$param) and $param["MetricName"] !== null) { $this->MetricName = $param["MetricName"]; } if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) { $this->StartTime = $param["StartTime"]; } if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) { $this->EndTime = $param["EndTime"]; } if (array_key_exists("Period",$param) and $param["Period"] !== null) { $this->Period = $param["Period"]; } if (array_key_exists("Values",$param) and $param["Values"] !== null) { $this->Values = $param["Values"]; } if (array_key_exists("Time",$param) and $param["Time"] !== null) { $this->Time = $param["Time"]; } if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) { $this->RequestId = $param["RequestId"]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "private function __construct()\t{}", "private function init()\n\t{\n\t\treturn;\n\t}", "final private function __construct() {}", "final private function __construct() {}", "final private function __construct(){\r\r\n\t}", "final private function __construct() {\n\t\t\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function _i() {\n }", "protected function fixSelf() {}", "protected function fixSelf() {}", "protected final function __construct() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function init()\n\t{\n\t\t\n\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct() {\r\n\t\t\r\n\t}", "protected function init() {return;}", "final private function __construct()\n\t{\n\t}", "private function __construct () {}", "final private function __construct()\n {\n }", "private final function __construct() {}", "public function __init(){}", "public function helper()\n\t{\n\t\n\t}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct()\n\t{\n\t\t\n\t}" ]
[ "0.62662613", "0.6151871", "0.5989886", "0.5989886", "0.5989886", "0.5989886", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5988404", "0.5988404", "0.5949015", "0.5939596", "0.59168774", "0.59168774", "0.58703923", "0.58665824", "0.5855589", "0.5855589", "0.5855589", "0.5799749", "0.5797107", "0.5797107", "0.57807934", "0.5749856", "0.5749856", "0.5749856", "0.5749856", "0.57458705", "0.5741364", "0.571247", "0.5701768", "0.5694139", "0.5680823", "0.5673589", "0.5668696", "0.5640213", "0.5639332", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5626381", "0.56240404", "0.56240404", "0.5610547" ]
0.0
-1
// FoxNews // E!
function test_link($url){ ini_set('default_socket_timeout', 1); if(!$fp = @fopen($url, "r")) { return false; } else { fclose($fp); return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function news();", "private function yoast_news() {\n\t\t$extra_links = '<li class=\"facebook\"><a href=\"https://www.facebook.com/yoast\">' . __( 'Like Yoast on Facebook', 'helpscout-docs-api' ) . '</a></li>';\n\t\t$extra_links .= '<li class=\"twitter\"><a href=\"https://twitter.com/yoast\">' . __( 'Follow Yoast on Twitter', 'helpscout-docs-api' ) . '</a></li>';\n\t\t$extra_links .= '<li class=\"email\"><a href=\"https://yoast.com/newsletter/\">' . __( 'Subscribe by email', 'helpscout-docs-api' ) . '</a></li>';\n\n\t\t$this->rss_news( 'https://yoast.com/feed/', __( 'Latest news from Yoast', 'helpscout-docs-api' ), $extra_links );\n\t}", "protected function getSystemNews() {}", "function wp_dashboard_events_news()\n {\n }", "function News()\n{\n\t$this->type_moi = \"news\";\n}", "public function getNewsFeed()\n\t{\n\t\treturn \"\";\n\t}", "function frontpage_news_manual(&$db) {\n $newsq = $db->Execute(\"SELECT * FROM `frontpage_news`\");\n if($newsq->numrows()==0) return \"No news to show.\";\n\n while($item = $newsq->fetchrow()) {\n $news .= \"<div style='border:1px solid #CCC;margin:4px;padding:4px;-moz-border-radius-topright:12px;border-radius-topright:12px;'>\n <a>\".$item['title'].\"</a><br />\n <span style='font-size:10px;'>\".date(\"h:i A M jS\",$item['time']).\"</span>\n <p>\".$item['body'].\"</p></div>\";\n }\n return $news;\n}", "function renderJEventsNews()\n\t{\n\n\t\t$cache = Factory::getCache(JEV_COM_COMPONENT, 'view');\n\t\t$cache->setLifeTime(86400);\n\t\t// In Joomla 1.7 caching of feeds doesn't work!\n\t\t$cache->setCaching(true);\n\n\t\t$app = Factory::getApplication();\n\t\tif (!isset($app->registeredurlparams))\n\t\t{\n\t\t\t$app->registeredurlparams = new stdClass();\n\t\t}\n\n\t\t$cache->get($this, 'renderJEventsNewsCached');\n\n\t}", "function warquest_show_breaking_news() { \r\n\r\n\t/* input */\r\n\tglobal $page;\r\n\tglobal $player;\r\n\tglobal $config;\r\n\tglobal $browser;\r\n\r\n\t$page .= '<div class=\"subparagraph\">'.t('HOME_FLASH_NEWS_TITLE').'</div>';\r\n\t$message = '';\r\n\t\r\n\t$language=\"en\";\r\n\tif (isset($player) && (strlen($player->language)>0)) {\r\n\t\t$language=$player->language;\r\n\t} \r\n\t\t\r\n\t$query = 'select date, body, content from news where language=\"en\" order by id desc ';\r\n\t$result = warquest_db_query($query);\r\n\t\t\r\n\twhile ($data=warquest_db_fetch_object($result)) {\r\n\t\t\t\r\n\t\t$message .= '<span class=\"money\">';\r\n\t\t$message .= $data->body;\r\n\t\t$message .= '</span> ';\r\n\t\t$message .= $data->content;\r\n\t\t$message .= ' ';\r\n\t}\r\n\t\t\r\n\t$page .= '<div class=\"box\">';\r\n\t\r\n $page .= '<marquee id=\"breakingnews\" behavior=\"scroll\" direction=\"left\" scrollamount=\"4\">';\r\n\t$page .= $message;\r\n\t$page .= '</marquee>';\r\n\t$page .= '</div>';\r\n\t\r\n\t$page .= '<script language=\"JavaScript\" src=\"'.$config[\"content_url\"].'js/news2.js\" type=\"text/javascript\"></script>';\r\n\t$page .= '<script language=\"JavaScript\">';\r\n\t$page .= 'newsInit('.MENU_SERVICE.','.EVENT_GET_HEADLINES.'); newsCall();';\r\n\t$page .= '</script>';\r\n}", "public function supports_news() {\n return true;\n }", "public function show(news $news)\n {\n //\n }", "function rssreader_last5news($where, $who, $site) {\r\n\t$module = 'rssreader';\r\n\t$data = html_entity_decode( file_get_contents( $site ) );\r\n\t//$data = mb_convert_encoding( $data, 'utf-8', 'utf-8,iso-8859-1,iso-8859-15' );\r\n\t$data = mb_convert_encoding( $data, 'utf-8' );\r\n\t$data = utf8_decode( $data );\r\n\t$data = str_replace('&','&amp;',str_replace('&amp;','&',$data));\r\n\t$data = preg_replace('#<([^@ :/?]+@[^>]+)>#i','\"$1\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^@ :/?]+) dot ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$valid = true;\r\n\ttry {\r\n\t\t$dom = $GLOBALS['modules'][$module]['functions']['XmlLoader']( $data );\r\n\t}\r\n\tcatch( DOMException $e ) {\r\n\t\tprint($e.\"\\n\");\r\n\t\t$valid = false;\r\n\t}\r\n\tif( $valid === false ) {\r\n\t\tsay( $where, $who, 'xml non valide' );\r\n\t\treturn false;\r\n\t}\r\n\t$allitems = $dom->getElementsByTagName( 'item' );\r\n\tfor($i = 0 ; $i < 5 && $i < $allitems->length ; $i++) {\r\n\t\tsay( $where, $who, $allitems->item( $i )->getElementsByTagName( 'title' )->item( 0 )->nodeValue . \"\\r\\n\" );\r\n\t}\r\n\treturn true;\r\n}", "function rssreader_lastnews($where, $who, $site) {\r\n\t$module = 'rssreader';\r\n\t$data = html_entity_decode( file_get_contents( $site ) );\r\n\t//$data = mb_convert_encoding( $data, 'utf-8', 'utf-8,iso-8859-1,iso-8859-15' );\r\n\t$data = mb_convert_encoding( $data, 'utf-8' );\r\n\t$data = utf8_decode( $data );\r\n\t$data = str_replace('&','&amp;',str_replace('&amp;','&',$data));\r\n\t$data = preg_replace('#<([^@ :/?]+@[^>]+)>#i','\"$1\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^@ :/?]+) dot ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$valid = true;\r\n\ttry {\r\n\t\t$dom = $GLOBALS['modules'][$module]['functions']['XmlLoader']( $data );\r\n\t}\r\n\tcatch( DOMException $e ) {\r\n\t\tprint($e.\"\\n\");\r\n\t\t$valid = false;\r\n\t}\r\n\tvar_dump( $valid );\r\n\tif( $valid === false ) {\r\n\t\tsay( $where, $who, 'xml non valide' );\r\n\t\treturn false;\r\n\t}\r\n\t$allitems = $dom->getElementsByTagName( 'item' );\r\n\tsay( $where, $who, $allitems->item( 0 )->getElementsByTagName( 'title' )->item( 0 )->nodeValue . \"\\r\\n\" );\r\n\treturn true;\r\n}", "public function action_index()\n {\n /* SEO対策 */\n $keyword = \"ガンダム,フルブ,コンボ,exvsfb,ダメージ計算,ダメージ\";\n $description = \"最近の更新履歴\";\n $title = \"NEWS | \".HP_NAME;\n\n $this->template->meta_keyword = $keyword;\n $this->template->meta_description = $description;\n $this->template->title = $title;\n\n $this->template->content = View::forge('exvsfb/news/index');\n }", "public function show(News $news)\n {\n //\n }", "public function show(News $news)\n {\n //\n }", "public function show(News $news)\n {\n //\n }", "public function show(News $news)\n {\n //\n }", "function fww_news_rss( $rssUrlNews, $id ) {\n // Do we have this information in our transients already?\n $transient_news = get_transient( 'tna_rss_news_transient' . $id );\n // Yep! Just return it and we're done.\n if( ! empty( $transient_news ) ) {\n echo $transient_news ;\n // Nope! We gotta make a call.\n } else {\n // Get feed source.\n $content = file_get_contents( $rssUrlNews );\n if ( $content !== false ) {\n $x = new SimpleXmlElement( $content );\n $n = 0;\n // Loop through each feed item and display each item\n foreach ( $x->channel->item as $item ) :\n if ( $n == 1 ) {\n break;\n }\n $enclosure = $item->enclosure['url'];\n $pubDate = $item->pubDate;\n $pubDate = date( \"l d M Y\", strtotime( $pubDate ) );\n $img = str_replace( home_url(), '', get_stylesheet_directory_uri() ) . '/img/thumb-news.jpg';\n $link = str_replace( 'livelb', 'www', $item->link );\n $html = '<div class=\"col-sm-6\"><div class=\"card clearfix\">';\n if ( $enclosure ) {\n $html .= '<a href=\"' . $link . '\" title=\"' . $item->title . '\">';\n $html .= '<div class=\"entry-thumbnail\" style=\"background: url(' . $enclosure . ') no-repeat center center;background-size: cover;\">';\n // $html .= '<img src=\"' . $enclosure . '\" class=\"img-responsive\" alt=\"' . $item->title . '\">';\n $html .= '</div></a>';\n }\n if ( !$enclosure ) {\n $html .= '<a href=\"' . $link . '\" title=\"' . $item->title . '\">';\n $html .= '<div class=\"entry-thumbnail\" style=\"background: url(' . $img . ') no-repeat center center;background-size: cover;\">';\n // $html .= '<img src=\"' . $img . '\" class=\"img-responsive\" alt=\"' . $item->title . '\">';\n $html .= '</div></a>';\n }\n $html .= '<div class=\"entry-content\"><small>News</small><h2><a href=\"' . $link . '\">';\n $html .= $item->title;\n $html .= '</a></h2>';\n $html .= '<small>' . $pubDate . '</small>';\n preg_match( \"/<p>(.*)<\\/p>/\", $item->description, $matches );\n $intro = strip_tags($matches[1]);\n $html .= '<p>' . first_sentence( $intro ) . '</p><ul class=\"child\"><li><a href=\"http://www.nationalarchives.gov.uk/about/news/?news-tag=first-world-war&news-view=child\" title=\"Read more news\">More news</a></li></ul></div>';\n $html .= '</div></div>';\n $n ++;\n endforeach;\n set_transient( 'tna_rss_news_transient' . $id, $html, HOUR_IN_SECONDS );\n echo $html;\n }\n else {\n echo '<div class=\"col-md-6\"><div class=\"card\"><div class=\"entry-content\"><h2>First World War news</h2><ul class=\"child\"><li><a href=\"http://www.nationalarchives.gov.uk/about/news/?news-tag=first-world-war&news-view=child\">Join us on our news page</a></li></ul></div></div></div>';\n }\n }\n}", "function frontpage_news_rss($url) {\n $obj = simplexml_load_file($url);\n\n // If an RSS feed:\n if(!empty($obj->channel)) {\n $description = \"description\";\n $pubDate = \"pubDate\";\n $collect = $obj->channel->item;\n // Else an Atom feed\n } else {\n $description = \"content\";\n $pubDate = \"published\";\n $collect = $obj->entry;\n }\n\n foreach($collect as $item) {\n $news .= \"<div style='border:1px solid #CCC;margin:4px;padding:4px;-moz-border-radius-topright:12px;border-radius-topright:12px;'>\n <a href='\".$item->link.\"'>\".$item->title.\"</a><br />\n <span style='font-size:10px;'>\".date(\"h:i A M jS\",strtotime($item->$pubDate)).\"</span>\n <p>\".$item->$description.\"</p></div>\";\n }\n\n return $news;\n}", "public function working_mom_news(){\r\n\t\t\r\n\t\t/* Get model */\r\n\t\t$itemsModel = $this->getModel('items');\r\n\t\t$itemsModel->set('category', $this->get('category'));\r\n\t\t\r\n\t\t/* Get data */\r\n\t\t$latestNews = $itemsModel->getLatest('news', 0, 4);\r\n\t\t\r\n\t\t/* Display data */\r\n\t\tinclude(BLUPATH_TEMPLATES . '/site/modules/working_mom_news.php');\r\n\t\t\r\n\t}", "function b_news_bigstory_show() {\n\tinclude_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';\n include_once XOOPS_ROOT_PATH.\"/modules/news/class/class.newsstory.php\";\n $myts =& MyTextSanitizer::getInstance();\n\t$restricted=getmoduleoption('restrictindex');\n\t$dateformat=getmoduleoption('dateformat');\n\t$infotips=getmoduleoption('infotips');\n\n\t$block = array();\n $onestory = new NewsStory();\n\t$stories = $onestory->getBigStory(1,0,$restricted,0,1, true, 'counter');\n\tif(count($stories)==0) {\n\t\t$block['message'] = _MB_NEWS_NOTYET;\n\t} else {\n\t\tforeach ( $stories as $key => $story ) {\n\t\t\t$htmltitle='';\n\t\t\tif($infotips>0) {\n\t\t\t\t$block['infotips'] = xoops_substr(strip_tags($story->hometext()),0,$infotips);\n\t\t\t\t$htmltitle=' title=\"'.$block['infotips'].'\"';\n\t\t\t}\n\t\t\t$block['htmltitle']=$htmltitle;\n\t\t\t$block['message'] = _MB_NEWS_TMRSI;\n\t\t\t$block['story_title'] = $story->title('Show');\n\t\t\t$block['story_id'] = $story->storyid();\n\t\t\t$block['story_date'] = formatTimestamp($story->published(), $dateformat);\n\t\t\t$block['story_hits'] = $story->counter();\n $block['story_rating'] = $story->rating();\n $block['story_votes'] = $story->votes();\n $block['story_author']= $story->uname();\n $block['story_text']= $story->hometext();\n $block['story_topic_title']= $story->topic_title();\n $block['story_topic_color']= '#'.$myts->displayTarea($story->topic_color);\n\t\t}\n\t}\n\treturn $block;\n}", "function ShowNewsFromURL()\n{\n\t$str0=\"select value1 from options where name='newsfromurl'\";\n\t$result0=mysql_query($str0) or die(mysql_error());\n\t$row0=mysql_fetch_array($result0);\n\tif ($row0['value1']==1)\n\t{ \n\n\t\techo(\"<tr><td bgcolor='\");\n\t\techo(background());\n\t\techo(\"' class='leftmenumainitem' width='216'\");\n\t\techo(\"valign='top'><img src='image/point.jpg' />&nbsp;&nbsp;\");\n\t\techo(getPara('newsfromurl','value2'));\n\t\techo(\"</td>\");\n\t\techo(\"</tr><tr><td height='176'>\");\n\t\techo(\"<marquee height='170' onmouseover=this.stop() onmouseout=this.start() \");\n\t\techo(\"scrollamount='1' scrolldelay='80' truespeed='true' direction=up>\");\n\t\techo(\"<div class='topnews'>\");\n\t\t\n\t\t$content = file_get_contents(getPara('newsfromurl','value3'));\n\t\t$x = new SimpleXmlElement($content);\n\t\t$s=\"\";\n\t\tforeach($x->channel->item as $entry) \n\t\t{\n\t\t\t$s.=\"<a target='_blank' href='\".$entry->link.\"'>\" . $entry->title . \"</a><br><br>\";\n\t\t}\n\n\t\techo($s);\n\t\techo(\"</div></marquee></td></tr>\");\n \t}\n\tmysql_free_result($result0);\n}", "public function __construct(News $news)\n {\n $this->news = $news;\n }", "public function show(NewsReplie $newsReplie)\n {\n //\n }", "public function show(NewsFeed $newsFeed)\n {\n //\n }", "function _worx_news_node_info() {\n $items = array(\n 'news' => array(\n 'name' => t('News'),\n 'module' => 'features',\n 'description' => t('Create News articles to keep your visitors up to date with all the new information you have to share with them.'),\n 'has_title' => '1',\n 'title_label' => t('Headline'),\n 'has_body' => '1',\n 'body_label' => t('Article'),\n 'min_word_count' => '0',\n 'help' => '',\n ),\n );\n return $items;\n}", "function page_news() {\r\n\t\tglobal $_GET, $_POST, $actual_user_showname, $actual_user_id;\r\n\t\t\r\n\t\t$out = \"\";\r\n\t\t$action = \"\";\r\n\t\t$id = 0;\r\n\t\t$text = \"\";\r\n\t\t$title = \"\";\r\n\r\n\t\tif(isset($_GET['action']) || isset($_POST['action'])) {\r\n\t\t\tif(isset($_GET['action']))\r\n\t\t\t\t$action = $_GET['action'];\r\n\t\t\telse\r\n\t\t\t\t$action = $_POST['action'];\r\n\t\t\r\n\t\t\tif(isset($_GET['id']))\r\n\t\t\t\t$id = $_GET['id'];\r\n\t\t\telseif(isset($_POST['id']))\r\n\t\t\t\t$id = $_POST['id'];\r\n\t\t\r\n\t\r\n\t\t\tif(isset($_GET['text']) || isset($_POST['text'])) {\r\n\t\t\t\tif(isset($_GET['text']))\r\n\t\t\t\t\t$text = $_GET['text'];\r\n\t\t\t\telse\r\n\t\t\t\t\t$text = $_POST['text'];\r\n\t\t\t}\r\n\r\n\t\t\tif(isset($_GET['title']) || isset($_POST['title'])) {\r\n\t\t\t\tif(isset($_GET['title']))\r\n\t\t\t\t\t$title = $_GET['title'];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t$title = $_POST['title'];\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// delete the selected entrie\r\n\t\t\t//\r\n\t\t\tif($action == \"delete\") {\r\n\t\t\t\tif(isset($_GET['sure']) || isset($_POST['sure'])) {\r\n\t\t\t\t\tif(isset($_GET['sure']))\r\n\t\t\t\t\t\t$sure = $_GET['sure'];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$sure = $_POST['sure'];\r\n\t\t\t\t\r\n\t\t\t\t\tif($sure == 1)\r\n\t\t\t\t\t\tdb_result(\"DELETE FROM \" . DB_PREFIX . \"news WHERE id=\" . $id);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"news WHERE id=\" . $id);\r\n\t\t\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t\t\t$out .= \"Den News Eintrag &quot;\" . $row->title . \"&quot; wirklich löschen?<br />\r\n\t\t\t\t<a href=\\\"admin.php?page=news&amp;action=delete&amp;id=\" . $id . \"&amp;sure=1\\\" title=\\\"Wirklich Löschen\\\">ja</a> &nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t<a href=\\\"admin.php?page=news\\\" title=\\\"Nicht Löschen\\\">nein</a>\";\r\n\t\t\t\t\r\n\t\t\t\t\treturn $out;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// add a new entrie\r\n\t\t\t//\r\n\t\t\telseif($action == \"new\") {\r\n\t\t\t\tif($text != \"\" && $title != \"\")\r\n\t\t\t\t\tdb_result(\"INSERT INTO \".DB_PREFIX.\"news (title, text, date, userid) VALUES ('\".$title.\"', '\".$text.\"', '\".mktime().\"', '$actual_user_id')\");\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// update the selected entrie\r\n\t\t\t//\r\n\t\t\telseif($action == \"update\") { \r\n\t\t\t\tif($text != \"\" && $title != \"\" && $id != 0)\r\n\t\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"news SET title= '\".$title.\"', text= '\".$text.\"' WHERE id=\".$id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t// don't show the add new form if it is sure that the user wants to edit a news entrie\r\n\t\t//\r\n\t\tif($action != \"edit\") {\r\n\t\t\t$out .= \"\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"news\\\" />\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new\\\" />\r\n\t\t\tTitel: <input type=\\\"text\\\" name=\\\"title\\\" maxlength=\\\"60\\\" value=\\\"\\\" /><br />\r\n\t\t\t<textarea cols=\\\"60\\\" rows=\\\"6\\\" name=\\\"text\\\"></textarea><br />\r\n\t\t\tEingelogt als \" . $actual_user_showname . \" &nbsp;<input type=\\\"submit\\\" value=\\\"Senden\\\" /><br />\r\n\t\t</form>\";\r\n\t\t}\r\n\t\t\t$out .= \"\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"news\\\" />\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t<table>\\r\\n\";\r\n\t\t//\r\n\t\t// write all news entries\r\n\t\t//\r\n\t\t$result = db_result(\"SELECT * FROM \".DB_PREFIX.\"news ORDER BY date DESC\");\r\n\t\twhile($row = mysql_fetch_object($result)) {\r\n\t\t\t//\r\n\t\t\t// show an editform for the selected entrie\r\n\t\t\t//\r\n\t\t\tif($id == $row->id && $action == \"edit\") {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\" id=\\\"newsid\" . $row->id . \"\\\">\r\n\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"\".$row->id.\"\\\" />\r\n\t\t\t\t\t\t<input type=\\\"submit\\\" value=\\\"Speichern\\\" />\r\n\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=news&amp;action=delete&amp;id=\".$row->id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"title\\\" value=\\\"\".$row->title.\"\\\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\".date(\"d.m.Y H:i:s\", $row->date).\"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t<textarea name=\\\"text\\\" cols=\\\"60\\\" rows=\\\"6\\\">\".$row->text.\"</textarea>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\" . getUserByID($row->userid) . \"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\";\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// show only the entrie\r\n\t\t\t//\r\n\t\t\telse {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t<a id=\\\"newsid\".$row->id.\"\\\" ></a>\r\n\t\t\t\t\t\t<a href=\\\"admin.php?page=news&amp;action=edit&amp;id=\".$row->id.\"#newsid\".$row->id.\"\\\" title=\\\"Bearbeiten\\\">Bearbeiten</a>\r\n\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=news&amp;action=delete&amp;id=\".$row->id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<b>\".$row->title.\"</b>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\".date(\"d.m.Y H:i:s\", $row->date).\"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\".nl2br($row->text).\"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\".getUserByID($row->userid).\"\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= \"\\t\\t\\t</table>\r\n\t\t</form>\\r\\n\";\r\n\t\r\n\t\treturn $out;\r\n\t}", "protected function getFeed_NewsService()\n {\n return new \\phpbb\\feed\\news(${($_ = isset($this->services['feed.helper']) ? $this->services['feed.helper'] : $this->getFeed_HelperService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, ${($_ = isset($this->services['content.visibility']) ? $this->services['content.visibility'] : $this->getContent_VisibilityService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, 'php');\n }", "function newsarticle () {\n return NewsArticleModule::getInstance();\n}", "function rss_simplepie_show_feed() {\r\n}", "function main($content, $conf) {\n\n\t\t// some basic stuff:\n\t\t$ts = time();\n\t\t$base_url = $GLOBALS['TSFE']->tmpl->setup['config.']['baseURL'];\n\t\t$this->eventRecordPid = $conf['eventRecordPid'];\n\t\t\n\t\t$content = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n\t\t<rss version=\"2.0\" >\n\t\t<channel>';\n\t\t\n\t\t$content .= '<title>RSS Feed YOURWEBSITE.TLD</title>\n\t\t\t\t\t<link>http://www.YOURWEBSITE.TLD</link>\n\t\t\t\t\t<description>Alle Veranstaltungen im Ueberblick</description>';\n\t\t$content .= '<language>de-de</language>\n\t\t\t\t\t<copyright>'. date('Y') .' by YOURWEBSITE.TLD</copyright>';\n\t\t\n\t\t$content .= '<image>\n\t\t\t<title>Aktuelle Veranstaltungen</title>\n\t\t\t<url>http://YOURWEBSITE.TLD/typo3conf/ext/kb_eventboard/res/rss_icon_16x16.gif</url>\n\t\t\t<link>http://www.YOURWEBSITE.TLD/</link>\n\t\t\t<width>16</width>\n\t\t\t<height>16</height>\n\t\t\t<description>Aktuelle Veranstaltungen</description>\n\t\t</image>';\n\n\t\t\t\t\n\t\t\t\t$select_fields = '*';\n\t\t\t\t$from_table = 'tx_kbeventboard_events'; // table of your extension\n\t\t\t\t$where = \"pid = \".$this->eventRecordPid.\" AND deleted = 0 AND hidden = 0 AND datebegin > \".$ts.\"\";\n\t\n\t\t\t\t$group = '';\n\t\t\t\t$order = 'datebegin ASC';\n\t\t\t\t$limit = '40';\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select_fields, $from_table, $where, $group, $order, $limit);\n\t\t\t\t\n\t\t\t\t$sql = $GLOBALS['TYPO3_DB']->SELECTquery($select_fields, $from_table, $where, $group, $order, $limit);\n\n\n\t\t\t\t// now put in all the items:\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n\n\t\t\t\t\t$pubDate = date('D, d M Y H:i:s O', $row[\"datebegin\"]); // timestamp in the correct format for the rss feed\n\t\t\t\t\t$link_to_detailpage = $base_url . 'index.php?id='.$conf[\"singlePid\"].'&amp;tx_kbeventboard_pi1[evt]='.$row[\"uid\"]; // link to the page with the detail view\n\t\t\t\t\t$description = substr(strip_tags($row[\"eventdescription\"]), 0, $conf[\"maxChars\"]) . ' [...]';\n\t\t\t\t\t$eventTitle = strip_tags($row[\"eventname\"]);\n\t\t\t\t\t\n\t\t\t\t\t$filter = array(\n\t\t\t\t\t\t\t\t'&nbsp;'=>'', '&quote;'=>'\"', '& ' => ' +'\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach ($filter as $from => $to) {\n\t\t\t\t\t\t$description = str_replace($from, $to, $description);\n\t\t\t\t\t\t$eventTitle = str_replace($from, $to, $eventTitle);\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\t$content .= '<item>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<title>'.date('d-m-Y',$row[\"datebegin\"]).': '.$eventTitle.'</title>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<link>'.$link_to_detailpage.'</link>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<description>'.$description.'</description>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<guid>'.$link_to_detailpage.'</guid>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<pubdate>'.$pubDate.'</pubdate>' . \"\\n\";\n\t\t\t\t\t$content .= '</item>';\n\t\t\t\t}\n\n\t\t\t$content .= '</channel>';\n\t\t$content .= '</rss>';\n\n\t\treturn $content;\n\t}", "function aidtransparency_print_events()\r\n{\r\n $events = new IATI_Event_Collection();\r\n if( $events->findPosts() > 0 ) :\r\n ?>\r\n <ol>\r\n <?php\r\n foreach ($events->getPosts() as $event) :\r\n ?>\r\n <li><a href=\"<?php echo get_permalink($event->ID); ?>\" title=\"<?php echo $event->post_title; ?>\"><?php echo $event->post_title; ?></a>\r\n <span class=\"when\"><?php echo $event->getWhere(); ?> </span>\r\n </li>\r\n <?php endforeach; ?>\r\n </ol>\r\n <?php endif;\r\n}", "function the_title_rss()\n {\n }", "function enh_latest_news_text($mod_id, $nl_url, $ModName) {\n\n// get vars\n $prefix = pnConfigGetVar('prefix');\t\t\n list($dbconn) = pnDBGetConn();\n\t $pntable =& pnDBGetTables();\n\n $language = pnConfigGetVar('language');\n\n// name the lang file the same as this file\n include(\"modules/$ModName/modules/lang/$language/enhnews.php\");\n\n// get the module setting from the database\n\t $modsql = \"SELECT mod_qty, mod_data FROM $prefix\"._nl_modules.\" WHERE mod_id = '$mod_id'\";\n\t\t$result = $dbconn->Execute($modsql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n if (!$result->EOF) {\n\t list($mod_qty, $mod_data) = $result->fields;\n } else {\n\t\t // take care od errors?\n\t\t}\n\n// clear the output variable\n// title of the page to show up\n\t $output =\"\"._ENHLATESTARTICLES.\":\\n\\n\";\n\n// query the database and generate your output in the amount of mod_qty\n\t $sql = \"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_informant, pn_time \n\t\t FROM $pntable[stories] \n\t\t WHERE pn_ihome = '0' ORDER BY pn_time DESC limit 0,$mod_qty\";\n\n\t\t$result = $dbconn->Execute($sql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n\t\t\t\t\t\t\n while(!$result->EOF) {\n\t\t list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_informant, $pn_time) = $result->fields;\n\t\t\t\t$result->MoveNext(); \n\t\t $output .= \"$pn_title\\n\";\n\t\t $output .= \"$pn_hometext\\n\";\n\t\t if ($pn_bodytext) {\n\t\t\t $output .= \"\"._READMORE.\": $nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\n\";\n\t\t\t }\n\t\t $output .= \"\\n\";\n\t\t}\n\n// strip the slashes out all at once\n\t $output = stripslashes($output);\n\n// send the output to the system (it must be output and not another variable name)\n\t return $output;\n}", "public function testGetNews()\n {\n $oNews = oxNew('news');\n $oNewsList = $oNews->getNews();\n\n $this->assertEquals(2, $oNewsList->count());\n\n $oItem = $oNewsList->current();\n $this->assertEquals(2, $oItem->getId());\n\n $oNewsList->next();\n $oItem = $oNewsList->current();\n $this->assertEquals(1, $oItem->getId());\n }", "private function rss_news( $feed, $title, $extra_links = '' ) {\n\t\t$content = get_transient( 'helpscout-docs-api-feed' );\n\t\tif ( empty( $content ) ) {\n\t\t\tinclude_once ABSPATH . WPINC . '/feed.php';\n\t\t\t$rss = fetch_feed( $feed );\n\n\t\t\tif ( is_wp_error( $rss ) ) {\n\t\t\t\t$rss = '<li class=\"yoast\">' . __( 'No news items, feed might be broken...', 'helpscout-docs-api' ) . '</li>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$rss_items = $rss->get_items( 0, $rss->get_item_quantity( 5 ) );\n\n\t\t\t\t$rss = '';\n\t\t\t\tforeach ( $rss_items as $item ) {\n\t\t\t\t\t$url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocols = null, 'display' ) );\n\t\t\t\t\t$rss .= '<li class=\"yoast\">';\n\t\t\t\t\t$rss .= '<a href=\"' . $url . '#utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsitem&utm_campaign=clickywpplugin\">' . $item->get_title() . '</a> ';\n\t\t\t\t\t$rss .= '</li>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$content = '<ul>';\n\t\t\t$content .= $rss;\n\t\t\t$content .= $extra_links;\n\t\t\t$content .= '</ul>';\n\n\t\t\tset_transient( 'helpscout-docs-api-feed', $content );\n\t\t}\n\n\t\t$this->box( $title, $content );\n\t}", "public function goodNews() {\n return $this->randomItem(\n \"You'll be pleased to know\",\n 'Good news!',\n 'Ta-da.',\n 'Woohoo,',\n 'Here you go!',\n 'Yes!'\n );\n }", "function getEventsFeed($args = array()) {\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t$esc_chars = \",;\\\\\";\n\n\t \t// Get Page url if any\n\t \t$page_id = intval(get_option('fse_page'));\n\t \tif (!empty($page_id)) {\n\t \t\t$page_url = get_permalink($page_id);\n\t \t\tif (!empty($page_url)) {\n\t \t\t\tif (strpos($page_url, '?') === false)\n\t \t\t\t$page_url .= '?event=';\n\t \t\t\telse\n\t \t\t\t$page_url .= '&event=';\n\t \t\t}\n\t \t}\n\n\t \t$feed = array();\n\t \t$feed[] = 'BEGIN:VCALENDAR';\n\t \t$feed[] = 'METHOD:PUBLISH';\n\t \t$feed[] = 'PRODID:http://www.faebusoft.ch/webentwicklung/wpcalendar/';\n\t \t$feed[] = 'VERSION:2.0';\n\t \t$feed[] = 'X-WR-TIMEZONE:'.get_option('timezone_string');\n\n\t \t//print_r($events);\n\n\t \tforeach($events as $e) {\n\n\t \t\t$feed[] = 'BEGIN:VEVENT';\n\n\t \t\t$feed[] = 'UID:'.get_bloginfo('url').'/feed/ical/'.$e->eventid;\n\t \t\t//$feed[] = 'UID:'.md5(uniqid());\n\n\t \t\t// Add description\n\t \t\t$feed[] = 'DESCRIPTION:'.str_replace(array(\"\\r\",\"\\n\"), array('','\\n'),addcslashes(trim(strip_tags($e->getDescription())), $esc_chars));\n\n\t \t\t// Categories\n\t \t\tforeach($e->categories_t as $k => $c) {\n\t \t\t\t$e->categories_t[$k] = addcslashes($c, $esc_chars);\n\t \t\t}\n\t \t\t$feed[] = 'CATEGORIES:'.implode(',',$e->categories_t);\n\n\t \t\t// Location\n\t \t\t$feed[] = 'LOCATION:'.addcslashes($e->location, $esc_chars);\n\n\t \t\t// Summary\n\t \t\t$feed[] = 'SUMMARY:'.addcslashes($e->subject, $esc_chars);\n\n\t \t\t// Times\n\t \t\tif ($e->allday == true) {\n\t \t\t\t$feed[] = 'DTSTART;TZID='.get_option('timezone_string').';VALUE=DATE:'.mysql2date('Ymd', $e->from);\n\n\t \t\t\t// End has to be + 1!\n\t \t\t\t$end = strtotime($e->to)+(60*60*24);\n\t \t\t\t$feed[] = 'DTEND;TZID='.get_option('timezone_string').';VALUE=DATE:'.date('Ymd', $end);\n\t \t\t} else {\n\t \t\t\t$feed[] = 'DTSTART;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->from);\n\t \t\t\t$feed[] = 'DTEND;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->to);\n\t \t\t}\n\n\t \t\t// Classification\n\t \t\t$feed[] = 'CLASS:PUBLIC';\n\n\t \t\t// Publish Date of event\n\t \t\t$feed[] = 'DTSTAMP;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->publishdate);\n\n\t \t\t// URL of event\n\t \t\tif (!empty($e->postid)) {\n\t \t\t\t$feed[] = 'URL:'.get_permalink($e->postid);\n\t \t\t} elseif (!empty($page_url)) {\n\t \t\t\t$feed[] = 'URL:'.$page_url.$e->eventid;\n\t \t\t}\n\n\t \t\t$feed[] = 'END:VEVENT';\n\t \t}\n\n\t \t$feed[] = 'END:VCALENDAR';\n\n\t \t// Now trim all date to maxium 75chars\n\t \t$output = '';\n\t \tforeach ($feed as $f) {\n\t \t\t$new_line = true;\n\t \t\twhile(strlen($f) > 0) {\n\t \t\t\tif (!$new_line) {\n\t \t\t\t\t$output .= \"\\r\\n \"; // Add CRLF + Space!\n\t \t\t\t}\n\t \t\t\t$output .= substr($f, 0, 72);\n\t \t\t\t// String kürzen\n\t \t\t\tif (strlen($f) > 72) {\n\t \t\t\t\t$f = substr($f, 72);\n\t \t\t\t\t$new_line = false;\n\t \t\t\t} else {\n\t \t\t\t\t$f = '';\n\t \t\t\t}\n\t \t\t}\n\t \t\t$output .= \"\\r\\n\";\n\t \t}\n\n\t \treturn $output;\n\t }", "public function __construct()\n {\n parent::__construct();\n $this->init('oxnews');\n }", "function get_news(){\n\t\tif($result = $this->db->query('SELECT * FROM news WHERE id<>1 ORDER BY add_date DESC LIMIT 50')){\n\t\t\t$return = '';\n\t\t\twhile($r = $result->fetch_object()){\n\t\t\t\t$return .= '<p>id: '.$r->id.' | '.htmlspecialchars($r->title).'</p>';\n\t\t\t\t$return .= '<hr/>';\n\t\t\t}\n\t\t\treturn $return;\n\t\t}\n\t}", "function ViewDetail_Item_news( $tbl_news, $id ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_news WHERE id = '$id'\");\n\t\t$result = mysql_fetch_object($sql);\n\t\treturn $result;\n\t}", "public function show(newsAstron $newsAstron)\n {\n return \"Hello-1\";\n }", "public function actionNews()\n {\n $title = '微站设置/图文设置';\n //title of webpage,you can find title in /web/pub/top.php eg:wechat demo\n $keywords = 'wechat demo';\n //title of webpage,you can find title in /web/pub/top.php eg:''\n $description = '';\n return $this -> render('news',[\n 'title' => $title,//title of webpage,you can find title in the head of /web/pub/top.php\n 'keywords' => $keywords,//keywords of webpage,you can find keywords in the head of /web/pub/top.php\n 'description' => $description//description of webpage,you can find description in the head of /web/pub/top.php\n ]);\n }", "function ll_team_news_section() {\n\techo '<article class=\"entry\">';\n\techo '<h2>Latest</h2>';\n\t$rows = get_field( 'team_news_entries' );\n\tif ( $rows ) {\n\t\techo '<div class=\"home-news\">';\n\t\tforeach ( $rows as $row ) {\n\t\t\techo '<section><div class=\"news-widget\">' . $row['team_news_entry'] . '</div></section>';\n\t\t}\n\t\techo '</div>';\n\t}\n}", "function __construct() {parent::__construct ('featured_news_widget', __('Featured News', 'linnet'), array ('description' => __('This widget displays a featured news', 'linnet'), ));}", "public function gameNews() {\n\t\t$game = $this->getGame();\n\t\tif (!$game) {\n DooUriRouter::redirect(Doo::conf()->APP_URL);\n return FALSE;\n }\n\t\t$list = array();\n\t\t$blog = new News();\n\t\t$list['NewsCategoriesType'] = NEWS_GAMES;\n\t\t$list['infoBox'] = MainHelper::loadInfoBox('News', 'index', true);\n\t\t$list['game'] = $game;\n\n\t\t$blogTotal = $news->getTotalByType($game->ID_GAME, GAME);\n\t\t$pager = $this->appendPagination($list, $news, $newsTotal, $game->NEWS_URL.'/page');\n\t\t$list['gameNews'] = $news->getNewsByType($game->ID_GAME, GAME, $pager->limit);\n\n $data['title'] = $this->__('Game News');\n $data['body_class'] = 'game_news';\n $data['selected_menu'] = 'news';\n $data['left'] = PlayerHelper::playerLeftSide();\n $data['right'] = PlayerHelper::playerRightSide();\n $data['content'] = $this->renderBlock('news/gameNews', $list);\n $data['footer'] = MainHelper::bottomMenu();\n $data['header'] = MainHelper::topMenu();\n $this->render3Cols($data);\n }", "public static function editNews($news_data)\n {\n }", "public function movies_divx()\n\t{\n\t\tif (preg_match('/^\\(www\\.Thunder-News\\.org\\) .+? - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Movieland Post Voor FTN - [01/43] - \"movieland0560.par2\" yEnc\n\t\tif (preg_match('/^[a-zA-Z ]+Post Voor FTN - \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Disney short films collection by mayhem masta\"1923 - Alice's Wonderland.vol15+7.par2\" yEnc\n\t\tif (preg_match('/.+?by mayhem masta\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(http://dream-of-usenet.info) - [01/43] - \"Nicht.auflegen.2002.German.DL.AC3.BDRip.XviD-iNCEPTiON.nfo\" yEnc\n\t\tif (preg_match('/^\\(.+usenet\\.info\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[######]-[FULL]-[#hdtv@LinkNet]-[Sesame.Street.S41E03.1080i.HDTV.DD5.1.MPEG2-TrollHD]-[00/51] - \"Sesame Street S41E03 Chicken When It Comes to Thunderstorms 1080i HDTV DD5.1 MPEG2-TrollHD.nzb\" yEnc\n\t\tif (preg_match('/\\[#]+\\]-\\[.+\\]-\\[.+\\]-\\[(.+)\\][- ]\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[ Rules.of.Engagement.S06E12.720p.WEB-DL.DD5.1.H.264-CtrlHD ]-[01/24] - \"Rules.of.Engagement.S06E12.720p.WEB-DL.DD5.1.H.264-CtrlHD.nfo\" yEnc\n\t\tif (preg_match('/^\\[ ([a-zA-Z0-9.-]{6,}) \\]-\\[\\d+\\/\\d+\\] - \".+\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function wp_print_community_events_markup()\n {\n }", "public function addNews(){\n $this->assign('typeList', $this->get_type_list());\n $this->display();\n }", "function news_feed($o){\r\n\t\t//sets some globals and vars\r\n\tglobal $org_id;\r\n\tglobal $server_name;\r\n\tglobal $base;\r\n\t$counter=1;\r\n\t$template = file_get_contents($o['template_file']);\r\n\tif($template === false){\r\n\t\techo '<br><br><br><br><center><b>Template not set. Please set template.</b></center><br><br><br><br>';\r\n\t\treturn;\r\n\t}\r\n\t\t//gets the json feed of $events\r\n\t$ch = \tcurl_init();\r\n\tcurl_setopt($ch, CURLOPT_URL, 'https://www.'.$server_name.'/members/news_xml/'.$org_id.'_rss.json');\r\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) ;\r\n\t\t$data = array('org_code' => $org_id,\r\n\t\t'username' => $username,\r\n\t\t'password' => $password\r\n\t);\r\n\t$data = curl_exec($ch);\r\n\t$news_items = json_decode($data, true);\r\n\t\t//uncomment the next part to see all your mistakes!\r\n\t// echo '<pre>';\r\n\t// print_r($events);\r\n\t// echo '<pre>';\r\n\t// die();\r\n\t\r\n\t\r\n\t\r\n\t$replace_keys = array(\r\n\t\t'##DATE##',\r\n\t\t'##DAY##',\r\n\t\t'##MONTH##',\r\n\t\t'##YEAR##',\r\n\t\t\r\n\t\t'##TITLE##',\r\n\t\t'##DESCRIPTION##',\r\n\t\t'##URL##',\r\n\t\t'##MORE_LINK##',\r\n\t\t'##IMAGE##'\r\n\t);\r\n\t\r\n\t//start the looooooooooop!\r\n\tif (count($news_items) < 1){\r\n\t\techo '<br><br><br><br><center><b>No Current News</b></center><br><br><br><br>';\r\n\t} else {\r\n\t\tif($o['newest_first'] == true){\r\n\t\t\trsort($news_items);\r\n\t\t}\r\n\t\tforeach ($news_items as $news){\r\n\t\t\t\t//continue test\r\n\t\t\t\t//skip this event if A) max number of events has been reached OR B) if it's an empty event record OR C) The event startdate is before today\r\n\t\t\tif(/*A*/$o['number_of_news_items'] !== false && $o['number_of_news_items'] < $counter || /*B*/ $news['news_id'] == '' || ($o['news_categories'] != '' && !in_array($o['news_categories'],$news['news_cats'])) ){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\t//setting more vars!\r\n\t\t\t$news_id\t= $news['news_id'];\r\n\t\t\t\r\n\t\t\t\t// full details URL and \"more\" link \r\n\t\t\t$target = ($o['open_links_in_new_tab'] == true)?' target=\"_blank\" ':'';\r\n\t\t\t\r\n\t\t\tif (substr($news['link'], -3) == \"htm\"){\r\n\t\t\t\t$details_url = $base.'news_manager.php?page='.$news_id;\r\n\t\t\t} else {\r\n\t\t\t\t$details_url = $news['link'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($o['read_more_link'] !== false && $o['read_more_link'] != '' && $details_url != ''){\r\n\t\t\t\t$news_more_link = '<a class=\"news-more-info-link\" '.$target.' href=\"'.$details_url.'\">'.$o['read_more_link'].'</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$news_more_link = '';\r\n\t\t\t}\r\n\t\t\t\t//Get the news image and put it in an image tag\r\n\t\t\tif(count($news['image'])>0){\r\n\t\t\t\t$news_image = '<img src=\"'.$news['image']['url'].'\" />';\r\n\t\t\t}\r\n\t\t\t\t//set title link or not\r\n\t\t\tif($o['title_as_link'] === true && $details_url != ''){\r\n\t\t\t\t$news_title = '<a class=\"news-title-link\" '.$target.' href=\"'.$details_url.'\">'.$news['title'].'</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$news_title = $news['title'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t// format the blurb: remove tags, handle text limits\r\n\t\t\t$news_blurb = $news['description'];\r\n\t\t\tif($o['desc_text_limit'] !== false){\r\n\t\t\t\tif($o['desc_text_hard_break'] === false){\r\n\t\t\t\t\t$news_blurb = (strlen($news_blurb)>$o['desc_text_limit'])? substr($news_blurb, 0, strpos($news_blurb, ' ', $o['desc_text_limit'])).'... ': $news_blurb;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$news_blurb = (strlen($news_blurb)>$o['desc_text_limit'])? substr($news_blurb, 0, $o['desc_text_limit']).'... ': $news_blurb;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$replace_values = array(\r\n\t\t\t\tdate($o['format_full_date'],strtotime($news['publish_date'])),\r\n\t\t\t\tdate($o['format_day'],strtotime($news['publish_date'])),\r\n\t\t\t\tdate($o['format_month'],strtotime($news['publish_date'])),\r\n\t\t\t\tdate($o['format_year'],strtotime($news['publish_date'])),\r\n\t\t\t\t\r\n\t\t\t\t$news_title,\r\n\t\t\t\t$news_blurb,\r\n\t\t\t\t$details_url,\r\n\t\t\t\t$news_more_link,\r\n\t\t\t\t$news_image\r\n\t\t\t);\r\n\t\t\techo str_replace($replace_keys,$replace_values,$template);\r\n\t\t\t++$counter;\r\n\t\t}\r\n\t}\r\n}", "function show_news_fullview()\n {\n $awp_news_settings = get_option('awp_news_settings'); \n $awp_news = $this->getAllNewsForfullView();\n ob_start();\n if(empty($awp_news_settings))\n \t{ \n \t\techo awp_messagelist('newsconfigure-display-page'); //News are not configured.\n \t}else if(empty($awp_news[allnews]))\n\t { \n\t \techo awp_messagelist('news-display-page'); //News are not found.\n\t }else { include $awp_news['templatefile']; }\n\t \n\t \n $show_news = ob_get_clean();\n return $show_news;\n }", "function _ec_news_node_info() {\n $items = array(\n 'news' => array(\n 'name' => t('News'),\n 'module' => 'features',\n 'description' => '',\n 'has_title' => '1',\n 'title_label' => t('Title'),\n 'has_body' => '1',\n 'body_label' => t('Body'),\n 'min_word_count' => '0',\n 'help' => '',\n ),\n 'news_feed' => array(\n 'name' => t('News Feed'),\n 'module' => 'features',\n 'description' => t('Feed which generates nodes of type \"news\". It is created by the \"master\" importer and contains a link to the remote news feed at the Master Template.'),\n 'has_title' => '1',\n 'title_label' => t('Title'),\n 'has_body' => '0',\n 'body_label' => '',\n 'min_word_count' => '0',\n 'help' => '',\n ),\n );\n return $items;\n}", "function __construct() \n\t{\t\t\n\t\tparent::__construct('featured_event', __('Featured event'), array( 'description' => __('Add a featured event to sidebar.'), 'classname' => 'widget-events'));\n\t}", "function wp_title_rss($deprecated = '&#8211;')\n {\n }", "public function actionNewsAndEvents() {\n $baner_image = \\common\\models\\BanerImages::findOne(1);\n $meta_tags = \\common\\models\\MetaTags::find()->where(['id' => 6])->one();\n $events = \\common\\models\\NewsEvents::find()->where(['status' => 1])->all();\n \\Yii::$app->view->registerMetaTag(['name' => 'keywords', 'content' => $meta_tags->meta_keyword]);\n \\Yii::$app->view->registerMetaTag(['name' => 'description', 'content' => $meta_tags->meta_description]);\n return $this->render('news', [\n 'events' => $events,\n 'meta_tags' => $meta_tags,\n 'baner_image' => $baner_image,\n ]);\n }", "public function getNews() {\n\t\treturn $this->news;\n\t}", "function list_home_news_focus ($start=0, $num_show = 6)\n\t{\n\t\tglobal $ttH;\n\t\t$sql = \"select *\n\t\t\t\t\t\tfrom news\n\t\t\t\t\t\twhere is_show = 1\n\t\t\t\t\t\tand lang='\".$ttH->conf[\"lang_cur\"].\"'\n\t\t\t\t\t\tand is_focus = 1\n\t\t\t\t\t\torder by show_order desc, date_create desc\n\t\t\t\t\t\tlimit $start, $num_show\";\n\n\t\t$result = $ttH->db->query($sql);\n\t\t$num_rows= mysql_num_rows($result);\n\t\t$html_row = '';\n\t\tif ($num = $ttH->db->num_rows($result)) {\n\t\t\t$j = 0;\n\t\t\twhile ($row = $ttH->db->fetch_row($result))\n\t\t\t{\n\t\t\t\t$j++;\n\t\t\t\t$row['link'] = $ttH->site->get_link ('news','',$row['friendly_link']);\n\t\t\t\t$row[\"picture\"] = $ttH->func->get_src_mod($row[\"picture\"], 302, 150, 1, 1);\n\t\t\t\t$row['short'] = $ttH->func->short($row['content'], 120);\n\t\t\t\t$row['date_update'] = date('d/m/Y',$row['date_update']);\n\t\t\t\t$ttH->temp_box->assign('item', $row);\n\t\t\t\t$ttH->temp_box->parse(\"list_home_news_focus.item\");\n\t\t\t}\n\t\t\t$ttH->temp_box->parse(\"list_home_news_focus\");\n\t\t}\n\t\t$stop_more = ($num_rows == $num_show) ? 0 : 1;\n\t\t$output = $ttH->temp_box->text(\"list_home_news_focus\");\n\t\treturn array(\n\t\t\t'stop_more' => $stop_more,\n\t\t\t'output' => $output\n\t\t);\n\t}", "public function isNewsLetter()\n {\n return $this->newsLetter;\n }", "public function ftn()\n\t{\n\t\t//Usenet collector(aangemeld bij usenet collector) [001/124] - \"Northern_Exposure_Season_4_dvd_2.par2\" yEnc\n\t\tif (preg_match('/^(Usenet collector)?\\(aangemeld.+\\) \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //\"Family Games-OUTLAWS.nfo\" yEnc\n\t\tif (preg_match('/^\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Adobe Photoshop Lightroom v5.2 - FiNaL - Multilingual [WIN].vol037+32.PAR2 yEnc\n\t\tif (preg_match('/^(.+?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4}) {0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Wondershare AllMyTube 3.8.0.4 + Patch) [01/12] - \"Wondershare AllMyTube 3.8.0.4 + Patch.nfo\" yEnc\n\t\tif (preg_match('/^\\(([\\w+ .()-]{8,})\\)[-_\\s]{0,3}\\[\\d+\\/\\d+\\][-_\\s]{0,3}\".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(????) [10/26] - \"The.Young.Riders.S01E02.480pWEB-DL.AAC2.0.H.264-AJP69.part09.rar\" yEnc\n\t\tif (preg_match('/^\\(\\?+\\) \\[\\d+\\/\\d+\\] - \".+?' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "function bloginfo_rss($show = '')\n {\n }", "function ___action () {\r\n\r\n // first, get all news items (for sorting and such)\r\n $all = $this->db->query ( array (\r\n 'select' => 'id,type1,label,m_p_date,m_p_who',\r\n 'type' => __NEWS,\r\n 'sort_by' => 'm_p_date DESC',\r\n 'return' => 'topics'\r\n ) ) ;\r\n\r\n $all_dates = array () ;\r\n\r\n foreach ( $all as $idx => $item )\r\n if ( isset ( $item['m_p_date'] ) )\r\n $all_dates[$item['id']] = $item['m_p_date'] ;\r\n\r\n\r\n\r\n\r\n\r\n // Get the view facets of the archive\r\n $year = $this->glob->breakdown->id ;\r\n $month = $this->glob->breakdown->selector ;\r\n $week = $this->glob->breakdown->specific ;\r\n $day = $this->glob->breakdown->atom ;\r\n \r\n \r\n $view = 'all' ;\r\n $path = array ( 'news' => 'News', 'news/archive' => 'Archive' ) ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, 1, 1, 2000 ) ) ;\r\n\r\n // observe DATE limit!! When PHP (and your computer system) support yearly\r\n // numbers over 2030, change this value to something nice and high!!!!!!!!\r\n $to = date( XS_DATE, mktime ( 0, 0, 0, 0, 0, 2030 ) ) ;\r\n \r\n \r\n if ( $year != '' ) {\r\n\r\n // yearly view\r\n $view = 'year' ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, 1, 1, $year ) ) ;\r\n $to = date( XS_DATE, mktime ( 0, 0, 0, 13, 0, $year ) ) ;\r\n\r\n // Let's create an array that will be our breadcrumb\r\n $path['news/archive/'.$year] = $year ;\r\n\r\n } \r\n \r\n if ( $month != '' ) {\r\n\r\n // monthly view\r\n $view = 'month' ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, $month, 1, $year ) ) ;\r\n $to = date( XS_DATE, mktime ( 0, 0, 0, $month + 1, 0, $year ) ) ;\r\n\r\n // Let's create an array that will be our breadcrumb\r\n $path[\"news/archive/$year/$month\"] = $month ;\r\n\r\n } \r\n \r\n if ( $week != '' ) {\r\n\r\n // weekly view\r\n $view = 'week' ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, $month, 1, $year ) ) ;\r\n $to = date( XS_DATE, mktime ( 0, 0, 0, $month + 1, 0, $year ) ) ;\r\n\r\n // Let's create an array that will be our breadcrumb\r\n $path[\"news/archive/$year/$month/$week\"] = $week ;\r\n\r\n } \r\n \r\n if ( $day != '' ) {\r\n\r\n // daily view\r\n $view = 'day' ;\r\n\r\n $from = date( XS_DATE, mktime ( 0, 0, 0, $month, $day, $year ) ) ;\r\n $to = date( XS_DATE, mktime ( 23, 59, 59, $month, $day, $year ) ) ;\r\n\r\n // Let's create an array that will be our breadcrumb\r\n $path[\"news/archive/$year/$month/$day\"] = $day ;\r\n\r\n } \r\n \r\n $this->glob->stack->add ( 'xs_facets', $path ) ;\r\n\r\n\r\n $result = $this->db->query ( array (\r\n 'select' => 'id,type1,label,m_p_date,m_p_who',\r\n 'type' => __NEWS,\r\n 'sort_by' => 'm_p_date DESC',\r\n 'between' => \"m_p_date BETWEEN CAST('$from' as DATETIME) AND CAST('$to' as DATETIME)\",\r\n 'return' => 'topics'\r\n ) ) ;\r\n\r\n\r\n $index = array () ;\r\n\r\n foreach ( $result as $idx => $item ) {\r\n if ( isset ( $item['m_p_date'] ) ) {\r\n $d = new DateTime( $item['m_p_date'] ) ;\r\n switch ( $view ) {\r\n case 'all': $index[$d->format('Y')] = $item['label'] ; break ;\r\n case 'year': $index[$d->format('Y')][$d->format('m')][$d->format('W')][$d->format('d')] = $item['label'] ; break ;\r\n case 'month': $index[$d->format('Y')][$d->format('m')][$d->format('W')][$d->format('d')][$item['id']] = $item['label'] ; break ;\r\n case 'week': $index[$d->format('Y')][$d->format('m')][$d->format('W')][$d->format('d')][$item['id']] = $item['label'] ; break ;\r\n case 'day': $index[$d->format('Y')][$d->format('m')][$d->format('W')][$d->format('d')][$item['id']] = $item['label'] ; break ;\r\n }\r\n \r\n }\r\n }\r\n\r\n switch ( $view ) {\r\n case 'week':\r\n case 'day':\r\n $this->glob->stack->add ( 'xs_news', $result ) ;\r\n break ;\r\n default: break ;\r\n }\r\n\r\n $this->log ( 'READ', '['.$this->glob->request->q.']' ) ;\r\n $this->glob->stack->add ( 'xs_news_archive', $index ) ;\r\n\r\n }", "public function getAlias()\n {\n return \"netbs.core.news\";\n }", "protected function _getNews()\n {\n return Mage::registry('current_study_news');\n }", "function do_feed()\n {\n }", "public function show(NewsLetter $newsLetter)\n {\n //\n }", "function comments_rss()\n {\n }", "public function newsAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->news = $db->fetchAll($db->select()->from('inwestycje_news')->order('data DESC')->where('id_inwest = ?', $id));\n\t\t\t$this->view->inwestycja = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id));\n\t\t}", "public function setEmailNews($email_news)\n {\n $this->email_news = $email_news;\n\n return $this;\n }", "function enh_latest_news_html($mod_id, $nl_url, $ModName) {\n\n// get vars\n $prefix = pnConfigGetVar('prefix');\t\t\n list($dbconn) = pnDBGetConn();\n\t $pntable =& pnDBGetTables();\n\t\n $bgcolor1 = \"#0056A7\";\n\t $bgcolor2 = \"#d8e1ea\";\n\n\t $language = pnConfigGetVar('language');\n\n// name the lang file the same as this file\n\t include(\"modules/$ModName/modules/lang/$language/enhnews.php\");\n\n// get the module setting from the database\n\t $modsql = \"SELECT mod_qty, mod_data FROM $prefix\"._nl_modules.\" WHERE mod_id = '$mod_id'\";\n\t\t$result = $dbconn->Execute($modsql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n if (!$result->EOF) {\n\t list($mod_qty, $mod_data) = $result->fields;\n } else {\n\t\t // take care od errors?\n\t\t}\n// clear the output variable\n// title of the page to show up\n\t $output = \"<b>\"._ENHLATESTARTICLES.\":</b><br><br>\\n\";\n\n// query the database and generate your output in the amount of mod_qty\n\t $sql = \"SELECT pn_sid, pn_title, pn_hometext, pn_bodytext, pn_informant, pn_time \n\t\t FROM $pntable[stories] \n\t\t WHERE pn_ihome = '0' ORDER BY pn_time DESC limit 0,$mod_qty\";\n\n\t\t$result = $dbconn->Execute($sql);\n\t if ($dbconn->ErrorNo() != 0) {\n\t\t echo _DBREADERROR;\n\t }\n\t\t\t\t\t\t\n while(!$result->EOF) {\n\t\t list($pn_sid, $pn_title, $pn_hometext, $pn_bodytext, $pn_informant, $pn_time) = $result->fields;\n\t\t\t\t$result->MoveNext(); \n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor1\\\">\\n\";\n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"1\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor2\\\">\\n\";\n\t $output .= \"<table border=\\\"0\\\" cellpadding=\\\"4\\\" cellspacing=\\\"0\\\" width=\\\"100%\\\"><tr><td bgcolor=\\\"$bgcolor2\\\">\\n\";\n\t $output .= \"<img src=\\\"$nl_url/modules/$ModName/modules/images/enhnews/off.gif\\\" border=\\\"0\\\"></td><td width=\\\"100%\\\" bgcolor=\\\"$bgcolor2\\\"><b>&nbsp;<a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\"><font style=\\\"FONT-SIZE: 13px\\\"><b>$pn_title</b></a></font></b></td></tr>\\n\";\n\t $output .= \"<tr><td colspan=\\\"2\\\" bgcolor=\\\"$bgcolor2\\\"><br>\\n\";\n\t $output .= \"<table border=\\\"0\\\" width=\\\"98%\\\" bgcolor=\\\"$bgcolor2\\\" align=\\\"center\\\"><tr><td>\\n\";\n \t $output .= \"<font style=\\\"FONT-SIZE: 11px\\\">$pn_hometext</font>\\n\";\n \t $output .= \"</td></tr></table>\\n\";\n\t $output .= \"</td></tr></table><br>\\n\";\n\t $output .= \"</td></tr><tr><td bgcolor=\\\"$bgcolor2\\\" align=\\\"left\\\">\\n\";\n $output .= \"&nbsp\";\n\t $output .= \"<font style=\\\"FONT-SIZE: 10px\\\"><b>\"._POSTEDBY.\": $pn_informant \"._ON.\" $pn_time</font><br>\";\n\t if ($pn_bodytext) {\n\t\t $output .= \"<div align=\\\"right\\\"><font style=\\\"FONT-SIZE: 11px\\\"><a href=\\\"$nl_url/modules.php?op=modload&name=News&file=article&sid=$pn_sid\\\" target=\\\"_blank\\\">\"._READMORE.\"</a></font>&nbsp;&nbsp;</div>\\n\";\n\t\t }\n\t $output .= \"<img src=\\\"$nl_url/modules/$ModName/modules/images/enhnews/pixel.gif\\\" border=\\\"0\\\" height=\\\"2\\\">\";\n\t $output .= \"</td></tr></table>\\n\";\n\t $output .= \"</td></tr></table><br>\\n\";\n }\n\n// strip the slashes out all at once\n\t $output = stripslashes($output);\n\n// send the output to the system (it must be output and not another variable name)\n\t return $output;\n}", "function add_news($title){\n\t\t$title = $this->db->real_escape_string($title);\n\t\tif($this->db->query('INSERT into news (title) VALUES (\"'.$title.'\")')){\n\t\t\t$this->register_changes();\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function ShowTop5News2()\n{\n\t///////////////////////////////////TIN NOI BAT NHAT\n\techo('<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>');\n\techo('<td width=\"333\" height=\"289\" valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">');\n\n\t$str1=\"select * from news where approval=1 order by date desc,newsid desc\";\n\t$result=mysql_query($str1) or die(mysql_error());\n\t//$row=mysql_fetch_array($result);\n\t$firstnews=-1;\n\n\twhile ($row=mysql_fetch_array($result))\n\t{\n\t\t//$row=mysql_fetch_array($result);\n\t\tif (strlen($row['image'])>0)\n\t\t{\n\t\t\t$firstnews=$row['newsid'];\n\t\t\tbreak;\n\t\t}\t\n\t}\n\techo(\"<a href='newsdetail.php?newsid=\".$row['newsid'].\"&id=\".$row['newsgroup'].\"' class='newstitlelink\");\n\techo(template());\n\techo(\"'>\".$row['title'].\"</a>\");\n\techo(\"<tr><td height='170' valign='top' align='center'><center>\");\n\tif ($firstnews!=-1)\n\t\techo(\"<img class='imagetopnews' height='170' src='\".$row['image'].\"' />\");\n\techo(\"</center></td></tr>\");\n echo(\"<tr><td height='61' valign='top'>\".$row['abstract'].\"</td></tr>\");\n\n\n\tmysql_free_result($result);\n\n\techo('</table></td><td width=\"27\" ');\n\tif ($firstnews!=-1) echo(\"background='image/middlebg.jpg'\");\n\techo('>&nbsp;</td><td width=\"215\" valign=\"top\">');\n\techo('<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">');\n\techo('<tr><td width=\"215\" height=\"289\" valign=\"middle\">');\n\t\n\t///////////////////////////////////5 TIN NOI BAT NHAT\n\t$str1=\"select * from news where approval=1 order by date desc,newsid desc\";\n\t$result=mysql_query($str1) or\n\t\tdie(mysql_error());\n\t$i=0;\n\twhile ($row=mysql_fetch_array($result))\n\t{\n\t\tif ($firstnews!=$row['newsid'])\n\t\t{\n\t\t\t$i=$i+1;\n\t\t\techo(\"<img src='image/newspoint.jpg' />&nbsp;&nbsp;\");\n\t\t\techo(\"<a alt='\".$row['abstract'].\"' title='\".$row['abstract'].\"' href='newsdetail.php?newsid=\".$row['newsid'].\"&id=\".$row['newsgroup'].\"' class='newstitle\");\n\t\t\techo(template());echo(\"'>\".$row['title'].\"</a>\");\n\t\t\techo(\"<br>\");echo(\"<img class='newsline' src='image/newsline.jpg' />\");\n\t\t}\n\t\tif ($i==5) break;\n\t}\n\tmysql_free_result($result);\n\techo('</td></tr></table></td></tr></table>');\n}", "public function oceanwp_news_output() {\n\t\t\t$this->oceanwp_rss_output( self::$feed );\n\t\t}", "function NewsUrl($id, $seo_title) {\n\tglobal $setting;\n\t\n\tif ($setting['seo_on'] == 0) {\n\t\t$url = '/index.php?task=news&amp;id='.$id;\n\t}\n\telse if ($setting['seo_on'] == 3) {\n\t\t$url = '/news/'.$seo_title.$setting['seo_extension'];\n\t}\n\telse {\n\t\t$url = '/news/item/'.$id.'/'.$seo_title.$setting['seo_extension'];\n\t}\n\n\treturn $setting['site_url'].$url;\n}", "function create_content($title, $body, $link, $uid){\n\t// creating a new object $node and setting its 'type' and uid property\n\t$values = array(\n\t 'type' => 'news',\n\t 'uid' => $uid,\n\t 'status' => 1,\n\t 'comment' => 1,\n\t 'promote' => 0,\n\t);\n\t$entity = entity_create('node', $values);\n\n\t$ewrapper = entity_metadata_wrapper('node', $entity);\n\n\t$ewrapper->title->set($title);\n\n\t$ewrapper->body->set(array('value' => $body));\n\n\t$ewrapper->field_link->set($link);\n\n\t$entity->field_my_date[LANGUAGE_NONE][0] = array(\n\t 'value' => date('Y-m-d H:i:s.'),\n\t 'timezone' => 'UTC',\n\t 'timezone_db' => 'UTC',\n\t );\n\n\t$ewrapper->save();\n}", "function createOld() {\n\t $my\t= JFactory::getUser();\n\n\t $Itemid = $GLOBALS[JNEWS.'itemidAca'];\n\t if(!empty($Itemid)){\n\t\t $item = '&Itemid=' . $Itemid ;\n\t }else{\n\t\t $item = '';\n\t }\n\n\t $this->_addCSS();\n\n\t $hidden = '';\n\t $htmlOK = false;\n\t $HTML = '';\n\t $formname = 'modjnewsForm'.$this->num;\n\t //check if subscription listing is not empty\n\t //if not empty print the module\n\t //else just print the message\n\t \t$HTML .= '<div id=\"jnews_module'.$this->num.'\">';\n\t\t\t\t\t\tswitch( $this->effect ) {\n\t\t\t\t\t\t case 'default':\n\t\t\t\t\t\t $HTML .= '';\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'mootools-slide':\n\t\t\t\t\t\t\t\t$HTML .= $this->_addMootoolsSlide();\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t case 'mootools-modal':\n\t\t\t \t \t$HTML .= $this->_addMootoolsModal();\n\t\t\t\t\t\t break;\n\t\t\t\t\t\t default:\n\t\t\t\t\t\t $HTML .= '';\n\t\t\t\t\t\t}\n\n\t\tif (!empty($this->lists)) {\n\t\t \t$subscriber = '';\n\t\t if ($my->id >0) {\t//login\n\t\t\t $loggedin = true;\n\t\t\t $subscriber = $this->_getSubscriberInfo($my->id);\n\t\t\t if(empty($subscriber)) $loggedin = false;\n\t\t } else {\t//logout\n\t\t\t $loggedin = false;\n\t\t }\n\n\t\t if (!$loggedin && $GLOBALS[JNEWS.'allow_unregistered']) {\n\t\t\t $HTML .= $this->_printscript();\n\t\t }\n\n\t\t if ( !$GLOBALS[JNEWS.'disabletooltip'] ) {\n\t\t\t\tif( version_compare( JVERSION,'3.0.0','<' ) ) {\n\t\t\t\t\tJHTML::_('behavior.tooltip');\n\t\t\t\t} else {\n\t\t\t\t\tJHtml::_('behavior.tooltip');\n\t\t\t\t}\n\t\t }\n\n\t\t $linkForm = 'option='.JNEWS_OPTION;\n\t\t\t$linkForm = jNews_Tools::completeLink( $linkForm, false, false );\n\n\t\t $HTML .= '<form action=\"'.$linkForm.'\" method=\"post\" name=\"modjnewsForm'.$this->num.'\">';\n\n\t\t //pretext\n\t\t if (!empty($this->introtext)) {\n\t\t\t $text = '<span class=\"pretext\">'. $this->introtext .'</span>';\n\t\t\t $HTML .= jnews::printLine($this->linear, $text);\n\t\t }\n\n\t\t //subscription list///889\n\t\t $HTML .= $this->_showSubcriptionListOld($subscriber, $loggedin, $item);\n\n\t\t if ( !$loggedin ) {\n\t\t\t if ($GLOBALS[JNEWS.'allow_unregistered']) {\n\t\t\t \t$HTML .= $this->showInputFields();\n\t\t\t } else {\t//required registered\n\t\t\t\t $HTML .= $this->NeedToRegister();\n\t\t\t \t$htmlOK = false;\n\t\t\t }\n\n\t\t\t $HTML .= $this->showReceiveHTML($subscriber);\n\n\t\t\t $HTML .= $this->showTerms($subscriber);\n\n\t\t\t //for captcha\n\t\t\t if($GLOBALS[JNEWS.'level'] > 1){//check the version is plus or pro\n\t\t\t\t if(empty($esc) && $this->enable_captcha){//check if $esc has been initialized\n\t\t\t\t\t $code = jNews_Captcha::generateCode('5');\n\t\t\t\t\t $HTML .= $this->_showCaptcha($code);\n\t\t\t\t\t $hidden .= $this->_showCaptchaHidden($code);\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t $HTML .= $this->_showButton(false);\n\n\t\t } else {\t//login\n\t\t\t\t\t$HTML .= $this->forLoggedIn($Itemid);\n\t\t }\n\n\t\t if (!empty($this->posttext)) {\n\t\t\t $text = '<span class=\"postext\">'. $this->posttext .'</span>';\n\t\t\t $HTML .= jnews::printLine($this->linear, $text);\n\t\t }\n\n\t\t\t\tif( version_compare( JVERSION,'3.0.0','<' ) ) {\n\t\t\t\t\t$HTML .= JHTML::_( 'form.token' );\n\t\t\t\t} else {\n\t\t\t\t\t$HTML .= JHtml::_( 'form.token' );\n\t\t\t\t}\n\n\t\t $HTML .= $hidden . '</form>';\n\t } else {\t// no listing\n\t\t $HTML .= '<p class=\"jnews-nolist\">'. _JNEWS_LIST_NOT_AVAIL .'</p>';\n\t }\n\n\t if($this->effect != 'mootools-slide'){\n\t\t \t$HTML .= '<div style=\"display:none; width:50px;\" id=\"message'.$this->num.'\"></div>';\n\t\t \t$HTML .= '<div style=\"display:none; width:50px; padding-top:5px; height:100%\" id=\"ajax_loading'.$this->num.'\"><!--<img alt=\"loader\" src=\"'.JURI::base().'components/'.JNEWS_OPTION.'/images/16/ajax-loader.gif\"/>'._JNEWS_PLEASE_WAIT.'--></div>';\n\t }\n\n\t $HTML .= '';\n\n\t switch ($this->effect) {\n\t\t\t\t\tcase 'mootools-slide':\n\t\t\t\t\t\t$HTML .= '</div></div>';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mootools-modal':\n\t\t\t\t\t\t$HTML .= '</div></div></div>';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'default':\n\t\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t }\n\n\t\t$HTML .= '</div>';\n\t\t$HTML .= '<div style=\"display:none\" ><a href=\"http://www.joobi.co\">Joomla Extensions</a> powered by Joobi</div>';\n\t return $HTML;\n\n\t}", "function do_feed_rss()\n {\n }", "function comment_text_rss()\n {\n }", "function Newsletters()\n\t{\n\t\t$this->PopupWindows[] = 'sendpreviewdisplay';\n\t\t$this->PopupWindows[] = 'checkspamdisplay';\n\t\t$this->PopupWindows[] = 'viewcompatibility';\n\t\t$this->LoadLanguageFile();\n\t}", "public function showNews($newsID, $SQLnews, &$tvars, $mode = []) {\n\n\t\tglobal $DSlist;\n\t\t// Определяем - работаем ли мы внутри строк таблиц\n\t\tif (!pluginGetVariable('basket', 'news_flag')) {\n\t\t\t$tvars['regx']['#\\[basket\\](.*?)\\[\\/basket\\]#is'] = '';\n\n\t\t\treturn;\n\t\t}\n\t\t// Работаем. Определяем режим работы - по всем строкам или по условию \"поле из xfields не равно нулю\"\n\t\tif (pluginGetVariable('basket', 'news_activated')) {\n\t\t\tif (!$SQLnews['xfields_' . pluginGetVariable('basket', 'news_xfield')]) {\n\t\t\t\t$tvars['regx']['#\\[basket\\](.*?)\\[\\/basket\\]#is'] = '';\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$tvars['regx']['#\\[basket\\](.*?)\\[\\/basket\\]#is'] = '$1';\n\t\t$tvars['vars']['basket_link'] = generatePluginLink('basket', 'add', array('ds' => $DSlist['news'], 'id' => $SQLnews['id']), array(), false, true);\n\t}", "function html5_blank_view_article($more)\n{\n global $post;\n // return '... <a class=\"view-article\" href=\"' . get_permalink($post->ID) . '\">' . __('View Article', 'html5blank') . '</a>';\n return '...';\n}", "public function normal_news() {\n $this->load->library(array('rb'));\n $this->output->set_content_type('application/json', 'utf-8')\n\t->set_header('Access-Control-Allow-Origin: *');\n $data = array();\n try {\n\t$news = R::find('news', 'is_fixed=?', ['N']);\n\tforeach($news as $new) {\n\t array_push($data, array(\n\t\t'title'=>$new->title,\n\t\t'text'=>$new->text,\n\t\t'created_at'=>$new->created_at,\n\t ));\n\t}\n\t$this->output->set_status_header(200)\n\t ->set_output(json_encode(array(\n\t\t'status'=>'success',\n\t\t'data'=>$data,\n\t )));\n } catch(Exception $e) {\n\t$this->output->set_status_header(500)\n\t ->set_output(json_encode(array(\n\t \t'status'=>'error',\n\t\t'message'=>'Ocorreu um erro de conexão ao banco de dados'\n\t )));\n }\n }", "public function show(News $news)\n {\n dd(__METHOD__);\n }", "function LaunchNewsletter()\n{\n\tglobal $xoopsModule, $xoopsConfig, $dateformat;\n\txoops_cp_header();\n\tadminmenu(5);\n\n\tif (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/newsletter.php')) {\n\t\tinclude_once XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/newsletter.php';\n\t} else {\n\t\tinclude_once XOOPS_ROOT_PATH.'/modules/news/language/english/newsletter.php';\n\t}\n\techo \"<br />\";\n\t$story = new NewsStory();\n\t$exportedstories=array();\n\t$topiclist='';\n\t$removebr=false;\n\tif(isset($_POST['removebr']) && intval($_POST['removebr'])==1) {\n\t\t$removebr=true;\n\t}\n\t$date1=$_POST['date1'];\n\t$date2=$_POST['date2'];\n\t$timestamp1=mktime(0,0,0,intval(substr($date1,5,2)), intval(substr($date1,8,2)), intval(substr($date1,0,4)));\n\t$timestamp2=mktime(0,0,0,intval(substr($date2,5,2)), intval(substr($date2,8,2)), intval(substr($date2,0,4)));\n\tif(isset($_POST['export_topics'])) {\n\t\t$topiclist=implode(\",\",$_POST['export_topics']);\n\t}\n\t$tbltopics=array();\n\t$exportedstories=$story->NewsExport($timestamp1, $timestamp2, $topiclist, 0, $tbltopics);\n $newsfile=XOOPS_ROOT_PATH.'/uploads/newsletter.txt';\n\tif(count($exportedstories)) {\n\t\t$fp=fopen($newsfile,'w');\n\t\tif(!$fp) {\n\t\t\tredirect_header('index.php',4,sprintf(_AM_NEWS_EXPORT_ERROR,$newsfile));\n\t\t}\n\n\t\tforeach($exportedstories as $onestory)\n\t\t{\n\t\t\t$content=$newslettertemplate;\n\t\t\t$content=str_replace('%title%',$onestory->title(),$content);\n\t\t\t$content=str_replace('%uname%',$onestory->uname(),$content);\n\t\t\t$content=str_replace('%created%',formatTimestamp($onestory->created(),$dateformat),$content);\n\t\t\t$content=str_replace('%published%',formatTimestamp($onestory->published(),$dateformat),$content);\n\t\t\t$content=str_replace('%expired%',formatTimestamp($onestory->expired(),$dateformat),$content);\n\t\t\t$content=str_replace('%hometext%',$onestory->hometext(),$content);\n\t\t\t$content=str_replace('%bodytext%',$onestory->bodytext(),$content);\n\t\t\t$content=str_replace('%description%',$onestory->description(),$content);\n\t\t\t$content=str_replace('%keywords%',$onestory->keywords(),$content);\n\t\t\t$content=str_replace('%reads%',$onestory->counter(),$content);\n\t\t\t$content=str_replace('%topicid%',$onestory->topicid(),$content);\n\t\t\t$content=str_replace('%topic_title%',$onestory->topic_title(),$content);\n\t\t\t$content=str_replace('%comments%',$onestory->comments(),$content);\n\t\t\t$content=str_replace('%rating%',$onestory->rating(),$content);\n\t\t\t$content=str_replace('%votes%',$onestory->votes(),$content);\n\t\t\t$content=str_replace('%publisher%',$onestory->uname(),$content);\n\t\t\t$content=str_replace('%publisher_id%',$onestory->uid(),$content);\n\t\t\t$content=str_replace('%link%',XOOPS_URL.'/modules/news/article.php?storyid='.$onestory->storyid(),$content);\n\t\t\tif($removebr) {\n\t\t\t\t$content=str_replace('<br />',\"\\r\\n\",$content);\n\t\t\t}\n\t\t\tfwrite($fp,$content);\n\t\t}\n\t\tfclose($fp);\n\t\t$newsfile=XOOPS_URL.'/uploads/newsletter.txt';\n\t\tprintf(_AM_NEWS_NEWSLETTER_READY,$newsfile,XOOPS_URL.'/modules/news/admin/index.php?op=deletefile&amp;type=newsletter');\n\t} else {\n\t\tprintf(_AM_NEWS_NOTHING);\n\t}\n}", "public function getEmailNews()\n {\n return $this->email_news;\n }", "function editNewsNotify($newsID, $SQLnews, &$SQLnew, &$tvars) {\n\t\tglobal $mysql;\n \n if($_REQUEST['mode'] == \"addv\")\n {\n $answers = array();\n\n if(!$_REQUEST['nvenable'])\n return 1;\n \n $vtitle = trim($_REQUEST['nvtitle']);\n if (!strlen($vtitle)) return 1;\n $vtitle = db_squote($vtitle);\n \n $mysql->query(\"insert into \".prefix.\"_newsvote (newsid, title) values (\".$newsID.\", \".$vtitle.\")\");\n $vid = $mysql->lastid(\"newsvote\");\n \n addAnswers($_REQUEST['nvanswers'], $vid);\n \n }\n else\n {\n $vid = intval($_REQUEST['voteid']);\n if($_REQUEST['nvdelete'])\n {\n deleteVote($vid, $newsID);\n return 1;\n }\n \n $mysql->query(\"update \".prefix.\"_newsvote set title = \".db_squote(trim($_REQUEST['nvtitle'])).\" where newsid = \".intval($newsID));\n \n if(isSet($_REQUEST['nvupdate']))\n {\n foreach($_REQUEST['ans'] as $aid => $aval)\n {\n $mysql->query(\"update \".prefix.\"_newsanswer set name = \".db_squote(trim(htmlspecialchars($aval, ENT_QUOTES))).\" where id = \".intval($aid));\n }\n \n addAnswers($_REQUEST['nvanswers'], $_REQUEST['voteid']);\n }\n \n if($_REQUEST['nvrefresh'])\n {\n $mysql->query(\"update \".prefix.\"_newsanswer set number = 0 where voteid = \".$vid);\n $mysql->query(\"update \".prefix.\"_newsvote set count = 0 where id = \".$vid);\n $mysql->query(\"delete from \".prefix.\"_newsvoted where voteid = \".$vid); \n }\n \n }\n \n return 1;\n\t}", "public function ebook()\n\t{\n\t\tif (preg_match('/^New eBooks.+[ _-]{0,3}(\"|#34;)([\\w., &\\'()-]{8,}?\\b)\\.(par|vol|rar|nfo).*?(\"|#34;)/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //Rowwendees post voor u op www.nzbworld.me - [0/6] - \"Animaniacs - Lights, Camera, Action!.nzb\" yEnc (1/1)\n\t\tif (preg_match('/www.nzbworld.me - \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' yEnc/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Re: Tune In: The Beatles: All These Years (Mark Lewisohn) - Lewisohn, Mark - Tune In- the Beatles- All These Years, Volume 01 - [epub].rar yEnc\n\t\t//Re: REQ: Robert Edsel The Monuments Men - Edsel, Robert M - The Monuments Men- Allied Heroes, Nazi Thieves, and the Greatest Treasure Hunt in History (Retail) [epub].rar yEnc\n\t\tif (preg_match('/^Re:(Req:)? [\\w:()\\?\\' -]+ - ([\\w ,.()\\[\\]-]{8,}?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\tif (preg_match('/^\\(Nora Roberts\\)\"([\\w., &\\'()-]{8,}?\\b)\\.(epub|mobi|html|pdf|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Zelazny works) [36/39] - \"Roger Zelazny - The Furies.mobi\" yEnc\n\t\tif (preg_match('/\\((.+works)\\) \\[\\d+\\/(\\d+\\]) - ([\\w., &\\'()-]{8,}?\\b)\\.(mobi|pdf|epub|html|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[3];\n\t\t} //(Joan D Vinge sampler) [17/17] - \"Joan D Vinge - World's End.txt\" yEnc\n\t\tif (preg_match('/^\\([a-zA-Z ]+ sampler\\) \\[\\d+(\\/\\d+\\]) - \"([\\w., &\\'()-]{8,}?\\b)\\.(txt|pdf|mobi|epub|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//New - Retail - Juvenile Fiction - \"Magic Tree House #47_ Abe Lincoln at Last! - Mary Pope Osborne & Sal Murdocca.epub\" yEnc\n\t\t//New - Retail - \"Linda Howard - Cover of Night.epub\" yEnc\n\t\t//New - Retail - \"Kylie Logan_Button Box Mystery 01 - Button Holed.epub\" yEnc\n\t\tif (preg_match('/^New - Retail -( Juvenile Fiction -)? \"([\\w., &\\'()-]{8,}?\\b)\\.(txt|pdf|mobi|epub|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(No. 1 Ladies Detective Agency) [04/13] - \"Alexander McCall Smith - No 1-12 - The Saturday Big Tent Wedding Party.mobi\" yEnc\n\t\tif (preg_match('/^\\(No\\. 1 Ladies Detective Agency\\) \\[\\d+(\\/\\d+\\]) - \"([\\w., &\\'()-]{8,}?\\b)\\.(txt|pdf|mobi|epub|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//[25/33] Philip Jose Farmer - Toward the Beloved City [ss].mobi\n\t\t//[2/4] Graham Masterton - Descendant.mobi\n\t\tif (preg_match('/^\\[\\d+\\/(\\d+\\]) ([\\w., &\\'()-]{8,}?\\b)\\.(txt|pdf|mobi|epub|azw)/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//(NordicAlbino) [01/10] - \"SWHQ_NA_675qe0033102suSmzSE.sfv\" yEnc\n\t\t//365 Sex Positions A New Way Every Day for a Steamy Erotic Year [eBook] - (1/5) \"365.Sex.Positions.A.New.Way.Every.Day.for.a.Steamy.Erotic.Year.eBook.nfo\" - yenc yEnc\n\t\tif (preg_match('/(.+)[-_\\s]{0,3}[\\(\\[]\\d+\\/\\d+[\\)\\]][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '([-_\\s]{0,3}yEnc){1,2}$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //[001/125] (NL Epub Wierook Set 49) - \"Abulhawa, Susan - Litteken van David_Ochtend in Jenin.epub\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] .+? - \"([\\w., &\\'()-]{8,}?\\b)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\") yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/1) \"Radiological Imaging of the Kidney - E. Quaia (Springer, 2011) WW.pdf\" - 162,82 MB - (Radiological Imaging of the Kidney - E. Quaia (Springer, 2011) WW) yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \"([\\w., &\\'()-]{8,}?\\b)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/7) \"0865779767.epub\" - 88,93 MB - \"Anatomic Basis of Neurologic Diagnosis - epub\" yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \".+(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")([-_\\s]{0,3}\\d+[.,]\\d+ [kKmMgG][bB])?[-_\\s]{0,3}\"([\\w., &\\'()-]{8,}?\\b)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[4];\n\t\t}\n\t\t//Re: REQ: Jay Lake's Mainspring series/trilogy (see titles inside) - \"Lake, Jay - Clockwork Earth 03 - Pinion [epub].rar\" 405.6 kBytes yEnc\n\t\t//Attn: Brownian - \"del Rey, Maria - Paradise Bay (FBS).rar\" yEnc\n\t\t//New Scan \"Herbert, James - Sepulchre (html).rar\" yEnc\n\t\tif (preg_match('/^(Attn:|Re: REQ:|New Scan).+?[-_\\s]{0,3}\"([\\w., &\\'()-]{8,}?\\b)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")[-_\\s]{0,3}(\\d+[.,]\\d+ [kKmMgG][bB](ytes)?)? yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//\"Gabaldon, Diana - Outlander [5] The Fiery Cross.epub\" yEnc\n\t\t//Kiny Friedman \"Friedman, Kinky - Prisoner of Vandam Street_ A Novel, The.epub\" yEnc\n\t\tif (preg_match('/.*\"([\\w., &\\'()-]{8,}?\\b)(\\.part\\d*|\\.rar)?(\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Patterson flood - Mobi - 15/45 \"James Patterson - AC 13 - Double Cross.mobi\"\n\t\tif (preg_match('/(.+?)[-_ ]{0,4}\\d+\\/\\d+[-_\\s]{0,3}([\\w. &\\'()\\[\\]-]{8,}?\\b.?)\\.(txt|pdf|mobi|epub|azw)\"( \\(\\d+\\/\\d+\\))?( )?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //--- Michael Dobbs - House of Cards.mobi yEnc\n\t\tif (preg_match('/^--- ([\\w., &\\'()-]{8,}?\\b)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //'Steel's Edge - Ilona Andrews.epub' yEnc\n\t\tif (preg_match('/^\\'([\\w. &\\'()\\[\\]-]{8,}?\\b.?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})\\'[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[1 of 1] - Howard Gordon - Gideon's War & Hard Target.epub yEnc\n\t\tif (preg_match('/^\\[\\d+ of \\d+\\][-_\\s]{0,3}([\\w. &\\'()\\[\\]-]{8,}?\\b.?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //1 Playboy-Ausgabe vom Jnner 1953 [RARITT].rar yEnc\n\t\tif (preg_match('/^([\\w. &\\'\\[\\]-]{8,}?\\b.?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Re: Req: Please, does anyone have Scott Berg's Wilson biography? MTIA... - A. Scott Berg - Wilson.epub yEnc\n\t\tif (preg_match('/^.+ - ([^.]{8,})\\.[A-Za-z0-9]{2,4}[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //REQ: \"Keep it Pithy\" by Bill O'Reilly \"Keep It Pithy - Bill O'Reilly.epub\"yEnc\n\t\tif (preg_match('/.*\"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)\\.[A-Za-z0-9]{2,4}\"[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //For Your Eyes Only - Ian Fleming.epub - answering my own request yEnc\n\t\tif (preg_match('/^([^.]{8,})\\.[A-Za-z0-9]{2,4}.+[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "public function getNews()\n {\n $sql = \"SELECT * FROM news \";\n return $this->get($sql, array());\n }", "public function getNewsOn(){\n\t\t$numargs = func_num_args();\n\t\tif ($numargs < 3) return false;\n\t\t$param = ''; $arg_list = func_get_args();\n\t\tif ($numargs > 3){\t\t\t\n\t\t\tfor($i=3; $i < $numargs; $i++)\n\t\t\t\t$param .= strtolower($arg_list[$i]).\"/\";\n\t\t}\n\t\t$yr = $arg_list[0]; $mon = $arg_list[1]; $dat = $arg_list[2];\n\t\t$res = $this->espn_get($this->uriapi . $this->apiV . \"/\" . \"sports\" . \"/\" . $param . \"news/dates/\" . $yr . $mon . $dat . $this->apiR . $this->apiKey);\n\t\tif ($this->rawop)\n\t\t\treturn $res;\n\t\telse\n\t\t\treturn $this->streamline($res);\n\t}", "function mfn_news_post_type()\n{\n mfn_register_types();\n}", "public function updateNews(){\n $id = intval($_GET['id']);\n $info = D('News')->where('id='.$id)->find();\n $this->assign('info', $info);\n $this->assign('typeList', $this->get_type_list());\n $this->display();\n }", "function get_wp_title_rss($deprecated = '&#8211;')\n {\n }", "function html5_blank_view_article($more)\n{\n global $post;\n return '... <a class=\"view-article\" href=\"' . get_permalink($post->ID) . '\">' . __('View Article', 'oh') . '</a>';\n}", "function jfk2013_page_title() {\r\n\techo get_jfk2013_page_title();\r\n}", "function ssiAnnouncement()\n{\n\techo announceRead(0);\n}", "function the_post()\n {\n }", "public function the_post()\n {\n }", "function wc_fbog() {\n\n\t\tglobal $post;\n\t\tglobal $site;\n\n\t\techo \"\\n\\t\\t\";\n\t\t$metas = array();\n\n\t\t$metas[] = '<meta property=\"fb:admins\" content=\"535258781\">';\n\t\t$metas[] = '<meta property=\"og:title\" content=\"' . get_the_title() . '\">';\n\t\t$metas[] = '<meta property=\"og:type\" content=\"article\">';\n\t\t$metas[] = '<meta property=\"og:url\" content=\"' . get_permalink() . '\">';\n\t\t$metas[] = '<meta property=\"og:site_name\" content=\"' . get_bloginfo('name') . '\">';\n\n\t\t$default_image = $site->img('default-image.jpg', false);\n\n\t\tif ( ! is_singular() || is_home() ) {\n\t\t\t$metas[] = '<meta property=\"og:image\" content=\"' . $default_image . '\">';\n\t\t}\n\n\t\telse if ( ! has_post_thumbnail( $post->ID ) ) {\n\t\t\t$metas[] = '<meta property=\"og:image\" content=\"' . $default_image . '\">';\n\t\t}\n\n\t\telse {\n\t\t\t$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );\n\t\t\t$metas[] = '<meta property=\"og:image\" content=\"' . esc_attr( $thumbnail_src[0] ) . '\">';\n\t\t}\n\n\t\techo implode(\"\\n\\t\\t\", $metas);\n\t\techo \"\\n\";\n\t}", "public function getNews()\r\n\t{\r\n\t\treturn $this->makeRequest('/news');\r\n\t}", "function bigbluebutton_news() {\n\tglobal $db, $enrolled_courses, $system_courses;\n\t$news = array();\n\tif ($enrolled_courses == ''){\n\t\treturn $news;\n\t} \n\n $sql = 'SELECT * FROM %sbigbluebutton WHERE course_id IN %s';\n\t$rows_meetings = queryDB($sql, array(TABLE_PREFIX, $enrolled_courses));\n\t\n\tif(count($rows_meetings) > 0){\n\t\tforeach($rows_meetings as $row){\n\t\t\t$news[] = array('time'=>htmlentities_utf8($row['course_timing']), \n\t\t\t\t\t\t\t'object'=>$row, \n\t\t\t\t\t\t\t'alt'=>_AT('bigbluebutton'),\n\t\t\t\t\t\t\t'course'=>$system_courses[$row['course_id']]['title'],\n\t\t\t\t\t\t\t'thumb'=>'mods/bigbluebutton/bigbluebutton_sm.png',\n\t\t\t\t\t\t\t'link'=>htmlentities_utf8($row['message']));\n\t\t}\n\t}\n\treturn $news;\n}" ]
[ "0.68339777", "0.6352707", "0.617973", "0.6161403", "0.61095726", "0.6017487", "0.59946865", "0.5974328", "0.5856696", "0.5847808", "0.58028877", "0.57881325", "0.5765711", "0.57154024", "0.57133335", "0.57133335", "0.57133335", "0.57133335", "0.5713301", "0.57128525", "0.5695899", "0.56849575", "0.564892", "0.563749", "0.56364626", "0.56295574", "0.5613146", "0.5593012", "0.5570711", "0.55688524", "0.5553522", "0.5488361", "0.54589987", "0.54440844", "0.5440482", "0.54397607", "0.54232365", "0.5417869", "0.5415061", "0.5395478", "0.53910697", "0.5379649", "0.5379595", "0.5379021", "0.53592193", "0.5355391", "0.53520685", "0.5344298", "0.53322315", "0.5329523", "0.5329169", "0.5321068", "0.53137064", "0.529971", "0.5297601", "0.52890444", "0.52796525", "0.52724314", "0.5247147", "0.52282447", "0.5224298", "0.5208235", "0.5199691", "0.5188786", "0.5188365", "0.51851124", "0.5180843", "0.51801705", "0.51789075", "0.51787025", "0.5178399", "0.51716536", "0.51705897", "0.5168692", "0.5156384", "0.5154451", "0.51527375", "0.51450294", "0.5127517", "0.5125567", "0.51205695", "0.510485", "0.51037157", "0.509727", "0.5093609", "0.5092473", "0.508785", "0.50868464", "0.5085213", "0.5081797", "0.5080892", "0.5077364", "0.5075993", "0.5075625", "0.50722045", "0.50650847", "0.50587803", "0.50586057", "0.5055856", "0.5054668", "0.50524306" ]
0.0
-1
Devuelve true si la fecha de vencimiento del producto es menor a la fecha actual.
function diasTranscurridos($fecha_inicial, $fecha_final) { $dias = strtotime($fecha_inicial) < strtotime($fecha_final); return $dias; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isExpire(){\n\t\t$duedate = new DateTime($this->duedate);\n\t\t$today = new DateTime(\"now\");\n\t\t\n\t\tif($duedate < $today) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "protected function _isNew($product) {\r\n $from = strtotime ( $product->getData ( 'news_from_date' ) );\r\n $to = strtotime ( $product->getData ( 'news_to_date' ) );\r\n return $this->_checkDate ( $from, $to );\r\n }", "public function hasPassed() {\n \treturn $this < new \\DateTime();\n }", "function isOvertime()\n {\n if($this->jadwalKembali > $this->tanggalKembali){\n return false;\n }else{\n return true;\n }\n }", "function isFuture()\r\n {\r\n $agora = new Date();\r\n if($this->after($agora)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public function checkSyncDate(): bool\n {\n /** @var FileInfoImage $item */\n $item = $this->current();\n $date2 = $item->getSyncDateXmp();\n if ($date2 === null) {\n\n return true;\n } else {\n $date1 = DateTime::createFromFormat('U', $this->getMTime());\n\n return $date1 > $date2;\n }\n }", "public function isNeedUpdate()\n {\n if (is_null($this['episode_update_date'])){\n return true;\n }\n if (Carbon::now()->diffInDays(new Carbon($this['episode_update_date'])) > 3){\n return true;\n }\n return false;\n }", "function isPast()\r\n {\r\n $agora = new Date();\r\n if($this->before($agora)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public function valid()\n {\n return $this->_current !== null\n && $this->_current->getTimestamp() < $this->_endDate->getTimestamp();\n }", "private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }", "public function post_dated(){ \n\t\tif(strtotime($this->format_date_save($this->data['HrPermission']['per_date'])) < strtotime(date('Y-m-d'))){\t\t\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "public function isExpired()\n {\n if (!$this->getDateExpires()) {\n return false;\n }\n $timezone = $this->_localeDate->getConfigTimezone(\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $this->_storeManager->getWebsite($this->getWebsiteId())->getDefaultStore()->getId()\n );\n $expirationDate = (new \\DateTime($this->getDateExpires(), new \\DateTimeZone($timezone)))->setTime(0, 0, 0);\n $currentDate = (new \\DateTime('now', new \\DateTimeZone($timezone)))->setTime(0, 0, 0);\n if ($expirationDate < $currentDate) {\n return true;\n }\n\n return false;\n }", "public function hasExpired(){\n if($this->isIndefinied())\n return false;\n\n \\Log::info('Hoy'.print_r(Carbon::now(),true));\n \\Log::info('Expira'.print_r(Carbon::parse($this->expires_on),true));\n return (bool) Carbon::now()->greaterThan(Carbon::parse($this->expires_on));\n }", "public function isInFuture(): bool\n {\n if ($this->date_start > Carbon::now())\n {\n return true;\n }\n\n return false;\n }", "function CHECK_valability($endDATE) {\n\n $TMSP_end = strtotime($endDATE);\n $TMSP_today = time();\n\n if($TMSP_end > $TMSP_today) return true;\n else return false;\n }", "public function isLaterThan(Tiramizoo_Shipping_Model_Date $date)\n {\n \treturn $this->getTimestamp() > $date->getTimestamp();\n }", "public function vacio() {\n if ($this->cantcartas == -1)\n return TRUE;\n return FALSE;\n }", "protected function _isOnSale($product) {\r\n $from = strtotime ( $product->getData ( 'special_from_date' ) );\r\n $to = strtotime ( $product->getData ( 'special_to_date' ) );\r\n return $this->_checkDate ( $from, $to );\r\n }", "function fecha_entrega($fecha_entrega)\n\t{\n\t\t$hoy = date('Y-m-d');\n\t\t$fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy)));\n\t\tif($fecha_entrega < $fecha_valida)\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('fecha_entrega', \"El campo %s debe de ser por lo menos 3 d&iacute;as h&aacute;biles despu&eacute;s de la fecha de la orden de compra.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public function upToDate() {\n\t\tif($this->hasDetails()) {\n\t\t\t$last_score_date = $this->getScores()->max('updated_at');\n\t\t\tYii::trace($last_score_date.' <= '.$this->updated_at, 'Scorecard::upToDate');\n\t\t\treturn $last_score_date <= $this->updated_at;\n\t\t}\n\t\treturn true;\n\t}", "public function comprobarSaldo($cantidad){ //en cantidad le pasaremos lo que se le va a cobrar\n if($this->time - $cantidad < -300){\n return false;\n }else{\n return true;\n }\n\n }", "private function compare_with_date()\n {\n }", "private function isPreExpired($mix) {\n\t\tif ($this->recalc) {\n\t\t\t$currentDate = new Date(time());\n\t\t\t$equipmentExpireDate = ($mix->getEquipment()) ? $mix->getEquipment()->getDate() : null;\n\n\t\t\t//\tIf Equipment expire date - current date less than 5 days,\n\t\t\t//\tchange status to \"preExpired\"\n\t\t\tif ($equipmentExpireDate != null) {\n\t\t\t\t$secondsBetween = $equipmentExpireDate->getTimeStamp() - $currentDate->getTimeStamp();\n\t\t\t\tif ($secondsBetween < 60*60*24*5 && $secondsBetween > 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn $mix->isPreExpired();\n\t\t}\n\t}", "public function isExpired()\n {\n return Carbon::now()->gt(Carbon::parse($this->getExpirationDate()));\n }", "public function isCakeFestInFuture()\n {\n $startDate = Configure::read('Site.cakefest.start_date');\n\n return (new Time($startDate)) > (new Time());\n }", "protected function expired()\n {\n return Carbon::now()->diffInSeconds($this->valid, false) < 0;\n }", "public function isInvoiced() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->invoiceDate) ? false: true;\r\n\t}", "public function is_endless() {\r\n\t\treturn 0 == $this->end_date;\r\n\t}", "function isValid() {\n //we get if it is still good or expired\n return DataHora::compareDate2($this->getExpirationDate(), '>=', date('m/d/Y'), 'mm/dd/yyyy', 'mm/dd/yyyy');\n }", "function solucion($fecha1, $fecha2){\r\n $respuesta=false;\r\nif($fecha1 < $fecha2){\r\n //$respuesta=true\r\n echo \"es mayor\" (date(\"d-m-Y\",$fecha1));\r\n}else{\r\n\techo \"La fecha menor\";\r\n }\r\nreturn $respuesta; \r\n }", "function checkTicketDateValidity($ticket){\r\n\t App::import('Helper', 'Time');\r\n\t $time = new TimeHelper();\r\n\t $dayOld = time()-86400;\r\n\t \r\n\t //ce je odprti ticket starejsi od dneva se ga zbrise iz baze\r\n\t if(strtotime($ticket['Ticket']['creation_date']) < $dayOld){\r\n\t $this->delete($ticket['Ticket']['id']);\r\n\t return false;\r\n\t }else{\r\n\t return true;\r\n\t }\r\n\t \r\n\t}", "public function hasExpired() {\n if (is_null($this->end_date)) {\n return true;\n }\n\n return ($this->end_date->isFuture()) ? true : false;\n }", "public function isExpired()\n {\n return $this->expireAt < new DateTime();\n }", "public function pastDue() : bool\n {\n return $this->stripe_status === StripeSubscription::STATUS_PAST_DUE;\n }", "public function hasOldPrice(){\n return $this->_has(17);\n }", "public function isExpired() :bool\n {\n return ($this->expires < time());\n }", "public function isValid(): bool\n {\n $now = new \\DateTime();\n return $now < $this->getEndDate();\n }", "public function isExpired()\n {\n return ! is_null($this->expiration) &&\n Carbon::now()\n ->gte($this->expiration);\n }", "public function isToday()\n {\n \t$today = new Tiramizoo_Shipping_Model_Date();\n \treturn $this->get('Y-m-d') == $today->get('Y-m-d');\n }", "public function isLater(Date $date)\n {\n return $this->getTimestamp() > $date->getTimestamp();\n }", "public function isVerificato()\n {\n if ($this->verificato === NULL)\n {\n $conn = $GLOBALS[\"connest\"];\n $conn->connetti();\n $anno = AnnoSportivoFiam::get();\n\n //verifica pagamento\n $id = $this->getChiave();\n $mr = $conn->select('pagamenti_correnti', \"idtesserato='$id' AND YEAR(scadenza) >= $anno AND idtipo=\" . self::TIPO_ATL_FIAM);\n if ($mr->fetch_row() === NULL)\n {\n $this->verificato = false;\n } else\n {\n //verifica assicurazione\n $mr = $conn->select('assicurazioni_correnti', \"idtesserato='$id' AND YEAR(valido_da) <= $anno AND YEAR(valido_a) >= $anno\");\n $this->verificato = ($mr->fetch_row() !== NULL);\n }\n }\n return $this->verificato;\n }", "public function issetMovementDate(): bool\n {\n return isset($this->movementDate);\n }", "public function checkValidity()\n {\n // le pb est que la propriété publicationDate est de type dateTime or les tests initiaux\n // se basent sur un format de type date --> ce qui génère une erreur de type notice\n \n return true;\n }", "public function isPastDue()\n {\n if ($this->due_date && !$this->due_date->lt(Carbon::now()))\n {\n return false;\n }\n return true;\n }", "function is_fecha1_menor($fecha1,$fecha2){\n $dtime1 = strtotime(fecha_mysql($fecha1));\n $dtime2 = strtotime(fecha_mysql($fecha2));\n if($dtime1<$dtime2){\n return true;\n }{\n return false;\n }\n}", "public function isExpired()\n {\n if (!$this->expiration) {\n return false;\n }\n\n return $this->expiration < new DateTime();\n }", "public function isExpired ()\n {\n return $this->getExpirationDate()->getTimestamp() < time();\n }", "function fecha_instalacion($fecha_instalacion)\n\t{\n\t\t$hoy = date('Y-m-d');\n\t\t$fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy)));\n\t\t$fecha_maxima = date('Y-m-d',strtotime('+6 month',strtotime($hoy)));\n\t\tif(($fecha_instalacion < $fecha_valida) || ($fecha_instalacion > $fecha_maxima))\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('fecha_instalacion', \"El campo %s debe de ser por lo menos 3 d&iacute;as h&aacute;biles despu&eacute;s de la fecha de la orden de compra y menor a 6 meses de la misma.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function check()\r\n\t{\r\n\t\tif (empty($this->product_id))\r\n\t\t{\r\n\t\t\t$this->setError( JText::_('COM_CITRUSCART_PRODUCT_ASSOCIATION_REQUIRED') );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$offset = JFactory::getConfig()->getValue( 'config.offset' );\r\n\t\tif( isset( $this->publishing_date ) )\r\n\t\t{\r\n\t\t\t$this->publishing_date = date( 'Y-m-d H:i:s', strtotime( CitruscartHelperBase::getOffsetDate( $this->publishing_date, -$offset ) ) );\r\n\t\t}\r\n\r\n\r\n\t\t$nullDate = $this->_db->getNullDate();\r\n\t\tCitruscart::load( 'CitruscartHelperBase', 'helpers._base' );\r\n\r\n\t\tif (empty($this->created_date) || $this->created_date == $nullDate)\r\n\t\t{\r\n\t\t\t$date = JFactory::getDate();\r\n\t\t\t$this->created_date = $date->toSql();\r\n\t\t}\r\n\r\n\t\t$date = JFactory::getDate();\r\n\t\t$this->modified_date = $date->toSql();\r\n\t\t$act = strtotime( Date( 'Y-m-d', strtotime( $this->publishing_date ) ) );\r\n\t\t\t\t\t\r\n\t\t$db = $this->_db;\r\n\t\tif( empty( $this->product_issue_id ) ) // add at the end\r\n\t\t{\r\n\t\t\t$q = 'SELECT `publishing_date` FROM `#__citruscart_productissues` WHERE `product_id`='.$this->product_id.' ORDER BY `publishing_date` DESC LIMIT 1';\r\n\t\t\t$db->setQuery( $q );\r\n\t\t\t$next = $db->loadResult();\r\n\t\t\tif( $next === null )\r\n\t\t\t\treturn true;\r\n\t\t\t$next = strtotime( $next );\r\n\t\t\tif( $act <= $next )\r\n\t\t\t{\r\n\t\t\t\t$this->setError( JText::_('COM_CITRUSCART_PUBLISHING_DATE_IS_NOT_PRESERVING_ISSUE_ORDER').' - '.$this->publishing_date );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$q = 'SELECT `publishing_date` FROM `#__citruscart_productissues` WHERE `product_issue_id`='.$this->product_issue_id;\r\n\t\t\t$db->setQuery( $q );\r\n\t\t\t$original = $db->loadResult();\r\n\t\t\tif( $act == strtotime( Date( 'Y-m-d', strtotime( $original ) ) ) )\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t$q = 'SELECT `publishing_date` FROM `#__citruscart_productissues` WHERE `product_id`='.$this->product_id.' AND `publishing_date` < \\''.$original.'\\' ORDER BY `publishing_date` DESC LIMIT 1';\r\n\t\t\t$db->setQuery( $q );\r\n\t\t\t$prev = $db->loadResult();\r\n\t\t\t$q = 'SELECT `publishing_date` FROM `#__citruscart_productissues` WHERE `product_id`='.$this->product_id.' AND `publishing_date` > \\''.$original.'\\' ORDER BY `publishing_date` ASC LIMIT 1';\r\n\t\t\t$db->setQuery( $q );\r\n\t\t\t$next = $db->loadResult();\r\n\t\t\t\r\n\t\t\tif( $prev === null )\r\n\t\t\t\t$prev = 0;\r\n\t\t\telse\r\n\t\t\t\t$prev = strtotime( $prev );\r\n\t\t\tif( $next )\r\n\t\t\t\t$next = strtotime( $next );\r\n\t\r\n\t\t\tif( ( $prev >= $act ) || ( $next && $next <= $act ) )\r\n\t\t\t{\r\n\t\t\t\t$this->setError( JText::_('COM_CITRUSCART_PUBLISHING_DATE_IS_NOT_PRESERVING_ISSUE_ORDER').' - '.$this->publishing_date );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function validacion_fecha($fec){\n \n self::set_fecha($fec); // asignar la fecha\n $partes= explode(\"-\", self::get_fecha()); \n echo \"<br><br>\";\n echo \"Fecha Ingresada <br><br>\";\n print_r($partes);\n $actual = array(date(\"Y\"),date(\"m\"),date(\"d\"));\n echo \"<br><br>\";\n echo \"Fecha actual <br><br>\";\n print_r($actual);\n \n if(self::escritura_valida($partes) && self::fecha_mayor_actual($actual, $partes)) // si es valida la escritura y la fecha es mayor a la actual es correcta la fecha\n {\n return true;\n }\n else{\n return false;\n }\n }", "public function is_expired() {\n\t\treturn $this->data['created_at'] + HOUR_IN_SECONDS < ITSEC_Core::get_current_time_gmt();\n\t}", "function fechaPrestacionXLimite($fprestacion, $fprest_limite) {\r\n $pr = ((strtotime($fprest_limite) - strtotime($fprestacion)) / 86400); //limite de la prestacion - fecha prestacion\r\n $ctrl_fechapresta['debito'] = false;\r\n if ($pr < 0) {\r\n\r\n $ctrl_fechapresta['debito'] = true;\r\n $ctrl_fechapresta['id_error'] = 71;\r\n $ctrl_fechapresta['msj_error'] = 'Fecha de Prestacion supera el limite para el periodo liquidado';\r\n }\r\n return $ctrl_fechapresta;\r\n}", "public function isAfterSale(): bool\n {\n return $this->item->sell_in < self::DEADLINE;\n }", "public function isOutdated(): bool\n {\n return $this->getVersionsBehind() > 0;\n }", "public function is_expired()\n {\n }", "public function hasExpirationDate()\n {\n return isset($this->user_expiration);\n }", "public function is_expired() {\n\t\treturn $this->get_expires() < time();\n\t}", "public function isCurrent()\n {\n return (null === $this->dateEnd);\n }", "private function checkNewCommondaty()\n {\n $date = new DateTime($this->addDate);\n $date->modify(self::TIME_INTERVAL);\n $date->format('Y-m-d H:i:s');\n $dateNow = new DateTime();\n $dateNow->format('Y-m-d H:i:s');\n\n if ($dateNow < $date) {\n return 1;\n }\n return 0;\n }", "public function verifDate($attribute) {\n $time = new \\DateTime('now', new \\DateTimeZone('America/Guayaquil'));\n $currentDate = $time->format('Y-m-d h:m:s');\n\n if ($this->$attribute <= $currentDate) {\n $this->addError($attribute, 'No puede ser menor a la fecha actual');\n }\n }", "public function isExpired(): bool\n {\n return $this->expires != 0 && $this->expires < time();\n }", "public function isEqualTo(Tiramizoo_Shipping_Model_Date $date)\n {\n return $this->getTimestamp() == $date->getTimestamp();\n }", "function buscar_fecha ($fecha) {\n global $DB;\n $fechamin = buscar_menor_fecha();\n $fechamax = buscar_mayor_fecha();\n if ($fecha >= $fechamin->date && $fecha <= $fechamax->date) {\n return true;\n } else {\n return false;\n }\n}", "protected function renewal(): bool\n {\n // If we're not in a webhook, it's not possible to be an auto-renewal\n if (!$this->webhook) {\n return false;\n }\n\n // Check if the user's active sub is from before the current date\n /** @var \\Laravel\\Cashier\\Subscription $sub */\n $sub = \\Laravel\\Cashier\\Subscription::where('user_id', $this->user->id)->where('stripe_status', 'active')->first();\n if (empty($sub)) {\n return false;\n }\n return $sub->created_at->lessThan(Carbon::yesterday());\n }", "function isEditavel() {\n\t\t// a data limite de edição do jogo vem no formato DD/MM/YYYY, por exemplo, 01/03/2019\n\t\t$dg = DataGetter::getInstance();\n\t\t$dialimite = $this->jogo->limiteEdicaoAposta[0] . $this->jogo->limiteEdicaoAposta[1]; // dialimite = 01\n\t\t$meslimite = $this->jogo->limiteEdicaoAposta[3] . $this->jogo->limiteEdicaoAposta[4]; // meslimite = 03\n\t\t$anolimite = $this->jogo->limiteEdicaoAposta[6] . $this->jogo->limiteEdicaoAposta[7] . $this->jogo->limiteEdicaoAposta[8] . $this->jogo->limiteEdicaoAposta[9]; //anolimite = 2019\n\t\t$dialimite = intval($dialimite); // transformando as variáveis em inteiros\n\t\t$meslimite = intval($meslimite);\n\t\t$anolimite = intval($anolimite);\n\t\t$mes = date(\"m\"); //date(\"m\") retorna o mês atual, entre 1 e 12\n\t\t$mes = intval($mes);\n\t\tif((intval(date(\"Y\"))) > $anolimite){ // se ano atual tiver ultrapassado ano da data limite\n\t\t\treturn false; // não é possível editar \n\t\t}\n\t\telseif(($mes > $meslimite && (intval(date(\"Y\"))) == $anolimite)){ // se mês atual tiver ultrapassado o limite, estando no mesmo ano\n\t\t\treturn false; // não é possível editar\n\t\t}\n\t\telseif((intval(date(\"d\"))) > $dialimite && $mes >= $meslimite && (intval(date(\"Y\"))) == $anolimite){ // se o dia tiver ultrapassado, estando no mesmo mês ou em algum seguinte no ano\n\t\t\treturn false; // não é possivel editar\n\t\t}\n\t\telse{ // caso não esteja em nenhuma das condições acima, significa que a data limite ainda não foi ultrapassada\n\t\t\treturn true; // então a aposta eh editável\n\t\t}\n\t}", "public function issetPaymentDate(): bool\n {\n return isset($this->paymentDate);\n }", "public function canCancel() {\n $today = Carbon::parse();\n $canCancelFrom = $this->start_date->addMonthsNoOverflow($this->package->commitment_period)->firstOfMonth();\n\n if($canCancelFrom->greaterThan($today) || !$this->hasExpired()) {\n return false;\n }\n\n return true;\n }", "public function ActualizarTemporal($fechaActualizacion) {\n if ($fechaActualizacion != date('Y-m-d')) {\n\n $tiposElementos = array('NUMMOV', 'INTMOV');\n \n $temporalVentas = new TemporalVentas();\n $temporalVentas->TruncateTemporal();\n\n for ($i = 0; $i < Count($tiposElementos); $i++) {\n \n $tipoElemento = $tiposElementos[$i];\n \n $plazas = new Plazas();\n $plazas = $plazas->get_Plazas();\n\n $ingresadasOtros = 0;\n $instaladasOtros = 0;\n\n $ventas = new Ventas();\n\n if(date('H') < '12')\n $ayer = date('Y-m-d', strtotime(\"-1 day\", strtotime(date('Y-m-d'))));\n else\n $ayer = date('Y-m-d');\n \n foreach ($plazas as $plaza) {\n $ingresadasPlaza = $ventas->get_Ingresadas_Plaza_Fecha($plaza['PLAZA'], $ayer, $tipoElemento);\n $instaladasPlaza = $ventas->get_Instaladas_Plaza_Fecha($plaza['PLAZA'], $ayer, $tipoElemento);\n\n if (PlazasSeparadas::get_PlazaSeparada($plaza['PLAZA'])) {\n $ventas->set_Ingresadas_Instaladas(FunsionesSoporte::QuitarAcentos($plaza['PLAZA']), $ingresadasPlaza['TOTAL_INGRESADA'], $instaladasPlaza['TOTAL_INSTALADA'], $tipoElemento);\n } else {\n $ingresadasOtros += $ingresadasPlaza['TOTAL_INGRESADA'];\n $instaladasOtros += $instaladasPlaza['TOTAL_INSTALADA'];\n }\n }\n\n $ventas->set_Ingresadas_Instaladas_Otros($ingresadasOtros, $instaladasOtros, $tipoElemento);\n }\n\n $this->ActualizarFecha();\n }\n\n return true;\n }", "public function isExpired() : bool\n {\n return $this->getExpiryAttribute()->timestamp < Carbon::now()->timestamp\n && $this->length !== 0\n && !$this->isRemoved();\n }", "public function is_new( $post ) {\n\n\t\t\tglobal $edd_options;\n\n\t\t\t$post_date = strtotime( $post->post_date );\n\t\t\t$now = time();\n\t\t\t$period = isset( $edd_options['wapu_new_period'] ) ? absint( $edd_options['wapu_new_period'] ) : 12;\n\t\t\t$period = absint( $period ) * HOUR_IN_SECONDS;\n\t\t\t$diff = $now - $post_date;\n\n\t\t\treturn $period >= $diff;\n\t\t}", "public function updateSyncDate()\n {\n $result=false;\n try{\n infolog('[BulkInventory.updateSyncDate] Preparing to update sync date... '. now());\n $sQl=\"\n UPDATE\n products p,\n ebay_details ed\n SET\n ed.synced_at=NOW()\n WHERE\n p.id=ed.product_id\n AND ed.listingid IS NOT NULL\n AND (p.updated_at > ed.synced_at OR ed.synced_at IS NULL)\n ;\n \";\n DB::connection()->getpdo()->exec($sQl);\n infolog('[BulkInventory.updateSyncDate] SUCCESS at '. now());\n\n $result=true;\n }catch(\\Exception $e) {\n infolog('[BulkInventory.updateSyncDate] ERROR updating sync date ('.$e->getMessage().') at '. now());\n }\n return($result);\n }", "public function hasDelay()\n {\n global $conf;\n\n if (empty($this->date_delivery) && ! empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility\n\n $now = dol_now();\n $date_to_test = empty($this->date_delivery) ? $this->date_commande : $this->date_delivery;\n\n return ($this->statut > 0 && $this->statut < 4) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);\n }", "public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }", "public function has_expired()\n\t{\n\t\treturn $this->until < time();\n\t}", "public function isTerminated(): bool\n {\n $currentDate = Carbon::now()->format('Y-m-d');\n\n return $this->termination_date ? $this->termination_date <= $currentDate : false;\n }", "protected function isOutdated(): bool {\n $outdated = true;\n if(!$this->dry()){\n $timezone = $this->getF3()->get('getTimeZone')();\n $currentTime = new \\DateTime('now', $timezone);\n $updateTime = \\DateTime::createFromFormat(\n 'Y-m-d H:i:s',\n $this->updated,\n $timezone\n );\n $interval = $updateTime->diff($currentTime);\n if($interval->days < Universe\\BasicUniverseModel::CACHE_MAX_DAYS){\n $outdated = false;\n }\n }\n return $outdated;\n }", "public function isReleased() {\n $strReturn = $this->getReleaseDate();\n if ($strReturn == self::$sNotFound || $strReturn == 'Not yet released') {\n return false;\n }\n\n return true;\n }", "private function verifyRent(){\n\t\tglobal $db;\n\t\t$date_now = date('2018-10-18');\n\t\t$sql = $db->prepare(\"SELECT * FROM project01_stock WHERE vacancy = 'no'\");\n\t\t$sql->execute();\n\t\tif ($sql->rowCount()>0) {\n\t\t\t$sql = $sql->fetch();\n\t\t\t$rom_info = $sql;\n\n\t\t\t$sql = $db->prepare(\"UPDATE project01_stock SET vacancy = 'yes', date_init = '0000-00-00', date_end = '0000-00-00' WHERE date_end <= :date_end\");\n\t\t\t$sql->bindValue(\":date_end\", $date_now);\n\t\t\t$sql->execute();\n\t\t}\n\t}", "public function hasDecredExpiry()\n {\n return $this->decred_expiry !== null;\n }", "protected function needsRenewal(): bool\n {\n return $this->renewable() === true && $this->expiryTime() - time() < $this->duration() / 2;\n }", "static function validateDayOff($completed_date){\n $order_month = date(\"m\",strtotime($completed_date));\n $current_month = date(\"m\");\n $current_day = date(\"d\");\n\n //get configuration plugin\n $conf = (object) current(Mage::getModel('facturacom_facturacion/conf')->getCollection()->getData());\n\n if($order_month != $current_month){\n $order_day = date(\"d\",strtotime($completed_date));\n if($order_month < $current_month){\n if($current_day > $conf->dayoff){\n return false;\n }\n }\n }\n return true;\n }", "public function getUtc(): bool\n {\n return $this->getOffset() === 0;\n }", "public function isExpiring() {\n return $this->expiration - time() < 22 * 24 * 3600;\n }", "public function erAktiv() : bool {\n if(!$this->getHome()->erFerdig()) {\n return true;\n }\n\n // Alle innslag før 2020 er ikke aktive\n if ($this->getSesong() < 2020) {\n return false;\n }\n\n // Sjekker alle arrangementer hvor dette innslaget ble sendt videre (inkludering home arrangement)\n $query = new Query(\n \"SELECT `arrangement_id`\n FROM `ukm_rel_arrangement_innslag`\n WHERE `innslag_id` = '#innslag'\",\n [\n 'innslag' => $this->getId()\n ]\n );\n\n $res = $query->run();\n // Det må finnes mer enn 1 arrangement (nummer 1 er home arrangement) \n if($res->num_rows > 1) {\n while ($arrangementId = Query::fetch($res)) {\n $arrangement = new Arrangement($arrangementId['arrangement_id']);\n \n // Arrangementet er ikke ferdig derfor dette innslaget er aktivt.\n if(!$arrangement->erFerdig()) {\n return true;\n }\n }\n }\n\n // Det ble ikke funnet at innslaget er aktivt\n return false;\n }", "public function isThisDateNotExceedingSixMonthsFromToday($ordered_date){\n \n $today = getdate(mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n $date_of_order = getdate(strtotime($ordered_date));\n \n if(($today['year'] - $date_of_order['year'])>1 ){\n return false;\n }else{\n if(($today['mon'] - $date_of_order['mon'])>6){\n return false;\n }else{\n return true;\n }\n }\n \n \n \n }", "public function isExpired()\n {\n $expiryDate = $this->getData('expiry_date');\n\n if ($expiryDate == null) {\n return false;\n }\n\n $expiryDate = strtotime($expiryDate);\n\n if ($expiryDate > time()) {\n return false;\n }\n\n return true;\n }", "function is_valid($voucher)\n\t{\n\t\t//$voucher = $this->get_voucher($id);\n\n\t\t//die(var_dump($voucher));\n\t\t\t\t\n\t\tif($voucher['max_uses']!=0 && $voucher['num_uses'] >= $voucher['max_uses'] ) return false;\n\t\t\n\t\tif($voucher['start_date'] != \"0000-00-00\")\n\t\t{\n\t\t\t$start = strtotime($voucher['start_date']);\n\t\t\n\t\t\t$current = time();\n\t\t\n\t\t\tif($current < $start)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($voucher['end_date'] != \"0000-00-00\")\n\t\t{\n\t\t\t$end = strtotime($voucher['end_date']) + 86400; // add a day for the availability to be inclusive\n\t\t\n\t\t\t$current = time();\n\t\t\n\t\t\tif($current > $end)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function isOutdated() {}", "public function isHistorical(): bool\n {\n return self::ISO_STATUS_HISTORICAL === $this->isoStatus;\n }", "function _isValidEndDate()\r\n {\r\n if (strtotime($this->data[$this->name]['end_date']) > strtotime(date('Y-m-d H:i:s'))) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function isLaterOrEqualTo(Tiramizoo_Shipping_Model_Date $date)\n {\n return $this->isLaterThan($date) || $date->isEqualTo($date);\n }", "public function isDue(): bool;", "public function needUpdate()\n\t{\n\t\treturn ($this->getLastUpdate() == null || time() - $this->getLastUpdate()->format('U') > 1 * 60);\n\t}", "public function isIndefinied(){\n return !$this->expires_on;\n }", "public function testIsNewerThanFalse() {\n\t\t\t$time = time();\n\t\t\t$lastRefresh = date('Y-m-d H:i:s', $time - 10);\n\t\t\t$userData = ['id' => 1, 'last_refresh' => $lastRefresh];\n\t\t\t$this->CurrentUser->setSettings($userData);\n\n\t\t\t$this->assertFalse($this->LastRefresh->isNewerThan($time));\n\t\t\t$this->assertFalse($this->LastRefresh->isNewerThan(date('Y-m-d H:i:s', $time)));\n\t\t}", "public function hasNewPrice(){\n return $this->_has(16);\n }", "public function beforeSave()\n\t{\n\t\t//Set null for empty field in table\n\t\tif($this->sale_date=='') $this->sale_date = NULL;\n\t\tif($this->next_sale_date=='') $this->next_sale_date = NULL;\n\t\treturn true;\n\t}", "public function skipThisUpdate()\n { // This entire method seems obsolete, due to the SELECT ... WHERE in loadPublishablePermits().\n $result = false;\n $d = $this->getField('deleted') == 1 || $this->getField('hidden') == 1;\n if ($d || $this->getField('lastpublished', true) > $this->getField('lastmodified', true)) {\n $result = true;\n }\n return $result;\n }", "public function checkStock()\n {\n if ($this->qty > ($this->beer->stock - $this->beer->requested_stock)){\n return false;\n }\n\n return true;\n }", "public function isEarlierThan(Tiramizoo_Shipping_Model_Date $date)\n {\n return $this->getTimestamp() < $date->getTimestamp();\n }", "private function isExpired($mix) {\n\t\tif ($this->recalc) {\n\t\t\t$currentDate = new Date(time());\n\t\t\t$equipmentExpireDate = ($mix->getEquipment()) ? $mix->getEquipment()->getDate() : null;\n\n\t\t\t//\tIf Equipment has expire date - check MIX for overdue\n\t\t\tif ($equipmentExpireDate != null) {\n\t\t\t\tif ($currentDate->isBiggerThan($equipmentExpireDate)) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn $mix->isExpired();\n\t\t}\n\t}" ]
[ "0.6827691", "0.66952544", "0.65435475", "0.64063185", "0.63666147", "0.6337721", "0.6335211", "0.63220304", "0.6289998", "0.62509733", "0.6232694", "0.6216706", "0.6201604", "0.62000227", "0.6175984", "0.6173769", "0.6118893", "0.61006224", "0.6081513", "0.60804266", "0.60422444", "0.6034392", "0.5999467", "0.5971859", "0.5950541", "0.594646", "0.5945668", "0.59371465", "0.5910993", "0.5905604", "0.5895428", "0.5892146", "0.5891959", "0.5888186", "0.5887585", "0.58744687", "0.5873265", "0.58694625", "0.5865929", "0.5861459", "0.5859677", "0.5856953", "0.58533496", "0.5851994", "0.5845401", "0.5842643", "0.5839902", "0.5835016", "0.5822984", "0.58211756", "0.58137286", "0.5809202", "0.58066094", "0.5800154", "0.5794635", "0.57881576", "0.5779577", "0.57757604", "0.5775651", "0.5765841", "0.5764972", "0.5764778", "0.5753919", "0.57509154", "0.5747116", "0.5739324", "0.5739316", "0.57260823", "0.57259053", "0.5716885", "0.57147425", "0.5710956", "0.5710503", "0.5700433", "0.5697895", "0.56970996", "0.5695263", "0.5691552", "0.56855017", "0.5682835", "0.5679768", "0.5675224", "0.5667231", "0.56657094", "0.5661619", "0.5661014", "0.5657815", "0.56523603", "0.5642195", "0.5639386", "0.56384254", "0.56381285", "0.5633021", "0.563294", "0.56296533", "0.56255317", "0.5616605", "0.5616219", "0.5611899", "0.561075", "0.5602379" ]
0.0
-1
Devuelve un array de los productos que vencieron.
function devolverProductosVencidos($consulta) { $conexion = mysqli_connect("localhost", "root", "", "inventariocasa"); $fecha = date("j-n-Y"); if (!$resultado = mysqli_query($conexion, $consulta)) { die(); } $datos = array(); $i = 0; while ($row = $resultado->fetch_assoc()) { if (diasTranscurridos($row['fecha_vencimiento'], $fecha)) { $datos[$i] = $row; $i++; } } mysqli_close($conexion); return $datos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductos()\n\t{\n\t\t$productos = [];\n\t\t\n\t\tif($this->carro) {\n\t\t\t\n\t\t\t$productosCollection = Collect($this->carro->getCarro());\n\t\t\t$idDeProductos = [];\n\t\t\t$idYCantidad = [];\n\t\t\t//separamos los ids para luego consultarlos en la BBDD ademas realizamos otro arreglo en donde indexamos el id junto con la cantidad para luego cruzar los arreglos\n\t\t\t$productosCollection->map(function($item, $key) use(&$idDeProductos, &$idYCantidad){\n\t\t\t\tif($item['cantidad'] > 0) {\n\t\t\t\t\t$idDeProductos[] = $item['id'];\n\t\t\t\t\t$idYCantidad[] = ['id'=>$item['id'], 'cantidad'=>$item['cantidad']];\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t});\n\t\t\t//buscamos los productos en la BBDD en base a los id que estaban en el carro\n\t\t\t$productos = Producto::disponibles()->whereIn('id',$idDeProductos)->get();\n\t\t\t$productos = $productos->toArray();\n\t\t\t\n\t\t\t//cruzamos los array de cada producto que sacamos de la BBDD junto con la cantidad de cada producto que habia en el carro\n\t\t\t$iterador = 0;\n\t\t\tforeach ($productos as $producto) {\n\t\t\t\tforeach ($idYCantidad as $cantidad) { \n\t\t\t\t\tif($cantidad['id'] == $producto['id']) {\n\t\t\t\t\t\t$productos[$iterador]['cantidad'] = $cantidad['cantidad'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t++$iterador;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\treturn $productos;\n\t}", "public function getProductos() {\n $productosArray = ArrayHelper::map(\\app\\models\\Productostbl::find()->all(), 'id', 'producto');\n return $productosArray;\n }", "public function getProductsArray()\n {\n $result = $this->details->map(function ($item, $key) {\n return [ 'product_id' => $item->product_id,\n 'quantity' => $item->quantity ];\n })->values()->toArray();\n\n return $result;\n }", "public function getProduct(): array\r\n {\r\n $pro = [];\r\n $result = $this->DataB->query('SELECT * FROM product');\r\n\r\n while ($row = $result->fetch_assoc()) {\r\n $pro[] = $row;\r\n }\r\n\r\n return $pro;\r\n }", "public function getProductos() {\r\n $pdo = Database::connect();\r\n $sql = \"select * from producto\";\r\n $resultado = $pdo->query($sql);\r\n //transformamos los registros en objetos:\r\n $listado = array();\r\n foreach ($resultado as $res) {\r\n $producto = new Producto($res['codigo'], $res['descripcion'], $res['cantidad'], $res['precio']);\r\n array_push($listado, $producto);\r\n }\r\n Database::disconnect();\r\n //retornamos el listado resultante:\r\n return $listado;\r\n }", "public function getProductos(){\n\t\n\treturn $this->productos;\n\t}", "public function getArray(){\n\t\treturn $this->products;\n\t}", "public function product()\n {\n return array_product($this->data());\n }", "public function generarVentasProductos() {\n\n $cartItems = $this->obtenerItemsCarro();\n\n $i = 0;\n foreach ($cartItems as $item) {\n $vP = new VentasProductos();\n $vP->producto_id = $item->producto_id;\n $vP->categoria_id = $item->categoria_id;\n $vP->cantidad = $item->cantidad;\n $vP->precio_unitario = $item->precio_unitario;\n $vP->precio_total = $item->precio_total;\n $vP->precio_id =$item->id_precio;\n $ventasProducto[$i] = $vP;\n $i++;\n }\n\n return $ventasProducto;\n }", "public function getProdutos() {\n if ($this->con->isConnected()) { \n $sql = \"SELECT id, name FROM products\";\n $stmt = $this->con->prepare($sql);\n if ($stmt) {\n if ($stmt->execute()) {\n $stmt->bind_result($id, $name);\n $stmt->store_result();\n $produtos = [];\n while($stmt->fetch()) {\n $produtos[] = new Product($id, $name);\n }\n $stmt->close();\n return $produtos;\n }\n }\n }\n return [];\n }", "private function getProducts(): array\n {\n return $this->_type === 'price'\n ? $this->_priceProducts\n : $this->_stockProducts;\n }", "public function getCartProducts() :array\n {\n $products = [];\n $query = $this->pdo->prepare(\"SELECT products.id,products.name,products.price,orders_products.quantity,products.image,products.price*orders_products.quantity as summ from products\nINNER JOIN orders_products on products.id=orders_products.product_id\nINNER JOIN orders on orders.id = orders_products.order_id\nWHERE orders.user_id = :id AND orders.status='cart'\");\n $query->execute(array('id'=>$_SESSION['user_id']));\n $row = $query->fetchALL(PDO::FETCH_ASSOC);\n foreach ($row as $key => $value) {\n $this->amount+=$row[$key]['price']*$row[$key]['quantity'];\n }\n Cart::setSum($this->amount);\n foreach ($row as $r) {\n array_push($products, $this->mapArrayToProduct($r));\n }\n return $products;\n }", "public function getItemsArray() {\r\n $stmt = $this->DB->prepare ( \"SELECT * FROM products\");\r\n $stmt->execute ();\r\n return $stmt->fetchAll (PDO::FETCH_ASSOC);\r\n }", "private function _generateProductsData(){\n \n $products = $this->context->cart->getProducts();\n $pagseguro_items = array();\n \n $cont = 1;\n \n foreach ($products as $product) {\n \n $pagSeguro_item = new PagSeguroItem();\n $pagSeguro_item->setId($cont++);\n $pagSeguro_item->setDescription(Tools::truncate($product['name'], 255));\n $pagSeguro_item->setQuantity($product['quantity']);\n $pagSeguro_item->setAmount($product['price_wt']);\n $pagSeguro_item->setWeight($product['weight'] * 1000); // defines weight in gramas\n \n if ($product['additional_shipping_cost'] > 0)\n $pagSeguro_item->setShippingCost($product['additional_shipping_cost']);\n \n array_push($pagseguro_items, $pagSeguro_item);\n }\n \n return $pagseguro_items;\n }", "public function Mostrar_Producto(){\r\n\r\n\t\t\t$sql=$this->db->query(\"CALL SP_M_TABLA_PRODUCTO\");\r\n\t\t\twhile($filas=$sql->fetch(PDO::FETCH_ASSOC)){\r\n\t\t\t\t$this->productos[]=$filas;\r\n\t\t\t}\r\n\t\t\treturn $this->productos;\r\n\t\t}", "public function ListarProductos()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "public function getProducts()\n {\n $products = [\n [\"name\" => \"Sledgehammer\", \"price\" => 125.75],\n [\"name\" => \"Axe\", \"price\" => 190.50],\n [\"name\" => \"Bandsaw\", \"price\" => 562.131],\n [\"name\" => \"Chisel\", \"price\" => 12.9],\n [\"name\" => \"Hacksaw\", \"price\" => 18.45],\n ];\n return $products;\n }", "public function buscarProductoCarrito(){\n $carrito = $_SESSION['carrito'];\n\n $resList = array();\n\n foreach($carrito as $item){\n if($item[0] == $this -> producto){\n $resList[0] = $item[0];\n $resList[1] = $item[1];\n }\n }\n\n return $resList;\n }", "public function retornaProdutos() {\n\n\t\t$produtos = $this->produtoModel->retornaProduto();\n\t\t\n\t\t$produtosComValor = array();\n\t\t\n\t\t$valorTotal = 0;\n\t\tforeach ($produtos as $key => $produto) {\n\t\t\t$valorParcial = $this->calculaValorProduto($produto->precoProduto, $produto->qtdeProduto);\n\t\t\t\n\t\t\t$produtos[$key]->valorParcialProduto = $valorParcial;\n\t\t\t\n\t\t\t$valorTotal += $valorParcial;\n\t\t}\n\n\t\t$produtosComValor['produtos'] = $produtos;\n\t\t$produtosComValor['total'] = number_format($valorTotal, 2, '.', '');\n\t\t\t\t\n\t\treturn $produtosComValor;\n\t}", "function listar(){\n try{\n $sql=\"select * from producto\";\n $ps=$this->conexion->getConexion()->prepare($sql);\n $ps->execute(NULL);\n $resultado = [];\n while($row=$ps->fetch(PDO::FETCH_OBJ)){\n $producto = new producto(\n $row->pro_id,\n $row->pro_nombre,\n $row->pro_descripcion,\n $row->pro_cantidad,\n $row->pro_valor\n\n );\n //$producto ->setProId($row->pro_id);\n //$producto ->setProNombre($row->pro_nombre);\n //$producto ->setProDescripcion($row->pro_descripcion);\n //$producto ->setProCantidad($row->pro_cantidad);\n //$producto ->setProValor($row->pro_valor);\n array_push($resultado,$producto);\n }\n $this->conexion =null;\n }catch(PDOException $e){\n echo \"Fallo la conexion\" . $e->getMessage();\n }\n return $resultado;\n }", "public static function getProductos(){\n $cesta = [];\n if(isset($_SESSION['producto'])) { // SI la sesión existe obtenemos los datos...\n //recorremos sessión y montamos en array la cesta...\n foreach ($_SESSION['producto'] as $key => $value) {\n // Creamos el array con los productos (und, código, precio)...\n $cesta[] = [self::getUnidades($key), $key, self::getCoste($key)];\n }\n }\n return $cesta;\n }", "public function getProducts() {\n\n $dbData = new DBData();\n $array_products = [];\n foreach ($this->items as $item) {\n $array_products[] = $dbData->getProductDetails($item['id']);\n }\n return $array_products;\n }", "public static function GetProdutos(){\n self::$results = self::query(\"SELECT cdProduto, nomeProduto, descricao, precoUnitario, foto FROM tbProduto\");\n self::$resultRetorno = [];\n if (is_array(self::$results) || is_object(self::$results)){\n foreach(self::$results as $result){\n $result[3] = str_replace('.', ',', $result[3]);\n \n array_push(self::$resultRetorno, $result);\n\n }\n }\n return self::$resultRetorno;\n }", "function getProducts()\n {\n $ret = array();\n foreach ($this->getItems() as $item)\n if ($item->item_type == 'product')\n if ($pr = $item->tryLoadProduct())\n $ret[] = $pr;\n return $ret;\n }", "public function getProducts(): array\r\n {\r\n try {\r\n $statement = $this->db->prepare(\"select * from products\");\r\n $statement->execute();\r\n return $this->products = $statement->fetchAll(\\PDO::FETCH_ASSOC);\r\n } catch (\\PDOException $e) {\r\n throw new \\Mpopa\\ExpException(\"Can't get products: \" . $e->getMessage());\r\n }\r\n }", "private function ajoutProduits() {\n $em = $this->getDoctrine()->getManager();\n $produis = $em->getRepository('VentesBundle:Produit')->findAll();\n $produitArray = array();\n foreach ($produis as $p) {\n $id = $p->getId();\n $libelle = $p->getLibelle();\n $produitArray[$id] = $libelle;\n }\n return $produitArray;\n }", "function getProductos()\n{\n\t$con = getDBConnection();\n\t$sql = \"SELECT * FROM productos\";\n\t$stmt = $con->prepare($sql);\n\t$stmt->execute();\n\t$productos = null;\n\twhile ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t$producto = new Producto();\n\t\t$producto->setID($row['id']);\n\t\t$producto->set($row['nombre'],$row['descripcion'],$row['precio']);\n\t\t$productos[] = $producto;\n\t}\n\treturn $productos;\n}", "function getProducts() {\n\t\t$saleData = array();\n\t\tif($stmt = $this->connection->prepare(\"select * from products;\")) {\n\t\t\t$stmt -> execute();\n\n\t\t\t$stmt->store_result();\n\t\t\t$stmt->bind_result($id, $itemName, $itemImage, $itemDesc, $salePrice, $regularPrice, $numberLeft);\n\n\t\t\tif($stmt ->num_rows >0){\n\t\t\t\twhile($stmt->fetch() ){\n\t\t\t\t\t$saleData[] = array(\n\t\t\t\t\t\t'id' => $id,\n\t\t\t\t\t\t'itemName' => $itemName,\n\t\t\t\t\t\t'itemImage' => $itemImage,\n\t\t\t\t\t\t'itemDesc' => $itemDesc,\n\t\t\t\t\t\t'salePrice' => $salePrice,\n\t\t\t\t\t\t'regularPrice' => $regularPrice,\n\t\t\t\t\t\t'numberLeft' => $numberLeft\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $saleData;\n\t}", "public function getProducts() {\n\t\t$baseUrl = 'https://'.$this->apiKey.':'.$this->password.'@'.$this->domain.'.myshopify.com';\n\t\t$request = '/admin/products.json';\n\t\t$method = 'GET';\n\n\t\t$result = $this->curl($baseUrl.$request, $method);\n\n\t\t$products = array();\n\t\tforeach($result->products as $shopify) {\n\t\t\tforeach($shopify->variants as $variant) {\n\t\t\t\t// need to make a class Product in this folder?\n\t\t\t\t$product = new stdClass;\n\t\t\t\t$product->id \t\t= $shopify->id;\n\t\t\t\t$product->sku \t\t= $variant->sku;\n\t\t\t\t$product->name \t\t= $shopify->title;\n\t\t\t\t$product->price \t= $variant->price;\n\t\t\t\t$product->quantity \t= $variant->inventory_quantity;\t\n\t\t\t\tarray_push($products, $product);\n\t\t\t}\n\t\t}\n\n\t\treturn $products;\n\t}", "private function setup_products() {\n\t\tglobal $wpdb;\n\n\t\t$ids = [];\n\t\t$d = $wpdb->get_results( \"SELECT distinct `products` FROM `{$wpdb->prefix}thespa_data`\", ARRAY_A );\n\t\tforeach ( $d as $datum ) {\n\t\t\t$prs = explode( \",\", $datum['products'] );\n\t\t\tforeach ( $prs as $pr ) {\n\t\t\t\tif ( !isset( $ids[$pr] ) ) {\n\t\t\t\t\tarray_push($ids, $pr );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$i = 0;\n\t\tforeach ( $ids as $id ) {\n\t\t\t$product = wc_get_product( $id );\n\t\t\tif ( is_object( $product ) ) {\n\t\t\t\t$this->products[$i] = [\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'name' => $product->get_title(),\n\t\t\t\t\t'url' => $product->get_permalink(),\n\t\t\t\t\t'img' => wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'medium', true )[0],\n\t\t\t\t\t'cost' => $product->get_price_html(),\n\t\t\t\t];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}", "public function listar_productos()\n {\n\n return $this->db->get('productos')->result();\n }", "public function getDocumentProducts(): array\r\n {\r\n return $this->document['products'] ?? [];\r\n }", "public static function getProductos() {\r\n\r\n $consulta = \"SELECT * FROM productos\";\r\n\r\n $conexion = ConexionDB::conectar(\"tienda\");\r\n\r\n try {\r\n $stmt = $conexion->prepare($consulta);\r\n $stmt->execute();\r\n $resultado = $stmt->fetchAll(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, \"Carrodelacompra\\Producto\");\r\n } catch (PDOException $e){\r\n\t\t echo $e->getMessage();\r\n } \r\n \r\n ConexionDB::desconectar();\r\n return $resultado;\r\n \r\n\r\n }", "public function getSelectedProducts()\n {\n if (!empty($this->object->products)) {\n $productsIds = explode('|', $this->object->products);\n $sql = 'SELECT p.`id_product`, p.`reference`, pl.`name`\n\t\t\t\tFROM `' . _DB_PREFIX_ . 'product` p\n\t\t\t\t' . Shop::addSqlAssociation('product', 'p') . '\n\t\t\t\tLEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl \n\t\t\t\t ON (p.`id_product` = pl.`id_product` ' . Shop::addSqlRestrictionOnLang('pl') . ')\n\t\t\t\tWHERE pl.`id_lang` = ' . (int)$this->context->language->id . '\n\t\t\t\tAND p.`id_product` IN (' . implode(',', $productsIds) . ')\n\t\t\t\tORDER BY FIELD(p.`id_product`, '.implode(',', $productsIds).')';\n\n return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);\n }\n\n return array();\n }", "public function listar_productos_carrito() {\n \n try {\n $sql = \"\n select \n p.descripcion,\n i.cantidad,\n i.precio_venta,\n e.importe_total,\n p.id_producto\n from \n al_producto p inner join al_inventario i\n on\n p.id_producto = i.id_producto inner join pedido e\n on\n i.id_pedido = e.id_pedido \n where\n e.id_cliente = '$_SESSION[cliente_id]' and e.estado is null; \n \";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "public function get_productos($dato){\n\n\t\t\t//Creamos la SQL\n\t\t\t$sql = \"SELECT * FROM PRODUCTOS WHERE PAISDEO='\" . $dato . \"' \";\n\t\t\t//introducimos la sql como consulta preparada (prepare)\n\t\t\t$sentencia = $this->conexion_db->prepare($sql);\n\t\t\t//Ejecutamos la consulta preparada\n\t\t\t$sentencia->execute(array());\n\t\t\t//Guarda en un array asociativo todo los resultado\n\t\t\t$productos = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t//Cerramos el cursor\n\t\t\t$sentencia->closeCursor();\n\n\t\t\treturn $productos;\n\t\t\t//Para cerrar la conexiones y liberar memoria\n\t\t\t$this->coexion_db = null;\n\t\t}", "public static function productLists()\n {\n array_push(self::$products, \n [\n CART::ID => self::$id,\n CART::NAME => self::$name,\n CART::PRICE => self::$price,\n CART::QUANTITY => self::$quantity\n ]);\n }", "public function allProducts()\r\n {\r\n // left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n // left join mshop_media as mm on mm.id = mpl.refid\r\n // left JOIN mshop_price as mpri on mpri.id = mpl.refid\r\n // where mpl.pos = 0 and mpl.domain in ('media','price')\";\r\n $qry1 = \"select mp.id as product_id, mp.code as product_code, mp.label as product_name, mm.preview as image_url from mshop_product as mp \r\n left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n left join mshop_media as mm on mm.id = mpl.refid\r\n where mpl.pos = 0 and mpl.domain in ('media')\";\r\n $qry2 = \"select mp.id as product_id, mp.label as product_name, mpri.value as product_price from mshop_product as mp \r\n left join mshop_product_list as mpl on mpl.parentid = mp.id \r\n left JOIN mshop_price as mpri on mpri.id = mpl.refid\r\n where mpl.pos = 0 and mpl.domain in ('price')\";\r\n $products1 = DB::select($qry1);\r\n $products2 = DB::select($qry2); \r\n $i = 0;\r\n foreach($products1 as $products) {\r\n foreach($products2 as $product) {\r\n if($product->product_id === $products->product_id) {\r\n $products1[$i]->product_price = $product->product_price;\r\n }\r\n }\r\n $i++;\r\n }\r\n return $products1;\r\n }", "function cb_product_result($items)\r\n\t{\r\n\t\t$ret = array();\r\n\r\n\t\tforeach ($items as $i)\r\n\t\t{\r\n\t\t\t# Create a single copy of this product for return.\r\n\r\n\t\t\tif (empty($ret[$i['prod_id']])) $ret[$i['prod_id']] = $i;\r\n\r\n\t\t\tif (empty($ret[$i['prod_id']]['atrs'][$i['atr_id']]))\r\n\t\t\t\t$ret[$i['prod_id']]['atrs'][$i['atr_id']] = $i;\r\n\r\n\t\t\tif (empty($ret[$i['prod_id']]['atrs'][$i['atr_id']]['opts'][$i['opt_id']]))\r\n\t\t\t\t$ret[$i['prod_id']]['atrs'][$i['atr_id']]['opts'][$i['opt_id']] = $i;\r\n\t\t}\r\n\r\n\t\tforeach ($ret as &$v)\r\n\t\t\t$v = $this->product_props($v);\r\n\r\n\t\treturn $ret;\r\n\t}", "public function getProductoRe(){\n\t\t$sql = \"SELECT id_producto, nombre, cantidad, precio_total, presentacion, proveedor, marca, tipo_producto FROM productos INNER JOIN presentaciones USING(id_presentacion) INNER JOIN proveedores USING(id_proveedor) INNER JOIN marca USING(id_marca) INNER JOIN tipo_producto USING(id_tipo_producto) ORDER BY id_producto\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "function GetProducts(){\n $query = $this->db->prepare(\"SELECT `p`.`id` as `id_producto`, `p`.`nombre` as `nombre_producto`, `p`.`descripcion` as `desc_producto`, `p`.`precio` as `precio`, `p`.`stock` as `stock`, `c`.`nombre` as `nombre_categoria` FROM producto p INNER JOIN categoria c ON `p`.`id_categoria`=`c`.`id`\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function readProductos(){\n $sql='SELECT idProducto, foto, nombre, precio, cantidad, nombreProveedor, producto.estado from producto, proveedor where proveedor.idProveedor=producto.idProveedor and producto.estadoEliminacion= 1';\n $params=array(null);\n return Database::getRows($sql, $params);\n }", "function listar2(){\n\t\t\n\t\t$sql = \"SELECT c.id, c.codigo, c.nombre from prd_pasos_producto a\n\t\tinner join prd_pasos_acciones_producto b on b.id_paso=a.id\n\t\tinner join app_productos c on c.id=a.id_producto\n\t\tgroup by a.id_producto;\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "public function todaInfoProductos(){\n\n for($i = 0; $i < count($this -> listProducto); $i++){\n $this -> listProducto[$i][0] -> getInfoBasic();\n }\n }", "public function product() {\n\t\treturn array_product($this->_value);\n\t}", "public function getAllProducts(){\r\n\t\t//viet cau sql\r\n\t\t$sql =\"SELECT * FROM products\";\r\n\t\t//thuc thi cau truy van\r\n\t\t$obj = self::$conn->query($sql);\r\n\t\treturn $this->getData($obj);\r\n\t}", "public function consultarProdutos(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT c.nome,a.* FROM tbproduto a, tbcategorias c where a.idcategoria = c.idcategoria order by a.referencia\";\n $sql = $this->conexao->query($sql);\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n\n $idproduto = $row['id'];\n $nome = $row['nome'];\n $referencia = $row['referencia'];\n $idcategoria = $row['idcategoria'];\n $preco = $row['preco'];\n $descricao = $row['descricao'];\n $estoque = $row['estoque'];\n $habilitado = $row['habilitado'];\n $imagem = $row['imagem'];\n // $url = $row['url'];\n\n $dado = array();\n $dado['idproduto'] = $idproduto;\n $dado['idcategoria'] = $idcategoria;\n $dado['nome'] = $nome;\n $dado['referencia'] = $referencia;\n $dado['descricao'] = $descricao;\n $dado['preco'] = $preco;\n $dado['estoque'] = $estoque;\n $dado['habilitado'] = $habilitado;\n $dado['imagem'] = $imagem;\n $dados[] = $dado;\n }\n\n return $dados;\n\n }", "private function getDatabaseProducts(): array\n {\n $products = DB::table('products')->pluck('product_id', 'id');\n \n return $products->toArray();\n }", "public function getArrayOfproducts(): array\n {\n $products = $this->model->getByCategory('helmet', $this->route['action']);\n return $products;\n }", "public function index()\n {\n $took_product = array();\n $product = Product::all();\n foreach($product as $pro){\n $phone_mate = $pro->phone_id;\n $phone = Phone::where('id',$phone_mate)->pluck('phone');\n $var = array(\n 'id' => $pro->id,\n 'name' => $pro->name,\n 'price' => $pro->price,\n 'stock' => $pro->stock,\n 'image' => $pro->image,\n 'phone' => $phone,\n 'category' => $pro->categories\n );\n $took_product[] = $var;\n $phone_mate = null;\n $phone = null;\n }\n return $took_product;\n }", "function getProductList()\n {\n $product=array('id'=>5,'name'=>'test_product','qty'=>30);\n $list=array($product);\n $product['name']='test_product2';\n $list[]=$product;\n return $list;\n }", "public function get_AllDetalleproductos() \n {\n $sql=\"select pb.PAR_D_NOMBRE,pa.PAR_D_NOMBRE,p.PRO_D_NOMBRE,p.PRO_E_ESTADOVENTAS from dg_productos p\n INNER JOIN dg_parametros pa on pa.PAR_C_CODIGO=p.PAR_C_CODIGO\n INNER JOIN dg_parametros pb on pb.PAR_C_CODIGO=pa.PAR_C_PADRE;\";\n $res = mysql_query($sql);\n return $res;\n }", "public function VerDetallesIngredientesProductos()\n{\n\tself::SetNames();\n\t$sql =\"SELECT productosvsingredientes.codproducto, productosvsingredientes.cantracion, ingredientes.codingrediente, ingredientes.nomingrediente, ingredientes.costoingrediente, ingredientes.cantingrediente, ingredientes.unidadingrediente FROM (productos LEFT JOIN productosvsingredientes ON productos.codproducto=productosvsingredientes.codproducto) LEFT JOIN ingredientes ON ingredientes.codingrediente=productosvsingredientes.codingrediente WHERE productosvsingredientes.codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t$num = $stmt->rowCount();\n\n\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[]=$row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}", "public static function TraerProductosBD()\n\t{\n\t\ttry {\n\n\t\t\t$ListaDeProductosLeidos = array();\n\n\t\t\t/*$cB=$obj->codBarra;\n\t\t\t$n=$obj->nombre;\n\t\t\t$pF=$obj->pathFoto;*/\n\t\t\t$pdo=new PDO(\"mysql:dbname=productos\",\"root\",\"\");\n\t\t\t$band=$pdo->prepare(\"SELECT codigo_barra AS codBarra, nombre, path_foto AS pathFoto FROM producto\");\n \t\t\t$band->execute();\n\n\t\t\twhile ($prod=$band->fetchObject(\"Producto\")) {\n\t\t\t\tarray_push($ListaDeProductosLeidos,$prod);\n\t\t\t}\n\n\t\t\treturn $ListaDeProductosLeidos;\n\t\t} catch (PDOException $e) {\n \t\t\techo $e->getMessage();\n\t\t\t\treturn false;\n\t\t}\n\t}", "public function listarProductos()\n {\n $crudProducto = new crudProducto(); //metodo para hacer la peticion de modelo producto\n return $crudProducto->listarProductos(); //retornar los valores del metodo listar productos\n }", "public function get_products()\r\n {\r\n if($this->db->count_all($this->_table)==0) return false;\r\n \r\n //lay danh sach cac san pham trong bang comment\r\n $this->db->distinct('product_id');\r\n $this->db->select('product_id');\r\n $this->db->order_by('product_id','asc');\r\n $pro_id = $this->db->get($this->_table)->result_array();\r\n \r\n //dem so comment cho moi san pham\r\n $this->db->order_by('product_id','asc');\r\n $this->db->group_by('product_id');\r\n $this->db->select('count(comment_id) as count');\r\n $pro_count = $this->db->get($this->_table)->result_array();\r\n \r\n foreach($pro_id as $value)\r\n {\r\n $key[] = $value['product_id'];\r\n }\r\n foreach($pro_count as $value)\r\n {\r\n $num[] = $value['count'];\r\n }\r\n //tao mang co key la product_id value la so comment va tra ve mang nay \r\n return array_combine($key, $num);\r\n }", "public function getProducts()\n {\n return $this->products;\n }", "public function getProducts()\n {\n return $this->products;\n }", "public function getProducts()\n {\n return $this->products;\n }", "public function getProducts()\n {\n return $this->products;\n }", "public function getProducts()\n {\n return $this->products;\n }", "function mbuscar_productos_x_salida($sal_id_salida) {\n\t\t$list = array();\n\t\t$i = 0;\n\t\t$query = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t sad.sad_id_salida_detalle, \n\t\t\t sad.pro_id_producto, \n\t\t\t sad.sal_id_salida, \n\t\t\t sad.sad_cantidad, \n\t\t\t sad.sad_valor, \n\t\t\t sad.sad_valor_total, \n\t\t\t p.pro_nombre, \n\t\t\t um.unm_nombre_corto \n\t\t\tFROM salida_detalle sad \n\t\t\t LEFT JOIN producto p \n\t\t\t ON sad.pro_id_producto=p.pro_id_producto \n\t\t\t LEFT JOIN unidad_medida um \n\t\t\t ON p.unm_id_unidad_medida=um.unm_id_unidad_medida \n\t\t\tWHERE sad.sal_id_salida=$sal_id_salida \n\t\t\torder by sad.sad_id_salida_detalle desc\");\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\t$i++;\n\t\t\t$row->nro = $i;\n\t\t\t$list[] = $row;\n\t\t}\n\t\treturn $list;\n\t}", "public function run()\n {\n $productos = [\n ['modelo' => '167', 'color' => '001', 'talla' => '08', 'code' => '1034416700108'],\n ['modelo' => '167', 'color' => '001', 'talla' => '10', 'code' => '1034416700110'],\n ['modelo' => '167', 'color' => '001', 'talla' => '12', 'code' => '1034416700112'],\n ['modelo' => '167', 'color' => '001', 'talla' => '14', 'code' => '1034416700114'],\n ['modelo' => '167', 'color' => '001', 'talla' => '16', 'code' => '1034416700116'],\n ['modelo' => '167', 'color' => '004', 'talla' => '08', 'code' => '1034416700408'],\n ['modelo' => '167', 'color' => '004', 'talla' => '10', 'code' => '1034416700410'],\n ['modelo' => '167', 'color' => '004', 'talla' => '12', 'code' => '1034416700412'],\n ['modelo' => '167', 'color' => '004', 'talla' => '14', 'code' => '1034416700414'],\n ['modelo' => '167', 'color' => '004', 'talla' => '16', 'code' => '1034416700416'],\n ['modelo' => '167', 'color' => '006', 'talla' => '08', 'code' => '1034416700608'],\n ['modelo' => '167', 'color' => '006', 'talla' => '10', 'code' => '1034416700610'],\n ['modelo' => '167', 'color' => '006', 'talla' => '12', 'code' => '1034416700612'],\n ['modelo' => '167', 'color' => '006', 'talla' => '14', 'code' => '1034416700614'],\n ['modelo' => '167', 'color' => '006', 'talla' => '16', 'code' => '1034416700616'],\n ['modelo' => '167', 'color' => '023', 'talla' => '08', 'code' => '1034416702308'],\n ['modelo' => '167', 'color' => '023', 'talla' => '10', 'code' => '1034416702310'],\n ['modelo' => '167', 'color' => '023', 'talla' => '12', 'code' => '1034416702312'],\n ['modelo' => '167', 'color' => '023', 'talla' => '14', 'code' => '1034416702314'],\n ['modelo' => '167', 'color' => '023', 'talla' => '16', 'code' => '1034416702316'],\n ['modelo' => '167', 'color' => '063', 'talla' => '08', 'code' => '1034416706308'],\n ['modelo' => '167', 'color' => '063', 'talla' => '10', 'code' => '1034416706310'],\n ['modelo' => '167', 'color' => '063', 'talla' => '12', 'code' => '1034416706312'],\n ['modelo' => '167', 'color' => '063', 'talla' => '14', 'code' => '1034416706314'],\n ['modelo' => '167', 'color' => '063', 'talla' => '16', 'code' => '1034416706316'],\n ['modelo' => '167', 'color' => '065', 'talla' => '08', 'code' => '1034416706508'],\n ['modelo' => '167', 'color' => '065', 'talla' => '10', 'code' => '1034416706510'],\n ['modelo' => '167', 'color' => '065', 'talla' => '12', 'code' => '1034416706512'],\n ['modelo' => '167', 'color' => '065', 'talla' => '14', 'code' => '1034416706514'],\n ['modelo' => '167', 'color' => '065', 'talla' => '16', 'code' => '1034416706516'],\n ['modelo' => '472', 'color' => '001', 'talla' => 'L', 'code' => '10203472001L'],\n ['modelo' => '472', 'color' => '001', 'talla' => 'M', 'code' => '10203472001M'],\n ['modelo' => '472', 'color' => '001', 'talla' => 'XL', 'code' => '10203472001XL'],\n ['modelo' => '472', 'color' => '002', 'talla' => 'L', 'code' => '10203472002L'],\n ['modelo' => '472', 'color' => '002', 'talla' => 'M', 'code' => '10203472002M'],\n ['modelo' => '472', 'color' => '002', 'talla' => 'XL', 'code' => '10203472002XL'],\n ['modelo' => '472', 'color' => '248', 'talla' => 'L', 'code' => '10203472248L'],\n ['modelo' => '472', 'color' => '248', 'talla' => 'M', 'code' => '10203472248M'],\n ['modelo' => '472', 'color' => '248', 'talla' => 'XL', 'code' => '10203472248XL'],\n ['modelo' => '555', 'color' => '001', 'talla' => 'L', 'code' => '10244555001L'],\n ['modelo' => '555', 'color' => '001', 'talla' => 'M', 'code' => '10244555001M'],\n ['modelo' => '555', 'color' => '001', 'talla' => 'S', 'code' => '10244555001S'],\n ['modelo' => '555', 'color' => '002', 'talla' => 'L', 'code' => '10244555002L'],\n ['modelo' => '555', 'color' => '002', 'talla' => 'M', 'code' => '10244555002M'],\n ['modelo' => '555', 'color' => '002', 'talla' => 'S', 'code' => '10244555002S'],\n ['modelo' => '555', 'color' => '019', 'talla' => 'L', 'code' => '10244555019L'],\n ['modelo' => '555', 'color' => '019', 'talla' => 'M', 'code' => '10244555019M'],\n ['modelo' => '555', 'color' => '019', 'talla' => 'S', 'code' => '10244555019S'],\n ['modelo' => '563', 'color' => '001', 'talla' => 'L', 'code' => '10288563001L'],\n ['modelo' => '563', 'color' => '001', 'talla' => 'M', 'code' => '10288563001M'],\n ['modelo' => '563', 'color' => '001', 'talla' => 'S', 'code' => '10288563001S'],\n ['modelo' => '563', 'color' => '002', 'talla' => 'L', 'code' => '10288563002L'],\n ['modelo' => '563', 'color' => '002', 'talla' => 'M', 'code' => '10288563002M'],\n ['modelo' => '563', 'color' => '002', 'talla' => 'S', 'code' => '10288563002S'],\n ['modelo' => '563', 'color' => '372', 'talla' => 'L', 'code' => '10288563372L'],\n ['modelo' => '563', 'color' => '372', 'talla' => 'M', 'code' => '10288563372M'],\n ['modelo' => '563', 'color' => '372', 'talla' => 'S', 'code' => '10288563372S'],\n ['modelo' => '563', 'color' => '373', 'talla' => 'L', 'code' => '10288563373L'],\n ['modelo' => '563', 'color' => '373', 'talla' => 'M', 'code' => '10288563373M'],\n ['modelo' => '563', 'color' => '373', 'talla' => 'S', 'code' => '10288563373S'],\n ['modelo' => '563', 'color' => '374', 'talla' => 'L', 'code' => '10288563374L'],\n ['modelo' => '563', 'color' => '374', 'talla' => 'M', 'code' => '10288563374M'],\n ['modelo' => '563', 'color' => '374', 'talla' => 'S', 'code' => '10288563374S'],\n ['modelo' => '445', 'color' => '002', 'talla' => 'L', 'code' => '10740445002L'],\n ['modelo' => '445', 'color' => '002', 'talla' => 'M', 'code' => '10740445002M'],\n ['modelo' => '445', 'color' => '002', 'talla' => 'XL', 'code' => '10740445002XL'],\n ['modelo' => '445', 'color' => '018', 'talla' => 'L', 'code' => '10740445018L'],\n ['modelo' => '445', 'color' => '018', 'talla' => 'M', 'code' => '10740445018M'],\n ['modelo' => '445', 'color' => '018', 'talla' => 'XL', 'code' => '10740445018XL'],\n ['modelo' => '445', 'color' => '248', 'talla' => 'L', 'code' => '10740445248L'],\n ['modelo' => '445', 'color' => '248', 'talla' => 'M', 'code' => '10740445248M'],\n ['modelo' => '445', 'color' => '248', 'talla' => 'XL', 'code' => '10740445248XL'],\n ['modelo' => '444', 'color' => '001', 'talla' => 'L', 'code' => '10740444001L'],\n ['modelo' => '444', 'color' => '001', 'talla' => 'M', 'code' => '10740444001M'],\n ['modelo' => '444', 'color' => '001', 'talla' => 'XL', 'code' => '10740444001XL'],\n ['modelo' => '444', 'color' => '002', 'talla' => 'L', 'code' => '10740444002L'],\n ['modelo' => '444', 'color' => '002', 'talla' => 'M', 'code' => '10740444002M'],\n ['modelo' => '444', 'color' => '002', 'talla' => 'XL', 'code' => '10740444002XL'],\n ['modelo' => '444', 'color' => '018', 'talla' => 'L', 'code' => '10740444018L'],\n ['modelo' => '444', 'color' => '018', 'talla' => 'M', 'code' => '10740444018M'],\n ['modelo' => '444', 'color' => '018', 'talla' => 'XL', 'code' => '10740444018XL'],\n ['modelo' => '444', 'color' => '248', 'talla' => 'L', 'code' => '10740444248L'],\n ['modelo' => '444', 'color' => '248', 'talla' => 'M', 'code' => '10740444248M'],\n ['modelo' => '444', 'color' => '248', 'talla' => 'XL', 'code' => '10740444248XL'],\n ['modelo' => '479', 'color' => '001', 'talla' => 'L', 'code' => '10740479001L'],\n ['modelo' => '479', 'color' => '001', 'talla' => 'M', 'code' => '10740479001M'],\n ['modelo' => '479', 'color' => '001', 'talla' => 'S', 'code' => '10740479001S'],\n ['modelo' => '479', 'color' => '001', 'talla' => 'XL', 'code' => '10740479001XL'],\n ['modelo' => '479', 'color' => '002', 'talla' => 'L', 'code' => '10740479002L'],\n ['modelo' => '479', 'color' => '002', 'talla' => 'M', 'code' => '10740479002M'],\n ['modelo' => '479', 'color' => '002', 'talla' => 'S', 'code' => '10740479002S'],\n ['modelo' => '479', 'color' => '002', 'talla' => 'XL', 'code' => '10740479002XL'],\n ['modelo' => '479', 'color' => '009', 'talla' => 'L', 'code' => '10740479009L'],\n ['modelo' => '479', 'color' => '009', 'talla' => 'M', 'code' => '10740479009M'],\n ['modelo' => '479', 'color' => '009', 'talla' => 'S', 'code' => '10740479009S'],\n ['modelo' => '479', 'color' => '009', 'talla' => 'XL', 'code' => '10740479009XL'],\n ['modelo' => '479', 'color' => '015', 'talla' => 'L', 'code' => '10740479015L'],\n ['modelo' => '479', 'color' => '015', 'talla' => 'M', 'code' => '10740479015M'],\n ['modelo' => '479', 'color' => '015', 'talla' => 'S', 'code' => '10740479015S'],\n ['modelo' => '479', 'color' => '015', 'talla' => 'XL', 'code' => '10740479015XL'],\n ['modelo' => '479', 'color' => '245', 'talla' => 'L', 'code' => '10740479245L'],\n ['modelo' => '479', 'color' => '245', 'talla' => 'M', 'code' => '10740479245M'],\n ['modelo' => '479', 'color' => '245', 'talla' => 'S', 'code' => '10740479245S'],\n ['modelo' => '479', 'color' => '245', 'talla' => 'XL', 'code' => '10740479245XL'],\n ['modelo' => '479', 'color' => '248', 'talla' => 'L', 'code' => '10740479248L'],\n ['modelo' => '479', 'color' => '248', 'talla' => 'M', 'code' => '10740479248M'],\n ['modelo' => '479', 'color' => '248', 'talla' => 'S', 'code' => '10740479248S'],\n ['modelo' => '479', 'color' => '248', 'talla' => 'XL', 'code' => '10740479248XL'],\n ['modelo' => '243', 'color' => '001', 'talla' => 'L', 'code' => '10244243001L'],\n ['modelo' => '243', 'color' => '001', 'talla' => 'M', 'code' => '10244243001M'],\n ['modelo' => '243', 'color' => '001', 'talla' => 'S', 'code' => '10244243001S'],\n ['modelo' => '243', 'color' => '002', 'talla' => 'L', 'code' => '10244243002L'],\n ['modelo' => '243', 'color' => '002', 'talla' => 'M', 'code' => '10244243002M'],\n ['modelo' => '243', 'color' => '002', 'talla' => 'S', 'code' => '10244243002S'],\n ['modelo' => '243', 'color' => '015', 'talla' => 'L', 'code' => '10244243015L'],\n ['modelo' => '243', 'color' => '015', 'talla' => 'M', 'code' => '10244243015M'],\n ['modelo' => '243', 'color' => '015', 'talla' => 'S', 'code' => '10244243015S'],\n ['modelo' => '243', 'color' => '222', 'talla' => 'L', 'code' => '10244243222L'],\n ['modelo' => '243', 'color' => '222', 'talla' => 'M', 'code' => '10244243222M'],\n ['modelo' => '243', 'color' => '222', 'talla' => 'S', 'code' => '10244243222S'],\n ['modelo' => '243', 'color' => '245', 'talla' => 'L', 'code' => '10244243245L'],\n ['modelo' => '243', 'color' => '245', 'talla' => 'M', 'code' => '10244243245M'],\n ['modelo' => '243', 'color' => '245', 'talla' => 'S', 'code' => '10244243245S'],\n ['modelo' => '243', 'color' => '248', 'talla' => 'L', 'code' => '10244243248L'],\n ['modelo' => '243', 'color' => '248', 'talla' => 'M', 'code' => '10244243248M'],\n ['modelo' => '243', 'color' => '248', 'talla' => 'S', 'code' => '10244243248S'],\n ['modelo' => '449', 'color' => '001', 'talla' => '10', 'code' => '1077244900110'],\n ['modelo' => '449', 'color' => '001', 'talla' => '12', 'code' => '1077244900112'],\n ['modelo' => '449', 'color' => '001', 'talla' => '14', 'code' => '1077244900114'],\n ['modelo' => '449', 'color' => '001', 'talla' => '16', 'code' => '1077244900116'],\n ['modelo' => '449', 'color' => '027', 'talla' => '10', 'code' => '1077244902710'],\n ['modelo' => '449', 'color' => '027', 'talla' => '12', 'code' => '1077244902712'],\n ['modelo' => '449', 'color' => '027', 'talla' => '14', 'code' => '1077244902714'],\n ['modelo' => '449', 'color' => '027', 'talla' => '16', 'code' => '1077244902716'],\n ['modelo' => '449', 'color' => '190', 'talla' => '10', 'code' => '1077244919010'],\n ['modelo' => '449', 'color' => '190', 'talla' => '12', 'code' => '1077244919012'],\n ['modelo' => '449', 'color' => '190', 'talla' => '14', 'code' => '1077244919014'],\n ['modelo' => '449', 'color' => '190', 'talla' => '16', 'code' => '1077244919016'],\n ['modelo' => '449', 'color' => '245', 'talla' => '10', 'code' => '1077244924510'],\n ['modelo' => '449', 'color' => '245', 'talla' => '12', 'code' => '1077244924512'],\n ['modelo' => '449', 'color' => '245', 'talla' => '14', 'code' => '1077244924514'],\n ['modelo' => '449', 'color' => '245', 'talla' => '16', 'code' => '1077244924516'],\n ['modelo' => '457', 'color' => '001', 'talla' => '12', 'code' => '1077245700112'],\n ['modelo' => '457', 'color' => '001', 'talla' => '14', 'code' => '1077245700114'],\n ['modelo' => '457', 'color' => '001', 'talla' => '16', 'code' => '1077245700116'],\n ['modelo' => '457', 'color' => '010', 'talla' => '12', 'code' => '1077245701012'],\n ['modelo' => '457', 'color' => '010', 'talla' => '14', 'code' => '1077245701014'],\n ['modelo' => '457', 'color' => '010', 'talla' => '16', 'code' => '1077245701016'],\n ['modelo' => '457', 'color' => '027', 'talla' => '10', 'code' => '1077245702710'],\n ['modelo' => '457', 'color' => '027', 'talla' => '12', 'code' => '1077245702712'],\n ['modelo' => '457', 'color' => '027', 'talla' => '14', 'code' => '1077245702714'],\n ['modelo' => '457', 'color' => '027', 'talla' => '16', 'code' => '1077245702716'],\n ['modelo' => '457', 'color' => '190', 'talla' => '10', 'code' => '1077245719010'],\n ['modelo' => '457', 'color' => '190', 'talla' => '12', 'code' => '1077245719012'],\n ['modelo' => '457', 'color' => '190', 'talla' => '14', 'code' => '1077245719014'],\n ['modelo' => '457', 'color' => '190', 'talla' => '16', 'code' => '1077245719016'],\n ['modelo' => '457', 'color' => '245', 'talla' => '10', 'code' => '1077245724510'],\n ['modelo' => '457', 'color' => '245', 'talla' => '12', 'code' => '1077245724512'],\n ['modelo' => '457', 'color' => '245', 'talla' => '14', 'code' => '1077245724514'],\n ['modelo' => '457', 'color' => '245', 'talla' => '16', 'code' => '1077245724516'],\n ['modelo' => '457', 'color' => '323', 'talla' => '12', 'code' => '1077245732312'],\n ['modelo' => '457', 'color' => '323', 'talla' => '14', 'code' => '1077245732314'],\n ['modelo' => '457', 'color' => '323', 'talla' => '16', 'code' => '1077245732316'],\n ['modelo' => '457', 'color' => '345', 'talla' => '12', 'code' => '1077245734512'],\n ['modelo' => '457', 'color' => '345', 'talla' => '14', 'code' => '1077245734514'],\n ['modelo' => '457', 'color' => '345', 'talla' => '16', 'code' => '1077245734516'],\n ['modelo' => '457', 'color' => '346', 'talla' => '12', 'code' => '1077245734612'],\n ['modelo' => '457', 'color' => '346', 'talla' => '14', 'code' => '1077245734614'],\n ['modelo' => '457', 'color' => '346', 'talla' => '16', 'code' => '1077245734616'],\n ['modelo' => '165', 'color' => '001', 'talla' => '28', 'code' => '1084316500128'],\n ['modelo' => '165', 'color' => '001', 'talla' => '30', 'code' => '1084316500130'],\n ['modelo' => '165', 'color' => '001', 'talla' => '32', 'code' => '1084316500132'],\n ['modelo' => '165', 'color' => '001', 'talla' => '34', 'code' => '1084316500134'],\n ['modelo' => '165', 'color' => '001', 'talla' => '36', 'code' => '1084316500136'],\n ['modelo' => '165', 'color' => '002', 'talla' => '28', 'code' => '1084316500228'],\n ['modelo' => '165', 'color' => '002', 'talla' => '30', 'code' => '1084316500230'],\n ['modelo' => '165', 'color' => '002', 'talla' => '32', 'code' => '1084316500232'],\n ['modelo' => '165', 'color' => '002', 'talla' => '34', 'code' => '1084316500234'],\n ['modelo' => '165', 'color' => '002', 'talla' => '36', 'code' => '1084316500236'],\n ['modelo' => '165', 'color' => '023', 'talla' => '28', 'code' => '1084316502328'],\n ['modelo' => '165', 'color' => '023', 'talla' => '30', 'code' => '1084316502330'],\n ['modelo' => '165', 'color' => '023', 'talla' => '32', 'code' => '1084316502332'],\n ['modelo' => '165', 'color' => '023', 'talla' => '34', 'code' => '1084316502334'],\n ['modelo' => '165', 'color' => '023', 'talla' => '36', 'code' => '1084316502336'],\n ['modelo' => '165', 'color' => '063', 'talla' => '28', 'code' => '1084316506328'],\n ['modelo' => '165', 'color' => '063', 'talla' => '30', 'code' => '1084316506330'],\n ['modelo' => '165', 'color' => '063', 'talla' => '32', 'code' => '1084316506332'],\n ['modelo' => '165', 'color' => '063', 'talla' => '34', 'code' => '1084316506334'],\n ['modelo' => '165', 'color' => '063', 'talla' => '36', 'code' => '1084316506336'],\n ['modelo' => '165', 'color' => '065', 'talla' => '28', 'code' => '1084316506528'],\n ['modelo' => '165', 'color' => '065', 'talla' => '30', 'code' => '1084316506530'],\n ['modelo' => '165', 'color' => '065', 'talla' => '32', 'code' => '1084316506532'],\n ['modelo' => '165', 'color' => '065', 'talla' => '34', 'code' => '1084316506534'],\n ['modelo' => '165', 'color' => '065', 'talla' => '36', 'code' => '1084316506536'],\n ['modelo' => '166', 'color' => '001', 'talla' => '28', 'code' => '1084416600128'],\n ['modelo' => '166', 'color' => '001', 'talla' => '30', 'code' => '1084416600130'],\n ['modelo' => '166', 'color' => '001', 'talla' => '32', 'code' => '1084416600132'],\n ['modelo' => '166', 'color' => '001', 'talla' => '34', 'code' => '1084416600134'],\n ['modelo' => '166', 'color' => '001', 'talla' => '36', 'code' => '1084416600136'],\n ['modelo' => '166', 'color' => '006', 'talla' => '28', 'code' => '1084416600628'],\n ['modelo' => '166', 'color' => '006', 'talla' => '30', 'code' => '1084416600630'],\n ['modelo' => '166', 'color' => '006', 'talla' => '32', 'code' => '1084416600632'],\n ['modelo' => '166', 'color' => '006', 'talla' => '34', 'code' => '1084416600634'],\n ['modelo' => '166', 'color' => '006', 'talla' => '36', 'code' => '1084416600636'],\n ['modelo' => '166', 'color' => '023', 'talla' => '28', 'code' => '1084416602328'],\n ['modelo' => '166', 'color' => '023', 'talla' => '30', 'code' => '1084416602330'],\n ['modelo' => '166', 'color' => '023', 'talla' => '32', 'code' => '1084416602332'],\n ['modelo' => '166', 'color' => '023', 'talla' => '34', 'code' => '1084416602334'],\n ['modelo' => '166', 'color' => '023', 'talla' => '36', 'code' => '1084416602336'],\n ['modelo' => '166', 'color' => '063', 'talla' => '28', 'code' => '1084416606328'],\n ['modelo' => '166', 'color' => '063', 'talla' => '30', 'code' => '1084416606330'],\n ['modelo' => '166', 'color' => '063', 'talla' => '32', 'code' => '1084416606332'],\n ['modelo' => '166', 'color' => '063', 'talla' => '34', 'code' => '1084416606334'],\n ['modelo' => '166', 'color' => '063', 'talla' => '36', 'code' => '1084416606336'],\n ['modelo' => '166', 'color' => '065', 'talla' => '28', 'code' => '1084416606528'],\n ['modelo' => '166', 'color' => '065', 'talla' => '30', 'code' => '1084416606530'],\n ['modelo' => '166', 'color' => '065', 'talla' => '32', 'code' => '1084416606532'],\n ['modelo' => '166', 'color' => '065', 'talla' => '34', 'code' => '1084416606534'],\n ['modelo' => '166', 'color' => '065', 'talla' => '36', 'code' => '1084416606536'],\n ['modelo' => '189', 'color' => '001', 'talla' => '28', 'code' => '1094318900128'],\n ['modelo' => '189', 'color' => '001', 'talla' => '30', 'code' => '1094318900130'],\n ['modelo' => '189', 'color' => '001', 'talla' => '32', 'code' => '1094318900132'],\n ['modelo' => '189', 'color' => '001', 'talla' => '34', 'code' => '1094318900134'],\n ['modelo' => '189', 'color' => '001', 'talla' => '36', 'code' => '1094318900136'],\n ['modelo' => '189', 'color' => '002', 'talla' => '30', 'code' => '1094318900230'],\n ['modelo' => '189', 'color' => '002', 'talla' => '32', 'code' => '1094318900232'],\n ['modelo' => '189', 'color' => '002', 'talla' => '34', 'code' => '1094318900234'],\n ['modelo' => '189', 'color' => '002', 'talla' => '36', 'code' => '1094318900236'],\n ['modelo' => '189', 'color' => '030', 'talla' => '28', 'code' => '1094318903028'],\n ['modelo' => '189', 'color' => '030', 'talla' => '30', 'code' => '1094318903030'],\n ['modelo' => '189', 'color' => '030', 'talla' => '32', 'code' => '1094318903032'],\n ['modelo' => '189', 'color' => '030', 'talla' => '34', 'code' => '1094318903034'],\n ['modelo' => '189', 'color' => '030', 'talla' => '36', 'code' => '1094318903036'],\n ['modelo' => '189', 'color' => '050', 'talla' => '28', 'code' => '1094318905028'],\n ['modelo' => '189', 'color' => '050', 'talla' => '30', 'code' => '1094318905030'],\n ['modelo' => '189', 'color' => '050', 'talla' => '32', 'code' => '1094318905032'],\n ['modelo' => '189', 'color' => '050', 'talla' => '34', 'code' => '1094318905034'],\n ['modelo' => '189', 'color' => '050', 'talla' => '36', 'code' => '1094318905036'],\n ['modelo' => '189', 'color' => '074', 'talla' => '28', 'code' => '1094318907428'],\n ['modelo' => '189', 'color' => '074', 'talla' => '30', 'code' => '1094318907430'],\n ['modelo' => '189', 'color' => '074', 'talla' => '32', 'code' => '1094318907432'],\n ['modelo' => '189', 'color' => '074', 'talla' => '34', 'code' => '1094318907434'],\n ['modelo' => '189', 'color' => '074', 'talla' => '36', 'code' => '1094318907436'],\n ['modelo' => '156', 'color' => '001', 'talla' => 'L', 'code' => '10740156001L'],\n ['modelo' => '156', 'color' => '001', 'talla' => 'M', 'code' => '10740156001M'],\n ['modelo' => '156', 'color' => '001', 'talla' => 'XL', 'code' => '10740156001XL'],\n ['modelo' => '156', 'color' => '002', 'talla' => 'L', 'code' => '10740156002L'],\n ['modelo' => '156', 'color' => '002', 'talla' => 'M', 'code' => '10740156002M'],\n ['modelo' => '156', 'color' => '002', 'talla' => 'XL', 'code' => '10740156002XL'],\n ['modelo' => '156', 'color' => '009', 'talla' => 'L', 'code' => '10740156009L'],\n ['modelo' => '156', 'color' => '009', 'talla' => 'M', 'code' => '10740156009M'],\n ['modelo' => '156', 'color' => '009', 'talla' => 'XL', 'code' => '10740156009XL'],\n ['modelo' => '156', 'color' => '054', 'talla' => 'L', 'code' => '10740156054L'],\n ['modelo' => '156', 'color' => '054', 'talla' => 'M', 'code' => '10740156054M'],\n ['modelo' => '156', 'color' => '054', 'talla' => 'XL', 'code' => '10740156054XL'],\n ['modelo' => '156', 'color' => '064', 'talla' => 'L', 'code' => '10740156064L'],\n ['modelo' => '156', 'color' => '064', 'talla' => 'M', 'code' => '10740156064M'],\n ['modelo' => '156', 'color' => '064', 'talla' => 'XL', 'code' => '10740156064XL'],\n ['modelo' => '156', 'color' => '065', 'talla' => 'L', 'code' => '10740156065L'],\n ['modelo' => '156', 'color' => '065', 'talla' => 'M', 'code' => '10740156065M'],\n ['modelo' => '156', 'color' => '065', 'talla' => 'XL', 'code' => '10740156065XL'],\n ['modelo' => '156', 'color' => '103', 'talla' => 'L', 'code' => '10740156103L'],\n ['modelo' => '156', 'color' => '103', 'talla' => 'M', 'code' => '10740156103M'],\n ['modelo' => '156', 'color' => '103', 'talla' => 'XL', 'code' => '10740156103XL'],\n ['modelo' => '156', 'color' => '248', 'talla' => 'L', 'code' => '10740156248L'],\n ['modelo' => '156', 'color' => '248', 'talla' => 'M', 'code' => '10740156248M'],\n ['modelo' => '156', 'color' => '248', 'talla' => 'XL', 'code' => '10740156248XL'],\n ['modelo' => '463', 'color' => '001', 'talla' => '30', 'code' => '1084346300130'],\n ['modelo' => '463', 'color' => '001', 'talla' => '32', 'code' => '1084346300132'],\n ['modelo' => '463', 'color' => '001', 'talla' => '34', 'code' => '1084346300134'],\n ['modelo' => '463', 'color' => '001', 'talla' => '36', 'code' => '1084346300136'],\n ['modelo' => '463', 'color' => '006', 'talla' => '30', 'code' => '1084346300630'],\n ['modelo' => '463', 'color' => '006', 'talla' => '32', 'code' => '1084346300632'],\n ['modelo' => '463', 'color' => '006', 'talla' => '34', 'code' => '1084346300634'],\n ['modelo' => '463', 'color' => '006', 'talla' => '36', 'code' => '1084346300636'],\n ['modelo' => '463', 'color' => '027', 'talla' => '30', 'code' => '1084346302730'],\n ['modelo' => '463', 'color' => '027', 'talla' => '32', 'code' => '1084346302732'],\n ['modelo' => '463', 'color' => '027', 'talla' => '34', 'code' => '1084346302734'],\n ['modelo' => '463', 'color' => '027', 'talla' => '36', 'code' => '1084346302736'],\n ['modelo' => '463', 'color' => '190', 'talla' => '30', 'code' => '1084346319030'],\n ['modelo' => '463', 'color' => '190', 'talla' => '32', 'code' => '1084346319032'],\n ['modelo' => '463', 'color' => '190', 'talla' => '34', 'code' => '1084346319034'],\n ['modelo' => '463', 'color' => '190', 'talla' => '36', 'code' => '1084346319036'],\n ['modelo' => '463', 'color' => '248', 'talla' => '30', 'code' => '1084346324830'],\n ['modelo' => '463', 'color' => '248', 'talla' => '32', 'code' => '1084346324832'],\n ['modelo' => '463', 'color' => '248', 'talla' => '34', 'code' => '1084346324834'],\n ['modelo' => '463', 'color' => '248', 'talla' => '36', 'code' => '1084346324836'],\n ['modelo' => '468', 'color' => '001', 'talla' => '30', 'code' => '1084346800130'],\n ['modelo' => '468', 'color' => '001', 'talla' => '32', 'code' => '1084346800132'],\n ['modelo' => '468', 'color' => '001', 'talla' => '34', 'code' => '1084346800134'],\n ['modelo' => '468', 'color' => '001', 'talla' => '36', 'code' => '1084346800136'],\n ['modelo' => '468', 'color' => '002', 'talla' => '30', 'code' => '1084346800230'],\n ['modelo' => '468', 'color' => '002', 'talla' => '32', 'code' => '1084346800232'],\n ['modelo' => '468', 'color' => '002', 'talla' => '34', 'code' => '1084346800234'],\n ['modelo' => '468', 'color' => '002', 'talla' => '36', 'code' => '1084346800236'],\n ['modelo' => '468', 'color' => '190', 'talla' => '30', 'code' => '1084346819030'],\n ['modelo' => '468', 'color' => '190', 'talla' => '32', 'code' => '1084346819032'],\n ['modelo' => '468', 'color' => '190', 'talla' => '34', 'code' => '1084346819034'],\n ['modelo' => '468', 'color' => '190', 'talla' => '36', 'code' => '1084346819036'],\n ['modelo' => '468', 'color' => '248', 'talla' => '30', 'code' => '1084346824830'],\n ['modelo' => '468', 'color' => '248', 'talla' => '32', 'code' => '1084346824832'],\n ['modelo' => '468', 'color' => '248', 'talla' => '34', 'code' => '1084346824834'],\n ['modelo' => '468', 'color' => '248', 'talla' => '36', 'code' => '1084346824836'],\n ['modelo' => '468', 'color' => '335', 'talla' => '30', 'code' => '1084346833530'],\n ['modelo' => '468', 'color' => '335', 'talla' => '32', 'code' => '1084346833532'],\n ['modelo' => '468', 'color' => '335', 'talla' => '34', 'code' => '1084346833534'],\n ['modelo' => '468', 'color' => '335', 'talla' => '36', 'code' => '1084346833536'],\n ['modelo' => '172', 'color' => '001', 'talla' => 'L', 'code' => '10740172001L'],\n ['modelo' => '172', 'color' => '001', 'talla' => 'M', 'code' => '10740172001M'],\n ['modelo' => '172', 'color' => '001', 'talla' => 'XL', 'code' => '10740172001XL'],\n ['modelo' => '172', 'color' => '002', 'talla' => 'L', 'code' => '10740172002L'],\n ['modelo' => '172', 'color' => '002', 'talla' => 'M', 'code' => '10740172002M'],\n ['modelo' => '172', 'color' => '002', 'talla' => 'XL', 'code' => '10740172002XL'],\n ['modelo' => '172', 'color' => '009', 'talla' => 'L', 'code' => '10740172009L'],\n ['modelo' => '172', 'color' => '009', 'talla' => 'M', 'code' => '10740172009M'],\n ['modelo' => '172', 'color' => '009', 'talla' => 'XL', 'code' => '10740172009XL'],\n ['modelo' => '172', 'color' => '064', 'talla' => 'L', 'code' => '10740172064L'],\n ['modelo' => '172', 'color' => '064', 'talla' => 'M', 'code' => '10740172064M'],\n ['modelo' => '172', 'color' => '064', 'talla' => 'XL', 'code' => '10740172064XL'],\n ['modelo' => '172', 'color' => '065', 'talla' => 'L', 'code' => '10740172065L'],\n ['modelo' => '172', 'color' => '065', 'talla' => 'M', 'code' => '10740172065M'],\n ['modelo' => '172', 'color' => '065', 'talla' => 'XL', 'code' => '10740172065XL'],\n ['modelo' => '172', 'color' => '103', 'talla' => 'L', 'code' => '10740172103L'],\n ['modelo' => '172', 'color' => '103', 'talla' => 'M', 'code' => '10740172103M'],\n ['modelo' => '172', 'color' => '103', 'talla' => 'XL', 'code' => '10740172103XL'],\n ['modelo' => '172', 'color' => '222', 'talla' => 'L', 'code' => '10740172222L'],\n ['modelo' => '172', 'color' => '222', 'talla' => 'M', 'code' => '10740172222M'],\n ['modelo' => '172', 'color' => '222', 'talla' => 'XL', 'code' => '10740172222XL'],\n ['modelo' => '172', 'color' => '248', 'talla' => 'L', 'code' => '10740172248L'],\n ['modelo' => '172', 'color' => '248', 'talla' => 'M', 'code' => '10740172248M'],\n ['modelo' => '172', 'color' => '248', 'talla' => 'XL', 'code' => '10740172248XL'],\n ['modelo' => '500', 'color' => '048', 'talla' => '32', 'code' => '1010350004832'],\n ['modelo' => '500', 'color' => '048', 'talla' => '34', 'code' => '1010350004834'],\n ['modelo' => '500', 'color' => '048', 'talla' => '36', 'code' => '1010350004836'],\n ['modelo' => '500', 'color' => '048', 'talla' => '38', 'code' => '1010350004838'],\n ['modelo' => '500', 'color' => '074', 'talla' => '32', 'code' => '1010350007432'],\n ['modelo' => '500', 'color' => '074', 'talla' => '34', 'code' => '1010350007434'],\n ['modelo' => '500', 'color' => '074', 'talla' => '36', 'code' => '1010350007436'],\n ['modelo' => '500', 'color' => '074', 'talla' => '38', 'code' => '1010350007438'],\n ['modelo' => '500', 'color' => '356', 'talla' => '32', 'code' => '1010350035632'],\n ['modelo' => '500', 'color' => '356', 'talla' => '34', 'code' => '1010350035634'],\n ['modelo' => '500', 'color' => '356', 'talla' => '36', 'code' => '1010350035636'],\n ['modelo' => '500', 'color' => '356', 'talla' => '38', 'code' => '1010350035638'],\n ['modelo' => '500', 'color' => '357', 'talla' => '32', 'code' => '1010350035732'],\n ['modelo' => '500', 'color' => '357', 'talla' => '34', 'code' => '1010350035734'],\n ['modelo' => '500', 'color' => '357', 'talla' => '36', 'code' => '1010350035736'],\n ['modelo' => '500', 'color' => '357', 'talla' => '38', 'code' => '1010350035738'],\n ['modelo' => '173', 'color' => '001', 'talla' => 'L', 'code' => '10704173001L'],\n ['modelo' => '173', 'color' => '001', 'talla' => 'M', 'code' => '10704173001M'],\n ['modelo' => '173', 'color' => '001', 'talla' => 'S', 'code' => '10704173001S'],\n ['modelo' => '173', 'color' => '001', 'talla' => 'XL', 'code' => '10704173001XL'],\n ['modelo' => '173', 'color' => '001', 'talla' => 'XXL', 'code' => '10704173001XXL'],\n ['modelo' => '173', 'color' => '002', 'talla' => 'L', 'code' => '10704173002L'],\n ['modelo' => '173', 'color' => '002', 'talla' => 'M', 'code' => '10704173002M'],\n ['modelo' => '173', 'color' => '002', 'talla' => 'S', 'code' => '10704173002S'],\n ['modelo' => '173', 'color' => '002', 'talla' => 'XL', 'code' => '10704173002XL'],\n ['modelo' => '173', 'color' => '002', 'talla' => 'XXL', 'code' => '10704173002XXL'],\n ['modelo' => '173', 'color' => '009', 'talla' => 'L', 'code' => '10704173009L'],\n ['modelo' => '173', 'color' => '009', 'talla' => 'M', 'code' => '10704173009M'],\n ['modelo' => '173', 'color' => '009', 'talla' => 'S', 'code' => '10704173009S'],\n ['modelo' => '173', 'color' => '009', 'talla' => 'XL', 'code' => '10704173009XL'],\n ['modelo' => '173', 'color' => '009', 'talla' => 'XXL', 'code' => '10704173009XXL'],\n ['modelo' => '173', 'color' => '248', 'talla' => 'L', 'code' => '10704173248L'],\n ['modelo' => '173', 'color' => '248', 'talla' => 'M', 'code' => '10704173248M'],\n ['modelo' => '173', 'color' => '248', 'talla' => 'S', 'code' => '10704173248S'],\n ['modelo' => '173', 'color' => '248', 'talla' => 'XL', 'code' => '10704173248XL'],\n ['modelo' => '173', 'color' => '248', 'talla' => 'XXL', 'code' => '10704173248XXL'],\n ['modelo' => '568', 'color' => '001', 'talla' => '32', 'code' => '1019156800132'],\n ['modelo' => '568', 'color' => '001', 'talla' => '34', 'code' => '1019156800134'],\n ['modelo' => '568', 'color' => '001', 'talla' => '36', 'code' => '1019156800136'],\n ['modelo' => '568', 'color' => '002', 'talla' => '32', 'code' => '1019156800232'],\n ['modelo' => '568', 'color' => '002', 'talla' => '34', 'code' => '1019156800234'],\n ['modelo' => '568', 'color' => '002', 'talla' => '36', 'code' => '1019156800236'],\n ['modelo' => '568', 'color' => '343', 'talla' => '32', 'code' => '1019156834332'],\n ['modelo' => '568', 'color' => '343', 'talla' => '34', 'code' => '1019156834334'],\n ['modelo' => '568', 'color' => '343', 'talla' => '36', 'code' => '1019156834336'],\n ['modelo' => '568', 'color' => '371', 'talla' => '32', 'code' => '1019156837132'],\n ['modelo' => '568', 'color' => '371', 'talla' => '34', 'code' => '1019156837134'],\n ['modelo' => '568', 'color' => '371', 'talla' => '36', 'code' => '1019156837136'],\n ['modelo' => '568', 'color' => '374', 'talla' => '32', 'code' => '1019156837432'],\n ['modelo' => '568', 'color' => '374', 'talla' => '34', 'code' => '1019156837434'],\n ['modelo' => '568', 'color' => '374', 'talla' => '36', 'code' => '1019156837436'],\n ['modelo' => '327', 'color' => '001', 'talla' => '32', 'code' => '1019632700132'],\n ['modelo' => '327', 'color' => '001', 'talla' => '34', 'code' => '1019632700134'],\n ['modelo' => '327', 'color' => '001', 'talla' => '36', 'code' => '1019632700136'],\n ['modelo' => '327', 'color' => '001', 'talla' => '38', 'code' => '1019632700138'],\n ['modelo' => '327', 'color' => '001', 'talla' => '40', 'code' => '1019632700140'],\n ['modelo' => '327', 'color' => '002', 'talla' => '32', 'code' => '1019632700232'],\n ['modelo' => '327', 'color' => '002', 'talla' => '34', 'code' => '1019632700234'],\n ['modelo' => '327', 'color' => '002', 'talla' => '36', 'code' => '1019632700236'],\n ['modelo' => '327', 'color' => '002', 'talla' => '38', 'code' => '1019632700238'],\n ['modelo' => '327', 'color' => '002', 'talla' => '40', 'code' => '1019632700240'],\n ['modelo' => '327', 'color' => '015', 'talla' => '32', 'code' => '1019632701532'],\n ['modelo' => '327', 'color' => '015', 'talla' => '34', 'code' => '1019632701534'],\n ['modelo' => '327', 'color' => '015', 'talla' => '36', 'code' => '1019632701536'],\n ['modelo' => '327', 'color' => '015', 'talla' => '38', 'code' => '1019632701538'],\n ['modelo' => '327', 'color' => '015', 'talla' => '40', 'code' => '1019632701540'],\n ['modelo' => '327', 'color' => '222', 'talla' => '32', 'code' => '1019632722232'],\n ['modelo' => '327', 'color' => '222', 'talla' => '34', 'code' => '1019632722234'],\n ['modelo' => '327', 'color' => '222', 'talla' => '36', 'code' => '1019632722236'],\n ['modelo' => '327', 'color' => '222', 'talla' => '38', 'code' => '1019632722238'],\n ['modelo' => '327', 'color' => '222', 'talla' => '40', 'code' => '1019632722240'],\n ['modelo' => '327', 'color' => '248', 'talla' => '32', 'code' => '1019632724832'],\n ['modelo' => '327', 'color' => '248', 'talla' => '34', 'code' => '1019632724834'],\n ['modelo' => '327', 'color' => '248', 'talla' => '36', 'code' => '1019632724836'],\n ['modelo' => '327', 'color' => '248', 'talla' => '38', 'code' => '1019632724838'],\n ['modelo' => '327', 'color' => '248', 'talla' => '40', 'code' => '1019632724840'],\n ['modelo' => '266', 'color' => '001', 'talla' => '32', 'code' => '1019626600132'],\n ['modelo' => '266', 'color' => '001', 'talla' => '34', 'code' => '1019626600134'],\n ['modelo' => '266', 'color' => '001', 'talla' => '36', 'code' => '1019626600136'],\n ['modelo' => '266', 'color' => '001', 'talla' => '38', 'code' => '1019626600138'],\n ['modelo' => '266', 'color' => '001', 'talla' => '40', 'code' => '1019626600140'],\n ['modelo' => '266', 'color' => '002', 'talla' => '32', 'code' => '1019626600232'],\n ['modelo' => '266', 'color' => '002', 'talla' => '34', 'code' => '1019626600234'],\n ['modelo' => '266', 'color' => '002', 'talla' => '36', 'code' => '1019626600236'],\n ['modelo' => '266', 'color' => '002', 'talla' => '38', 'code' => '1019626600238'],\n ['modelo' => '266', 'color' => '002', 'talla' => '40', 'code' => '1019626600240'],\n ['modelo' => '266', 'color' => '015', 'talla' => '32', 'code' => '1019626601532'],\n ['modelo' => '266', 'color' => '015', 'talla' => '34', 'code' => '1019626601534'],\n ['modelo' => '266', 'color' => '015', 'talla' => '36', 'code' => '1019626601536'],\n ['modelo' => '266', 'color' => '015', 'talla' => '38', 'code' => '1019626601538'],\n ['modelo' => '266', 'color' => '015', 'talla' => '40', 'code' => '1019626601540'],\n ['modelo' => '266', 'color' => '018', 'talla' => '32', 'code' => '1019626601832'],\n ['modelo' => '266', 'color' => '018', 'talla' => '34', 'code' => '1019626601834'],\n ['modelo' => '266', 'color' => '018', 'talla' => '36', 'code' => '1019626601836'],\n ['modelo' => '266', 'color' => '018', 'talla' => '38', 'code' => '1019626601838'],\n ['modelo' => '266', 'color' => '018', 'talla' => '40', 'code' => '1019626601840'],\n ['modelo' => '266', 'color' => '244', 'talla' => '32', 'code' => '1019626624432'],\n ['modelo' => '266', 'color' => '244', 'talla' => '34', 'code' => '1019626624434'],\n ['modelo' => '266', 'color' => '244', 'talla' => '36', 'code' => '1019626624436'],\n ['modelo' => '266', 'color' => '244', 'talla' => '38', 'code' => '1019626624438'],\n ['modelo' => '266', 'color' => '244', 'talla' => '40', 'code' => '1019626624440'],\n ['modelo' => '266', 'color' => '245', 'talla' => '32', 'code' => '1019626624532'],\n ['modelo' => '266', 'color' => '245', 'talla' => '34', 'code' => '1019626624534'],\n ['modelo' => '266', 'color' => '245', 'talla' => '36', 'code' => '1019626624536'],\n ['modelo' => '266', 'color' => '245', 'talla' => '38', 'code' => '1019626624538'],\n ['modelo' => '266', 'color' => '245', 'talla' => '40', 'code' => '1019626624540'],\n ['modelo' => '266', 'color' => '248', 'talla' => '32', 'code' => '1019626624832'],\n ['modelo' => '266', 'color' => '248', 'talla' => '34', 'code' => '1019626624834'],\n ['modelo' => '266', 'color' => '248', 'talla' => '36', 'code' => '1019626624836'],\n ['modelo' => '266', 'color' => '248', 'talla' => '38', 'code' => '1019626624838'],\n ['modelo' => '266', 'color' => '248', 'talla' => '40', 'code' => '1019626624840'],\n ['modelo' => '084', 'color' => '001', 'talla' => '32', 'code' => '1010308400132'],\n ['modelo' => '084', 'color' => '001', 'talla' => '34', 'code' => '1010308400134'],\n ['modelo' => '084', 'color' => '001', 'talla' => '36', 'code' => '1010308400136'],\n ['modelo' => '084', 'color' => '001', 'talla' => '38', 'code' => '1010308400138'],\n ['modelo' => '084', 'color' => '002', 'talla' => '32', 'code' => '1010308400232'],\n ['modelo' => '084', 'color' => '002', 'talla' => '34', 'code' => '1010308400234'],\n ['modelo' => '084', 'color' => '002', 'talla' => '36', 'code' => '1010308400236'],\n ['modelo' => '084', 'color' => '002', 'talla' => '38', 'code' => '1010308400238'],\n ['modelo' => '084', 'color' => '015', 'talla' => '32', 'code' => '1010308401532'],\n ['modelo' => '084', 'color' => '015', 'talla' => '34', 'code' => '1010308401534'],\n ['modelo' => '084', 'color' => '015', 'talla' => '36', 'code' => '1010308401536'],\n ['modelo' => '084', 'color' => '015', 'talla' => '38', 'code' => '1010308401538'],\n ['modelo' => '084', 'color' => '034', 'talla' => '32', 'code' => '1010308403432'],\n ['modelo' => '084', 'color' => '034', 'talla' => '34', 'code' => '1010308403434'],\n ['modelo' => '084', 'color' => '034', 'talla' => '36', 'code' => '1010308403436'],\n ['modelo' => '084', 'color' => '034', 'talla' => '38', 'code' => '1010308403438'],\n ['modelo' => '084', 'color' => '054', 'talla' => '32', 'code' => '1010308405432'],\n ['modelo' => '084', 'color' => '054', 'talla' => '34', 'code' => '1010308405434'],\n ['modelo' => '084', 'color' => '054', 'talla' => '36', 'code' => '1010308405436'],\n ['modelo' => '084', 'color' => '054', 'talla' => '38', 'code' => '1010308405438'],\n ['modelo' => '084', 'color' => '064', 'talla' => '32', 'code' => '1010308406432'],\n ['modelo' => '084', 'color' => '064', 'talla' => '34', 'code' => '1010308406434'],\n ['modelo' => '084', 'color' => '064', 'talla' => '36', 'code' => '1010308406436'],\n ['modelo' => '084', 'color' => '064', 'talla' => '38', 'code' => '1010308406438'],\n ['modelo' => '084', 'color' => '065', 'talla' => '32', 'code' => '1010308406532'],\n ['modelo' => '084', 'color' => '065', 'talla' => '34', 'code' => '1010308406534'],\n ['modelo' => '084', 'color' => '065', 'talla' => '36', 'code' => '1010308406536'],\n ['modelo' => '084', 'color' => '065', 'talla' => '38', 'code' => '1010308406538'],\n ['modelo' => '084', 'color' => '067', 'talla' => '32', 'code' => '1010308406732'],\n ['modelo' => '084', 'color' => '067', 'talla' => '34', 'code' => '1010308406734'],\n ['modelo' => '084', 'color' => '067', 'talla' => '36', 'code' => '1010308406736'],\n ['modelo' => '084', 'color' => '067', 'talla' => '38', 'code' => '1010308406738'],\n ['modelo' => '084', 'color' => '103', 'talla' => '32', 'code' => '1010308410332'],\n ['modelo' => '084', 'color' => '103', 'talla' => '34', 'code' => '1010308410334'],\n ['modelo' => '084', 'color' => '103', 'talla' => '36', 'code' => '1010308410336'],\n ['modelo' => '084', 'color' => '103', 'talla' => '38', 'code' => '1010308410338'],\n ['modelo' => '084', 'color' => '222', 'talla' => '32', 'code' => '1010308422232'],\n ['modelo' => '084', 'color' => '222', 'talla' => '34', 'code' => '1010308422234'],\n ['modelo' => '084', 'color' => '222', 'talla' => '36', 'code' => '1010308422236'],\n ['modelo' => '084', 'color' => '222', 'talla' => '38', 'code' => '1010308422238'],\n ['modelo' => '084', 'color' => '248', 'talla' => '32', 'code' => '1010308424832'],\n ['modelo' => '084', 'color' => '248', 'talla' => '34', 'code' => '1010308424834'],\n ['modelo' => '084', 'color' => '248', 'talla' => '36', 'code' => '1010308424836'],\n ['modelo' => '084', 'color' => '248', 'talla' => '38', 'code' => '1010308424838'],\n ['modelo' => '188', 'color' => '001', 'talla' => '32', 'code' => '1010318800132'],\n ['modelo' => '188', 'color' => '001', 'talla' => '34', 'code' => '1010318800134'],\n ['modelo' => '188', 'color' => '001', 'talla' => '36', 'code' => '1010318800136'],\n ['modelo' => '188', 'color' => '001', 'talla' => '38', 'code' => '1010318800138'],\n ['modelo' => '188', 'color' => '002', 'talla' => '32', 'code' => '1010318800232'],\n ['modelo' => '188', 'color' => '002', 'talla' => '34', 'code' => '1010318800234'],\n ['modelo' => '188', 'color' => '002', 'talla' => '36', 'code' => '1010318800236'],\n ['modelo' => '188', 'color' => '002', 'talla' => '38', 'code' => '1010318800238'],\n ['modelo' => '188', 'color' => '009', 'talla' => '32', 'code' => '1010318800932'],\n ['modelo' => '188', 'color' => '009', 'talla' => '34', 'code' => '1010318800934'],\n ['modelo' => '188', 'color' => '009', 'talla' => '36', 'code' => '1010318800936'],\n ['modelo' => '188', 'color' => '009', 'talla' => '38', 'code' => '1010318800938'],\n ['modelo' => '188', 'color' => '015', 'talla' => '32', 'code' => '1010318801532'],\n ['modelo' => '188', 'color' => '015', 'talla' => '34', 'code' => '1010318801534'],\n ['modelo' => '188', 'color' => '015', 'talla' => '36', 'code' => '1010318801536'],\n ['modelo' => '188', 'color' => '015', 'talla' => '38', 'code' => '1010318801538'],\n ['modelo' => '188', 'color' => '064', 'talla' => '32', 'code' => '1010318806432'],\n ['modelo' => '188', 'color' => '064', 'talla' => '34', 'code' => '1010318806434'],\n ['modelo' => '188', 'color' => '064', 'talla' => '36', 'code' => '1010318806436'],\n ['modelo' => '188', 'color' => '064', 'talla' => '38', 'code' => '1010318806438'],\n ['modelo' => '188', 'color' => '065', 'talla' => '32', 'code' => '1010318806532'],\n ['modelo' => '188', 'color' => '065', 'talla' => '34', 'code' => '1010318806534'],\n ['modelo' => '188', 'color' => '065', 'talla' => '36', 'code' => '1010318806536'],\n ['modelo' => '188', 'color' => '065', 'talla' => '38', 'code' => '1010318806538'],\n ['modelo' => '188', 'color' => '103', 'talla' => '32', 'code' => '1010318810332'],\n ['modelo' => '188', 'color' => '103', 'talla' => '34', 'code' => '1010318810334'],\n ['modelo' => '188', 'color' => '103', 'talla' => '36', 'code' => '1010318810336'],\n ['modelo' => '188', 'color' => '103', 'talla' => '38', 'code' => '1010318810338'],\n ['modelo' => '188', 'color' => '222', 'talla' => '32', 'code' => '1010318822232'],\n ['modelo' => '188', 'color' => '222', 'talla' => '34', 'code' => '1010318822234'],\n ['modelo' => '188', 'color' => '222', 'talla' => '36', 'code' => '1010318822236'],\n ['modelo' => '188', 'color' => '222', 'talla' => '38', 'code' => '1010318822238'],\n ['modelo' => '188', 'color' => '245', 'talla' => '32', 'code' => '1010318824532'],\n ['modelo' => '188', 'color' => '245', 'talla' => '34', 'code' => '1010318824534'],\n ['modelo' => '188', 'color' => '245', 'talla' => '36', 'code' => '1010318824536'],\n ['modelo' => '188', 'color' => '245', 'talla' => '38', 'code' => '1010318824538'],\n ['modelo' => '188', 'color' => '248', 'talla' => '32', 'code' => '1010318824832'],\n ['modelo' => '188', 'color' => '248', 'talla' => '34', 'code' => '1010318824834'],\n ['modelo' => '188', 'color' => '248', 'talla' => '36', 'code' => '1010318824836'],\n ['modelo' => '188', 'color' => '248', 'talla' => '38', 'code' => '1010318824838'],\n ['modelo' => '030', 'color' => '001', 'talla' => '28', 'code' => '1080503000128'],\n ['modelo' => '030', 'color' => '001', 'talla' => '30', 'code' => '1080503000130'],\n ['modelo' => '030', 'color' => '001', 'talla' => '32', 'code' => '1080503000132'],\n ['modelo' => '030', 'color' => '001', 'talla' => '34', 'code' => '1080503000134'],\n ['modelo' => '030', 'color' => '001', 'talla' => '36', 'code' => '1080503000136'],\n ['modelo' => '030', 'color' => '002', 'talla' => '28', 'code' => '1080503000228'],\n ['modelo' => '030', 'color' => '002', 'talla' => '30', 'code' => '1080503000230'],\n ['modelo' => '030', 'color' => '002', 'talla' => '32', 'code' => '1080503000232'],\n ['modelo' => '030', 'color' => '002', 'talla' => '34', 'code' => '1080503000234'],\n ['modelo' => '030', 'color' => '002', 'talla' => '36', 'code' => '1080503000236'],\n ['modelo' => '030', 'color' => '022', 'talla' => '28', 'code' => '1080503002228'],\n ['modelo' => '030', 'color' => '022', 'talla' => '30', 'code' => '1080503002230'],\n ['modelo' => '030', 'color' => '022', 'talla' => '32', 'code' => '1080503002232'],\n ['modelo' => '030', 'color' => '022', 'talla' => '34', 'code' => '1080503002234'],\n ['modelo' => '030', 'color' => '022', 'talla' => '36', 'code' => '1080503002236'],\n ['modelo' => '030', 'color' => '023', 'talla' => '28', 'code' => '1080503002328'],\n ['modelo' => '030', 'color' => '023', 'talla' => '30', 'code' => '1080503002330'],\n ['modelo' => '030', 'color' => '023', 'talla' => '32', 'code' => '1080503002332'],\n ['modelo' => '030', 'color' => '023', 'talla' => '34', 'code' => '1080503002334'],\n ['modelo' => '030', 'color' => '023', 'talla' => '36', 'code' => '1080503002336'],\n ['modelo' => '107', 'color' => '001', 'talla' => '28', 'code' => '1080310700128'],\n ['modelo' => '107', 'color' => '001', 'talla' => '30', 'code' => '1080310700130'],\n ['modelo' => '107', 'color' => '001', 'talla' => '32', 'code' => '1080310700132'],\n ['modelo' => '107', 'color' => '001', 'talla' => '34', 'code' => '1080310700134'],\n ['modelo' => '107', 'color' => '001', 'talla' => '36', 'code' => '1080310700136'],\n ['modelo' => '107', 'color' => '023', 'talla' => '28', 'code' => '1080310702328'],\n ['modelo' => '107', 'color' => '023', 'talla' => '30', 'code' => '1080310702330'],\n ['modelo' => '107', 'color' => '023', 'talla' => '32', 'code' => '1080310702332'],\n ['modelo' => '107', 'color' => '023', 'talla' => '34', 'code' => '1080310702334'],\n ['modelo' => '107', 'color' => '023', 'talla' => '36', 'code' => '1080310702336'],\n ['modelo' => '107', 'color' => '030', 'talla' => '28', 'code' => '1080310703028'],\n ['modelo' => '107', 'color' => '030', 'talla' => '30', 'code' => '1080310703030'],\n ['modelo' => '107', 'color' => '030', 'talla' => '32', 'code' => '1080310703032'],\n ['modelo' => '107', 'color' => '030', 'talla' => '34', 'code' => '1080310703034'],\n ['modelo' => '107', 'color' => '030', 'talla' => '36', 'code' => '1080310703036'],\n ['modelo' => '107', 'color' => '032', 'talla' => '28', 'code' => '1080310703228'],\n ['modelo' => '107', 'color' => '032', 'talla' => '30', 'code' => '1080310703230'],\n ['modelo' => '107', 'color' => '032', 'talla' => '32', 'code' => '1080310703232'],\n ['modelo' => '107', 'color' => '032', 'talla' => '34', 'code' => '1080310703234'],\n ['modelo' => '107', 'color' => '032', 'talla' => '36', 'code' => '1080310703236'],\n ['modelo' => '107', 'color' => '033', 'talla' => '28', 'code' => '1080310703328'],\n ['modelo' => '107', 'color' => '033', 'talla' => '30', 'code' => '1080310703330'],\n ['modelo' => '107', 'color' => '033', 'talla' => '32', 'code' => '1080310703332'],\n ['modelo' => '107', 'color' => '033', 'talla' => '34', 'code' => '1080310703334'],\n ['modelo' => '107', 'color' => '033', 'talla' => '36', 'code' => '1080310703336'],\n ['modelo' => '107', 'color' => '050', 'talla' => '28', 'code' => '1080310705028'],\n ['modelo' => '107', 'color' => '050', 'talla' => '30', 'code' => '1080310705030'],\n ['modelo' => '107', 'color' => '050', 'talla' => '32', 'code' => '1080310705032'],\n ['modelo' => '107', 'color' => '050', 'talla' => '34', 'code' => '1080310705034'],\n ['modelo' => '107', 'color' => '050', 'talla' => '36', 'code' => '1080310705036'],\n ['modelo' => '107', 'color' => '063', 'talla' => '28', 'code' => '1080310706328'],\n ['modelo' => '107', 'color' => '063', 'talla' => '30', 'code' => '1080310706330'],\n ['modelo' => '107', 'color' => '063', 'talla' => '32', 'code' => '1080310706332'],\n ['modelo' => '107', 'color' => '063', 'talla' => '34', 'code' => '1080310706334'],\n ['modelo' => '107', 'color' => '063', 'talla' => '36', 'code' => '1080310706336'],\n ['modelo' => '107', 'color' => '064', 'talla' => '28', 'code' => '1080310706428'],\n ['modelo' => '107', 'color' => '064', 'talla' => '30', 'code' => '1080310706430'],\n ['modelo' => '107', 'color' => '064', 'talla' => '32', 'code' => '1080310706432'],\n ['modelo' => '107', 'color' => '064', 'talla' => '34', 'code' => '1080310706434'],\n ['modelo' => '107', 'color' => '064', 'talla' => '36', 'code' => '1080310706436'],\n ['modelo' => '107', 'color' => '065', 'talla' => '28', 'code' => '1080310706528'],\n ['modelo' => '107', 'color' => '065', 'talla' => '30', 'code' => '1080310706530'],\n ['modelo' => '107', 'color' => '065', 'talla' => '32', 'code' => '1080310706532'],\n ['modelo' => '107', 'color' => '065', 'talla' => '34', 'code' => '1080310706534'],\n ['modelo' => '107', 'color' => '065', 'talla' => '36', 'code' => '1080310706536'],\n ['modelo' => '107', 'color' => '074', 'talla' => '28', 'code' => '1080310707428'],\n ['modelo' => '107', 'color' => '074', 'talla' => '30', 'code' => '1080310707430'],\n ['modelo' => '107', 'color' => '074', 'talla' => '32', 'code' => '1080310707432'],\n ['modelo' => '107', 'color' => '074', 'talla' => '34', 'code' => '1080310707434'],\n ['modelo' => '107', 'color' => '074', 'talla' => '36', 'code' => '1080310707436'],\n ['modelo' => '107', 'color' => '075', 'talla' => '28', 'code' => '1080310707528'],\n ['modelo' => '107', 'color' => '075', 'talla' => '30', 'code' => '1080310707530'],\n ['modelo' => '107', 'color' => '075', 'talla' => '32', 'code' => '1080310707532'],\n ['modelo' => '107', 'color' => '075', 'talla' => '34', 'code' => '1080310707534'],\n ['modelo' => '107', 'color' => '075', 'talla' => '36', 'code' => '1080310707536'],\n ['modelo' => '107', 'color' => '076', 'talla' => '28', 'code' => '1080310707628'],\n ['modelo' => '107', 'color' => '076', 'talla' => '30', 'code' => '1080310707630'],\n ['modelo' => '107', 'color' => '076', 'talla' => '32', 'code' => '1080310707632'],\n ['modelo' => '107', 'color' => '076', 'talla' => '34', 'code' => '1080310707634'],\n ['modelo' => '107', 'color' => '076', 'talla' => '36', 'code' => '1080310707636'],\n ['modelo' => '085', 'color' => '001', 'talla' => '28', 'code' => '1080308500128'],\n ['modelo' => '085', 'color' => '001', 'talla' => '30', 'code' => '1080308500130'],\n ['modelo' => '085', 'color' => '001', 'talla' => '32', 'code' => '1080308500132'],\n ['modelo' => '085', 'color' => '001', 'talla' => '34', 'code' => '1080308500134'],\n ['modelo' => '085', 'color' => '001', 'talla' => '36', 'code' => '1080308500136'],\n ['modelo' => '085', 'color' => '022', 'talla' => '28', 'code' => '1080308502228'],\n ['modelo' => '085', 'color' => '022', 'talla' => '30', 'code' => '1080308502230'],\n ['modelo' => '085', 'color' => '022', 'talla' => '32', 'code' => '1080308502232'],\n ['modelo' => '085', 'color' => '022', 'talla' => '34', 'code' => '1080308502234'],\n ['modelo' => '085', 'color' => '022', 'talla' => '36', 'code' => '1080308502236'],\n ['modelo' => '085', 'color' => '023', 'talla' => '28', 'code' => '1080308502328'],\n ['modelo' => '085', 'color' => '023', 'talla' => '30', 'code' => '1080308502330'],\n ['modelo' => '085', 'color' => '023', 'talla' => '32', 'code' => '1080308502332'],\n ['modelo' => '085', 'color' => '023', 'talla' => '34', 'code' => '1080308502334'],\n ['modelo' => '085', 'color' => '023', 'talla' => '36', 'code' => '1080308502336'],\n ['modelo' => '085', 'color' => '063', 'talla' => '28', 'code' => '1080308506328'],\n ['modelo' => '085', 'color' => '063', 'talla' => '30', 'code' => '1080308506330'],\n ['modelo' => '085', 'color' => '063', 'talla' => '32', 'code' => '1080308506332'],\n ['modelo' => '085', 'color' => '063', 'talla' => '34', 'code' => '1080308506334'],\n ['modelo' => '085', 'color' => '063', 'talla' => '36', 'code' => '1080308506336'],\n ['modelo' => '138', 'color' => '001', 'talla' => '30', 'code' => '1084413800130'],\n ['modelo' => '138', 'color' => '001', 'talla' => '32', 'code' => '1084413800132'],\n ['modelo' => '138', 'color' => '001', 'talla' => '34', 'code' => '1084413800134'],\n ['modelo' => '138', 'color' => '001', 'talla' => '36', 'code' => '1084413800136'],\n ['modelo' => '138', 'color' => '002', 'talla' => '30', 'code' => '1084413800230'],\n ['modelo' => '138', 'color' => '002', 'talla' => '32', 'code' => '1084413800232'],\n ['modelo' => '138', 'color' => '002', 'talla' => '34', 'code' => '1084413800234'],\n ['modelo' => '138', 'color' => '002', 'talla' => '36', 'code' => '1084413800236'],\n ['modelo' => '138', 'color' => '022', 'talla' => '30', 'code' => '1084413802230'],\n ['modelo' => '138', 'color' => '022', 'talla' => '32', 'code' => '1084413802232'],\n ['modelo' => '138', 'color' => '022', 'talla' => '34', 'code' => '1084413802234'],\n ['modelo' => '138', 'color' => '022', 'talla' => '36', 'code' => '1084413802236'],\n ['modelo' => '138', 'color' => '027', 'talla' => '30', 'code' => '1084413802730'],\n ['modelo' => '138', 'color' => '027', 'talla' => '32', 'code' => '1084413802732'],\n ['modelo' => '138', 'color' => '027', 'talla' => '34', 'code' => '1084413802734'],\n ['modelo' => '138', 'color' => '027', 'talla' => '36', 'code' => '1084413802736'],\n ['modelo' => '096', 'color' => '001', 'talla' => '30', 'code' => '1087609600130'],\n ['modelo' => '096', 'color' => '001', 'talla' => '32', 'code' => '1087609600132'],\n ['modelo' => '096', 'color' => '001', 'talla' => '34', 'code' => '1087609600134'],\n ['modelo' => '096', 'color' => '001', 'talla' => '36', 'code' => '1087609600136'],\n ['modelo' => '096', 'color' => '002', 'talla' => '30', 'code' => '1087609600230'],\n ['modelo' => '096', 'color' => '002', 'talla' => '32', 'code' => '1087609600232'],\n ['modelo' => '096', 'color' => '002', 'talla' => '34', 'code' => '1087609600234'],\n ['modelo' => '096', 'color' => '002', 'talla' => '36', 'code' => '1087609600236'],\n ['modelo' => '096', 'color' => '006', 'talla' => '30', 'code' => '1087609600630'],\n ['modelo' => '096', 'color' => '006', 'talla' => '32', 'code' => '1087609600632'],\n ['modelo' => '096', 'color' => '006', 'talla' => '34', 'code' => '1087609600634'],\n ['modelo' => '096', 'color' => '006', 'talla' => '36', 'code' => '1087609600636'],\n ['modelo' => '096', 'color' => '022', 'talla' => '30', 'code' => '1087609602230'],\n ['modelo' => '096', 'color' => '022', 'talla' => '32', 'code' => '1087609602232'],\n ['modelo' => '096', 'color' => '022', 'talla' => '34', 'code' => '1087609602234'],\n ['modelo' => '096', 'color' => '022', 'talla' => '36', 'code' => '1087609602236'],\n ['modelo' => '096', 'color' => '245', 'talla' => '30', 'code' => '1087609624530'],\n ['modelo' => '096', 'color' => '245', 'talla' => '32', 'code' => '1087609624532'],\n ['modelo' => '096', 'color' => '245', 'talla' => '34', 'code' => '1087609624534'],\n ['modelo' => '096', 'color' => '245', 'talla' => '36', 'code' => '1087609624536'],\n ['modelo' => '420', 'color' => '002', 'talla' => '34', 'code' => '1019042000234'],\n ['modelo' => '420', 'color' => '002', 'talla' => '36', 'code' => '1019042000236'],\n ['modelo' => '420', 'color' => '002', 'talla' => '38', 'code' => '1019042000238'],\n ['modelo' => '420', 'color' => '002', 'talla' => '40', 'code' => '1019042000240'],\n ['modelo' => '420', 'color' => '018', 'talla' => '34', 'code' => '1019042001834'],\n ['modelo' => '420', 'color' => '018', 'talla' => '36', 'code' => '1019042001836'],\n ['modelo' => '420', 'color' => '018', 'talla' => '38', 'code' => '1019042001838'],\n ['modelo' => '420', 'color' => '018', 'talla' => '40', 'code' => '1019042001840'],\n ['modelo' => '420', 'color' => '248', 'talla' => '34', 'code' => '1019042024834'],\n ['modelo' => '420', 'color' => '248', 'talla' => '36', 'code' => '1019042024836'],\n ['modelo' => '420', 'color' => '248', 'talla' => '38', 'code' => '1019042024838'],\n ['modelo' => '420', 'color' => '248', 'talla' => '40', 'code' => '1019042024840'],\n ['modelo' => '461', 'color' => '002', 'talla' => '32', 'code' => '1019646100232'],\n ['modelo' => '461', 'color' => '002', 'talla' => '34', 'code' => '1019646100234'],\n ['modelo' => '461', 'color' => '002', 'talla' => '36', 'code' => '1019646100236'],\n ['modelo' => '461', 'color' => '002', 'talla' => '38', 'code' => '1019646100238'],\n ['modelo' => '461', 'color' => '002', 'talla' => '40', 'code' => '1019646100240'],\n ['modelo' => '461', 'color' => '009', 'talla' => '32', 'code' => '1019646100932'],\n ['modelo' => '461', 'color' => '009', 'talla' => '34', 'code' => '1019646100934'],\n ['modelo' => '461', 'color' => '009', 'talla' => '36', 'code' => '1019646100936'],\n ['modelo' => '461', 'color' => '009', 'talla' => '38', 'code' => '1019646100938'],\n ['modelo' => '461', 'color' => '009', 'talla' => '40', 'code' => '1019646100940'],\n ['modelo' => '461', 'color' => '018', 'talla' => '32', 'code' => '1019646101832'],\n ['modelo' => '461', 'color' => '018', 'talla' => '34', 'code' => '1019646101834'],\n ['modelo' => '461', 'color' => '018', 'talla' => '36', 'code' => '1019646101836'],\n ['modelo' => '461', 'color' => '018', 'talla' => '38', 'code' => '1019646101838'],\n ['modelo' => '461', 'color' => '018', 'talla' => '40', 'code' => '1019646101840'],\n ['modelo' => '461', 'color' => '248', 'talla' => '32', 'code' => '1019646124832'],\n ['modelo' => '461', 'color' => '248', 'talla' => '34', 'code' => '1019646124834'],\n ['modelo' => '461', 'color' => '248', 'talla' => '36', 'code' => '1019646124836'],\n ['modelo' => '461', 'color' => '248', 'talla' => '38', 'code' => '1019646124838'],\n ['modelo' => '461', 'color' => '248', 'talla' => '40', 'code' => '1019646124840'],\n ['modelo' => '562', 'color' => '001', 'talla' => '34', 'code' => '1014456200134'],\n ['modelo' => '562', 'color' => '001', 'talla' => '36', 'code' => '1014456200136'],\n ['modelo' => '562', 'color' => '001', 'talla' => '38', 'code' => '1014456200138'],\n ['modelo' => '562', 'color' => '001', 'talla' => '40', 'code' => '1014456200140'],\n ['modelo' => '562', 'color' => '002', 'talla' => '34', 'code' => '1014456200234'],\n ['modelo' => '562', 'color' => '002', 'talla' => '36', 'code' => '1014456200236'],\n ['modelo' => '562', 'color' => '002', 'talla' => '38', 'code' => '1014456200238'],\n ['modelo' => '562', 'color' => '002', 'talla' => '40', 'code' => '1014456200240'],\n ['modelo' => '562', 'color' => '372', 'talla' => '34', 'code' => '1014456237234'],\n ['modelo' => '562', 'color' => '372', 'talla' => '36', 'code' => '1014456237236'],\n ['modelo' => '562', 'color' => '372', 'talla' => '38', 'code' => '1014456237238'],\n ['modelo' => '562', 'color' => '372', 'talla' => '40', 'code' => '1014456237240'],\n ['modelo' => '562', 'color' => '373', 'talla' => '34', 'code' => '1014456237334'],\n ['modelo' => '562', 'color' => '373', 'talla' => '36', 'code' => '1014456237336'],\n ['modelo' => '562', 'color' => '373', 'talla' => '38', 'code' => '1014456237338'],\n ['modelo' => '562', 'color' => '373', 'talla' => '40', 'code' => '1014456237340'],\n ['modelo' => '562', 'color' => '374', 'talla' => '34', 'code' => '1014456237434'],\n ['modelo' => '562', 'color' => '374', 'talla' => '36', 'code' => '1014456237436'],\n ['modelo' => '562', 'color' => '374', 'talla' => '38', 'code' => '1014456237438'],\n ['modelo' => '562', 'color' => '374', 'talla' => '40', 'code' => '1014456237440'],\n ['modelo' => '001', 'color' => '001', 'talla' => 'L', 'code' => '10203001001L'],\n ['modelo' => '001', 'color' => '001', 'talla' => 'M', 'code' => '10203001001M'],\n ['modelo' => '001', 'color' => '001', 'talla' => 'S', 'code' => '10203001001S'],\n ['modelo' => '001', 'color' => '002', 'talla' => 'L', 'code' => '10203001002L'],\n ['modelo' => '001', 'color' => '002', 'talla' => 'M', 'code' => '10203001002M'],\n ['modelo' => '001', 'color' => '002', 'talla' => 'S', 'code' => '10203001002S'],\n ['modelo' => '001', 'color' => '005', 'talla' => 'L', 'code' => '10203001005L'],\n ['modelo' => '001', 'color' => '005', 'talla' => 'M', 'code' => '10203001005M'],\n ['modelo' => '001', 'color' => '005', 'talla' => 'S', 'code' => '10203001005S'],\n ['modelo' => '001', 'color' => '007', 'talla' => 'L', 'code' => '10203001007L'],\n ['modelo' => '001', 'color' => '007', 'talla' => 'M', 'code' => '10203001007M'],\n ['modelo' => '001', 'color' => '007', 'talla' => 'S', 'code' => '10203001007S'],\n ['modelo' => '001', 'color' => '009', 'talla' => 'L', 'code' => '10203001009L'],\n ['modelo' => '001', 'color' => '009', 'talla' => 'M', 'code' => '10203001009M'],\n ['modelo' => '001', 'color' => '009', 'talla' => 'S', 'code' => '10203001009S'],\n ['modelo' => '001', 'color' => '015', 'talla' => 'L', 'code' => '10203001015L'],\n ['modelo' => '001', 'color' => '015', 'talla' => 'M', 'code' => '10203001015M'],\n ['modelo' => '001', 'color' => '015', 'talla' => 'S', 'code' => '10203001015S'],\n ['modelo' => '001', 'color' => '018', 'talla' => 'L', 'code' => '10203001018L'],\n ['modelo' => '001', 'color' => '018', 'talla' => 'M', 'code' => '10203001018M'],\n ['modelo' => '001', 'color' => '018', 'talla' => 'S', 'code' => '10203001018S'],\n ['modelo' => '001', 'color' => '024', 'talla' => 'L', 'code' => '10203001024L'],\n ['modelo' => '001', 'color' => '024', 'talla' => 'M', 'code' => '10203001024M'],\n ['modelo' => '001', 'color' => '024', 'talla' => 'S', 'code' => '10203001024S'],\n ['modelo' => '001', 'color' => '025', 'talla' => 'L', 'code' => '10203001025L'],\n ['modelo' => '001', 'color' => '025', 'talla' => 'M', 'code' => '10203001025M'],\n ['modelo' => '001', 'color' => '025', 'talla' => 'S', 'code' => '10203001025S'],\n ['modelo' => '001', 'color' => '054', 'talla' => 'L', 'code' => '10203001054L'],\n ['modelo' => '001', 'color' => '054', 'talla' => 'M', 'code' => '10203001054M'],\n ['modelo' => '001', 'color' => '054', 'talla' => 'S', 'code' => '10203001054S'],\n ['modelo' => '001', 'color' => '063', 'talla' => 'L', 'code' => '10203001063L'],\n ['modelo' => '001', 'color' => '063', 'talla' => 'M', 'code' => '10203001063M'],\n ['modelo' => '001', 'color' => '063', 'talla' => 'S', 'code' => '10203001063S'],\n ['modelo' => '001', 'color' => '064', 'talla' => 'L', 'code' => '10203001064L'],\n ['modelo' => '001', 'color' => '064', 'talla' => 'M', 'code' => '10203001064M'],\n ['modelo' => '001', 'color' => '064', 'talla' => 'S', 'code' => '10203001064S'],\n ['modelo' => '001', 'color' => '065', 'talla' => 'L', 'code' => '10203001065L'],\n ['modelo' => '001', 'color' => '065', 'talla' => 'M', 'code' => '10203001065M'],\n ['modelo' => '001', 'color' => '065', 'talla' => 'S', 'code' => '10203001065S'],\n ['modelo' => '001', 'color' => '103', 'talla' => 'L', 'code' => '10203001103L'],\n ['modelo' => '001', 'color' => '103', 'talla' => 'M', 'code' => '10203001103M'],\n ['modelo' => '001', 'color' => '103', 'talla' => 'S', 'code' => '10203001103S'],\n ['modelo' => '001', 'color' => '190', 'talla' => 'L', 'code' => '10203001190L'],\n ['modelo' => '001', 'color' => '190', 'talla' => 'M', 'code' => '10203001190M'],\n ['modelo' => '001', 'color' => '190', 'talla' => 'S', 'code' => '10203001190S'],\n ['modelo' => '001', 'color' => '222', 'talla' => 'L', 'code' => '10203001222L'],\n ['modelo' => '001', 'color' => '222', 'talla' => 'M', 'code' => '10203001222M'],\n ['modelo' => '001', 'color' => '222', 'talla' => 'S', 'code' => '10203001222S'],\n ['modelo' => '001', 'color' => '245', 'talla' => 'L', 'code' => '10203001245L'],\n ['modelo' => '001', 'color' => '245', 'talla' => 'M', 'code' => '10203001245M'],\n ['modelo' => '001', 'color' => '245', 'talla' => 'S', 'code' => '10203001245S'],\n ['modelo' => '001', 'color' => '248', 'talla' => 'L', 'code' => '10203001248L'],\n ['modelo' => '001', 'color' => '248', 'talla' => 'M', 'code' => '10203001248M'],\n ['modelo' => '001', 'color' => '248', 'talla' => 'S', 'code' => '10203001248S'],\n ['modelo' => '110', 'color' => '001', 'talla' => 'L', 'code' => '10703110001L'],\n ['modelo' => '110', 'color' => '001', 'talla' => 'M', 'code' => '10703110001M'],\n ['modelo' => '110', 'color' => '001', 'talla' => 'S', 'code' => '10703110001S'],\n ['modelo' => '110', 'color' => '001', 'talla' => 'XL', 'code' => '10703110001XL'],\n ['modelo' => '110', 'color' => '002', 'talla' => 'L', 'code' => '10703110002L'],\n ['modelo' => '110', 'color' => '002', 'talla' => 'M', 'code' => '10703110002M'],\n ['modelo' => '110', 'color' => '002', 'talla' => 'S', 'code' => '10703110002S'],\n ['modelo' => '110', 'color' => '002', 'talla' => 'XL', 'code' => '10703110002XL'],\n ['modelo' => '110', 'color' => '009', 'talla' => 'L', 'code' => '10703110009L'],\n ['modelo' => '110', 'color' => '009', 'talla' => 'M', 'code' => '10703110009M'],\n ['modelo' => '110', 'color' => '009', 'talla' => 'S', 'code' => '10703110009S'],\n ['modelo' => '110', 'color' => '009', 'talla' => 'XL', 'code' => '10703110009XL'],\n ['modelo' => '110', 'color' => '022', 'talla' => 'L', 'code' => '10703110022L'],\n ['modelo' => '110', 'color' => '022', 'talla' => 'M', 'code' => '10703110022M'],\n ['modelo' => '110', 'color' => '022', 'talla' => 'S', 'code' => '10703110022S'],\n ['modelo' => '110', 'color' => '022', 'talla' => 'XL', 'code' => '10703110022XL'],\n ['modelo' => '110', 'color' => '023', 'talla' => 'L', 'code' => '10703110023L'],\n ['modelo' => '110', 'color' => '023', 'talla' => 'M', 'code' => '10703110023M'],\n ['modelo' => '110', 'color' => '023', 'talla' => 'S', 'code' => '10703110023S'],\n ['modelo' => '110', 'color' => '023', 'talla' => 'XL', 'code' => '10703110023XL'],\n ['modelo' => '110', 'color' => '024', 'talla' => 'L', 'code' => '10703110024L'],\n ['modelo' => '110', 'color' => '024', 'talla' => 'M', 'code' => '10703110024M'],\n ['modelo' => '110', 'color' => '024', 'talla' => 'S', 'code' => '10703110024S'],\n ['modelo' => '110', 'color' => '024', 'talla' => 'XL', 'code' => '10703110024XL'],\n ['modelo' => '110', 'color' => '025', 'talla' => 'L', 'code' => '10703110025L'],\n ['modelo' => '110', 'color' => '025', 'talla' => 'M', 'code' => '10703110025M'],\n ['modelo' => '110', 'color' => '025', 'talla' => 'S', 'code' => '10703110025S'],\n ['modelo' => '110', 'color' => '025', 'talla' => 'XL', 'code' => '10703110025XL'],\n ['modelo' => '110', 'color' => '054', 'talla' => 'L', 'code' => '10703110054L'],\n ['modelo' => '110', 'color' => '054', 'talla' => 'M', 'code' => '10703110054M'],\n ['modelo' => '110', 'color' => '054', 'talla' => 'XL', 'code' => '10703110054XL'],\n ['modelo' => '110', 'color' => '064', 'talla' => 'L', 'code' => '10703110064L'],\n ['modelo' => '110', 'color' => '064', 'talla' => 'M', 'code' => '10703110064M'],\n ['modelo' => '110', 'color' => '064', 'talla' => 'S', 'code' => '10703110064S'],\n ['modelo' => '110', 'color' => '064', 'talla' => 'XL', 'code' => '10703110064XL'],\n ['modelo' => '110', 'color' => '103', 'talla' => 'L', 'code' => '10703110103L'],\n ['modelo' => '110', 'color' => '103', 'talla' => 'M', 'code' => '10703110103M'],\n ['modelo' => '110', 'color' => '103', 'talla' => 'S', 'code' => '10703110103S'],\n ['modelo' => '110', 'color' => '103', 'talla' => 'XL', 'code' => '10703110103XL'],\n ['modelo' => '110', 'color' => '248', 'talla' => 'L', 'code' => '10703110248L'],\n ['modelo' => '110', 'color' => '248', 'talla' => 'M', 'code' => '10703110248M'],\n ['modelo' => '110', 'color' => '248', 'talla' => 'S', 'code' => '10703110248S'],\n ['modelo' => '110', 'color' => '248', 'talla' => 'XL', 'code' => '10703110248XL'],\n ['modelo' => '399', 'color' => '318', 'talla' => '32', 'code' => '1090339931832'],\n ['modelo' => '399', 'color' => '318', 'talla' => '34', 'code' => '1090339931834'],\n ['modelo' => '399', 'color' => '318', 'talla' => '36', 'code' => '1090339931836'],\n ['modelo' => '399', 'color' => '318', 'talla' => '38', 'code' => '1090339931838'],\n ['modelo' => '399', 'color' => '319', 'talla' => '32', 'code' => '1090339931932'],\n ['modelo' => '399', 'color' => '319', 'talla' => '34', 'code' => '1090339931934'],\n ['modelo' => '399', 'color' => '319', 'talla' => '36', 'code' => '1090339931936'],\n ['modelo' => '399', 'color' => '319', 'talla' => '38', 'code' => '1090339931938'],\n ['modelo' => '399', 'color' => '321', 'talla' => '32', 'code' => '1090339932132'],\n ['modelo' => '399', 'color' => '321', 'talla' => '34', 'code' => '1090339932134'],\n ['modelo' => '399', 'color' => '321', 'talla' => '36', 'code' => '1090339932136'],\n ['modelo' => '399', 'color' => '321', 'talla' => '38', 'code' => '1090339932138'],\n ['modelo' => '399', 'color' => '330', 'talla' => '32', 'code' => '1090339933032'],\n ['modelo' => '399', 'color' => '330', 'talla' => '34', 'code' => '1090339933034'],\n ['modelo' => '399', 'color' => '330', 'talla' => '36', 'code' => '1090339933036'],\n ['modelo' => '399', 'color' => '330', 'talla' => '38', 'code' => '1090339933038'],\n ['modelo' => '399', 'color' => '331', 'talla' => '32', 'code' => '1090339933132'],\n ['modelo' => '399', 'color' => '331', 'talla' => '34', 'code' => '1090339933134'],\n ['modelo' => '399', 'color' => '331', 'talla' => '36', 'code' => '1090339933136'],\n ['modelo' => '399', 'color' => '331', 'talla' => '38', 'code' => '1090339933138'],\n ['modelo' => '439', 'color' => '001', 'talla' => '32', 'code' => '1090343900132'],\n ['modelo' => '439', 'color' => '001', 'talla' => '34', 'code' => '1090343900134'],\n ['modelo' => '439', 'color' => '001', 'talla' => '36', 'code' => '1090343900136'],\n ['modelo' => '439', 'color' => '001', 'talla' => '38', 'code' => '1090343900138'],\n ['modelo' => '439', 'color' => '002', 'talla' => '32', 'code' => '1090343900232'],\n ['modelo' => '439', 'color' => '002', 'talla' => '34', 'code' => '1090343900234'],\n ['modelo' => '439', 'color' => '002', 'talla' => '36', 'code' => '1090343900236'],\n ['modelo' => '439', 'color' => '002', 'talla' => '38', 'code' => '1090343900238'],\n ['modelo' => '439', 'color' => '190', 'talla' => '32', 'code' => '1090343919032'],\n ['modelo' => '439', 'color' => '190', 'talla' => '34', 'code' => '1090343919034'],\n ['modelo' => '439', 'color' => '190', 'talla' => '36', 'code' => '1090343919036'],\n ['modelo' => '439', 'color' => '190', 'talla' => '38', 'code' => '1090343919038'],\n ['modelo' => '439', 'color' => '245', 'talla' => '32', 'code' => '1090343924532'],\n ['modelo' => '439', 'color' => '245', 'talla' => '34', 'code' => '1090343924534'],\n ['modelo' => '439', 'color' => '245', 'talla' => '36', 'code' => '1090343924536'],\n ['modelo' => '439', 'color' => '245', 'talla' => '38', 'code' => '1090343924538'],\n ['modelo' => '070', 'color' => '001', 'talla' => 'L', 'code' => '10203070001L'],\n ['modelo' => '070', 'color' => '001', 'talla' => 'M', 'code' => '10203070001M'],\n ['modelo' => '070', 'color' => '001', 'talla' => 'S', 'code' => '10203070001S'],\n ['modelo' => '070', 'color' => '002', 'talla' => 'L', 'code' => '10203070002L'],\n ['modelo' => '070', 'color' => '002', 'talla' => 'M', 'code' => '10203070002M'],\n ['modelo' => '070', 'color' => '002', 'talla' => 'S', 'code' => '10203070002S'],\n ['modelo' => '070', 'color' => '007', 'talla' => 'L', 'code' => '10203070007L'],\n ['modelo' => '070', 'color' => '007', 'talla' => 'M', 'code' => '10203070007M'],\n ['modelo' => '070', 'color' => '007', 'talla' => 'S', 'code' => '10203070007S'],\n ['modelo' => '070', 'color' => '009', 'talla' => 'L', 'code' => '10203070009L'],\n ['modelo' => '070', 'color' => '009', 'talla' => 'M', 'code' => '10203070009M'],\n ['modelo' => '070', 'color' => '009', 'talla' => 'S', 'code' => '10203070009S'],\n ['modelo' => '070', 'color' => '015', 'talla' => 'L', 'code' => '10203070015L'],\n ['modelo' => '070', 'color' => '015', 'talla' => 'M', 'code' => '10203070015M'],\n ['modelo' => '070', 'color' => '015', 'talla' => 'S', 'code' => '10203070015S'],\n ['modelo' => '070', 'color' => '018', 'talla' => 'L', 'code' => '10203070018L'],\n ['modelo' => '070', 'color' => '018', 'talla' => 'M', 'code' => '10203070018M'],\n ['modelo' => '070', 'color' => '018', 'talla' => 'S', 'code' => '10203070018S'],\n ['modelo' => '070', 'color' => '063', 'talla' => 'L', 'code' => '10203070063L'],\n ['modelo' => '070', 'color' => '063', 'talla' => 'M', 'code' => '10203070063M'],\n ['modelo' => '070', 'color' => '063', 'talla' => 'S', 'code' => '10203070063S'],\n ['modelo' => '070', 'color' => '064', 'talla' => 'L', 'code' => '10203070064L'],\n ['modelo' => '070', 'color' => '064', 'talla' => 'M', 'code' => '10203070064M'],\n ['modelo' => '070', 'color' => '064', 'talla' => 'S', 'code' => '10203070064S'],\n ['modelo' => '070', 'color' => '065', 'talla' => 'L', 'code' => '10203070065L'],\n ['modelo' => '070', 'color' => '065', 'talla' => 'M', 'code' => '10203070065M'],\n ['modelo' => '070', 'color' => '065', 'talla' => 'S', 'code' => '10203070065S'],\n ['modelo' => '070', 'color' => '103', 'talla' => 'L', 'code' => '10203070103L'],\n ['modelo' => '070', 'color' => '103', 'talla' => 'M', 'code' => '10203070103M'],\n ['modelo' => '070', 'color' => '103', 'talla' => 'S', 'code' => '10203070103S'],\n ['modelo' => '070', 'color' => '208', 'talla' => 'L', 'code' => '10203070208L'],\n ['modelo' => '070', 'color' => '208', 'talla' => 'M', 'code' => '10203070208M'],\n ['modelo' => '070', 'color' => '208', 'talla' => 'S', 'code' => '10203070208S'],\n ['modelo' => '070', 'color' => '222', 'talla' => 'L', 'code' => '10203070222L'],\n ['modelo' => '070', 'color' => '222', 'talla' => 'M', 'code' => '10203070222M'],\n ['modelo' => '070', 'color' => '222', 'talla' => 'S', 'code' => '10203070222S'],\n ['modelo' => '070', 'color' => '248', 'talla' => 'L', 'code' => '10203070248L'],\n ['modelo' => '070', 'color' => '248', 'talla' => 'M', 'code' => '10203070248M'],\n ['modelo' => '070', 'color' => '248', 'talla' => 'S', 'code' => '10203070248S'],\n ['modelo' => '152', 'color' => '001', 'talla' => 'L', 'code' => '10740152001L'],\n ['modelo' => '152', 'color' => '001', 'talla' => 'M', 'code' => '10740152001M'],\n ['modelo' => '152', 'color' => '001', 'talla' => 'S', 'code' => '10740152001S'],\n ['modelo' => '152', 'color' => '001', 'talla' => 'XL', 'code' => '10740152001XL'],\n ['modelo' => '152', 'color' => '002', 'talla' => 'L', 'code' => '10740152002L'],\n ['modelo' => '152', 'color' => '002', 'talla' => 'M', 'code' => '10740152002M'],\n ['modelo' => '152', 'color' => '002', 'talla' => 'S', 'code' => '10740152002S'],\n ['modelo' => '152', 'color' => '002', 'talla' => 'XL', 'code' => '10740152002XL'],\n ['modelo' => '152', 'color' => '007', 'talla' => 'L', 'code' => '10740152007L'],\n ['modelo' => '152', 'color' => '007', 'talla' => 'M', 'code' => '10740152007M'],\n ['modelo' => '152', 'color' => '007', 'talla' => 'S', 'code' => '10740152007S'],\n ['modelo' => '152', 'color' => '007', 'talla' => 'XL', 'code' => '10740152007XL'],\n ['modelo' => '152', 'color' => '009', 'talla' => 'L', 'code' => '10740152009L'],\n ['modelo' => '152', 'color' => '009', 'talla' => 'M', 'code' => '10740152009M'],\n ['modelo' => '152', 'color' => '009', 'talla' => 'S', 'code' => '10740152009S'],\n ['modelo' => '152', 'color' => '009', 'talla' => 'XL', 'code' => '10740152009XL'],\n ['modelo' => '152', 'color' => '015', 'talla' => 'L', 'code' => '10740152015L'],\n ['modelo' => '152', 'color' => '015', 'talla' => 'M', 'code' => '10740152015M'],\n ['modelo' => '152', 'color' => '015', 'talla' => 'S', 'code' => '10740152015S'],\n ['modelo' => '152', 'color' => '015', 'talla' => 'XL', 'code' => '10740152015XL'],\n ['modelo' => '152', 'color' => '018', 'talla' => 'L', 'code' => '10740152018L'],\n ['modelo' => '152', 'color' => '018', 'talla' => 'M', 'code' => '10740152018M'],\n ['modelo' => '152', 'color' => '018', 'talla' => 'S', 'code' => '10740152018S'],\n ['modelo' => '152', 'color' => '018', 'talla' => 'XL', 'code' => '10740152018XL'],\n ['modelo' => '152', 'color' => '019', 'talla' => 'L', 'code' => '10740152019L'],\n ['modelo' => '152', 'color' => '019', 'talla' => 'M', 'code' => '10740152019M'],\n ['modelo' => '152', 'color' => '019', 'talla' => 'S', 'code' => '10740152019S'],\n ['modelo' => '152', 'color' => '019', 'talla' => 'XL', 'code' => '10740152019XL'],\n ['modelo' => '152', 'color' => '035', 'talla' => 'L', 'code' => '10740152035L'],\n ['modelo' => '152', 'color' => '035', 'talla' => 'M', 'code' => '10740152035M'],\n ['modelo' => '152', 'color' => '035', 'talla' => 'S', 'code' => '10740152035S'],\n ['modelo' => '152', 'color' => '035', 'talla' => 'XL', 'code' => '10740152035XL'],\n ['modelo' => '152', 'color' => '036', 'talla' => 'L', 'code' => '10740152036L'],\n ['modelo' => '152', 'color' => '036', 'talla' => 'M', 'code' => '10740152036M'],\n ['modelo' => '152', 'color' => '036', 'talla' => 'S', 'code' => '10740152036S'],\n ['modelo' => '152', 'color' => '036', 'talla' => 'XL', 'code' => '10740152036XL'],\n ['modelo' => '152', 'color' => '063', 'talla' => 'L', 'code' => '10740152063L'],\n ['modelo' => '152', 'color' => '063', 'talla' => 'M', 'code' => '10740152063M'],\n ['modelo' => '152', 'color' => '063', 'talla' => 'S', 'code' => '10740152063S'],\n ['modelo' => '152', 'color' => '063', 'talla' => 'XL', 'code' => '10740152063XL'],\n ['modelo' => '152', 'color' => '064', 'talla' => 'L', 'code' => '10740152064L'],\n ['modelo' => '152', 'color' => '064', 'talla' => 'M', 'code' => '10740152064M'],\n ['modelo' => '152', 'color' => '064', 'talla' => 'S', 'code' => '10740152064S'],\n ['modelo' => '152', 'color' => '064', 'talla' => 'XL', 'code' => '10740152064XL'],\n ['modelo' => '152', 'color' => '065', 'talla' => 'L', 'code' => '10740152065L'],\n ['modelo' => '152', 'color' => '065', 'talla' => 'M', 'code' => '10740152065M'],\n ['modelo' => '152', 'color' => '065', 'talla' => 'S', 'code' => '10740152065S'],\n ['modelo' => '152', 'color' => '065', 'talla' => 'XL', 'code' => '10740152065XL'],\n ['modelo' => '152', 'color' => '190', 'talla' => 'L', 'code' => '10740152190L'],\n ['modelo' => '152', 'color' => '190', 'talla' => 'M', 'code' => '10740152190M'],\n ['modelo' => '152', 'color' => '190', 'talla' => 'S', 'code' => '10740152190S'],\n ['modelo' => '152', 'color' => '190', 'talla' => 'XL', 'code' => '10740152190XL'],\n ['modelo' => '152', 'color' => '202', 'talla' => 'L', 'code' => '10740152202L'],\n ['modelo' => '152', 'color' => '202', 'talla' => 'M', 'code' => '10740152202M'],\n ['modelo' => '152', 'color' => '202', 'talla' => 'S', 'code' => '10740152202S'],\n ['modelo' => '152', 'color' => '202', 'talla' => 'XL', 'code' => '10740152202XL'],\n ['modelo' => '152', 'color' => '248', 'talla' => 'L', 'code' => '10740152248L'],\n ['modelo' => '152', 'color' => '248', 'talla' => 'M', 'code' => '10740152248M'],\n ['modelo' => '152', 'color' => '248', 'talla' => 'S', 'code' => '10740152248S'],\n ['modelo' => '152', 'color' => '248', 'talla' => 'XL', 'code' => '10740152248XL'],\n ['modelo' => '073', 'color' => '001', 'talla' => 'L', 'code' => '10203073001L'],\n ['modelo' => '073', 'color' => '001', 'talla' => 'M', 'code' => '10203073001M'],\n ['modelo' => '073', 'color' => '001', 'talla' => 'S', 'code' => '10203073001S'],\n ['modelo' => '073', 'color' => '001', 'talla' => 'XL', 'code' => '10203073001XL'],\n ['modelo' => '073', 'color' => '002', 'talla' => 'L', 'code' => '10203073002L'],\n ['modelo' => '073', 'color' => '002', 'talla' => 'M', 'code' => '10203073002M'],\n ['modelo' => '073', 'color' => '002', 'talla' => 'S', 'code' => '10203073002S'],\n ['modelo' => '073', 'color' => '002', 'talla' => 'XL', 'code' => '10203073002XL'],\n ['modelo' => '073', 'color' => '004', 'talla' => 'L', 'code' => '10203073004L'],\n ['modelo' => '073', 'color' => '004', 'talla' => 'M', 'code' => '10203073004M'],\n ['modelo' => '073', 'color' => '004', 'talla' => 'S', 'code' => '10203073004S'],\n ['modelo' => '073', 'color' => '004', 'talla' => 'XL', 'code' => '10203073004XL'],\n ['modelo' => '073', 'color' => '005', 'talla' => 'L', 'code' => '10203073005L'],\n ['modelo' => '073', 'color' => '005', 'talla' => 'M', 'code' => '10203073005M'],\n ['modelo' => '073', 'color' => '005', 'talla' => 'S', 'code' => '10203073005S'],\n ['modelo' => '073', 'color' => '005', 'talla' => 'XL', 'code' => '10203073005XL'],\n ['modelo' => '073', 'color' => '007', 'talla' => 'L', 'code' => '10203073007L'],\n ['modelo' => '073', 'color' => '007', 'talla' => 'M', 'code' => '10203073007M'],\n ['modelo' => '073', 'color' => '007', 'talla' => 'S', 'code' => '10203073007S'],\n ['modelo' => '073', 'color' => '007', 'talla' => 'XL', 'code' => '10203073007XL'],\n ['modelo' => '073', 'color' => '009', 'talla' => 'L', 'code' => '10203073009L'],\n ['modelo' => '073', 'color' => '009', 'talla' => 'M', 'code' => '10203073009M'],\n ['modelo' => '073', 'color' => '009', 'talla' => 'S', 'code' => '10203073009S'],\n ['modelo' => '073', 'color' => '009', 'talla' => 'XL', 'code' => '10203073009XL'],\n ['modelo' => '073', 'color' => '018', 'talla' => 'L', 'code' => '10203073018L'],\n ['modelo' => '073', 'color' => '018', 'talla' => 'M', 'code' => '10203073018M'],\n ['modelo' => '073', 'color' => '018', 'talla' => 'S', 'code' => '10203073018S'],\n ['modelo' => '073', 'color' => '018', 'talla' => 'XL', 'code' => '10203073018XL'],\n ['modelo' => '073', 'color' => '024', 'talla' => 'L', 'code' => '10203073024L'],\n ['modelo' => '073', 'color' => '024', 'talla' => 'M', 'code' => '10203073024M'],\n ['modelo' => '073', 'color' => '024', 'talla' => 'S', 'code' => '10203073024S'],\n ['modelo' => '073', 'color' => '025', 'talla' => 'L', 'code' => '10203073025L'],\n ['modelo' => '073', 'color' => '025', 'talla' => 'M', 'code' => '10203073025M'],\n ['modelo' => '073', 'color' => '025', 'talla' => 'S', 'code' => '10203073025S'],\n ['modelo' => '073', 'color' => '025', 'talla' => 'XL', 'code' => '10203073025XL'],\n ['modelo' => '073', 'color' => '063', 'talla' => 'L', 'code' => '10203073063L'],\n ['modelo' => '073', 'color' => '063', 'talla' => 'M', 'code' => '10203073063M'],\n ['modelo' => '073', 'color' => '063', 'talla' => 'S', 'code' => '10203073063S'],\n ['modelo' => '073', 'color' => '063', 'talla' => 'XL', 'code' => '10203073063XL'],\n ['modelo' => '073', 'color' => '064', 'talla' => 'L', 'code' => '10203073064L'],\n ['modelo' => '073', 'color' => '064', 'talla' => 'M', 'code' => '10203073064M'],\n ['modelo' => '073', 'color' => '064', 'talla' => 'S', 'code' => '10203073064S'],\n ['modelo' => '073', 'color' => '064', 'talla' => 'XL', 'code' => '10203073064XL'],\n ['modelo' => '073', 'color' => '065', 'talla' => 'L', 'code' => '10203073065L'],\n ['modelo' => '073', 'color' => '065', 'talla' => 'M', 'code' => '10203073065M'],\n ['modelo' => '073', 'color' => '065', 'talla' => 'S', 'code' => '10203073065S'],\n ['modelo' => '073', 'color' => '065', 'talla' => 'XL', 'code' => '10203073065XL'],\n ['modelo' => '073', 'color' => '190', 'talla' => 'L', 'code' => '10203073190L'],\n ['modelo' => '073', 'color' => '190', 'talla' => 'M', 'code' => '10203073190M'],\n ['modelo' => '073', 'color' => '190', 'talla' => 'S', 'code' => '10203073190S'],\n ['modelo' => '073', 'color' => '190', 'talla' => 'XL', 'code' => '10203073190XL'],\n ['modelo' => '073', 'color' => '245', 'talla' => 'L', 'code' => '10203073245L'],\n ['modelo' => '073', 'color' => '245', 'talla' => 'M', 'code' => '10203073245M'],\n ['modelo' => '073', 'color' => '245', 'talla' => 'S', 'code' => '10203073245S'],\n ['modelo' => '073', 'color' => '245', 'talla' => 'XL', 'code' => '10203073245XL'],\n ['modelo' => '073', 'color' => '248', 'talla' => 'L', 'code' => '10203073248L'],\n ['modelo' => '073', 'color' => '248', 'talla' => 'M', 'code' => '10203073248M'],\n ['modelo' => '073', 'color' => '248', 'talla' => 'S', 'code' => '10203073248S'],\n ['modelo' => '073', 'color' => '248', 'talla' => 'XL', 'code' => '10203073248XL'],\n ['modelo' => '002', 'color' => '001', 'talla' => 'L', 'code' => '10203002001L'],\n ['modelo' => '002', 'color' => '001', 'talla' => 'M', 'code' => '10203002001M'],\n ['modelo' => '002', 'color' => '001', 'talla' => 'S', 'code' => '10203002001S'],\n ['modelo' => '002', 'color' => '002', 'talla' => 'L', 'code' => '10203002002L'],\n ['modelo' => '002', 'color' => '002', 'talla' => 'M', 'code' => '10203002002M'],\n ['modelo' => '002', 'color' => '002', 'talla' => 'S', 'code' => '10203002002S'],\n ['modelo' => '002', 'color' => '007', 'talla' => 'L', 'code' => '10203002007L'],\n ['modelo' => '002', 'color' => '007', 'talla' => 'M', 'code' => '10203002007M'],\n ['modelo' => '002', 'color' => '007', 'talla' => 'S', 'code' => '10203002007S'],\n ['modelo' => '002', 'color' => '009', 'talla' => 'L', 'code' => '10203002009L'],\n ['modelo' => '002', 'color' => '015', 'talla' => 'L', 'code' => '10203002015L'],\n ['modelo' => '002', 'color' => '015', 'talla' => 'M', 'code' => '10203002015M'],\n ['modelo' => '002', 'color' => '015', 'talla' => 'S', 'code' => '10203002015S'],\n ['modelo' => '002', 'color' => '018', 'talla' => 'L', 'code' => '10203002018L'],\n ['modelo' => '002', 'color' => '018', 'talla' => 'M', 'code' => '10203002018M'],\n ['modelo' => '002', 'color' => '018', 'talla' => 'S', 'code' => '10203002018S'],\n ['modelo' => '002', 'color' => '033', 'talla' => 'L', 'code' => '10203002033L'],\n ['modelo' => '002', 'color' => '033', 'talla' => 'M', 'code' => '10203002033M'],\n ['modelo' => '002', 'color' => '033', 'talla' => 'S', 'code' => '10203002033S'],\n ['modelo' => '002', 'color' => '048', 'talla' => 'L', 'code' => '10203002048L'],\n ['modelo' => '002', 'color' => '048', 'talla' => 'M', 'code' => '10203002048M'],\n ['modelo' => '002', 'color' => '048', 'talla' => 'S', 'code' => '10203002048S'],\n ['modelo' => '002', 'color' => '050', 'talla' => 'L', 'code' => '10203002050L'],\n ['modelo' => '002', 'color' => '050', 'talla' => 'M', 'code' => '10203002050M'],\n ['modelo' => '002', 'color' => '050', 'talla' => 'S', 'code' => '10203002050S'],\n ['modelo' => '002', 'color' => '052', 'talla' => 'L', 'code' => '10203002052L'],\n ['modelo' => '002', 'color' => '052', 'talla' => 'M', 'code' => '10203002052M'],\n ['modelo' => '002', 'color' => '052', 'talla' => 'S', 'code' => '10203002052S'],\n ['modelo' => '002', 'color' => '063', 'talla' => 'L', 'code' => '10203002063L'],\n ['modelo' => '002', 'color' => '063', 'talla' => 'M', 'code' => '10203002063M'],\n ['modelo' => '002', 'color' => '063', 'talla' => 'S', 'code' => '10203002063S'],\n ['modelo' => '002', 'color' => '064', 'talla' => 'L', 'code' => '10203002064L'],\n ['modelo' => '002', 'color' => '064', 'talla' => 'M', 'code' => '10203002064M'],\n ['modelo' => '002', 'color' => '064', 'talla' => 'S', 'code' => '10203002064S'],\n ['modelo' => '002', 'color' => '065', 'talla' => 'L', 'code' => '10203002065L'],\n ['modelo' => '002', 'color' => '065', 'talla' => 'M', 'code' => '10203002065M'],\n ['modelo' => '002', 'color' => '065', 'talla' => 'S', 'code' => '10203002065S'],\n ['modelo' => '002', 'color' => '067', 'talla' => 'L', 'code' => '10203002067L'],\n ['modelo' => '002', 'color' => '067', 'talla' => 'M', 'code' => '10203002067M'],\n ['modelo' => '002', 'color' => '067', 'talla' => 'S', 'code' => '10203002067S'],\n ['modelo' => '002', 'color' => '075', 'talla' => 'L', 'code' => '10203002075L'],\n ['modelo' => '002', 'color' => '075', 'talla' => 'M', 'code' => '10203002075M'],\n ['modelo' => '002', 'color' => '075', 'talla' => 'S', 'code' => '10203002075S'],\n ['modelo' => '002', 'color' => '078', 'talla' => 'L', 'code' => '10203002078L'],\n ['modelo' => '002', 'color' => '078', 'talla' => 'M', 'code' => '10203002078M'],\n ['modelo' => '002', 'color' => '078', 'talla' => 'S', 'code' => '10203002078S'],\n ['modelo' => '002', 'color' => '085', 'talla' => 'L', 'code' => '10203002085L'],\n ['modelo' => '002', 'color' => '085', 'talla' => 'M', 'code' => '10203002085M'],\n ['modelo' => '002', 'color' => '085', 'talla' => 'S', 'code' => '10203002085S'],\n ['modelo' => '002', 'color' => '104', 'talla' => 'L', 'code' => '10203002104L'],\n ['modelo' => '002', 'color' => '104', 'talla' => 'M', 'code' => '10203002104M'],\n ['modelo' => '002', 'color' => '104', 'talla' => 'S', 'code' => '10203002104S'],\n ['modelo' => '002', 'color' => '208', 'talla' => 'L', 'code' => '10203002208L'],\n ['modelo' => '002', 'color' => '208', 'talla' => 'M', 'code' => '10203002208M'],\n ['modelo' => '002', 'color' => '208', 'talla' => 'S', 'code' => '10203002208S'],\n ['modelo' => '002', 'color' => '222', 'talla' => 'L', 'code' => '10203002222L'],\n ['modelo' => '002', 'color' => '222', 'talla' => 'M', 'code' => '10203002222M'],\n ['modelo' => '002', 'color' => '222', 'talla' => 'S', 'code' => '10203002222S'],\n ['modelo' => '002', 'color' => '244', 'talla' => 'L', 'code' => '10203002244L'],\n ['modelo' => '002', 'color' => '244', 'talla' => 'M', 'code' => '10203002244M'],\n ['modelo' => '002', 'color' => '244', 'talla' => 'S', 'code' => '10203002244S'],\n ['modelo' => '002', 'color' => '248', 'talla' => 'L', 'code' => '10203002248L'],\n ['modelo' => '002', 'color' => '248', 'talla' => 'M', 'code' => '10203002248M'],\n ['modelo' => '002', 'color' => '248', 'talla' => 'S', 'code' => '10203002248S'],\n ['modelo' => '128', 'color' => '001', 'talla' => 'L', 'code' => '10503128001L'],\n ['modelo' => '128', 'color' => '001', 'talla' => 'M', 'code' => '10503128001M'],\n ['modelo' => '128', 'color' => '001', 'talla' => 'S', 'code' => '10503128001S'],\n ['modelo' => '128', 'color' => '002', 'talla' => 'L', 'code' => '10503128002L'],\n ['modelo' => '128', 'color' => '002', 'talla' => 'M', 'code' => '10503128002M'],\n ['modelo' => '128', 'color' => '002', 'talla' => 'S', 'code' => '10503128002S'],\n ['modelo' => '128', 'color' => '015', 'talla' => 'L', 'code' => '10503128015L'],\n ['modelo' => '128', 'color' => '015', 'talla' => 'M', 'code' => '10503128015M'],\n ['modelo' => '128', 'color' => '015', 'talla' => 'S', 'code' => '10503128015S'],\n ['modelo' => '128', 'color' => '033', 'talla' => 'L', 'code' => '10503128033L'],\n ['modelo' => '128', 'color' => '033', 'talla' => 'M', 'code' => '10503128033M'],\n ['modelo' => '128', 'color' => '033', 'talla' => 'S', 'code' => '10503128033S'],\n ['modelo' => '128', 'color' => '048', 'talla' => 'L', 'code' => '10503128048L'],\n ['modelo' => '128', 'color' => '048', 'talla' => 'M', 'code' => '10503128048M'],\n ['modelo' => '128', 'color' => '048', 'talla' => 'S', 'code' => '10503128048S'],\n ['modelo' => '128', 'color' => '050', 'talla' => 'L', 'code' => '10503128050L'],\n ['modelo' => '128', 'color' => '050', 'talla' => 'M', 'code' => '10503128050M'],\n ['modelo' => '128', 'color' => '050', 'talla' => 'S', 'code' => '10503128050S'],\n ['modelo' => '128', 'color' => '052', 'talla' => 'L', 'code' => '10503128052L'],\n ['modelo' => '128', 'color' => '052', 'talla' => 'M', 'code' => '10503128052M'],\n ['modelo' => '128', 'color' => '052', 'talla' => 'S', 'code' => '10503128052S'],\n ['modelo' => '128', 'color' => '064', 'talla' => 'L', 'code' => '10503128064L'],\n ['modelo' => '128', 'color' => '064', 'talla' => 'M', 'code' => '10503128064M'],\n ['modelo' => '128', 'color' => '064', 'talla' => 'S', 'code' => '10503128064S'],\n ['modelo' => '128', 'color' => '075', 'talla' => 'L', 'code' => '10503128075L'],\n ['modelo' => '128', 'color' => '075', 'talla' => 'M', 'code' => '10503128075M'],\n ['modelo' => '128', 'color' => '075', 'talla' => 'S', 'code' => '10503128075S'],\n ['modelo' => '128', 'color' => '078', 'talla' => 'L', 'code' => '10503128078L'],\n ['modelo' => '128', 'color' => '078', 'talla' => 'M', 'code' => '10503128078M'],\n ['modelo' => '128', 'color' => '078', 'talla' => 'S', 'code' => '10503128078S'],\n ['modelo' => '128', 'color' => '085', 'talla' => 'L', 'code' => '10503128085L'],\n ['modelo' => '128', 'color' => '085', 'talla' => 'M', 'code' => '10503128085M'],\n ['modelo' => '128', 'color' => '085', 'talla' => 'S', 'code' => '10503128085S'],\n ['modelo' => '128', 'color' => '104', 'talla' => 'L', 'code' => '10503128104L'],\n ['modelo' => '128', 'color' => '104', 'talla' => 'M', 'code' => '10503128104M'],\n ['modelo' => '128', 'color' => '104', 'talla' => 'S', 'code' => '10503128104S'],\n ['modelo' => '128', 'color' => '208', 'talla' => 'L', 'code' => '10503128208L'],\n ['modelo' => '128', 'color' => '208', 'talla' => 'M', 'code' => '10503128208M'],\n ['modelo' => '128', 'color' => '208', 'talla' => 'S', 'code' => '10503128208S'],\n ['modelo' => '128', 'color' => '222', 'talla' => 'L', 'code' => '10503128222L'],\n ['modelo' => '128', 'color' => '222', 'talla' => 'M', 'code' => '10503128222M'],\n ['modelo' => '128', 'color' => '222', 'talla' => 'S', 'code' => '10503128222S'],\n ['modelo' => '128', 'color' => '244', 'talla' => 'L', 'code' => '10503128244L'],\n ['modelo' => '128', 'color' => '244', 'talla' => 'M', 'code' => '10503128244M'],\n ['modelo' => '128', 'color' => '244', 'talla' => 'S', 'code' => '10503128244S'],\n ['modelo' => '128', 'color' => '248', 'talla' => 'L', 'code' => '10503128248L'],\n ['modelo' => '128', 'color' => '248', 'talla' => 'M', 'code' => '10503128248M'],\n ['modelo' => '128', 'color' => '248', 'talla' => 'S', 'code' => '10503128248S'],\n ['modelo' => '077', 'color' => '001', 'talla' => 'L', 'code' => '10503077001L'],\n ['modelo' => '077', 'color' => '001', 'talla' => 'M', 'code' => '10503077001M'],\n ['modelo' => '077', 'color' => '001', 'talla' => 'S', 'code' => '10503077001S'],\n ['modelo' => '077', 'color' => '002', 'talla' => 'L', 'code' => '10503077002L'],\n ['modelo' => '077', 'color' => '002', 'talla' => 'M', 'code' => '10503077002M'],\n ['modelo' => '077', 'color' => '002', 'talla' => 'S', 'code' => '10503077002S'],\n ['modelo' => '077', 'color' => '007', 'talla' => 'L', 'code' => '10503077007L'],\n ['modelo' => '077', 'color' => '007', 'talla' => 'M', 'code' => '10503077007M'],\n ['modelo' => '077', 'color' => '007', 'talla' => 'S', 'code' => '10503077007S'],\n ['modelo' => '077', 'color' => '082', 'talla' => 'L', 'code' => '10503077082L'],\n ['modelo' => '077', 'color' => '082', 'talla' => 'M', 'code' => '10503077082M'],\n ['modelo' => '077', 'color' => '082', 'talla' => 'S', 'code' => '10503077082S'],\n ['modelo' => '077', 'color' => '167', 'talla' => 'L', 'code' => '10503077167L'],\n ['modelo' => '077', 'color' => '167', 'talla' => 'M', 'code' => '10503077167M'],\n ['modelo' => '077', 'color' => '167', 'talla' => 'S', 'code' => '10503077167S'],\n ['modelo' => '077', 'color' => '222', 'talla' => 'L', 'code' => '10503077222L'],\n ['modelo' => '077', 'color' => '222', 'talla' => 'M', 'code' => '10503077222M'],\n ['modelo' => '077', 'color' => '222', 'talla' => 'S', 'code' => '10503077222S'],\n ['modelo' => '078', 'color' => '001', 'talla' => 'L', 'code' => '10303078001L'],\n ['modelo' => '078', 'color' => '001', 'talla' => 'M', 'code' => '10303078001M'],\n ['modelo' => '078', 'color' => '001', 'talla' => 'S', 'code' => '10303078001S'],\n ['modelo' => '078', 'color' => '002', 'talla' => 'L', 'code' => '10303078002L'],\n ['modelo' => '078', 'color' => '002', 'talla' => 'M', 'code' => '10303078002M'],\n ['modelo' => '078', 'color' => '002', 'talla' => 'S', 'code' => '10303078002S'],\n ['modelo' => '078', 'color' => '024', 'talla' => 'L', 'code' => '10303078024L'],\n ['modelo' => '078', 'color' => '024', 'talla' => 'M', 'code' => '10303078024M'],\n ['modelo' => '078', 'color' => '024', 'talla' => 'S', 'code' => '10303078024S'],\n ['modelo' => '078', 'color' => '025', 'talla' => 'L', 'code' => '10303078025L'],\n ['modelo' => '078', 'color' => '025', 'talla' => 'M', 'code' => '10303078025M'],\n ['modelo' => '078', 'color' => '025', 'talla' => 'S', 'code' => '10303078025S'],\n ['modelo' => '078', 'color' => '026', 'talla' => 'L', 'code' => '10303078026L'],\n ['modelo' => '078', 'color' => '026', 'talla' => 'M', 'code' => '10303078026M'],\n ['modelo' => '078', 'color' => '026', 'talla' => 'S', 'code' => '10303078026S'],\n ['modelo' => '078', 'color' => '054', 'talla' => 'L', 'code' => '10303078054L'],\n ['modelo' => '078', 'color' => '054', 'talla' => 'M', 'code' => '10303078054M'],\n ['modelo' => '078', 'color' => '054', 'talla' => 'S', 'code' => '10303078054S'],\n ['modelo' => '078', 'color' => '063', 'talla' => 'L', 'code' => '10303078063L'],\n ['modelo' => '078', 'color' => '063', 'talla' => 'M', 'code' => '10303078063M'],\n ['modelo' => '078', 'color' => '063', 'talla' => 'S', 'code' => '10303078063S'],\n ['modelo' => '078', 'color' => '064', 'talla' => 'L', 'code' => '10303078064L'],\n ['modelo' => '078', 'color' => '064', 'talla' => 'M', 'code' => '10303078064M'],\n ['modelo' => '078', 'color' => '064', 'talla' => 'S', 'code' => '10303078064S'],\n ['modelo' => '078', 'color' => '065', 'talla' => 'L', 'code' => '10303078065L'],\n ['modelo' => '078', 'color' => '065', 'talla' => 'M', 'code' => '10303078065M'],\n ['modelo' => '078', 'color' => '065', 'talla' => 'S', 'code' => '10303078065S'],\n ['modelo' => '078', 'color' => '103', 'talla' => 'L', 'code' => '10303078103L'],\n ['modelo' => '078', 'color' => '103', 'talla' => 'M', 'code' => '10303078103M'],\n ['modelo' => '078', 'color' => '103', 'talla' => 'S', 'code' => '10303078103S'],\n ['modelo' => '078', 'color' => '248', 'talla' => 'L', 'code' => '10303078248L'],\n ['modelo' => '078', 'color' => '248', 'talla' => 'M', 'code' => '10303078248M'],\n ['modelo' => '078', 'color' => '248', 'talla' => 'S', 'code' => '10303078248S'],\n ['modelo' => '092', 'color' => '001', 'talla' => 'L', 'code' => '10208092001L'],\n ['modelo' => '092', 'color' => '001', 'talla' => 'M', 'code' => '10208092001M'],\n ['modelo' => '092', 'color' => '001', 'talla' => 'S', 'code' => '10208092001S'],\n ['modelo' => '092', 'color' => '002', 'talla' => 'L', 'code' => '10208092002L'],\n ['modelo' => '092', 'color' => '002', 'talla' => 'M', 'code' => '10208092002M'],\n ['modelo' => '092', 'color' => '002', 'talla' => 'S', 'code' => '10208092002S'],\n ['modelo' => '092', 'color' => '005', 'talla' => 'L', 'code' => '10208092005L'],\n ['modelo' => '092', 'color' => '007', 'talla' => 'L', 'code' => '10208092007L'],\n ['modelo' => '092', 'color' => '007', 'talla' => 'M', 'code' => '10208092007M'],\n ['modelo' => '092', 'color' => '007', 'talla' => 'S', 'code' => '10208092007S'],\n ['modelo' => '092', 'color' => '009', 'talla' => 'L', 'code' => '10208092009L'],\n ['modelo' => '092', 'color' => '009', 'talla' => 'M', 'code' => '10208092009M'],\n ['modelo' => '092', 'color' => '009', 'talla' => 'S', 'code' => '10208092009S'],\n ['modelo' => '092', 'color' => '024', 'talla' => 'L', 'code' => '10208092024L'],\n ['modelo' => '092', 'color' => '024', 'talla' => 'M', 'code' => '10208092024M'],\n ['modelo' => '092', 'color' => '024', 'talla' => 'S', 'code' => '10208092024S'],\n ['modelo' => '092', 'color' => '025', 'talla' => 'L', 'code' => '10208092025L'],\n ['modelo' => '092', 'color' => '054', 'talla' => 'L', 'code' => '10208092054L'],\n ['modelo' => '092', 'color' => '054', 'talla' => 'M', 'code' => '10208092054M'],\n ['modelo' => '092', 'color' => '054', 'talla' => 'S', 'code' => '10208092054S'],\n ['modelo' => '092', 'color' => '063', 'talla' => 'L', 'code' => '10208092063L'],\n ['modelo' => '092', 'color' => '063', 'talla' => 'M', 'code' => '10208092063M'],\n ['modelo' => '092', 'color' => '063', 'talla' => 'S', 'code' => '10208092063S'],\n ['modelo' => '092', 'color' => '064', 'talla' => 'L', 'code' => '10208092064L'],\n ['modelo' => '092', 'color' => '064', 'talla' => 'M', 'code' => '10208092064M'],\n ['modelo' => '092', 'color' => '064', 'talla' => 'S', 'code' => '10208092064S'],\n ['modelo' => '092', 'color' => '065', 'talla' => 'L', 'code' => '10208092065L'],\n ['modelo' => '092', 'color' => '065', 'talla' => 'M', 'code' => '10208092065M'],\n ['modelo' => '092', 'color' => '065', 'talla' => 'S', 'code' => '10208092065S'],\n ['modelo' => '092', 'color' => '248', 'talla' => 'L', 'code' => '10208092248L'],\n ['modelo' => '092', 'color' => '248', 'talla' => 'M', 'code' => '10208092248M'],\n ['modelo' => '092', 'color' => '248', 'talla' => 'S', 'code' => '10208092248S'],\n ['modelo' => '181', 'color' => '001', 'talla' => 'L', 'code' => '10250181001L'],\n ['modelo' => '181', 'color' => '001', 'talla' => 'M', 'code' => '10250181001M'],\n ['modelo' => '181', 'color' => '001', 'talla' => 'S', 'code' => '10250181001S'],\n ['modelo' => '181', 'color' => '002', 'talla' => 'L', 'code' => '10250181002L'],\n ['modelo' => '181', 'color' => '002', 'talla' => 'M', 'code' => '10250181002M'],\n ['modelo' => '181', 'color' => '002', 'talla' => 'S', 'code' => '10250181002S'],\n ['modelo' => '181', 'color' => '015', 'talla' => 'L', 'code' => '10250181015L'],\n ['modelo' => '181', 'color' => '015', 'talla' => 'M', 'code' => '10250181015M'],\n ['modelo' => '181', 'color' => '015', 'talla' => 'S', 'code' => '10250181015S'],\n ['modelo' => '181', 'color' => '063', 'talla' => 'L', 'code' => '10250181063L'],\n ['modelo' => '181', 'color' => '063', 'talla' => 'M', 'code' => '10250181063M'],\n ['modelo' => '181', 'color' => '063', 'talla' => 'S', 'code' => '10250181063S'],\n ['modelo' => '181', 'color' => '064', 'talla' => 'L', 'code' => '10250181064L'],\n ['modelo' => '181', 'color' => '064', 'talla' => 'M', 'code' => '10250181064M'],\n ['modelo' => '181', 'color' => '064', 'talla' => 'S', 'code' => '10250181064S'],\n ['modelo' => '181', 'color' => '065', 'talla' => 'L', 'code' => '10250181065L'],\n ['modelo' => '181', 'color' => '065', 'talla' => 'M', 'code' => '10250181065M'],\n ['modelo' => '181', 'color' => '065', 'talla' => 'S', 'code' => '10250181065S'],\n ['modelo' => '181', 'color' => '102', 'talla' => 'L', 'code' => '10250181102L'],\n ['modelo' => '181', 'color' => '102', 'talla' => 'M', 'code' => '10250181102M'],\n ['modelo' => '181', 'color' => '102', 'talla' => 'S', 'code' => '10250181102S'],\n ['modelo' => '181', 'color' => '208', 'talla' => 'L', 'code' => '10250181208L'],\n ['modelo' => '181', 'color' => '208', 'talla' => 'M', 'code' => '10250181208M'],\n ['modelo' => '181', 'color' => '208', 'talla' => 'S', 'code' => '10250181208S'],\n ['modelo' => '181', 'color' => '244', 'talla' => 'L', 'code' => '10250181244L'],\n ['modelo' => '181', 'color' => '244', 'talla' => 'M', 'code' => '10250181244M'],\n ['modelo' => '181', 'color' => '244', 'talla' => 'S', 'code' => '10250181244S'],\n ['modelo' => '181', 'color' => '248', 'talla' => 'L', 'code' => '10250181248L'],\n ['modelo' => '181', 'color' => '248', 'talla' => 'M', 'code' => '10250181248M'],\n ['modelo' => '181', 'color' => '248', 'talla' => 'S', 'code' => '10250181248S'],\n ['modelo' => '101', 'color' => '001', 'talla' => '32', 'code' => '1010910100132'],\n ['modelo' => '101', 'color' => '001', 'talla' => '34', 'code' => '1010910100134'],\n ['modelo' => '101', 'color' => '001', 'talla' => '36', 'code' => '1010910100136'],\n ['modelo' => '101', 'color' => '001', 'talla' => '38', 'code' => '1010910100138'],\n ['modelo' => '101', 'color' => '002', 'talla' => '32', 'code' => '1010910100232'],\n ['modelo' => '101', 'color' => '002', 'talla' => '34', 'code' => '1010910100234'],\n ['modelo' => '101', 'color' => '002', 'talla' => '36', 'code' => '1010910100236'],\n ['modelo' => '101', 'color' => '002', 'talla' => '38', 'code' => '1010910100238'],\n ['modelo' => '101', 'color' => '009', 'talla' => '32', 'code' => '1010910100932'],\n ['modelo' => '101', 'color' => '009', 'talla' => '34', 'code' => '1010910100934'],\n ['modelo' => '101', 'color' => '009', 'talla' => '36', 'code' => '1010910100936'],\n ['modelo' => '101', 'color' => '009', 'talla' => '38', 'code' => '1010910100938'],\n ['modelo' => '101', 'color' => '015', 'talla' => '32', 'code' => '1010910101532'],\n ['modelo' => '101', 'color' => '015', 'talla' => '34', 'code' => '1010910101534'],\n ['modelo' => '101', 'color' => '015', 'talla' => '36', 'code' => '1010910101536'],\n ['modelo' => '101', 'color' => '015', 'talla' => '38', 'code' => '1010910101538'],\n ['modelo' => '101', 'color' => '034', 'talla' => '32', 'code' => '1010910103432'],\n ['modelo' => '101', 'color' => '034', 'talla' => '34', 'code' => '1010910103434'],\n ['modelo' => '101', 'color' => '034', 'talla' => '36', 'code' => '1010910103436'],\n ['modelo' => '101', 'color' => '034', 'talla' => '38', 'code' => '1010910103438'],\n ['modelo' => '101', 'color' => '035', 'talla' => '32', 'code' => '1010910103532'],\n ['modelo' => '101', 'color' => '035', 'talla' => '34', 'code' => '1010910103534'],\n ['modelo' => '101', 'color' => '035', 'talla' => '36', 'code' => '1010910103536'],\n ['modelo' => '101', 'color' => '035', 'talla' => '38', 'code' => '1010910103538'],\n ['modelo' => '101', 'color' => '044', 'talla' => '32', 'code' => '1010910104432'],\n ['modelo' => '101', 'color' => '044', 'talla' => '34', 'code' => '1010910104434'],\n ['modelo' => '101', 'color' => '044', 'talla' => '36', 'code' => '1010910104436'],\n ['modelo' => '101', 'color' => '044', 'talla' => '38', 'code' => '1010910104438'],\n ['modelo' => '101', 'color' => '046', 'talla' => '32', 'code' => '1010910104632'],\n ['modelo' => '101', 'color' => '046', 'talla' => '34', 'code' => '1010910104634'],\n ['modelo' => '101', 'color' => '046', 'talla' => '36', 'code' => '1010910104636'],\n ['modelo' => '101', 'color' => '046', 'talla' => '38', 'code' => '1010910104638'],\n ['modelo' => '101', 'color' => '064', 'talla' => '32', 'code' => '1010910106432'],\n ['modelo' => '101', 'color' => '064', 'talla' => '34', 'code' => '1010910106434'],\n ['modelo' => '101', 'color' => '064', 'talla' => '36', 'code' => '1010910106436'],\n ['modelo' => '101', 'color' => '064', 'talla' => '38', 'code' => '1010910106438'],\n ['modelo' => '101', 'color' => '103', 'talla' => '32', 'code' => '1010910110332'],\n ['modelo' => '101', 'color' => '103', 'talla' => '34', 'code' => '1010910110334'],\n ['modelo' => '101', 'color' => '103', 'talla' => '36', 'code' => '1010910110336'],\n ['modelo' => '101', 'color' => '103', 'talla' => '38', 'code' => '1010910110338'],\n ['modelo' => '101', 'color' => '242', 'talla' => '32', 'code' => '1010910124232'],\n ['modelo' => '101', 'color' => '242', 'talla' => '34', 'code' => '1010910124234'],\n ['modelo' => '101', 'color' => '242', 'talla' => '36', 'code' => '1010910124236'],\n ['modelo' => '101', 'color' => '242', 'talla' => '38', 'code' => '1010910124238'],\n ['modelo' => '101', 'color' => '248', 'talla' => '32', 'code' => '1010910124832'],\n ['modelo' => '101', 'color' => '248', 'talla' => '34', 'code' => '1010910124834'],\n ['modelo' => '101', 'color' => '248', 'talla' => '36', 'code' => '1010910124836'],\n ['modelo' => '101', 'color' => '248', 'talla' => '38', 'code' => '1010910124838'],\n ['modelo' => '159', 'color' => '001', 'talla' => '34', 'code' => '1019115900134'],\n ['modelo' => '159', 'color' => '001', 'talla' => '36', 'code' => '1019115900136'],\n ['modelo' => '159', 'color' => '001', 'talla' => '38', 'code' => '1019115900138'],\n ['modelo' => '159', 'color' => '001', 'talla' => '40', 'code' => '1019115900140'],\n ['modelo' => '159', 'color' => '002', 'talla' => '34', 'code' => '1019115900234'],\n ['modelo' => '159', 'color' => '002', 'talla' => '36', 'code' => '1019115900236'],\n ['modelo' => '159', 'color' => '002', 'talla' => '38', 'code' => '1019115900238'],\n ['modelo' => '159', 'color' => '002', 'talla' => '40', 'code' => '1019115900240'],\n ['modelo' => '159', 'color' => '248', 'talla' => '34', 'code' => '1019115924834'],\n ['modelo' => '159', 'color' => '248', 'talla' => '36', 'code' => '1019115924836'],\n ['modelo' => '159', 'color' => '248', 'talla' => '38', 'code' => '1019115924838'],\n ['modelo' => '159', 'color' => '248', 'talla' => '40', 'code' => '1019115924840'],\n ['modelo' => '355', 'color' => '001', 'talla' => '32', 'code' => '1016735500132'],\n ['modelo' => '355', 'color' => '001', 'talla' => '34', 'code' => '1016735500134'],\n ['modelo' => '355', 'color' => '001', 'talla' => '36', 'code' => '1016735500136'],\n ['modelo' => '355', 'color' => '001', 'talla' => '38', 'code' => '1016735500138'],\n ['modelo' => '355', 'color' => '002', 'talla' => '32', 'code' => '1016735500232'],\n ['modelo' => '355', 'color' => '002', 'talla' => '34', 'code' => '1016735500234'],\n ['modelo' => '355', 'color' => '002', 'talla' => '36', 'code' => '1016735500236'],\n ['modelo' => '355', 'color' => '002', 'talla' => '38', 'code' => '1016735500238'],\n ['modelo' => '355', 'color' => '011', 'talla' => '32', 'code' => '1016735501132'],\n ['modelo' => '355', 'color' => '011', 'talla' => '34', 'code' => '1016735501134'],\n ['modelo' => '355', 'color' => '011', 'talla' => '36', 'code' => '1016735501136'],\n ['modelo' => '355', 'color' => '011', 'talla' => '38', 'code' => '1016735501138'],\n ['modelo' => '182', 'color' => '001', 'talla' => 'L', 'code' => '10550182001L'],\n ['modelo' => '182', 'color' => '001', 'talla' => 'M', 'code' => '10550182001M'],\n ['modelo' => '182', 'color' => '001', 'talla' => 'S', 'code' => '10550182001S'],\n ['modelo' => '182', 'color' => '002', 'talla' => 'L', 'code' => '10550182002L'],\n ['modelo' => '182', 'color' => '002', 'talla' => 'M', 'code' => '10550182002M'],\n ['modelo' => '182', 'color' => '002', 'talla' => 'S', 'code' => '10550182002S'],\n ['modelo' => '182', 'color' => '015', 'talla' => 'L', 'code' => '10550182015L'],\n ['modelo' => '182', 'color' => '015', 'talla' => 'M', 'code' => '10550182015M'],\n ['modelo' => '182', 'color' => '015', 'talla' => 'S', 'code' => '10550182015S'],\n ['modelo' => '182', 'color' => '065', 'talla' => 'L', 'code' => '10550182065L'],\n ['modelo' => '182', 'color' => '065', 'talla' => 'M', 'code' => '10550182065M'],\n ['modelo' => '182', 'color' => '065', 'talla' => 'S', 'code' => '10550182065S'],\n ['modelo' => '182', 'color' => '098', 'talla' => 'L', 'code' => '10550182098L'],\n ['modelo' => '182', 'color' => '098', 'talla' => 'M', 'code' => '10550182098M'],\n ['modelo' => '182', 'color' => '098', 'talla' => 'S', 'code' => '10550182098S'],\n ['modelo' => '182', 'color' => '099', 'talla' => 'L', 'code' => '10550182099L'],\n ['modelo' => '182', 'color' => '099', 'talla' => 'M', 'code' => '10550182099M'],\n ['modelo' => '182', 'color' => '099', 'talla' => 'S', 'code' => '10550182099S'],\n ['modelo' => '182', 'color' => '100', 'talla' => 'L', 'code' => '10550182100L'],\n ['modelo' => '182', 'color' => '100', 'talla' => 'M', 'code' => '10550182100M'],\n ['modelo' => '182', 'color' => '100', 'talla' => 'S', 'code' => '10550182100S'],\n ['modelo' => '182', 'color' => '101', 'talla' => 'L', 'code' => '10550182101L'],\n ['modelo' => '182', 'color' => '101', 'talla' => 'M', 'code' => '10550182101M'],\n ['modelo' => '182', 'color' => '101', 'talla' => 'S', 'code' => '10550182101S'],\n ['modelo' => '182', 'color' => '102', 'talla' => 'L', 'code' => '10550182102L'],\n ['modelo' => '182', 'color' => '102', 'talla' => 'M', 'code' => '10550182102M'],\n ['modelo' => '182', 'color' => '102', 'talla' => 'S', 'code' => '10550182102S'],\n ['modelo' => '182', 'color' => '248', 'talla' => 'L', 'code' => '10550182248L'],\n ['modelo' => '182', 'color' => '248', 'talla' => 'M', 'code' => '10550182248M'],\n ['modelo' => '182', 'color' => '248', 'talla' => 'S', 'code' => '10550182248S'],\n ['modelo' => '182', 'color' => '256', 'talla' => 'L', 'code' => '10550182256L'],\n ['modelo' => '182', 'color' => '256', 'talla' => 'M', 'code' => '10550182256M'],\n ['modelo' => '182', 'color' => '256', 'talla' => 'S', 'code' => '10550182256S'],\n ['modelo' => '182', 'color' => '288', 'talla' => 'L', 'code' => '10550182288L'],\n ['modelo' => '182', 'color' => '288', 'talla' => 'M', 'code' => '10550182288M'],\n ['modelo' => '182', 'color' => '288', 'talla' => 'S', 'code' => '10550182288S'],\n ['modelo' => '441', 'color' => '001', 'talla' => '36', 'code' => '1019144100136'],\n ['modelo' => '441', 'color' => '001', 'talla' => '38', 'code' => '1019144100138'],\n ['modelo' => '441', 'color' => '001', 'talla' => '40', 'code' => '1019144100140'],\n ['modelo' => '441', 'color' => '002', 'talla' => '36', 'code' => '1019144100236'],\n ['modelo' => '441', 'color' => '002', 'talla' => '38', 'code' => '1019144100238'],\n ['modelo' => '441', 'color' => '002', 'talla' => '40', 'code' => '1019144100240'],\n ['modelo' => '441', 'color' => '018', 'talla' => '36', 'code' => '1019144101836'],\n ['modelo' => '441', 'color' => '018', 'talla' => '38', 'code' => '1019144101838'],\n ['modelo' => '441', 'color' => '018', 'talla' => '40', 'code' => '1019144101840'],\n ['modelo' => '441', 'color' => '248', 'talla' => '36', 'code' => '1019144124836'],\n ['modelo' => '441', 'color' => '248', 'talla' => '38', 'code' => '1019144124838'],\n ['modelo' => '441', 'color' => '248', 'talla' => '40', 'code' => '1019144124840'],\n ['modelo' => '464', 'color' => '001', 'talla' => '34', 'code' => '1019646400134'],\n ['modelo' => '464', 'color' => '001', 'talla' => '36', 'code' => '1019646400136'],\n ['modelo' => '464', 'color' => '001', 'talla' => '38', 'code' => '1019646400138'],\n ['modelo' => '464', 'color' => '001', 'talla' => '40', 'code' => '1019646400140'],\n ['modelo' => '464', 'color' => '002', 'talla' => '34', 'code' => '1019646400234'],\n ['modelo' => '464', 'color' => '002', 'talla' => '36', 'code' => '1019646400236'],\n ['modelo' => '464', 'color' => '002', 'talla' => '38', 'code' => '1019646400238'],\n ['modelo' => '464', 'color' => '002', 'talla' => '40', 'code' => '1019646400240'],\n ['modelo' => '464', 'color' => '019', 'talla' => '34', 'code' => '1019646401934'],\n ['modelo' => '464', 'color' => '019', 'talla' => '36', 'code' => '1019646401936'],\n ['modelo' => '464', 'color' => '019', 'talla' => '38', 'code' => '1019646401938'],\n ['modelo' => '464', 'color' => '019', 'talla' => '40', 'code' => '1019646401940'],\n ['modelo' => '464', 'color' => '248', 'talla' => '34', 'code' => '1019646424834'],\n ['modelo' => '464', 'color' => '248', 'talla' => '36', 'code' => '1019646424836'],\n ['modelo' => '464', 'color' => '248', 'talla' => '38', 'code' => '1019646424838'],\n ['modelo' => '464', 'color' => '248', 'talla' => '40', 'code' => '1019646424840'],\n ['modelo' => '465', 'color' => '001', 'talla' => '32', 'code' => '1019146500132'],\n ['modelo' => '465', 'color' => '001', 'talla' => '34', 'code' => '1019146500134'],\n ['modelo' => '465', 'color' => '001', 'talla' => '36', 'code' => '1019146500136'],\n ['modelo' => '465', 'color' => '001', 'talla' => '38', 'code' => '1019146500138'],\n ['modelo' => '465', 'color' => '002', 'talla' => '32', 'code' => '1019146500232'],\n ['modelo' => '465', 'color' => '002', 'talla' => '34', 'code' => '1019146500234'],\n ['modelo' => '465', 'color' => '002', 'talla' => '36', 'code' => '1019146500236'],\n ['modelo' => '465', 'color' => '002', 'talla' => '38', 'code' => '1019146500238'],\n ['modelo' => '465', 'color' => '018', 'talla' => '32', 'code' => '1019146501832'],\n ['modelo' => '465', 'color' => '018', 'talla' => '34', 'code' => '1019146501834'],\n ['modelo' => '465', 'color' => '018', 'talla' => '36', 'code' => '1019146501836'],\n ['modelo' => '465', 'color' => '018', 'talla' => '38', 'code' => '1019146501838'],\n ['modelo' => '465', 'color' => '248', 'talla' => '32', 'code' => '1019146524832'],\n ['modelo' => '465', 'color' => '248', 'talla' => '34', 'code' => '1019146524834'],\n ['modelo' => '465', 'color' => '248', 'talla' => '36', 'code' => '1019146524836'],\n ['modelo' => '465', 'color' => '248', 'talla' => '38', 'code' => '1019146524838'],\n ['modelo' => '467', 'color' => '001', 'talla' => '32', 'code' => '1010346700132'],\n ['modelo' => '467', 'color' => '001', 'talla' => '34', 'code' => '1010346700134'],\n ['modelo' => '467', 'color' => '001', 'talla' => '36', 'code' => '1010346700136'],\n ['modelo' => '467', 'color' => '001', 'talla' => '38', 'code' => '1010346700138'],\n ['modelo' => '467', 'color' => '002', 'talla' => '32', 'code' => '1010346700232'],\n ['modelo' => '467', 'color' => '002', 'talla' => '34', 'code' => '1010346700234'],\n ['modelo' => '467', 'color' => '002', 'talla' => '36', 'code' => '1010346700236'],\n ['modelo' => '467', 'color' => '002', 'talla' => '38', 'code' => '1010346700238'],\n ['modelo' => '467', 'color' => '245', 'talla' => '32', 'code' => '1010346724532'],\n ['modelo' => '467', 'color' => '245', 'talla' => '34', 'code' => '1010346724534'],\n ['modelo' => '467', 'color' => '245', 'talla' => '36', 'code' => '1010346724536'],\n ['modelo' => '467', 'color' => '245', 'talla' => '38', 'code' => '1010346724538'],\n ['modelo' => '467', 'color' => '248', 'talla' => '32', 'code' => '1010346724832'],\n ['modelo' => '467', 'color' => '248', 'talla' => '34', 'code' => '1010346724834'],\n ['modelo' => '467', 'color' => '248', 'talla' => '36', 'code' => '1010346724836'],\n ['modelo' => '467', 'color' => '248', 'talla' => '38', 'code' => '1010346724838'],\n ['modelo' => '336', 'color' => '001', 'talla' => 'L', 'code' => '10550336001L'],\n ['modelo' => '336', 'color' => '001', 'talla' => 'M', 'code' => '10550336001M'],\n ['modelo' => '336', 'color' => '001', 'talla' => 'S', 'code' => '10550336001S'],\n ['modelo' => '336', 'color' => '002', 'talla' => 'L', 'code' => '10550336002L'],\n ['modelo' => '336', 'color' => '002', 'talla' => 'M', 'code' => '10550336002M'],\n ['modelo' => '336', 'color' => '002', 'talla' => 'S', 'code' => '10550336002S'],\n ['modelo' => '336', 'color' => '015', 'talla' => 'L', 'code' => '10550336015L'],\n ['modelo' => '336', 'color' => '015', 'talla' => 'M', 'code' => '10550336015M'],\n ['modelo' => '336', 'color' => '015', 'talla' => 'S', 'code' => '10550336015S'],\n ['modelo' => '336', 'color' => '245', 'talla' => 'L', 'code' => '10550336245L'],\n ['modelo' => '336', 'color' => '245', 'talla' => 'M', 'code' => '10550336245M'],\n ['modelo' => '336', 'color' => '245', 'talla' => 'S', 'code' => '10550336245S'],\n ['modelo' => '342', 'color' => '001', 'talla' => 'L', 'code' => '10203342001L'],\n ['modelo' => '342', 'color' => '001', 'talla' => 'M', 'code' => '10203342001M'],\n ['modelo' => '342', 'color' => '001', 'talla' => 'S', 'code' => '10203342001S'],\n ['modelo' => '342', 'color' => '002', 'talla' => 'L', 'code' => '10203342002L'],\n ['modelo' => '342', 'color' => '002', 'talla' => 'M', 'code' => '10203342002M'],\n ['modelo' => '342', 'color' => '002', 'talla' => 'S', 'code' => '10203342002S'],\n ['modelo' => '342', 'color' => '015', 'talla' => 'L', 'code' => '10203342015L'],\n ['modelo' => '342', 'color' => '015', 'talla' => 'M', 'code' => '10203342015M'],\n ['modelo' => '342', 'color' => '015', 'talla' => 'S', 'code' => '10203342015S'],\n ['modelo' => '342', 'color' => '082', 'talla' => 'L', 'code' => '10203342082L'],\n ['modelo' => '342', 'color' => '082', 'talla' => 'M', 'code' => '10203342082M'],\n ['modelo' => '342', 'color' => '082', 'talla' => 'S', 'code' => '10203342082S'],\n ['modelo' => '342', 'color' => '245', 'talla' => 'L', 'code' => '10203342245L'],\n ['modelo' => '342', 'color' => '245', 'talla' => 'M', 'code' => '10203342245M'],\n ['modelo' => '342', 'color' => '245', 'talla' => 'S', 'code' => '10203342245S'],\n ['modelo' => '342', 'color' => '248', 'talla' => 'L', 'code' => '10203342248L'],\n ['modelo' => '342', 'color' => '248', 'talla' => 'M', 'code' => '10203342248M'],\n ['modelo' => '342', 'color' => '248', 'talla' => 'S', 'code' => '10203342248S'],\n ['modelo' => '046', 'color' => '001', 'talla' => '34', 'code' => '1012104600134'],\n ['modelo' => '046', 'color' => '001', 'talla' => '36', 'code' => '1012104600136'],\n ['modelo' => '046', 'color' => '001', 'talla' => '38', 'code' => '1012104600138'],\n ['modelo' => '046', 'color' => '001', 'talla' => '40', 'code' => '1012104600140'],\n ['modelo' => '046', 'color' => '002', 'talla' => '34', 'code' => '1012104600234'],\n ['modelo' => '046', 'color' => '002', 'talla' => '36', 'code' => '1012104600236'],\n ['modelo' => '046', 'color' => '002', 'talla' => '38', 'code' => '1012104600238'],\n ['modelo' => '046', 'color' => '002', 'talla' => '40', 'code' => '1012104600240'],\n ['modelo' => '046', 'color' => '009', 'talla' => '34', 'code' => '1012104600934'],\n ['modelo' => '046', 'color' => '009', 'talla' => '36', 'code' => '1012104600936'],\n ['modelo' => '046', 'color' => '009', 'talla' => '38', 'code' => '1012104600938'],\n ['modelo' => '046', 'color' => '009', 'talla' => '40', 'code' => '1012104600940'],\n ['modelo' => '046', 'color' => '248', 'talla' => '34', 'code' => '1012104624834'],\n ['modelo' => '046', 'color' => '248', 'talla' => '36', 'code' => '1012104624836'],\n ['modelo' => '046', 'color' => '248', 'talla' => '38', 'code' => '1012104624838'],\n ['modelo' => '046', 'color' => '248', 'talla' => '40', 'code' => '1012104624840'],\n ['modelo' => '564', 'color' => '002', 'talla' => '34', 'code' => '1010356400234'],\n ['modelo' => '564', 'color' => '002', 'talla' => '36', 'code' => '1010356400236'],\n ['modelo' => '564', 'color' => '002', 'talla' => '38', 'code' => '1010356400238'],\n ['modelo' => '564', 'color' => '002', 'talla' => '40', 'code' => '1010356400240'],\n ['modelo' => '564', 'color' => '019', 'talla' => '34', 'code' => '1010356401934'],\n ['modelo' => '564', 'color' => '019', 'talla' => '36', 'code' => '1010356401936'],\n ['modelo' => '564', 'color' => '019', 'talla' => '38', 'code' => '1010356401938'],\n ['modelo' => '564', 'color' => '019', 'talla' => '40', 'code' => '1010356401940'],\n ['modelo' => '564', 'color' => '248', 'talla' => '34', 'code' => '1010356424834'],\n ['modelo' => '564', 'color' => '248', 'talla' => '36', 'code' => '1010356424836'],\n ['modelo' => '564', 'color' => '248', 'talla' => '38', 'code' => '1010356424838'],\n ['modelo' => '564', 'color' => '248', 'talla' => '40', 'code' => '1010356424840'],\n ['modelo' => '103', 'color' => '001', 'talla' => '32', 'code' => '1012210300132'],\n ['modelo' => '103', 'color' => '001', 'talla' => '34', 'code' => '1012210300134'],\n ['modelo' => '103', 'color' => '001', 'talla' => '36', 'code' => '1012210300136'],\n ['modelo' => '103', 'color' => '001', 'talla' => '38', 'code' => '1012210300138'],\n ['modelo' => '103', 'color' => '001', 'talla' => '40', 'code' => '1012210300140'],\n ['modelo' => '103', 'color' => '002', 'talla' => '32', 'code' => '1012210300232'],\n ['modelo' => '103', 'color' => '002', 'talla' => '34', 'code' => '1012210300234'],\n ['modelo' => '103', 'color' => '002', 'talla' => '36', 'code' => '1012210300236'],\n ['modelo' => '103', 'color' => '002', 'talla' => '38', 'code' => '1012210300238'],\n ['modelo' => '103', 'color' => '002', 'talla' => '40', 'code' => '1012210300240'],\n ['modelo' => '103', 'color' => '009', 'talla' => '32', 'code' => '1012210300932'],\n ['modelo' => '103', 'color' => '009', 'talla' => '34', 'code' => '1012210300934'],\n ['modelo' => '103', 'color' => '009', 'talla' => '36', 'code' => '1012210300936'],\n ['modelo' => '103', 'color' => '009', 'talla' => '38', 'code' => '1012210300938'],\n ['modelo' => '103', 'color' => '009', 'talla' => '40', 'code' => '1012210300940'],\n ['modelo' => '103', 'color' => '248', 'talla' => '32', 'code' => '1012210324832'],\n ['modelo' => '103', 'color' => '248', 'talla' => '34', 'code' => '1012210324834'],\n ['modelo' => '103', 'color' => '248', 'talla' => '36', 'code' => '1012210324836'],\n ['modelo' => '103', 'color' => '248', 'talla' => '38', 'code' => '1012210324838'],\n ['modelo' => '103', 'color' => '248', 'talla' => '40', 'code' => '1012210324840'],\n ['modelo' => '335', 'color' => '001', 'talla' => 'L', 'code' => '10208335001L'],\n ['modelo' => '335', 'color' => '001', 'talla' => 'M', 'code' => '10208335001M'],\n ['modelo' => '335', 'color' => '001', 'talla' => 'S', 'code' => '10208335001S'],\n ['modelo' => '335', 'color' => '002', 'talla' => 'L', 'code' => '10208335002L'],\n ['modelo' => '335', 'color' => '002', 'talla' => 'M', 'code' => '10208335002M'],\n ['modelo' => '335', 'color' => '002', 'talla' => 'S', 'code' => '10208335002S'],\n ['modelo' => '335', 'color' => '015', 'talla' => 'L', 'code' => '10208335015L'],\n ['modelo' => '335', 'color' => '015', 'talla' => 'M', 'code' => '10208335015M'],\n ['modelo' => '335', 'color' => '015', 'talla' => 'S', 'code' => '10208335015S'],\n ['modelo' => '335', 'color' => '245', 'talla' => 'L', 'code' => '10208335245L'],\n ['modelo' => '335', 'color' => '245', 'talla' => 'M', 'code' => '10208335245M'],\n ['modelo' => '335', 'color' => '245', 'talla' => 'S', 'code' => '10208335245S'],\n ['modelo' => '271', 'color' => '001', 'talla' => 'L', 'code' => '10243271001L'],\n ['modelo' => '271', 'color' => '001', 'talla' => 'M', 'code' => '10243271001M'],\n ['modelo' => '271', 'color' => '001', 'talla' => 'S', 'code' => '10243271001S'],\n ['modelo' => '271', 'color' => '002', 'talla' => 'L', 'code' => '10243271002L'],\n ['modelo' => '271', 'color' => '002', 'talla' => 'M', 'code' => '10243271002M'],\n ['modelo' => '271', 'color' => '002', 'talla' => 'S', 'code' => '10243271002S'],\n ['modelo' => '271', 'color' => '015', 'talla' => 'L', 'code' => '10243271015L'],\n ['modelo' => '271', 'color' => '015', 'talla' => 'M', 'code' => '10243271015M'],\n ['modelo' => '271', 'color' => '015', 'talla' => 'S', 'code' => '10243271015S'],\n ['modelo' => '271', 'color' => '018', 'talla' => 'L', 'code' => '10243271018L'],\n ['modelo' => '271', 'color' => '018', 'talla' => 'M', 'code' => '10243271018M'],\n ['modelo' => '271', 'color' => '018', 'talla' => 'S', 'code' => '10243271018S'],\n ['modelo' => '271', 'color' => '244', 'talla' => 'L', 'code' => '10243271244L'],\n ['modelo' => '271', 'color' => '244', 'talla' => 'M', 'code' => '10243271244M'],\n ['modelo' => '271', 'color' => '244', 'talla' => 'S', 'code' => '10243271244S'],\n ['modelo' => '271', 'color' => '245', 'talla' => 'L', 'code' => '10243271245L'],\n ['modelo' => '271', 'color' => '245', 'talla' => 'M', 'code' => '10243271245M'],\n ['modelo' => '271', 'color' => '245', 'talla' => 'S', 'code' => '10243271245S'],\n ['modelo' => '271', 'color' => '248', 'talla' => 'L', 'code' => '10243271248L'],\n ['modelo' => '271', 'color' => '248', 'talla' => 'M', 'code' => '10243271248M'],\n ['modelo' => '271', 'color' => '248', 'talla' => 'S', 'code' => '10243271248S'],\n ['modelo' => '436', 'color' => '001', 'talla' => 'L', 'code' => '10408436001L'],\n ['modelo' => '436', 'color' => '001', 'talla' => 'M', 'code' => '10408436001M'],\n ['modelo' => '436', 'color' => '001', 'talla' => 'S', 'code' => '10408436001S'],\n ['modelo' => '436', 'color' => '002', 'talla' => 'L', 'code' => '10408436002L'],\n ['modelo' => '436', 'color' => '002', 'talla' => 'M', 'code' => '10408436002M'],\n ['modelo' => '436', 'color' => '002', 'talla' => 'S', 'code' => '10408436002S'],\n ['modelo' => '436', 'color' => '015', 'talla' => 'L', 'code' => '10408436015L'],\n ['modelo' => '436', 'color' => '015', 'talla' => 'M', 'code' => '10408436015M'],\n ['modelo' => '436', 'color' => '015', 'talla' => 'S', 'code' => '10408436015S'],\n ['modelo' => '436', 'color' => '018', 'talla' => 'L', 'code' => '10408436018L'],\n ['modelo' => '436', 'color' => '018', 'talla' => 'M', 'code' => '10408436018M'],\n ['modelo' => '436', 'color' => '018', 'talla' => 'S', 'code' => '10408436018S'],\n ['modelo' => '436', 'color' => '248', 'talla' => 'L', 'code' => '10408436248L'],\n ['modelo' => '436', 'color' => '248', 'talla' => 'M', 'code' => '10408436248M'],\n ['modelo' => '436', 'color' => '248', 'talla' => 'S', 'code' => '10408436248S'],\n ['modelo' => '003', 'color' => '001', 'talla' => 'L', 'code' => '10350003001L'],\n ['modelo' => '003', 'color' => '001', 'talla' => 'M', 'code' => '10350003001M'],\n ['modelo' => '003', 'color' => '001', 'talla' => 'S', 'code' => '10350003001S'],\n ['modelo' => '003', 'color' => '002', 'talla' => 'L', 'code' => '10350003002L'],\n ['modelo' => '003', 'color' => '002', 'talla' => 'M', 'code' => '10350003002M'],\n ['modelo' => '003', 'color' => '002', 'talla' => 'S', 'code' => '10350003002S'],\n ['modelo' => '003', 'color' => '015', 'talla' => 'L', 'code' => '10350003015L'],\n ['modelo' => '003', 'color' => '015', 'talla' => 'M', 'code' => '10350003015M'],\n ['modelo' => '003', 'color' => '015', 'talla' => 'S', 'code' => '10350003015S'],\n ['modelo' => '003', 'color' => '063', 'talla' => 'L', 'code' => '10350003063L'],\n ['modelo' => '003', 'color' => '063', 'talla' => 'M', 'code' => '10350003063M'],\n ['modelo' => '003', 'color' => '063', 'talla' => 'S', 'code' => '10350003063S'],\n ['modelo' => '003', 'color' => '064', 'talla' => 'L', 'code' => '10350003064L'],\n ['modelo' => '003', 'color' => '064', 'talla' => 'M', 'code' => '10350003064M'],\n ['modelo' => '003', 'color' => '064', 'talla' => 'S', 'code' => '10350003064S'],\n ['modelo' => '003', 'color' => '065', 'talla' => 'L', 'code' => '10350003065L'],\n ['modelo' => '003', 'color' => '065', 'talla' => 'M', 'code' => '10350003065M'],\n ['modelo' => '003', 'color' => '065', 'talla' => 'S', 'code' => '10350003065S'],\n ['modelo' => '003', 'color' => '208', 'talla' => 'L', 'code' => '10350003208L'],\n ['modelo' => '003', 'color' => '208', 'talla' => 'M', 'code' => '10350003208M'],\n ['modelo' => '003', 'color' => '208', 'talla' => 'S', 'code' => '10350003208S'],\n ['modelo' => '003', 'color' => '244', 'talla' => 'L', 'code' => '10350003244L'],\n ['modelo' => '003', 'color' => '244', 'talla' => 'M', 'code' => '10350003244M'],\n ['modelo' => '003', 'color' => '244', 'talla' => 'S', 'code' => '10350003244S'],\n ['modelo' => '003', 'color' => '248', 'talla' => 'L', 'code' => '10350003248L'],\n ['modelo' => '003', 'color' => '248', 'talla' => 'M', 'code' => '10350003248M'],\n ['modelo' => '003', 'color' => '248', 'talla' => 'S', 'code' => '10350003248S'],\n ['modelo' => '141', 'color' => '001', 'talla' => 'L', 'code' => '10303141001L'],\n ['modelo' => '141', 'color' => '001', 'talla' => 'M', 'code' => '10303141001M'],\n ['modelo' => '141', 'color' => '001', 'talla' => 'S', 'code' => '10303141001S'],\n ['modelo' => '141', 'color' => '002', 'talla' => 'L', 'code' => '10303141002L'],\n ['modelo' => '141', 'color' => '002', 'talla' => 'M', 'code' => '10303141002M'],\n ['modelo' => '141', 'color' => '002', 'talla' => 'S', 'code' => '10303141002S'],\n ['modelo' => '141', 'color' => '007', 'talla' => 'L', 'code' => '10303141007L'],\n ['modelo' => '141', 'color' => '007', 'talla' => 'M', 'code' => '10303141007M'],\n ['modelo' => '141', 'color' => '007', 'talla' => 'S', 'code' => '10303141007S'],\n ['modelo' => '141', 'color' => '056', 'talla' => 'L', 'code' => '10303141056L'],\n ['modelo' => '141', 'color' => '056', 'talla' => 'M', 'code' => '10303141056M'],\n ['modelo' => '141', 'color' => '056', 'talla' => 'S', 'code' => '10303141056S'],\n ['modelo' => '141', 'color' => '082', 'talla' => 'L', 'code' => '10303141082L'],\n ['modelo' => '141', 'color' => '082', 'talla' => 'M', 'code' => '10303141082M'],\n ['modelo' => '141', 'color' => '082', 'talla' => 'S', 'code' => '10303141082S'],\n ['modelo' => '141', 'color' => '085', 'talla' => 'L', 'code' => '10303141085L'],\n ['modelo' => '141', 'color' => '085', 'talla' => 'M', 'code' => '10303141085M'],\n ['modelo' => '141', 'color' => '085', 'talla' => 'S', 'code' => '10303141085S'],\n ['modelo' => '141', 'color' => '097', 'talla' => 'L', 'code' => '10303141097L'],\n ['modelo' => '141', 'color' => '097', 'talla' => 'M', 'code' => '10303141097M'],\n ['modelo' => '141', 'color' => '097', 'talla' => 'S', 'code' => '10303141097S'],\n ['modelo' => '141', 'color' => '101', 'talla' => 'L', 'code' => '10303141101L'],\n ['modelo' => '141', 'color' => '101', 'talla' => 'M', 'code' => '10303141101M'],\n ['modelo' => '141', 'color' => '101', 'talla' => 'S', 'code' => '10303141101S'],\n ['modelo' => '141', 'color' => '172', 'talla' => 'L', 'code' => '10303141172L'],\n ['modelo' => '141', 'color' => '172', 'talla' => 'M', 'code' => '10303141172M'],\n ['modelo' => '141', 'color' => '172', 'talla' => 'S', 'code' => '10303141172S'],\n ['modelo' => '141', 'color' => '222', 'talla' => 'L', 'code' => '10303141222L'],\n ['modelo' => '141', 'color' => '222', 'talla' => 'M', 'code' => '10303141222M'],\n ['modelo' => '141', 'color' => '222', 'talla' => 'S', 'code' => '10303141222S'],\n ['modelo' => '141', 'color' => '256', 'talla' => 'L', 'code' => '10303141256L'],\n ['modelo' => '141', 'color' => '256', 'talla' => 'M', 'code' => '10303141256M'],\n ['modelo' => '141', 'color' => '256', 'talla' => 'S', 'code' => '10303141256S'],\n ['modelo' => '094', 'color' => '001', 'talla' => 'L', 'code' => '10343094001L'],\n ['modelo' => '094', 'color' => '001', 'talla' => 'M', 'code' => '10343094001M'],\n ['modelo' => '094', 'color' => '001', 'talla' => 'S', 'code' => '10343094001S'],\n ['modelo' => '094', 'color' => '002', 'talla' => 'L', 'code' => '10343094002L'],\n ['modelo' => '094', 'color' => '002', 'talla' => 'M', 'code' => '10343094002M'],\n ['modelo' => '094', 'color' => '002', 'talla' => 'S', 'code' => '10343094002S'],\n ['modelo' => '094', 'color' => '007', 'talla' => 'L', 'code' => '10343094007L'],\n ['modelo' => '094', 'color' => '007', 'talla' => 'M', 'code' => '10343094007M'],\n ['modelo' => '094', 'color' => '007', 'talla' => 'S', 'code' => '10343094007S'],\n ['modelo' => '094', 'color' => '054', 'talla' => 'L', 'code' => '10343094054L'],\n ['modelo' => '094', 'color' => '054', 'talla' => 'M', 'code' => '10343094054M'],\n ['modelo' => '094', 'color' => '054', 'talla' => 'S', 'code' => '10343094054S'],\n ['modelo' => '094', 'color' => '064', 'talla' => 'L', 'code' => '10343094064L'],\n ['modelo' => '094', 'color' => '064', 'talla' => 'M', 'code' => '10343094064M'],\n ['modelo' => '094', 'color' => '064', 'talla' => 'S', 'code' => '10343094064S'],\n ['modelo' => '094', 'color' => '065', 'talla' => 'L', 'code' => '10343094065L'],\n ['modelo' => '094', 'color' => '065', 'talla' => 'M', 'code' => '10343094065M'],\n ['modelo' => '094', 'color' => '065', 'talla' => 'S', 'code' => '10343094065S'],\n ['modelo' => '094', 'color' => '103', 'talla' => 'L', 'code' => '10343094103L'],\n ['modelo' => '094', 'color' => '103', 'talla' => 'M', 'code' => '10343094103M'],\n ['modelo' => '094', 'color' => '103', 'talla' => 'S', 'code' => '10343094103S'],\n ['modelo' => '094', 'color' => '248', 'talla' => 'L', 'code' => '10343094248L'],\n ['modelo' => '094', 'color' => '248', 'talla' => 'M', 'code' => '10343094248M'],\n ['modelo' => '094', 'color' => '248', 'talla' => 'S', 'code' => '10343094248S'],\n ['modelo' => '320', 'color' => '001', 'talla' => 'L', 'code' => '11443320001L'],\n ['modelo' => '320', 'color' => '001', 'talla' => 'M', 'code' => '11443320001M'],\n ['modelo' => '320', 'color' => '001', 'talla' => 'S', 'code' => '11443320001S'],\n ['modelo' => '320', 'color' => '002', 'talla' => 'L', 'code' => '11443320002L'],\n ['modelo' => '320', 'color' => '002', 'talla' => 'M', 'code' => '11443320002M'],\n ['modelo' => '320', 'color' => '002', 'talla' => 'S', 'code' => '11443320002S'],\n ['modelo' => '320', 'color' => '011', 'talla' => 'L', 'code' => '11443320011L'],\n ['modelo' => '320', 'color' => '011', 'talla' => 'M', 'code' => '11443320011M'],\n ['modelo' => '320', 'color' => '011', 'talla' => 'S', 'code' => '11443320011S'],\n ['modelo' => '320', 'color' => '015', 'talla' => 'L', 'code' => '11443320015L'],\n ['modelo' => '320', 'color' => '015', 'talla' => 'M', 'code' => '11443320015M'],\n ['modelo' => '320', 'color' => '015', 'talla' => 'S', 'code' => '11443320015S'],\n ['modelo' => '320', 'color' => '018', 'talla' => 'L', 'code' => '11443320018L'],\n ['modelo' => '320', 'color' => '018', 'talla' => 'M', 'code' => '11443320018M'],\n ['modelo' => '320', 'color' => '018', 'talla' => 'S', 'code' => '11443320018S'],\n ['modelo' => '320', 'color' => '244', 'talla' => 'L', 'code' => '11443320244L'],\n ['modelo' => '320', 'color' => '244', 'talla' => 'M', 'code' => '11443320244M'],\n ['modelo' => '320', 'color' => '244', 'talla' => 'S', 'code' => '11443320244S'],\n ['modelo' => '320', 'color' => '245', 'talla' => 'L', 'code' => '11443320245L'],\n ['modelo' => '320', 'color' => '245', 'talla' => 'M', 'code' => '11443320245M'],\n ['modelo' => '320', 'color' => '245', 'talla' => 'S', 'code' => '11443320245S'],\n ['modelo' => '113', 'color' => '001', 'talla' => 'L', 'code' => '10303113001L'],\n ['modelo' => '113', 'color' => '001', 'talla' => 'M', 'code' => '10303113001M'],\n ['modelo' => '113', 'color' => '001', 'talla' => 'S', 'code' => '10303113001S'],\n ['modelo' => '113', 'color' => '002', 'talla' => 'L', 'code' => '10303113002L'],\n ['modelo' => '113', 'color' => '002', 'talla' => 'M', 'code' => '10303113002M'],\n ['modelo' => '113', 'color' => '002', 'talla' => 'S', 'code' => '10303113002S'],\n ['modelo' => '113', 'color' => '009', 'talla' => 'L', 'code' => '10303113009L'],\n ['modelo' => '113', 'color' => '015', 'talla' => 'L', 'code' => '10303113015L'],\n ['modelo' => '113', 'color' => '015', 'talla' => 'M', 'code' => '10303113015M'],\n ['modelo' => '113', 'color' => '015', 'talla' => 'S', 'code' => '10303113015S'],\n ['modelo' => '113', 'color' => '024', 'talla' => 'L', 'code' => '10303113024L'],\n ['modelo' => '113', 'color' => '024', 'talla' => 'M', 'code' => '10303113024M'],\n ['modelo' => '113', 'color' => '024', 'talla' => 'S', 'code' => '10303113024S'],\n ['modelo' => '113', 'color' => '025', 'talla' => 'L', 'code' => '10303113025L'],\n ['modelo' => '113', 'color' => '025', 'talla' => 'M', 'code' => '10303113025M'],\n ['modelo' => '113', 'color' => '025', 'talla' => 'S', 'code' => '10303113025S'],\n ['modelo' => '113', 'color' => '034', 'talla' => 'L', 'code' => '10303113034L'],\n ['modelo' => '113', 'color' => '034', 'talla' => 'M', 'code' => '10303113034M'],\n ['modelo' => '113', 'color' => '034', 'talla' => 'S', 'code' => '10303113034S'],\n ['modelo' => '113', 'color' => '035', 'talla' => 'L', 'code' => '10303113035L'],\n ['modelo' => '113', 'color' => '035', 'talla' => 'M', 'code' => '10303113035M'],\n ['modelo' => '113', 'color' => '035', 'talla' => 'S', 'code' => '10303113035S'],\n ['modelo' => '113', 'color' => '054', 'talla' => 'L', 'code' => '10303113054L'],\n ['modelo' => '113', 'color' => '054', 'talla' => 'M', 'code' => '10303113054M'],\n ['modelo' => '113', 'color' => '054', 'talla' => 'S', 'code' => '10303113054S'],\n ['modelo' => '113', 'color' => '063', 'talla' => 'L', 'code' => '10303113063L'],\n ['modelo' => '113', 'color' => '063', 'talla' => 'M', 'code' => '10303113063M'],\n ['modelo' => '113', 'color' => '063', 'talla' => 'S', 'code' => '10303113063S'],\n ['modelo' => '113', 'color' => '064', 'talla' => 'L', 'code' => '10303113064L'],\n ['modelo' => '113', 'color' => '064', 'talla' => 'M', 'code' => '10303113064M'],\n ['modelo' => '113', 'color' => '064', 'talla' => 'S', 'code' => '10303113064S'],\n ['modelo' => '113', 'color' => '065', 'talla' => 'L', 'code' => '10303113065L'],\n ['modelo' => '113', 'color' => '065', 'talla' => 'M', 'code' => '10303113065M'],\n ['modelo' => '113', 'color' => '065', 'talla' => 'S', 'code' => '10303113065S'],\n ['modelo' => '113', 'color' => '067', 'talla' => 'L', 'code' => '10303113067L'],\n ['modelo' => '113', 'color' => '067', 'talla' => 'M', 'code' => '10303113067M'],\n ['modelo' => '113', 'color' => '067', 'talla' => 'S', 'code' => '10303113067S'],\n ['modelo' => '113', 'color' => '208', 'talla' => 'L', 'code' => '10303113208L'],\n ['modelo' => '113', 'color' => '208', 'talla' => 'M', 'code' => '10303113208M'],\n ['modelo' => '113', 'color' => '208', 'talla' => 'S', 'code' => '10303113208S'],\n ['modelo' => '113', 'color' => '222', 'talla' => 'L', 'code' => '10303113222L'],\n ['modelo' => '113', 'color' => '222', 'talla' => 'M', 'code' => '10303113222M'],\n ['modelo' => '113', 'color' => '222', 'talla' => 'S', 'code' => '10303113222S'],\n ['modelo' => '113', 'color' => '244', 'talla' => 'L', 'code' => '10303113244L'],\n ['modelo' => '113', 'color' => '244', 'talla' => 'M', 'code' => '10303113244M'],\n ['modelo' => '113', 'color' => '244', 'talla' => 'S', 'code' => '10303113244S'],\n ['modelo' => '113', 'color' => '248', 'talla' => 'L', 'code' => '10303113248L'],\n ['modelo' => '113', 'color' => '248', 'talla' => 'M', 'code' => '10303113248M'],\n ['modelo' => '113', 'color' => '248', 'talla' => 'S', 'code' => '10303113248S'],\n ['modelo' => '340', 'color' => '001', 'talla' => 'L', 'code' => '10703340001L'],\n ['modelo' => '340', 'color' => '001', 'talla' => 'M', 'code' => '10703340001M'],\n ['modelo' => '340', 'color' => '001', 'talla' => 'S', 'code' => '10703340001S'],\n ['modelo' => '340', 'color' => '001', 'talla' => 'XL', 'code' => '10703340001XL'],\n ['modelo' => '340', 'color' => '002', 'talla' => 'L', 'code' => '10703340002L'],\n ['modelo' => '340', 'color' => '002', 'talla' => 'M', 'code' => '10703340002M'],\n ['modelo' => '340', 'color' => '002', 'talla' => 'S', 'code' => '10703340002S'],\n ['modelo' => '340', 'color' => '002', 'talla' => 'XL', 'code' => '10703340002XL'],\n ['modelo' => '340', 'color' => '015', 'talla' => 'L', 'code' => '10703340015L'],\n ['modelo' => '340', 'color' => '015', 'talla' => 'M', 'code' => '10703340015M'],\n ['modelo' => '340', 'color' => '015', 'talla' => 'S', 'code' => '10703340015S'],\n ['modelo' => '340', 'color' => '015', 'talla' => 'XL', 'code' => '10703340015XL'],\n ['modelo' => '340', 'color' => '248', 'talla' => 'L', 'code' => '10703340248L'],\n ['modelo' => '340', 'color' => '248', 'talla' => 'M', 'code' => '10703340248M'],\n ['modelo' => '340', 'color' => '248', 'talla' => 'S', 'code' => '10703340248S'],\n ['modelo' => '340', 'color' => '248', 'talla' => 'XL', 'code' => '10703340248XL'],\n ['modelo' => '340', 'color' => '335', 'talla' => 'L', 'code' => '10703340335L'],\n ['modelo' => '340', 'color' => '335', 'talla' => 'M', 'code' => '10703340335M'],\n ['modelo' => '340', 'color' => '335', 'talla' => 'S', 'code' => '10703340335S'],\n ['modelo' => '340', 'color' => '335', 'talla' => 'XL', 'code' => '10703340335XL'],\n ['modelo' => '406', 'color' => '318', 'talla' => 'L', 'code' => '11403406318L'],\n ['modelo' => '406', 'color' => '318', 'talla' => 'M', 'code' => '11403406318M'],\n ['modelo' => '406', 'color' => '318', 'talla' => 'S', 'code' => '11403406318S'],\n ['modelo' => '406', 'color' => '319', 'talla' => 'L', 'code' => '11403406319L'],\n ['modelo' => '406', 'color' => '319', 'talla' => 'M', 'code' => '11403406319M'],\n ['modelo' => '406', 'color' => '319', 'talla' => 'S', 'code' => '11403406319S'],\n ['modelo' => '406', 'color' => '321', 'talla' => 'L', 'code' => '11403406321L'],\n ['modelo' => '406', 'color' => '321', 'talla' => 'M', 'code' => '11403406321M'],\n ['modelo' => '406', 'color' => '321', 'talla' => 'S', 'code' => '11403406321S'],\n ['modelo' => '406', 'color' => '330', 'talla' => 'L', 'code' => '11403406330L'],\n ['modelo' => '406', 'color' => '330', 'talla' => 'M', 'code' => '11403406330M'],\n ['modelo' => '406', 'color' => '330', 'talla' => 'S', 'code' => '11403406330S'],\n ['modelo' => '406', 'color' => '331', 'talla' => 'L', 'code' => '11403406331L'],\n ['modelo' => '406', 'color' => '331', 'talla' => 'M', 'code' => '11403406331M'],\n ['modelo' => '406', 'color' => '331', 'talla' => 'S', 'code' => '11403406331S'],\n ['modelo' => '407', 'color' => '318', 'talla' => 'L', 'code' => '10503407318L'],\n ['modelo' => '407', 'color' => '318', 'talla' => 'M', 'code' => '10503407318M'],\n ['modelo' => '407', 'color' => '318', 'talla' => 'S', 'code' => '10503407318S'],\n ['modelo' => '407', 'color' => '319', 'talla' => 'L', 'code' => '10503407319L'],\n ['modelo' => '407', 'color' => '319', 'talla' => 'M', 'code' => '10503407319M'],\n ['modelo' => '407', 'color' => '319', 'talla' => 'S', 'code' => '10503407319S'],\n ['modelo' => '407', 'color' => '321', 'talla' => 'L', 'code' => '10503407321L'],\n ['modelo' => '407', 'color' => '321', 'talla' => 'M', 'code' => '10503407321M'],\n ['modelo' => '407', 'color' => '321', 'talla' => 'S', 'code' => '10503407321S'],\n ['modelo' => '407', 'color' => '330', 'talla' => 'L', 'code' => '10503407330L'],\n ['modelo' => '407', 'color' => '330', 'talla' => 'M', 'code' => '10503407330M'],\n ['modelo' => '407', 'color' => '330', 'talla' => 'S', 'code' => '10503407330S'],\n ['modelo' => '407', 'color' => '331', 'talla' => 'L', 'code' => '10503407331L'],\n ['modelo' => '407', 'color' => '331', 'talla' => 'M', 'code' => '10503407331M'],\n ['modelo' => '407', 'color' => '331', 'talla' => 'S', 'code' => '10503407331S'],\n ['modelo' => '421', 'color' => '318', 'talla' => 'L', 'code' => '10203421318L'],\n ['modelo' => '421', 'color' => '318', 'talla' => 'M', 'code' => '10203421318M'],\n ['modelo' => '421', 'color' => '318', 'talla' => 'S', 'code' => '10203421318S'],\n ['modelo' => '421', 'color' => '319', 'talla' => 'L', 'code' => '10203421319L'],\n ['modelo' => '421', 'color' => '319', 'talla' => 'M', 'code' => '10203421319M'],\n ['modelo' => '421', 'color' => '319', 'talla' => 'S', 'code' => '10203421319S'],\n ['modelo' => '421', 'color' => '321', 'talla' => 'L', 'code' => '10203421321L'],\n ['modelo' => '421', 'color' => '321', 'talla' => 'M', 'code' => '10203421321M'],\n ['modelo' => '421', 'color' => '321', 'talla' => 'S', 'code' => '10203421321S'],\n ['modelo' => '421', 'color' => '330', 'talla' => 'L', 'code' => '10203421330L'],\n ['modelo' => '421', 'color' => '330', 'talla' => 'M', 'code' => '10203421330M'],\n ['modelo' => '421', 'color' => '330', 'talla' => 'S', 'code' => '10203421330S'],\n ['modelo' => '421', 'color' => '331', 'talla' => 'L', 'code' => '10203421331L'],\n ['modelo' => '421', 'color' => '331', 'talla' => 'M', 'code' => '10203421331M'],\n ['modelo' => '421', 'color' => '331', 'talla' => 'S', 'code' => '10203421331S'],\n ['modelo' => '437', 'color' => '001', 'talla' => 'L', 'code' => '10503437001L'],\n ['modelo' => '437', 'color' => '001', 'talla' => 'M', 'code' => '10503437001M'],\n ['modelo' => '437', 'color' => '001', 'talla' => 'S', 'code' => '10503437001S'],\n ['modelo' => '437', 'color' => '002', 'talla' => 'L', 'code' => '10503437002L'],\n ['modelo' => '437', 'color' => '002', 'talla' => 'M', 'code' => '10503437002M'],\n ['modelo' => '437', 'color' => '002', 'talla' => 'S', 'code' => '10503437002S'],\n ['modelo' => '437', 'color' => '190', 'talla' => 'L', 'code' => '10503437190L'],\n ['modelo' => '437', 'color' => '190', 'talla' => 'M', 'code' => '10503437190M'],\n ['modelo' => '437', 'color' => '190', 'talla' => 'S', 'code' => '10503437190S'],\n ['modelo' => '437', 'color' => '245', 'talla' => 'L', 'code' => '10503437245L'],\n ['modelo' => '437', 'color' => '245', 'talla' => 'M', 'code' => '10503437245M'],\n ['modelo' => '437', 'color' => '245', 'talla' => 'S', 'code' => '10503437245S'],\n ['modelo' => '051', 'color' => '001', 'talla' => 'L', 'code' => '10387051001L'],\n ['modelo' => '051', 'color' => '001', 'talla' => 'M', 'code' => '10387051001M'],\n ['modelo' => '051', 'color' => '001', 'talla' => 'S', 'code' => '10387051001S'],\n ['modelo' => '051', 'color' => '002', 'talla' => 'L', 'code' => '10387051002L'],\n ['modelo' => '051', 'color' => '002', 'talla' => 'M', 'code' => '10387051002M'],\n ['modelo' => '051', 'color' => '002', 'talla' => 'S', 'code' => '10387051002S'],\n ['modelo' => '051', 'color' => '006', 'talla' => 'L', 'code' => '10387051006L'],\n ['modelo' => '051', 'color' => '006', 'talla' => 'M', 'code' => '10387051006M'],\n ['modelo' => '051', 'color' => '006', 'talla' => 'S', 'code' => '10387051006S'],\n ['modelo' => '051', 'color' => '015', 'talla' => 'L', 'code' => '10387051015L'],\n ['modelo' => '051', 'color' => '015', 'talla' => 'M', 'code' => '10387051015M'],\n ['modelo' => '051', 'color' => '015', 'talla' => 'S', 'code' => '10387051015S'],\n ['modelo' => '051', 'color' => '248', 'talla' => 'L', 'code' => '10387051248L'],\n ['modelo' => '051', 'color' => '248', 'talla' => 'M', 'code' => '10387051248M'],\n ['modelo' => '051', 'color' => '248', 'talla' => 'S', 'code' => '10387051248S'],\n ['modelo' => '486', 'color' => '001', 'talla' => 'L', 'code' => '10303486001L'],\n ['modelo' => '486', 'color' => '001', 'talla' => 'M', 'code' => '10303486001M'],\n ['modelo' => '486', 'color' => '001', 'talla' => 'S', 'code' => '10303486001S'],\n ['modelo' => '486', 'color' => '001', 'talla' => 'XL', 'code' => '10303486001XL'],\n ['modelo' => '486', 'color' => '002', 'talla' => 'L', 'code' => '10303486002L'],\n ['modelo' => '486', 'color' => '002', 'talla' => 'M', 'code' => '10303486002M'],\n ['modelo' => '486', 'color' => '002', 'talla' => 'S', 'code' => '10303486002S'],\n ['modelo' => '486', 'color' => '002', 'talla' => 'XL', 'code' => '10303486002XL'],\n ['modelo' => '486', 'color' => '018', 'talla' => 'L', 'code' => '10303486018L'],\n ['modelo' => '486', 'color' => '018', 'talla' => 'M', 'code' => '10303486018M'],\n ['modelo' => '486', 'color' => '018', 'talla' => 'S', 'code' => '10303486018S'],\n ['modelo' => '486', 'color' => '018', 'talla' => 'XL', 'code' => '10303486018XL'],\n ['modelo' => '486', 'color' => '019', 'talla' => 'L', 'code' => '10303486019L'],\n ['modelo' => '486', 'color' => '019', 'talla' => 'M', 'code' => '10303486019M'],\n ['modelo' => '486', 'color' => '019', 'talla' => 'S', 'code' => '10303486019S'],\n ['modelo' => '486', 'color' => '019', 'talla' => 'XL', 'code' => '10303486019XL'],\n ['modelo' => '486', 'color' => '245', 'talla' => 'L', 'code' => '10303486245L'],\n ['modelo' => '486', 'color' => '245', 'talla' => 'M', 'code' => '10303486245M'],\n ['modelo' => '486', 'color' => '245', 'talla' => 'S', 'code' => '10303486245S'],\n ['modelo' => '486', 'color' => '245', 'talla' => 'XL', 'code' => '10303486245XL'],\n ['modelo' => '486', 'color' => '248', 'talla' => 'L', 'code' => '10303486248L'],\n ['modelo' => '486', 'color' => '248', 'talla' => 'M', 'code' => '10303486248M'],\n ['modelo' => '486', 'color' => '248', 'talla' => 'S', 'code' => '10303486248S'],\n ['modelo' => '486', 'color' => '248', 'talla' => 'XL', 'code' => '10303486248XL'],\n ['modelo' => '006', 'color' => '001', 'talla' => 'L', 'code' => '10403006001L'],\n ['modelo' => '006', 'color' => '001', 'talla' => 'M', 'code' => '10403006001M'],\n ['modelo' => '006', 'color' => '001', 'talla' => 'S', 'code' => '10403006001S'],\n ['modelo' => '006', 'color' => '002', 'talla' => 'L', 'code' => '10403006002L'],\n ['modelo' => '006', 'color' => '002', 'talla' => 'M', 'code' => '10403006002M'],\n ['modelo' => '006', 'color' => '002', 'talla' => 'S', 'code' => '10403006002S'],\n ['modelo' => '006', 'color' => '004', 'talla' => 'L', 'code' => '10403006004L'],\n ['modelo' => '006', 'color' => '004', 'talla' => 'M', 'code' => '10403006004M'],\n ['modelo' => '006', 'color' => '004', 'talla' => 'S', 'code' => '10403006004S'],\n ['modelo' => '006', 'color' => '006', 'talla' => 'L', 'code' => '10403006006L'],\n ['modelo' => '006', 'color' => '006', 'talla' => 'M', 'code' => '10403006006M'],\n ['modelo' => '006', 'color' => '006', 'talla' => 'S', 'code' => '10403006006S'],\n ['modelo' => '006', 'color' => '007', 'talla' => 'L', 'code' => '10403006007L'],\n ['modelo' => '006', 'color' => '007', 'talla' => 'M', 'code' => '10403006007M'],\n ['modelo' => '006', 'color' => '007', 'talla' => 'S', 'code' => '10403006007S'],\n ['modelo' => '006', 'color' => '009', 'talla' => 'L', 'code' => '10403006009L'],\n ['modelo' => '006', 'color' => '009', 'talla' => 'M', 'code' => '10403006009M'],\n ['modelo' => '006', 'color' => '009', 'talla' => 'S', 'code' => '10403006009S'],\n ['modelo' => '006', 'color' => '015', 'talla' => 'L', 'code' => '10403006015L'],\n ['modelo' => '006', 'color' => '015', 'talla' => 'M', 'code' => '10403006015M'],\n ['modelo' => '006', 'color' => '015', 'talla' => 'S', 'code' => '10403006015S'],\n ['modelo' => '006', 'color' => '054', 'talla' => 'L', 'code' => '10403006054L'],\n ['modelo' => '006', 'color' => '054', 'talla' => 'M', 'code' => '10403006054M'],\n ['modelo' => '006', 'color' => '054', 'talla' => 'S', 'code' => '10403006054S'],\n ['modelo' => '006', 'color' => '065', 'talla' => 'L', 'code' => '10403006065L'],\n ['modelo' => '006', 'color' => '065', 'talla' => 'M', 'code' => '10403006065M'],\n ['modelo' => '006', 'color' => '065', 'talla' => 'S', 'code' => '10403006065S'],\n ['modelo' => '006', 'color' => '103', 'talla' => 'L', 'code' => '10403006103L'],\n ['modelo' => '006', 'color' => '103', 'talla' => 'M', 'code' => '10403006103M'],\n ['modelo' => '006', 'color' => '103', 'talla' => 'S', 'code' => '10403006103S'],\n ['modelo' => '006', 'color' => '167', 'talla' => 'L', 'code' => '10403006167L'],\n ['modelo' => '006', 'color' => '167', 'talla' => 'M', 'code' => '10403006167M'],\n ['modelo' => '006', 'color' => '167', 'talla' => 'S', 'code' => '10403006167S'],\n ['modelo' => '006', 'color' => '208', 'talla' => 'L', 'code' => '10403006208L'],\n ['modelo' => '006', 'color' => '208', 'talla' => 'M', 'code' => '10403006208M'],\n ['modelo' => '006', 'color' => '208', 'talla' => 'S', 'code' => '10403006208S'],\n ['modelo' => '006', 'color' => '248', 'talla' => 'L', 'code' => '10403006248L'],\n ['modelo' => '006', 'color' => '248', 'talla' => 'M', 'code' => '10403006248M'],\n ['modelo' => '006', 'color' => '248', 'talla' => 'S', 'code' => '10403006248S'],\n ['modelo' => '501', 'color' => '048', 'talla' => 'L', 'code' => '10303501048L'],\n ['modelo' => '501', 'color' => '048', 'talla' => 'M', 'code' => '10303501048M'],\n ['modelo' => '501', 'color' => '048', 'talla' => 'S', 'code' => '10303501048S'],\n ['modelo' => '501', 'color' => '074', 'talla' => 'L', 'code' => '10303501074L'],\n ['modelo' => '501', 'color' => '074', 'talla' => 'M', 'code' => '10303501074M'],\n ['modelo' => '501', 'color' => '074', 'talla' => 'S', 'code' => '10303501074S'],\n ['modelo' => '501', 'color' => '356', 'talla' => 'L', 'code' => '10303501356L'],\n ['modelo' => '501', 'color' => '356', 'talla' => 'M', 'code' => '10303501356M'],\n ['modelo' => '501', 'color' => '356', 'talla' => 'S', 'code' => '10303501356S'],\n ['modelo' => '501', 'color' => '357', 'talla' => 'L', 'code' => '10303501357L'],\n ['modelo' => '501', 'color' => '357', 'talla' => 'M', 'code' => '10303501357M'],\n ['modelo' => '501', 'color' => '357', 'talla' => 'S', 'code' => '10303501357S'],\n ['modelo' => '287', 'color' => '002', 'talla' => '32', 'code' => '1189828700232'],\n ['modelo' => '287', 'color' => '002', 'talla' => '34', 'code' => '1189828700234'],\n ['modelo' => '287', 'color' => '002', 'talla' => '36', 'code' => '1189828700236'],\n ['modelo' => '287', 'color' => '002', 'talla' => '38', 'code' => '1189828700238'],\n ['modelo' => '287', 'color' => '009', 'talla' => '32', 'code' => '1189828700932'],\n ['modelo' => '287', 'color' => '009', 'talla' => '34', 'code' => '1189828700934'],\n ['modelo' => '287', 'color' => '009', 'talla' => '36', 'code' => '1189828700936'],\n ['modelo' => '287', 'color' => '009', 'talla' => '38', 'code' => '1189828700938'],\n ['modelo' => '287', 'color' => '015', 'talla' => '32', 'code' => '1189828701532'],\n ['modelo' => '287', 'color' => '015', 'talla' => '34', 'code' => '1189828701534'],\n ['modelo' => '287', 'color' => '015', 'talla' => '36', 'code' => '1189828701536'],\n ['modelo' => '287', 'color' => '015', 'talla' => '38', 'code' => '1189828701538'],\n ['modelo' => '287', 'color' => '171', 'talla' => '32', 'code' => '1189828717132'],\n ['modelo' => '287', 'color' => '171', 'talla' => '34', 'code' => '1189828717134'],\n ['modelo' => '287', 'color' => '171', 'talla' => '36', 'code' => '1189828717136'],\n ['modelo' => '287', 'color' => '171', 'talla' => '38', 'code' => '1189828717138'],\n ['modelo' => '428', 'color' => '002', 'talla' => '34', 'code' => '1187142800234'],\n ['modelo' => '428', 'color' => '002', 'talla' => '36', 'code' => '1187142800236'],\n ['modelo' => '428', 'color' => '002', 'talla' => '38', 'code' => '1187142800238'],\n ['modelo' => '428', 'color' => '015', 'talla' => '34', 'code' => '1187142801534'],\n ['modelo' => '428', 'color' => '015', 'talla' => '36', 'code' => '1187142801536'],\n ['modelo' => '428', 'color' => '015', 'talla' => '38', 'code' => '1187142801538'],\n ['modelo' => '428', 'color' => '018', 'talla' => '34', 'code' => '1187142801834'],\n ['modelo' => '428', 'color' => '018', 'talla' => '36', 'code' => '1187142801836'],\n ['modelo' => '428', 'color' => '018', 'talla' => '38', 'code' => '1187142801838'],\n ['modelo' => '360', 'color' => '002', 'talla' => '34', 'code' => '1184636000234'],\n ['modelo' => '360', 'color' => '002', 'talla' => '36', 'code' => '1184636000236'],\n ['modelo' => '360', 'color' => '002', 'talla' => '38', 'code' => '1184636000238'],\n ['modelo' => '360', 'color' => '015', 'talla' => '34', 'code' => '1184636001534'],\n ['modelo' => '360', 'color' => '015', 'talla' => '36', 'code' => '1184636001536'],\n ['modelo' => '360', 'color' => '015', 'talla' => '38', 'code' => '1184636001538'],\n ['modelo' => '361', 'color' => '001', 'talla' => '34', 'code' => '1189136100134'],\n ['modelo' => '361', 'color' => '001', 'talla' => '36', 'code' => '1189136100136'],\n ['modelo' => '361', 'color' => '001', 'talla' => '38', 'code' => '1189136100138'],\n ['modelo' => '361', 'color' => '015', 'talla' => '34', 'code' => '1189136101534'],\n ['modelo' => '361', 'color' => '015', 'talla' => '36', 'code' => '1189136101536'],\n ['modelo' => '361', 'color' => '015', 'talla' => '38', 'code' => '1189136101538'],\n ['modelo' => '361', 'color' => '067', 'talla' => '34', 'code' => '1189136106734'],\n ['modelo' => '361', 'color' => '067', 'talla' => '36', 'code' => '1189136106736'],\n ['modelo' => '361', 'color' => '067', 'talla' => '38', 'code' => '1189136106738'],\n ['modelo' => '362', 'color' => '001', 'talla' => '32', 'code' => '1189836200132'],\n ['modelo' => '362', 'color' => '001', 'talla' => '34', 'code' => '1189836200134'],\n ['modelo' => '362', 'color' => '001', 'talla' => '36', 'code' => '1189836200136'],\n ['modelo' => '362', 'color' => '001', 'talla' => '38', 'code' => '1189836200138'],\n ['modelo' => '362', 'color' => '002', 'talla' => '32', 'code' => '1189836200232'],\n ['modelo' => '362', 'color' => '002', 'talla' => '34', 'code' => '1189836200234'],\n ['modelo' => '362', 'color' => '002', 'talla' => '36', 'code' => '1189836200236'],\n ['modelo' => '362', 'color' => '002', 'talla' => '38', 'code' => '1189836200238'],\n ['modelo' => '362', 'color' => '015', 'talla' => '32', 'code' => '1189836201532'],\n ['modelo' => '362', 'color' => '015', 'talla' => '34', 'code' => '1189836201534'],\n ['modelo' => '362', 'color' => '015', 'talla' => '36', 'code' => '1189836201536'],\n ['modelo' => '362', 'color' => '015', 'talla' => '38', 'code' => '1189836201538'],\n ['modelo' => '566', 'color' => '002', 'talla' => '34', 'code' => '1189856600234'],\n ['modelo' => '566', 'color' => '002', 'talla' => '36', 'code' => '1189856600236'],\n ['modelo' => '566', 'color' => '002', 'talla' => '38', 'code' => '1189856600238'],\n ['modelo' => '566', 'color' => '015', 'talla' => '34', 'code' => '1189856601534'],\n ['modelo' => '566', 'color' => '015', 'talla' => '36', 'code' => '1189856601536'],\n ['modelo' => '566', 'color' => '015', 'talla' => '38', 'code' => '1189856601538'],\n ['modelo' => '566', 'color' => '374', 'talla' => '34', 'code' => '1189856637434'],\n ['modelo' => '566', 'color' => '374', 'talla' => '36', 'code' => '1189856637436'],\n ['modelo' => '566', 'color' => '374', 'talla' => '38', 'code' => '1189856637438'],\n ['modelo' => '197', 'color' => '001', 'talla' => '34', 'code' => '1015919700134'],\n ['modelo' => '197', 'color' => '001', 'talla' => '36', 'code' => '1015919700136'],\n ['modelo' => '197', 'color' => '001', 'talla' => '38', 'code' => '1015919700138'],\n ['modelo' => '197', 'color' => '001', 'talla' => '40', 'code' => '1015919700140'],\n ['modelo' => '197', 'color' => '002', 'talla' => '34', 'code' => '1015919700234'],\n ['modelo' => '197', 'color' => '002', 'talla' => '36', 'code' => '1015919700236'],\n ['modelo' => '197', 'color' => '002', 'talla' => '38', 'code' => '1015919700238'],\n ['modelo' => '197', 'color' => '002', 'talla' => '40', 'code' => '1015919700240'],\n ['modelo' => '197', 'color' => '009', 'talla' => '34', 'code' => '1015919700934'],\n ['modelo' => '197', 'color' => '009', 'talla' => '36', 'code' => '1015919700936'],\n ['modelo' => '197', 'color' => '009', 'talla' => '38', 'code' => '1015919700938'],\n ['modelo' => '197', 'color' => '009', 'talla' => '40', 'code' => '1015919700940'],\n ['modelo' => '197', 'color' => '248', 'talla' => '34', 'code' => '1015919724834'],\n ['modelo' => '197', 'color' => '248', 'talla' => '36', 'code' => '1015919724836'],\n ['modelo' => '197', 'color' => '248', 'talla' => '38', 'code' => '1015919724838'],\n ['modelo' => '197', 'color' => '248', 'talla' => '40', 'code' => '1015919724840'],\n ['modelo' => '565', 'color' => '002', 'talla' => '34', 'code' => '1019856500234'],\n ['modelo' => '565', 'color' => '002', 'talla' => '36', 'code' => '1019856500236'],\n ['modelo' => '565', 'color' => '002', 'talla' => '38', 'code' => '1019856500238'],\n ['modelo' => '565', 'color' => '002', 'talla' => '40', 'code' => '1019856500240'],\n ['modelo' => '565', 'color' => '372', 'talla' => '34', 'code' => '1019856537234'],\n ['modelo' => '565', 'color' => '372', 'talla' => '36', 'code' => '1019856537236'],\n ['modelo' => '565', 'color' => '372', 'talla' => '38', 'code' => '1019856537238'],\n ['modelo' => '565', 'color' => '372', 'talla' => '40', 'code' => '1019856537240'],\n ['modelo' => '565', 'color' => '373', 'talla' => '34', 'code' => '1019856537334'],\n ['modelo' => '565', 'color' => '373', 'talla' => '36', 'code' => '1019856537336'],\n ['modelo' => '565', 'color' => '373', 'talla' => '38', 'code' => '1019856537338'],\n ['modelo' => '565', 'color' => '373', 'talla' => '40', 'code' => '1019856537340'],\n ['modelo' => '565', 'color' => '374', 'talla' => '34', 'code' => '1019856537434'],\n ['modelo' => '565', 'color' => '374', 'talla' => '36', 'code' => '1019856537436'],\n ['modelo' => '565', 'color' => '374', 'talla' => '38', 'code' => '1019856537438'],\n ['modelo' => '565', 'color' => '374', 'talla' => '40', 'code' => '1019856537440'],\n ['modelo' => '432', 'color' => '002', 'talla' => 'L', 'code' => '11889432002L'],\n ['modelo' => '432', 'color' => '002', 'talla' => 'M', 'code' => '11889432002M'],\n ['modelo' => '432', 'color' => '002', 'talla' => 'S', 'code' => '11889432002S'],\n ['modelo' => '432', 'color' => '015', 'talla' => 'L', 'code' => '11889432015L'],\n ['modelo' => '432', 'color' => '015', 'talla' => 'M', 'code' => '11889432015M'],\n ['modelo' => '432', 'color' => '015', 'talla' => 'S', 'code' => '11889432015S'],\n ['modelo' => '206', 'color' => '001', 'talla' => '32', 'code' => '1016820600132'],\n ['modelo' => '206', 'color' => '001', 'talla' => '34', 'code' => '1016820600134'],\n ['modelo' => '206', 'color' => '001', 'talla' => '36', 'code' => '1016820600136'],\n ['modelo' => '206', 'color' => '001', 'talla' => '38', 'code' => '1016820600138'],\n ['modelo' => '206', 'color' => '001', 'talla' => '40', 'code' => '1016820600140'],\n ['modelo' => '206', 'color' => '002', 'talla' => '32', 'code' => '1016820600232'],\n ['modelo' => '206', 'color' => '002', 'talla' => '34', 'code' => '1016820600234'],\n ['modelo' => '206', 'color' => '002', 'talla' => '36', 'code' => '1016820600236'],\n ['modelo' => '206', 'color' => '002', 'talla' => '38', 'code' => '1016820600238'],\n ['modelo' => '206', 'color' => '002', 'talla' => '40', 'code' => '1016820600240'],\n ['modelo' => '206', 'color' => '064', 'talla' => '32', 'code' => '1016820606432'],\n ['modelo' => '206', 'color' => '064', 'talla' => '34', 'code' => '1016820606434'],\n ['modelo' => '206', 'color' => '064', 'talla' => '36', 'code' => '1016820606436'],\n ['modelo' => '206', 'color' => '064', 'talla' => '38', 'code' => '1016820606438'],\n ['modelo' => '206', 'color' => '064', 'talla' => '40', 'code' => '1016820606440'],\n ['modelo' => '206', 'color' => '103', 'talla' => '32', 'code' => '1016820610332'],\n ['modelo' => '206', 'color' => '103', 'talla' => '34', 'code' => '1016820610334'],\n ['modelo' => '206', 'color' => '103', 'talla' => '36', 'code' => '1016820610336'],\n ['modelo' => '206', 'color' => '103', 'talla' => '38', 'code' => '1016820610338'],\n ['modelo' => '206', 'color' => '222', 'talla' => '32', 'code' => '1016820622232'],\n ['modelo' => '206', 'color' => '222', 'talla' => '34', 'code' => '1016820622234'],\n ['modelo' => '206', 'color' => '222', 'talla' => '36', 'code' => '1016820622236'],\n ['modelo' => '206', 'color' => '222', 'talla' => '38', 'code' => '1016820622238'],\n ['modelo' => '206', 'color' => '222', 'talla' => '40', 'code' => '1016820622240'],\n ['modelo' => '206', 'color' => '248', 'talla' => '32', 'code' => '1016820624832'],\n ['modelo' => '206', 'color' => '248', 'talla' => '34', 'code' => '1016820624834'],\n ['modelo' => '206', 'color' => '248', 'talla' => '36', 'code' => '1016820624836'],\n ['modelo' => '206', 'color' => '248', 'talla' => '38', 'code' => '1016820624838'],\n ['modelo' => '206', 'color' => '248', 'talla' => '40', 'code' => '1016820624840'],\n ['modelo' => '567', 'color' => '001', 'talla' => '34', 'code' => '1189156700134'],\n ['modelo' => '567', 'color' => '001', 'talla' => '36', 'code' => '1189156700136'],\n ['modelo' => '567', 'color' => '001', 'talla' => '38', 'code' => '1189156700138'],\n ['modelo' => '567', 'color' => '002', 'talla' => '34', 'code' => '1189156700234'],\n ['modelo' => '567', 'color' => '002', 'talla' => '36', 'code' => '1189156700236'],\n ['modelo' => '567', 'color' => '002', 'talla' => '38', 'code' => '1189156700238'],\n ['modelo' => '567', 'color' => '015', 'talla' => '34', 'code' => '1189156701534'],\n ['modelo' => '567', 'color' => '015', 'talla' => '36', 'code' => '1189156701536'],\n ['modelo' => '567', 'color' => '015', 'talla' => '38', 'code' => '1189156701538'],\n ['modelo' => '286', 'color' => '001', 'talla' => '32', 'code' => '1187128600132'],\n ['modelo' => '286', 'color' => '001', 'talla' => '34', 'code' => '1187128600134'],\n ['modelo' => '286', 'color' => '001', 'talla' => '36', 'code' => '1187128600136'],\n ['modelo' => '286', 'color' => '001', 'talla' => '38', 'code' => '1187128600138'],\n ['modelo' => '286', 'color' => '002', 'talla' => '32', 'code' => '1187128600232'],\n ['modelo' => '286', 'color' => '002', 'talla' => '34', 'code' => '1187128600234'],\n ['modelo' => '286', 'color' => '002', 'talla' => '36', 'code' => '1187128600236'],\n ['modelo' => '286', 'color' => '002', 'talla' => '38', 'code' => '1187128600238'],\n ['modelo' => '286', 'color' => '015', 'talla' => '32', 'code' => '1187128601532'],\n ['modelo' => '286', 'color' => '015', 'talla' => '34', 'code' => '1187128601534'],\n ['modelo' => '286', 'color' => '015', 'talla' => '36', 'code' => '1187128601536'],\n ['modelo' => '286', 'color' => '015', 'talla' => '38', 'code' => '1187128601538'],\n ['modelo' => '325', 'color' => '001', 'talla' => 'L', 'code' => '10524325001L'],\n ['modelo' => '325', 'color' => '001', 'talla' => 'M', 'code' => '10524325001M'],\n ['modelo' => '325', 'color' => '001', 'talla' => 'S', 'code' => '10524325001S'],\n ['modelo' => '325', 'color' => '002', 'talla' => 'L', 'code' => '10524325002L'],\n ['modelo' => '325', 'color' => '002', 'talla' => 'M', 'code' => '10524325002M'],\n ['modelo' => '325', 'color' => '002', 'talla' => 'S', 'code' => '10524325002S'],\n ['modelo' => '325', 'color' => '015', 'talla' => 'L', 'code' => '10524325015L'],\n ['modelo' => '325', 'color' => '015', 'talla' => 'M', 'code' => '10524325015M'],\n ['modelo' => '325', 'color' => '015', 'talla' => 'S', 'code' => '10524325015S'],\n ['modelo' => '011', 'color' => '001', 'talla' => 'L', 'code' => '10208011001L'],\n ['modelo' => '011', 'color' => '001', 'talla' => 'M', 'code' => '10208011001M'],\n ['modelo' => '011', 'color' => '001', 'talla' => 'S', 'code' => '10208011001S'],\n ['modelo' => '011', 'color' => '002', 'talla' => 'L', 'code' => '10208011002L'],\n ['modelo' => '011', 'color' => '002', 'talla' => 'M', 'code' => '10208011002M'],\n ['modelo' => '011', 'color' => '002', 'talla' => 'S', 'code' => '10208011002S'],\n ['modelo' => '011', 'color' => '007', 'talla' => 'L', 'code' => '10208011007L'],\n ['modelo' => '011', 'color' => '007', 'talla' => 'M', 'code' => '10208011007M'],\n ['modelo' => '011', 'color' => '007', 'talla' => 'S', 'code' => '10208011007S'],\n ['modelo' => '011', 'color' => '015', 'talla' => 'L', 'code' => '10208011015L'],\n ['modelo' => '011', 'color' => '015', 'talla' => 'M', 'code' => '10208011015M'],\n ['modelo' => '011', 'color' => '015', 'talla' => 'S', 'code' => '10208011015S'],\n ['modelo' => '011', 'color' => '026', 'talla' => 'L', 'code' => '10208011026L'],\n ['modelo' => '011', 'color' => '026', 'talla' => 'M', 'code' => '10208011026M'],\n ['modelo' => '011', 'color' => '026', 'talla' => 'S', 'code' => '10208011026S'],\n ['modelo' => '011', 'color' => '054', 'talla' => 'L', 'code' => '10208011054L'],\n ['modelo' => '011', 'color' => '054', 'talla' => 'M', 'code' => '10208011054M'],\n ['modelo' => '011', 'color' => '054', 'talla' => 'S', 'code' => '10208011054S'],\n ['modelo' => '011', 'color' => '064', 'talla' => 'L', 'code' => '10208011064L'],\n ['modelo' => '011', 'color' => '064', 'talla' => 'M', 'code' => '10208011064M'],\n ['modelo' => '011', 'color' => '064', 'talla' => 'S', 'code' => '10208011064S'],\n ['modelo' => '011', 'color' => '065', 'talla' => 'L', 'code' => '10208011065L'],\n ['modelo' => '011', 'color' => '065', 'talla' => 'M', 'code' => '10208011065M'],\n ['modelo' => '011', 'color' => '065', 'talla' => 'S', 'code' => '10208011065S'],\n ['modelo' => '011', 'color' => '103', 'talla' => 'L', 'code' => '10208011103L'],\n ['modelo' => '011', 'color' => '103', 'talla' => 'M', 'code' => '10208011103M'],\n ['modelo' => '011', 'color' => '103', 'talla' => 'S', 'code' => '10208011103S'],\n ['modelo' => '011', 'color' => '222', 'talla' => 'L', 'code' => '10208011222L'],\n ['modelo' => '011', 'color' => '222', 'talla' => 'M', 'code' => '10208011222M'],\n ['modelo' => '011', 'color' => '222', 'talla' => 'S', 'code' => '10208011222S'],\n ['modelo' => '011', 'color' => '248', 'talla' => 'L', 'code' => '10208011248L'],\n ['modelo' => '011', 'color' => '248', 'talla' => 'M', 'code' => '10208011248M'],\n ['modelo' => '011', 'color' => '248', 'talla' => 'S', 'code' => '10208011248S'],\n ['modelo' => '366', 'color' => '001', 'talla' => 'L', 'code' => '10543366001L'],\n ['modelo' => '366', 'color' => '001', 'talla' => 'M', 'code' => '10543366001M'],\n ['modelo' => '366', 'color' => '001', 'talla' => 'S', 'code' => '10543366001S'],\n ['modelo' => '366', 'color' => '002', 'talla' => 'L', 'code' => '10543366002L'],\n ['modelo' => '366', 'color' => '002', 'talla' => 'M', 'code' => '10543366002M'],\n ['modelo' => '366', 'color' => '002', 'talla' => 'S', 'code' => '10543366002S'],\n ['modelo' => '366', 'color' => '015', 'talla' => 'L', 'code' => '10543366015L'],\n ['modelo' => '366', 'color' => '015', 'talla' => 'M', 'code' => '10543366015M'],\n ['modelo' => '366', 'color' => '015', 'talla' => 'S', 'code' => '10543366015S'],\n ['modelo' => '366', 'color' => '248', 'talla' => 'L', 'code' => '10543366248L'],\n ['modelo' => '366', 'color' => '248', 'talla' => 'M', 'code' => '10543366248M'],\n ['modelo' => '366', 'color' => '248', 'talla' => 'S', 'code' => '10543366248S'],\n ['modelo' => '366', 'color' => '335', 'talla' => 'L', 'code' => '10543366335L'],\n ['modelo' => '366', 'color' => '335', 'talla' => 'M', 'code' => '10543366335M'],\n ['modelo' => '366', 'color' => '335', 'talla' => 'S', 'code' => '10543366335S'],\n ['modelo' => '155', 'color' => '001', 'talla' => 'L', 'code' => '10740155001L'],\n ['modelo' => '155', 'color' => '001', 'talla' => 'M', 'code' => '10740155001M'],\n ['modelo' => '155', 'color' => '001', 'talla' => 'XL', 'code' => '10740155001XL'],\n ['modelo' => '155', 'color' => '002', 'talla' => 'L', 'code' => '10740155002L'],\n ['modelo' => '155', 'color' => '002', 'talla' => 'M', 'code' => '10740155002M'],\n ['modelo' => '155', 'color' => '002', 'talla' => 'XL', 'code' => '10740155002XL'],\n ['modelo' => '155', 'color' => '009', 'talla' => 'L', 'code' => '10740155009L'],\n ['modelo' => '155', 'color' => '009', 'talla' => 'M', 'code' => '10740155009M'],\n ['modelo' => '155', 'color' => '009', 'talla' => 'XL', 'code' => '10740155009XL'],\n ['modelo' => '155', 'color' => '054', 'talla' => 'L', 'code' => '10740155054L'],\n ['modelo' => '155', 'color' => '054', 'talla' => 'M', 'code' => '10740155054M'],\n ['modelo' => '155', 'color' => '054', 'talla' => 'XL', 'code' => '10740155054XL'],\n ['modelo' => '155', 'color' => '064', 'talla' => 'L', 'code' => '10740155064L'],\n ['modelo' => '155', 'color' => '064', 'talla' => 'M', 'code' => '10740155064M'],\n ['modelo' => '155', 'color' => '064', 'talla' => 'XL', 'code' => '10740155064XL'],\n ['modelo' => '155', 'color' => '065', 'talla' => 'L', 'code' => '10740155065L'],\n ['modelo' => '155', 'color' => '065', 'talla' => 'M', 'code' => '10740155065M'],\n ['modelo' => '155', 'color' => '065', 'talla' => 'XL', 'code' => '10740155065XL'],\n ['modelo' => '155', 'color' => '103', 'talla' => 'L', 'code' => '10740155103L'],\n ['modelo' => '155', 'color' => '103', 'talla' => 'M', 'code' => '10740155103M'],\n ['modelo' => '155', 'color' => '103', 'talla' => 'XL', 'code' => '10740155103XL'],\n ['modelo' => '155', 'color' => '248', 'talla' => 'L', 'code' => '10740155248L'],\n ['modelo' => '155', 'color' => '248', 'talla' => 'M', 'code' => '10740155248M'],\n ['modelo' => '155', 'color' => '248', 'talla' => 'XL', 'code' => '10740155248XL'],\n ['modelo' => '223', 'color' => '096', 'talla' => '32', 'code' => '1188022309632'],\n ['modelo' => '223', 'color' => '096', 'talla' => '34', 'code' => '1188022309634'],\n ['modelo' => '223', 'color' => '096', 'talla' => '36', 'code' => '1188022309636'],\n ['modelo' => '223', 'color' => '096', 'talla' => '38', 'code' => '1188022309638'],\n ['modelo' => '223', 'color' => '209', 'talla' => '32', 'code' => '1188022320932'],\n ['modelo' => '223', 'color' => '209', 'talla' => '34', 'code' => '1188022320934'],\n ['modelo' => '223', 'color' => '209', 'talla' => '36', 'code' => '1188022320936'],\n ['modelo' => '223', 'color' => '209', 'talla' => '38', 'code' => '1188022320938'],\n ['modelo' => '223', 'color' => '213', 'talla' => '32', 'code' => '1188022321332'],\n ['modelo' => '223', 'color' => '213', 'talla' => '34', 'code' => '1188022321334'],\n ['modelo' => '223', 'color' => '213', 'talla' => '36', 'code' => '1188022321336'],\n ['modelo' => '223', 'color' => '213', 'talla' => '38', 'code' => '1188022321338'],\n ['modelo' => '224', 'color' => '001', 'talla' => '32', 'code' => '1188122400132'],\n ['modelo' => '224', 'color' => '001', 'talla' => '34', 'code' => '1188122400134'],\n ['modelo' => '224', 'color' => '001', 'talla' => '36', 'code' => '1188122400136'],\n ['modelo' => '224', 'color' => '001', 'talla' => '38', 'code' => '1188122400138'],\n ['modelo' => '224', 'color' => '002', 'talla' => '32', 'code' => '1188122400232'],\n ['modelo' => '224', 'color' => '002', 'talla' => '34', 'code' => '1188122400234'],\n ['modelo' => '224', 'color' => '002', 'talla' => '36', 'code' => '1188122400236'],\n ['modelo' => '224', 'color' => '002', 'talla' => '38', 'code' => '1188122400238'],\n ['modelo' => '224', 'color' => '015', 'talla' => '32', 'code' => '1188122401532'],\n ['modelo' => '224', 'color' => '015', 'talla' => '34', 'code' => '1188122401534'],\n ['modelo' => '224', 'color' => '015', 'talla' => '36', 'code' => '1188122401536'],\n ['modelo' => '224', 'color' => '015', 'talla' => '38', 'code' => '1188122401538'],\n ['modelo' => '233', 'color' => '001', 'talla' => '30', 'code' => '1088523300130'],\n ['modelo' => '233', 'color' => '001', 'talla' => '32', 'code' => '1088523300132'],\n ['modelo' => '233', 'color' => '001', 'talla' => '34', 'code' => '1088523300134'],\n ['modelo' => '233', 'color' => '001', 'talla' => '36', 'code' => '1088523300136'],\n ['modelo' => '233', 'color' => '002', 'talla' => '30', 'code' => '1088523300230'],\n ['modelo' => '233', 'color' => '002', 'talla' => '32', 'code' => '1088523300232'],\n ['modelo' => '233', 'color' => '002', 'talla' => '34', 'code' => '1088523300234'],\n ['modelo' => '233', 'color' => '002', 'talla' => '36', 'code' => '1088523300236'],\n ['modelo' => '233', 'color' => '053', 'talla' => '30', 'code' => '1088523305330'],\n ['modelo' => '233', 'color' => '053', 'talla' => '32', 'code' => '1088523305332'],\n ['modelo' => '233', 'color' => '053', 'talla' => '34', 'code' => '1088523305334'],\n ['modelo' => '233', 'color' => '053', 'talla' => '36', 'code' => '1088523305336'],\n ['modelo' => '233', 'color' => '197', 'talla' => '30', 'code' => '1088523319730'],\n ['modelo' => '233', 'color' => '197', 'talla' => '32', 'code' => '1088523319732'],\n ['modelo' => '233', 'color' => '197', 'talla' => '34', 'code' => '1088523319734'],\n ['modelo' => '233', 'color' => '197', 'talla' => '36', 'code' => '1088523319736'],\n ['modelo' => '548', 'color' => '001', 'talla' => '30', 'code' => '1084354800130'],\n ['modelo' => '548', 'color' => '001', 'talla' => '32', 'code' => '1084354800132'],\n ['modelo' => '548', 'color' => '001', 'talla' => '34', 'code' => '1084354800134'],\n ['modelo' => '548', 'color' => '001', 'talla' => '36', 'code' => '1084354800136'],\n ['modelo' => '548', 'color' => '002', 'talla' => '30', 'code' => '1084354800230'],\n ['modelo' => '548', 'color' => '002', 'talla' => '32', 'code' => '1084354800232'],\n ['modelo' => '548', 'color' => '002', 'talla' => '34', 'code' => '1084354800234'],\n ['modelo' => '548', 'color' => '002', 'talla' => '36', 'code' => '1084354800236'],\n ['modelo' => '548', 'color' => '063', 'talla' => '30', 'code' => '1084354806330'],\n ['modelo' => '548', 'color' => '063', 'talla' => '32', 'code' => '1084354806332'],\n ['modelo' => '548', 'color' => '063', 'talla' => '34', 'code' => '1084354806334'],\n ['modelo' => '548', 'color' => '063', 'talla' => '36', 'code' => '1084354806336'],\n ['modelo' => '548', 'color' => '190', 'talla' => '30', 'code' => '1084354819030'],\n ['modelo' => '548', 'color' => '190', 'talla' => '32', 'code' => '1084354819032'],\n ['modelo' => '548', 'color' => '190', 'talla' => '34', 'code' => '1084354819034'],\n ['modelo' => '548', 'color' => '190', 'talla' => '36', 'code' => '1084354819036'],\n ['modelo' => '546', 'color' => '001', 'talla' => '30', 'code' => '1084354600130'],\n ['modelo' => '546', 'color' => '001', 'talla' => '32', 'code' => '1084354600132'],\n ['modelo' => '546', 'color' => '001', 'talla' => '34', 'code' => '1084354600134'],\n ['modelo' => '546', 'color' => '001', 'talla' => '36', 'code' => '1084354600136'],\n ['modelo' => '546', 'color' => '002', 'talla' => '30', 'code' => '1084354600230'],\n ['modelo' => '546', 'color' => '002', 'talla' => '32', 'code' => '1084354600232'],\n ['modelo' => '546', 'color' => '002', 'talla' => '34', 'code' => '1084354600234'],\n ['modelo' => '546', 'color' => '002', 'talla' => '36', 'code' => '1084354600236'],\n ['modelo' => '546', 'color' => '006', 'talla' => '30', 'code' => '1084354600630'],\n ['modelo' => '546', 'color' => '006', 'talla' => '32', 'code' => '1084354600632'],\n ['modelo' => '546', 'color' => '006', 'talla' => '34', 'code' => '1084354600634'],\n ['modelo' => '546', 'color' => '006', 'talla' => '36', 'code' => '1084354600636'],\n ['modelo' => '546', 'color' => '190', 'talla' => '30', 'code' => '1084354619030'],\n ['modelo' => '546', 'color' => '190', 'talla' => '32', 'code' => '1084354619032'],\n ['modelo' => '546', 'color' => '190', 'talla' => '34', 'code' => '1084354619034'],\n ['modelo' => '546', 'color' => '190', 'talla' => '36', 'code' => '1084354619036'],\n ['modelo' => '569', 'color' => '001', 'talla' => 'L', 'code' => '10224569001L'],\n ['modelo' => '569', 'color' => '001', 'talla' => 'M', 'code' => '10224569001M'],\n ['modelo' => '569', 'color' => '001', 'talla' => 'S', 'code' => '10224569001S'],\n ['modelo' => '569', 'color' => '002', 'talla' => 'L', 'code' => '10224569002L'],\n ['modelo' => '569', 'color' => '002', 'talla' => 'M', 'code' => '10224569002M'],\n ['modelo' => '569', 'color' => '002', 'talla' => 'S', 'code' => '10224569002S'],\n ['modelo' => '569', 'color' => '343', 'talla' => 'L', 'code' => '10224569343L'],\n ['modelo' => '569', 'color' => '343', 'talla' => 'M', 'code' => '10224569343M'],\n ['modelo' => '569', 'color' => '343', 'talla' => 'S', 'code' => '10224569343S'],\n ['modelo' => '569', 'color' => '371', 'talla' => 'L', 'code' => '10224569371L'],\n ['modelo' => '569', 'color' => '371', 'talla' => 'M', 'code' => '10224569371M'],\n ['modelo' => '569', 'color' => '371', 'talla' => 'S', 'code' => '10224569371S'],\n ['modelo' => '569', 'color' => '374', 'talla' => 'L', 'code' => '10224569374L'],\n ['modelo' => '569', 'color' => '374', 'talla' => 'M', 'code' => '10224569374M'],\n ['modelo' => '569', 'color' => '374', 'talla' => 'S', 'code' => '10224569374S'],\n ['modelo' => '234', 'color' => '001', 'talla' => '08', 'code' => '1038623400108'],\n ['modelo' => '234', 'color' => '001', 'talla' => '10', 'code' => '1038623400110'],\n ['modelo' => '234', 'color' => '001', 'talla' => '12', 'code' => '1038623400112'],\n ['modelo' => '234', 'color' => '001', 'talla' => '14', 'code' => '1038623400114'],\n ['modelo' => '234', 'color' => '001', 'talla' => '16', 'code' => '1038623400116'],\n ['modelo' => '234', 'color' => '001', 'talla' => 'XS', 'code' => '10386234001XS'],\n ['modelo' => '234', 'color' => '002', 'talla' => '08', 'code' => '1038623400208'],\n ['modelo' => '234', 'color' => '002', 'talla' => '10', 'code' => '1038623400210'],\n ['modelo' => '234', 'color' => '002', 'talla' => '12', 'code' => '1038623400212'],\n ['modelo' => '234', 'color' => '002', 'talla' => '14', 'code' => '1038623400214'],\n ['modelo' => '234', 'color' => '002', 'talla' => '16', 'code' => '1038623400216'],\n ['modelo' => '234', 'color' => '002', 'talla' => 'XS', 'code' => '10386234002XS'],\n ['modelo' => '234', 'color' => '053', 'talla' => '08', 'code' => '1038623405308'],\n ['modelo' => '234', 'color' => '053', 'talla' => '10', 'code' => '1038623405310'],\n ['modelo' => '234', 'color' => '053', 'talla' => '12', 'code' => '1038623405312'],\n ['modelo' => '234', 'color' => '053', 'talla' => '14', 'code' => '1038623405314'],\n ['modelo' => '234', 'color' => '053', 'talla' => '16', 'code' => '1038623405316'],\n ['modelo' => '234', 'color' => '053', 'talla' => 'XS', 'code' => '10386234053XS'],\n ['modelo' => '234', 'color' => '197', 'talla' => '08', 'code' => '1038623419708'],\n ['modelo' => '234', 'color' => '197', 'talla' => '10', 'code' => '1038623419710'],\n ['modelo' => '234', 'color' => '197', 'talla' => '12', 'code' => '1038623419712'],\n ['modelo' => '234', 'color' => '197', 'talla' => '14', 'code' => '1038623419714'],\n ['modelo' => '234', 'color' => '197', 'talla' => '16', 'code' => '1038623419716'],\n ['modelo' => '234', 'color' => '197', 'talla' => 'XS', 'code' => '10386234197XS'],\n ['modelo' => '549', 'color' => '001', 'talla' => '10', 'code' => '1074354900110'],\n ['modelo' => '549', 'color' => '001', 'talla' => '12', 'code' => '1074354900112'],\n ['modelo' => '549', 'color' => '001', 'talla' => '14', 'code' => '1074354900114'],\n ['modelo' => '549', 'color' => '001', 'talla' => '16', 'code' => '1074354900116'],\n ['modelo' => '549', 'color' => '002', 'talla' => '10', 'code' => '1074354900210'],\n ['modelo' => '549', 'color' => '002', 'talla' => '12', 'code' => '1074354900212'],\n ['modelo' => '549', 'color' => '002', 'talla' => '14', 'code' => '1074354900214'],\n ['modelo' => '549', 'color' => '002', 'talla' => '16', 'code' => '1074354900216'],\n ['modelo' => '549', 'color' => '063', 'talla' => '10', 'code' => '1074354906310'],\n ['modelo' => '549', 'color' => '063', 'talla' => '12', 'code' => '1074354906312'],\n ['modelo' => '549', 'color' => '063', 'talla' => '14', 'code' => '1074354906314'],\n ['modelo' => '549', 'color' => '063', 'talla' => '16', 'code' => '1074354906316'],\n ['modelo' => '549', 'color' => '190', 'talla' => '10', 'code' => '1074354919010'],\n ['modelo' => '549', 'color' => '190', 'talla' => '12', 'code' => '1074354919012'],\n ['modelo' => '549', 'color' => '190', 'talla' => '14', 'code' => '1074354919014'],\n ['modelo' => '549', 'color' => '190', 'talla' => '16', 'code' => '1074354919016'],\n ['modelo' => '547', 'color' => '001', 'talla' => '10', 'code' => '1074354700110'],\n ['modelo' => '547', 'color' => '001', 'talla' => '12', 'code' => '1074354700112'],\n ['modelo' => '547', 'color' => '001', 'talla' => '14', 'code' => '1074354700114'],\n ['modelo' => '547', 'color' => '001', 'talla' => '16', 'code' => '1074354700116'],\n ['modelo' => '547', 'color' => '002', 'talla' => '10', 'code' => '1074354700210'],\n ['modelo' => '547', 'color' => '002', 'talla' => '12', 'code' => '1074354700212'],\n ['modelo' => '547', 'color' => '002', 'talla' => '14', 'code' => '1074354700214'],\n ['modelo' => '547', 'color' => '002', 'talla' => '16', 'code' => '1074354700216'],\n ['modelo' => '547', 'color' => '006', 'talla' => '10', 'code' => '1074354700610'],\n ['modelo' => '547', 'color' => '006', 'talla' => '12', 'code' => '1074354700612'],\n ['modelo' => '547', 'color' => '006', 'talla' => '14', 'code' => '1074354700614'],\n ['modelo' => '547', 'color' => '006', 'talla' => '16', 'code' => '1074354700616'],\n ['modelo' => '547', 'color' => '190', 'talla' => '10', 'code' => '1074354719010'],\n ['modelo' => '547', 'color' => '190', 'talla' => '12', 'code' => '1074354719012'],\n ['modelo' => '547', 'color' => '190', 'talla' => '14', 'code' => '1074354719014'],\n ['modelo' => '547', 'color' => '190', 'talla' => '16', 'code' => '1074354719016'],\n ['modelo' => '017', 'color' => '001', 'talla' => 'L', 'code' => '10216017001L'],\n ['modelo' => '017', 'color' => '001', 'talla' => 'M', 'code' => '10216017001M'],\n ['modelo' => '017', 'color' => '001', 'talla' => 'S', 'code' => '10216017001S'],\n ['modelo' => '017', 'color' => '002', 'talla' => 'L', 'code' => '10216017002L'],\n ['modelo' => '017', 'color' => '002', 'talla' => 'M', 'code' => '10216017002M'],\n ['modelo' => '017', 'color' => '002', 'talla' => 'S', 'code' => '10216017002S'],\n ['modelo' => '017', 'color' => '009', 'talla' => 'L', 'code' => '10216017009L'],\n ['modelo' => '017', 'color' => '009', 'talla' => 'M', 'code' => '10216017009M'],\n ['modelo' => '017', 'color' => '009', 'talla' => 'S', 'code' => '10216017009S'],\n ['modelo' => '017', 'color' => '010', 'talla' => 'L', 'code' => '10216017010L'],\n ['modelo' => '017', 'color' => '010', 'talla' => 'M', 'code' => '10216017010M'],\n ['modelo' => '017', 'color' => '010', 'talla' => 'S', 'code' => '10216017010S'],\n ['modelo' => '017', 'color' => '015', 'talla' => 'L', 'code' => '10216017015L'],\n ['modelo' => '017', 'color' => '015', 'talla' => 'M', 'code' => '10216017015M'],\n ['modelo' => '017', 'color' => '015', 'talla' => 'S', 'code' => '10216017015S'],\n ['modelo' => '017', 'color' => '034', 'talla' => 'L', 'code' => '10216017034L'],\n ['modelo' => '017', 'color' => '034', 'talla' => 'M', 'code' => '10216017034M'],\n ['modelo' => '017', 'color' => '034', 'talla' => 'S', 'code' => '10216017034S'],\n ['modelo' => '017', 'color' => '035', 'talla' => 'L', 'code' => '10216017035L'],\n ['modelo' => '017', 'color' => '035', 'talla' => 'M', 'code' => '10216017035M'],\n ['modelo' => '017', 'color' => '035', 'talla' => 'S', 'code' => '10216017035S'],\n ['modelo' => '017', 'color' => '044', 'talla' => 'L', 'code' => '10216017044L'],\n ['modelo' => '017', 'color' => '044', 'talla' => 'M', 'code' => '10216017044M'],\n ['modelo' => '017', 'color' => '044', 'talla' => 'S', 'code' => '10216017044S'],\n ['modelo' => '017', 'color' => '046', 'talla' => 'L', 'code' => '10216017046L'],\n ['modelo' => '017', 'color' => '046', 'talla' => 'M', 'code' => '10216017046M'],\n ['modelo' => '017', 'color' => '046', 'talla' => 'S', 'code' => '10216017046S'],\n ['modelo' => '017', 'color' => '064', 'talla' => 'L', 'code' => '10216017064L'],\n ['modelo' => '017', 'color' => '064', 'talla' => 'M', 'code' => '10216017064M'],\n ['modelo' => '017', 'color' => '064', 'talla' => 'S', 'code' => '10216017064S'],\n ['modelo' => '017', 'color' => '103', 'talla' => 'L', 'code' => '10216017103L'],\n ['modelo' => '017', 'color' => '103', 'talla' => 'M', 'code' => '10216017103M'],\n ['modelo' => '017', 'color' => '103', 'talla' => 'S', 'code' => '10216017103S'],\n ['modelo' => '017', 'color' => '171', 'talla' => 'L', 'code' => '10216017171L'],\n ['modelo' => '017', 'color' => '171', 'talla' => 'M', 'code' => '10216017171M'],\n ['modelo' => '017', 'color' => '171', 'talla' => 'S', 'code' => '10216017171S'],\n ['modelo' => '017', 'color' => '248', 'talla' => 'L', 'code' => '10216017248L'],\n ['modelo' => '017', 'color' => '248', 'talla' => 'M', 'code' => '10216017248M'],\n ['modelo' => '017', 'color' => '248', 'talla' => 'S', 'code' => '10216017248S'],\n ['modelo' => '017', 'color' => '275', 'talla' => 'L', 'code' => '10216017275L'],\n ['modelo' => '017', 'color' => '275', 'talla' => 'M', 'code' => '10216017275M'],\n ['modelo' => '017', 'color' => '275', 'talla' => 'S', 'code' => '10216017275S'],\n ['modelo' => '239', 'color' => '001', 'talla' => 'L', 'code' => '10389239001L'],\n ['modelo' => '239', 'color' => '001', 'talla' => 'M', 'code' => '10389239001M'],\n ['modelo' => '239', 'color' => '001', 'talla' => 'S', 'code' => '10389239001S'],\n ['modelo' => '239', 'color' => '002', 'talla' => 'L', 'code' => '10389239002L'],\n ['modelo' => '239', 'color' => '002', 'talla' => 'M', 'code' => '10389239002M'],\n ['modelo' => '239', 'color' => '002', 'talla' => 'S', 'code' => '10389239002S'],\n ['modelo' => '239', 'color' => '009', 'talla' => 'L', 'code' => '10389239009L'],\n ['modelo' => '239', 'color' => '009', 'talla' => 'M', 'code' => '10389239009M'],\n ['modelo' => '239', 'color' => '009', 'talla' => 'S', 'code' => '10389239009S'],\n ['modelo' => '239', 'color' => '015', 'talla' => 'L', 'code' => '10389239015L'],\n ['modelo' => '239', 'color' => '015', 'talla' => 'M', 'code' => '10389239015M'],\n ['modelo' => '239', 'color' => '015', 'talla' => 'S', 'code' => '10389239015S'],\n ['modelo' => '239', 'color' => '202', 'talla' => 'L', 'code' => '10389239202L'],\n ['modelo' => '239', 'color' => '202', 'talla' => 'M', 'code' => '10389239202M'],\n ['modelo' => '239', 'color' => '202', 'talla' => 'S', 'code' => '10389239202S'],\n ['modelo' => '239', 'color' => '248', 'talla' => 'L', 'code' => '10389239248L'],\n ['modelo' => '239', 'color' => '248', 'talla' => 'M', 'code' => '10389239248M'],\n ['modelo' => '239', 'color' => '248', 'talla' => 'S', 'code' => '10389239248S'],\n ['modelo' => '446', 'color' => '001', 'talla' => 'L', 'code' => '10740446001L'],\n ['modelo' => '446', 'color' => '001', 'talla' => 'M', 'code' => '10740446001M'],\n ['modelo' => '446', 'color' => '001', 'talla' => 'XL', 'code' => '10740446001XL'],\n ['modelo' => '446', 'color' => '002', 'talla' => 'L', 'code' => '10740446002L'],\n ['modelo' => '446', 'color' => '002', 'talla' => 'M', 'code' => '10740446002M'],\n ['modelo' => '446', 'color' => '002', 'talla' => 'XL', 'code' => '10740446002XL'],\n ['modelo' => '446', 'color' => '248', 'talla' => 'L', 'code' => '10740446248L'],\n ['modelo' => '446', 'color' => '248', 'talla' => 'M', 'code' => '10740446248M'],\n ['modelo' => '446', 'color' => '248', 'talla' => 'XL', 'code' => '10740446248XL'],\n ['modelo' => '423', 'color' => '001', 'talla' => '30', 'code' => '1010342300130'],\n ['modelo' => '423', 'color' => '001', 'talla' => '32', 'code' => '1010342300132'],\n ['modelo' => '423', 'color' => '001', 'talla' => '34', 'code' => '1010342300134'],\n ['modelo' => '423', 'color' => '001', 'talla' => '36', 'code' => '1010342300136'],\n ['modelo' => '423', 'color' => '002', 'talla' => '30', 'code' => '1010342300230'],\n ['modelo' => '423', 'color' => '002', 'talla' => '32', 'code' => '1010342300232'],\n ['modelo' => '423', 'color' => '002', 'talla' => '34', 'code' => '1010342300234'],\n ['modelo' => '423', 'color' => '002', 'talla' => '36', 'code' => '1010342300236'],\n ['modelo' => '423', 'color' => '248', 'talla' => '30', 'code' => '1010342324830'],\n ['modelo' => '423', 'color' => '248', 'talla' => '32', 'code' => '1010342324832'],\n ['modelo' => '423', 'color' => '248', 'talla' => '34', 'code' => '1010342324834'],\n ['modelo' => '423', 'color' => '248', 'talla' => '36', 'code' => '1010342324836'],\n ['modelo' => '423', 'color' => '337', 'talla' => '30', 'code' => '1010342333730'],\n ['modelo' => '423', 'color' => '337', 'talla' => '32', 'code' => '1010342333732'],\n ['modelo' => '423', 'color' => '337', 'talla' => '34', 'code' => '1010342333734'],\n ['modelo' => '423', 'color' => '337', 'talla' => '36', 'code' => '1010342333736'],\n ['modelo' => '424', 'color' => '001', 'talla' => '30', 'code' => '1010342400130'],\n ['modelo' => '424', 'color' => '001', 'talla' => '32', 'code' => '1010342400132'],\n ['modelo' => '424', 'color' => '001', 'talla' => '34', 'code' => '1010342400134'],\n ['modelo' => '424', 'color' => '002', 'talla' => '30', 'code' => '1010342400230'],\n ['modelo' => '424', 'color' => '002', 'talla' => '32', 'code' => '1010342400232'],\n ['modelo' => '424', 'color' => '002', 'talla' => '34', 'code' => '1010342400234'],\n ['modelo' => '424', 'color' => '023', 'talla' => '30', 'code' => '1010342402330'],\n ['modelo' => '424', 'color' => '023', 'talla' => '32', 'code' => '1010342402332'],\n ['modelo' => '424', 'color' => '023', 'talla' => '34', 'code' => '1010342402334'],\n ['modelo' => '424', 'color' => '063', 'talla' => '30', 'code' => '1010342406330'],\n ['modelo' => '424', 'color' => '063', 'talla' => '32', 'code' => '1010342406332'],\n ['modelo' => '424', 'color' => '063', 'talla' => '34', 'code' => '1010342406334'],\n ['modelo' => '483', 'color' => '001', 'talla' => '38', 'code' => '1019148300138'],\n ['modelo' => '483', 'color' => '001', 'talla' => '40', 'code' => '1019148300140'],\n ['modelo' => '483', 'color' => '001', 'talla' => '42', 'code' => '1019148300142'],\n ['modelo' => '483', 'color' => '001', 'talla' => '44', 'code' => '1019148300144'],\n ['modelo' => '483', 'color' => '002', 'talla' => '38', 'code' => '1019148300238'],\n ['modelo' => '483', 'color' => '002', 'talla' => '40', 'code' => '1019148300240'],\n ['modelo' => '483', 'color' => '002', 'talla' => '42', 'code' => '1019148300242'],\n ['modelo' => '483', 'color' => '002', 'talla' => '44', 'code' => '1019148300244'],\n ['modelo' => '483', 'color' => '019', 'talla' => '38', 'code' => '1019148301938'],\n ['modelo' => '483', 'color' => '019', 'talla' => '40', 'code' => '1019148301940'],\n ['modelo' => '483', 'color' => '019', 'talla' => '42', 'code' => '1019148301942'],\n ['modelo' => '483', 'color' => '019', 'talla' => '44', 'code' => '1019148301944'],\n ['modelo' => '483', 'color' => '248', 'talla' => '38', 'code' => '1019148324838'],\n ['modelo' => '483', 'color' => '248', 'talla' => '40', 'code' => '1019148324840'],\n ['modelo' => '483', 'color' => '248', 'talla' => '42', 'code' => '1019148324842'],\n ['modelo' => '483', 'color' => '248', 'talla' => '44', 'code' => '1019148324844'],\n ['modelo' => '023', 'color' => '001', 'talla' => 'L', 'code' => '10612023001L'],\n ['modelo' => '023', 'color' => '001', 'talla' => 'M', 'code' => '10612023001M'],\n ['modelo' => '023', 'color' => '001', 'talla' => 'S', 'code' => '10612023001S'],\n ['modelo' => '023', 'color' => '001', 'talla' => 'XL', 'code' => '10612023001XL'],\n ['modelo' => '023', 'color' => '002', 'talla' => 'L', 'code' => '10612023002L'],\n ['modelo' => '023', 'color' => '002', 'talla' => 'M', 'code' => '10612023002M'],\n ['modelo' => '023', 'color' => '002', 'talla' => 'S', 'code' => '10612023002S'],\n ['modelo' => '023', 'color' => '002', 'talla' => 'XL', 'code' => '10612023002XL'],\n ['modelo' => '023', 'color' => '011', 'talla' => 'L', 'code' => '10612023011L'],\n ['modelo' => '023', 'color' => '011', 'talla' => 'M', 'code' => '10612023011M'],\n ['modelo' => '023', 'color' => '011', 'talla' => 'S', 'code' => '10612023011S'],\n ['modelo' => '023', 'color' => '011', 'talla' => 'XL', 'code' => '10612023011XL'],\n ['modelo' => '023', 'color' => '018', 'talla' => 'L', 'code' => '10612023018L'],\n ['modelo' => '023', 'color' => '018', 'talla' => 'M', 'code' => '10612023018M'],\n ['modelo' => '023', 'color' => '018', 'talla' => 'XL', 'code' => '10612023018XL'],\n ['modelo' => '023', 'color' => '245', 'talla' => 'L', 'code' => '10612023245L'],\n ['modelo' => '023', 'color' => '245', 'talla' => 'M', 'code' => '10612023245M'],\n ['modelo' => '023', 'color' => '245', 'talla' => 'XL', 'code' => '10612023245XL'],\n ['modelo' => '087', 'color' => '001', 'talla' => 'L', 'code' => '10612087001L'],\n ['modelo' => '087', 'color' => '001', 'talla' => 'M', 'code' => '10612087001M'],\n ['modelo' => '087', 'color' => '001', 'talla' => 'S', 'code' => '10612087001S'],\n ['modelo' => '087', 'color' => '001', 'talla' => 'XL', 'code' => '10612087001XL'],\n ['modelo' => '087', 'color' => '002', 'talla' => 'L', 'code' => '10612087002L'],\n ['modelo' => '087', 'color' => '002', 'talla' => 'M', 'code' => '10612087002M'],\n ['modelo' => '087', 'color' => '002', 'talla' => 'S', 'code' => '10612087002S'],\n ['modelo' => '087', 'color' => '002', 'talla' => 'XL', 'code' => '10612087002XL'],\n ['modelo' => '087', 'color' => '009', 'talla' => 'L', 'code' => '10612087009L'],\n ['modelo' => '087', 'color' => '009', 'talla' => 'M', 'code' => '10612087009M'],\n ['modelo' => '087', 'color' => '009', 'talla' => 'S', 'code' => '10612087009S'],\n ['modelo' => '087', 'color' => '009', 'talla' => 'XL', 'code' => '10612087009XL'],\n ['modelo' => '087', 'color' => '011', 'talla' => 'L', 'code' => '10612087011L'],\n ['modelo' => '087', 'color' => '011', 'talla' => 'M', 'code' => '10612087011M'],\n ['modelo' => '087', 'color' => '011', 'talla' => 'S', 'code' => '10612087011S'],\n ['modelo' => '087', 'color' => '011', 'talla' => 'XL', 'code' => '10612087011XL'],\n ['modelo' => '087', 'color' => '018', 'talla' => 'L', 'code' => '10612087018L'],\n ['modelo' => '087', 'color' => '018', 'talla' => 'M', 'code' => '10612087018M'],\n ['modelo' => '087', 'color' => '018', 'talla' => 'S', 'code' => '10612087018S'],\n ['modelo' => '087', 'color' => '018', 'talla' => 'XL', 'code' => '10612087018XL'],\n ['modelo' => '087', 'color' => '245', 'talla' => 'L', 'code' => '10612087245L'],\n ['modelo' => '087', 'color' => '245', 'talla' => 'M', 'code' => '10612087245M'],\n ['modelo' => '087', 'color' => '245', 'talla' => 'S', 'code' => '10612087245S'],\n ['modelo' => '087', 'color' => '245', 'talla' => 'XL', 'code' => '10612087245XL'],\n ['modelo' => '321', 'color' => '001', 'talla' => 'L', 'code' => '10643321001L'],\n ['modelo' => '321', 'color' => '001', 'talla' => 'M', 'code' => '10643321001M'],\n ['modelo' => '321', 'color' => '001', 'talla' => 'S', 'code' => '10643321001S'],\n ['modelo' => '321', 'color' => '001', 'talla' => 'XL', 'code' => '10643321001XL'],\n ['modelo' => '321', 'color' => '002', 'talla' => 'L', 'code' => '10643321002L'],\n ['modelo' => '321', 'color' => '002', 'talla' => 'M', 'code' => '10643321002M'],\n ['modelo' => '321', 'color' => '002', 'talla' => 'S', 'code' => '10643321002S'],\n ['modelo' => '321', 'color' => '002', 'talla' => 'XL', 'code' => '10643321002XL'],\n ['modelo' => '321', 'color' => '011', 'talla' => 'L', 'code' => '10643321011L'],\n ['modelo' => '321', 'color' => '011', 'talla' => 'M', 'code' => '10643321011M'],\n ['modelo' => '321', 'color' => '011', 'talla' => 'S', 'code' => '10643321011S'],\n ['modelo' => '321', 'color' => '011', 'talla' => 'XL', 'code' => '10643321011XL'],\n ['modelo' => '321', 'color' => '018', 'talla' => 'L', 'code' => '10643321018L'],\n ['modelo' => '321', 'color' => '018', 'talla' => 'M', 'code' => '10643321018M'],\n ['modelo' => '321', 'color' => '018', 'talla' => 'S', 'code' => '10643321018S'],\n ['modelo' => '321', 'color' => '018', 'talla' => 'XL', 'code' => '10643321018XL'],\n ['modelo' => '321', 'color' => '245', 'talla' => 'L', 'code' => '10643321245L'],\n ['modelo' => '321', 'color' => '245', 'talla' => 'M', 'code' => '10643321245M'],\n ['modelo' => '321', 'color' => '245', 'talla' => 'S', 'code' => '10643321245S'],\n ['modelo' => '321', 'color' => '245', 'talla' => 'XL', 'code' => '10643321245XL'],\n ['modelo' => '379', 'color' => '001', 'talla' => 'L', 'code' => '10612379001L'],\n ['modelo' => '379', 'color' => '001', 'talla' => 'M', 'code' => '10612379001M'],\n ['modelo' => '379', 'color' => '001', 'talla' => 'S', 'code' => '10612379001S'],\n ['modelo' => '379', 'color' => '001', 'talla' => 'XL', 'code' => '10612379001XL'],\n ['modelo' => '379', 'color' => '002', 'talla' => 'L', 'code' => '10612379002L'],\n ['modelo' => '379', 'color' => '002', 'talla' => 'M', 'code' => '10612379002M'],\n ['modelo' => '379', 'color' => '002', 'talla' => 'S', 'code' => '10612379002S'],\n ['modelo' => '379', 'color' => '002', 'talla' => 'XL', 'code' => '10612379002XL'],\n ['modelo' => '379', 'color' => '011', 'talla' => 'L', 'code' => '10612379011L'],\n ['modelo' => '379', 'color' => '011', 'talla' => 'M', 'code' => '10612379011M'],\n ['modelo' => '379', 'color' => '011', 'talla' => 'S', 'code' => '10612379011S'],\n ['modelo' => '379', 'color' => '011', 'talla' => 'XL', 'code' => '10612379011XL'],\n ['modelo' => '379', 'color' => '018', 'talla' => 'L', 'code' => '10612379018L'],\n ['modelo' => '379', 'color' => '018', 'talla' => 'M', 'code' => '10612379018M'],\n ['modelo' => '379', 'color' => '018', 'talla' => 'S', 'code' => '10612379018S'],\n ['modelo' => '379', 'color' => '018', 'talla' => 'XL', 'code' => '10612379018XL'],\n ['modelo' => '379', 'color' => '245', 'talla' => 'L', 'code' => '10612379245L'],\n ['modelo' => '379', 'color' => '245', 'talla' => 'M', 'code' => '10612379245M'],\n ['modelo' => '379', 'color' => '245', 'talla' => 'S', 'code' => '10612379245S'],\n ['modelo' => '379', 'color' => '245', 'talla' => 'XL', 'code' => '10612379245XL'],\n ['modelo' => '491', 'color' => '002', 'talla' => 'L', 'code' => '10611491002L'],\n ['modelo' => '491', 'color' => '002', 'talla' => 'M', 'code' => '10611491002M'],\n ['modelo' => '491', 'color' => '002', 'talla' => 'S', 'code' => '10611491002S'],\n ['modelo' => '491', 'color' => '002', 'talla' => 'XL', 'code' => '10611491002XL'],\n ['modelo' => '491', 'color' => '002', 'talla' => 'XXL', 'code' => '10611491002XXL'],\n ['modelo' => '491', 'color' => '248', 'talla' => 'L', 'code' => '10611491248L'],\n ['modelo' => '491', 'color' => '248', 'talla' => 'M', 'code' => '10611491248M'],\n ['modelo' => '491', 'color' => '248', 'talla' => 'S', 'code' => '10611491248S'],\n ['modelo' => '491', 'color' => '248', 'talla' => 'XL', 'code' => '10611491248XL'],\n ['modelo' => '491', 'color' => '248', 'talla' => 'XXL', 'code' => '10611491248XXL'],\n ['modelo' => '331', 'color' => '001', 'talla' => 'L', 'code' => '10643331001L'],\n ['modelo' => '331', 'color' => '001', 'talla' => 'M', 'code' => '10643331001M'],\n ['modelo' => '331', 'color' => '001', 'talla' => 'S', 'code' => '10643331001S'],\n ['modelo' => '331', 'color' => '001', 'talla' => 'XL', 'code' => '10643331001XL'],\n ['modelo' => '331', 'color' => '002', 'talla' => 'L', 'code' => '10643331002L'],\n ['modelo' => '331', 'color' => '002', 'talla' => 'M', 'code' => '10643331002M'],\n ['modelo' => '331', 'color' => '002', 'talla' => 'S', 'code' => '10643331002S'],\n ['modelo' => '331', 'color' => '002', 'talla' => 'XL', 'code' => '10643331002XL'],\n ['modelo' => '331', 'color' => '011', 'talla' => 'L', 'code' => '10643331011L'],\n ['modelo' => '331', 'color' => '011', 'talla' => 'M', 'code' => '10643331011M'],\n ['modelo' => '331', 'color' => '011', 'talla' => 'S', 'code' => '10643331011S'],\n ['modelo' => '331', 'color' => '011', 'talla' => 'XL', 'code' => '10643331011XL'],\n ['modelo' => '331', 'color' => '018', 'talla' => 'L', 'code' => '10643331018L'],\n ['modelo' => '331', 'color' => '018', 'talla' => 'M', 'code' => '10643331018M'],\n ['modelo' => '331', 'color' => '018', 'talla' => 'S', 'code' => '10643331018S'],\n ['modelo' => '331', 'color' => '018', 'talla' => 'XL', 'code' => '10643331018XL'],\n ['modelo' => '331', 'color' => '245', 'talla' => 'L', 'code' => '10643331245L'],\n ['modelo' => '331', 'color' => '245', 'talla' => 'M', 'code' => '10643331245M'],\n ['modelo' => '331', 'color' => '245', 'talla' => 'S', 'code' => '10643331245S'],\n ['modelo' => '331', 'color' => '245', 'talla' => 'XL', 'code' => '10643331245XL'],\n ['modelo' => '369', 'color' => '002', 'talla' => 'L', 'code' => '10611369002L'],\n ['modelo' => '369', 'color' => '002', 'talla' => 'M', 'code' => '10611369002M'],\n ['modelo' => '369', 'color' => '002', 'talla' => 'S', 'code' => '10611369002S'],\n ['modelo' => '369', 'color' => '179', 'talla' => 'L', 'code' => '10611369179L'],\n ['modelo' => '369', 'color' => '179', 'talla' => 'M', 'code' => '10611369179M'],\n ['modelo' => '369', 'color' => '179', 'talla' => 'S', 'code' => '10611369179S'],\n ['modelo' => '369', 'color' => '248', 'talla' => 'M', 'code' => '10611369248M'],\n ['modelo' => '369', 'color' => '248', 'talla' => 'S', 'code' => '10611369248S'],\n ['modelo' => '316', 'color' => '001', 'talla' => 'L', 'code' => '10201316001L'],\n ['modelo' => '316', 'color' => '001', 'talla' => 'M', 'code' => '10201316001M'],\n ['modelo' => '316', 'color' => '001', 'talla' => 'S', 'code' => '10201316001S'],\n ['modelo' => '316', 'color' => '002', 'talla' => 'L', 'code' => '10201316002L'],\n ['modelo' => '316', 'color' => '002', 'talla' => 'M', 'code' => '10201316002M'],\n ['modelo' => '316', 'color' => '002', 'talla' => 'S', 'code' => '10201316002S'],\n ['modelo' => '316', 'color' => '004', 'talla' => 'L', 'code' => '10201316004L'],\n ['modelo' => '316', 'color' => '004', 'talla' => 'M', 'code' => '10201316004M'],\n ['modelo' => '316', 'color' => '004', 'talla' => 'S', 'code' => '10201316004S'],\n ['modelo' => '316', 'color' => '011', 'talla' => 'L', 'code' => '10201316011L'],\n ['modelo' => '316', 'color' => '011', 'talla' => 'M', 'code' => '10201316011M'],\n ['modelo' => '316', 'color' => '011', 'talla' => 'S', 'code' => '10201316011S'],\n ['modelo' => '316', 'color' => '015', 'talla' => 'L', 'code' => '10201316015L'],\n ['modelo' => '316', 'color' => '015', 'talla' => 'M', 'code' => '10201316015M'],\n ['modelo' => '316', 'color' => '015', 'talla' => 'S', 'code' => '10201316015S'],\n ['modelo' => '316', 'color' => '169', 'talla' => 'L', 'code' => '10201316169L'],\n ['modelo' => '316', 'color' => '169', 'talla' => 'M', 'code' => '10201316169M'],\n ['modelo' => '316', 'color' => '169', 'talla' => 'S', 'code' => '10201316169S'],\n ['modelo' => '503', 'color' => '002', 'talla' => 'L', 'code' => '10611503002L'],\n ['modelo' => '503', 'color' => '002', 'talla' => 'M', 'code' => '10611503002M'],\n ['modelo' => '503', 'color' => '002', 'talla' => 'S', 'code' => '10611503002S'],\n ['modelo' => '503', 'color' => '002', 'talla' => 'XL', 'code' => '10611503002XL'],\n ['modelo' => '503', 'color' => '248', 'talla' => 'L', 'code' => '10611503248L'],\n ['modelo' => '503', 'color' => '248', 'talla' => 'M', 'code' => '10611503248M'],\n ['modelo' => '503', 'color' => '248', 'talla' => 'S', 'code' => '10611503248S'],\n ['modelo' => '503', 'color' => '248', 'talla' => 'XL', 'code' => '10611503248XL'],\n ['modelo' => '554', 'color' => '002', 'talla' => '32', 'code' => '1284655400232'],\n ['modelo' => '554', 'color' => '002', 'talla' => '34', 'code' => '1284655400234'],\n ['modelo' => '554', 'color' => '002', 'talla' => '36', 'code' => '1284655400236'],\n ['modelo' => '554', 'color' => '343', 'talla' => '32', 'code' => '1284655434332'],\n ['modelo' => '554', 'color' => '343', 'talla' => '34', 'code' => '1284655434334'],\n ['modelo' => '554', 'color' => '343', 'talla' => '36', 'code' => '1284655434336'],\n ['modelo' => '554', 'color' => '371', 'talla' => '32', 'code' => '1284655437132'],\n ['modelo' => '554', 'color' => '371', 'talla' => '34', 'code' => '1284655437134'],\n ['modelo' => '554', 'color' => '371', 'talla' => '36', 'code' => '1284655437136'],\n ['modelo' => '550', 'color' => '002', 'talla' => '32', 'code' => '1289855000232'],\n ['modelo' => '550', 'color' => '002', 'talla' => '34', 'code' => '1289855000234'],\n ['modelo' => '550', 'color' => '002', 'talla' => '36', 'code' => '1289855000236'],\n ['modelo' => '550', 'color' => '343', 'talla' => '32', 'code' => '1289855034332'],\n ['modelo' => '550', 'color' => '343', 'talla' => '34', 'code' => '1289855034334'],\n ['modelo' => '550', 'color' => '343', 'talla' => '36', 'code' => '1289855034336'],\n ['modelo' => '550', 'color' => '371', 'talla' => '32', 'code' => '1289855037132'],\n ['modelo' => '550', 'color' => '371', 'talla' => '34', 'code' => '1289855037134'],\n ['modelo' => '550', 'color' => '371', 'talla' => '36', 'code' => '1289855037136'],\n ['modelo' => '552', 'color' => '002', 'talla' => '32', 'code' => '1282455200232'],\n ['modelo' => '552', 'color' => '002', 'talla' => '34', 'code' => '1282455200234'],\n ['modelo' => '552', 'color' => '002', 'talla' => '36', 'code' => '1282455200236'],\n ['modelo' => '552', 'color' => '343', 'talla' => '32', 'code' => '1282455234332'],\n ['modelo' => '552', 'color' => '343', 'talla' => '34', 'code' => '1282455234334'],\n ['modelo' => '552', 'color' => '343', 'talla' => '36', 'code' => '1282455234336'],\n ['modelo' => '552', 'color' => '371', 'talla' => '32', 'code' => '1282455237132'],\n ['modelo' => '552', 'color' => '371', 'talla' => '34', 'code' => '1282455237134'],\n ['modelo' => '552', 'color' => '371', 'talla' => '36', 'code' => '1282455237136'],\n ['modelo' => '556', 'color' => '002', 'talla' => 'L', 'code' => '10416556002L'],\n ['modelo' => '556', 'color' => '002', 'talla' => 'M', 'code' => '10416556002M'],\n ['modelo' => '556', 'color' => '002', 'talla' => 'S', 'code' => '10416556002S'],\n ['modelo' => '556', 'color' => '343', 'talla' => 'L', 'code' => '10416556343L'],\n ['modelo' => '556', 'color' => '343', 'talla' => 'M', 'code' => '10416556343M'],\n ['modelo' => '556', 'color' => '343', 'talla' => 'S', 'code' => '10416556343S'],\n ['modelo' => '556', 'color' => '371', 'talla' => 'L', 'code' => '10416556371L'],\n ['modelo' => '556', 'color' => '371', 'talla' => 'M', 'code' => '10416556371M'],\n ['modelo' => '556', 'color' => '371', 'talla' => 'S', 'code' => '10416556371S'],\n ['modelo' => '551', 'color' => '002', 'talla' => 'L', 'code' => '10246551002L'],\n ['modelo' => '551', 'color' => '002', 'talla' => 'M', 'code' => '10246551002M'],\n ['modelo' => '551', 'color' => '002', 'talla' => 'S', 'code' => '10246551002S'],\n ['modelo' => '551', 'color' => '343', 'talla' => 'L', 'code' => '10246551343L'],\n ['modelo' => '551', 'color' => '343', 'talla' => 'M', 'code' => '10246551343M'],\n ['modelo' => '551', 'color' => '343', 'talla' => 'S', 'code' => '10246551343S'],\n ['modelo' => '551', 'color' => '371', 'talla' => 'L', 'code' => '10246551371L'],\n ['modelo' => '551', 'color' => '371', 'talla' => 'M', 'code' => '10246551371M'],\n ['modelo' => '551', 'color' => '371', 'talla' => 'S', 'code' => '10246551371S'],\n ['modelo' => '553', 'color' => '002', 'talla' => 'L', 'code' => '10416553002L'],\n ['modelo' => '553', 'color' => '002', 'talla' => 'M', 'code' => '10416553002M'],\n ['modelo' => '553', 'color' => '002', 'talla' => 'S', 'code' => '10416553002S'],\n ['modelo' => '553', 'color' => '343', 'talla' => 'L', 'code' => '10416553343L'],\n ['modelo' => '553', 'color' => '343', 'talla' => 'M', 'code' => '10416553343M'],\n ['modelo' => '553', 'color' => '343', 'talla' => 'S', 'code' => '10416553343S'],\n ['modelo' => '553', 'color' => '371', 'talla' => 'L', 'code' => '10416553371L'],\n ['modelo' => '553', 'color' => '371', 'talla' => 'M', 'code' => '10416553371M'],\n ['modelo' => '553', 'color' => '371', 'talla' => 'S', 'code' => '10416553371S'],\n ['modelo' => '277', 'color' => '096', 'talla' => 'L', 'code' => '10580277096L'],\n ['modelo' => '277', 'color' => '096', 'talla' => 'M', 'code' => '10580277096M'],\n ['modelo' => '277', 'color' => '096', 'talla' => 'S', 'code' => '10580277096S'],\n ['modelo' => '277', 'color' => '209', 'talla' => 'L', 'code' => '10580277209L'],\n ['modelo' => '277', 'color' => '209', 'talla' => 'M', 'code' => '10580277209M'],\n ['modelo' => '277', 'color' => '209', 'talla' => 'S', 'code' => '10580277209S'],\n ['modelo' => '277', 'color' => '213', 'talla' => 'L', 'code' => '10580277213L'],\n ['modelo' => '277', 'color' => '213', 'talla' => 'M', 'code' => '10580277213M'],\n ['modelo' => '277', 'color' => '213', 'talla' => 'S', 'code' => '10580277213S'],\n ['modelo' => '288', 'color' => '001', 'talla' => 'L', 'code' => '10582288001L'],\n ['modelo' => '288', 'color' => '001', 'talla' => 'M', 'code' => '10582288001M'],\n ['modelo' => '288', 'color' => '001', 'talla' => 'S', 'code' => '10582288001S'],\n ['modelo' => '288', 'color' => '002', 'talla' => 'L', 'code' => '10582288002L'],\n ['modelo' => '288', 'color' => '002', 'talla' => 'M', 'code' => '10582288002M'],\n ['modelo' => '288', 'color' => '002', 'talla' => 'S', 'code' => '10582288002S'],\n ['modelo' => '288', 'color' => '015', 'talla' => 'L', 'code' => '10582288015L'],\n ['modelo' => '288', 'color' => '015', 'talla' => 'M', 'code' => '10582288015M'],\n ['modelo' => '288', 'color' => '015', 'talla' => 'S', 'code' => '10582288015S'],\n ];\n\n foreach ($productos as $producto) {\n $modelo_find = Modelo::where('code', '=', $producto['modelo'])->first();\n $color_find = Color::where('code', '=', $producto['color'])->first();\n $talla_find = Talla::where('code', '=', $producto['talla'])->first();\n\n if ($modelo_find && $color_find && $talla_find) {\n Producto::create([\n 'modelo_id' => $modelo_find->id,\n 'color_id' => $color_find->id,\n 'talla_id' => $talla_find->id,\n 'stock' => 0,\n 'code' => $producto['code'],\n ]);\n }\n \n }\n }", "private function getProducts() {\n\n $products = [];\n\n $args = array(\n 'post_type' => 'product'\n );\n $loop = new WP_Query( $args );\n if ( $loop->have_posts() ) {\n while ( $loop->have_posts() ) :\n $loop->the_post();\n $product = new Product();\n $product->setTitle(get_the_title());\n $product->setId(get_the_ID());\n $products[] = $product;\n endwhile;\n }\n wp_reset_postdata();\n\n return $products;\n }", "public function getBasketProducts(): array\n\t{\n\t\tif ($this->basketProducts === null) {\n\t\t\t$this->basketProducts = [];\n\n\t\t\tforeach ($this->basketSection->products as $productId => $data) {\n\t\t\t\tif (\n\t\t\t\t\t!isset($data['quantity'])\n\t\t\t\t\t|| !is_int($data['quantity'])\n\t\t\t\t\t|| !($product = $this->productService->getProductById($productId))\n\t\t\t\t) {\n\t\t\t\t\t$this->removeFromBasket($productId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->basketProducts[$productId] = [\n\t\t\t\t\t'product' => $product,\n\t\t\t\t\t'quantity' => $data['quantity'],\n\t\t\t\t];\n\t\t\t\t$this->basketProductsCount += $data['quantity'];\n\t\t\t\t$this->basketProductsPrice += (float) $product['price'] * (int) $data['quantity'];\n\t\t\t}\n\t\t}\n\n\t\treturn $this->basketProducts;\n\t}", "public static function getOrderProducts($_oID) {\n global $lC_Database;\n \n $QorderProducts = $lC_Database->query('select * from :table_orders_products where orders_id = :orders_id order by orders_products_id asc');\n $QorderProducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);\n $QorderProducts->bindInt(':orders_id', $_oID);\n $QorderProducts->execute();\n $orders_products_array = array();\n while ($QorderProducts->next()) {\n $orders_products_array[] = array('id' => $QorderProducts->valueInt('products_id'),\n 'quantity' => $QorderProducts->valueInt('products_quantity'),\n 'name' => $QorderProducts->value('products_name'),\n 'model' => $QorderProducts->value('products_model'),\n 'price' => $QorderProducts->value('products_price'));\n }\n \n return $orders_products_array;\n \n $QorderProducts->freeResult(); \n }", "public function DetalleProductosPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "public function getAll(){\n //hacemos la consulta y lo guardamos en una variable\n $productos=$this->db->query(\"SELECT * FROM pedidos order by id desc;\");\n //devolvemos un valor en especifico.\n return $productos;\n }", "function getProducts()\n {\n $db = $this->getPearDb();\n\n // The query is big, but it does use indexes. Anyway, the involved\n // tables almost never change, so we utilize MySQL's query cache\n $sql = \"(\n # User permissions\n SELECT DISTINCT pe_u.parameterValue AS productId\n FROM user u\n JOIN permission pe_u\n ON pe_u.doerId = u.id\n AND pe_u.allowed = '1'\n AND pe_u.actionId = 6 # 6 = use_product\n WHERE u.customerId = \" . $this->id . \"\n\n ) UNION (\n\n # Customer permissions\n SELECT DISTINCT pe_c.parameterValue AS productId\n FROM permission pe_c\n WHERE pe_c.doerId = \" . $this->id . \"\n AND pe_c.allowed = '1'\n AND pe_c.actionId = 6 # 6 = use_product\n\n ) UNION (\n\n SELECT productId\n FROM site s\n WHERE s.customerId = \" . $this->id . \"\n\n ) UNION (\n\n # Kollage is always on\n SELECT 1\n\n )\";\n $productIds = $db->getCol($sql);\n $productIds = array_filter(array_unique($productIds), 'intval');\n\n $product = new Vip_Product;\n $product->columnIn('id', $productIds);\n // Customer-specific products are only enabled for that customer.\n $product->addWhereSql('customerId IN (0, ' . $this->id . ')');\n $product->setOrderBySql('sortOrder,title');\n $products = $product->findAll();\n foreach ($products as $product) {\n $product->setCustomer($this);\n }\n\n return $products;\n }", "public function getProducts() \n {\n return $this->_products;\n }", "public function products()\n {\n return $this->morphedByMany(Product::class, 'bundleable');\n }", "public function run()\n {\n $products = [\n ['prodName'=>'Torta de chocolate','prodPrecio'=>'255','prodStock'=>'10','prodDesc'=>'Exquisita torta casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '1'],\n ['prodName'=>'Torta de ricota','prodPrecio'=>'235','prodStock'=>'10','prodDesc'=>'Exquisita torta casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '2'],\n ['prodName'=>'Tarta de espinaca','prodPrecio'=>'135','prodStock'=>'10','prodDesc'=>'Exquisita tarta casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '3'],\n ['prodName'=>'Budin de pan','prodPrecio'=>'335','prodStock'=>'10','prodDesc'=>'Exquisito budin casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '4'],\n ['prodName'=>'Empanada de atun','prodPrecio'=>'225','prodStock'=>'10','prodDesc'=>'Exquisita empanada casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '5'],\n ['prodName'=>'Ensalada de fruta','prodPrecio'=>'115','prodStock'=>'10','prodDesc'=>'Una fresca ensalada casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '6'],\n ['prodName'=>'Bomba de papa','prodPrecio'=>'345','prodStock'=>'10','prodDesc'=>'Exquisita bomba de papa casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '7'],\n ['prodName'=>'Sopa de zapallo','prodPrecio'=>'535','prodStock'=>'10','prodDesc'=>'Exquisita sopa casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '8'],\n ['prodName'=>'Albondigas con salsa','prodPrecio'=>'235','prodStock'=>'10','prodDesc'=>'Exquisitas albondigas caseras.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '9'],\n ['prodName'=>'Guiso de lentejas','prodPrecio'=>'135','prodStock'=>'10','prodDesc'=>'Exquisito guiso de lentejas.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '10'],\n ['prodName'=>'Pastel de papa','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'Exquisito pastel de papa casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '11'],\n ['prodName'=>'Medialunas con miel','prodPrecio'=>'235','prodStock'=>'10','prodDesc'=>'Exquisitas medialunas con miel casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '12'],\n ['prodName'=>'Tortilla de zapallo','prodPrecio'=>'335','prodStock'=>'10','prodDesc'=>'Exquisita tortilla de papa casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '13'],\n ['prodName'=>'Falafel','prodPrecio'=>'135','prodStock'=>'10','prodDesc'=>'Exquisito falafel casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '14'],\n ['prodName'=>'Cheesecake','prodPrecio'=>'735','prodStock'=>'10','prodDesc'=>'Exquisito cheesecake casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '15'],\n ['prodName'=>'Lasagna','prodPrecio'=>'535','prodStock'=>'10','prodDesc'=>'Exquisita lasagna casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '16'],\n ['prodName'=>'Milanesa','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'Exquisita milanesa casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '17'],\n ['prodName'=>'Lemonpie','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'Exquisito lemonpie casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '18'],\n ['prodName'=>'Anillos de cebolla','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'Exquisitos anillos de cebolla caseros.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '19'],\n ['prodName'=>'Torta romana','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'La mejor torta.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '20'],\n ];\n $ingredients = [\n ['name'=>'Lechuga', 'id' => '1'], ['name'=>'Tomate', 'id' => '2'], ['name'=>'Chocolate', 'id' => '3'],\n ['name'=>'Ricota', 'id' => '4'], ['name'=>'Queso', 'id' => '5'], ['name'=>'Crema', 'id' => '6'],\n ['name'=>'Papa', 'id' => '7'], ['name'=>'Atun', 'id' => '8'], ['name'=>'Zapallo', 'id' => '9'],\n ['name'=>'Lentejas', 'id' => '10'], ['name'=>'Espinaca', 'id' => '11'], ['name'=>'Cebolla', 'id' => '12'],\n ['name'=>'Pan', 'id' => '13'], ['name'=>'Limon', 'id' => '14'], ['name'=>'Fruta', 'id' => '15'],\n ['name'=>'Miel', 'id' => '16'],\n ];\n $categories = [\n ['name'=>'Tortas', 'id' => '1'], ['name'=>'Tartas', 'id' => '2'], ['name'=>'Empanadas', 'id' => '3'],\n ['name'=>'Guisos', 'id' => '4'], ['name'=>'Sopas', 'id' => '5'], ['name'=>'Pastas', 'id' => '6'],\n ['name'=>'Carnes', 'id' => '7'], ['name'=>'Verduras', 'id' => '8'], ['name'=>'Ensaladas', 'id' => '9'],\n ['name'=>'Entradas', 'id' => '9'], ['name'=>'Pasteleria', 'id' => '10'],\n ];\n foreach ($products as $product) {\n DB::table('products')->insert([\n 'name' => $product['prodName'],\n 'price'=> $product['prodPrecio'],\n 'stock'=> $product['prodStock'],\n 'description'=> $product['prodDesc'],\n 'flavour'=> $product['prodSabor'],\n 'image'=> $product['prodImagen'],\n ]);\n }\n foreach ($ingredients as $ingredient) {\n DB::table('ingredients')->insert([\n 'name' => $ingredient['name'],\n ]);\n }\n foreach ($categories as $category) {\n DB::table('categories')->insert([\n 'name' => $category['name'],\n ]);\n }\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'last_name' => 'ADMIN',\n 'country' => 'Matrix',\n 'province' => 'Hacker',\n 'email' => '[email protected]',\n 'password' => Hash::make('asd123'),\n 'age' => '18',\n 'admin' => '1',\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[0]['id'],\n 'ingredient_id' => $ingredients[2]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[0]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[1]['id'],\n 'ingredient_id' => $ingredients[3]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[1]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[2]['id'],\n 'ingredient_id' => $ingredients[10]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[2]['id'],\n 'category_id' => $categories[1]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[3]['id'],\n 'ingredient_id' => $ingredients[12]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[3]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[4]['id'],\n 'ingredient_id' => $ingredients[7]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[4]['id'],\n 'category_id' => $categories[2]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[5]['id'],\n 'ingredient_id' => $ingredients[14]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[5]['id'],\n 'category_id' => $categories[8]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[6]['id'],\n 'ingredient_id' => $ingredients[7]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[6]['id'],\n 'category_id' => $categories[9]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[7]['id'],\n 'ingredient_id' => $ingredients[8]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[7]['id'],\n 'category_id' => $categories[4]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[8]['id'],\n 'ingredient_id' => $ingredients[5]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[8]['id'],\n 'category_id' => $categories[6]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[9]['id'],\n 'ingredient_id' => $ingredients[9]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[9]['id'],\n 'category_id' => $categories[3]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[10]['id'],\n 'ingredient_id' => $ingredients[6]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[10]['id'],\n 'category_id' => $categories[6]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[11]['id'],\n 'ingredient_id' => $ingredients[12]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[11]['id'],\n 'category_id' => $categories[9]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[12]['id'],\n 'ingredient_id' => $ingredients[8]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[12]['id'],\n 'category_id' => $categories[1]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[13]['id'],\n 'ingredient_id' => $ingredients[10]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[13]['id'],\n 'category_id' => $categories[7]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[14]['id'],\n 'ingredient_id' => $ingredients[4]['id'],\n ]);\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[14]['id'],\n 'ingredient_id' => $ingredients[5]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[14]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[15]['id'],\n 'ingredient_id' => $ingredients[1]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[15]['id'],\n 'category_id' => $categories[5]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[16]['id'],\n 'ingredient_id' => $ingredients[12]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[16]['id'],\n 'category_id' => $categories[6]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[17]['id'],\n 'ingredient_id' => $ingredients[13]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[17]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[18]['id'],\n 'ingredient_id' => $ingredients[11]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[18]['id'],\n 'category_id' => $categories[8]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[19]['id'],\n 'ingredient_id' => $ingredients[0]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[19]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[19]['id'],\n 'ingredient_id' => $ingredients[1]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[19]['id'],\n 'category_id' => $categories[1]['id'],\n ]);\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[19]['id'],\n 'ingredient_id' => $ingredients[2]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[19]['id'],\n 'category_id' => $categories[2]['id'],\n ]);\n\n }", "public function products()\n {\n //$products = $api->getAllProducts();\n //var_dump($products);\n // TODO save products to database\n }", "public function get_all_productes() \r\n\t{\r\n\t\t$res=mysql_query(\"select * from products\") or die(mysql_error());\r\n\t\treturn $res;\r\n\t}", "public function getProducts (){\n\t\t$cache = Zend_Registry::get('cache');\n\t\t// see if product - list is already in cache\n\t\tif(!$productArray = $cache->load('productsByManufacturerId'.$this->id)) {\n\t\t\t$productTable = Website_Model_CbFactory::factory('Website_Model_MysqlTable', 'product');\n\t\t\t$products = $productTable->fetchAll('manufacturer='.$this->id);\n\t\t\tforeach($products as $product){\n\t\t\t\t$productArray[] = Website_Model_CbFactory::factory('Website_Model_Product',$product->id);\n\t\t\t}\n\t\t\t$cache->save($productArray,'productsByManufacturerId'.$this->id,array('model'));\n\t\t}\n\t\treturn $productArray;\n\t}", "public function getProducts()\n {\n return $this->_products;\n }", "public function readProductosMarca()\n {\n $sql = 'SELECT nombre, id_producto, imagen_producto, producto, descripcion, precio\n FROM producto INNER JOIN marca USING(id_marca)\n WHERE id_marca = ? \n ORDER BY producto';\n $params = array($this->nombre);\n return Database::getRows($sql, $params);\n }", "public static function getProductOptions()\n {\n return self::get('product') ?: [];\n }", "public function buildBasketContent()\n {\n $orders = $this->getOrder();\n $basketArray = [];\n\n foreach($orders as $order){\n $portionId = $order['portionId'];\n $portion = Portion::where('id',$portionId)->get();\n $basketArray[] = [['portion'=>$portion], ['units'=> $order['unit']]];\n }\n return $basketArray;\n }", "public function index()\n {\n $products = ['Produto 1', 'Produto 2', 'Produto 3'];\n \n return $products;\n }", "public function productRetrieveAll(){\n\t\t$productId\t\t\t=\tself::getUserId();\n\t\t$productTable\t\t=\tself::getUserTable();\n\t\t$joinTable\t\t\t=\tself::getJoinTable();\n\t\t$productArray\t\t=\tself::getUserArray(); //multi dimension array output\t\t\n\t\t$dbFieldArray\t\t=\tarray();\n\t\tforeach($productArray as $prodIndex => $prodVal){\n\t\t\t$dbFieldArray[]\t=\t$productArray[$prodIndex][0]; //Get db fields only from multi dimension array\n\t\t}\t\t\n\t\t$productCond\t\t=\tself::getUserCond();\t\t\n\t\t$retArray\t\t\t=\tself::retrieveEntry($productTable, $dbFieldArray, $joinTable,$productCond);\n\t\t$returnValue \t\t= \tarray();\t\t\t \t \n\t\tforeach ($retArray as $retIndex => $retValue) {\n $$retIndex \t\t= \t$retValue;\n $mainArr \t\t=\texplode('|', $$retIndex);\t\t\t\n\t\t\t$returnValue[] \t= \t$mainArr;\t\t\t\t\t\t \n }\n\t\treturn $returnValue;\n\t}", "public function inventario_consultarProveedoresProducto($idProducto){\n \t\t\t\t\n \t\t$resultado = array();\t\n \t\t\t\n \t\t$query = \"SELECT \n\t\t\t\t\t\t\t PP.costo, P.nombre AS nombreProveedor, P.telefono1\n\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t tb_productos_proveedores AS PP\n\t\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t\t tb_proveedores AS P ON P.idProveedor = PP.idProveedor\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t PP.idProducto = '$idProducto'\";\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n \t\n }", "public function index()\n {\n $products = Product::all();\n $array = [];\n $ingr = '';\n $aler = '';\n foreach ($products as $product) {\n // añadir ingredientes\n $ingredientes = DB::select(DB::raw('select ingredients.name from ingredient_product,ingredients where ingredient_product.product_id = '. $product->id . ' and ingredient_product.ingredient_id = ingredients.id;'));\n foreach ($ingredientes as $key) {\n $ingr .= $key->name.', ';\n }\n $ingr = substr_replace($ingr, '', -2);\n $product['ingredients'] = $ingr;\n // añadir alergenos\n $alergenos = DB::select(DB::raw('select allergens.name from allergen_product,allergens where allergen_product.product_id = '. $product->id . ' and allergen_product.allergen_id = allergens.id;'));\n foreach ($alergenos as $key) {\n $aler .= $key->name.', ';\n }\n $aler = substr_replace($aler, '', -2);\n $product['allergens'] = $aler;\n $array[] = $product;\n $ingr = '';\n $aler = '';\n }\n return $array;\n;\n }", "public function get_products() {\n $product_ids = array();\n\n\t\tforeach ( $this->get_conditions() as $condition ) {\n\t\t\tif ( isset( $condition['product_ids'] ) && is_array( $condition['product_ids'] ) ) {\n\t\t\t\t$product_ids = array_merge( $product_ids, $condition['product_ids'] );\n\t\t\t}\n\t\t}\n\n\t\t$products = array();\n\t\tforeach ( $product_ids as $product_id ) {\n\t\t\t$product = wc_get_product( $product_id );\n\t\t\tif ( $product ) {\n\t\t\t\t$products[$product_id] = wp_kses_post( $product->get_formatted_name() );\n\t\t\t}\n\t\t}\n\n\t\treturn $products;\n }", "public function getProducts()\n {\n return $this->basket->products()->get();\n }", "public function getAll()\n {\n return $this->products;\n }", "public function getFullCart()\n {\n $completeCart = [];\n\n if ($this->get())\n {\n foreach ($this->get() as $id => $quantity)\n {\n $product = $this->em->getRepository(Product::class)->findOneById($id);\n\n if (!$product)\n {\n $this->delete($id);\n continue;\n }\n\n $completeCart[] = [\n 'product' => $product,\n 'quantity' => $quantity,\n ];\n }\n }\n\n return $completeCart;\n }", "public function getAllproducts() {\r\n\r\n\t\t$res = $this->db->get('items');\r\n\r\n\t\treturn $res->result();\r\n\t}", "public function mostrarProductos() {\n //String $retorno\n //Array Producto $col\n $retorno = \"\";\n $col = $this->getColProductos();\n for ($i = 0; $i < count($col); $i++) {\n $retorno .= $col[$i] . \"\\n\";\n $retorno .= \"-------------------------\\n\";\n }\n return $retorno;\n }", "public function getCheckoutProducts()\r\n\t{\r\n\t\t$products = array();\r\n\t\t\r\n\t\tforeach (Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems() as $item)\r\n\t\t{\r\n\t\t\t$args = $this->getDefaultProductIdentifiers($item);\r\n\t\t\t\r\n\t\t\t$variant = array();\r\n\t\t\t\t\r\n\t\t\t/**\r\n\t\t\t * Handle configurable products\r\n\t\t\t */\r\n\t\t\tif ($item->getProduct()->isConfigurable())\r\n\t\t\t{\r\n\t\t\t\t$parent = Mage::getModel('catalog/product')->load\r\n\t\t\t\t(\r\n\t\t\t\t\t$item->getProductId()\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Swap configurable data\r\n\t\t\t\t * \r\n\t\t\t\t * @var stdClass\r\n\t\t\t\t */\r\n\t\t\t\t$args = $this->getConfigurableProductIdentifiers($args, $parent);\r\n\t\t\t\t\r\n\t\t\t\tif ($item instanceof Mage_Sales_Model_Quote_Item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$request = new Varien_Object(unserialize($item->getOptionByCode('info_buyRequest')->getValue()));\r\n\t\t\t\t}\r\n\t\t\t\telse if ($item instanceof Mage_Sales_Model_Order_Item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$request = new Varien_Object($item->getProductOptions());\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t$options = $request->getData();\r\n\t\t\t\r\n\t\t\t\tif (isset($options['super_attribute']) && is_array($options['super_attribute']))\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($options['super_attribute'] as $id => $option)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$attribute = Mage::getModel('catalog/resource_eav_attribute')->load($id);\r\n\t\t\t\r\n\t\t\t\t\t\tif ($attribute->usesSource())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$variant[] = join(':', array\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t$this->jsQuoteEscape($attribute->getFrontendLabel()),\r\n\t\t\t\t\t\t\t\t$this->jsQuoteEscape($attribute->getSource()->getOptionText($option))\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\t\t\r\n\t\t\t/**\r\n\t\t\t * Handle products with custom options\r\n\t\t\t */\r\n\t\t\tif (1 === (int) $item->getProduct()->getHasOptions())\r\n\t\t\t{\r\n\t\t\t\tif ($item instanceof Mage_Sales_Model_Quote_Item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$request = new Varien_Object(unserialize($item->getOptionByCode('info_buyRequest')->getValue()));\r\n\t\t\t\t}\r\n\t\t\t\telse if ($item instanceof Mage_Sales_Model_Order_Item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$request = new Varien_Object($item->getProductOptions());\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tif ((int) $request->getProduct() > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$parent = Mage::getModel('catalog/product')->load\r\n\t\t\t\t\t(\r\n\t\t\t\t\t\t$request->getProduct()\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ($this->useConfigurableParent())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$args->id \t= $parent->getSku();\t\t\t\t\t\r\n\t\t\t\t\t\t$args->name = $parent->getName();\r\n\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 * Get field to use for variants\r\n\t\t\t\t\t *\r\n\t\t\t\t\t * @var string\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t$field = Mage::helper('ec')->getOptionUseField();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tforeach ($parent->getProductOptionsCollection() as $option)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$data = $parent->getOptionById($option['option_id']);\r\n\t\t\t\r\n\t\t\t\t\t\tswitch($data->getType())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase 'drop_down':\r\n\t\t\t\t\t\t\t\tforeach ($data->getValues() as $value)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$options[] = array\r\n\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t'id' \t=> $value->getOptionTypeId(),\r\n\t\t\t\t\t\t\t\t\t\t'value' => $value->getData($field),\r\n\t\t\t\t\t\t\t\t\t\t'title' => $data->getTitle()\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'field':\r\n\t\t\t\t\t\t\t\t$options[] = array\r\n\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t'value' => (string) $data->getData($field)\r\n\t\t\t\t\t\t\t\t);\r\n\t\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\t\t\r\n\t\t\t\t\tif ($request->getOptions() && is_array($request->getOptions()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach ($options as $option)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach ($request->getOptions() as $current)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (is_array($option) && isset($option['id']) && (int) $current === (int) $option['id'])\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$variant[] = join(':',array\r\n\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t$this->jsQuoteEscape($option['title']),\r\n\t\t\t\t\t\t\t\t\t\t$this->jsQuoteEscape($option['value'])\r\n\t\t\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$category = $this->getCategory\r\n\t\t\t(\r\n\t\t\t\tMage::helper('ec/session')->getTrace()->get($item->getProduct())\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$data = (object) array\r\n\t\t\t(\r\n\t\t\t\t'id' \t\t=> $this->jsQuoteEscape($args->id),\r\n\t\t\t\t'name' \t\t=> $this->jsQuoteEscape($args->name),\r\n\t\t\t\t'category' \t=> $this->jsQuoteEscape($category),\r\n\t\t\t\t'brand' \t=> $this->jsQuoteEscape($this->getBrandBySku($args->id)),\r\n\t\t\t\t'price' \t=> Mage::helper('ec/price')->getPrice($item->getProduct()),\r\n\t\t\t\t'quantity' \t=> $item->getQty(),\r\n\t\t\t\t'variant' \t=> join('-', $variant),\r\n\t\t\t\t'coupon'\t=> ''\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$products[] = $data;\r\n\t\t}\r\n\t\t\r\n\t\treturn $products;\r\n\t}", "public function getProductIds(): array\n {\n return $this->product_ids;\n }", "public function getProductos( $id ){\r\r\n $query = $this->db\r\r\n ->select(['c.producto_id AS id'])\r\r\n ->from('categorias_productos c')\r\r\n ->join('productos p ', 'c.producto_id = p.id','inner')\r\r\n //->order_by('orden','desc')\r\r\n ->where('c.categoria_id', $id)\r\r\n ->get()\r\r\n ->result_array();\r\r\n return ( ! empty($query) && is_array($query) ? $query : []);\r\r\n }", "public function getALL()\n {\n // Sentencia SQL\n $sql = \"SELECT categorias.nombre AS 'NombreDeLaCategoria', productos.* FROM productos INNER JOIN categorias ON categorias.id = productos.categoria_id ORDER BY stock ASC\";\n $productos = $this->conexion->query($sql);\n\n // Retorno el resultado a \"productosControlles.php\" al metodo \"gestion()\"\n return $productos;\n }", "public function getCategoriaProductos(){\n\t\t$sql = \"SELECT marca.marca, productos.id_producto, productos.nombre, productos.precio, productos.precio_total, productos.url_imagen, presentaciones.presentacion, proveedores.proveedor, marca.marca, tipo_producto.tipo_producto \n\t\tFROM productos \n\t\tINNER JOIN marca ON productos.id_marca = marca.id_marca \n\t\tINNER JOIN presentaciones ON productos.id_presentacion = presentaciones.id_presentacion \n\t\tINNER JOIN proveedores ON productos.id_proveedor = proveedores.id_proveedor \n\t\tINNER JOIN tipo_producto ON productos.id_tipo_producto = tipo_producto.id_tipo_producto \n\t\tWHERE productos.id_marca = ? AND productos.id_estado = 1 AND proveedores.id_estado = 3\";\n\t\t$params = array($this->id_marca);\n\t\treturn Database::getRows($sql, $params);\n\t}", "public function ctlBuscaProductos(){\n\n\t\t$respuesta = Datos::mdlProductos(\"productos\");\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"codProducto\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t}\n\t}", "public function ListarIngredientesVendidos() \n{\n\tself::SetNames();\n\t$sql =\"SELECT \n\tproductos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, productos.stockminimo, categorias.nomcategoria, SUM(detalleventas.cantventa) as cantidad \n\tFROM\n\t(productos LEFT OUTER JOIN detalleventas ON productos.codproducto=detalleventas.codproducto) LEFT OUTER JOIN categorias ON \n\tcategorias.codcategoria=productos.codcategoria WHERE detalleventas.codproducto is not null GROUP BY productos.codproducto\";\n\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}", "function getProduct()\n {\n $sql = \"SELECT * FROM \" . DB_NAME . \".`products`\";\n //echo $sql;exit();\n try {\n $result = $this->connexion->prepare($sql);\n $var = $result->execute();\n $products = [];\n\n while ($data = $result->fetch(PDO::FETCH_OBJ)) {\n $product = new ProductEntity();\n $product->setIdProduct($data->id);\n $product->setName($data->name);\n $product->setDomaine_realise($data->domaine_realise);\n $product->setTache_realisee($data->tache_realisee);\n $product->setImage($data->image);\n $product->setCreatedAt($data->createdat);\n\n $products[] = $product;\n }\n\n if ($products) {\n return $products;\n } else {\n return FALSE;\n }\n } catch (PDOException $th) {\n return NULL;\n }\n }", "public static function getProductsOptions()\n {\n return self::get('products') ?: [];\n }", "public function listaVentas()\n {\n $conexion = conexion::conectar();\n $sql = \"SELECT * FROM movimientos WHERE compra_venta ='v' order by id_producto asc;\";\n $stmt = $conexion->prepare($sql);\n $stmt->execute();\n $array = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt = null;\n return $array;\n }", "public function GetAllProducts(){\t\n\t \n\t try{\n\t\t $conn = DBConnection::GetConnection();\t\n\t\t $myquery= \"SELECT product_id,product_name,unit_price,image_name,description,category,quantity_in_stock FROM product\";\n\t\t $result= $conn->query($myquery);\n\t\t $products=array();\n\t\t foreach($result as $item)\n\t\t {\n\t\t\t $p1= new Product();\n\t\t\t $p1->productCode =$item[\"product_id\"];\n\t\t\t $p1->productName =$item[\"product_name\"];\n\t\t\t $p1->price =$item[\"unit_price\"];\n\t\t\t $p1->imageName=$item[\"image_name\"];\t\t\t \n\t\t\t $p1->description =$item[\"description\"];\n\t\t\t $p1->cate=$item[\"category\"];\n\t\t\t $p1->qty=$item[\"quantity_in_stock\"];\n\t\t\t array_push($products,$p1);\t\t\t \t\t\t \n\t\t }\n\t\t $conn =null;//To close the connection \n\t\t return $products;\n\t }catch(PDOException $e){\n\t\t echo 'Fail to connect';\n\t\t echo $e->getMessage();\n\t }\t\n\t\t \n }", "function get_products()\n{\n $products = [];\n\n $db = get_connection();\n\n $sql = <<<SQL\n SELECT *\n FROM products\n WHERE\n 1 = 1\nSQL;\n\n $results = $db->query($sql, PDO::FETCH_ASSOC);\n\n foreach ($results as $result) {\n $result = (array) $result;\n $result['images'] = get_images($result['id']);\n\n $products[] = $result;\n }\n\n return $products;\n}" ]
[ "0.74459785", "0.737285", "0.7353909", "0.7295343", "0.72635525", "0.7117612", "0.7108742", "0.7027665", "0.70043176", "0.6985387", "0.6943744", "0.6925094", "0.686199", "0.6800134", "0.67976576", "0.67959523", "0.6783057", "0.67370224", "0.6736678", "0.6729248", "0.672394", "0.67092335", "0.6667428", "0.6630434", "0.6621292", "0.6617096", "0.65512395", "0.6510724", "0.6501744", "0.6500788", "0.64925694", "0.64863116", "0.6486273", "0.6429518", "0.64139616", "0.6393964", "0.6372412", "0.63722193", "0.63703495", "0.6365479", "0.63518864", "0.6337863", "0.6332357", "0.6325807", "0.63158715", "0.6315194", "0.6314234", "0.63081473", "0.62972546", "0.62966514", "0.62815386", "0.6274745", "0.6270749", "0.626596", "0.62655497", "0.625733", "0.6244369", "0.6244369", "0.6244369", "0.6244369", "0.62440467", "0.62351483", "0.6230103", "0.62249124", "0.62160754", "0.6215631", "0.62096393", "0.620714", "0.62058294", "0.6193656", "0.6174102", "0.6172039", "0.6165824", "0.6160764", "0.61540246", "0.61514217", "0.61371905", "0.6135513", "0.6134746", "0.613103", "0.6126862", "0.61233795", "0.61201954", "0.6111361", "0.61022055", "0.6101906", "0.61007744", "0.6097829", "0.6096926", "0.60881", "0.6083972", "0.6083009", "0.60784614", "0.60780996", "0.6071711", "0.6062567", "0.6052016", "0.60503453", "0.6041424", "0.6038787", "0.6017249" ]
0.0
-1
Permite obtener todas las publicaciones que estan en el sitio
public function all() { $item = new Item; $items = $item->all(); View::renderJson($items); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublicaciones()\n {\n $publicaciones = $this->publicacionDAO->getPublicaciones();\n\n\n echo $this->renderer->render(\"view/listar-publicaciones.mustache\", array(\n \"title\" => \"Publicación\",\n \"publicaciones\" => Publicacion::toListArrayMap($publicaciones),\n \"estados\" => Estado::toListArrayMap($this->estadoDAO->getEstados())\n ));\n \n }", "public function findAllPublic(){\n $qb = $this->getMainPublicQb();\n return $qb->getQuery()->getResult();\n }", "public function getAllPublications() :array {\n $query='SELECT * FROM Publication ORDER BY ID;';\n $this->connection->executeQuery($query);\n \n return $this->connection->getResults();\n }", "public function getAllPublished();", "public function get_all_public_items () {\n\t\treturn array();\n\t}", "public function listAllPublishers(): array {\n\t\t$publishers = [];\n\t\t$q = $this->pdo->query(\"SELECT `Publisher` from `articles` GROUP BY `Publisher`\");\n\t\tforeach($q->fetchAll(PDO::FETCH_ASSOC) as $a){\n\t\t\tif(!in_array($a[\"Publisher\"], $publishers, true)){\n\t\t\t\t$publishers[] = $a[\"Publisher\"];\n\t\t\t}\n\t\t}\n\t\tsort($publishers);\n\t\treturn $publishers;\n\t}", "function mdatosPublicaciones(){\n\t\t$conexion = conexionbasedatos();\n\n\t\t$consulta = \"select * from final_publicacion order by FECHA_PUBLICACION desc; \";\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public static function getAllPublication() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllPublications(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n }\n \n return $data;\n }", "public function publicaciones(){\n\t\treturn $this->hasMany('App\\Publicacion', 'Pub_ID_Asp');\n\t}", "function ultimas_noticias_publicadas($limit) {\n\t\n\t\t$query = \"SELECT noticias.*, colaboradores.*\n\t\tFROM noticias, colaboradores\n\t\tWHERE noticias.id_colaborador=colaboradores.id_colaborador\n\t\tAND noticias.estado=1\n\t\tORDER BY noticias.fecha_insercion desc\n\t\tLIMIT 0,$limit\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function get_all()\n {\n $all = array();\n\n foreach (array(PUBLISHER_STATUS_OPEN, PUBLISHER_STATUS_DRAFT) as $status)\n {\n foreach(ee()->publisher_model->languages as $lang_id => $data)\n {\n $all[$status][$lang_id] = ee()->publisher_site_pages->get($lang_id, FALSE, $status, TRUE);\n }\n }\n\n return $all;\n }", "public function publicaciones() //Lleva ID del proveedor para hacer carga de BD\r\n\t{\r\n\t\t//Paso a ser totalmente otro modulo para generar mejor el proceso de visualizacion y carga de datos en la vistas\r\n\r\n\t}", "public function getCatalogue()\n {\n\n $json = file_get_contents($this->getBaseURL());\n\n if ($json !== null) {\n $data = json_decode($json, true);\n\n if (count($data) > 0) {\n\n // On enregistre les tableaux dans lesquels on va se \"promener\"\n $tabResults = $data['response']['docs'];\n\n if (count($tabResults) > 0) {\n\n // Pour chaque tableau (dans le tableau \"docs\"), on enregistre le Label, l'URI et les auteurs (nom/prenom)\n foreach ($tabResults as $key => $element) {\n $publication = new Publication($element['label_s'], $element['authFullName_s'], $element['uri_s'], $element['modifiedDate_s']);\n\n $this->addPublication($publication);\n }\n\n } else {\n echo MESSAGE_NO_RESULTS_AVAILABLE_ERROR;\n }\n } else {\n die(MESSAGE_NO_DATA_AVAILABLE_ERROR);\n }\n } else {\n die(MESSAGE_PROBLEM_WITH_URL_ERROR);\n }\n\n return $this->publications;\n\n }", "public static function getPublishers()\n\t{\n\t\treturn Publisher::getAll();\n\t}", "public function getAllPublicationsByDate() :array {\n $query='SELECT * FROM Publication ORDER BY date DESC;';\n $this->connection->executeQuery($query);\n \n return $this->connection->getResults();\n }", "public function findAll()\n {\n return $this->findBy(array(), array('fechaPublicacion' => 'DESC'));\n }", "public function index() {\n $this->Marca->recursive = 0;\n return $this->Marca->find('all', array('conditions' => array('publicado' => true)));\n }", "public static function getAllPublicationByDate() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllPublicationsByDate(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n }\n \n return $data;\n }", "public function getPublish();", "function getPublicPost() {\n return getAll(\"SELECT * FROM posting WHERE status= 'public'\");\n}", "public function getAllportariasPublicadasAprovadasEspera() {\r\n $this->db->select('*');\r\n $this->db->from('portaria');\r\n $this->db->where('status', 'Publicada')->or_where('status', 'Aprovada')->or_where('status', 'Espera')->or_where('status', 'Retornada');\r\n $this->db->join('tipo', 'portaria.idTipo = tipo.idTipo');\r\n $query = $this->db->get();\r\n return $query->result();\r\n }", "public static function getAllThesis() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllThesis(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n }\n \n return $data;\n }", "function loadPublicCalendars() {\n $sql = \"\n SELECT c.calendar_id, c.title, c.color\n FROM %s AS c\n WHERE c.surfer_id IS NULL\n ORDER BY c.title\n \";\n $result = $this->databaseQueryFmt($sql, $this->tableCalendars);\n if (!$result || $result->count() == 0) {\n // database error or no public calendars defined\n return FALSE;\n }\n\n $calendars = array();\n while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) {\n $calendars[] = $row;\n }\n\n return $calendars;\n }", "function users_publicity($limit=5,$usr='',$tipe=false,$random=false,$noid=false){\n\t$usr=($usr!='')?$usr:$_SESSION['ws-tags']['ws-user']['id'];\n\t$where=$tipe?safe_sql(' AND id_type_publicity=?',array($tipe)):'';\n\tif (!$random){\n\t\t$prefe=users_preferences($usr);\n\t\tif (count($prefe)==0) $random=true;\n\t\telse{\n\t\t\t$like=' AND (';$or='';\n\t\t\tforeach ($prefe as $typePre)\n\t\t\t\tforeach ($typePre as $row) {\n\t\t\t\t\t$like.=$or.safe_sql('title LIKE \"%??%\"',array($row->text));\n\t\t\t\t\tif (!$or) $or=' OR ';\n\t\t\t\t}\n\t\t\t$like.=')';\n\t\t}\n\t}\n\tif ($random){ $like='';\n\t\tif ($noid){\n\t\t\tif (!is_array($noid)) $like=\" AND id NOT IN ($noid)\";\n\t\t\telseif(count($noid)>0){\n\t\t\t\t$like=\"AND id NOT IN (\"; $c='';\n\t\t\t\tforeach ($noid as $key) {\n\t\t\t\t\t$like.=$c.$key;\n\t\t\t\t\tif (!$c) $c=\",\";\n\t\t\t\t}\n\t\t\t\t$like.=\")\";\n\t\t\t}\n\t\t}\n\t\t$like.=' ORDER BY RAND()';\n\t}\n\tif (!isset($like) || $like=='') return array();\n\t$publicity=CON::query(\"SELECT md5(id) AS id,\n\t\t\t\t\t\t\t\t id AS id_valida,\n\t\t\t\t\t\t\t\t link,\n\t\t\t\t\t\t\t\t picture,\n\t\t\t\t\t\t\t\t picture as picOri,\n\t\t\t\t\t\t\t\t title,\n\t\t\t\t\t\t\t\t id_cost,\n\t\t\t\t\t\t\t\t message\n\t\t\t\t\t\t\tFROM users_publicity\n\t\t\t\t\t\t\tWHERE status = '1'\n\t\t\t\t\t\t\tAND click_max > click_current $where $like LIMIT 0,$limit\");\n\t// echo CON::lastSql().\"<br><br><br>\";\n\t$res=array();$num=CON::numRows($publicity);$ids=array();\n\tif ($num==0 && $random===false) $res2=users_publicity(5,$usr,$tipe,true);\n\telse while ($row=CON::fetchAssoc($publicity)) {\n\t\tif ($row['id_cost']!='5') {\n\t\t\t$row['picture']=FILESERVER.getPublicityPicture('img/publicity/'.$row['picture'],'img/publicity/publicity_nofile.png');\n\t\t\t// $row['vari'] = 'no id_cost '.$row['picture'];\n\t\t} else {\n\t\t\t$row['picture']=$GLOBALS['config']->main_server.getPublicityPicture('img/publicity/'.$row['picture'],'img/publicity/publicity_nofile.png',$row['id_cost']);\n\t\t\t// $row['vari'] = 'id_cost '.$row['picture'];\n\t\t}\n\n\t\t$res[]=$row;$ids[]=$row['id_valida'];\n\t}\n\tif ($num<$limit && $random===false) $res2=users_publicity($limit-$num,$usr,$tipe,true,$ids);\n\tif (isset($res2)) $res=array_merge($res,$res2);\n\treturn $res;\n}", "public function getAllPublished()\n {\n $result = $this->getManyBy('status', 'publish');\n\n return $result;\n }", "function getPlacesOfPublication(){\n $placesOfPublication = $this->all('library:placeOfPublication');\n return $placesOfPublication;\n }", "public function index()\n {\n //$publicaciones = DB::table('publicaciones')->select('titulo')->where('id_usuario', Auth()->user()->id);\n $publicaciones = Publicacion::orderBy('id', 'DESC')->get();\n dd($publicaciones);\n //return view('publicaciones.index', compact('publicaciones'));\n }", "public function findAllOfficialDistributions() {}", "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('CMSBundle:Publication')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public static function getAllConferences() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllConferences(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n \n }\n \n return $data;\n }", "function fsf_cms_getPublications($fsfcms_pub_identifier)\n {\n global $fsfcms_api_url;\n if($fsfcms_pub_identifier == \"all\")\n {\n $fsf_api_options = \"\";\n } elseif(is_numeric($fsfcms_pub_identifier)) {\n $fsf_api_options = \"?publicationId=\" . $fsfcms_pub_identifier; \n } else {\n // TODO SEC Filter Input to Avoid SQL Injection, ETC also check to see if it is a valid slug\n $fsf_api_options = \"?publicationSlug=\" . $fsfcms_pub_identifier;\n }\n $fsf_api_file = \"fsf.cms.getPublications.php\"; \n $fsf_port_getPublications_content = fsf_preacher_curl($fsfcms_api_url, $fsf_api_file, $fsf_api_options);\n \n return $fsf_port_getPublications_content; \n }", "public function PublisherMembers() {\n\t\tif($this->owner->CanPublishType == 'OnlyTheseUsers'){\n\t\t\t$groups = $this->owner->PublisherGroups();\n\t\t\t$members = new DataObjectSet();\n\t\t\tif($groups) foreach($groups as $group) {\n\t\t\t\t$members->merge($group->Members());\n\t\t\t}\n\t\t\t\n\t\t\t// Default to ADMINs, if something goes wrong\n\t\t\tif(!$members->Count()) {\n\t\t\t\t$group = Permission::get_groups_by_permission('ADMIN')->first();\n\t\t\t\t$members = $group->Members();\n\t\t\t}\n\t\t\t\n\t\t\treturn $members;\n\t\t} elseif($this->owner->CanPublishType == 'LoggedInUsers') {\n\t\t\treturn Permission::get_members_by_permission('CMS_ACCESS_CMSMain');\n\t\t} else {\n\t\t\t$group = Permission::get_groups_by_permission('ADMIN')->first();\n\t\t\treturn $group->Members();\n\t\t}\n\t}", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "public function publishedArticles()\n {\n return Courses::loadAllPublished();\n }", "function ultimos_materiales_publicados() {\n\t\n\t\t\n\t\t$query = \"SELECT COUNT(*)\n\t\tFROM materiales, licencias\n\t\tWHERE materiales.material_licencia=licencias.id_licencia\n\t\tAND materiales.material_estado=1\n\t\tORDER BY materiales.fecha_alta desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows[0] == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $numrows[0];\n\t\t}\n\t}", "public function get_social_sites() {\n \treturn $this->social_sites;\n }", "public static function published()\n {\n return self::where('published', '=', true)->orderBy('published_at', 'DESC')->get();\n }", "public function getOfficialDocuments() {}", "public function loadPublications() {\n $this->_publications = DAOFactory::getPublicationDAO()->selectByIdPerson($this->_id);\n }", "public function getPublicacion($id)\n {\n $publicacion = $this->publicacionDAO->getPublicacion($id);\n $secciones = $this->seccionDAO->getSecciones($publicacion->getId());\n\n if (!is_null($secciones)) {\n foreach ($secciones as $seccion) {\n $seccion->setNoticias($this->noticiaDAO->getNoticias($seccion->getId()));\n }\n\n $publicacion->setSecciones($secciones);\n }\n \n\n // var_dump($this->generoDAO->getGeneros());\n // die;\n echo $this->renderer->render(\"view/mostrar-publicacion.mustache\", array(\n \"title\" => \"Publicación\",\n \"id\" => $id,\n \"publicacion\" => Publicacion::toArrayMap($publicacion),\n \"generos\" => GeneroSeccion::toListArrayMap($this->generoDAO->getGeneros()),\n \"estados\" => Estado::toListArrayMap($this->estadoDAO->getEstados())\n ));\n \n }", "function getOtherPublicPosting(){\n return getAll(\"SELECT DISTINCT a.* , c.name \n FROM posting a,\n member_posting b, \n `member` c \n WHERE a.`status` = 'public' \n AND a.id = b.posting_id \n AND b.member_id <>? \n AND b.member_id =c.id\"\n , [getLogin()['mid']]);\n}", "public function index()\n {\n $publicaciones= Publicacion::all();\n return view('admin.publicaciones.index', ['publicaciones'=>$publicaciones]);\n }", "function getPublicQuizzes() \n\t{\n\t\t$config =& JFactory::getConfig();\n\t\t$jnow\t\t=& JFactory::getDate();\n\t\t$jnow->setOffset( $config->getValue('config.offset' ));\n\t\t$now\t\t= $jnow->toMySQL(true);\n\t\t\n\t\t$query = 'SELECT qui.*' .\n\t\t' FROM #__jquarks_quizzes AS qui' .\n\t\t' WHERE qui.published = 1' .\n\t\t' AND qui.access_id = 0' .\n\t\t' AND qui.publish_up < \\'' . $now . '\\'' .\n\t\t' AND ( qui.publish_down = \"0000-00-00 00:00:00\" OR qui.publish_down > \"' . $now . '\" )' ;\n\t\t\n\t\t$this->_publicQuizzes = $this->_getList($query);\n\t\tif($this->_db->getErrorNum()) {\n\t\t\treturn false ;\n\t\t}\n\t\t\n\t\treturn $this->_publicQuizzes ;\n\t}", "public static function published()\n {\n // return self::where('published',1)->get();\n return self::where('published',true);\n }", "function publications($alert) {\n\t\t$listePublications = '';\n\t\t$publications = $this -> modele -> getPublications($_SESSION['id']);\n\t\tforeach ($publications as $publication) {\n\t\t\t$content = '';\n\t\t\t// Fichier\n\t\t\tif ($publication[3] != '') {\n\t\t\t\tif (file_exists($publication[3])) {\n\t\t\t\t\tif (strstr(mime_content_type($publication[3]), '/', true) == \"image\")\n\t\t\t\t\t\t$content .= $this -> vue -> image($publication[3]);\n\t\t\t\t\telse if (strstr(mime_content_type($publication[3]), '/', true) == \"video\")\n\t\t\t\t\t\t$content .= $this -> vue -> video($publication[3]);\n\t\t\t\t\telse if (strstr(mime_content_type($publication[3]), '/', true) == \"audio\")\n\t\t\t\t\t\t$content .= $this -> vue -> audio($publication[3]);\n\t\t\t\t\telse\n\t\t\t\t\t\t$content .= $this -> vue -> fichier($publication[3]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$content .= $this -> vue -> problemeFichier();\n\t\t\t}\n\t\t\t// Sondage\n\t\t\tif ($publication[4] != 0) {\n\t\t\t\t$sondage = $this -> modele -> getSondage($publication[4]);\n\t\t\t\t$resultats = '';\n\t\t\t\t$totalVote = $sondage[5] + $sondage[6] + $sondage[7] + $sondage[8];\n\t\t\t\tif (is_array($sondage) || is_object($sondage)) {\n\t\t\t\t\tforeach ($sondage as $key => $reponse) {\n\t\t\t\t\t\tif ($key > 0 && $key < 5 && $reponse != null) {\n\t\t\t\t\t\t\tif ($totalVote == 0)\n\t\t\t\t\t\t\t\t$resultats .= $this -> vue -> resultat($reponse, 0);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$resultats .= $this -> vue -> resultat($reponse, $sondage[$key + 4] / $totalVote * 100);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$content .= $this -> vue -> resultatSondage($resultats);\n\t\t\t}\n\t\t\t// Identification\n\t\t\tif ($this -> modele -> getIdentification($publication[0]) != null) {\n\t\t\t\t$identifie = '';\n\t\t\t\tforeach ($this -> modele -> getIdentification($publication[0]) as $key => $ami) {\n\t\t\t\t\tif ($key == 0)\n\t\t\t\t\t\t$identifie .= $this -> modele -> getCompte($ami)[1];\n\t\t\t\t\telse\n\t\t\t\t\t\t$identifie .= \", \" . $this -> modele -> getCompte($ami)[1];\n\t\t\t\t}\n\t\t\t\t$content .= $this -> vue -> identification($identifie);\n\t\t\t}\n\t\t\t// Localisation\n\t\t\tif ($publication[5] != '')\n\t\t\t\t$content .= $this -> vue -> localisation($publication[5]);\n\n\t\t\t$listePublications .= $this -> vue -> publication($publication, $content, $this -> listeAmis($this -> modele -> getIdentification($publication[0])));\t\n\t\t}\n\t\tif ($listePublications == '') {\n\t\t\t$listePublications = $this -> vue -> pasPublication();\n\t\t}\n\t\t$this -> profil($this -> vue -> affichePublications($alert, $listePublications));\n\t}", "function getPublished()\n {\n return $this->published()->orderBy('sort')->get();\n }", "public function index()\n {\n $publications = Publication::withCount('comments')->get();\n return response()->json($publications, 200);\n }", "function find_public_photos($ids_of_private_photos, $ids_of_all_users_photos_on_page)\n{\n $public_photos = [];\n\n foreach ($ids_of_all_users_photos_on_page as $photo_id)\n if (!in_array($photo_id, $ids_of_private_photos))\n array_push($public_photos, $photo_id);\n\n return $public_photos;\n}", "public function guardarPublicacion()\n {\n $id_user = $_SESSION['id'];\n $posteo = $_GET['posteo'];\n $id = $this->obtenerIdPublicaciones();\n \n $publicacion = [\n 'user_id' => $id_user,\n 'post' => $posteo,\n 'post_id' => $id\n ];\n\n return $publicacion;\n }", "public function getUpstreams();", "public function findPublic(): array;", "public function list_cites_mod_presupuestaria(){\n $sql = 'select *\n from modificacion_presupuestaria mp\n Inner Join _distritales as ds On ds.dist_id=mp.dist_id\n Inner Join _departamentos as d On d.dep_id=ds.dep_id\n where mp.g_id='.$this->gestion.'\n order by mp_id asc';\n\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "function find_all_subjects($public = true) {\r\n\t\tglobal $db;\r\n\r\n\t\t$query = \"SELECT * \";\r\n\t\t$query .= \"FROM subjects \";\r\n\t\tif($public) {\r\n\t\t$query .= \"WHERE visible = 1 \";\r\n\t\t}\r\n\t\t$query .= \"ORDER BY position ASC\";\r\n\r\n\t\t$subject_set = mysqli_query($db, $query);\r\n\t\tconfirm_query($subject_set);\r\n\r\n\t\treturn $subject_set;\r\n\t}", "public static function getAllJournals() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllJournals(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n }\n \n return $data;\n }", "public function get_publicaciones_post()\n\t{\n\t\tif ( $this->input->post('titulo') ) {\n\t\t\t$publicacion['titulo'] = $this->input->post('titulo');\n\t\t} else {\n\t\t\t$publicacion['titulo'] = '';\n\t\t}\n\n\t\tif ( $this->input->post('resumen') ) {\n\t\t\t$publicacion['resumen'] = $this->input->post('resumen');\n\t\t} else {\n\t\t\t$publicacion['resumen'] = '';\n\t\t}\n\n\t\tif ( $this->input->post('nota_completa') ) {\n\t\t\t$publicacion['nota_completa'] = $this->input->post('nota_completa');\n\t\t} else {\n\t\t\t$publicacion['nota_completa'] = '';\n\t\t}\n\n\t\tif ( $this->input->post('fecha') ) {\n\t\t\t$publicacion['fecha'] = $this->input->post('fecha');\n\t\t} else {\n\t\t\t$publicacion['fecha'] = date('Y-m-d');\n\t\t}\n\n\t\t$publicacion['archivo_uno'] \t= $this->_get_post_files('uno');\n\n\t\treturn $publicacion;\n\n\t}", "public function index()\n {\n $topics = Topic::whereHas('questions', function ($query) {\n $query->where('status', 'public');\n })\n ->with(['questions' => function ($query) {\n $query->where('status', 'public');\n }])\n ->get();\n }", "public function getAllPublications($user)\n {\n return $this->getByUser($user);\n }", "function publier_almanachs_tous(){\n\tif ($almanachs = sql_select('id_almanach','spip_almanachs')){\n\t\twhile ($res = sql_fetch($almanachs)){\n\t\t\t$id_almanach = $res['id_almanach'];\n\t\t\tautoriser_exception('instituer','almanach',$id_almanach);\n\t\t\tobjet_instituer('almanach',$id_almanach,array(\"statut\"=>'publie'));\n\t\t\tautoriser_exception('instituer','almanach',$id_almanach,false);\n\t\t}\n\t}\n\tsql_free($almanachs);\n}", "public function get_sites()\n {\n }", "protected function _getElements() {\n // Get avatar\n $avatar = null;\n $this->_getAvatar($this->id)->then(function($url) use(&$avatar) {\n $avatar = $url;\n })->wait();\n // Get data\n return $this->_paginate('/search', [\n 'maxResults' => $this->per_page,\n 'channelId' => $this->id,\n 'part' => 'snippet',\n 'type' => 'video',\n 'order' => 'date',\n 'safeSearch' => $this->config['nsfw'] ? 'none' : 'strict'\n ], $avatar);\n }", "public function public_ids_get()\n {\n $from = \"0\";\n $size = \"10\";\n $lastModified = NULL;\n \n $temp = $this->input->get('from', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $from = $temp;\n \n $temp = $this->input->get('size', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $size = $temp;\n \n $temp = $this->input->get('lastModified', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $lastModified = intval($temp);\n \n $cutil = new CILServiceUtil();\n $result = $cutil->getAllPublicIds($from, $size,$lastModified);\n $this->response($result);\n \n }", "public function getPublicacion()\n {\n return $this->hasOne(Publicacion::className(), ['id' => 'id_publicacion']);\n }", "public function publicIndex(Request $request)\n {\n $publicCollections = Collection::where('public_collection', '=', 'true')\n ->with('userMembership')\n ->get();\n return response()->success(['publicCollections' => $publicCollections]);\n }", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function publications(): MorphMany\n {\n return $this->morphMany(Publication::class, 'publicable');\n }", "function get_list_of_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 1 ORDER BY date DESC');\n return $result;\n }", "public function getPlacesOfPublication()\n {\n return $this->getPublicationInfo();\n }", "function getAllVisibleAuthors()\r\n {\r\n $CI = &get_instance();\r\n $userlogin=getUserLogin();\r\n \r\n if ($userlogin->hasRights('read_all_override'))\r\n return $this->getAllAuthors();\r\n \r\n if ($userlogin->isAnonymous()) //get only public authors\r\n {\r\n $Q = $CI->db->query(\"SELECT DISTINCT \".AIGAION_DB_PREFIX.\"author.* FROM \".AIGAION_DB_PREFIX.\"author, \".AIGAION_DB_PREFIX.\"publicationauthorlink, \".AIGAION_DB_PREFIX.\"publication\r\n WHERE \".AIGAION_DB_PREFIX.\"publication.derived_read_access_level = 'public'\r\n AND \".AIGAION_DB_PREFIX.\"publicationauthorlink.pub_id = \".AIGAION_DB_PREFIX.\"publication.pub_id \r\n AND \".AIGAION_DB_PREFIX.\"author.author_id = \".AIGAION_DB_PREFIX.\"publicationauthorlink.author_id\r\n ORDER BY \".AIGAION_DB_PREFIX.\"author.cleanname\");\r\n }\r\n else //get all non-private authors and authors for publications that belong to the user\r\n {\r\n $Q = $CI->db->query(\"SELECT DISTINCT \".AIGAION_DB_PREFIX.\"author.* FROM \".AIGAION_DB_PREFIX.\"author, \".AIGAION_DB_PREFIX.\"publicationauthorlink, \".AIGAION_DB_PREFIX.\"publication\r\n WHERE (\".AIGAION_DB_PREFIX.\"publication.derived_read_access_level != 'private' \r\n OR \".AIGAION_DB_PREFIX.\"publication.user_id = \".$userlogin->userId().\")\r\n AND \".AIGAION_DB_PREFIX.\"publicationauthorlink.pub_id = \".AIGAION_DB_PREFIX.\"publication.pub_id \r\n AND \".AIGAION_DB_PREFIX.\"author.author_id = \".AIGAION_DB_PREFIX.\"publicationauthorlink.author_id\r\n ORDER BY \".AIGAION_DB_PREFIX.\"author.cleanname\");\r\n }\r\n \r\n //retrieve results or fail \r\n foreach ($Q->result() as $row)\r\n {\r\n $next = $this->getFromRow($row);\r\n if ($next != null)\r\n {\r\n $result[] = $next;\r\n }\r\n }\r\n return $result;\r\n \r\n }", "function GetGoJpLinks($Url){\n\n $html = scraperWiki::scrape( $Url );\n\n $dom = new simple_html_dom();\n $dom->load($html);\n\n $arrDoamins = array();\n foreach($dom->find('a') as $el){\n //echo \"$el->href\\r\\n\";\n if(strpos($el->href,DOMAIN_GOJP)<>FALSE){\n $host = parse_url($el->href);\n if($host<>FALSE){\n if($host['scheme']<>\"\" && strpos($host['host'],DOMAIN_GOJP)<>FALSE){\n $url = $host['scheme'].'://'.$host['host'];\n $arrDoamins[$url] = $host;\n $arrDoamins[$url]['title'] = $el->plaintext;\n }\n }\n }\n }\n return $arrDoamins;\n}", "function GetGoJpLinks($Url){\n\n $html = scraperWiki::scrape( $Url );\n\n $dom = new simple_html_dom();\n $dom->load($html);\n\n $arrDoamins = array();\n foreach($dom->find('a') as $el){\n //echo \"$el->href\\r\\n\";\n if(strpos($el->href,DOMAIN_GOJP)<>FALSE){\n $host = parse_url($el->href);\n if($host<>FALSE){\n if($host['scheme']<>\"\" && strpos($host['host'],DOMAIN_GOJP)<>FALSE){\n $url = $host['scheme'].'://'.$host['host'];\n $arrDoamins[$url] = $host;\n $arrDoamins[$url]['title'] = $el->plaintext;\n }\n }\n }\n }\n return $arrDoamins;\n}", "function listarSitios(){\n $sql = \"SELECT\n sitioid,\n imagenIcono,\n titulo,\n introduccion,\n imagenPortada,\n descripcion\n from sitio\";\n $rs = $this->consultaSQL($sql);\n\n return $rs;\n }", "public function execute(): array\n {\n $this->log->info('publication:list', []);\n\n $list = $this->publications->getPublicationList();\n\n $this->log->debug('publication:list', ['result' => $list]);\n\n return $list;\n }", "function _getObjectsForReviewPublicPages() {\n\t\treturn array(\n\t\t\t\t\t'index',\n\t\t\t\t\t'viewObjectForReview'\n\t\t\t\t);\n\t}", "public static function getAllDocumentation() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllDocumentations(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n }\n \n return $data;\n }", "function listado_paginas_internacionalizacion() {\n\t\t$query = \"SELECT * FROM internacionalizacion_pages ORDER BY id_page asc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\n\t\t$result = mysql_query($query);\n\t\t$numrows = mysql_num_rows($result);\n\n\t\tif ($numrows == 0) {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t}", "public function index()\n\t{\n\t\t/* ----------------------------------------\n はてなブログAtomPubから最新ブログURLを取得 \n ------------------------------------------ */\n $url = HATENA_ENDPOINT;\n $userid = HATENA_USERID;\n $apiKey = HATENA_API_KEY;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_USERPWD, \"$userid:$apiKey\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_FAILONERROR, TRUE);\n\n $entryListData = curl_exec($ch);\n curl_close($ch);\n\n $resultList = [];\n\n // 取得できなかった場合\n if (! $entryListData) {\n return;\n }\n\n $result = new SimpleXMLELement($entryListData);\n\n /* ----------------------------------------\n はてなブログoEmbed APIから表示用データを取得 \n ------------------------------------------ */\n\n for ($i = 0; $i < count($result->entry); $i++) {\n\n $param = '?url=' . $result->entry[$i]->link[1]['href']->__toString();\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, 'https://hatenablog.com/oembed' . $param);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_FAILONERROR, TRUE);\n\n $resultData = curl_exec($ch);\n curl_close($ch);\n\n // 公開されていない記事や正しく取得できなかった場合は、スキップ\n if ($resultData === FALSE) continue;\n\n $entryData = json_decode($resultData, TRUE);\n\n // 適当に突っ込む\n $resultList[] = [\n 'title' => $entryData['title'],\n 'description' =>$entryData['description'],\n 'published' => date('Y/n/j', strtotime($entryData['published'])),\n 'url' => $entryData['url'],\n 'image_url' => $entryData['image_url'],\n ];\n }\n\n var_dump($resultList); exit;\n\t}", "function getOrganismsList();", "public function index()\n {\n return Publisher::get();\n }", "private function get_user_favorite_publics(){\r\n global $USER;\r\n\r\n if(isset($USER) && $USER->id > 0) {\r\n $publics = new PublicsByFunctionUser($USER->id, $this->tab);\r\n if($this->tab == 'formation'){\r\n return $publics->get_favorite_formation_publics();\r\n } else {\r\n return $publics->get_favorite_course_publics();\r\n }\r\n }\r\n return false;\r\n }", "private function all_sites()\r\n {\r\n return $this->sites_repository()->all_sites();\r\n }", "public function fetchPublicKeys() {\n $data = json_decode(file_get_contents(self::CognitoIdentityKeyEndpoint), fasle);\n $publicKeys = array();\n foreach ($data[\"keys\"] as $keyEntry) {\n $publicKeys[$keyEntry['kid']] = $keyEntry;\n }\n\n //@todo Implement local cache\n return $publicKeys;\n }", "function monitor_list_owners() {\n $query = \"select distinct(`wf_owner`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_owner'];\n }\n return $ret;\n }", "function getConversacionGrupal($entrada) {\n $grupo = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $conversacion = [];\n $link = crearConexion();\n $query = \"SELECT publicacion.titulo, publicacion.contenido, publicacion.fecha_hora, publicacion.censurada, usuario.username, usuario.foto FROM publicacion, usuario WHERE publicacion.grupo='\" . $grupo . \"' AND publicacion.autor=usuario.username ORDER BY publicacion.fecha_hora ASC\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n while ($linea = mysqli_fetch_array($result)) {\n $fila['titulo'] = $linea['titulo'];\n $fila['contenido'] = $linea['contenido'];\n $fila['fecha_hora'] = $linea['fecha_hora'];\n $fila['usuario'] = $linea['username'];\n $fila['foto'] = $linea['foto'];\n $fila['censurada'] = $linea['censurada'];\n\n $conversacion[] = $fila;\n }\n return $conversacion;\n}", "public function getAllThesis() : array {\n $query='SELECT * FROM Publication WHERE categorie_id=4 ORDER BY ID;';\n $this->connection->executeQuery($query);\n \n return $this->connection->getResults();\n }", "function organismes()\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t$db = cmsms()->GetDb();\n\t\t$designation = '';\n\t\t$tableau = array('F','Z','L','D');\n\t\t//on instancie la classe servicen\n\t\t$service = new Servicen();\n\t\t$page = \"xml_organisme\";\n\t\tforeach($tableau as $valeur)\n\t\t{\n\t\t\t$var = \"type=\".$valeur;\n\t\t\t//echo $var;\n\t\t\t$scope = $valeur;\n\t\t\t//echo \"la valeur est : \".$valeur;\n\t\t\t$lien = $service->GetLink($page,$var);\n\t\t\t//echo $lien;\n\t\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t\t\n\t\t\tif($xml === FALSE)\n\t\t\t{\n\t\t\t\t$designation.= \"service coupé\";\n\t\t\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t\t\t$status = 'Echec';\n\t\t\t\t$action = 'retrieve_ops';\n\t\t\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t\t///on initialise un compteur général $i\n\t\t\t\t$i=0;\n\t\t\t\t//on initialise un deuxième compteur\n\t\t\t\t$compteur=0;\n\t\t\t//\tvar_dump($xml);\n\n\t\t\t\t\tforeach($xml as $cle =>$tab)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$idorga = (isset($tab->id)?\"$tab->id\":\"\");\n\t\t\t\t\t\t$code = (isset($tab->code)?\"$tab->code\":\"\");\n\t\t\t\t\t\t$libelle = (isset($tab->libelle)?\"$tab->libelle\":\"\");\n\t\t\t\t\t\t// 1- on vérifie si cette épreuve est déjà dans la base\n\t\t\t\t\t\t$query = \"SELECT idorga FROM \".cms_db_prefix().\"module_ping_organismes WHERE idorga = ?\";\n\t\t\t\t\t\t$dbresult = $db->Execute($query, array($idorga));\n\n\t\t\t\t\t\t\tif($dbresult && $dbresult->RecordCount() == 0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$query = \"INSERT INTO \".cms_db_prefix().\"module_ping_organismes (libelle, idorga, code, scope) VALUES (?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t//echo $query;\n\t\t\t\t\t\t\t\t$compteur++;\n\t\t\t\t\t\t\t\t$dbresultat = $db->Execute($query,array($libelle,$idorga,$code,$scope));\n\n\t\t\t\t\t\t\t\tif(!$dbresultat)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$designation.= $db->ErrorMsg();\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\n\t\t\t\t\t}// fin du foreach\n\n\t\t\t}\n\t\t\tunset($scope);\n\t\t\tunset($var);\n\t\t\tunset($lien);\n\t\t\tunset($xml);\n\t\t\tsleep(1);\n\t\t}//fin du premier foreach\n\t\t\n\n\t\t$designation.= $compteur.\" organisme(s) récupéré(s)\";\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$status = 'Ok';\n\t\t$action = 'retrieve_ops';\n\t\tping_admin_ops::ecrirejournal($now,$status,$designation,$action);\n\n\t\t\t\n\t\t\n\t}", "public function getArchives()\n {\n \n $qb = $this->createQueryBuilder('p')\n ->select('p.published_at as publishedat, YEAR(p.published_at) as year, MONTH(p.published_at) as month, COUNT(p.published_at) as post')\n ->groupBy('year')\n ->groupBy('month')\n ->orderBy('p.published_at', 'DESC');\n \n $query = $qb->getQuery();\n \n return $query->getResult();\n }", "public function getAvailableSites();", "public static function get_publication()\r\n {\r\n $p = new Publications();\r\n return $p->get_by_type(self::PUBLICATION_TYPE);\r\n }", "public function vistaPagosPublicosController()\n\t\t{\n\t\t\t$respuesta=Datos::vistaPagosPublicosModel(\"pagos\");\n\n\t\t\t$counter = 1;\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\techo'<tr>\n\t\t\t\t\t<td>'.$counter.'</td>\n\t\t\t\t\t<td>'.$item[\"nombre_alumna\"].'</td>\n\t\t\t\t\t<td>'.$item[\"nombre_grupo\"].'</td>\n\t\t\t\t\t<td>'.$item[\"nombre_mama\"].'</td>\n\t\t\t\t\t<td>'.$item[\"fecha_pago\"].'</td>\n\t\t\t\t\t<td>'.$item[\"fecha_envio\"].'</td>\n\t\t\t\t</tr>';\n\t\t\t$counter++;\n\t\t\t}\n\t\t}", "public static function obtenerPublicacionesCount()\n {\n return self::builder()->where('tipo', false)->count() ?? 0;\n }", "function ultimos_eu_publicados_limit($inicial,$cantidad) {\n\t\n\t\t$query = \"SELECT eu.*, eu_descripcion.*\n\t\tFROM eu, eu_descripcion\n\t\tWHERE eu.id_eu=eu_descripcion.id_eu\n\t\tAND eu.eu_estado=1\n\t\tORDER BY eu.fecha_alta desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function show(Publicacion $publicacion)\n {\n //\n }", "public function accessMediasAll()\n {\n return true;\n }", "public function getAllPublicPhotosJson(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0';\n $photos = $this->executeQuery($sql);\n while ($photo = $photos->fetch(\\PDO::FETCH_ASSOC))\n {\n $data [] = $photo;\n }\n $photosJson = json_encode($data);\n echo $photosJson;\n }", "public function findDistinctUrlPics()\n {\n return $this->createStandardQueryBuilder()->distinct('pics.url')->sort('public_date', 1)->getQuery()->execute();\n }", "public function index()\n {\n $personas = Persona::all();\n $personas->load(['inscripciones', 'inscripciones.rol', 'inscripciones.carrera']);\n return $personas;\n }", "public function index()\n {\n $data['publications'] = Publication::where('user_id', Auth::id())->paginate(30);\n $data['title'] = \"My Publications\";\n\n return view('publisher.publications.index', $data)->render();\n }", "public function getResultsPublicFiles() {\n if ($this->results_public_files === null) {\n $this->loadTestcases();\n }\n return $this->results_public_files;\n }", "public function has_published_pages()\n {\n }", "public function get_project_all(){\n }", "function jb_list_all_network_sites()\n{\n global $wpdb;\n\n $result = '';\n $sites = array();\n $blogs = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' and archived = '0' and public='1'\"));\n\n if(!empty($blogs))\n {\n foreach($blogs as $blog)\n {\n $details = get_blog_details($blog->blog_id);\n\n if($details != false)\n {\n $url = $details->siteurl;\n $name = $details->blogname;\n\n if(!(($blog->blog_id == 1) && ($show_main != 1)))\n {\n $sites[$name] = $url;\n }\n }\n }\n\n ksort($sites);\n\n $count = count($sites);\n $current = 1;\n \n $result.= '<ul class=\"inside-site-list\">';\n foreach($sites as $name=>$url)\n {\n $result.= '<li class=\"inside-site\"><a href=\"'.$url.'\">'.$name.'</a></li>';\n\n ++$current;\n }\n $result.= '</ul>';\n }\n\n return $result;\n}" ]
[ "0.71174544", "0.6968476", "0.6798673", "0.6688303", "0.66052735", "0.6590543", "0.63851625", "0.63362", "0.6313525", "0.6234453", "0.62072754", "0.61866605", "0.61293775", "0.6092805", "0.6057471", "0.6030126", "0.5952675", "0.5912036", "0.58738554", "0.58681273", "0.5857017", "0.5848376", "0.58453524", "0.5841204", "0.5834936", "0.5824601", "0.58230317", "0.5798019", "0.5789888", "0.57898676", "0.57846814", "0.57830054", "0.5773444", "0.57616264", "0.57585996", "0.57551545", "0.57149845", "0.5707546", "0.56952834", "0.5673313", "0.5667781", "0.5664856", "0.565712", "0.56500226", "0.5640237", "0.5626898", "0.56258535", "0.56123954", "0.5605986", "0.5602631", "0.5560005", "0.5559198", "0.5542939", "0.5534011", "0.5532326", "0.55301625", "0.55267054", "0.5525116", "0.55108434", "0.5497572", "0.5483735", "0.54732156", "0.5471949", "0.5471207", "0.54638606", "0.5457713", "0.54564893", "0.54501504", "0.54436696", "0.54436696", "0.5441929", "0.54391795", "0.543719", "0.54311603", "0.5429251", "0.54209036", "0.54160905", "0.54123497", "0.5411372", "0.5387154", "0.53699327", "0.5356301", "0.5354793", "0.5354082", "0.5349894", "0.5349268", "0.53480846", "0.534748", "0.5345988", "0.53353953", "0.53247195", "0.53177047", "0.5315146", "0.5308003", "0.53064114", "0.52979755", "0.5294059", "0.5279541", "0.5277498", "0.52738905", "0.5273864" ]
0.0
-1
Permite obtener las publicaciones de un usuario particular por el id del mismo, el usuario que quiere ver las publicaciones tiene que estar logueado...
public function allItemsByUser() { $this->checkUserIsLogged(); $params = Route::getUrlParameters(); $idUser = $params['idUser']; $item = new Item; $items = $item->allItemsByUser($idUser); View::renderJson($items); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obtenerDatosPublicacionesUsuario($idUsuario){\n $var_id_usuario = $idUsuario;\n //PASO 2: Incluimos archivo de conexión\n include(\"C:/xampp/htdocs/facebook/database/mysqli.inc.php\");\n //PASO 3: Definimos sentencia SQL\n\t $sentenciaMYSQL=\"SELECT p.post_id,p.post,p.user_id,p.last_update FROM post p where p.user_id='$var_id_usuario' ORDER BY post_id DESC\";\n \n //PASO 4: En caso de obtener correctamente los datos iniciamos el bloque. En caso contratio indicamos el error.\n if($resultado\t=\t$objetoMySQLi->query($sentenciaMYSQL)){ \n //PASO 5: Si existen datos de resultado iniciamos la obtención de datos. Si no hay datos enviamos un mensaje.\n if($objetoMySQLi->affected_rows>0){ \n $i=0;\n //PASO 6 : Se efectúa una iteración para incorporar al arreglo los datos obtenidos.\n while($fila = $resultado->fetch_assoc()){\n //PASO 7 : Se incorporan los datos al arreglo\n $arreglo[$i]=array($fila['post_id'],$fila['post'],$fila['user_id'],$fila['last_update']);\n $i++;\n }\n //PASO 8: Retornamos el arreglo.\n return $arreglo;\n }else{ \n echo \"La consulta no ha producido ningún resultado\"; \n } \n }else{ \n echo \"<br>No ha podido realizarse la consulta. Ha habido un error<br>\"; \n echo \"<i>Error:</i> \". $objetoMySQLi->error. \"<i>Código:</i> \". $objetoMySQLi->errno; \n } \n\t$objetoMySQLi->close(); \n\n }", "public function publicaciones() //Lleva ID del proveedor para hacer carga de BD\r\n\t{\r\n\t\t//Paso a ser totalmente otro modulo para generar mejor el proceso de visualizacion y carga de datos en la vistas\r\n\r\n\t}", "public function getPublicacion($id)\n {\n $publicacion = $this->publicacionDAO->getPublicacion($id);\n $secciones = $this->seccionDAO->getSecciones($publicacion->getId());\n\n if (!is_null($secciones)) {\n foreach ($secciones as $seccion) {\n $seccion->setNoticias($this->noticiaDAO->getNoticias($seccion->getId()));\n }\n\n $publicacion->setSecciones($secciones);\n }\n \n\n // var_dump($this->generoDAO->getGeneros());\n // die;\n echo $this->renderer->render(\"view/mostrar-publicacion.mustache\", array(\n \"title\" => \"Publicación\",\n \"id\" => $id,\n \"publicacion\" => Publicacion::toArrayMap($publicacion),\n \"generos\" => GeneroSeccion::toListArrayMap($this->generoDAO->getGeneros()),\n \"estados\" => Estado::toListArrayMap($this->estadoDAO->getEstados())\n ));\n \n }", "public function usuarios()\n {\n $usuariomaquinaria= tipoUsuario::find(1)->where('descripcion','usuariomaquinaria')->first();\n \n\n $region=Auth::user()->obtenerregion();\n \n $usuarios=User::where('user_id', Auth::user()->obtenerId())->paginate(4);\n\n if(Auth::user()->gerentemaquinaria()){\n $usuarios=User::Where('region_id', $region)\n ->Where('tipoUsuario_id', $usuariomaquinaria->id)\n ->orWhere('user_id', Auth::user()->obtenerId())\n ->paginate(4); \n }\n\n \n $pdf=new PDF();\n $pdf=PDF::loadview('admin.usuarios.informe',compact('usuarios'));\n return $pdf->stream('archivo.pdf');\n\n }", "function listado_directorios_usuario($id_usuario) {\n\t\t\n\t\t$query = \"SELECT * FROM repositorio_directorios WHERE id_usuario='$id_usuario'\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\t\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function obtenerComentariosPublicaciones($id){\n // $var_id_usuario = $idUsuario;\n //PASO 2: Incluimos archivo de conexión\n include(\"C:/xampp/htdocs/facebook/database/mysqli.inc.php\");\n //PASO 3: Definimos sentencia SQL\n $sentenciaMYSQL=\"SELECT commentario_id,commentario, last_update FROM facebook.commentario where post_id=\".$id.\" ORDER BY commentario_id ASC\";\n \n //PASO 4: En caso de obtener correctamente los datos iniciamos el bloque. En caso contratio indicamos el error.\n if($resultado = $objetoMySQLi->query($sentenciaMYSQL)){ \n //PASO 5: Si existen datos de resultado iniciamos la obtención de datos. Si no hay datos enviamos un mensaje.\n if($objetoMySQLi->affected_rows>0){ \n $i=0;\n //PASO 6 : Se efectúa una iteración para incorporar al arreglo los datos obtenidos.\n while($fila = $resultado->fetch_assoc()){\n //PASO 7 : Se incorporan los datos al arreglo\n $arreglo[$i]=array($fila['commentario_id'],$fila['commentario'],$fila['last_update']);\n $i++;\n }\n //PASO 8: Retornamos el arreglo.\n return $arreglo;\n }else{ \n echo \"Sin Comentarios...\"; \n } \n }else{ \n echo \"<br>No ha podido realizarse la consulta. Ha habido un error<br>\"; \n echo \"<i>Error:</i> \". $objetoMySQLi->error. \"<i>Código:</i> \". $objetoMySQLi->errno; \n } \n $objetoMySQLi->close(); \n }", "public static function get_public_users()\n {\n $connection = Yii::$app->getDb();\n /*$users = Yii::$app->db->createCommand(\"SELECT core_users.*,(SELECT core_sessions.date_created FROM core_sessions WHERE core_sessions.user_id = core_users.user_id ORDER BY core_sessions.date_created DESC LIMIT 1) last_login FROM core_users where core_users.user_type =:user_type\")\n ->bindValue(':user_type', 1)\n ->queryAll();*/\n $users = Yii::$app->db->createCommand(\"SELECT core_users.*,\"\n . \"(SELECT core_sessions.date_created FROM core_sessions WHERE core_sessions.user_id = core_users.user_id ORDER BY core_sessions.date_created DESC LIMIT 1) last_login,\"\n . \"(SELECT core_user_roles.role_name FROM core_user_roles WHERE core_user_roles.role_id = core_users.user_type) role_name FROM core_users \"\n . \"where core_users.user_type = 1\")->queryAll();\n /*$users = $connection->createCommand(\"SELECT core_users.*,(SELECT core_sessions.date_created FROM core_sessions WHERE core_sessions.user_id = core_users.user_id ORDER BY core_sessions.date_created DESC LIMIT 1) last_login FROM core_users where core_users.user_type = 1\")->queryAll();*/\n /*$users = $query->select(['core_users.*','core_sessions.date_created'])->from('core_users')\n ->innerJoin('core_sessions','core_users.user_id = core_sessions.user_id')\n ->where(\"core_users.user_type = '1'\")\n ->orderBy(['core_sessions.date_created' => SORT_DESC])\n ->groupBy('core_sessions.user_id')\n ->All();*/\n return $users;\n }", "public function UsuariosPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from usuarios where codigo = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codigo\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getUserPublic($id)\n {\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n // Get the user from db\n $user = $this->di->get(\"user\")->getUserFromDatabase(\"id\", $id);\n // Get the users questions\n $askedQuestions = $this->di->get(\"questionModel\")->getQuestionsWhere(\"userId\", $user->id);\n // Get the users answers\n $answers = $this->di->get(\"answerModel\")->getAnswersWhere(\"userId\", $user->id);\n // Get questions answered by user\n $answeredQuestions = $this->di->get(\"questionModel\")->getQuestionsAnsweredByUser($answers);\n\n // Get the users comments\n $comments = $this->di->get(\"com\")->getCommentsWhere(\"userId\", $user->id);\n // Construct the title\n $title = \"User $user->acronym\";\n // Calculate age for user\n $from = new DateTime($user->birth);\n $too = new DateTime('today');\n $age = $from->diff($too)->y;\n // Collect the user statistics\n $stats = (object) [\n \"questions\" => count($askedQuestions),\n \"answers\" => count($answers),\n \"comments\" => count($comments),\n ];\n\n $data = [\n \"user\" => $user,\n \"askedQuestions\" => $askedQuestions,\n \"answeredQuestions\" => $answeredQuestions,\n \"stats\" => $stats,\n \"answers\" => $answers,\n \"age\" => $age,\n ];\n\n $view->add(\"pages/user\", $data);\n $pageRender->renderPage([\"title\" => $title]);\n }", "public function guardarPublicacion()\n {\n $id_user = $_SESSION['id'];\n $posteo = $_GET['posteo'];\n $id = $this->obtenerIdPublicaciones();\n \n $publicacion = [\n 'user_id' => $id_user,\n 'post' => $posteo,\n 'post_id' => $id\n ];\n\n return $publicacion;\n }", "function permisos_usuario($id_usuario) {\n\t\t$query = \"SELECT colaboradores.*, colaboradores_permisos.* \n\t\tFROM colaboradores, colaboradores_permisos\n\t\tWHERE colaboradores.id_colaborador='$id_usuario' \n\t\tAND colaboradores.id_colaborador=colaboradores_permisos.id_colaborador\n\t\tAND colaboradores.estado=1\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row;\n\t}", "function getPermisos($idUser){\n\t\t$sql=\"\n\t\tSELECT DISTINCT\n\t\tcontrol_objeto.clave as 'objeto',\n\t\tcontrol_permiso.tipo as 'tipo'\n\t\tFROM\n\t\tcontrol_perfil_usuario\n\t\tINNER JOIN control_perfil_permiso ON control_perfil_usuario.id_perfil=control_perfil_permiso.id_perfil\n\t\tINNER JOIN control_permiso ON control_perfil_permiso.id_permiso=control_permiso.id_permiso\n\t\tINNER JOIN control_objeto ON control_permiso.id_objeto=control_objeto.id_objeto\n\t\tWHERE control_perfil_usuario.id_usuario=$idUser\";\n\t\treturn $this->toArray($sql);\n\t}", "public function get_empresa_usuario($id_usuario, $cyper){\n \n $query = new Cypher\\Query(Neo4Play::client(), $cyper);\n \n $result = $query->getResultSet();\n \n $array_general = array();\n \n \n if($result){\n \n \n foreach($result as $row) { \n \n $array_empresa = array(\n 'id'=>$row['id'],\n 'nombre'=>$row['nombre'],\n 'imagen'=>$row['imagen']);\n \n array_push($array_general, $array_empresa);\n }\n \n return $array_general;\n }else{\n \n return false;\n } \n \n \n }", "public function index()\n {\n return Pensamiento::with('user')->get();\n }", "public function index()\n {\n //$publicaciones = DB::table('publicaciones')->select('titulo')->where('id_usuario', Auth()->user()->id);\n $publicaciones = Publicacion::orderBy('id', 'DESC')->get();\n dd($publicaciones);\n //return view('publicaciones.index', compact('publicaciones'));\n }", "public function getdatosUsuarios(){\n\t\t$bd = new bd();\n\t\t$result = $bd->doSingleSelect($this->u_table,\"id = {$this->id}\");\n\t\tif($result){\n\t\t\t$this->datosUsuario($result[\"direccion\"], $result[\"telefono\"], $result[\"descripcion\"], $result[\"estados_id\"], $result[\"facebook\"], $result[\"twitter\"],$result[\"website\"],$result[\"certificado\"],$result[\"id_sede\"]);\n\t\t\t$this->id = $result[\"id\"];\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function listarUser() {\n if(IDUSER) {\n $eval = \"SELECT id,nombre,apellidos,email FROM users\";\n $peticion = $this->db->prepare($eval);\n $peticion->execute();\n $resultado = $peticion->fetchAll(PDO::FETCH_OBJ);\n exit(json_encode($resultado));\n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Fallo de autorizacion\"])); \n }\n }", "function getUsers ($walkId, $userId)\n {\n $getUsersQuery = $this->db->query(\"SELECT id,nickName,profilePicture, \n (select id from walkparticipants w \n WHERE w.walkId = '\".$walkId.\"' and \n w.participantId = u.id ) isInvited, \n (select status from walkparticipants w \n WHERE w.walkId = '\".$walkId.\"' and \n w.participantId = u.id ) status\n FROM user u where id != '\".$userId.\"'\");\n\n return $getUsersQuery->result();\n }", "public function get_usuario_por_id_ventas($id_usuario)\n {\n\n\n $conectar = parent::conexion();\n parent::set_names();\n\n\n $sql = \"select u.id_usuario,v.id_usuario\n \n from usuarios u \n \n INNER JOIN ventas v ON u.id_usuario=v.id_usuario\n\n\n where u.id_usuario=?\n\n \";\n\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $id_usuario);\n $sql->execute();\n\n return $resultado = $sql->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getUsuariosVotos()\n {\n return $this->hasMany(User::className(), ['id' => 'usuario_id'])->via('votos');\n }", "public function getPublicaciones()\n {\n $publicaciones = $this->publicacionDAO->getPublicaciones();\n\n\n echo $this->renderer->render(\"view/listar-publicaciones.mustache\", array(\n \"title\" => \"Publicación\",\n \"publicaciones\" => Publicacion::toListArrayMap($publicaciones),\n \"estados\" => Estado::toListArrayMap($this->estadoDAO->getEstados())\n ));\n \n }", "public function allForUser($userId);", "public function allForUser($userId);", "public function getUsuarios(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraUsuarios\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM usuarios \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM usuarios LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "function users_publicity($limit=5,$usr='',$tipe=false,$random=false,$noid=false){\n\t$usr=($usr!='')?$usr:$_SESSION['ws-tags']['ws-user']['id'];\n\t$where=$tipe?safe_sql(' AND id_type_publicity=?',array($tipe)):'';\n\tif (!$random){\n\t\t$prefe=users_preferences($usr);\n\t\tif (count($prefe)==0) $random=true;\n\t\telse{\n\t\t\t$like=' AND (';$or='';\n\t\t\tforeach ($prefe as $typePre)\n\t\t\t\tforeach ($typePre as $row) {\n\t\t\t\t\t$like.=$or.safe_sql('title LIKE \"%??%\"',array($row->text));\n\t\t\t\t\tif (!$or) $or=' OR ';\n\t\t\t\t}\n\t\t\t$like.=')';\n\t\t}\n\t}\n\tif ($random){ $like='';\n\t\tif ($noid){\n\t\t\tif (!is_array($noid)) $like=\" AND id NOT IN ($noid)\";\n\t\t\telseif(count($noid)>0){\n\t\t\t\t$like=\"AND id NOT IN (\"; $c='';\n\t\t\t\tforeach ($noid as $key) {\n\t\t\t\t\t$like.=$c.$key;\n\t\t\t\t\tif (!$c) $c=\",\";\n\t\t\t\t}\n\t\t\t\t$like.=\")\";\n\t\t\t}\n\t\t}\n\t\t$like.=' ORDER BY RAND()';\n\t}\n\tif (!isset($like) || $like=='') return array();\n\t$publicity=CON::query(\"SELECT md5(id) AS id,\n\t\t\t\t\t\t\t\t id AS id_valida,\n\t\t\t\t\t\t\t\t link,\n\t\t\t\t\t\t\t\t picture,\n\t\t\t\t\t\t\t\t picture as picOri,\n\t\t\t\t\t\t\t\t title,\n\t\t\t\t\t\t\t\t id_cost,\n\t\t\t\t\t\t\t\t message\n\t\t\t\t\t\t\tFROM users_publicity\n\t\t\t\t\t\t\tWHERE status = '1'\n\t\t\t\t\t\t\tAND click_max > click_current $where $like LIMIT 0,$limit\");\n\t// echo CON::lastSql().\"<br><br><br>\";\n\t$res=array();$num=CON::numRows($publicity);$ids=array();\n\tif ($num==0 && $random===false) $res2=users_publicity(5,$usr,$tipe,true);\n\telse while ($row=CON::fetchAssoc($publicity)) {\n\t\tif ($row['id_cost']!='5') {\n\t\t\t$row['picture']=FILESERVER.getPublicityPicture('img/publicity/'.$row['picture'],'img/publicity/publicity_nofile.png');\n\t\t\t// $row['vari'] = 'no id_cost '.$row['picture'];\n\t\t} else {\n\t\t\t$row['picture']=$GLOBALS['config']->main_server.getPublicityPicture('img/publicity/'.$row['picture'],'img/publicity/publicity_nofile.png',$row['id_cost']);\n\t\t\t// $row['vari'] = 'id_cost '.$row['picture'];\n\t\t}\n\n\t\t$res[]=$row;$ids[]=$row['id_valida'];\n\t}\n\tif ($num<$limit && $random===false) $res2=users_publicity($limit-$num,$usr,$tipe,true,$ids);\n\tif (isset($res2)) $res=array_merge($res,$res2);\n\treturn $res;\n}", "public function getUser($id);", "public function getAllUserById($id);", "public function getRUser($post)\n\t{\n\t\ttry {\n\t\t\t$condicion = '';\n\t\t\t$aux_ids = array();\n\t\t\t#Si existe el id del personal, buscar los bienes de la persona\n\t\t\tif ( isset($post['servidor_id']) && !empty($post['servidor_id']) ) \n\t\t\t{\n\t\t\t\t$servidor = $post['servidor_id']; \n\n\t\t\t\t$this->sql = \" SELECT bien_id FROM asignacion WHERE personal_id = ? \";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam( 1,$servidor );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes_ids = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\tforeach ($bienes_ids as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->bien_id);\n\t\t\t\t}\n\t\t\t\t/*Conversion a string*/\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t\n\t\t\t\t/*Buscar en la tabla de bienes , las asignaciones registradas*/\n\t\t\t\t$this->sql = \" SELECT \n\t\t\t\t\tb.id,\n\t\t\t\t\tb.descripcion,\n\t\t\t\t\tb.serie,\n\t\t\t\t\tb.status,\n\t\t\t\t\tb.inventario,\n\t\t\t\t\tb.desc_ub,\n\t\t\t\t\tm.nombre AS marca,\n\t\t\t\t\tg.nombre AS grupo,\n\t\t\t\t\tt.nombre AS tipo,\n\t\t\t\t\tmo.nombre AS modelo,\n\t\t\t\t\tb.fecha_reg AS registro,\n\t\t\t\t\tb.fecha_adq AS adquisicion,\n\t\t\t\t\tUPPER(c.nombre) AS color,\n\t\t\t\t\tma.nombre AS material,\n\t\t\t\t\tp.nombre AS proveedor,\n\t\t\t\t\tCONCAT(\n\t\t\t\t\t pe.nombre,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_pat,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_mat\n\t\t\t\t\t) AS asignadoa\n\t\t\t\t FROM bienes AS b\n\t\t\t\t INNER JOIN marcas AS m\n\t\t\t\t ON\n\t\t\t\t m.id = b.marca_id\n\t\t\t\t INNER JOIN grupos AS g\n\t\t\t\t ON\n\t\t\t\t g.id = b.grupo_id\n\t\t\t\t INNER JOIN t_bienes AS t\n\t\t\t\t ON\n\t\t\t\t t.id = b.tipo_id\n\t\t\t\t INNER JOIN modelos AS mo\n\t\t\t\t ON\n\t\t\t\t mo.id = b.modelo_id\n\t\t\t\t INNER JOIN color AS c\n\t\t\t\t ON\n\t\t\t\t c.id = b.color_id\n\t\t\t\t INNER JOIN materiales AS ma\n\t\t\t\t ON\n\t\t\t\t ma.id = b.material_id\n\t\t\t\t INNER JOIN proveedores AS p\n\t\t\t\t ON\n\t\t\t\t p.id = b.pro_id\n\t\t\t\t INNER JOIN asignacion AS a\n\t\t\t\t ON\n\t\t\t\t a.bien_id = b.id\n\t\t\t\t INNER JOIN personal AS pe\n\t\t\t\t ON\n\t\t\t\t pe.id = a.personal_id WHERE b.id IN ($aux_ids) \";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\t\n\t\t\t\treturn json_encode($bienes) ;\n\t\t\t} \n\t\t\telseif( isset($post['area']) && !empty($post['area']) )\n\t\t\t{\n\t\t\t\t$area = $post['area'];\n\t\t\t\t#Buscar a los usuarios pertenecientes al area\n\t\t\t\t$this->sql = \"SELECT id FROM personal WHERE area_id = ?\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam(1,$area);\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$personas = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\tforeach ($personas as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->id);\n\t\t\t\t}\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t#ubicar los bienes con las personas (En asignaciones)\n\t\t\t\t$this->sql = \"SELECT bien_id FROM asignacion WHERE personal_id IN (?)\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam(1,$aux_ids);\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$asignaciones = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\t#Limpiar arreglo auxiliar\n\t\t\t\tunset($aux_ids);\n\t\t\t\t$aux_ids = array();\n\t\t\t\tforeach ($asignaciones as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->bien_id);\n\t\t\t\t}\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t#Buscar los bienes (Bienes)\n\t\t\t\t$this->sql = \"SELECT \n\t\t\t\t\tb.id,\n\t\t\t\t\tb.descripcion,\n\t\t\t\t\tb.serie,\n\t\t\t\t\tb.status,\n\t\t\t\t\tb.inventario,\n\t\t\t\t\tb.desc_ub,\n\t\t\t\t\tm.nombre AS marca,\n\t\t\t\t\tg.nombre AS grupo,\n\t\t\t\t\tt.nombre AS tipo,\n\t\t\t\t\tmo.nombre AS modelo,\n\t\t\t\t\tb.fecha_reg AS registro,\n\t\t\t\t\tb.fecha_adq AS adquisicion,\n\t\t\t\t\tUPPER(c.nombre) AS color,\n\t\t\t\t\tma.nombre AS material,\n\t\t\t\t\tp.nombre AS proveedor,\n\t\t\t\t\tCONCAT(\n\t\t\t\t\t pe.nombre,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_pat,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_mat\n\t\t\t\t\t) AS asignadoa\n\t\t\t\t FROM bienes AS b\n\t\t\t\t INNER JOIN marcas AS m\n\t\t\t\t ON\n\t\t\t\t m.id = b.marca_id\n\t\t\t\t INNER JOIN grupos AS g\n\t\t\t\t ON\n\t\t\t\t g.id = b.grupo_id\n\t\t\t\t INNER JOIN t_bienes AS t\n\t\t\t\t ON\n\t\t\t\t t.id = b.tipo_id\n\t\t\t\t INNER JOIN modelos AS mo\n\t\t\t\t ON\n\t\t\t\t mo.id = b.modelo_id\n\t\t\t\t INNER JOIN color AS c\n\t\t\t\t ON\n\t\t\t\t c.id = b.color_id\n\t\t\t\t INNER JOIN materiales AS ma\n\t\t\t\t ON\n\t\t\t\t ma.id = b.material_id\n\t\t\t\t INNER JOIN proveedores AS p\n\t\t\t\t ON\n\t\t\t\t p.id = b.pro_id\n\t\t\t\t INNER JOIN asignacion AS a\n\t\t\t\t ON\n\t\t\t\t a.bien_id = b.id\n\t\t\t\t INNER JOIN personal AS pe\n\t\t\t\t ON\n\t\t\t\t pe.id = a.personal_id\n\t\t\t\t WHERE b.id IN ($aux_ids)\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\treturn json_encode($bienes);\n\t\t\t}else{\n\t\t\t\treturn json_encode( array('message'=>'No selecciono ningún criterio') );\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$this->result = array('error' => $e->getMessage() );\n\t\t}\t\n\t}", "public function getUserById($id) {\n\t\t\n\t}", "public function get_usuario_por_id($id_usuario){\r\n $conectar=parent::conexion();// hacemos nuestra conexion\r\n parent::set_names(); // este es para no tener probllemas con las tilde \r\n $sql=\"select * from usuario where id =?\";\r\n $sql=$conectar->prepare($sql); //HACE UNA CONSULTA EN TODOS LOS CAMPOS\r\n $sql->bindValue(1,$id_usuario);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function getDocumentosUsuario($id){\n $sql = \"SELECT d.Nombre AS documento, Ruta, d.Estatus, td.Nombre AS tipo_documento FROM documentos d \n INNER JOIN tipo_documentos td ON td.ID_Tipo_Doc = d.ID_Tipo_Doc WHERE ID_Mt_Ctl=?\";\n $consulta= $this->db->connect()->prepare($sql);\n $consulta->execute(array($id));\n \n if(!empty($consulta))\n {\n $resultado = array();\n while($fila =$consulta->fetch(PDO::FETCH_ASSOC))\n {\n $resultado[] = $fila;\n }\n return $resultado;\n }\n return false;\n }", "function getvotados($user) {\n\tglobal $wpdb;\n\tif(user_can($user, 'integrante')) {\n\t\t$votos = $wpdb->get_var( \"SELECT count(1) FROM \".$wpdb->prefix . \"poptest_votos where votante = \".$user.\" group by votante\");\n\t\treturn $votos;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function showPublicProfile ($id) {\n\n // Locate the users id\n $publicName = User::UserLocatedAt($id);\n\n // Find the users Travel Jobs.\n $ProfileJobs = Job::where('user_id', '=', $id)->latest()->get();\n\n // Find the users statuses.\n $statuses = Status::NotReply()->where('user_id', '=', $id)\n ->orderby('created_at', 'desc')->paginate(10);\n\n // Return a view with ALL users information.\n return view('users.show', compact('publicName', 'ProfileJobs', 'statuses'));\n }", "public function index()\n {\n return Pensamientos::where('user_id',auth()->id())->get();\n }", "public function getUsers()\n {\n $usuarios = $this->Etapas->getUsers()->usuarios->usuario; //usuarios seg.users\n echo json_encode($usuarios);\n }", "private function consultar_usuario_por_id() {\n\n if (is_numeric($this->referencia_a_buscar)) {\n $id_a_buscar = intval($this->referencia_a_buscar);\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u where u.id= {$id_a_buscar};\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n } else {\n $this->respuesta = null;\n }\n }", "function all_users($id){\n try{\n $get_users = $this->db->prepare(\"SELECT id, username, user_image FROM `users` WHERE id != ?\");\n $get_users->execute([$id]);\n if($get_users->rowCount() > 0){\n return $get_users->fetchAll(PDO::FETCH_OBJ);\n }\n else{\n return false;\n }\n }\n catch (PDOException $e) {\n die($e->getMessage());\n }\n }", "private function usuarios(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"GET\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t}//es una petición GET\n\t\t//se realiza la consulta a la bd\n\t\t$query = $this->_conn->query(\n\t\t\t\"SELECT id, nombre, email \n\t\t\t FROM usuario\");\n\t\t//cantidad de usuarios\n\t\t$filas = $query->fetchAll(PDO::FETCH_ASSOC); \n \t$num = count($filas);\n \t//si devolvio un resultado, se envia al cliente\n \tif ($num > 0) { \n\t $respuesta['estado'] = 'correcto'; \n\t $respuesta['usuarios'] = $filas; \n\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t } //se envia un error \n\t $this->mostrarRespuesta($this->devolverError(2), 204);\n\t}", "public function publishedBy($user_id)\n {\n return $this->model->where(compact('user_id'))->get();\n }", "public function getAllPublications($user)\n {\n return $this->getByUser($user);\n }", "function get_info_usuario($id_usuario){\n\n return $this->db->query(\"SELECT*\n FROM usuarios\n WHERE usuarios.usuario_id = $id_usuario\")->result_array();\n }", "function getOneUser_PrivilageById($id) {\n\t\t$SQL=\"SELECT * FROM user_privilage_tab WHERE id = '$id'\";\n\t\t$this->db->executeQuery($SQL);\n\n\t\t$result = array();\n\t\t$count = 0;\n\n\t\twhile($rs = $this->db->nextRecord())\n\t\t{\n\t\t\t$user_privilage = new User_Privilage();\n\t\t\t$user_privilage->setId($rs['id']);\n\t\t\t$user_privilage->setOrder_no($rs['order_no']);\n\t\t\t$user_privilage->setCode($rs['code']);\n\t\t\t$user_privilage->setUser_id($rs['user_id']);\n\t\t\t$user_privilage->setPrivilage_id($rs['privilage_id']);\n\t\t\t$user_privilage->setIs_view($rs['is_view']);\n\t\t\t$user_privilage->setIs_save($rs['is_save']);\n\t\t\t$user_privilage->setIs_edit($rs['is_edit']);\n\t\t\t$user_privilage->setIs_delete($rs['is_delete']);\n\t\t\t$user_privilage->setData_date($rs['data_date']);\n\t\t\t$user_privilage->setStatus($rs['status']);\n\t\t\t$user_privilage->setDate_($rs['date_']);\n\t\t\t$result[$count++] = $user_privilage;\n\t\t}\n\n\t\t$this->db->closeRs();\n\t\tif(count($result) > 0 ){\n\t\t\treturn $result[0];\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "function listarUsuariosId($id){\n\t\t$activo = true;\n\t\t$query = \"SELECT * FROM usuarios WHERE idUsuario='$id' and activo='$activo'\";\n\t\t$link = conectar(); //llama a la funcion conectar de conex.php\n\t\t$resultdb = $link->query($query); //envia el query a la BD\n\t\tif ($resultdb->num_rows == 1) {\n\t\t\t$usuario = $resultdb->fetch_assoc();\n\t\t}\n\t\t$link->close();//cierro conex\n\t\techo json_encode($usuario);//imprimo un JSON con los datos de la consulta\n\t}", "function find_public_photos($ids_of_private_photos, $ids_of_all_users_photos_on_page)\n{\n $public_photos = [];\n\n foreach ($ids_of_all_users_photos_on_page as $photo_id)\n if (!in_array($photo_id, $ids_of_private_photos))\n array_push($public_photos, $photo_id);\n\n return $public_photos;\n}", "public function show($id_user)\n {\n //\n return DB::table('users')\n ->select('id_user as Identificación' ,'users.name as Nombre','users.email as Email', 'city as Ciudad', 'direction as Direciión','fotos as Fotos')\n ->where('id_user',$id_user)\n ->get();\n }", "public static function getUsuarios()\n {\n $query = \"SELECT id,nombre,email,usuario,privilegio,fecha_registro FROM users\";\n\n self::getConexion();\n\n $resultado = self::$cnx->prepare($query);\n\n $resultado->execute();\n\n $filas = $resultado->fetchAll();\n\n return $filas;\n }", "private function get_user_favorite_publics(){\r\n global $USER;\r\n\r\n if(isset($USER) && $USER->id > 0) {\r\n $publics = new PublicsByFunctionUser($USER->id, $this->tab);\r\n if($this->tab == 'formation'){\r\n return $publics->get_favorite_formation_publics();\r\n } else {\r\n return $publics->get_favorite_course_publics();\r\n }\r\n }\r\n return false;\r\n }", "public function public_ids_get()\n {\n $from = \"0\";\n $size = \"10\";\n $lastModified = NULL;\n \n $temp = $this->input->get('from', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $from = $temp;\n \n $temp = $this->input->get('size', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $size = $temp;\n \n $temp = $this->input->get('lastModified', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $lastModified = intval($temp);\n \n $cutil = new CILServiceUtil();\n $result = $cutil->getAllPublicIds($from, $size,$lastModified);\n $this->response($result);\n \n }", "public function get_usuario_por_id($id_usuario)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = \"SELECT * FROM usuarios \n\t\t\t\t\tWHERE id_usuario = :id_usuario\";\n\n\t\t\t$resultado = $this->db->prepare($sql);\n\t\t\t$resultado->bindValue(\":id_usuario\", $id_usuario);\n\n\t\t\t// Failed query\n\t\t\tif(!$resultado->execute())\n\t\t\t{\n\t\t\t\theader(\"Location:index.php?usuarios&m=1\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// if user exists then we need to return data\n\t\t\t\tif($resultado->rowCount() > 0)\n\t\t\t\t{\n\t\t\t\t\twhile($reg = $resultado->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->usuario_por_id[] = $reg;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn $this->usuario_por_id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Else: return m : error message to file usuarios.php\n\t\t\t\t\theader(\"Location:index.php?usuarios&m=2\");\n\t\t\t\t}\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}", "public function findUsers($uo_id)\n {\n $em = $this->getEntityManager(); $users = array();\n try\n {\n $fetch = $em->getConnection()->fetchAll(\n 'SELECT users.id as id, users.username as username, users.date_last_login as date_last_login, '.\n 'users.time_last_login as time_last_login, users.is_active as is_active, users.correo as email, '.\n 'trabajador.nombre_apellidos as nombre_apellidos, trabajador.movil as movil, trabajador.id as trab_id, '.\n 'area.nombre as area, unidad_organizativa.nombre as unidad_organizativa '.\n 'FROM users '.\n 'JOIN trabajador ON (users.trabajador_id = trabajador.id) '.\n 'JOIN area ON (trabajador.area_id = area.id) '.\n 'JOIN unidad_organizativa ON (area.unidad_organizativa_id = unidad_organizativa.id AND unidad_organizativa.id = '. $uo_id .');');\n \n foreach ($fetch as $val)\n {\n $user = $this->find($val['id']);\n $trab = $em->getRepository('NomencladorBundle:Trabajador')->find($val['trab_id']);\n \n $users[] = array(\n 'id' => $val['id'],\n 'username' => $val['username'],\n 'nombre' => $val['nombre_apellidos'],\n 'movil' => ($val['movil']) ? $val['movil'] : 'No se conoce.',\n 'email' => ($val['email']) ? $val['email'] : 'No se conoce.',\n 'cargo' => ($trab->getCargo()) ? $trab->getCargo()->getNombre() : 'No se conoce.',\n 'area' => $trab->getArea()->getNombre(),\n 'last_login' => $val['date_last_login'] .' '. $val['time_last_login'],\n 'is_active' => $val['is_active'],\n 'roles' => $user->getStringRoles()\n );\n }\n return $users;\n }\n catch (\\Exception $e)\n {\n return $e->getMessage();\n } \n }", "public function showme(Publicaciones $publicaciones, int $id=0)\n {\n $publicaciones = ($id==0)? Publicaciones::all():Publicaciones::find($id);\n return response()->json($publicaciones, 200);\n }", "public function getSeguidoresUser()\n {\n return $this->hasMany(User::className(), ['id' => 'user_id'])->via('seguidores');\n }", "public function getUserProjects($id)\n {\n $em = $this->getEntityManager();\n $qb = $em->createQueryBuilder();\n $qb->select('ur.id');\n $qb->from('Vlreleases\\UserBundle\\Entity\\User', 'u');\n $qb->innerJoin('u.projects', 'ur');\n $qb->where(\"u.id='$id'\");\n $result = $qb->getQuery()->getResult(); \n if($result)\n {\n for ($i = '0'; $i < sizeof($result); $i++)\n {\n $id = $result[$i]['id'];\n $qb1 = $em->createQueryBuilder();\n $qb1->select('u.name');\n $qb1->from('Vlreleases\\UserBundle\\Entity\\Project', 'u');\n $qb1->where(\"u.id='$id'\");\n $finalResult[$i] = $qb1->getQuery()->getResult();\n }\n return $finalResult;\n } \n else{\n return $result;\n }\n \n }", "public function getPublicProfile($userid){\n\n // die($userid);\n $userid = $userid;\n $users = DB::table(\"users\")->where('id',$userid)->get();\n \n // get registration event \n $checkifpending =\tDB::table('tbl_racer_registration')\t\t\t\n ->leftjoin('tbl_organizer_event', 'tbl_racer_registration.event_id', '=', 'tbl_organizer_event.id')\t\n ->where(['tbl_racer_registration.registered_racer_id' => $userid])\t\n ->get();\n \n \n // check if has profile image\n $userImage = DB::table(\"tbl_profile_image\")->where(\"user_id\", $userid)->get();\n \n $user_image = '';\n if(!$userImage->isEmpty()){\n foreach( $userImage as $vv){\n $user_image = $vv->profile_image;\n }\n }\n \n \n // GET ALL HIS SOCIAL WIDGETS\n $tbl_social_widgets = DB::table(\"tbl_social_widgets\")->where('user_id',$userid)->get();\n \n if(!$users->isEmpty()){\n \n return view('public-racer-profile-view', compact('tbl_social_widgets','user_image','checkifpending','userid','users'));\n \n }else{\n echo 'User not found';\n }\n \n }", "public function showAnnonceParUser(){\n $db = $this->getPDO();\n\n $sql = \"SELECT * FROM annonces INNER JOIN utilisateurs ON annonces.utilisateur_id = utilisateurs.id_utilisateur INNER JOIN categories ON annonces.categorie_id = categories.id_categorie INNER JOIN regions ON annonces.regions_id = regions.id_regions WHERE utilisateur_id = ?\";\n $this->id_annonce = $_SESSION['id_utilisateur'];\n\n $request = $db->prepare($sql);\n $request->bindParam(1, $this->id_annonce);\n $request->execute();\n\n return $request->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getUsuariosParaEmail(){\r\n\r\n $queryBuilder = $this->createQueryBuilder('u')\r\n ->where('u.recibeNotificaciones = true'); \r\n\r\n return $queryBuilder;\r\n \r\n }", "public static function create_by_user_public($a_user_id){\n\n\t\t$request = self::_get_connection()->select(\"SELECT ID from `apine_images` where user_id=$a_user_id OR privacy=2\");\n\t\t$liste = new Liste();\n\t\tif($request != null && count($request) > 0){\n\t\t\tforeach($request as $item){\n\t\t\t\t$liste->add_item(new ApineImage($item['ID']));\n\t\t\t}\n\t\t}\n\t\treturn $liste;\n\t\n\t}", "public function mostrar_usuaris(){\n $sql = \"SELECT usuaris.id AS id, usuaris.nom AS nom, usuaris.cognoms AS cognoms, usuaris.email AS email,\n usuaris.idrol AS idrol, rols.descrip AS descrip FROM usuaris INNER JOIN rols ON usuaris.idrol = rols.id\";\n \n $query=$this->db->prepare($sql);\n $query->execute();\n $res=$query->fetchAll();\n return $res;\n }", "private function get_userInfo() {\n $params = [ 'user_ids' => $this->user_id ];\n $result = $this->api->users->get($params);\n $params['fields'] = '';\n $result2 = $this->api2->users->get($params);\n $result['hidden'] = (int)array_has($result2, 'hidden');\n return $result;\n }", "private function obtenerPerfiles ($idUser = \"\") {\n\n if ($idUser != \"\") {\n $this->id_usuario = $idUser;\n }\n\n if (count($this->perfiles) < 1) {\n $query = $this->stringConsulta() . \" where a.id_usuario=$this->id_usuario\";\n $data = $this->bd->ejecutarQuery($query);\n\n if ($data instanceof \\Countable and count($data) > 1) {\n throw new Exception(\"No se han obtenido los perfiles del usuario\", 1);\n }\n\n while ($perfil = $this->bd->obtenerArrayAsociativo($data)) {\n $this->perfiles[$perfil['clave_perfil']] = $perfil['clave_perfil'];\n }\n\n }\n else {\n $this->perfiles[] = 'UsuarioPublico';\n }\n\n }", "function mostrarUsuario($id) {\n //Llamamos a la variable agenda\n global $agenda;\n //Obtenemos el id de la variable agenda\n $usuario = $agenda[$id];\n foreach($usuario as $user) {\n echo $user . '<br/>';\n }\n }", "public function getPerfilById($id)\r\n\t{\r\n \t$sql = new Sql($this->dbAdapter);\r\n\t\t$select = $sql->select();\r\n\t\t$select->from('users');\r\n\t\t$select->columns(array('id','email','password'));\r\n\t\r\n\t\t$select->join(array('i_u'=>'users_details'),'users.id = i_u.id_user',array('id_user','name','surname', 'campus', 'phone', 'addres','image','pin','key_inventory'), 'Left');\r\n\t\t$select->where(array('users.id' =>$id ));\r\n\r\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result=$execute->toArray(); \r\n\r\n\t\t//echo \"<pre>\";print_r($result);exit;\r\n\t\treturn $result;\r\n\r\n\t}", "public function get_usuario_por_id_compras($id_usuario)\n {\n\n\n $conectar = parent::conexion();\n parent::set_names();\n\n\n $sql = \"select u.id_usuario,c.id_usuario\n \n from usuarios u \n \n INNER JOIN compras c ON u.id_usuario=c.id_usuario\n\n\n where u.id_usuario=?\n\n \";\n\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $id_usuario);\n $sql->execute();\n\n return $resultado = $sql->fetchAll(PDO::FETCH_ASSOC);\n }", "public function buscarUsuario($idUser){\n\t\t\t\n\t\t\t$this->load->database();\n\t\t\t\n\t\t\t$query = $this->db->query(\"SELECT * FROM user WHERE id_user = $idUser\");\n\t\t\t\n\t\t\t\t $dados = array();\n\t\t\t\t \tforeach($query->result() as $linha)\n\t\t\t\t \t{\n\t\t\t\t \t\t$dados['id_user'] = $linha->id_user;\n\t\t\t\t \t\t$dados['nome'] = $linha->nome;\n\t\t\t\t \t\t$dados['email'] = $linha->email;\n\t\t\t\t \t\t$dados['login'] = $linha->login;\n\t\t\t\t \t\t$dados['perfil'] = $linha->perfil;\n\t\t\t\t }\n\n\t\t\treturn($dados);\n\t\t\t\n\t\t}", "public function show($id)\n {\n try {\n $user = User::where('id', $id)->where('permissao', 'P')\n ->with(['albuns' => function ($query) {\n $query->select('albums.id', 'albums.titulo', 'albums.capa as url', 'albums.descricao',\n 'albums.categoria', 'albums.user_id as artist', 'albums.user_id', 'albums.created_at');\n }])\n ->select('users.id', 'users.name', 'users.email', 'users.img_perfil', 'users.descricao')\n ->first();\n if (!empty($user)) {\n return response()->json([\"data\" => $user]);\n } else {\n return response()->json([\"error\" => true, \"message\" => \"Erro ao encontrar instrutor\"], 404);\n }\n } catch (\\Exception $exception) {\n return response()->json(['error' => true, 'message:' => $exception->getMessage()], 500);\n }\n }", "public function get_usuario_por_id($id_usuario)\n {\n\n $conectar = parent::conexion();\n parent::set_names();\n\n $sql = \"select * from usuarios where id_usuario=?\";\n\n $sql = $conectar->prepare($sql);\n\n $sql->bindValue(1, $id_usuario);\n $sql->execute();\n\n return $resultado = $sql->fetchAll();\n }", "function obtenerSujetoObjetoPorUsuario( $dbh, $idu ){\r\n\t\t// Devuelve todos los registros de sujeto-objeto realizados en una sesión\r\n\t\t$q = \"select so.id as id_so, s.id as idsujeto, s.nombre nsujeto, o.id as idobjeto, \r\n\t\to.nombre as nobjeto, a.id as idarea, a.nombre as narea \r\n\t\tfrom sujeto_objeto so, sujeto s, objeto o, area a, sesion ss, usuario u \r\n\t\twhere s.id = so.sujeto_id and o.id = so.objeto_id and a.id = so.area_id \r\n\t\tand so.sesion_id = ss.id and ss.usuario_id = u.id and u.id = $idu\";\r\n\r\n\t\treturn obtenerListaRegistros( mysqli_query( $dbh, $q ) );\r\n\t}", "public function usuarios(){\n \treturn $this->hasMany(PerfilUsuario::class, 'id_perfil', 'id_perfil')->where('bo_activo', true)->where('bo_estado', 1);//->orderBy('email');\n }", "function presentarImagenesPublicacion($idPP)\r\n {\r\n $id=$idPP;\r\n $directory=('upload/');\r\n $dirint = dir($directory);\r\n if ($idPP == null) {\r\n $id = $this->ultimoId();\r\n }\r\n\r\n while(($archivo = $dirint->read()) !== false)\r\n {\r\n $str = $archivo;\r\n $caracteres = preg_split('/_/', $str, -1, PREG_SPLIT_NO_EMPTY);\r\n // var_dump($caracteres);\r\n // $items = (string)$id;\r\n // var_dump($items);\r\n if ($caracteres['0'] === $id){\r\n $imagen = $id.'_'.$caracteres['1'];\r\n // var_dump($imagen);\r\n echo '<div class=\"col-md-6\" style=\"width:20%;\"><img src=\"/inmobiitla/upload/'.$imagen.'\" class=\"img-responsive img-thumbnail\" /></div>'.\"\\n\";\r\n }\r\n }\r\n $dirint->close();\r\n }", "public static function ObtenerCalendarioUsuario($id_usuario)\n {\n // Consulta de la meta\n $consulta = \"SELECT * FROM calendario, monitoreo WHERE (calendario.id_usuario = ? AND monitoreo.id_monitoreo=calendario.id_monitoreo)\";\n\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute(array($id_usuario));\n // Capturar primera fila del resultado\n //$row = $comando->fetch(PDO::FETCH_ASSOC);\n //return $row;\n\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n // Aquí puedes clasificar el error dependiendo de la excepción\n // para presentarlo en la respuesta Json\n return -1;\n }\n }", "public function getMembers()\n {\n \t$companyId = session('company_id');\n \t$userRepo = $this->em->getRepository('App\\Entity\\Management\\User');\n \t$users = $userRepo->getUsersByCompany($companyId);\n\n echo json_encode($users);\n\n }", "public function retrieve_all_users()\n {\n $table_pengajar = $this->db->dbprefix('pengajar');\n $table_siswa = $this->db->dbprefix('siswa');\n $table_login = $this->db->dbprefix('login');\n\n $sql = \"SELECT {$table_login}.username, {$table_pengajar}.nama FROM {$table_pengajar} INNER JOIN {$table_login} ON {$table_pengajar}.id = {$table_login}.pengajar_id\n UNION\n SELECT {$table_login}.username, {$table_siswa}.nama FROM {$table_siswa} INNER JOIN {$table_login} ON {$table_siswa}.id = {$table_login}.siswa_id\";\n\n $result = $this->db->query($sql);\n\n $data = array();\n foreach ($result->result_array() as $r) {\n # selain yang login\n if (is_login() && $r['username'] == get_sess_data('login', 'username')) {\n continue;\n }\n $data[] = addslashes($r['nama']) . ' [' . $r['username'] . ']';\n }\n\n return $data;\n }", "public function datos_usuario(){\n\t\t$data = json_decode(json_encode($_SESSION['USER']),true);\n\n\t\t$result = $this->_db->query(\"\n\t\tSELECT a.roleid FROM \".DB_PRE.\"role_assignments a, \".DB_PRE.\"context b \n\t\tWHERE a.userid = '$data[id]' AND a.contextid = b.id AND b.instanceid =\".ID_CURSO\n\t\t);\n\n\t\t$rol = 0;\n\t\tif (!$result) {\n\t\t\tprintf(\"Errormessage datos_usuario: %s\\n\", $this->_db->error);\n\t\t}else{\n\t $rol_user = $result->fetch_all(MYSQLI_ASSOC);\n\t if(count($rol_user) > 0){\n\t \t$rol = $rol_user['0']['roleid'];\n\t }\n \t}\n\n\t\t$usuario = array(\n\t\t\t\"id\" => $data['id'],\n\t\t\t\"nombre\" => $data['firstname'],\n\t\t\t\"apellido\" => $data['lastname'],\n\t\t\t\"codigo_estudiante\" => $data['idnumber'],\n\t\t\t\"rol\" => $rol\n\t\t);\n\n\t\t$datos_add = $this->_db->query(\"\n\t\t\tSELECT e.per_aca, b.id_facultad, a.id_programa, e.idnumber as codigo_curso, a.id_genero, a.idnumber\n\t\t\tFROM am_usuario a, am_programa b, \".DB_PRE.\"course e\n\t\t\tWHERE a.id_programa = b.id_programa\n\t\t\tAND e.id = \".ID_CURSO.\"\n\t\t\tAND id_moodle = \".$data['id']\n\t\t\t);\n\n\t\tif (!$datos_add) {\n\t\t\tprintf(\"Errormessage datos_add: %s\\n\", $this->_db->error);\n\t\t}else{\n\t\t\t$row = $datos_add->fetch_all(MYSQLI_ASSOC);\n\t\t\tforeach ($row as $key) {\n\t\t\t\tforeach ($key as $data => $value) {\n\t\t\t\t\t$usuario[$data] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $usuario;\n\t}", "function datos_usuario($id_usuario) {\n\t\t$query = \"SELECT colaboradores.*, colaboradores_permisos.*\n\t\tFROM colaboradores, colaboradores_permisos\n\t\tWHERE colaboradores.id_colaborador='$id_usuario'\n\t\tAND colaboradores.id_colaborador=colaboradores_permisos.id_colaborador\n\t\tAND colaboradores.estado=1\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function ListaUsuario() {\n\t\n\t\t\t$sql = \"SELECT usu.*, CONCAT_WS(' ', per.primer_nombre, per.primer_apellido) as nombre_completo, usu.nombre_usuario, rol.descripcion FROM usuario usu\n\t\t\t\t\tINNER JOIN rol rol ON rol.id = usu.rol_id\n\t\t\t\t\tINNER JOIN persona per ON per.id = usu.persona_id\";\n\t\t\t$db = new conexion();\n\t\t\t$result = $db->consulta($sql);\n\t\t\t$num = $db->encontradas($result);\n\t\t\t$respuesta->datos = [];\n\t\t\t$respuesta->mensaje = \"\";\n\t\t\t$respuesta->codigo = \"\";\n\t\t\tif ($num != 0) {\n\t\t\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t\t\t}\n\t\t\t\t$respuesta->mensaje = \"Ok\";\n\t\t\t\t$respuesta->codigo = 1;\n\t\t\t} else {\n\t\t\t\t$respuesta->mensaje = \"No existen registros de roles.\";\n\t\t\t\t$respuesta->codigo = 0;\n\t\t\t}\n\t\t\treturn json_encode($respuesta);\n\t\t}", "function getPerfiles($idUser){\n\t\t/*\n\t\tDeben obtenerse de control_perfil_usuario los id de perfiles a los que pertenece el \n\t\tusuario para poder desplegarlos en el formulario de edición de datos\n\t\t*/\n\t\t$array=array();\n\t\t$oPerfilUsuario=new Perfil_usuario($this->oDBM);\n\t\t$arrayPerfilUsuario=$oPerfilUsuario->getPerfilesUsuario($idUser);\n\t\t\n\t\tforeach ($arrayPerfilUsuario as $item){\n\t\t\t$array[]=$item['id_perfil'];\n\t\t}\n\t\treturn $array;\n\t\t\n\t}", "public function buscarUsuarios(){\n\t\t}", "public function selectusers($idprojeto) {\n $array = null;\n //seleciona todos os participantes do projeto\n $dbtableUP = new Application_Model_DbTable_ProjetoUsuario();\n\n $query1 = $dbtableUP->select()->from($dbtableUP)->where('fk_id_projeto = ?', $idprojeto);\n\n /* @var $arrayUserProj type */\n $arrayUserProj = $dbtableUP->fetchAll($query1)->toArray();\n //seleciona da tabela de usuario os usuarios participantes\n\n if ($arrayUserProj != null) {\n $dbTableUse = new Application_Model_DbTable_Usuario();\n foreach ($arrayUserProj as $uspr) {\n $query = $dbTableUse->select()->from($dbTableUse)->where('id_usuario = ?', $uspr['fk_id_usuario']);\n if ($array == null) {\n $array = array($dbTableUse->fetchAll($query)->toArray());\n } else {\n array_push($array, $dbTableUse->fetchAll($query)->toArray());\n }\n }\n }\n //\n return $array;\n }", "public function findUsers();", "public function findUsers();", "public function getUsers()\n {\n $request = \"SELECT user.*, rank.name as rank_name FROM `user` join rank on user.rank = rank.id order by rank.id\";\n $request = $this->connexion->query($request);\n $newsList = $request->fetchAll(PDO::FETCH_ASSOC);\n // var_dump($newsList);\n return $newsList;\n }", "function people_getPublicPhotos ($user_id, $per_page = 25, $page = 1, $safe_search = 1, $extras = NULL) {\n\t\t$params = array();\n\t\t$params['method'] = 'flickr.people.getPublicPhotos';\n\t\t$params['user_id'] = $user_id;\n\t\t$params['per_page'] = $per_page;\n\t\t$params['page'] = $page;\n\t\t$params['safe_search'] = $safe_search;\n\t\tif ($extras) $params['extras'] = $extras;\n\t\t$response = $this->execute($params);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['photos'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function obtenerIdPublicaciones()\n {\n $publicaciones = file_get_contents('publicaciones.json');\n $traerPublicaciones = explode(PHP_EOL, $publicaciones);\n $arrayPublicaciones = [];\n array_pop($traerPublicaciones);\n\n foreach ($traerPublicaciones as $indice => $publicacion) {\n $arrayPublicaciones[] = json_decode($publicacion, true);\n }\n\n $ultimoUser = array_pop($arrayPublicaciones);\n \n $ultimoId = $ultimoUser['post_id'];\n\n if(count($ultimoId) == 0){\n return 1;\n }\n\n return $ultimoId + 1;\n }", "public function getAllUserListaParticipantesByProjeto($id)\n {\n \n $this->db->select('users.id as id_user, users.first_name as fname, users.last_name as lname, setores.nome as setor')\n ->join('users', 'users_listas_participantes.users = users.id', 'inner')\n ->join('setores', 'users.setor_id = setores.id', 'inner') \n ->order_by('users.first_name', 'asc');\n $q = $this->db->get_where('users_listas_participantes', array('projeto' => $id, 'participante_atas' => 1));\n \n \n if ($q->num_rows() > 0) {\n \n foreach (($q->result()) as $row) {\n $data[] = $row;\n }\n return $data;\n \n // return $q->row();\n \n \n }\n return FALSE;\n \n }", "public function show($id)\n {\n $token = JWTAuth::getToken();\n $user = JWTAuth::toUser($token);\n $poruka = Poruka::find($id);\n if($poruka->korisnik1_id == $user->id || $poruka->korisnik2_id == $user->id || $user->admin){\n return $poruka;\n }\n else return response()->json(['error' => 'No authorization to see Poruka'], HttpResponse::HTTP_UNAUTHORIZED);\n\n }", "public function getUserById($id){\n $sql=\"SELECT * FROM users WHERE (id = ?)\";\n $select=parent::connect_db()->prepare($sql);\n $select->bindValue(1, $id);\n $select->execute();\n if($select->rowCount() > 0):\n return $select->fetchAll(\\PDO::FETCH_ASSOC);\n //return $results;\n else:\n return [];\n endif;\n }", "public function profil(){\n\t\t//TODO : verifications si le mec à les droits pour accéder à ce profil (en gros si c'est un particpan auth et pas un orga ou un visiteur)\n\n\n\t\t$response = $this->client->get(\"organisateurs/\".$_SESSION['id'].\"\"); \n\t\t$body = $response->getBody();\n\t\tif ($response->getStatusCode() == \"200\"){ //si la ressource existe bien\n\t\t\t$body = json_decode($body, true);\n\t\t\t$organisateur = $body['organisateur'];\n\t\t\t$links = $body['links'];\n\n\t\t\t//récupérer les évènements liés au organisateur\n\t\t\t$response = $this->client->get($links['href']); \n\t\t\tif ($response->getStatusCode() == \"200\"){\n\t\t\t\t$body = $response->getBody();\n\t\t\t\t$body = json_decode($body, true);\n\t\t\t\t$events = $body['evenements'];\n\n\t\t\t\t$event = array();\n\t\t\t\tforeach ($events as $value){\n\t\t\t\t\t$event[] = $value['evenement'];\n\n\t\t\t\t\t/*foreach ($value['links'] as $key => $rel) {\n\t\t\t\t\t\tif($rel['rel'] == 'self'){\n\t\t\t\t\t\t\t$evenementLinkResponse = $client->get($rel['href']); \n\t\t\t\t\t\t\t$evenementLink = json_decode($evenementLinkResponse->getBody(),true);\n\t\t\t\t\t\t\t$all['linkEvent'] = $organisateurLink;\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\t\t\t\t}\n\n\n\t\t\t}else{\n\t\t\t\t$message = \"aucun evenement\";\n\t\t\t\t$v = new view\\ViewError($message);\n\t\t\t\t$v->display();\n\t\t\t}\n\n\t\t\t$v = new view\\ViewProfilOrganisateur($organisateur,$event);\n\t\t\t$v->display();\n\t\t}else{\n\t\t\t$message = \"Ressource n'existe pas\";\n\t\t\t$v = new view\\ViewError($message);\n\t\t\t$v->display();\n\t\t}\n\t}", "function listar_usuarios() {\n\t\t$query = \"SELECT colaboradores.*, colaboradores_permisos.*\n\t\tFROM colaboradores, colaboradores_permisos\n\t\tWHERE colaboradores.id_colaborador=colaboradores_permisos.id_colaborador\n\t\tAND colaboradores.estado=1\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function getAllUsers($id)\n {\n $queryBuilder = $this->db->createQueryBuilder();\n $queryBuilder\n ->select('u.*')\n ->from('users', 'u')\n ->where('gamerID = ?')\n ->setParameter(0, $id);\n $statement = $queryBuilder->execute();\n $usersData = $statement->fetchAll(); \n foreach ($usersData as $userData) {\n $userEntityList[$userData['id']] = new user($userData['id'], $userData['nom'], $userData['prenom'],$userData['gamerID']);\n }\n return $userEntityList;\n }", "public function buscar_Usuario2($id){\n\t\t$sql = \"select Documento, Nombres, Apellidos, Usuario, Password, Pregunta, Respuesta,\n\t\t\tTipo_Documento,Ciudad, Direccion, Edad,Foto,Telefono,Correo_Electronico,\n\t\t\tGenero,perfiles_Nombre \n\t\t\tfrom usuarios where Documento='$id'\";\n\t\t$registros = $this->bd->consultar($sql);\n\t\tif($reg=mysql_fetch_array($registros)){\n\t\t\t$this->usuario->set_Nid($reg['Documento']);\n\t\t\t$this->usuario->set_Usuario($reg['Usuario']);\n\t\t\t$this->usuario->set_Password($reg['Password']);\n\t\t\t$this->usuario->set_Nombres($reg['Nombres']);\n\t\t\t$this->usuario->set_Apellidos($reg['Apellidos']);\n\t\t\t$this->usuario->set_TipoId($reg['Tipo_Documento']);\n\t\t\t$this->usuario->set_Ciudad($reg['Ciudad']);\n\t\t\t$this->usuario->set_Direccion($reg['Direccion']);\n\t\t\t$this->usuario->set_Email($reg['Correo_Electronico']);\n\t\t\t$this->usuario->set_Pregunta($reg['Pregunta']);\n\t\t\t$this->usuario->set_Respuesta($reg['Respuesta']);\n\t\t\t$this->usuario->set_Celular($reg['Telefono']);\n\t\t\t$this->usuario->set_Edad($reg['Edad']);\n\t\t\t$this->usuario->set_Foto($reg['Foto']);\n\t\t\t$this->usuario->set_Genero($reg['Genero']);\n\t\t\t$this->usuario->set_Perfil($reg['perfiles_Nombre']);\n\n\t\t}\n\t}", "public static function accessPages(int $userid) {\n $division_temp = User::where($userid)\n ->select('division', 'role')\n ->get()->all();\n $division_id = $division_temp[0][\"division\"];\n $role_id = $division_temp[0][\"role\"];\n\n //get associates' ids\n $associates_temp = User::where('reportto', $userid)\n ->select('id')\n ->get()->all();\n\n $associates = array();\n foreach($associates_temp as $k => $v) {\n $associates[] = $v->id;\n }\n\n $temps = Access::where('status', 1)\n ->select('id')\n ->orderBy('id')\n ->get()->all();\n //[{\"id\":2},{\"id\":5}] \n $users = array();\n foreach($temps as $k => $v) {\n $users[] = $v->id;\n }\n }", "public function read_tiendas_user($idu){\r\n\r\n $sql=\"select p.id_proveedor, p.nombre_establecimiento, p.direccion_fisica, p.direccion_web,\r\n p.descripcion_tienda, t.telefono_usuario, p.id_usuario\r\n from proveedor p\r\n INNER JOIN usuario u on p.id_usuario = u.id_usuario\r\n INNER JOIN no_telefonos_usuario t on p.id_usuario = t.id_usuario\r\n where p.id_usuario=$idu\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n \r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n \r\n }", "public function ShowUsersPois($db){\n $stmt = $db->prepare(\"SELECT pois.*\n FROM pois\n WHERE user_id = :user_id\n ORDER BY last_edit DESC \");\n $stmt->bindParam(':user_id', $_SESSION[\"user_id\"]);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function getVentasUsuario(){\n if(isset($_GET['id'])){\n\n // Obtencion del id del usuario\n $idUsuario = $_GET['id'];\n\n // Conexion a la base de datos\n $con = conexion();\n\n // Selecciona todas las ventas del usuario\n $query = \"SELECT * FROM ver_ventas_usuario WHERE usu_id = \".$idUsuario;\n $select = $con -> query($query);\n\n // Validacion de que el usuario tenga boletos comprados\n if($select -> num_rows > 0){\n\n // Creacion de array vacio que contendra todas las compras\n $arrayVentas = array();\n\n // Mientras exista una venta de boletos del usuario crea un array de la seccion y lo\n // agrega a la variable de todas las compras que existen\n while($row = $select -> fetch_assoc()){\n $compra = [\n \"id_venta\" => $row['ven_id'],\n \"estado_de_pago\" => $row['ven_pago_realizado'],\n \"id_seccion\" => $row['sec_id'],\n \"nombre_seccion\" => $row['sec_nombre'],\n \"costo\" => $row['sec_costo'],\n \"id_evento\" => $row['eve_id'],\n \"nombre_evento\" => $row['eve_nombre'],\n \"estado\" => $row['eve_estado'],\n \"ciudad\" => $row['eve_ciudad'],\n \"direccion\" => $row['eve_direccion'],\n \"lugar\" => $row['eve_lugar'],\n \"fecha\" => $row['eve_fecha'],\n \"hora\" => $row['eve_hora'],\n \"foto\" => $row['eve_foto'],\n \"descripcion\" => $row['eve_descripcion'],\n \"nombre_categoria\" => $row['cat_nombre'],\n \"id_usuario\" => $row['usu_id'],\n \"correo_usuario\" => $row['usu_correo'],\n ];\n $arrayVentas[] = $compra;\n }\n\n // Crea el array de respuesta con todas las compras del usuario de la base de datos\n $compras = [\"res\" => \"1\", \"compras\" => $arrayVentas];\n\n // Creacion del JSON, cierre de la conexion a la base de datos e imprime el JSON\n $json = json_encode($compras);\n $con -> close();\n print($json);\n }else{\n // Respuesta en caso de que no contenga boletos comprados el usuario\n $json = json_encode([\"res\" => \"0\", \"msg\" => \"No se encontraron boletos comprados\"]);\n $con->close();\n print($json);\n }\n }else{\n // Respuesta en caso de que la url no contenga el id del usuario\n $json = json_encode([\"res\"=>\"0\", \"msg\"=>\"La operación deseada no existe\"]);\n print($json);\n }\n}", "public static function ObtenerProyectosUsuerId($idusuario) {\n $conexion = new ConexionAnaliizoPostgres();\n $conexion->exec(\"set names utf8\");\n $consulta = $conexion->prepare('select * from analiizo_salud.spSelectedProyectosUsuerId(?);');\n $consulta->bindParam(1, $idusuario, PDO::PARAM_STR);\n $consulta->execute();\n $registros = $consulta->fetchAll();\n $conexion = null;\n return $registros;\n }", "public function getAllUsers(){\n $stmt = $this->databaseConnection->prepare(\"SELECT users.login, users.phone, users.invite, cities.city_name, invites.date_status_\n FROM users\n LEFT JOIN cities ON users.id_city = cities.id_city\n LEFT JOIN invites ON users.invite = invites.invite\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function get_all_user($koneksi){\n\t\t$query = \"SELECT * FROM v_user\";\n\n\t\t$statement = $koneksi->prepare($query);\n\t\t$statement->execute();\n\t\t$result = $statement->fetchAll();\n\n\t\treturn $result;\n\t}", "public function getObras($id_usuario);" ]
[ "0.6855279", "0.637148", "0.62564087", "0.621645", "0.62048674", "0.61880356", "0.6178026", "0.61361545", "0.61052734", "0.60996175", "0.60667217", "0.60592514", "0.60401225", "0.6024384", "0.60093135", "0.6001946", "0.59631544", "0.5959101", "0.59546494", "0.59482294", "0.5911871", "0.58838546", "0.58838546", "0.5882866", "0.5881154", "0.58705115", "0.5870289", "0.58522964", "0.5845463", "0.5842623", "0.5823539", "0.5823539", "0.5823539", "0.58187515", "0.5799657", "0.5790055", "0.57815564", "0.5780536", "0.5778953", "0.57774204", "0.5748651", "0.57463306", "0.57455575", "0.5741656", "0.5738355", "0.5729489", "0.5729091", "0.5719702", "0.57180285", "0.57169724", "0.5714645", "0.570055", "0.5687097", "0.5684389", "0.56695426", "0.56481004", "0.5648037", "0.5645976", "0.56308943", "0.5629951", "0.56242096", "0.56154555", "0.56149644", "0.56130224", "0.5612501", "0.5610257", "0.5609786", "0.56062925", "0.5606002", "0.56054306", "0.56042504", "0.5602576", "0.5600991", "0.55999947", "0.5598332", "0.55979705", "0.5594685", "0.5593049", "0.5587329", "0.5581669", "0.55801046", "0.55799216", "0.55799216", "0.5577953", "0.5577846", "0.55777967", "0.5577622", "0.557449", "0.55677944", "0.55570877", "0.5555183", "0.55473465", "0.5544021", "0.5537367", "0.55372244", "0.5536686", "0.5532077", "0.55249506", "0.55208755", "0.5519952", "0.55197567" ]
0.0
-1
Permite obtener la informacion de una publicacion por el id de la misma
public function getItem() { $this->checkUserIsLogged(); $params = Route::getUrlParameters(); $id = $params['id']; try { $item = new Item; $item->getItem($id); View::renderJson($item); } catch (Exception $e) { View::renderJson(['status' => 0, 'message' => $e]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublicacion($id)\n {\n $publicacion = $this->publicacionDAO->getPublicacion($id);\n $secciones = $this->seccionDAO->getSecciones($publicacion->getId());\n\n if (!is_null($secciones)) {\n foreach ($secciones as $seccion) {\n $seccion->setNoticias($this->noticiaDAO->getNoticias($seccion->getId()));\n }\n\n $publicacion->setSecciones($secciones);\n }\n \n\n // var_dump($this->generoDAO->getGeneros());\n // die;\n echo $this->renderer->render(\"view/mostrar-publicacion.mustache\", array(\n \"title\" => \"Publicación\",\n \"id\" => $id,\n \"publicacion\" => Publicacion::toArrayMap($publicacion),\n \"generos\" => GeneroSeccion::toListArrayMap($this->generoDAO->getGeneros()),\n \"estados\" => Estado::toListArrayMap($this->estadoDAO->getEstados())\n ));\n \n }", "public function publicaciones() //Lleva ID del proveedor para hacer carga de BD\r\n\t{\r\n\t\t//Paso a ser totalmente otro modulo para generar mejor el proceso de visualizacion y carga de datos en la vistas\r\n\r\n\t}", "function mostrar_link_publico($id){\n $sql=\"SELECT * FROM link WHERE id_cat='$id'\";\n $consulta=mysql_query($sql);\n $resultado = mysql_fetch_array($consulta);\n $this->id=$id;\n $this->nombre=$resultado['nombre_cat'];\n $this->etiqueta=$resultado['etiqueta_cat'];\n $this->descripcion=$resultado['descripcion_cat'];\n $this->claves=$resultado['claves_cat'];\n $this->tipo=$resultado['tipo_cat'];\n $this->prioridad=$resultado['prioridad_cat'];\n }", "public function getPublicacion()\n {\n return $this->hasOne(Publicacion::className(), ['id' => 'id_publicacion']);\n }", "function mostrar_link_publico($id){\n\t\t\t$sql=\"SELECT * FROM link WHERE id_cat='$id'\";\n\t\t\t$consulta=mysql_query($sql);\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_cat'];\n\t\t\t$this->etiqueta=$resultado['etiqueta_cat'];\n\t\t\t$this->descripcion=$resultado['descripcion_cat'];\n\t\t\t$this->claves=$resultado['claves_cat'];\n\t\t\t$this->tipo=$resultado['tipo_cat'];\n\t\t\t$this->prioridad=$resultado['prioridad_cat'];\n\t}", "public function MediosPagosPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * from mediospagos where codmediopago = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codmediopago\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function select($id){\n $data= null;\n \n $sql= 'SELECT * FROM publicaciones WHERE idpublicacion=\"'.$id.'\"';\n if($consulta= $this->conectar()->query($sql)){\n while($row= $consulta->fetch(PDO::FETCH_ASSOC)){\n $data[] = $row; \n }\n }\n return $data;\n }", "function mdatosPublicaciones(){\n\t\t$conexion = conexionbasedatos();\n\n\t\t$consulta = \"select * from final_publicacion order by FECHA_PUBLICACION desc; \";\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public function show(Publicacion $publicacion)\n {\n //\n }", "function retrieve_profile_publication($id)\r\n {\r\n $pmdm = ProfilerDataManager :: get_instance();\r\n return $pmdm->retrieve_profile_publication($id);\r\n }", "function getPublicPostingInfo($id = 0) {\n return getOne(\"SELECT * FROM posting WHERE id = ?\", [$id]);\n}", "public static function find ($id) {\n self::initialiserDB();\n self::$database->query(\"SELECT * FROM Publication WHERE id='$id'\");\n\n return self::$database->liste(\"publiDetail\");\n }", "function presentarImagenesPublicacion($idPP)\r\n {\r\n $id=$idPP;\r\n $directory=('upload/');\r\n $dirint = dir($directory);\r\n if ($idPP == null) {\r\n $id = $this->ultimoId();\r\n }\r\n\r\n while(($archivo = $dirint->read()) !== false)\r\n {\r\n $str = $archivo;\r\n $caracteres = preg_split('/_/', $str, -1, PREG_SPLIT_NO_EMPTY);\r\n // var_dump($caracteres);\r\n // $items = (string)$id;\r\n // var_dump($items);\r\n if ($caracteres['0'] === $id){\r\n $imagen = $id.'_'.$caracteres['1'];\r\n // var_dump($imagen);\r\n echo '<div class=\"col-md-6\" style=\"width:20%;\"><img src=\"/inmobiitla/upload/'.$imagen.'\" class=\"img-responsive img-thumbnail\" /></div>'.\"\\n\";\r\n }\r\n }\r\n $dirint->close();\r\n }", "function retrieve_personal_message_publication($id)\r\n {\r\n $pmdm = PersonalMessengerDataManager :: get_instance();\r\n return $pmdm->retrieve_personal_message_publication($id);\r\n }", "public function MediosPagosId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" select * from mediospagos where codmediopago = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"formapagove\"]) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "public function getPublicaciones()\n {\n $publicaciones = $this->publicacionDAO->getPublicaciones();\n\n\n echo $this->renderer->render(\"view/listar-publicaciones.mustache\", array(\n \"title\" => \"Publicación\",\n \"publicaciones\" => Publicacion::toListArrayMap($publicaciones),\n \"estados\" => Estado::toListArrayMap($this->estadoDAO->getEstados())\n ));\n \n }", "public function public_ids_get()\n {\n $from = \"0\";\n $size = \"10\";\n $lastModified = NULL;\n \n $temp = $this->input->get('from', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $from = $temp;\n \n $temp = $this->input->get('size', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $size = $temp;\n \n $temp = $this->input->get('lastModified', TRUE);\n if(!is_null($temp) & is_numeric($temp))\n $lastModified = intval($temp);\n \n $cutil = new CILServiceUtil();\n $result = $cutil->getAllPublicIds($from, $size,$lastModified);\n $this->response($result);\n \n }", "public function index()\n {\n //$publicaciones = DB::table('publicaciones')->select('titulo')->where('id_usuario', Auth()->user()->id);\n $publicaciones = Publicacion::orderBy('id', 'DESC')->get();\n dd($publicaciones);\n //return view('publicaciones.index', compact('publicaciones'));\n }", "public function getOnePublication(int $id) :array {\n $query='SELECT * FROM Publication WHERE ID=:id;';\n $this->connection->executeQuery($query, array(\n ':id' => array($id, PDO::PARAM_INT)\n ));\n \n return $this->connection->getResults()[0];\n }", "function get_pay_publisher_by_id($id=''){\n\t\ttry{\n\t\t\t$result = $this->db->get_where('pay_publisher', array('id'=>$id))->row();\n\t\t\tif(!empty($result)){\n\t\t\t\treturn $result;\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\tlog_message('debug','Error en la función get_pay_publisher_by_id');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function mostrar_producto_publico($id){\n\t\t\n\t\t$sql=\"SELECT * FROM producto WHERE id_pro='$id'\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado = mysql_fetch_array($consulta);\n\t\t$this->id=$id;\n\t\t$this->codigo=$resultado['codigo_pro'];\n\t\tsetlocale(LC_ALL, 'es_ES');\n\t\t//$this->nombre=ucwords(strtolower($resultado['nombre_pro']));\n\t\t$this->nombre=$resultado['nombre_pro'];\n\t\t\n\t\t$this->suiche=false;\n\t\t$this->ruta=\"\"; $this->categoria=\"\";\n\t\t$this->buscar_ruta_nodo($resultado['categoria_pro']);\n\t\tfor($i=count($this->ruta)-1;$i>=0;$i--){\n\t\t\t$this->categoria.=\" &raquo; \".$this->ruta[$i]['nombre_cat'];\n\t\t}\n\t\t\n\t\t$this->id_cat=$resultado['categoria_pro'];\n\t\t$this->prioridad=$resultado['prioridad_pro'];\n\t\t$this->vistas=$resultado['vistas_pro'];\n\t\t\n\t\t$this->detal=$this->convertir_moneda($resultado['detal_pro']);\n\t\t$this->mayor=$this->convertir_moneda($resultado['mayor_pro']);\n\t\t\n\t\t$this->cantidad=$resultado['limite_pro'];\n\t\t$this->fecha=$this->convertir_fecha($resultado['fecha_pro']);\n\t\t$temp=$resultado['limite_pro'];\n\t\t$this->limite2=$temp=10;\n\t\t//echo \"Numero: \".$temp;\n\t\tfor($i=1;$i<=$temp;$i++){\n\t\t\tif($i<=12) $this->limite[]=$i; else break;\n\t\t}\n\t\t$this->descripcion=$resultado['descripcion_pro'];\n\t\t$this->claves=$resultado['claves_pro'];\n\t\t$this->marca=$resultado['marca_pro'];\n\t\n\t}", "Public function info($id){\n return Paciente::where('id',$id)->first();\n }", "public static function getOnePublication(int $id) : Publication {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $row = $publicationGW->getOnePublication($id);\n $data = new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n \n return $data;\n }", "function getPublicite($identifiant)\r\n{\r\n\tglobal $pdo;\r\n\t\r\n\t$SQL = \"SELECT * FROM pas_publicite WHERE identifiant = '$identifiant'\";\r\n\t$reponse = $pdo->query($SQL);\r\n\t$req = $reponse->fetch();\r\n\t\r\n\treturn $req['code'];\r\n}", "public function show($id)\n {\n $publicacion=Publicacion::findOrFail($id);\n return view('admin.publicaciones.show', ['publicacion'=>$publicacion]);\n }", "function getPublicPost() {\n return getAll(\"SELECT * FROM posting WHERE status= 'public'\");\n}", "public function carganoticiaspublic_ini(){\n\t\t$informacion=DB::table('MODBID_INFORMACIONPUBLIC')\t\t\t\t\t\t\n\t\t\t\t\t\t->select(DB::RAW('id,titulo,texto,foto,tipo,created_at,updated_at,id_usuario,fecha_noticia'))\n\t\t\t\t\t\t->where('borrado','=',0)\n\t\t\t\t\t\t->orderby('fecha_noticia')\n\t\t\t\t\t\t->get();\n\n\t\treturn View::make('modulobid/vista1',array('informacion'=>$informacion));\n\t}", "public function getPubId()\n {\n return $this->pub_id;\n }", "public function view_by($id){\n $this->db->where('id', $id);\n return $this->db->get('pegawai')->row();\n }", "public function getIdentificacao();", "public function show(Publicidad $publicidad)\n {\n //\n }", "public function show(Publicidad $publicidad)\n {\n //\n }", "function buscarPorId($id) {\r\n $query = \"SELECT * FROM medios WHERE id_Medio LIKE \".$id.\";\";\r\n $database = new Database();\r\n $resultado = $database->getConn()->query($query);\r\n \r\n $arr = array();\r\n \r\n while ($row = $resultado->fetch(PDO::FETCH_ASSOC)) {\r\n $medio = new Medio();\r\n $medio->id=$row[\"id_Medio\"];\r\n $medio->url=$row[\"url\"];\r\n $medio->tipo=$row[\"id_Tipo\"];\r\n array_push($arr, $medio);\r\n }\r\n $paraDevolver = json_encode($arr);\r\n return $paraDevolver;\r\n }", "public function obtenerIdPublicaciones()\n {\n $publicaciones = file_get_contents('publicaciones.json');\n $traerPublicaciones = explode(PHP_EOL, $publicaciones);\n $arrayPublicaciones = [];\n array_pop($traerPublicaciones);\n\n foreach ($traerPublicaciones as $indice => $publicacion) {\n $arrayPublicaciones[] = json_decode($publicacion, true);\n }\n\n $ultimoUser = array_pop($arrayPublicaciones);\n \n $ultimoId = $ultimoUser['post_id'];\n\n if(count($ultimoId) == 0){\n return 1;\n }\n\n return $ultimoId + 1;\n }", "public function MesasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM mesas INNER JOIN salas ON salas.codsala = mesas.codsala where mesas.codmesa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function mostrarImatgesPublica($idProducte){\n $conn=connexioBD();\n $llistaImatges=\"\";\n $sql1=\"SELECT * FROM imatges WHERE producte_id='$idProducte'\";\n if (!$resultado =$conn->query($sql1)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n if($resultado->num_rows>=0){\n while($imatges=$resultado->fetch_assoc()){\n $llistaImatges.=\"<img width=\\\"150px\\\" height=\\\"150px\\\" src=\\\"\".$imatges[\"ruta\"].\"\\\">\";\n }\n }\n return $llistaImatges;\n $resultado->free();\n $conn->close();\n}", "public static function getAllPublication() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllPublications(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n }\n \n return $data;\n }", "function obtenerComentariosPublicaciones($id){\n // $var_id_usuario = $idUsuario;\n //PASO 2: Incluimos archivo de conexión\n include(\"C:/xampp/htdocs/facebook/database/mysqli.inc.php\");\n //PASO 3: Definimos sentencia SQL\n $sentenciaMYSQL=\"SELECT commentario_id,commentario, last_update FROM facebook.commentario where post_id=\".$id.\" ORDER BY commentario_id ASC\";\n \n //PASO 4: En caso de obtener correctamente los datos iniciamos el bloque. En caso contratio indicamos el error.\n if($resultado = $objetoMySQLi->query($sentenciaMYSQL)){ \n //PASO 5: Si existen datos de resultado iniciamos la obtención de datos. Si no hay datos enviamos un mensaje.\n if($objetoMySQLi->affected_rows>0){ \n $i=0;\n //PASO 6 : Se efectúa una iteración para incorporar al arreglo los datos obtenidos.\n while($fila = $resultado->fetch_assoc()){\n //PASO 7 : Se incorporan los datos al arreglo\n $arreglo[$i]=array($fila['commentario_id'],$fila['commentario'],$fila['last_update']);\n $i++;\n }\n //PASO 8: Retornamos el arreglo.\n return $arreglo;\n }else{ \n echo \"Sin Comentarios...\"; \n } \n }else{ \n echo \"<br>No ha podido realizarse la consulta. Ha habido un error<br>\"; \n echo \"<i>Error:</i> \". $objetoMySQLi->error. \"<i>Código:</i> \". $objetoMySQLi->errno; \n } \n $objetoMySQLi->close(); \n }", "public function show($id)\n {\n $publication = Publication::find($id);\n $domains = DB::table('domain_publications')->where('publication_id',$id)->get();\n $users = DB::table('publication_users')->where('publication_id',$id)->get();\n \n $user_names = [];\n $domain_names = [];\n\n foreach($domains as $domain)\n {\n $id = $domain->domain_id;\n array_push($domain_names, Domain::find($id)->name);\n } \n\n foreach($users as $user)\n {\n $id = $user->user_id;\n array_push($user_names, User::find($id)->name);\n } \n // return $user_names;\n $data = array('publication'=>$publication, 'domain_names'=> $domain_names, 'user_names'=>$user_names);\n\n return view('publications.show')->with($data);\n }", "public function showme(Publicaciones $publicaciones, int $id=0)\n {\n $publicaciones = ($id==0)? Publicaciones::all():Publicaciones::find($id);\n return response()->json($publicaciones, 200);\n }", "public function getPublish();", "public function guardarPublicacion()\n {\n $id_user = $_SESSION['id'];\n $posteo = $_GET['posteo'];\n $id = $this->obtenerIdPublicaciones();\n \n $publicacion = [\n 'user_id' => $id_user,\n 'post' => $posteo,\n 'post_id' => $id\n ];\n\n return $publicacion;\n }", "public function show(Publikasi $publikasi)\n {\n //\n }", "public function publicaciones(){\n\t\treturn $this->hasMany('App\\Publicacion', 'Pub_ID_Asp');\n\t}", "public function getAllPublications() :array {\n $query='SELECT * FROM Publication ORDER BY ID;';\n $this->connection->executeQuery($query);\n \n return $this->connection->getResults();\n }", "public function getPublicId(): ?string;", "public function identificacionegresado(){\n \treturn $this->embedsOne('encuestas\\identificacionEgresado');\n }", "public function show($id)\n {\n //\n $set = Informasi::find($id);\n if($set->flag_publish==\"1\") {\n $set->flag_publish = 0;\n } elseif ($set->flag_publish==\"0\") {\n $set->flag_publish = 1;\n }\n $set->updated_by = Auth::user()->id;\n $set->save();\n\n \\LogActivities::insLogActivities('log publish successfully.');\n\n return redirect()->route('article.index')->with('message', 'Berhasil mengubah publish article.');\n }", "public function loadPublications() {\n $this->_publications = DAOFactory::getPublicationDAO()->selectByIdPerson($this->_id);\n }", "public function getCatalogue()\n {\n\n $json = file_get_contents($this->getBaseURL());\n\n if ($json !== null) {\n $data = json_decode($json, true);\n\n if (count($data) > 0) {\n\n // On enregistre les tableaux dans lesquels on va se \"promener\"\n $tabResults = $data['response']['docs'];\n\n if (count($tabResults) > 0) {\n\n // Pour chaque tableau (dans le tableau \"docs\"), on enregistre le Label, l'URI et les auteurs (nom/prenom)\n foreach ($tabResults as $key => $element) {\n $publication = new Publication($element['label_s'], $element['authFullName_s'], $element['uri_s'], $element['modifiedDate_s']);\n\n $this->addPublication($publication);\n }\n\n } else {\n echo MESSAGE_NO_RESULTS_AVAILABLE_ERROR;\n }\n } else {\n die(MESSAGE_NO_DATA_AVAILABLE_ERROR);\n }\n } else {\n die(MESSAGE_PROBLEM_WITH_URL_ERROR);\n }\n\n return $this->publications;\n\n }", "public function getPersonal();", "public function sanphamdetail()\n\t\t{\n\t\t\t$id = $_GET['chitiet_sanpham'];\n\t\t\t//goi ham model de xu li\n\t\t\t$ketqua = $this->sanpham_model->OneRecordData1($id);\n\t\t\treturn $ketqua;\n\t\t}", "public function details($id)\n {\n return SupuestoObra::where('id', $id)->get();\n }", "public function DisplayAchat($id_marchant){\n $req = $this->pdo->prepare(\"SELECT * FROM inventaire \n INNER JOIN objet on objet.id_objet = inventaire.id_objet\n WHERE id_perso = :id\n \");\n $req->execute([\n \":id\" => $id_marchant\n ]);\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }", "public function listProById()\n {\n\n // obtener el perfil por id\n $id = 3985390143818633;\n print_r($this->getProfile($id)); \n\n }", "function getPublicationRecord($rawdata_id, $connection) {\r\n\r\n\t// Get publicatin_id from table \"publications\"\r\n\t$dbQuery = \"select publication_auto_id, pmid, cover_image_id, pdf_file_id, supplement_file_id from publications where rawdata_id=\".$rawdata_id;\r\n\r\n\t// Run the query\r\n\tif (!($result = @ mysql_query($dbQuery, $connection)))\r\n\t\tshowerror();\r\n\r\n\tif( @ mysql_num_rows($result) == 0) {\r\n\t\t// Not found\r\n\t\treturn -1;\r\n\t}\r\n\r\n\t$record['publication_auto_id'] = @ mysql_result($result, 0, \"publication_auto_id\");\r\n\t$record['pmid'] = @ mysql_result($result, 0, \"pmid\");\r\n\t$record['cover_image_id'] = @ mysql_result($result, 0, \"cover_image_id\");\r\n\t$record['pdf_file_id'] = @ mysql_result($result, 0, \"pdf_file_id\");\r\n\t$record['supplement_file_id'] = @ mysql_result($result, 0, \"supplement_file_id\");\r\n\r\n\treturn $record;\r\n}", "public function show($id_guru_mp)\n { \n $data['murid'] = Gurump::getMuridByIdGuruMp($id_guru_mp);\n return $data;\n }", "public static function listOne($id){\n \n $conexion = new Conexion();\n $sql = $conexion->prepare('SELECT nome, imagem, id_aservo FROM ' . self::TABLA . ' WHERE id = :id');\n $sql->bindParam(':id', $id);\n $sql->execute();\n $reg = $sql->fetch(); //Devuelve una única linea (array con cada campo) de la TABLA(id seleccionado).\n return $reg;\n \n }", "public function show($id)\n {\n return \\App\\Institucion::take(1)->get();\n }", "function get($pid)\r\n\t{\r\n\t\t// Query databse for a publish\r\n\t\t$isget = false;\r\n\t\t$db = GLOBALDB();\r\n $sql = sprintf('SELECT * FROM publish WHERE id = %d', $pid);\r\n \r\n if ($result = $db->query($sql)) {\r\n \tif (mysql_num_rows($result)) { \r\n\t $row = mysql_fetch_assoc($result); \r\n\t\t\t\t$this->id = $row['id'];\r\n\t\t\t\t$this->uid = $row['uid'];\t \r\n\t\t\t\t$this->url = $row['url'];\r\n \t\t$this->brand = $row['brand'];\r\n\t\t\t\t$this->series = $row['series'];\r\n\t\t\t\t$this->module = $row['module'];\r\n\t\t\t\t$this->title = $row['title'];\r\n\t\t\t\t$this->description = $row['description'];\r\n\t\t\t\t$this->company = $row['company'];\r\n\t\t\t\t$this->link = $row['link'];\r\n\t\t\t\t$this->address = $row['address'];\r\n\t\t\t\t$this->telephone = $row['telephone'];\r\n\t\t\t\t$this->mobile = $row['mobile'];\r\n\t\t\t\t$this->fax = $row['fax'];\r\n\t\t\t\t$this->price = $row['price'];\r\n\t\t\t\t$this->picture = $row['picture'];\r\n\t\t\t\t$this->level = $row['level'];\r\n\t\t\t\t$this->star = $row['star'];\t\t\t\t\r\n\t\t\t\t$this->date = $row['date'];\t\t\t\t\r\n\t\t\t\t$isget = true;\r\n \t}\r\n \tmysql_free_result($result);\r\n } \r\n return $isget;\r\n\t}", "function ambil_data_log_usulan_by_id_proyek($id)\n\t{\n\t\t$sql = \"\tSELECT * FROM irena_view_sbsn_log_proyek\n\t\t\t\t\tWHERE \n\t\t\t\t\t\tid_proyek = '$id' \n\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\treturn $this->db->query($sql);\n\t}", "public function get_details($id)\n {\n $q=$this->db->where(['dist_id'=>$id])->get('distributor');\n\t\treturn $res=$q->result_array()[0];\t\n }", "function ultimas_noticias_publicadas($limit) {\n\t\n\t\t$query = \"SELECT noticias.*, colaboradores.*\n\t\tFROM noticias, colaboradores\n\t\tWHERE noticias.id_colaborador=colaboradores.id_colaborador\n\t\tAND noticias.estado=1\n\t\tORDER BY noticias.fecha_insercion desc\n\t\tLIMIT 0,$limit\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function show($id)\n {\n $insta=Instagrame::with('domaine','feed','story')->where('personne_id',$id)->first();\n return response()->json(['insta'=>$insta]);\n }", "public function getOeuvreByID($id)\n {\n $request=\"SELECT * FROM oeuvre WHERE id_oeuvre='$id'\";\n $result = $this->_db->query($request);\n\n if ($result !== FALSE) \n {\n $infoTitre = $result->fetch_assoc();\n return $infoTitre; \n\n } \n }", "protected function cargaIdUbicacion() {\n $dao = new PGDAO();\n $strSql = $this->COLECCIONMAPEOUBICA . $this->propiedad->getId_ubica();\n $arrayDatos = $this->leeDBArray($dao->execSql($strSql));\n $id = $arrayDatos[0]['zpubica'];\n return $id;\n }", "public function getShow_on_publication () {\n\t$preValue = $this->preGetValue(\"show_on_publication\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->show_on_publication;\n\treturn $data;\n}", "function obtenerDatosPublicacionesUsuario($idUsuario){\n $var_id_usuario = $idUsuario;\n //PASO 2: Incluimos archivo de conexión\n include(\"C:/xampp/htdocs/facebook/database/mysqli.inc.php\");\n //PASO 3: Definimos sentencia SQL\n\t $sentenciaMYSQL=\"SELECT p.post_id,p.post,p.user_id,p.last_update FROM post p where p.user_id='$var_id_usuario' ORDER BY post_id DESC\";\n \n //PASO 4: En caso de obtener correctamente los datos iniciamos el bloque. En caso contratio indicamos el error.\n if($resultado\t=\t$objetoMySQLi->query($sentenciaMYSQL)){ \n //PASO 5: Si existen datos de resultado iniciamos la obtención de datos. Si no hay datos enviamos un mensaje.\n if($objetoMySQLi->affected_rows>0){ \n $i=0;\n //PASO 6 : Se efectúa una iteración para incorporar al arreglo los datos obtenidos.\n while($fila = $resultado->fetch_assoc()){\n //PASO 7 : Se incorporan los datos al arreglo\n $arreglo[$i]=array($fila['post_id'],$fila['post'],$fila['user_id'],$fila['last_update']);\n $i++;\n }\n //PASO 8: Retornamos el arreglo.\n return $arreglo;\n }else{ \n echo \"La consulta no ha producido ningún resultado\"; \n } \n }else{ \n echo \"<br>No ha podido realizarse la consulta. Ha habido un error<br>\"; \n echo \"<i>Error:</i> \". $objetoMySQLi->error. \"<i>Código:</i> \". $objetoMySQLi->errno; \n } \n\t$objetoMySQLi->close(); \n\n }", "public function show($id)\n {\n $token = JWTAuth::getToken();\n $user = JWTAuth::toUser($token);\n $poruka = Poruka::find($id);\n if($poruka->korisnik1_id == $user->id || $poruka->korisnik2_id == $user->id || $user->admin){\n return $poruka;\n }\n else return response()->json(['error' => 'No authorization to see Poruka'], HttpResponse::HTTP_UNAUTHORIZED);\n\n }", "public function show($id)\n {\n $ramo = DB::table('coordinacion')\n ->join('coordinacion_horario', 'coordinacion.id', '=', 'coordinacion_horario.id_coordinacion')\n ->where('coordinacion.id_asignatura','=',$id)\n ->select('cupo','id_profesor','sala','id_coordinacion','id_horario')\n ->get();\n return $ramo;\n }", "public function MovimientoCajasPorId()\n{\nself::SetNames();\n$sql = \" SELECT * from movimientoscajas INNER JOIN cajas ON movimientoscajas.codcaja = cajas.codcaja LEFT JOIN mediospagos ON movimientoscajas.mediopagomovimientocaja = mediospagos.codmediopago LEFT JOIN usuarios ON movimientoscajas.codigo = usuarios.codigo WHERE movimientoscajas.codmovimientocaja = ?\";\n$stmt = $this->dbh->prepare($sql);\n$stmt->execute( array(base64_decode($_GET[\"codmovimientocaja\"])) );\n$num = $stmt->rowCount();\nif($num==0)\n{\n\techo \"\";\n}\nelse\n{\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "public function show($id)\n {\n $evenement = Evenement::select('titre', 'prix','numeroMaison', 'email', 'nomRue', 'categorieAge_id', 'description',\n 'ambiance_id', 'telephone', 'lienFacebook', 'image', 'latitude', 'longitude')->where('id', $id)->get();\n\n //$evenement = Evenement::select(DB::raw(\"CONCAT('numeroMaison', ' ', 'nomRue') AS addresse\"))->where('id', $id)->get();\n return json_encode($evenement);\n }", "public static function getUserDetail($id = '')\n {\n return Subscription_content::where(array('id' => $id ))->get();\n }", "public function getDataId($id)\n {\n $galeri = ModelGaleriNews::find($id);\n return $galeri;\n }", "function get_author_info($author_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT *\n FROM imago_info_creator \n WHERE creator_id = ? \n \");\n\n $request->execute(array($author_id));\n\n return $request->fetch(PDO::FETCH_ASSOC); \n }", "function getById($id){\n require './../dbconnect.php';\n $query = \"call sp_multmedia_by_id($id);\";\n\n if (!($sentence = $conn->prepare($query)))\n {\n $conn->close();\n die(\"Multimedia Agregar: Fallo la preparacion del query\");\n }\n\n if(!$sentence->execute()){\n $conn->close();\n die(\"Multimedia Agregar: Fallo la ejecucion del query\");\n }\n\n if($result = $sentence->get_result()){\n if($row = $result->fetch_assoc()){\n header(\"Content-type: \".$row['Tipo']);\n echo $row['Contenido'];\n $result->free();\n }\n }\n $conn->close();\n }", "public function getInfo($id){\n $query = $this->pdo->prepare('SELECT * FROM usuarios WHERE usuario_id=?');\n $query->execute([$id]);\n return $query->fetchall(PDO::FETCH_ASSOC)[0];\n }", "public function index() {\n $this->Marca->recursive = 0;\n return $this->Marca->find('all', array('conditions' => array('publicado' => true)));\n }", "public function getPublicPopularPhotos(){\n $sql = 'SELECT p.*, m.pseudo, m.idMember \n FROM members AS m \n INNER JOIN photos AS p \n ON memberId = idMember\n WHERE status=0\n ORDER BY likes DESC LIMIT 9';\n $photos = $this->executeQuery($sql, array());\n return $photos;\n }", "function select($id){\r\n\t\t$sql = \"SELECT * FROM gestaoti.unidade_organizacional WHERE seq_unidade_organizacional = $id\";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$result = $this->database->result;\r\n\r\n\t\t$row = pg_fetch_object($result);\r\n\t\t$this->SEQ_UNIDADE_ORGANIZACIONAL = $row->seq_unidade_organizacional;\r\n\t\t$this->NOM_UNIDADE_ORGANIZACIONAL = $row->nom_unidade_organizacional;\r\n\t\t$this->SEQ_UNIDADE_ORGANIZACIONAL_PAI = $row->seq_unidade_organizacional_pai;\r\n\t\t$this->SGL_UNIDADE_ORGANIZACIONAL = $row->sgl_unidade_organizacional;\r\n\t}", "public function findAllPublic(){\n $qb = $this->getMainPublicQb();\n return $qb->getQuery()->getResult();\n }", "public function show($id)\n {\n //\n $parrafos = ArticuloParrafo::where('Visible', 1)\n ->orderBy('Orden', 'asc')\n ->get();\n\n }", "function personne($id){\r\n\t\treturn mysql_fetch_assoc(mysql_query(\"SELECT * FROM personnes WHERE id='$id'\"));\r\n\t}", "public function show($id)\n {\n $serie = Serie::with([\n 'genre1',\n 'genre2',\n 'licence',\n 'authors' => function($query) {\n $query->select('users.id', 'users.username', 'users.avatar_url');\n }\n ])\n ->public()\n ->where('id', '=', $id)\n ->firstOrFail();\n\n if(auth()->user()) {\n $serie->user_is_subscriber = $serie->isSubscribedBy(auth()->user());\n $serie->user_liked = $serie->isLikedBy(auth()->user());\n }\n $serie->likes_count = $serie->likers()->count();\n $serie->subscribers_count = $serie->subscribers()->count();\n\n $serie->visits = visits($serie)->count();\n visits($serie)->increment();\n\n return $serie;\n }", "public function getHostPublication() {\n $fields = array(\n 'hostPublicationLink' => array(\n 'hostPublicationSeries' => 'searchCode',\n 'hostPublicationElement',\n ),\n );\n $result = TingOpenformatMethods::parseFields($this->_getPublicationDetails(), $fields);\n return (is_array($result)) ? reset($result) : $result;\n }", "public function retrieveTask()\n\t{\n\t\t$pid\t\t= Request::getInt('pid', 0);\n\t\t$vid\t\t= Request::getInt('vid', 0);\n\t\t$doi \t\t= Request::getString('doi', '');\n\n\t\t// Enforce publication id\n\t\tif (!$pid) {\n\t\t\techo json_encode(array(\n\t\t\t\t\"success\" => 0,\n\t\t\t\t\"error\" => \"Missing publication Id\"\n\t\t\t));\n\t\t\texit();\n\t\t}\n\n\t\t// Enforce DOI\n\t\tif (!$doi) {\n\t\t\techo json_encode(array(\n\t\t\t\t\"success\" => 0,\n\t\t\t\t\"error\" => \"Missing DOI\"\n\t\t\t));\n\t\t\texit();\n\t\t}\n\n\t\t$curl = curl_init();\n\n\t\t// Fetch publication info by DOI\n\t\tcurl_setopt_array($curl, [\n\t\tCURLOPT_URL => 'https://api.crossref.org/works/' . $doi,\n\t\tCURLOPT_RETURNTRANSFER => true,\n\t\tCURLOPT_FOLLOWLOCATION => true,\n\t\tCURLOPT_HTTPHEADER => [\n\t\t\t'Content-Type: application/json'\n\t\t]\n\t\t]);\n\n\t\t$response = curl_exec($curl);\n\t\t$error = curl_error($curl);\n\n\t\tcurl_close($curl);\n\n\t\t// Assign fetched information to the corresponding fields\n\t\t$response = json_decode($response, true);\n\n\t\t// Return \"DOI not found\" if response is empty\n\t\tif (!$response) {\n\t\t\techo json_encode(array(\n\t\t\t\t\"success\" => 0,\n\t\t\t\t\"error\" => \"DOI not found\"\n\t\t\t));\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$data = $response[\"message\"];\n\n\t\t$pub = new \\Components\\Publications\\Models\\Publication($pid, null, $vid);\n\n\t\t// Get all authors by given and family names\n\t\tif (isset($data['author']) && $data['author']) {\n\t\t\t$authors = array();\n\t\t\tforeach ($data['author'] as $author) {\n\t\t\t\t$query = new \\Hubzero\\Database\\Query;\n\t\t\t\t$users = $query->select('*') \n\t\t\t\t\t->from('#__users') \n\t\t\t\t\t->whereEquals('givenName', $author['given'])\n\t\t\t\t\t->whereEquals('surname', $author['family'])\n\t\t\t\t\t->fetch();\n\t\t\t\tif (count($users) > 0) {\n\t\t\t\t\t$authors = array_merge($authors, $users);\n\t\t\t\t} else {\n\t\t\t\t\t$user \t\t\t\t= new stdClass;\n\t\t\t\t\t$user->id\t\t\t= 0;\n\t\t\t\t\t$user->givenName\t= $author['given'];\n\t\t\t\t\t$user->surname\t\t= $author['family'];\n\t\t\t\t\t$authors[] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set authors of publication\n\t\t$ordering = 1;\n\t\tforeach ($authors as $author) {\n\t\t\t$pAuthor = new Tables\\Author($this->database);\n\t\t\tif (!$pAuthor->loadAssociationByFirstLastName($author->id, $vid, $author->givenName, $author->surname)) {\n\t\t\t\t$pAuthor->user_id = $author->id;\n\t\t\t\t$pAuthor->ordering = $ordering;\n\t\t\t\t$pAuthor->credit = '';\n\t\t\t\t$pAuthor->role = '';\n\t\t\t\t$pAuthor->status = 1;\n\t\t\t\t\n\t\t\t\t$pAuthor->firstName = $author->givenName;\n\t\t\t\t$pAuthor->lastName = $author->surname;\n\t\t\t\t$pAuthor->name = trim($pAuthor->firstName . ' ' . $pAuthor->lastName);\n\n\t\t\t\t// Check if project member\n\t\t\t\t$objO = $pub->project()->table('Owner');\n\t\t\t\t$owner = $objO->getOwnerId($pub->project()->get('id'), $pAuthor->user_id, $pAuthor->name);\n\n\t\t\t\tif ($owner) {\n\t\t\t\t\t$pAuthor->project_owner_id = $owner;\n\t\t\t\t} else {\n\t\t\t\t\t$objO = new \\Components\\Projects\\Tables\\Owner($this->database);\n\t\t\t\t\t$objO->projectid = $pub->project()->get('id');\n\t\t\t\t\t$objO->userid = $pAuthor->user_id;\n\t\t\t\t\t$objO->status = $pAuthor->user_id ? 1 : 0;\n\t\t\t\t\t$objO->added = Date::toSql();\n\t\t\t\t\t$objO->role = 2;\n\t\t\t\t\t$objO->invited_email = '';\n\t\t\t\t\t$objO->invited_name = $pAuthor->name;\n\t\t\t\t\t$objO->store();\n\t\t\t\t\t$pAuthor->project_owner_id = $objO->id;\n\t\t\t\t}\n\n\t\t\t\t$pAuthor->publication_version_id = $vid;\n\t\t\t\t$pAuthor->created_by = User::getInstance()->get('id');\n\t\t\t\t$pAuthor->created = Date::toSql();\n\n\t\t\t\t$pAuthor->store();\n\n\t\t\t\t$ordering++;\n\t\t\t}\n\t\t}\n\n\t\t// Build tags string\n\t\tif (isset($data['subject']) && $data['subject'])\n\t\t{\n\t\t\t$tags = '';\n\t\t\t$i = 0;\n\t\t\tforeach ($data['subject'] as $tag)\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$tags .= trim($tag);\n\t\t\t\t$tags .= $i == count($data['subject']) ? '' : ',';\n\t\t\t}\n\n\t\t\t// Add tags\n\t\t\t$tagsHelper = new Helpers\\Tags($this->database);\n\t\t\t$tagsHelper->tag_object(User::getInstance()->get('id'), $vid, $tags, 1);\n\t\t}\n\n\t\t$version = $pub->get('version');\n\t\t$version->title\t\t\t\t\t= isset($data[\"title\"]) && $data[\"title\"] ? $data[\"title\"][0] : \"\";\n\t\t$version->description\t\t\t= isset($data[\"abstract\"]) && $data[\"abstract\"] ? $data[\"abstract\"] : \"\";\n\t\t$version->abstract\t\t\t\t= isset($data[\"abstract\"]) && $data[\"abstract\"] ? $data[\"abstract\"] : \"\";\n\t\t$version->doi\t\t\t\t\t= $doi;\n\t\t\n\t\t// Previously published publications have the \"forked_from\" field set to its own version id\n\t\t$version->forked_from\t\t\t= $vid;\n\t\t$version->store();\n\n\n\t\tif ($error) {\n\t\t\techo json_encode(array(\n\t\t\t\t\"success\" => 0,\n\t\t\t\t\"error\" => $error\n\t\t\t));\n\t\t} else {\n\t\t\techo json_encode(array(\n\t\t\t\t\"success\" => 1,\n\t\t\t\t\"data\" => $data\n\t\t\t));\n\t\t}\n\t\t\n\t\texit();\n\t}", "function getMeGustaId($id, $id_usuario) {\n $c = new Conexion();\n $resultado = $c->query(\"SELECT val_mg.megusta FROM valoracion_mg val_mg, usuario usu where val_mg.id_usuario=usu.id && val_mg.id_contenido=$id && val_mg.id_usuario=$id_usuario\");\n\n if ($objeto = $resultado->fetch(PDO::FETCH_OBJ)) {\n return $objeto;\n }\n else{\n return null;\n } \n}", "public function person() {\n $personId = $_REQUEST['id'];\n $person = $this->tmdb->getPerson($personId);\n $imageUrl = $this->tmdb->getImageUrl($person['profile_path'], TMDb::IMAGE_PROFILE, 'w185');\n //$images = $this->tmdb->getPersonImages($personId);\n $credits = $this->tmdb->getPersonCredits($personId);\n $map = array('person' => $person, 'imageUrl' => $imageUrl, 'credits' => $credits);\n $this->reply($map);\n }", "public function galpon($id){\n\n $galpon= new empresa();\n\n return $galpon->dataPrueba($id);\n\n }", "function getMovimientos($id) {\n $db = $this->getAdapter();\n// $db->setFetchMode ( Zend_Db::FETCH_OBJ );\n $select = $db->select();\n $select->distinct(true);\n $select->from(array('m' => 'movimiento_encomienda'), array(\"id_movimiento\", \"fecha\", \"hora\", \"usuario\", \"sucursal\", \"observacion\"));\n $select->where(\"m.encomienda=?\",$id);\n $select->order(\"fecha\");\n// echo $select->__toString();\n $log = Zend_Registry::get(\"log\");\n $log->info(\"recuperando movimientos de la encomieda :\" . $select->__toString());\n return $db->fetchAll($select);\n }", "public function SalasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM salas LEFT JOIN mesas ON salas.codsala = mesas.codsala where salas.codsala = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codsala\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "public function index()\n\t{\n $id = $this->input->get('pub_id');\n\n $query = $this->db->query(\"SELECT * FROM pubs WHERE pub_id=$id\");\n\n $d1 = [];\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $row) {\n $d1 = $row;\n }\n }\n $data['pub'] = $d1;\n\t\t$this->load->view('pub_profile_view', $data);\n\t}", "public function show($id)\n {\n return Publisher::findOrFail($id);\n }", "function getOtherPublicPosting(){\n return getAll(\"SELECT DISTINCT a.* , c.name \n FROM posting a,\n member_posting b, \n `member` c \n WHERE a.`status` = 'public' \n AND a.id = b.posting_id \n AND b.member_id <>? \n AND b.member_id =c.id\"\n , [getLogin()['mid']]);\n}", "function getObjectFromStreamID($id) {\n\t\t$url = 'https://hestia.speckle.works/api/';\n\t\t$data = json_decode(file_get_contents($url.'streams/'.$id));\n\t\techo '<h2>GH Object: '.$data->resource->name.'</h2>';\n\t\t\n\t\t// get number of objects...\n\t\t$o_len = count($data->resource->layers);\n\t\t\n\t\t// get a list of the objects...\n\t\t\n\t\tfor ($x = 0; $x < $o_len; $x++) \n\t\t{\n\t\t\tgetSubObject($url,$data,$x);\n\t\t}\n\t\techo '<br>';\n\t}", "public function get_data_socialMedia($id)\n {\n $this->db->where('socialEmpresaId', $id);\n $datos = $this->db->get('social_media_empresa');\n return $datos->row();\n }", "function getProfileInfo1($id)\n\t\t{\n\t\n\t\t $query = \"SELECT *,concat(m.first_name,' ',m.last_name) as affiliate_name FROM tbl_subscriber s \n\t\t left join tbl_member m on s.prim_affiliate_id = m.member_id \n\t\t WHERE subscriber_id = '$id'\";\n\t\t $rs\t\t=\t$this->Execute($query);\n\t\t return $this->_getPageArray($rs, 'Subscriber');\n\t\t}", "public function show( $id)\n {\n $res= DB::table('paciente_obra_sociales','pacientes', 'obra_social')\n ->join('pacientes','pacientes.id', '=', 'paciente_obra_sociales.paciente_id')\n \n ->join('obra_social','obra_social.id', '=', 'paciente_obra_sociales.obra_social_id')\n ->join('obra_social as coseguro','coseguro.id', '=', 'paciente_obra_sociales.coseguro_id')\n // ->join('users', 'users.id', '=', 'pacientes.usuario_alta_id')\n ->select(\n 'paciente_obra_sociales.id',\n 'obra_social_numero',\n 'barra',\n 'pacientes.nombre as paciente_nombre',\n 'pacientes.apellido as paciente_apellido',\n 'pacientes.dni as paciente_dni',\n 'obra_social.id as obra_social_id',\n 'obra_social.nombre as obra_social_nombre', \n 'obra_social.tiene_distribucion',\n 'obra_social.es_coseguro',\n 'obra_social.es_habilitada',\n 'coseguro.nombre as coseguro_nombre',\n 'coseguro.id as coseguro_id' \n )\n ->where('paciente_obra_sociales.id','=', $id)\n ->get();\n return $this->showAll($res);\n \n }", "public function show($id)\n {\n // Desde la vista no hago uso de esta funcion nunca. \n // Seria para mostrar un solo registro, desde la API esta disponible en api_show\n }", "public function show($id)\n { \n $cirugia = Cirugias_x_paciente::findOrFail($id);\n return $this->showOne($cirugia, 200);\n }" ]
[ "0.69696456", "0.6918937", "0.65399384", "0.6530916", "0.6457736", "0.6431802", "0.6374847", "0.6369175", "0.6326821", "0.63220507", "0.63000107", "0.62486327", "0.6221247", "0.62186325", "0.61846393", "0.61615187", "0.6134261", "0.61164796", "0.60952014", "0.60674316", "0.60596", "0.60535705", "0.59885263", "0.59855753", "0.59657353", "0.5965486", "0.59403396", "0.58861756", "0.58807135", "0.58722395", "0.582658", "0.582658", "0.5821463", "0.58171934", "0.5785488", "0.57792675", "0.57781327", "0.5775318", "0.57725155", "0.5770146", "0.5764639", "0.5755461", "0.5755449", "0.5743904", "0.5743674", "0.57219905", "0.57182294", "0.56815505", "0.567836", "0.56764704", "0.56729215", "0.5671253", "0.5662522", "0.5661457", "0.5655275", "0.5654503", "0.56472087", "0.564022", "0.56386304", "0.5619847", "0.5616486", "0.56073356", "0.5599957", "0.5591902", "0.5585528", "0.55840087", "0.55603814", "0.5541215", "0.55395466", "0.5536088", "0.5529794", "0.5521999", "0.55217457", "0.5519396", "0.5510784", "0.5510278", "0.55093294", "0.55069584", "0.5506658", "0.5501258", "0.54938066", "0.5493266", "0.54925716", "0.54632896", "0.54594666", "0.54522264", "0.5450667", "0.54458225", "0.5445607", "0.5445602", "0.54445386", "0.5443329", "0.5442826", "0.54422736", "0.543704", "0.54346514", "0.5431406", "0.54247767", "0.542184", "0.5417031", "0.5408593" ]
0.0
-1
Lit une partie de CSV concernant un candidat.
private function updateCandidat($line, $election, $commune) { $candidatInfos = explode(';', $line); for ($i = 0; $i < 3; $i++) { if (!array_key_exists($i, $candidatInfos)) { return false; } } $nuance = $this->nuanceAvant ? $candidatInfos[0] : $candidatInfos[1]; $nom = $this->nuanceAvant ? $candidatInfos[1] : $candidatInfos[0]; if ('liste' === $this->electionType) { $candidat = new ListeCandidate( $election, $nuance, $nom ); } elseif ('uninominale' === $this->electionType) { $candidat = new PersonneCandidate( $election, $nuance, null, $nom ); } $slice = array_values( array_filter( $election->getCandidats(), function ($c) use ($candidat) { return ($candidat->getNom() === $c->getNom()); } ) ); if (0 === count($slice)) { $election->addCandidat($candidat); } else { $candidat = $slice[0]; } $election->setVoixCandidat($candidatInfos[2], $candidat, $commune); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function creer_entete_csv(&$liste_option) {\n\tif (check_report_date ( $liste_option ))\n\t\t$entete = __CLASS__;\n\telse\n\t\t$entete = __CLASS__;\n\t$titre = $liste_option->getOption ( array (\n\t\t\t\"ordre_de_sortie\",\n\t\t\t\"champ\",\n\t\t\t\"titre\" \n\t) );\n\t$separateur = $liste_option->getOption ( array (\n\t\t\t\"ordre_de_sortie\",\n\t\t\t\"separateur\" \n\t) );\n\tif (is_array ( $titre )) {\n\t\tforeach ( $titre as $value ) {\n\t\t\tif (isset ( $entete ) && $entete != \"\") {\n\t\t\t\t$entete .= $separateur;\n\t\t\t}\n\t\t\t$entete .= $value;\n\t\t}\n\t} else {\n\t\tif (isset ( $entete ) && $entete != \"\") {\n\t\t\t$entete .= $separateur;\n\t\t}\n\t\t$entete .= $titre;\n\t}\n\t\n\treturn $entete;\n}", "public function toCSV();", "private function csv()\n {\n $csvObj = new CSV();\n //header('Content-disposition: filename=\"rastreio.csv\"');\n return $csvObj->fromArray($this->data)->toString();\n }", "public function csvDownAction(){\r\n \t\t\r\n \t\t/**\r\n \t\t * get form id\r\n \t\t */\r\n \t\t$form_id = $this->getAttribute('form_id');\r\n \t\t\r\n \t\t/**\r\n \t\t * get form entry field list\r\n \t\t */\r\n \t\t$form_field_list = $this->db_model->getFormFieldList($form_id);\r\n \t\t//print_r($form_field_list);\r\n \t\t\r\n \t\tforeach ($form_field_list as $field_row){\r\n \t\t\t\r\n \t\t\tif (preg_match('/^privacy_/', $field_row['name'])) continue;\r\n \t\t\t\r\n \t\t\tif (preg_match('/^name_[0-9]/', $field_row['name'])){\r\n \t\t\t\t\r\n \t\t\t\t$expl = explode(';:;', $field_row['field_labels']);\r\n \t\t\t\t$csv_header[$field_row['name'].'_1'] \t\t= $expl[0].'-'.$expl[2];\r\n \t\t\t\t$csv_header[$field_row['name'].'_2'] \t\t= $expl[0].'-'.$expl[3];\r\n \t\t\t\t$csv_header[$field_row['name'].'_kana_1'] \t= $expl[1].'-'.$expl[4];\r\n \t\t\t\t$csv_header[$field_row['name'].'_kana_2'] \t= $expl[1].'-'.$expl[5];\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (preg_match('/^address_[0-9]/', $field_row['name'])){\r\n \t\t\t\t\r\n \t\t\t\t$expl = explode(';:;', $field_row['field_labels']);\r\n \t\t\t\t$csv_header[$field_row['name'].'_pcode'] \t\t= $expl[0];\r\n \t\t\t\t$csv_header[$field_row['name'].'_pref'] \t\t= $expl[1];\r\n \t\t\t\t$csv_header[$field_row['name'].'_address_a'] \t= $expl[2];\r\n \t\t\t\t$csv_header[$field_row['name'].'_address_b'] \t= $expl[3];\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (preg_match('/^birthday_[0-9]/', $field_row['name'])){\r\n \t\t\t\t\r\n \t\t\t\t$expl = explode(';:;', $field_row['field_labels']);\r\n \t\t\t\t$csv_header[$field_row['name'].'_year_type'] \t= '年式';\r\n \t\t\t\t$csv_header[$field_row['name'].'_year'] \t\t= $field_row['label'].'-'.$expl[0];\r\n \t\t\t\t$csv_header[$field_row['name'].'_month'] \t\t= $field_row['label'].'-'.$expl[1];\r\n \t\t\t\t$csv_header[$field_row['name'].'_day'] \t\t\t= $field_row['label'].'-'.$expl[2];\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (preg_match('/^ynradio_[0-9]/', $field_row['name'])){\r\n \t\t\t\t\r\n \t\t\t\t$yn_expl = explode('|yn|', $field_row['ynfields']);\r\n \t\t\t\t$yn_field_array = array();\r\n \t\t\t\t\r\n \t\t\t\tforeach ($yn_expl as $ym_row){\r\n \t\t\t\t\t\r\n \t\t\t\t\t$yn_row_expl = explode('_', $ym_row);\r\n \t\t\t\t\t\r\n \t\t\t\t\t$yn_field = $yn_row_expl[0].'_'.$yn_row_expl[1];\r\n \t\t\t\t\t\r\n \t\t\t\t\t$yn_field_expl = explode(':=:', $yn_row_expl[2]);\r\n \t\t\t\t\t\r\n \t\t\t\t\t$yn_field_list[$field_row['name'].'_'.$yn_field]['name'] = $field_row['name'].'_'.$yn_field;\r\n \t\t\t\t\t$yn_field_list[$field_row['name'].'_'.$yn_field][$yn_field_expl[0]] = $yn_field_expl[1];\r\n \t\t\t\t\t\r\n\r\n \t\t\t\t\tif (!in_array($yn_field, $yn_field_array)){\r\n \t\t\t\t\t\t$yn_field_array[$yn_row_expl[1]] = $yn_field;\r\n \t\t\t\t\t}else \r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t} // foreach ($yn_expl as $ym_row){\r\n \t\t\t\t\r\n \t\t\t\t/**\r\n\t\t\t \t * sort yes no field as input sequence\r\n\t\t\t \t */\r\n\t\t\t \tksort($yn_field_array);\r\n \t\t\t\t\r\n \t\t\t\t//print_r($yn_expl);\r\n \t\t\t\t//print_r($yn_field_list);\r\n \t\t\t\t//print_r($yn_field_array);\r\n \t\t\t\t\r\n \t\t\t\tif (is_array($yn_field_array)){\r\n \t\t\t\t\t$csv_header[$field_row['name']] = $field_row['label'];\r\n \t\t\t\t\tforeach ($yn_field_array as $yn_field){\r\n \t\t\t\t\t\t$csv_header[$field_row['name'].'_'.$yn_field] = $field_row['label'].'-'.$yn_field_list[$yn_field]['label'];\r\n \t\t\t\t\t}\r\n \t\t\t\t} // if (is_array($yn_field_array)){\r\n \t\t\t\t\r\n \t\t\t\t\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t$csv_header[$field_row['name']] = $field_row['label']; \r\n \t\t}\r\n \t\t\r\n \t\t//print_r($csv_header);\r\n \t\t\r\n \t\t/**\r\n \t\t * get mail data list\r\n \t\t */\r\n \t\t$mail_data_list = $this->db_model->getFormMailData($form_id);\r\n \t\t//print_r($mail_data_list[0]);\r\n \t\t//$mail_data_list_t[]=$mail_data_list[0];\r\n \t\t//$mail_data_list_t[]=$mail_data_list[1];\r\n \t\t\r\n \t\t$form_data_list = array();\r\n \t\t\r\n \t\tif (is_array($mail_data_list) && !empty($mail_data_list)){\r\n\t \t\tforeach ($mail_data_list as $mail_data){\r\n\t \t\t\t$tmp_data = array();\r\n\t \t\t\t\t\r\n\t \t\t\tforeach ($csv_header as $header_key=>$header_value){\r\n\t \t\t\t\t\r\n\t \t\t\t\tforeach ($mail_data as $data_key => $data_value){\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\tif (preg_match('/^privacy_/', $data_key)) continue;\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 * for name set\r\n\t \t\t\t\t\t */\r\n\t \t\t\t\t\tif (preg_match('/^name_[0-9]/', $data_key)){\r\n\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t$exp_name_1 = explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t$exp_name_2 = explode(':=:', $expl[1]);\r\n\t\t\t \t\t\t\t$exp_kana_1 = explode(':=:', $expl[2]);\r\n\t\t\t \t\t\t\t$exp_kana_2 = explode(':=:', $expl[3]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_name_1[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_name_1[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_name_2[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_name_2[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_kana_1[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_kana_1[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_kana_2[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_kana_2[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^name_[0-9]/', $header_key)){\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 * for address set\r\n\t\t\t \t\t\t */\r\n\t\t \t\t\t\tif (preg_match('/^address_[0-9]/', $data_key)){\r\n\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$exp_pcode_1\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t$exp_pcode_2\t= explode(':=:', $expl[1]);\r\n\t\t\t \t\t\t\t$exp_pref\t\t= explode(':=:', $expl[2]);\r\n\t\t\t \t\t\t\t$exp_address_a\t= explode(':=:', $expl[3]);\r\n\t\t\t \t\t\t\t$exp_address_b\t= explode(':=:', $expl[4]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == str_replace('_1', '', $exp_pcode_1[0]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_pcode_1[1].'-'.$exp_pcode_2[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_pref[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_pref[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_address_a[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_address_a[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_address_b[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_address_b[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^address_[0-9]/', $header_key)){\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 * for birthday set\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^birthday_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$exp_year_type\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t$exp_year\t\t= explode(':=:', $expl[1]);\r\n\t\t\t \t\t\t\t$exp_month\t\t= explode(':=:', $expl[2]);\r\n\t\t\t \t\t\t\t$exp_day\t\t= explode(':=:', $expl[3]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_year_type[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $this->data_class->getYearTypeName($exp_year_type[1]);\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_year[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_year[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_month[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_month[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == $exp_day[0])\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_day[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^birthday_[0-9]/', $header_key)){\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 * for mail\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^mail_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t$exp_mail\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == str_replace('_mail', '', $exp_mail[0]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_mail[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^mail_[0-9]/', $data_key)){\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 * for tel number\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^tel_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$exp_tel_1\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t$exp_tel_2\t= explode(':=:', $expl[1]);\r\n\t\t\t \t\t\t\t$exp_tel_3\t= explode(':=:', $expl[2]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == str_replace('_1', '', $exp_tel_1[0]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_tel_1[1].'-'.$exp_tel_2[1].'-'.$exp_tel_3[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^tel_[0-9]/', $data_key)){\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 * for password\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^password_[0-9]/', $data_key)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t$exp_password\t= explode(':=:', $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($header_key == str_replace('_pass', '', $exp_password[0]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $exp_password[1];\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^password_[0-9]/', $data_key)){\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 * for yes no fields\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^ynradio_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode('|fd|', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tforeach ($expl as $yn_row){\r\n\t\t\t \t\t\t\t\t$yn_row_expl = explode(':=:', $yn_row);\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\t\tif ($header_key == $yn_row_expl[0]){\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t/**\r\n\t\t\t \t\t\t\t\t\t * for yes no label\r\n\t\t\t \t\t\t\t\t\t */\r\n\t\t\t \t\t\t\t\t\tif ($match[0] == $header_key){\r\n\t\t\t \t\t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t\t$value = $this->getYesNoLabel($form_field_list, $data_key, $yn_row_expl[1]);\r\n\t\t\t\t\t\t \t\t\t\t$tmp_data[$header_key] = $value;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tcontinue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t\t\t} // if ($match[0] == $header_key){\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t/**\r\n\t\t\t \t\t\t\t\t\t * for yes no field's select and radio option \r\n\t\t\t \t\t\t\t\t\t */\r\n\t\t\t \t\t\t\t\t\tif (preg_match('/^ynradio_[0-9]_select_[0-9]/', $yn_row_expl[0], $match) || preg_match('/^ynradio_[0-9]_radio_[0-9]/', $yn_row_expl[0], $match)){\r\n\t\t\t \t\t\t\t\t\t\t\r\n\t\t\t \t\t\t\t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\t$expl = explode(':other:', $yn_row_expl[1]);\r\n\t\t\t\t\t\t \t\t\t\t$value = $this->getYesNoOptionValue($yn_field_list, $yn_row_expl[0], $expl[0]);\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tif (!empty($expl[1]))\r\n\t\t\t\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $value.',その他:'.$expl[1];\r\n\t\t\t\t\t\t \t\t\t\telse\r\n\t\t\t\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $value;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tcontinue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t} // if (preg_match('/^ynradio_[0-9]_select_[0-9]/', $yn_row_expl[0], $match) || preg_match('/^ynradio_[0-9]_radio_[0-9]/', $yn_row_expl[0], $match)){\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t/**\r\n\t\t\t\t\t\t \t\t\t * for yes no field's checkbox option\r\n\t\t\t\t\t\t \t\t\t */\r\n\t\t\t\t\t\t \t\t\tif (preg_match('/^ynradio_[0-9]_checkbox_[0-9]/', $yn_row_expl[0], $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\t$expl = explode(':other:', $yn_row_expl[1]);\r\n\t\t\t\t\t\t \t\t\t\t$option_expl = explode('::', $expl[0]);\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\t$value = array();\r\n\t\t\t\t\t\t \t\t\t\tforeach ($option_expl as $row)\r\n\t\t\t\t\t\t \t\t\t\t\t$value[] = $this->getYesNoOptionValue($yn_field_list, $yn_row_expl[0], $row);\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tif (!empty($expl[1]))\r\n\t\t\t\t\t\t \t\t\t\t\t$tmp_data[$header_key] = join(',', $value).',その他:'.$expl[1];\r\n\t\t\t\t\t\t \t\t\t\telse\r\n\t\t\t\t\t\t \t\t\t\t\t$tmp_data[$header_key] = join(',', $value);\r\n\t\t\t\t\t\t \t\t\t\t\t\r\n\t\t\t\t\t\t \t\t\t\tcontinue;\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t \t\t\t} // if (preg_match('/^checkbox_[0-9]/', $data_key)){\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = $yn_row_expl[1];\r\n\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}\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t} // if (preg_match('/^ynradio_[0-9]/', $header_key)){\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 * for select and radion fields\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^select_[0-9]/', $data_key, $match) || preg_match('/^radio_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode(':other:', $data_value);\r\n\t\t\t \t\t\t\t$value = $this->getOptionValue($form_field_list, $data_key, $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($data_key == $header_key ){\r\n\t\t\t \t\t\t\t\tif (!empty($expl[1]))\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = $value.',その他:'.$expl[1];\r\n\t\t\t \t\t\t\t\telse\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = $value;\r\n\t\t\t \t\t\t\t}\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^select_[0-9]/', $data_key, $match) || preg_match('/^radio_[0-9]/', $data_key, $match)){\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 * for checkbox field\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^checkbox_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode(':other:', $data_value);\r\n\t\t\t \t\t\t\t$option_expl = explode('::', $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$value = array();\r\n\t\t\t \t\t\t\tforeach ($option_expl as $row)\r\n\t\t\t \t\t\t\t\t$value[] = $this->getOptionValue($form_field_list, $data_key, $row);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($data_key == $header_key ){\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\t\tif (!empty($expl[1]))\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = join(',', $value).',その他:'.$expl[1];\r\n\t\t\t \t\t\t\t\telse\r\n\t\t\t \t\t\t\t\t\t$tmp_data[$header_key] = join(',', $value);\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\t}\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^checkbox_[0-9]/', $data_key)){\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 * for survey options\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^svid_[0-9]_fid_[0-9]_sid_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$survey_expl = explode('_', $data_key);\r\n\t\t\t \t\t\t\t$survey_id = $survey_expl[1];\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$expl = explode(':other:', $data_value);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t$value = $this->getSurveyOptionValue($survey_id, $data_key, $expl[0]);\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif (!empty($expl[1]))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $value.',その他:'.$expl[1];\r\n\t\t\t \t\t\t\telse\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = $value;\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^svid_[0-9]_fid_[0-9]_sid_[0-9]/', $data_key, $match)){\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 * for image field\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^image_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif (!empty($data_value))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = _HTTP.$GLOBALS['gl_wpcms_Info']['wpcms_path'].'/wpform/file/imageDisplay/image_name/'.$data_value;\r\n\t\t\t \t\t\t\telse \r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = \"\";\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^image_[0-9]/', $data_key, $match)){\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 * for pdf field\r\n\t\t\t \t\t\t */\r\n\t\t\t \t\t\tif (preg_match('/^pdf_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif ($match[0] != $header_key) continue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\tif (!empty($data_value))\r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = _HTTP.$GLOBALS['gl_wpcms_Info']['wpcms_path'].'/wpform/file/pdfDisplay/pdf_name/'.$data_value;\r\n\t\t\t \t\t\t\telse \r\n\t\t\t \t\t\t\t\t$tmp_data[$header_key] = \"\";\r\n\t\t\t \t\t\t\t\t\r\n\t\t\t \t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t} // if (preg_match('/^pdf_[0-9]/', $data_key, $match)){\r\n\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t\t\t\t \t\t\t\r\n\t\t\t \t\t\t\r\n\t \t\t\t\t\tif ($data_key == $header_key ){\r\n\t \t\t\t\t\t\t$tmp_data[$header_key] = $data_value;\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} // foreach ($mail_data as $data_key => $data_value){\r\n\t \t\t\t\t\r\n\t \t\t\t} // foreach ($csv_header as $header_key=>$header_value){\r\n\t \t\t\t\r\n\t \t\t\t//$form_data_list[] = $tmp_data;\r\n\t \t\t\t$form_data_list[] = implode(',', $tmp_data);\r\n\t \t\t\t\r\n\t \t\t} // foreach ($mail_data_list as $mail_data){\r\n \t\t\r\n \t\t} // if (is_array($mail_data_list) && !empty($mail_data_list)){\r\n \t\t\r\n \t\t\r\n \t\t//print_r($form_data_list);\r\n \t\t//exit;\r\n \t\t\r\n \t\t/**\r\n \t\t * make csv header text\r\n \t\t */\r\n \t\t$csv_header_txt = mb_convert_encoding(implode(',', $csv_header), \"Shift_JIS\");\r\n \t\t\r\n \t\t/**\r\n \t\t * make csv data\r\n \t\t */\r\n \t\t$csv_data_txt = mb_convert_encoding(implode(\"\\n\", $form_data_list), \"Shift_JIS\");\r\n \t\t\r\n \t\t/**\r\n\t\t * make csv downloadable\r\n\t\t */\r\n\t\theader(\"Cache-Control: public\");\r\n\t\theader(\"Pragma: public\");\r\n\t\t\r\n\t\t$csv_name = \"form_name\"; \r\n\t\t\r\n\t\theader(sprintf(\"Content-disposition: attachment; filename=%s.csv\",$csv_name));\r\n\t\theader(sprintf(\"Content-type: application/octet-stream; name=%s.csv\",$csv_name));\r\n\r\n\t\t/**\r\n\t\t * make csv text\r\n\t\t */\r\n\t\t$csv_txt = $csv_header_txt.\"\\n\".$csv_data_txt;\r\n\t\t\r\n\t\techo $csv_txt;\r\n\t\texit;\r\n \t\t\r\n \t}", "function csv_report($a)\n{\n\t$pioneer = null;\n\tforeach($a as $r)\n\t{\n\t\tif($pioneer !== $r['pioneer']) echo \"\\n\\nLast name,First name,Group,Pioneer,Month,Placements,Videos,Hours,Credits,RVs,Studies,6 Month Avg (no Credit),6 Month Avg (With Credit)\\n\";\n\t\techo implode(',',$r) . \"\\n\";\n\t\t$pioneer = $r['pioneer'];\n\t}\n//\tprint_r($a);\n}", "public function exportCSV()\n {\n $date1 = date('d-m-Y', strtotime($this->input->get('date1')));\n $date2 = date('d-m-Y', strtotime($this->input->get('date2')));\n\n $data = $this->ModelAdmin->fetchLaporanByDate($date1, $date2);\n\n header('Content-Type: text/csv; charset=utf-8');\n header(\"Content-Disposition: attachment; filename=Laporan Kehadiran periode $date1 - $date2.csv\");\n\n $output = fopen('php://output', 'w');\n fputcsv($output, array('NRP', 'Nama', 'Tanggal', 'Jam Masuk', 'Jam Keluar'));\n\n foreach ($data as $i) {\n fputcsv($output, array($i->nrp, $i->nama, $i->tanggal, $i->jam_masuk, $i->jam_keluar));\n }\n fclose($output);\n }", "function getSituationPartSocialeClient($id_client, $export_csv = false) {\n global $global_id_agence;\n $id = getAgenceCpteIdProd($global_id_agence);\n $id_prod_ps = $id[\"id_prod_cpte_parts_sociales\"];\n $cpte_ps = getCptPartSociale($id_client, $id_prod_ps); //Info sur tous les cptes de parts sociales du client\n $DATA_PS = array ();\n while (list ($key, $value) = each($cpte_ps)) {\n $data[\"num_complet_cpte\"] = $value[\"num_complet_cpte\"];\n $data[\"intitule_compte\"] = $value[\"intitule_compte\"];\n $data[\"id_titulaire\"] = $value[\"id_titulaire\"];\n $data[\"date_ouvert\"] = pg2phpDate($value[\"date_ouvert\"]);\n $data[\"solde_cpte\"] = afficheMontant($value[\"solde\"], false, $export_csv);\n $data[\"mnt_bloq\"] = $value[\"retrait_unique\"] == 't' ? \"Retrait unique\" : afficheMontant($value[\"mnt_bloq\"] + $value[\"mnt_min_cpte\"] + $value[\"mnt_bloq_cre\"], false, $export_csv);\n $data[\"mnt_disp\"] = $value[\"retrait_unique\"] == 't' ? \"Retrait unique\" : afficheMontant(getSoldeDisponible($value[\"id_cpte\"], false, $export_csv));\n $data[\"date_dernier_mvt\"] = pg2phpDate(getLastMvtCpt($value[\"id_cpte\"]));\n $data[\"libel_prod\"] = getLibelPrdt($id_prod_ps, \"adsys_produit_epargne\");\n $data[\"solde_calcul_interets\"] = afficheMontant($value[\"solde_calcul_interets\"], false, $export_csv);\n $data[\"devise\"] = $value[\"devise\"];\n array_push($DATA_PS, $data);\n }\n return $DATA_PS;\n}", "function carica_csv($tabella,$connessione,$file_csv,$id,$visualizza)\n {\n $query=\"select DISTINCT COLUMN_NAME from information_schema.COLUMNS where TABLE_NAME=\\\"\".$tabella.\"\\\"\";\n //echo $query;\n $campi=ritorna_array($query,$connessione);\n //print_r($campi);\n if($id==TRUE)\n array_shift($campi);\n $campi = implode(\",\", $campi);\n $inserisci=\"INSERT INTO $tabella ($campi) VALUES\";\n $nt=0;\n $ni=0;\n $CSVfp = fopen($file_csv, \"r\");\n if($CSVfp !== FALSE) \n {\n while(!feof($CSVfp)) \n {\n $data = fgetcsv($CSVfp, 1000, \";\");\n if(is_array($data))\n {\n //print_r($data);\n $n = count($data); \n $valori=\"\";\n for ($i=0; $i < $n; $i++)\n if($i!=0)\n $valori.=\",'\".$connessione->real_escape_string($data[$i]).\"'\";\n else\n $valori.=\"'\".$connessione->real_escape_string($data[$i]).\"'\";\n $query=$inserisci.\" (\".$valori.\");\";\n $nt++;\n if($visualizza==TRUE)\n echo \"Eseguo query: <pre><code class=\\\"language-sql\\\">$query</code></pre>\";\n $ris =$connessione->query($query);\n if ($ris == false) \n {\n echo \"<p style='color: red;'>Errore della query: \" . htmlspecialchars($connessione->error) . \".</p>\";\n }\n else\n {\n $ni++;\n }\n }\n }\n }\n fclose($CSVfp);\n if($nt==$ni)\n echo \"<p style='color: darkseagreen;'>Tutte le righe ($ni su $nt) sono stato correttamente caricate nella tabella \\\"$tabella\\\".</p>\";\n else\n echo \"<p style='color: red;'>Sono state caricate nella tabella \\\"$tabella\\\" $ni record su $nt righe presenti nel file \\\"$file_csv\\\" </p>\";\n $rit = array(\"Letti\"=>$nt, \"Inseriti\"=>$ni);\n return $rit;\n }", "function csv($fichier, $meteocode, $date, $code)\n{\n $lines2 = file($fichier);\n\n $id = $meteocode;\n // Affiche toutes les lignes du tableau comme code HTML, avec les numéros de ligne\n foreach($lines2 as $line_num2 => $line2)\n {\n $chaine2 = htmlspecialchars($line2);\n\n if(strpos($chaine2, $date['aa'] . '-' . $date['mm'] . '-' . $date['jj']))\n {\n /* * *************************************************\n * À regler le probleme de .0 dans la ligne suivante *\n * ************************************************** */\n\n if(strstr($chaine2, $id . '.0_' . $code . '_'))\n {\n $text = strpbrk($chaine2, '2');\n $x = strpos($text, 'v', 32);\n $lien = substr($text, 0, $x + 1);\n $parametre = substr($lien, -6, -4);\n switch($parametre)\n {\n case 'CC':$lien_cc = $lien;\n break;\n case 'PA':$lien_pa = $lien;\n break;\n case 'OP':$lien_pop = $lien;\n break;\n case 'TA':$lien_ta = $lien;\n break;\n case 'TD':$lien_td = $lien;\n break;\n case 'WS':$lien_ws = $lien;\n break;\n }\n }\n }\n }\n $lien_csv = array(\n 'lien_cc' => $lien_cc,\n 'lien_pa' => $lien_pa,\n 'lien_pop' => $lien_pop,\n 'lien_ta' => $lien_ta,\n 'lien_td' => $lien_td,\n 'lien_ws' => $lien_ws,\n );\n return($lien_csv);\n}", "public function csv()\n {\n // if dirty data exists\n $this->swallow();\n // if redirecting\n if ($this->redirect) {\n /*header(\"Location: {$this->redirect}\");\n // more headers\n foreach ( $this->headers as $header ) {\n header($header);\n }*/\n $this->redirect($this->redirect, array(), false);\n } else {\n // header xml data\n header('Content-Type: application/csv');\n //过滤$CFG\n if (!empty($this->vars['CFG'])) {\n unset($this->vars['CFG']);\n }\n // more headers\n foreach ($this->headers as $header) {\n header($header);\n }\n // set varibales data\n $results = Utility::array2CSV($this->vars);\n // send\n echo $results;\n }\n }", "public function createCsv(){\n $this->header = NULL;\n $this->csv = array();\n if (($handle = fopen($this->url, 'r')) !== FALSE)\n {\n while (($row = fgetcsv($handle, 1000, $this->separatore)) !== FALSE)\n {\n if(!$this->header)\n $this->header = $this->trimField($row);\n else\n $this->csv[] = array_combine($this->header, $this->trimField($row));\n }\n fclose($handle);\n }\n }", "public function createCouponsCSV1()\n {\n $mysqli = new mysqli(\"127.0.0.1\",\"coupon\",\"coupon\",\"coupon\");\n if ($mysqli->connect_errno)\n {\n echo \"Failed to connect to MySQL: (\" . $mysqli->connect_errno . \") \" . $mysqli->connect_error;\n }\n \n $query = \"SELECT 'coupon_id','coupon_name', 'coupon_description' FROM dual union all SELECT coupon_id,coupon_name, coupon_description FROM coupons\";\n $result = $mysqli->query($query);\n \n $i=$result->num_rows;\n //print_r ($result);\n for ($j=0; $j<$i; $j++)\n {\n $vec[$j]= $result->fetch_row();\n }\n \n $file_handle = fopen('coupons_data.csv','w+');\n \n foreach($vec as $row)\n {\n fputcsv($file_handle,$row);\n }\n \n fclose($file_handle);\n \n echo('The data.csv file was created');\n \n $mysqli->close();\n }", "public function csvData()\n {\n }", "function csv() {\n header('Content-Type: text/csv; charset=utf-8');\n header('Content-Disposition: attachment; filename=fflives.csv');\n\n // create a file pointer connected to the output stream\n $output = fopen('php://output', 'w');\n\n // output the column headings\n fputcsv($output, array('im_name', 'im_url'));\n\n // fetch the data\n foreach ($this->data as $id) {\n $im_name = \"$id.png\";\n $im_url = SITE_ROOT . \"themes/fflives/images/data/$id.png\";\n fputcsv($output, array($im_name, $im_url));\n }\n }", "public function get_CSV_Tal()\n\t\t {\n\n $handle = fopen(\"./tables/talents.csv\", \"r\");\n \n $first_row = true;\n $final_ata = array();\n $headers = array();\n \n while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) \n\t\t\t{ \n if($first_row) \n\t\t\t\t{\n $headers = $data;\n $first_row = false;\n } else {\n $final_ata[] = array_combine($headers, array_values($data));\n }\n }\n \n $result_arr = array(); \n foreach($final_ata as $key => $value){\n $name = $final_ata[$key]['Abkuerzung'];\n $result_arr[$name] = $value;\n }\n return($result_arr); \n }", "public function exportCsv(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $query = $this->{$this->main_model}->find(); \n $this->CommonQuery->build_common_query($query,$user,['Users','RealmNotes' => ['Notes']]);\n \n $q_r = $query->all();\n\n //Headings\n $heading_line = array();\n if(isset($this->request->query['columns'])){\n $columns = json_decode($this->request->query['columns']);\n foreach($columns as $c){\n array_push($heading_line,$c->name);\n }\n }\n $data = [\n $heading_line\n ];\n foreach($q_r as $i){\n\n $columns = array();\n $csv_line = array();\n if(isset($this->request->query['columns'])){\n $columns = json_decode($this->request->query['columns']);\n foreach($columns as $c){\n $column_name = $c->name;\n if($column_name == 'notes'){\n $notes = '';\n foreach($i->realm_notes as $un){\n if(!$this->Aa->test_for_private_parent($un->note,$user)){\n $notes = $notes.'['.$un->note->note.']'; \n }\n }\n array_push($csv_line,$notes);\n }elseif($column_name =='owner'){\n $owner_id = $i->user_id;\n $owner_tree = $this->Users->find_parents($owner_id);\n array_push($csv_line,$owner_tree); \n }else{\n array_push($csv_line,$i->{$column_name}); \n }\n }\n array_push($data,$csv_line);\n }\n }\n \n $_serialize = 'data';\n $this->setResponse($this->getResponse()->withDownload('export.csv'));\n $this->viewBuilder()->setClassName('CsvView.Csv');\n $this->set(compact('data', '_serialize')); \n \n }", "public function exportCsvAction(){\r\n $fileName = 'siege.csv';\r\n $content = $this->getLayout()->createBlock('reseauchx_reservationreseau/adminhtml_siege_grid')->getCsv();\r\n $this->_prepareDownloadResponse($fileName, $content);\r\n }", "function export_csv()\n {\n $filter_custom_fields = JRequest::getVar('filter_custom_fields');\n $a_custom_fields = $this->_build_a_custom_fields($filter_custom_fields);\n $data = array();\n $k=0;\n for($i=0; $i<count($a_custom_fields);$i++ )\n {\n $custom_field = $a_custom_fields[$i];\n $query = &$this->_buils_export_query($custom_field);\n $this->_db->setQuery((string)$query);\n $rows = $this->_db->loadAssocList();\n foreach ($rows as $row)\n {\n $data[$k]['virtuemart_custom_id'] = $row['virtuemart_custom_id'];\n $data[$k]['virtuemart_product_id'] = $row['virtuemart_product_id'];\n $data[$k]['product_name'] = iconv(\"utf-8\", \"windows-1251\",$row['product_name']);\n $data[$k]['intvalue'] = iconv(\"utf-8\", \"windows-1251\",str_replace('.', ',', $row['intvalue']));\n $data[$k]['custom_title'] = iconv(\"utf-8\", \"windows-1251\",$row['custom_title']);\n $k++;\n }\n }\n $name = 'com_condpower.csv';\n $path = JPATH_ROOT.DS.'tmp'.DS.$name;\n if ($fp = fopen($path, \"w+\"))\n {\n foreach ($data as $fields) {\n fputcsv($fp, $fields, ';', '\"');\n }\n fclose($fp);\n }\n else\n {\n return array(FALSE, JTEXT::_('COM_CONDPOWER_ERROR_OPEN_TO_EXPORT'));\n }\n// $href = str_replace('administrator/', '', JURI::base()).'tmp/'.$name;\n// $href = JURI::base().'components/com_condpower/download.php?path='.$path;\n return array(TRUE,'OK');\n\n }", "public function exportCsvAction()\n {\n $fileName = 'traineecert.csv';\n $content = $this->getLayout()->createBlock('bs_traineecert/adminhtml_traineecert_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function get_csv() {\n\t\treturn $this->csv;\n\t}", "public function writeCsvMarcas(){\n $output = fopen('manufacturers_import.csv', 'w');\n $contadorMarca = 1;\n $vectorMarcas = array();\n $vectorMarcasLabel = $this->getVectorLabelMarcas();\n array_push($vectorMarcas,$vectorMarcasLabel);\n foreach ($this->vectorImagenesPrincipalesMarcas as $key => $value){\n $vector = $this->writeCsvFieldsMarcas($contadorMarca,$key,$value);\n array_push($vectorMarcas,$vector);\n $contadorMarca++;\n }\n foreach ($vectorMarcas as $campo) {\n fputcsv($output, $campo,';');\n }\n fclose($output);\n }", "public function generateCsv()\n\t{\n\t\t$doc = new CsvDocument(array(\"Member Name\",\"Email Address\",\"Alternate Email\"));\n\t\tforeach($this->emailList as $record)\n\t\t{\n\t\t\t$doc->addRow(array(\n\t\t\t\t$record->name,\n\t\t\t\t$record->emailAddress, \n\t\t\t\t$record->alternateEmail\n\t\t\t));\n\t\t}\n\n\t\t$filename = \"svenskaklubben_maillist_\" . date(\"d-m-Y_G-i\");\n\t\theader(\"Content-type: application/csv\");\n\t\theader(\"Content-Disposition: attachment; filename={$filename}.csv\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\n\t\techo $doc->getDocument();\n\t\texit; //premature exit so the templates aren't appended to the document\n\t}", "public function csv_export() {\n\t$export = \"\";\n\t$order_id = null;\n\t$order_ids = array();\n\t$headers = array();\n\t$products = array();\n\t$summaries = array();\n\tforeach ($this->records as $record) {\n\t $order_id = $record[\"order_id\"];\n\t $order_ids[] = $order_id;\n\t if(!isset($headers[$order_id])) {\n\t\t$headers[$order_id] = $this->build_order_header($record);\n\t }\n\t $products[$order_id] = (isset($products[$order_id]) ? $products[$order_id] : '').$this->build_order_product_line($record);\n\t if(!isset($summaries[$order_id])) {\n\t\t$summaries[$order_id] = $this->build_order_summary($record);\n\t }\n\t}\n\t$order_ids = array_unique($order_ids);\n\tforeach($order_ids as $oid) {\n\t $export .= $headers[$oid].$products[$oid].$summaries[$oid];\n\t}\n\n\treturn $export;\n }", "public function exportCsvAction()\n {\n $fileName = 'traineedoc.csv';\n $content = $this->getLayout()->createBlock('bs_traineedoc/adminhtml_traineedoc_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function exportCouponsCsvAction()\n {\n $fileName = 'coupons.csv';\n $grid = $this->getLayout()->createBlock('adminhtml/report_sales_coupons_grid');\n $this->_initReportAction($grid);\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n }", "function csv_export() {\n\t\t$export = \"\";\n\n\t\t$record = $this->records[0];\n\t\t$export = \"ORD,5322048,\" . substr($record[\"batch_date\"],5,2) . substr($record[\"batch_date\"],8,2) . \n\t\t\t\t substr($record[\"batch_date\"],2,2) . \",,3,,,5322048,,5322048\\n\";\n\t\t\n\t\t$sequence = 0;\n\t\tforeach($this->records as $record) {\n//print_r($record);\n\t\t\t$sequence++;\n\t\t\t$line = \"DET,\" . $sequence . \",\" . $record[\"sku\"] . \",\" . $record[\"qty\"] . \",,,,,,\\n\";\n\t\t\t$export .= $line;\n\t\t}\n\n\t\treturn $export;\n\t}", "function editar_pelicula($peliActual){\n // leemos todas las pelis, y las volcamos al fichero menos la pasada como argumento\n\n $lesPelis=readPelis();\n\n // obrim el fitxer de pelis per a escriptura. \n $f = fopen(filePeliculas, \"w\");\n\n foreach($lesPelis as $peli){\n\n // guardem la peli llegida o l'actual, si és el cas\n if ($peli[\"id\"]==$peliActual[\"id\"]){\n $p=$peliActual;\n }\n else{\n $p=$peli;\n }\n\n //convertim $peli (array asociatiu) en array\n\n $valors_peli=array();\n foreach($p as $k=>$v){\n array_push($valors_peli,$v);\n }\n\n //escrivim al fitxer\n fputcsv($f,$valors_peli,\",\");\n\n }\n\n fclose($f);\n \n \n\n}", "abstract public function convert_to_csv();", "function CSVExport ($sql_csv)\n {\n header(\"Content-type:text/octect-stream\");\n header(\"Content-Disposition:attachment;filename=data.csv\");\n while ($row = mysql_fetch_row($sql_csv))\n {\n print '\"' . stripslashes(implode('\",\"', $row)) . \"\\\"\\n\";\n }\n exit();\n }", "public function downloadParticipants($idEvent){\n if(Auth::user()->statut_id != 2) return back();\n $event = Manifestation::find($idEvent);\n $participants = Participant::where('manifestation_id', $idEvent)->get();\n $users = [];\n foreach ($participants as $participant) {\n array_push($users, User::find($participant->user_id));\n }\n $list = new \\Laracsv\\Export();\n $list->build(collect($users), ['email', 'name', 'prenom', 'centre_id']);\n $listString = (string) $list->getCsv();\n $listString = str_replace(',', ';', $listString);\n $csv = Reader::createFromString($listString);\n $csv->output('participants_'.$event->nom.'.csv');\n }", "public function getCSVLink($results)\n {\n //$data = Input::all();\n //$query_string = 'select users.id as Candidateid, users.first_name as Firstname, users.last_name as Lastname, users.email as Email, universities.name as University, degree_types.name as Degree from users ';\n //$group_by_string = 'group by users.id;';\n //$where_array = array();\n //if(isset($data['work_option']))\n //{\n // $string_work_option = implode(\",\",$data['work_option']);\n // $work_string ='inner join user_option on users.id=user_option.user_id ';\n // $where_work = 'user_option.option_id in ('.$string_work_option.') ';\n // $where_array[] = $where_work;\n //}\n //else{\n // $work_string ='';\n // $where_work = '';\n //}\n //if(isset($data['desired_job_type']))\n //{\n // $string_jobtype_option = implode(\",\",$data['desired_job_type']);\n // $jobtype_string ='inner join user_desired_work_type on users.id=user_desired_work_type.user_id ';\n // $where_jobtype = 'user_desired_work_type.work_type_id in ('.$string_jobtype_option.') ';\n // $where_array[] = $where_jobtype;\n //}\n //else{\n // $jobtype_string ='';\n // $where_jobtype = '';\n //}\n //if(isset($data['job_location']))\n //{\n // $string_joblocation_option = implode(\",\",$data['job_location']);\n // $joblocation_string ='inner join user_desired_location on users.id=user_desired_location.user_id ';\n // $where_joblocation = 'user_desired_location.location_id in ('.$string_joblocation_option.') ';\n // $where_array[] = $where_joblocation;\n //}\n //else{\n // $joblocation_string ='';\n // $where_joblocation = '';\n //}\n //if(isset($data['job_location']))\n //{\n // $string_joblocation_option = implode(\",\",$data['job_location']);\n // $joblocation_string ='inner join user_desired_location on users.id=user_desired_location.user_id ';\n // $where_joblocation = 'user_desired_location.location_id in ('.$string_joblocation_option.') ';\n // $where_array[] = $where_joblocation;\n //}\n //else{\n // $joblocation_string ='';\n // $where_joblocation = '';\n //}\n ////echo $data['degree_type'];die();\n //$degree_string ='left outer join user_degree on users.id=user_degree.user_id left outer join degrees on degrees.id=user_degree.degree_id left outer join degree_types on degree_types.id=degrees.degree_type_id left outer join universities on universities.id=degrees.university_id ';\n //if(isset($data['degree_type'][0]) && $data['degree_type'][0]>0)\n //{\n // \n // $degree_type_string = 'degrees.degree_type_id=\"'.$data['degree_type'][0].'\" ';\n // \n // if(isset($data['degree_uni'][0]) && $data['degree_uni'][0]>0)\n // {\n // $where_array[] = 'degrees.university_id=\"'.$data['degree_uni'][0].'\" ';\n // }\n // if(isset($data['degree_subject'][0]) && $data['degree_subject'][0]>0)\n // {\n // $where_array[] = 'degrees.degree_subject_id=\"'.$data['degree_subject'][0].'\" ';\n // }\n // if(isset($data['degree_result'][0]) && $data['degree_result'][0]>0)\n // {\n // $where_array[] = 'degrees.degree_result_id=\"'.$data['degree_result'][0].'\" ';\n // }\n // if(isset($data['degree_graduation'][0]) && $data['degree_graduation'][0]>0)\n // {\n // $where_array[] = 'degrees.degree_year=\"'.$data['degree_graduation'][0].'\" ';\n // }\n // $where_array[] = $degree_type_string;\n //}\n //else{\n // //$degree_string ='';\n //}\n //if(isset($data['skills']))\n //{\n // $string_skill_option = implode(\",\",$data['skills']);\n // $skill_string ='inner join user_skill on users.id=user_skill.user_id ';\n // $where_skill = 'user_skill.skill_id in ('.$string_skill_option.') ';\n // $where_array[] = $where_skill;\n //}\n //else{\n // $skill_string ='';\n // $where_skill = '';\n //}\n //if(isset($data['english_level']) && $data['english_level']>0)\n //{\n // $where_array[] = 'users.english_level=\"'.$data['english_level'].'\" ';\n //}\n //if(isset($data['languages'][0]) && $data['languages'][0]>0)\n //{\n // $language_string ='inner join user_language on users.id=user_language.user_id inner join languages on languages.id=user_language.language_id ';\n // $language_type_string = 'languages.name_id=\"'.$data['languages'][0].'\" ';\n // \n // if(isset($data['languages_level'][0]) && $data['languages_level'][0]>0)\n // {\n // $where_array[] = 'languages.level_id=\"'.$data['languages_level'][0].'\" ';\n // }\n // \n // $where_array[] = $language_type_string;\n //}\n //else{\n // $language_string ='';\n //}\n //if((isset($data['work_type'][0]) && $data['work_type'][0]>0)||(isset($data['work_length'][0]) && $data['work_length'][0]>0)||(isset($data['work_sector'][0]) && $data['work_sector'][0]>0))\n //{\n // $workexp_string ='inner join user_work on users.id=user_work.user_id inner join works on works.id=user_work.work_id ';\n // if(isset($data['work_type'][0]) && $data['work_type'][0]>0)\n // {\n // $where_array[] = 'works.work_type_id=\"'.$data['work_type'][0].'\" ';\n // }\n // if(isset($data['work_length'][0]) && $data['work_length'][0]>0)\n // {\n // $where_array[] = 'works.work_duration_id=\"'.$data['work_length'][0].'\" ';\n // }\n // if(isset($data['work_sector'][0]) && $data['work_sector'][0]>0)\n // {\n // $where_array[] = 'works.work_sector_id=\"'.$data['work_sector'][0].'\" ';\n // }\n //}\n //else{\n // $workexp_string ='';\n //}\n //if(!empty($where_array))\n //{\n // $explode_array = 'where '.implode(' and ',$where_array);\n //}\n //else\n //{\n // $explode_array = '';\n //}\n //$query_string = $query_string.$work_string.$jobtype_string.$joblocation_string.$degree_string.$skill_string.$language_string.$workexp_string.$explode_array.$group_by_string;\n //\n ////$query_string = $query_string.$work_string.$jobtype_string.$joblocation_string.$degree_string.$skill_string.$language_string.$workexp_string.'where '.implode(' and ',$where_array).$group_by_string;\n //$results = DB::select( DB::raw($query_string) );\n //$user_lists['result'] = $results;\n //$values = $user_lists;\n $firstrow = array('Candidateid','Firstname','Lastname','Email','University','Degree');\n \n // $data = $values['result'];\n $data=$results;\n // passing the columns which I want from the result set. Useful when we have not selected required fields\n //$arrColumns = array('OrderId', 'ContactName', 'ContactTitle', 'Address', 'City', 'Country', 'Phone', 'OrderDate');\n $arrColumns = $firstrow;\n \n // define the first row which will come as the first row in the csv\n //$arrFirstRow = array('Order Id', 'Contact Name', 'Contact Title', 'Address', 'City', 'Country', 'Phone', 'Order Date');\n $arrFirstRow = $firstrow;\n \n // building the options array\n $options = array(\n 'columns' => $arrColumns,\n 'firstRow' => $arrFirstRow,\n );\n \n // creating the Files object from the Utility package.\n //$Files = new Files;\n \n return $this->convertToCSV($data, $options);\n }", "public function exportCsvAction()\n {\n\t\t$fileName = 'product_like.csv';\n\t\t$content = $this->getLayout()->createBlock('like/adminhtml_like_grid')->getCsv(); \n\t\t$this->_prepareDownloadResponse($fileName, $content);\n }", "public function listCsvAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n $head = array('ID', 'E-mail', 'Name', 'Surname', 'Address', 'City', 'Country', 'Type', 'Institution', 'PostalCode', \n 'Phone', 'VatID');\n $users = $em->createQuery(\n 'SELECT u.id, u.email, u.name, u.surname, u.address, u.city, u.country, u.type, u.institution, u.postalcode, \n u.phone, u.nipvat FROM ZpiUserBundle:User u WHERE u.type <> :coauthor ORDER BY u.id DESC')\n ->setParameter('coauthor', USER::TYPE_COAUTHOR)\n ->getResult();\n array_push($users, $head);\n $users = array_reverse($users);\n\n return new Response($this->get('global')->csvDownload('users', $users));\n \n \n }", "function getCSVSimple2(){\r\n\t\tglobal $LANG;\r\n\r\n\t\t$csvdata = '';\r\n\t\t$csvheader = '';\r\n\t\t$delimeter = $this->extConf['CSV_qualifier'];\r\n\t\t$parter = $delimeter.$this->extConf['CSV_parter'].$delimeter;\r\n\t\t\r\n\t\t$csvheader = $this->q_data['header'].\"\\n\\n\";\r\n\t\t\r\n\t\t$fill_array = $this->createFillArray();\r\n\t\t//t3lib_div::devLog('getCSVSimple2 fill_array', 'ke_questionnaire Export Mod', 0, $fill_array);\r\n\t\t\r\n\t\tif (is_array($fill_array)){\r\n\t\t\t$headline = array();\r\n\t\t\tforeach ($fill_array as $question_id => $values){\r\n\t\t\t\tif ($values['title'] != ''){\r\n\t\t\t\t\tswitch ($values['type']){\r\n\t\t\t\t\t\tcase 'authcode':\r\n\t\t\t\t\t\tcase 'fe_user': \r\n\t\t\t\t\t\tcase 'start_tstamp':\r\n\t\t\t\t\t\tcase 'finished_tstamp':\r\n\t\t\t\t\t\t\t\t$headline[] = $values['title'];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'closed':\r\n\t\t\t\t\t\t\tforeach ($values['answers'] as $a_id => $a_values){\r\n\t\t\t\t\t\t\t\t$answer = t3lib_BEfunc::getRecord('tx_kequestionnaire_answers',$a_id);\r\n\t\t\t\t\t\t\t\t$headline[] = $values['title'].'_'.$answer['title'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t/*case 'dd_pictures':\r\n\t\t\t\t\t\t\tforeach ($values['answers'] as $a_id => $a_values){\r\n\t\t\t\t\t\t\t\t$answer = t3lib_BEfunc::getRecord('tx_kequestionnaire_answers',$a_id);\r\n\t\t\t\t\t\t\t\t$headline[] = $values['title'].'_'.$answer['title'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;*/\r\n\t\t\t\t\t\tcase 'matrix':\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getCSVSimple matrix', 'ke_questionnaire Export Mod', 0, $values);\r\n\t\t\t\t\t\t\tif (is_array($values['subquestions'])){\r\n\t\t\t\t\t\t\t\tforeach ($values['subquestions'] as $sub_id => $sub_values){\r\n\t\t\t\t\t\t\t\t\t$subl = t3lib_BEfunc::getRecord('tx_kequestionnaire_subquestions',$sub_id);\r\n\t\t\t\t\t\t\t\t\tforeach ($sub_values['columns'] as $col_id => $col_values){\r\n\t\t\t\t\t\t\t\t\t\t$col = t3lib_BEfunc::getRecord('tx_kequestionnaire_columns',$col_id);\r\n\t\t\t\t\t\t\t\t\t\t$headline[] = $values['title'].'_'.$subl['title'].'_'.$col['title'];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'semantic':\r\n\t\t\t\t\t\t\tforeach ($values['subquestions'] as $sub_id => $sub_values){\r\n\t\t\t\t\t\t\t\t$subl = t3lib_BEfunc::getRecord('tx_kequestionnaire_sublines',$sub_id);\r\n\t\t\t\t\t\t\t\tforeach ($sub_values['columns'] as $col_id => $col_values){\r\n\t\t\t\t\t\t\t\t\t$col = t3lib_BEfunc::getRecord('tx_kequestionnaire_columns',$col_id);\r\n\t\t\t\t\t\t\t\t\t$headline[] = $values['title'].'_'.$subl['title'].'_'.$col['title'];\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\tbreak;\r\n\t\t\t\t\t\tcase 'demographic':\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getCSVSimple2 demo', 'ke_questionnaire Export Mod', 0, $values);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t// Hook to make other types available for export\r\n\t\t\t\t\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_questionnaire']['CSVExportType2Headline'])){\r\n\t\t\t\t\t\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_questionnaire']['CSVExportType2Headline'] as $_classRef){\r\n\t\t\t\t\t\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\r\n\t\t\t\t\t\t\t\t\t$headline = $_procObj->CSVExportType2Headline($headline,$values);\r\n //t3lib_div::devLog('headline', 'ke_questionnaire Export Mod', 0, $headline);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n $headline[] = $values['title']; \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\t\t\t}\r\n\t\t}\r\n\t\t$csvheader .= $delimeter.implode($parter,$headline).$delimeter.\"\\n\";\r\n\t\tif (is_array($this->results)){\r\n\t\t\t$file_path = PATH_site.'typo3temp/'.$this->temp_file;\r\n\t\t\t$store_file = fopen($file_path,'r');\r\n\t\t\t//t3lib_div::devLog('simple 2 results', 'ke_questionnaire Export Mod', 0, $this->results);\r\n\t\t\tforeach ($this->results as $r_id => $r_values){\r\n\t\t\t\t$read_line = fgets($store_file);\r\n\t\t\t\t$csvdata .= $read_line;\r\n\t\t\t\t//t3lib_div::devLog('simple 2 '.$r_id, 'ke_questionnaire Export Mod', 0, array($read_line,$r_values));\r\n\t\t\t}\r\n\t\t\tfclose($store_file);\r\n\t\t}\r\n\t\r\n\t\treturn $csvheader.$csvdata;\r\n\t}", "function showAllParties($connection) {\n $requete=\"SELECT Joueurs.nom as NomJ1, Joueurs.prenom as PrenomJ1, Parties.adversaire as J2, Parties.resultat, Parties.id_partie\n FROM Tournois\n INNER JOIN Parties ON parties.id_tournoi = Tournois.id_tournoi\n INNER JOIN Partie_utilise_deck ON Partie_utilise_deck.id_partie = Parties.id_partie\n INNER JOIN Decks ON Partie_utilise_deck.id_deck = Decks.id_deck\n INNER JOIN Joueurs ON Decks.id_joueur = joueurs.id_joueur\";\n\n /* execute la requete */\n if($res = $connection->query($requete)) {\n echo \"<table>\";\n echo \"<thead>\";\n\n echo \"<tr>\";\n echo \"<th><i class=\\\"material-icons\\\">person</i>Nom joueur 1</th>\";\n echo \"<th><i class=\\\"material-icons\\\">person</i>Prénom joueur 1</th>\";\n echo \"<th><i class=\\\"material-icons\\\">person_outline</i>Adversaire</th>\";\n echo \"<th><i class=\\\"material-icons\\\">flag</i>Résultat</th>\";\n echo \"<th><i class=\\\"material-icons\\\">format_list_numbered</i>Id partie</th>\";\n echo \"<th><i class=\\\"material-icons\\\">insert_link</i>Liens</th>\";\n\n echo \"</tr>\";\n echo \"</thead>\";\n echo \"<tbody>\";\n\n while ($partie = $res->fetch_assoc()) {\n echo \"<tr>\";\n echo \"<td>\".$partie[\"NomJ1\"].\"</td>\";\n echo \"<td>\".$partie[\"PrenomJ1\"].\"</td>\";\n echo \"<td>\".$partie[\"J2\"].\"</td>\";\n echo \"<td>\".$partie[\"resultat\"].\"</td>\";\n echo \"<td>\".$partie[\"id_partie\"].\"</td>\";\n echo \"<td><a href=\\\"/Parties.php?id=\". $partie[\"id_partie\"] .\"\\\">Decks de la partie</a></td>\";\n echo \"</tr>\";\n }\n $connection->close();\n echo \"</tbody>\";\n echo \"</table>\";\n }\n}", "public function exportToCSVContacts() {\n\t\t$contactDB = new contactDB();\n\t\t$emailsArray = $contactDB->getEmails($this->request->getVariable('id'),0,100000,1,0,$contactDB->contactColumns,PDO::FETCH_ASSOC);\n\t\t$contactGroupsDB = new contactgroupsDB();\n\t\t$contactGroup = $contactGroupsDB->fetchRow(\"id={$this->request->getVariable('id')}\");\n\t\t\n\t\tarray_unshift($emailsArray, $contactDB->contactColumns);\n\n\t\tcsv::getCsvFile(generate::cleanFileName($contactGroup->name.'_'.generate::sqlDatetime()), $emailsArray);\n\t}", "public function exportCsvAction()\n {\n $fileName = 'offer.csv';\n $content = $this->getLayout()->createBlock('mfb_myflyingbox/adminhtml_offer_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "function tabla_directores(){\n $fichero = \"bbdd/directores.csv\";\n $array_directores;\n\n //Si existe el fichero lo abrimos para leerlo\n $manejador = fopen($fichero, \"r\");\n if($manejador != FALSE){\n $j=0;\n while(($arrayFila= fgetcsv($manejador, 1000, \",\")) != FALSE){ \n $array_directores[$j] = array(\"id\" => $arrayFila[0], \"nombre\" => $arrayFila[1], \"anyo\" => $arrayFila[2], \"lugar\" => $arrayFila[3]);\n $j++;\n } \n fclose($manejador);\n } \n return $array_directores;\n }", "public function listarDetalhadoCsvAction(Request $request, $idRede = null) {\n $dataInicio = $request->get('dataInicio');\n $dataFim = $request->get('dataFim');\n\n $locale = $request->getLocale();\n\n $dados = $this->getDoctrine()\n ->getRepository('CacicCommonBundle:Computador')\n ->gerarRelatorioComputadoresCsv($filtros = array(), $idRede, $dataInicio, $dataFim);\n\n if (!empty($idRede)) {\n $rede = $dados[0]['nmRede'];\n } else {\n $rede = null;\n }\n\n // Gera CSV\n $reader = new ArrayReader($dados);\n\n // Create the workflow from the reader\n $workflow = new Workflow($reader);\n\n $workflow->addValueConverter(\"reader\",new CharsetValueConverter('UTF-8',$reader));\n\n $converter = new CallbackValueConverter(function ($input) {\n return $input->format('d/m/Y H:m:s');\n });\n $workflow->addValueConverter('dtHrUltAcesso', $converter);\n\n // Add the writer to the workflow\n $tmpfile = tempnam(sys_get_temp_dir(), 'Computadores-lista');\n $file = new \\SplFileObject($tmpfile, 'w');\n $writer = new CsvWriter($file);\n $writer->writeItem(array('Computador','Mac Address','Endereço IP','Sistema Operacional','Local','Subrede','IP Subrede','Data/Hora do Ùltimo Acesso'));\n $workflow->addWriter($writer);\n\n // Process the workflow\n $workflow->process();\n\n // Retorna o arquivo\n $response = new BinaryFileResponse($tmpfile);\n $response->headers->set('Content-Type', 'text/csv');\n $response->headers->set('Content-Disposition', 'attachment; filename=\"Computadores.csv\"');\n $response->headers->set('Content-Transfer-Encoding', 'binary');\n\n return $response;\n }", "function admin_exportcausecsv() {\n\t\t//$this->set(\"schoolId\",$schoolId);\n\t\t\n\t\t\n\t\t/*$Page=$this->Member->find('all',array(\n\t\t'conditions'=>array(\n\t\t'Member.active !='=>'0'),\n\t\t'order'=>array(\n\t\t'Member.created'=>'desc')\n\t\t)\n\t\t);*/\n\t\t\n\t\t$Page = $this->Member->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Member.group_id' => '6'\n\t\t\t)\n\t\t));\n\t\t//echo \"<pre>\";print_r($Page);exit;\n\t\t$data = \"S.No,Name,User Email,Address,Contact,Status\\n\";\n\t\t$i = 1;\n\t\tforeach ($Page as $pages):\n\t\t\t$data .= $i . \",\";\n\t\t\t\n\t\t\t$fullname = $pages['userMeta']['fname'] . ' ' . $pages['userMeta']['lname'];\n\t\t\t$data .= $fullname . \",\";\n\t\t\t$useremail = $pages['Member']['email'];\n\t\t\t$data .= $useremail . \",\";\n\t\t\t\n\t\t\t$address = $pages['userMeta']['address'] . ' ' . $pages['userMeta']['city'] . ' ' . $pages['userMeta']['state'] . ' ' . $pages['userMeta']['country'] . ' ' . $pages['userMeta']['zip'];\n\t\t\t\n\t\t\t$data .= $address . \",\";\n\t\t\t\n\t\t\t$contact = $pages['userMeta']['contact'];\n\t\t\t$data .= $contact . \",\";\n\t\t\t\n\t\t\t$sta = $pages['Member']['active'];\n\t\t\tif ($sta == 1) {\n\t\t\t\t$status = 'Active';\n\t\t\t} else {\n\t\t\t\t$status = 'Deactive';\n\t\t\t}\n\t\t\t$data .= $status . \"\\n\";\n\t\t\t\n\t\t\t$i++;\n\t\tendforeach;\n\t\techo $data;\n\t\theader(\"Content-type:text/octect-stream\");\n\t\theader(\"Content-Disposition:attachment;filename=Cause(\" . date('m/d/Y') . \").csv\");\n\t\tdie();\n\t}", "function getcsv($no_of_field_names)\r\n\t{\r\n\t\t$separate = '';\r\n\t\t// do the action for all field names as field name\r\n\t\tforeach ($no_of_field_names as $field_name)\r\n\t\t{\r\n\t\t\tif (preg_match('/\\\\r|\\\\n|,|\"/', $field_name))\r\n\t\t\t{\r\n\t\t\t\t$field_name = '' . str_replace('','', $field_name) . '';\r\n\t\t\t}\r\n\t\t\techo $separate . $field_name;\r\n\t\t\t//sepearte with the comma\r\n\t\t\t$separate = ',';\r\n\t\t}\r\n\t\t//make new row and line\r\n\t\techo \"\\r\\n\";\r\n\t}", "private static function downloadCsv() {\r\n header('Content-Type: text/csv; charset=utf-8');\r\n header('Content-Disposition: attachment; filename=data.csv');\r\n\r\n // create a file pointer connected to the output stream\r\n $output = fopen('php://output', 'w');\r\n\r\n // output the column headings\r\n fputcsv($output, array('Column 1', 'Column 2', 'Column 3'));\r\n\r\n // fetch the data\r\n $rows = self::getSignatures();\r\n // loop over the rows, outputting them\r\n while ($row = mysqli_fetch_assoc($rows)) fputcsv($output, $row);\r\n }", "function make_csv_file($strsql, $item, $delimiter=\";\") {\r\n\r\n $result = mysql_query($strsql);\r\n \r\n $out=\"\";\r\n $change = array(\"\\n\", \"\\r\"); // caractères interdits dans les CSV à retirer\t\t\t\r\n\r\n while ($row=mysql_fetch_assoc($result)) \r\n {\t\t\t\t\t\r\n $tab_keys = array_keys($row);\r\n\t \r\n $entete = \"\";\r\n\t \t \r\n // enlève les caractères spéciaux HTML (&eacute;...) et surtout les sauts de ligne pour format CSV\r\n for ($e=0;$e<count(array_keys($row));$e++)\t\r\n {\t\t \t\t\t \r\n $entete .= str_replace($change,\"\",unhtmlentities($tab_keys[$e])).$delimiter;\r\n\t $out .= str_replace($change,\"\",unhtmlentities($row[$tab_keys[$e]])).$delimiter;\r\n }\r\n $entete .= \"\\n\";\t\t\t \r\n $out .= \"\\n\";\r\n unset($tab_keys);\r\n }\r\n $Path = \"dump/csv/\";\r\n\t$File = \"csv_\".$item.\"_\".date(\"ymd_His\").\".csv\";\r\n // ecrit le fichier généré sur le disque\r\n archive($Path.$File,$entete.$out);\r\n \r\n // et force le download en HTTP\r\n telecharge($Path.$File);\r\n}", "public function exportCsvAction()\n {\n $fileName = 'coursedoc.csv';\n $content = $this->getLayout()->createBlock('bs_coursedoc/adminhtml_coursedoc_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function createCsv($csv,$round)\n {\n try {\n $today = date(\"d-m-Y\");\n\n $writer = Writer::createFromFileObject(new SplTempFileObject());\n $writer->setDelimiter(\";\");\n $writer->insertOne(['',\"Participation updated on :$today\",\n ]);\n $writer->insertOne([\n 'ICAR Code', 'Laboratorio', 'Delivery Address',\n 'City', 'Country', 'Contact person','Email',\n 'Fat_ref','Protein_ref','Lactose_ref', 'Urea_ref', 'Scc_ref',\n 'Fat_rout','Protein_rout', 'Lactose_rout', 'Urea_rout',\n 'BHB','PAG', 'DNA'\n ]);\n\n\n foreach ($csv as $e) {\n $records = [\n [\n \"*\".$e->icar_code,\n $e->lab_name,\n $e->invoice_address,\n $e->invoice_city,\n $e->invoice_country,\n $e->contatto_amministrativo,\n $e->email,\n (isset($e->fat_ref))?1:0 ,\n (isset($e->protein_ref))?1:0 ,\n (isset($e->lactose_ref))?1:0 ,\n (isset($e->urea_ref))?1:0 ,\n (isset($e->scc_ref))?1:0 ,\n (isset($e->fat_rout))?1:0 ,\n (isset($e->protein_rout))?1:0 ,\n (isset($e->lactose_rout))?1:0 ,\n (isset($e->urea_rout))?1:0 ,\n (isset($e->bhb))?1:0 ,\n (isset($e->pag))?1:0 ,\n (isset($e->dna))?1:0 ,\n ],\n ];\n $writer->insertAll($records);\n }\n\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=file.csv');\n header('Content-Transfer-Encoding: binary');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Pragma: public');\n echo \"\\xEF\\xBB\\xBF\"; // UTF-8 BOM\n\n $writer->output('round-'.$round.'.csv');exit;\n // Storage::disk('csv')->put('round0917.csv', $writer);\n\n } catch (Exception $e) {\n $message = [\n 'flashType' => 'danger',\n 'flashMessage' => 'Errore! CSV'\n ];\n }\n }", "public function exportCsvAction()\n {\n $fileName = 'supplier.csv';\n $content = $this->getLayout()->createBlock('dropship360/adminhtml_logicbroker_grid')->getCsvFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function exportCsvAction()\n {\n $fileName = 'curriculumdoc.csv';\n $content = $this->getLayout()->createBlock('bs_curriculumdoc/adminhtml_curriculumdoc_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function csv() {\n //get user id.\n if(!isset($id)){\n $user_id = $this->Session->read('Auth.User.id');\n }\n //Check if user has access\n $conditions = array(\n 'uid'=>$user_id);\n //Test and run\n if ($this->SocialPosts->hasAny($conditions)){\n //Get all records and send them for .csv file\n //Build Query.\n $get = array(\n 'conditions' => array('uid'=>$user_id),\n 'fields'=>array('message','dateposted') \n );\n //Data\n $data = $this->SocialPosts->find('all',$get);\n \n //prepare data\n foreach ($data as $key => $value){\n $rows[] = $value['SocialPosts']['message'];\n $rows[] = $value['SocialPosts']['dateposted'];\n $csv[] = $rows;\n $rows = array();\n }\n //Column names initiate\n //$columns = (array) NULL;\n $columns = array('Message','Date Posted');\n //Run csv download\n CsvDownloadRequest::build($csv, $columns, 'Social_Posts');\n }else{\n $this->Session->setFlash(__('The request could not be processed. Please, try again.'),'cake-error');\n $this->redirect(array('action' => 'index'));\n }\n }", "function export_csv()\n\t{\n\t\t$mysql_tz = md_timezone_to_mysql($_SESSION['timezone']);\n\t\t$this->db->select('id, account, convert_tz(payment_date,\\'+00:00\\',\\''.$mysql_tz.'\\') as payment_date, amount');\n\t\t$this->db->where('member_id', $_SESSION['member_id']);\n\t\t$quer = $this->db->get('payments');\n\n\t\t// generate csv\n\t\t$this->load->helper('csv');\n\t\tquery_to_csv($quer,TRUE,'payments_'.date('dMy').'.csv');\n\t}", "protected function addHeaderRowToCSV() {}", "public function actionDownloadcsv()\n\t{\n\t\theader(\"Content-type: application/csv\");\n\t\theader(\"Content-Disposition: attachment; filename=transport.csv\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\n\t\techo \"Hospital number,First name,Last name,TCI date,Admission time,Site,Ward,Method,Firm,Specialty,DTA,Priority\\n\";\n\n\t\t$operations = $this->getTransportList($_POST, true);\n\n\t\tforeach ($operations as $operation) {\n\t\t\techo '\"'.$operation->event->episode->patient->hos_num.'\",\"'.\n\t\t\t\t\ttrim($operation->event->episode->patient->first_name).'\",\"'.\n\t\t\t\t\ttrim($operation->event->episode->patient->last_name).'\",\"'.\n\t\t\t\t\tdate('j-M-Y',strtotime($operation->latestBooking->session_date)).'\",\"'.\n\t\t\t\t\tsubstr($operation->latestBooking->session_start_time,0,5).'\",\"'.\n\t\t\t\t\t$operation->latestBooking->theatre->site->shortName.'\",\"'.\n\t\t\t\t\t($operation->latestBooking->ward ? $operation->latestBooking->ward->name : 'N/A') .'\",\"'.\n\t\t\t\t\t$operation->transportStatus.'\",\"'.\n\t\t\t\t\t$operation->event->episode->firm->pas_code.'\",\"'.\n\t\t\t\t\t$operation->event->episode->firm->serviceSubspecialtyAssignment->subspecialty->ref_spec.'\",\"'.\n\t\t\t\t\t$operation->NHSDate('decision_date').'\",\"'.\n\t\t\t\t\t$operation->priority->name.'\"'.\"\\n\";\n\t\t}\n\t}", "public function getCsvString() {\n return $this->data;\n }", "function getCSV($rows){\n\tif(empty($rows)){\n\t return \"No records for this category\";\n\t}\n\t//if records returned from DB\n\t$uniqueIds = array_keys($rows[0]);\n\t$header=implode(\",\", $uniqueIds); \t\n\t$fileContent = $header. \"\\r\\n\";\n\tforeach($rows as $row){\n\t\t$fileContent .= implode(\",\", $row) . \"\\r\\n\";\n\t}\n\treturn $fileContent;\n}", "public function exportCsvAction()\n {\n $fileName = 'ifeedback.csv';\n $content = $this->getLayout()->createBlock('bs_kst/adminhtml_ifeedback_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function dVenta(){\n\t\tif(!isset($this->session->usercompanyID)) redirect('login');\n\t\t//if($this->session->permisos['factura_n'] == '0') redirect('/');\n $data['query'] = $this->ventas_model->reporteVenta(\n getDateToDataBaseCustom($this->input->post('fechaInicio')),\n getDateToDataBaseCustom($this->input->post('fechaFin')),\n $this->session->companyID\n );\n $detalle = \"ventas - \". getDateToDataBaseCustom($this->input->post('fechaInicio')) . \" - \" . getDateToDataBaseCustom($this->input->post('fechaFin'));\n\t\t$textoSalida = convertArrayFormatCSV($data['query'], \"Cliente,SubTotal,Iva,Total,Cancelada\");\n header('Content-Encoding: UTF-8');\n\t\theader('Content-Type: text/csv; charset=utf-8');\n\t\theader('Content-disposition: attachment; filename='. $detalle .'.csv');\n\t\theader('Content-Length: '. strlen($textoSalida) );\n\t\techo $textoSalida;\n\t\texit;\n\t}", "public function transfer_csv()\n {\n $transfer = oxNew('tc_cleverreach_transfer', null, 'CSV');\n\n $config = oxRegistry::getConfig();\n $complete = (boolean)$config->getRequestParameter('full');\n $offset = (int)$config->getRequestParameter('offset');\n\n // when we use the full export, we have to work with offsets, otherwise 0\n if ($complete === false) {\n $offset = 0;\n }\n\n $transfer->setOffset($offset);\n\n try {\n list($count, $transferResult) = $transfer->run($this->getTimer(), $complete);\n } catch (Exception $e) {\n $this->error = $e->getMessage();\n\n return;\n }\n\n // Daten sind fehlerhaft\n if ($transferResult === false) {\n $lang = oxRegistry::getLang();\n $msg = $lang->translateString('TC_CLEVERREACH_ERROR_NO_KEY');\n $this->tcError = $msg;\n\n return false;\n\n // Alle Daten übertragen\n } elseif ($transferResult === true) {\n $this->metaRefreshValues['end'] = true;\n\n return;\n\n // Anzeige ? Nutzer|Bestellungen\n } elseif (is_array($transferResult) === true) {\n\n $transferType = 'user';\n $iReceiver = $count;\n\n // add full flag, to check for full list export\n $full = (int)$config->getRequestParameter('full');\n $this->metaRefreshValues['full'] = $full;\n $this->metaRefreshValues['function'] = 'transfer_csv';\n $this->metaRefreshValues['transfer'] = $transferType;\n $this->metaRefreshValues['iReceiver'] = $iReceiver;\n $this->metaRefreshValues['refresh'] = 0;\n $this->metaRefreshValues['offset'] = $this->getTimer() + (int)$config->getRequestParameter('offset');\n }\n }", "public function exportCsvAction()\n {\n $fileName = 'aircraft.csv';\n $content = $this->getLayout()->createBlock('bs_misc/adminhtml_aircraft_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function exportcsvAction()\n {\n $path = APPLICATION_PATH . '/../data/downloads/' . 'zugeordnete_inserate.zip';\n $this->download($path, null, 'application/zip');\n \n $this->view->message = \"Export erfolgreich.\";\n }", "public function exportCsvAction()\n {\n $fileName = 'equipment.csv';\n $content = $this->getLayout()->createBlock('bs_logistics/adminhtml_equipment_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function exportCsvAction() {\n $fileName = 'supportticket.csv';\n $grid = $this->getLayout()->createBlock('supportticket/adminhtml_supportticket_grid');\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n }", "public function render_section_csv($sectiontitle, $report, $head, $rows, $fields) {\n $name = clean_param($sectiontitle, PARAM_FILE);\n $name = preg_replace(\"/[^A-Z0-9]+/i\", \"_\", trim($name));\n $quote = '\"';\n $delim = \",\";//\"\\t\";\n $newline = \"\\r\\n\";\n\n header(\"Content-Disposition: attachment; filename=$name.csv\");\n header(\"Content-Type: text/comma-separated-values\");\n\n //echo header\n $heading = \"\";\n foreach ($head as $headfield) {\n $heading .= $quote . $headfield . $quote . $delim;\n }\n echo $heading . $newline;\n\n //echo data rows\n foreach ($rows as $row) {\n $datarow = \"\";\n foreach ($fields as $field) {\n $datarow .= $quote . $row->{$field} . $quote . $delim;\n }\n echo $datarow . $newline;\n }\n exit();\n }", "static public function ctrGenerarUrlCSV($url){\n\t\t\t\t\t\n\t\tInfectadosModel::generarCSV($url);\t\t\t\t\n\t\t\n\t}", "public function listarResultadoCsvAction(Request $request) {\n\n $logger = $this->get('logger');\n $em = $this->getDoctrine()->getManager();\n $locale = $request->getLocale();\n\n $data = $request->request->all();\n if (!empty($data)) {\n $inicio = $data['inicio'];\n $fim = $data['fim'];\n $idLocal = $data['idLocal'];\n } else {\n $inicio = null;\n $fim = null;\n $idLocal = null;\n }\n\n $computadores = $em->getRepository(\"CacicCommonBundle:Computador\")->listar($idLocal, $inicio, $fim);\n\n $TotalnumComp = 0;\n\n foreach ($computadores as $cont ){\n $TotalnumComp += $cont['numComp'];\n }\n\n // Gera CSV\n $reader = new ArrayReader($computadores);\n\n // Create the workflow from the reader\n $workflow = new Workflow($reader);\n\n $workflow->addValueConverter(\"reader\",new CharsetValueConverter('UTF-8',$reader));\n\n // Add the writer to the workflow\n $tmpfile = tempnam(sys_get_temp_dir(), 'Computadores-Subredes');\n $file = new \\SplFileObject($tmpfile, 'w');\n $writer = new CsvWriter($file);\n $writer->writeItem(array('idRede', 'Subrede', 'IP da Subrede', 'Local', 'Sigla do Local', 'Total de Estações'));\n $workflow->addWriter($writer);\n\n // Process the workflow\n $workflow->process();\n\n // Retorna o arquivo\n $response = new BinaryFileResponse($tmpfile);\n $response->headers->set('Content-Type', 'text/csv');\n $response->headers->set('Content-Disposition', 'attachment; filename=\"Computadores-Subredes.csv\"');\n $response->headers->set('Content-Transfer-Encoding', 'binary');\n\n return $response;\n\n }", "function cargar_participantes($params, $request){\n if(!$this->AppUser->isRoot())\n return $this->vista->acceso_restringido();\n \n $file = $request->getFile('participante');\n \n if($file['type'] == 'text/csv'){\n AppLoader::load_model('Extra/SubeEstudiantesFactory');\n $csv = CSV::load($file['tmp_name'],';');\n $loader = SubeEstudiantesFactory::create($request->getParam('tipo','participantes'),$csv);\n $loader->subir();\n }else{\n echo 'El archivo debe ser un CSV';\n }\n }", "public static function toString(): string\n {\n return self::$csv;\n }", "public function printCSV($seperator = ';'){\n\t\t$this->seperator = $seperator;\n\t\t$string = $this->printCsvRow($this->csv['header']);\n\t\tforeach($this->csv['body'] as $row) {\n\t\t\t$string .= $this->printCsvRow($row);\n\t\t}\n\t\treturn $string;\n\t}", "public function exportInvoicedCsvAction()\n {\n $fileName = 'invoiced.csv';\n $grid = $this->getLayout()->createBlock('adminhtml/report_sales_invoiced_grid');\n $this->_initReportAction($grid);\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n }", "public function saleListCsv()\n {\n return Excel::download(new allInvoiceExport(), 'invoice_lists_'. time() .'.csv');\n }", "public function exportCsvAction()\n {\n $fileName = 'kstitem.csv';\n $content = $this->getLayout()->createBlock('bs_kst/adminhtml_kstitem_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "function &_getColumnsOfCSV(){\r\n \r\n $journal =& Request::getJournal();\r\n \r\n\t\t// Implement the columns of the CSV \r\n\t\t$columns = array();\r\n\t\t\r\n // General\r\n\t\tif (Request::getUserVar('checkProposalId')){\r\n\t\t\t$columns = $columns + array('proposalId' => Locale::translate(\"common.proposalId\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDecisions')){\r\n\t\t\t$columns = $columns + array('committee' => Locale::translate(\"editor.article.committee\"));\r\n\t\t\t$columns = $columns + array('decisionType' => Locale::translate(\"editor.reports.decisionType\"));\r\n\t\t\t$columns = $columns + array('decisionStatus' => Locale::translate(\"editor.reports.decisionStatus\"));\r\n\t\t\t$columns = $columns + array('decisionDate' => Locale::translate(\"editor.reports.decisionDate\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDateSubmitted')){\r\n\t\t\t$columns = $columns + array('submitDate' => Locale::translate(\"editor.reports.submitDate\"));\r\n\t\t}\r\n \r\n // Investigator(s)\r\n\t\tif (Request::getUserVar('checkName')){\r\n\t\t\t$columns = $columns + array('investigator' => Locale::translate(\"editor.reports.author\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkAffiliation')){\r\n\t\t\t$columns = $columns + array('investigatorAffiliation' => Locale::translate(\"editor.reports.authorAffiliation\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkEmail')){\r\n\t\t\t$columns = $columns + array('investigatorEmail' => Locale::translate(\"editor.reports.authorEmail\"));\r\n\t\t}\r\n \r\n // Titles and Abstract\r\n\t\tif (Request::getUserVar('checkScientificTitle')){\r\n\t\t\t$columns = $columns + array('scientificTitle' => Locale::translate(\"editor.reports.scientificTitle\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkPublicTitle')){\r\n\t\t\t$columns = $columns + array('publicTitle' => Locale::translate(\"editor.reports.publicTitle\"));\r\n\t\t}\r\n if (Request::getUserVar('checkBackground')){\r\n\t\t\t$columns = $columns + array('background' => Locale::translate(\"proposal.background\"));\r\n\t\t}\r\n if (Request::getUserVar('checkObjectives')){\r\n\t\t\t$columns = $columns + array('objectives' => Locale::translate(\"proposal.objectives\"));\r\n\t\t}\r\n if (Request::getUserVar('checkStudyMethods')){\r\n\t\t\t$columns = $columns + array('studyMethods' => Locale::translate(\"proposal.studyMethods\"));\r\n\t\t}\r\n if (Request::getUserVar('checkExpectedOutcomes')){\r\n\t\t\t$columns = $columns + array('expectedOutcomes' => Locale::translate(\"proposal.expectedOutcomes\"));\r\n\t\t}\r\n \r\n // Proposal Details\r\n\t\tif (Request::getUserVar('checkStudentResearch')){\r\n\t\t\t$columns = $columns + array('studentInstitution' => Locale::translate(\"editor.reports.studentInstitution\"));\r\n\t\t\t$columns = $columns + array('studentAcademicDegree' => Locale::translate(\"editor.reports.studentAcademicDegree\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkResearchDates')){\r\n\t\t\t$columns = $columns + array('startDate' => Locale::translate(\"proposal.startDate\"));\r\n\t\t\t$columns = $columns + array('endDate' => Locale::translate(\"proposal.endDate\"));\r\n } \r\n\t\tif (Request::getUserVar('checkKii')){\r\n\t\t\t$columns = $columns + array('kii' => Locale::translate(\"proposal.keyImplInstitution\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkMultiCountry')){\r\n\t\t\t$columns = $columns + array('countries' => Locale::translate(\"proposal.multiCountryResearch\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('nationwide')){\r\n\t\t\t$columns = $columns + array('nationwide' => Locale::translate(\"proposal.nationwide\"));\r\n\t\t} \r\n\t\tif (Request::getUserVar('checkResearchDomain')){\r\n\t\t\t$columns = $columns + array('researchDomain' => Locale::translate(\"proposal.researchDomains\"));\r\n\t\t}\r\n if (Request::getUserVar('checkResearchField')){\r\n\t\t\t$columns = $columns + array('researchField' => Locale::translate(\"proposal.researchField\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkProposalType')){\r\n\t\t\t$columns = $columns + array('proposalType' => Locale::translate(\"editor.reports.proposalType\"));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDataCollection')){\r\n\t\t\t$columns = $columns + array('dataCollection' => Locale::translate(\"editor.reports.dataCollection\"));\r\n\t\t}\r\n \r\n // Sources of Monetary and Material Support\r\n\t\tif (Request::getUserVar('checkTotalBudget')){\r\n\t\t\t$columns = $columns + array('totalBudget' => Locale::translate(\"proposal.fundsRequired\").' ('.$journal->getSetting('sourceCurrency').')');\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkSources')){\r\n\t\t\t$columns = $columns + array('sourceInstitution' => Locale::translate(\"editor.reports.spreadsheet.sourceInstitution\"));\r\n\t\t\t$columns = $columns + array('sourceAmount' => Locale::translate(\"editor.reports.spreadsheet.sourceAmount\").' ('.$journal->getSetting('sourceCurrency').')'); \r\n\t\t}\r\n \r\n // Risk Assessment\r\n\t\tif (Request::getUserVar('checkIdentityRevealed')){\r\n\t\t\t$columns = $columns + array('identityRevealed' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.identityRevealedAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkUnableToConsent')){\r\n\t\t\t$columns = $columns + array('unableToConsent' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.unableToConsentAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkUnder18')){\r\n\t\t\t$columns = $columns + array('under18' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.under18Abb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDependentRelationship')){\r\n\t\t\t$columns = $columns + array('dependentRelationship' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.dependentRelationshipAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkEthnicMinority')){\r\n\t\t\t$columns = $columns + array('ethnicMinority' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.ethnicMinorityAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkImpairment')){\r\n\t\t\t$columns = $columns + array('impairment' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.impairmentAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkPregnant')){\r\n\t\t\t$columns = $columns + array('pregnant' => Locale::translate(\"editor.reports.riskAssessment.subjects\").' - '.Locale::translate('proposal.pregnantAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkNewTreatment')){\r\n\t\t\t$columns = $columns + array('newTreatment' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.newTreatmentAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkBioSamples')){\r\n\t\t\t$columns = $columns + array('bioSamples' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.bioSamplesAbb'));\r\n\t\t\t$columns = $columns + array('exportHumanTissue' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.exportHumanTissueAbb'));\r\n\t\t\t$columns = $columns + array('exportReason' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.exportReason')); \r\n }\r\n\t\tif (Request::getUserVar('checkRadiation')){\r\n\t\t\t$columns = $columns + array('radiation' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.radiationAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkDistress')){\r\n\t\t\t$columns = $columns + array('distress' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.distressAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkInducements')){\r\n\t\t\t$columns = $columns + array('inducements' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.inducementsAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkSensitiveInfo')){\r\n\t\t\t$columns = $columns + array('sensitiveInfo' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.sensitiveInfoAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkReproTechnology')){\r\n\t\t\t$columns = $columns + array('reproTechnology' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.reproTechnologyAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkGenetic')){\r\n\t\t\t$columns = $columns + array('genetic' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.geneticsAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkStemCell')){\r\n\t\t\t$columns = $columns + array('stemCell' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.stemCellAbb'));\r\n\t\t}\r\n\t\tif (Request::getUserVar('checkBiosafety')){\r\n\t\t\t$columns = $columns + array('biosafety' => Locale::translate(\"editor.reports.riskAssessment.researchIncludes\").' - '.Locale::translate('proposal.biosafetyAbb'));\r\n\t\t}\r\n \r\n return $columns;\r\n \r\n }", "public function getCandidats();", "public function csv_export() {\n\t\t\t// Strip edit inline extra html\n\t\t\tremove_filter( 'map_meta_cap', 'wct_map_meta_caps', 10, 4 );\n\t\t\tadd_filter( 'user_has_cap', array( $this, 'filter_has_cap' ), 10, 1 );\n\n\t\t\t// Get all talks\n\t\t\tadd_action( 'wct_admin_request', array( $this, 'get_talks_by_status' ), 10, 1 );\n\n\t\t\t$html_list_table = _get_list_table( 'WP_Posts_List_Table' );\n\t\t\t$html_list_table->prepare_items();\n\t\t\tob_start();\n\t\t\t?>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<?php $html_list_table->print_column_headers(); ?>\n\t\t\t\t</tr>\n\t\t\t\t\t<?php $html_list_table->display_rows_or_placeholder(); ?>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<?php\n\t\t\t$output = ob_get_clean();\n\n\t\t\t// Keep only table tags\n\t\t\t$allowed_html = array(\n\t\t\t\t'table' => array(),\n\t\t\t\t'tbody' => array(),\n\t\t\t\t'td' => array(),\n\t\t\t\t'th' => array(),\n\t\t\t\t'tr' => array()\n\t\t\t);\n\n\t\t\t$output = wp_kses( $output, $allowed_html );\n\n\t\t\t$comma = ',';\n\n\t\t\t// If some users are still using Microsoft ;)\n\t\t\tif ( preg_match( \"/Windows/i\", $_SERVER['HTTP_USER_AGENT'] ) ) {\n\t\t\t\t$comma = ';';\n\t\t\t\t$output = utf8_decode( $output );\n\t\t\t}\n\n\t\t\t// $output to csv\n\t\t\t$csv = array();\n\t\t\tpreg_match( '/<table(>| [^>]*>)(.*?)<\\/table( |>)/is', $output, $b );\n\t\t\t$table = $b[2];\n\t\t\tpreg_match_all( '/<tr(>| [^>]*>)(.*?)<\\/tr( |>)/is', $table, $b );\n\t\t\t$rows = $b[2];\n\t\t\tforeach ( $rows as $row ) {\n\t\t\t\t//cycle through each row\n\t\t\t\tif ( preg_match( '/<th(>| [^>]*>)(.*?)<\\/th( |>)/is', $row ) ) {\n\t\t\t\t\t//match for table headers\n\t\t\t\t\tpreg_match_all( '/<th(>| [^>]*>)(.*?)<\\/th( |>)/is', $row, $b );\n\t\t\t\t\t$csv[] = '\"' . implode( '\"' . $comma . '\"', array_map( 'wct_generate_csv_content', $b[2] ) ) . '\"';\n\t\t\t\t} else if ( preg_match( '/<td(>| [^>]*>)(.*?)<\\/td( |>)/is', $row ) ) {\n\t\t\t\t\t//match for table cells\n\t\t\t\t\tpreg_match_all( '/<td(>| [^>]*>)(.*?)<\\/td( |>)/is', $row, $b );\n\t\t\t\t\t$csv[] = '\"' . implode( '\"' . $comma . '\"', array_map( 'wct_generate_csv_content', $b[2] ) ) . '\"';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$file = implode( \"\\n\", $csv );\n\n\t\t\tstatus_header( 200 );\n\t\t\theader( 'Cache-Control: cache, must-revalidate' );\n\t\t\theader( 'Pragma: public' );\n\t\t\theader( 'Content-Description: File Transfer' );\n\t\t\theader( 'Content-Disposition: attachment; filename=' . sprintf( '%s-%s.csv', esc_attr_x( 'talks', 'prefix of the downloaded csv', 'wordcamp-talks' ), date('Y-m-d-his' ) ) );\n\t\t\theader( 'Content-Type: text/csv;' );\n\t\t\tprint( $file );\n\t\t\texit();\n\t\t}", "function DbCsv($res, $sep, $quotes, $outfile, $head) {\n\n\t// The CSV file is created and opened\n\t$csvfile = fopen($outfile, \"w\");\n\n\t// Add column header, if desired\n\tif($head){\n\t\t$csv = \"\";\n\t\tfor ($i = 0; $i < DbNumFields($res); ++$i) {\n\t\t\tif($quotes == \"on\") $csv .= \"\\\"\";\n\t\t\t$csv .= DbFieldName($res, $i);\n\t\t\techo \"$csv \";\n\t\t\tif($quotes == \"on\") $csv .= \"\\\"\";\n\t\t\t$csv .= $sep;\n\t\t}\n\t\t// The last separator of a line is always cut off\n\t\t$csv = trim($csv, $sep);\n\n\t\t// For each row a single line of the file is used\n\t\t$csv .= \"\\n\";\n\n\t\t// After having prepared the CSV row, it is written to the file\n\t\tfwrite($csvfile, $csv);\n\t}\n\n\t// The rows of the given result are processed one after the other\n\twhile($row = DbFetchArray($res)) {\n\t\t$csv = \"\";\n\t\t// Each element is added to the string individually\n\t\tforeach($row as $id => $field) {\n\t\t\tif(preg_match($ipmatch,$id) ){$field = long2ip($field);}\n\t\t\tif(preg_match($timatch,$id) ){$field = date($_SESSION['timf'],$field);}\n\t\t\t// If quotes are wished, they are put around the element\n\t\t\tif($quotes == \"on\") $csv .= \"\\\"\";\n\t\t\t$csv .= $field;\n\t\t\tif($quotes == \"on\") $csv .= \"\\\"\";\n\t\t\t$csv .= $sep;\n\t\t}\n\t\t// The last separator of a line is always cut off\n\t\t$csv = trim($csv, $sep);\n\n\t\t// For each row a single line of the file is used\n\t\t$csv .= \"\\r\\n\";\n\n\t\t// After having prepared the CSV row, it is written to the file\n\t\tfwrite($csvfile, $csv);\n\t}\n\n\t// When finished, the CSV file is closed\n\tfclose($csvfile);\n}", "function GetCSV(Vtiger_Request $request) {\n\t\t$recordId = $request->get('record');\n\t\t$reportModel = Reports_Record_Model::getInstanceById($recordId);\n $reportModel->set('advancedFilter', $request->get('advanced_filter'));\n\t\t$reportModel->getReportCSV($request->get('source'));\n\t}", "public function exportCsvAction()\n {\n $fileName = 'handovertwo.csv';\n $content = $this->getLayout()->createBlock('bs_handover/adminhtml_handovertwo_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function exportRefundedCsvAction()\n {\n $fileName = 'refunded.csv';\n $grid = $this->getLayout()->createBlock('adminhtml/report_sales_refunded_grid');\n $this->_initReportAction($grid);\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n }", "function commcsv_tool() {\n\tadd_submenu_page('edit-comments.php', 'Export Commenters data into CSV', 'Export commenters&#39; contacts', 'manage_options', 'commcsv_page', 'commcsv_page' );\n}", "function getTrCommune($row) {\n \n $str_commune = '';\n if($row['zone_geograpique'] == \"etendue\") {\n /*$commune = unserialize($row['commune']);\n for($i=0; $i<count($commune); $i++) {\n if($str_commune != '') { $str_commune .= \", \"; }\n $str_commune .= $commune[$i];\n }*/\n $str_commune = $row['commune'] ;\n }else {\n $str_commune = \"Territoire de compétence complet\";\n }\n //return \"<tr><td valign='top' class='pmeTdDetailExtract'>Communes</td><td valign='top'>:</td><td class='pmeTdDetailExtract'><textarea class='pmeTxtComm' READONLY>\".htmlentities(utf8_decode($str_commune), ENT_QUOTES).\"</textarea></td></tr>\";\n return \"<tr><td valign='top' class='pmeTdDetailExtract'>Communes</td><td valign='top'>:</td><td class='pmeTdDetailExtract'><textarea class='pmeTxtComm' READONLY>\".$str_commune.\"</textarea></td></tr>\";\n}", "public function exportCsvAction()\n {\n $fileName = 'appointments.csv';\n $grid = $this->getLayout()->createBlock('appointments/adminhtml_appointments_grid');\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n }", "function listExport($table, $attr)\n {\n if (in_array('categoria', $attr)) {\n $join_data = $this->f->leftJoin($table, \"categorias\", \"cod\", \"categoria\", \"titulo\");\n // Genero el atributo \"categorias.titulo\" con uan bandera de \"%\" que me servira mas abajo y lo cambio por el atrr categoria que me devolveria el cod.\n $replace = [array_search('categoria', $attr) => \"%\" . $join_data['show']];\n $attr = array_replace($attr, $replace);\n // guardo en un array el LEFT JOIN\n $join[] = $join_data['join'];\n }\n if (in_array('subcategoria', $attr)) {\n $join_data = $this->f->leftJoin($table, \"subcategorias\", \"cod\", \"subcategoria\", \"titulo\");\n $replace = [array_search('subcategoria', $attr) => \"%\" . $join_data['show']];\n $attr = array_replace($attr, $replace);\n $join[] = $join_data['join'];\n }\n\n // Genero en 1 string cada atributo que me va a traer con su respectiva tabla. Para no generar conflicto ambiguo en la base de datos\n\n $attr = implode(\" , \" . $table . \".\", $attr);\n if (!empty($join)) {\n $join = implode(\" \", $join);\n // Elimino la tabla principal con la bandera que puse antes de categoria y subcategoria, sino quedaria ej: \"productos.categorias.titulo\".\n $attr = str_replace(\"$table.%\", \"\", $attr);\n } else {\n $join = '';\n }\n\n $sql = \"SELECT $table.$attr FROM $table $join\";\n\n $var = $this->con->sqlReturn($sql);\n if ($var) {\n while ($row = mysqli_fetch_assoc($var)) {\n $array[] = [\"data\" => $row];\n }\n }\n return $array;\n }", "public static function downalodCSV() {\n /* Definisco un filename */\n $filename = sprintf( 'wpxSmartShop-Stats-%s.csv', date( 'Y-m-d H:i:s' ) );\n\n /* Contenuto */\n $buffer = get_transient( 'wpxss_stats_csv' );\n\n /* Header per download */\n header( 'Content-Type: application/download' );\n header( 'Content-Disposition: attachment; filename=\"' . $filename . '\"' );\n header( 'Cache-Control: public' );\n header( \"Content-Length: \" . strlen( $buffer ) );\n header( 'Pragma: no-cache' );\n header( 'Expires: 0' );\n\n echo $buffer;\n }", "function writeToCsv($friends) {\n\t\t$csv = array();\n\t\tforeach ($friends as $friend) {\n\t\t\t$csv[] = implode(',', array_values($friend));\n\t\t}\n\t\tfile_put_contents(CSV, implode(PHP_EOL, $csv));\n\t}", "public function getCsvData()\n\t{\n\t\t\treturn $this->db->SELECT('c.category_name,u.unit_name,t.tax_name,\n\t\t\t\t\t\t\t\ti.item_description,i.purchase_price,i.sales_price')\n\t\t\t\t\t\t\t->FROM('category c')\n\t\t\t\t\t\t\t->JOIN('item i','i.category_id=c.id')\n\t\t\t\t\t\t\t->JOIN('tax t','i.tax_id=t.id')\n\t\t\t\t\t\t\t->JOIN('unit u','i.unit_id=u.id')\n\t\t\t\t\t\t\t->get()\n\t\t\t\t\t\t\t->result();\t\t\t\n\n\t}", "function rabobank($row) {\n // https://bankieren.rabobank.nl/klanten/bedrijven/help/specificaties_elektronische_betaaldiensten/rabo_internetbankieren_professional/export/ --> 'CSV (kommagescheiden nieuw)'\n\n $fields['date'] = substr($row[2], 4, 2) . \"/\" . substr($row[2], 6, 2) . \"/\" . substr($row[2], 0, 4);\n $fields['amount'] = str_replace(\",\", \".\", $row[3] == \"C\" ? $row[4] : \"-\" . $row[4]);\n $fields['payee'] = $row[5] . \" \" . $row[6];\n $fields['payee'] = trim(preg_replace('/\\s\\s+/', ' ', $fields['payee']));\n $fields['category'] = \"\";\n\n return $fields;\n}", "public function createcsvAction()\n {\n $this->auth = Zend_Registry::get('auth');\n if ($this->auth->hasIdentity()) {\n if ('admin' == $this->auth->getIdentity()->username) {\n $stream = new Application_Model_Stream();\n $stream->createCSV();\n \n $this->configuration = Zend_Registry::get('configuration');\n $lockfile = realpath(APPLICATION_PATH . '/../temp/lock_csv_inserate');\n $locktime = mktime($this->configuration->general->csv_time, 0, 0);\n touch($lockfile, $locktime);\n \n $this->view->message = \"Erstellung erfolgreich.\";\n } else {\n $this->view->message = \"You have to be Admin to do that.\";\n }\n } else {\n $this->view->message = \"You have to be Admin to do that.\";\n }\n }", "function tableNormalized($country,$fp)\n{\nheader(\"Content-type: text/csv\");\nheader(\"Content-Disposition: attachment; filename=newtable.csv\");\nheader(\"Pragma: no-cache\");\nheader(\"Expires: 0\");\n$str='';\n# get csv data \nwhile($csv_line = fgetcsv($fp,1024))\n{\n \n#data of column where country given\n$variable=$csv_line[1];\n\n#variable convert country and remaining data before use for country and after for remaining data\n$before = columnDivide($variable,$country);\n$after = substr($variable,strlen($before)); \n$str.=\"$csv_line[0],$before,$after,$csv_line[2],$csv_line[3],$csv_line[4]\\n\";\n\n//echo $csv_line[0];\n//echo \" \";\n//echo $before.\" *** \".$after;\n//echo \" \".$csv_line[2] .\" \".$csv_line[3].\" \".$csv_line[4];\n//echo \"</br></br>\";\n \n}#- end of if condition if email in CSV is present in database\n echo $str; \n}", "function csv_export($extConf,$results,$q_data,$ff_data,$temp_file,$only_this_lang,$only_finished,$with_authcode,$feUserFields=array()){\r\n $this->extConf = $extConf;\r\n $this->results = $results;\r\n $this->q_data = $q_data;\r\n $this->ff_data = $ff_data;\r\n $this->temp_file = $temp_file;\r\n\t\t$this->only_this_lang = $only_this_lang;\r\n\t\t$this->only_finished = $only_finished;\r\n\t\t$this->with_authcode = $with_authcode;\r\n\t\t$this->feUserFields = $feUserFields;\r\n \r\n //t3lib_div::devLog('extConf', 'ke_questionnaire Export Mod', 0, $this->extConf);\r\n\t\t//t3lib_div::devLog('with_authcode', 'ke_questionnaire Export Mod', 0, array($this->with_authcode));\r\n }", "function get_report()\r\n{\r\n$fname = 'myCSV.csv';\r\n$fp = fopen($fname,'w');\r\n$column_name = '\"ID\",\"package_name\",\"package_add1\",\"package_add2\",\"package_state\",\"package_email\",\"package_city\",\"package_mobile\",\"package_gender\",\"package_dob\",\"package_nl_id\",\"package_image\"'.\"\\n\\r\";\r\nfwrite($fp,$column_name);\t\r\n\t\r\n$SQL=\"SELECT * FROM package,city WHERE package_city = city_id\";\r\n$rs=mysql_query($SQL);\r\nwhile($data=mysql_fetch_assoc($rs))\r\n{\r\n\t$csvdata=implode(\",\",$data).\"\\n\\r\";\r\n\tfwrite($fp,$csvdata);\t\t\r\n}\r\nfclose($fp);\r\nheader('Content-type: application/csv');\r\nheader(\"Content-Disposition: inline; filename=\".$fname);\r\nreadfile($fname);\r\n}", "public function get_CSV_Combat(){\n $handle = fopen(\"combatTable.csv\", \"r\");\n \n $first_row = true;\n $final_ata = array();\n $headers = array();\n \n while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) \n\t\t\t{ \n if($first_row) \n\t\t\t\t{\n $headers = $data;\n $first_row = false;\n } else \n\t\t\t\t{\n $final_ata[] = array_combine($headers, array_values($data));\n }\n } \n $result_arr = array(); \n foreach($final_ata as $key => $value){\n $name = $final_ata[$key]['CT_Variable'];\n $result_arr[$name] = $value;\n }\n return($result_arr);\n \n }", "public function cob_contratosAction($id_periodo, $tipo)\n\t{\n\t\t$cob_periodo = CobPeriodo::findFirstByid_periodo($id_periodo);\n\t\tif (!$cob_periodo) {\n\t\t\t$this->flash->error(\"El periodo no fue encontrado\");\n\t\t\treturn $this->response->redirect(\"cob_periodo/\");\n\t\t}\n\t\t$this->assets\n\t\t->addJs('js/jquery.table2excel.min.js')\n\t\t->addJs('js/reporte_exportar.js');\n\n\t\tif ($id_periodo >= 43) {\n\t\t\t$reporte_contratos = CobActaconteoPersonaFacturacion::find(array(\"id_periodo = $id_periodo and id_contrato != 4600068492 and id_contrato != 4600068493 and id_contrato != 4600068494 and id_contrato != 4600068495 and \\n\".\n\t\t\t\"id_contrato != 4600068496 and id_contrato != 4600068497 and id_contrato != 4600068498 and id_contrato != 4600068499 and id_contrato != 4600068500 and id_contrato != 4600068501 and id_contrato != 4600068502 and id_contrato != 4600068503 and id_contrato != 4600068504 and id_contrato != 4600068505 and \\n\".\n\t\t\t\"id_contrato != 4600068506 and id_contrato != 4600068507 and id_contrato != 4600068508 and id_contrato != 4600068509 and id_contrato != 4600068510 and id_contrato != 4600068511 and \\n\".\n\t\t\t\"id_contrato != 4600068512 and id_contrato != 4600068513 and id_contrato != 4600068514 and id_contrato != 4600068515 and id_contrato != 4600068516 and id_contrato != 4600068517 and id_contrato != 4600068518 and id_contrato != 4600068519 and id_contrato != 4600068520 and id_contrato != 4600068521 and id_contrato != 4600068522 and id_contrato != 4600068523 and \\n\".\n\t\t\t\"id_contrato != 4600068524 and id_contrato != 4600068525 and id_contrato != 4600068526 and id_contrato != 4600068527 and id_contrato != 4600068528 and id_contrato != 4600068529 and id_contrato != 4600068530 and id_contrato != 4600068531 and id_contrato != 4600068532 and id_contrato != 4600068533 and id_contrato != 4600068534 and id_contrato != 4600068535 and \\n\".\n\t\t\t\"id_contrato != 4600068536 and id_contrato != 4600068537 and id_contrato != 4600068555 \\n\", \"group\" => \"id_contrato\"));\n\t\t}else {\n\t\t\t$reporte_contratos = CobActaconteoPersonaFacturacion::find(array(\"id_periodo = $id_periodo\", \"group\" => \"id_contrato\"));\n\t\t}\n\t\t$this->view->contratos = $reporte_contratos;\n\t\t//$this->view->nombre_reporte = \"Rpt_\" . $cob_periodo->getPeriodoReporte . \"_contratos_\" . date(\"YmdHis\") . \".xlsx\";\n\t\tif($tipo == 1){\n\t\t\t$this->view->setTemplateAfter('../bc_reporte/cob_contratos_general');\n\t\t} else if($tipo == 3) {\n\t\t\t$this->view->setTemplateAfter('../bc_reporte/cob_contratos_comunitario');\n\t\t} else if($tipo == 4) {\n\t\t\t$this->view->setTemplateAfter('../bc_reporte/cob_contratos_itinerante');\n\t\t} else if($tipo == 5) {\n\t\t\t$this->view->setTemplateAfter('../bc_reporte/cob_contratos_jardines');\n\t\t}elseif ($tipo == 2) {\n\t\t\t$this->view->setTemplateAfter('../bc_reporte/cob_contratos_familiar');\n\t\t}\n\n\t}", "public function exportCsvAction()\n {\n $fileName = 'giftcertificates.csv';\n $content = $this->getLayout()->createBlock('ugiftcert/adminhtml_cert_grid')\n ->getCsv();\n\n $this->_prepareDownloadResponse($fileName, $content);\n }", "protected function initCSV() {}", "public function exportCsvAction()\r\n {\r\n $fileName = 'customer_store_credit_balances.csv';\r\n $content = $this->getLayout()->createBlock('wf_customerbalance/adminhtml_balances_grid')\r\n ->getCsvFile();\r\n\r\n $this->_prepareDownloadResponse($fileName, $content);\r\n }", "public function downloadCsv()\n\t{\n\t\tob_end_clean();\n\n\t\t$csv = new TrooCsv;\n\t\t// $csv = $this->generateCsv();\n\n\t\theader(\"Content-type: application/x-msdownload\");\n header(\"Content-Disposition: attachment; filename=data.csv\");\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n\n\t\techo $csv->generateTrooOrders();\n\t\texit();\n\t}", "public function exportTaxCsvAction()\n {\n $fileName = 'tax.csv';\n $grid = $this->getLayout()->createBlock('adminhtml/report_sales_tax_grid');\n $this->_initReportAction($grid);\n $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n }", "public function generate_csv() {\n $csv_output = '';\n $table = 'wp_dux_car_data';\n\n $result = mysql_query(\"SHOW COLUMNS FROM \" . $table . \"\");\n\n $i = 0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n $csv_output = $csv_output . $row['products'] . \",\";\n $i++;\n }\n }\n $csv_output .= \"\\n\";\n\n $values = mysql_query(\"SELECT * FROM \" . $table . \"\");\n while ($rowr = mysql_fetch_row($values)) {\n for ($j = 0; $j < $i; $j++) {\n $csv_output .= $rowr[$j] . \",\";\n }\n $csv_output .= \"\\n\";\n }\n\n return $csv_output;\n }", "public function exporttCourseAttendenceToCSV()\n {\n $courses = Course::all();\n $file_name = 'courses.csv';\n $header = \"\\\"Course\\\",\\\"University\\\"\\r\\n\";\n File::put($file_name, $header);\n foreach( $courses as $course){\n $course_name = $course->course_name;\n $university = $course->university;\n $string = \"\\\"$course_name\\\",\\\"$university\\\"\\r\\n\";\n File::append($file_name, $string);\n }\n $file = public_path(). \"/$file_name\";\n $download_name = date('Y_m_d H-i-s').$file_name;\n return response()->download($file, $download_name);\n }", "public function export() {\n\t\t$options['conditions'] = $this->_buildQueryString();\n\t\t$options['fields'] = [\n\t\t\t'Business.id',\n\t\t\t'Business.firm',\n\t\t\t'Business.business',\n\t\t\t'Business.phone_one',\n\t\t\t'Business.phone_two',\n\t\t\t'State.name',\n\t\t\t'City.name',\n\t\t\t'Business.address',\n\t\t\t'Taxoffice.name',\n\t\t\t'Business.afm',\n\t\t];\n\t\t$this->Business->recursive = 0;\n\t\t$data = $this->Business->find('all', $options);\n\t\t$this->Csv->export($data);\n\t}", "function getCSVQBased(){\r\n\t\tglobal $LANG;\r\n\r\n\t\t$csvdata = '';\r\n\t\t$csvheader = '';\r\n\t\t//defines the cell of the csv\r\n\t\t$delimeter = $this->extConf['CSV_qualifier'];\r\n\t\t//parts the cells of the csv\r\n\t\t$pure_parter = $this->extConf['CSV_parter'];\r\n\t\t//to be put between two values/cells\r\n\t\t$parter = $delimeter.$this->extConf['CSV_parter'].$delimeter;\r\n\t\t\r\n\t\t//get the Header of the CSV-File\r\n\t\t$csvheader = $this->getQBaseHeaderLine();\r\n\t\t\r\n\t\t$lineset = ''; //stores the CSV-data\r\n\t\t$line = array(); //single line, will be imploded\r\n\t\t$free_cells = 0;\r\n\t\t//gets the line with the column definition: result-ids\r\n\t\t$result_line = $this->getQBaseResultLine($free_cells);\r\n\t\t//add the result line to the csv-data\r\n\t\t$lineset .= $pure_parter.$pure_parter.$pure_parter.$result_line.\"\\n\";\r\n\t\t//get the temp-file the data is stored in\r\n\t\t$file_path = PATH_site.'/typo3temp/'.$this->temp_file;\r\n\t\t$store_file = fopen($file_path,'r');\r\n\t\t\r\n\t\t//definition array for the export\r\n\t\t$fill_array = $this->createFillArray();\r\n\t\tforeach ($fill_array as $q_nr => $question){\r\n\t\t\t//read the data from the file\r\n\t\t\t$read_line = fgets($store_file);\r\n\t\t\t$read_line = str_replace(\"\\n\",'',$read_line);\r\n\t\t\t$read_line = json_decode($read_line,true);\r\n\t\t\t$question['data'] = array();\r\n\t\t\t$question['data'] = $read_line;\r\n\t\t\t//t3lib_div::devLog('readline '.$question['type'], 'ke_questionnaire Export Mod', 0, array($read_line));\r\n\t\t\t//create the line\r\n\t\t\t$line = array();\r\n\t\t\t//question id\r\n\t\t\t$line[] = $question['uid'];\r\n\t\t\t//title\r\n\t\t\t$line[] = $this->stripString($question['title']);\r\n\t\t\tif ($question['type']){\r\n\t\t\t\t$lineset .= $delimeter.implode($parter,$line).$delimeter;\r\n\t\t\t\t//$lineset .= $pure_parter.$result_line.\"\\n\";\r\n\t\t\t\t$lineset .= $pure_parter;\r\n\t\t\t\t//t3lib_div::devLog('getCSVQBase '.$question['type'], 'ke_questionnaire Export Mod', 0, $question);\r\n\t\t\t\t//t3lib_div::devLog('lineset '.$question['type'], 'ke_questionnaire Export Mod', 0, array($lineset));\r\n\t\t\t\tswitch ($question['type']){\r\n\t\t\t\t\tcase 'authcode':\t$lineset .= $this->getQBaseLine($free_cells,$question);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'fe_user':\t\t$lineset .= $this->getQBaseLine($free_cells,$question);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'start_tstamp':\t$lineset .= $this->getQBaseLine($free_cells,$question);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'finished_tstamp':\t$lineset .= $this->getQBaseLine($free_cells,$question);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'open':\t$lineset .= $this->getQBaseLine($free_cells,$question);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'dd_pictures':\r\n\t\t\t\t\tcase 'closed':\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('question '.$question['type'], 'ke_questionnaire Export Mod', 0, $question);\r\n\t\t\t\t\t\t\t$lineset .= \"\\n\";\r\n\t\t\t\t\t\t\t$where = 'question_uid='.$question['uid'].' and hidden=0 and deleted=0';\r\n\t\t\t\t\t\t\t$res_answers = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','tx_kequestionnaire_answers',$where,'','sorting');\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getCSVQBase '.$question['type'], 'ke_questionnaire Export Mod', 0, array($GLOBALS['TYPO3_DB']->SELECTquery('*','tx_kequestionnaire_answers',$where,'','sorting')));\r\n\t\t\t\t\t\t\tif ($res_answers){\r\n\t\t\t\t\t\t\t\twhile ($answer = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_answers)){\r\n\t\t\t\t\t\t\t\t\t$lineset .= $this->getQBaseLine($free_cells+2,$question,$answer);\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\tbreak;\r\n\t\t\t\t\tcase 'matrix':\r\n\t\t\t\t\t\t\t$lineset .= \"\\n\";\r\n\t\t\t\t\t\t\t$columns = array();\r\n\t\t\t\t\t\t\t$where = 'question_uid='.$question['uid'].' and hidden=0 and deleted=0';\r\n\t\t\t\t\t\t\t$res_columns = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','tx_kequestionnaire_columns',$where,'','sorting');\r\n\t\t\t\t\t\t\tif ($res_columns){\r\n\t\t\t\t\t\t\t\twhile ($column = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_columns)){\r\n\t\t\t\t\t\t\t\t\t$columns[] = $column;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$res_subquestions = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','tx_kequestionnaire_subquestions',$where,'','sorting');\r\n\t\t\t\t\t\t\tif ($res_subquestions){\r\n\t\t\t\t\t\t\t\twhile ($subquestion = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_subquestions)){\r\n\t\t\t\t\t\t\t\t\tif ($subquestion['title_line'] == 1){\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t$line = array();\r\n\t\t\t\t\t\t\t\t\t\tfor ($i = 0;$i < ($free_cells+1);$i ++){\r\n\t\t\t\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$line[] = $subquestion['title'];\r\n\t\t\t\t\t\t\t\t\t\t$lineset .= $delimeter.implode($parter,$line).$delimeter.\"\\n\";\r\n\t\t\t\t\t\t\t\t\t\tforeach ($columns as $column){\r\n\t\t\t\t\t\t\t\t\t\t\t$lineset .= $this->getQBaseLine($free_cells+2,$question,array(),$subquestion['uid'],$column);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'semantic':\r\n\t\t\t\t\t\t\t$lineset .= \"\\n\";\r\n\t\t\t\t\t\t\t$columns = array();\r\n\t\t\t\t\t\t\t$where = 'question_uid='.$question['uid'].' and hidden=0 and deleted=0';\r\n\t\t\t\t\t\t\t$res_columns = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','tx_kequestionnaire_columns',$where,'','sorting');\r\n\t\t\t\t\t\t\tif ($res_columns){\r\n\t\t\t\t\t\t\t\twhile ($column = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_columns)){\r\n\t\t\t\t\t\t\t\t\t$columns[] = $column;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$res_sublines = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','tx_kequestionnaire_sublines',$where,'','sorting');\r\n\t\t\t\t\t\t\tif ($res_sublines){\r\n\t\t\t\t\t\t\t\twhile ($subline = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_sublines)){\r\n\t\t\t\t\t\t\t\t\t$line = array();\r\n\t\t\t\t\t\t\t\t\tfor ($i = 0;$i < ($free_cells+2);$i ++){\r\n\t\t\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t$line[] = $subline['start'].' - '.$subline['end'];\r\n\t\t\t\t\t\t\t\t\t$lineset .= $delimeter.implode($parter,$line).$delimeter.\"\\n\";\r\n\t\t\t\t\t\t\t\t\tforeach ($columns as $column){\r\n\t\t\t\t\t\t\t\t\t\t$lineset .= $this->getQBaseLine($free_cells+2,$question,array(),$subline['uid'],$column);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'demographic':\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('lineset '.$question['type'], 'ke_questionnaire Export Mod', 0, $question);\r\n\t\t\t\t\t\t\t$lineadd = \"\\n\";\r\n\t\t\t\t\t\t\tif (is_array($question['fe_users'])){\r\n\t\t\t\t\t\t\t\tif (count($question['fe_users']) > 0){\r\n\t\t\t\t\t\t\t\t\t//$lineadd .= \"\\n\";\r\n\t\t\t\t\t\t\t\t\tforeach ($question['fe_users'] as $field => $f_values){\r\n\t\t\t\t\t\t\t\t\t\t$lineadd .= $this->getQBaseLine($free_cells+2,$question,array(),0,array(),$field);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//if ($lineadd == '') $lineadd .= \"\\n\";\r\n\t\t\t\t\t\t\t$lineset .= $lineadd;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t$delimeter = $this->extConf['CSV_qualifier'];\r\n\t\t\t\t\t\t\t$parter = $delimeter.$this->extConf['CSV_parter'].$delimeter;\r\n\t\t\t\t\t\t\t// Hook to make other types available for export\r\n\t\t\t\t\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_questionnaire']['CSVExportQBaseLine'])){\r\n\t\t\t\t\t\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_questionnaire']['CSVExportQBaseLine'] as $_classRef){\r\n\t\t\t\t\t\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\r\n\t\t\t\t\t\t\t\t\t$getit = $_procObj->CSVExportQBaseLine($free_cells,$question,$this->results,$delimeter,$parter);\r\n\t\t\t\t\t\t\t\t\t//t3lib_div::devLog('getCSVQBase getit', 'ke_questionnaire Export Mod', 0, array($getit));\r\n\t\t\t\t\t\t\t\t\tif ($getit != '') $lineset .= $getit;\r\n\t\t\t\t\t\t\t\t\telse $lineset .= \"\\n\";\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\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfclose($store_file);\r\n\t\t//linebreak at the end of the line\r\n\t\t$csvdata .= $lineset.\"\\n\";\r\n\r\n\t\treturn $csvheader.$csvdata;\r\n\t}", "public function exportCsvAction()\n {\n $fileName = 'reviews_orders.csv';\n $content = $this->getLayout()->createBlock('salesreport/adminhtml_reviews_grid')->getCsv();\n $this->_sendUploadResponse($fileName, $content);\n }", "public function actionExportToCsv()\n {\n if ($this->models) {\n $this->models = HArray::explode(',', $this->models);\n }\n HBackup::exportDbToCsv($this->csvFile, $this->models);\n }" ]
[ "0.64636564", "0.63454026", "0.63147473", "0.6021691", "0.5944933", "0.58485246", "0.58400196", "0.58265847", "0.5792605", "0.5786624", "0.57733864", "0.5747248", "0.56274015", "0.56187344", "0.5617757", "0.56090397", "0.5606433", "0.5584358", "0.55642235", "0.55623823", "0.5547279", "0.5541743", "0.5526344", "0.5513535", "0.5510716", "0.5506113", "0.5484473", "0.547874", "0.54663634", "0.5459806", "0.54589295", "0.54464275", "0.5430386", "0.5426038", "0.54219174", "0.5419692", "0.5419469", "0.5413409", "0.54048103", "0.5402249", "0.53930503", "0.53877234", "0.53667134", "0.53654915", "0.5358244", "0.53476", "0.53353953", "0.5329748", "0.53292954", "0.5328794", "0.5327975", "0.53132856", "0.53088766", "0.5306274", "0.52983004", "0.52971995", "0.5295926", "0.5294396", "0.5280743", "0.52807343", "0.5278741", "0.5277712", "0.52655005", "0.5265105", "0.5254818", "0.5253729", "0.5249884", "0.52323973", "0.5232042", "0.5231685", "0.5227106", "0.52187455", "0.52157134", "0.51982147", "0.5192903", "0.51817226", "0.51707137", "0.5162537", "0.5160812", "0.514977", "0.5147095", "0.5139935", "0.51320595", "0.51311076", "0.51307684", "0.51256496", "0.5094448", "0.5090039", "0.5083133", "0.50811034", "0.5079831", "0.5076668", "0.50765294", "0.50730217", "0.50728595", "0.50673175", "0.5054377", "0.505406", "0.50473404", "0.5038518", "0.5033603" ]
0.0
-1
This is the constructor.
function miguel_CProfile() { $this->miguel_Controller(); $this->setModuleName('profileManager'); $this->setModelClass('miguel_MProfile'); $this->setViewClass('miguel_VProfile'); $this->setCacheFlag(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final private function __construct() {\n\t\t\t}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "final private function __construct()\n {\n }", "private function __construct() {\r\n\t\r\n\t}", "private function __construct()\t{}", "private function __construct() {\n\t\t}", "final private function __construct()\n\t{\n\t}", "public function __construct()\n\t\t{\n\t\t\t//\n\t\t}", "private function __construct()\n\t{\n\t\t\n\t}", "private function __construct()\r\n\t{\r\n\t}", "private function __construct()\n\t{\n\n\t}", "private function __construct() {\r\n\t\t\r\n\t}", "public function __construct()\r\n\t\t{\r\n\t\t}", "public function __construct() { \n\t\t\n\n\t\t}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "public function __construct() {\n\n\t\t}", "private function __construct()\r\r\n\t{\r\r\n\t}", "public function __construct( )\r\n\t{\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "private function __construct( )\n {\n\t}", "protected function __construct()\r\n\t\t{\r\n\t\t}", "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "private function __construct () \n\t{\n\t}", "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "public function __construct()\n\t{\n\t\t// TODO Auto-generated constructor\n\t}", "final private function __construct(){\r\r\n\t}", "public function __construct()\n\t\t{\n\t\t\t# code...\n\t\t}", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t}", "function __construct (){\n\t\t}", "function __construct()\r\n\t\t{\r\n\t\t\t\r\n\t\t}", "public function _construct()\n\t{\n\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "private function __construct()\n\t{\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "protected function __construct() {\n\t\t\n\t}", "protected function __construct() {\n\t\t\n\t}", "function __construct() {\n\n\t\t}", "private function __construct() { \n\t\t\n\n\t}", "public function __construct() {\r\n\t\t//\r\n\t}", "public function __construct()\n\t{}", "public function __construct()\n\t{\n\t\n\t}", "public function __construct()\n\t{\n\t\n\t}", "public function __construct() {\r\n\r\n\t\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "private function __construct()\r\n {}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "public function __construct()\n\t{\n\t\t//\n\t}", "function _construct() {\n \t\n\t\t\n\t}", "private function __construct() {\n\t}" ]
[ "0.8686665", "0.8567355", "0.85457885", "0.85449666", "0.8531002", "0.85206646", "0.85004854", "0.8464301", "0.84555864", "0.84532666", "0.84525466", "0.844303", "0.84160125", "0.8412339", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8406726", "0.8405699", "0.8390285", "0.83896756", "0.83777684", "0.83665395", "0.835895", "0.835895", "0.835895", "0.8358025", "0.8355207", "0.8344435", "0.8344435", "0.8344435", "0.8344435", "0.8344435", "0.8344435", "0.8344435", "0.8334393", "0.8330463", "0.83267695", "0.8319901", "0.8319901", "0.8316226", "0.831394", "0.83132833", "0.831235", "0.831235", "0.831235", "0.831235", "0.831235", "0.831235", "0.831235", "0.831235", "0.831235", "0.8303196", "0.8303196", "0.8303196", "0.8303196", "0.8303196", "0.8297514", "0.8297514", "0.8296856", "0.8287798", "0.82727146", "0.8270459", "0.8266125", "0.8266125", "0.82603186", "0.82524943", "0.82524943", "0.82524943", "0.82524943", "0.8227183", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8225172", "0.8220741", "0.8212491" ]
0.0
-1
Get event database client query from configuration.
private function getQuery(array $config) { $query = []; if (isset($config['items_per_page'])) { $query['items_per_page'] = $config['items_per_page']; } if (isset($config['order'])) { $query['order[occurrences.startDate]'] = $config['order']; } if (isset($config['query'])) { try { $value = Yaml::parse($config['query']); if (is_array($value)) { $query = array_merge($query, $value); } } catch (ParseException $ex) { } } return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClientQuery(): string;", "public function getInstanceQuery()\n {\n return $this->get(self::_INSTANCE_QUERY);\n }", "public static function select($config)\n\t{\n\t\treturn self::new_instance_records()->select($config);\n\t}", "public function getQueryCommand();", "public static function create()\n {\n return new QueryConfigurationBuilder();\n }", "public abstract function get_query();", "public function getConfigSOQL() {\n return $this->config['SOQL'];\n }", "public function selecteventmaster()\n\t{\n\t\t$result = mysql_query(\"SELECT * FROM eventmaster\") or die(mysql_error());\n\t\treturn $result;\n\t}", "public static function get_query()\n\t{\n\t\treturn self::new_instance_records()->get_query();\n\t}", "public function getElasticaQuery()\n {\n return $this->elasticaQuery;\n }", "public function getClient() : \\Elastica\\Client\n {\n return $this->elasticaClient;\n }", "public function getConfig() {\n\t\t\n\t\t// Get a db connection.\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t \n\t\t$query->select($db->quoteName(array('apikey', 'addsubscribe_myaccounts', 'sync', 'te', 'list', 'groups', 'tag', 'client_id')));\n\t\t$query->from($db->quoteName('#__egoi'));\n\n\t\t$db->setQuery($query);\n\t\t$row = $db->loadRow();\n\t\t\n\t\treturn $row;\n\t}", "public function getQUERY()\n {\n return $this->QUERY;\n }", "function selectEventFromDatabase($database) {\r\n\t\t//mysql statement\r\n\t\t$statement = \"SELECT * FROM reminders WHERE email='$this->email' && phoneNumber='$this->phone_number' && eventName='$this->name'\";\r\n\t\t$query = $database->query($statement) or die(\"Unable to select event from database. \" . $database->error);\r\n\t\treturn $query;\r\n\t}", "public function find_client($event_id, $client_id);", "public static function query()\n {\n QueryBuilder::$dataSource = true;\n\n return new QueryBuilder();\n }", "public function getQuery(): string {\n\t\t// Store previous output before changing to temp\n\t\t$output = $this->get('output');\n\t\t\n\t\ttry {\n\t\t\t$this->set('output', SqlAdapter::SQL_QUERY);\n\t\t\t$result = $this->run();\n\t\t} finally {\n\t\t\t$this->set('output', $output);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function getQuerySettings() {}", "public function getQuery()\n {\n return $this->getOption('query');\n }", "public static function query();", "function runQuery()\n\t{\n\t\treturn $this->query;\n\t}", "function Sql_DBs_Get_Query()\n {\n $type=$this->DB_Dialect();\n\n $query=\"\";\n if ($type==\"mysql\")\n {\n $query=\n \"SHOW DATABASES\";\n }\n elseif ($type==\"pgsql\")\n {\n $query=\n \"SELECT datname FROM pg_database WHERE datistemplate = false;\";\n }\n\n return $query;\n }", "public static function where($config)\n\t{\n\t\treturn self::new_instance_records()->where($config);\n\t}", "protected function _getQuery()\n {\n return $this->_queryFactory->get();\n }", "public function getClient()\r\n {\r\n \t$this->db->from('vclient');\r\n \t$query = $this->db->get();\r\n \treturn $query->result();\r\n\r\n }", "function obtenerClientes(){\n $query = $this->connect()->query('SELECT * FROM cliente');\n return $query;\n }", "public static function conn()\n {\n return (static::inst())::$_db;\n }", "public static function getQuery()\n {\n return self::$__query;\n }", "protected function getConfigConnection(): Connection\n {\n return \\DB::connection('config_connection');\n }", "protected function getClient( $clientId ) {\n\t\t\t$data = [\n\t\t\t\t\"client_id\" => $clientId\n\t\t\t];\n\t\t\t$this->_connection->setTable(\"client\");\n\t\t\treturn $this->_connection->findFirst($data);\n\t\t}", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "protected function getQuery()\n {\n return $this->connection->table(\n $this->config['table']\n );\n }", "function query() {}", "function query() {\n $this->query = new DrupalConnectAppsQuery($this);\n\n return $this->query;\n }", "public static function getClient($id){\n return (new Database('cliente'))->select('id = '.$id)->fetchObject(self::class);\n }", "function afficherevent(){\r\n\t\t$sql=\"SElECT * From eventt\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t\t$liste=$db->query($sql);\r\n\t\t\treturn $liste;\r\n\t\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '. $e->getMessage());\r\n \t\t\t\t\t}\t\r\n\t}", "public function getGql()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('gql');\n }", "public function getConfig()\r\n {\r\n $db = $this->_getDb();\r\n\r\n // Get the database configuration information\r\n return $this->_db->getConfig();\r\n\r\n }", "public function getQueryRunner() {\n return $this->queryRunner;\n }", "public function getQuery()\n {\n return $this->get(self::_QUERY);\n }", "protected function createConnection(array $config): \\InfluxDB2\\Client\n {\n return $this->factory->make($config);\n }", "public function getDefaultDatabase() : string\n {\n return 'events';\n }", "public function getQuery() {}", "public function getQuery() {}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM clientes';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function startQuery(): DigicertClient\n {\n return $this->endpoint('reports/query', 'POST');\n }", "public abstract function getQuery();", "protected function getQueryBuilderPlatform() {\n\t\ttry {\n\t\t\tif ($this->queryBuilderPlatform instanceof QueryBuilderPlatform) {\n\t\t\t\treturn $this->queryBuilderPlatform;\n\t\t\t}\r\n\t\t\t$dbSelector = new DbSelector();\n\t\t\treturn $this->queryBuilderPlatform\t= $dbSelector->getQueryBuilderPlatform($this->task);\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\n\t}", "public function createQuery()\n\t{\n\t\treturn $this->pp->createQuery('modules_event/highlight');\n\t}", "public static function query()\n {\n return (new static)->newQuery();\n }", "public static function query()\n {\n return (new static)->newQuery();\n }", "public function getWhere($where, Database_Config $databaseConfig = NULL);", "protected function getEventLogger()\n {\n $event_manager = new EventsManager;\n\n $event_manager->attach($this->alias, function ($event, $conn) {\n if ($event->getType() == 'beforeQuery') {\n $logging_name = 'db';\n\n if (logging_extension()) {\n $logging_name = 'db-'.logging_extension();\n }\n\n $logger = new Logger('DB');\n $logger->pushHandler(\n new StreamHandler(\n storage_path('logs').'/'.$logging_name.'.log',\n Logger::INFO\n )\n );\n\n $variables = $conn->getSQLVariables();\n\n if ($variables) {\n $logger->info(\n $conn->getSQLStatement().\n ' ['.implode(',', $variables).']'\n );\n } else {\n $logger->info($conn->getSQLStatement());\n }\n }\n });\n\n return $event_manager;\n }", "public function getQueryBuilder(): SQLQueryBuilder;", "public function newClientQuery($method) {\n\t\trequire_once 'Service/Freshbooks/Query/Client.php';\n\t\t$query = new Service_Freshbooks_Query_Client($method);\n\t\treturn $query;\n\t}", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function getQuery();", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "public function actionConfig()\n\t{\n\t\t$config = Yii::app()->db->connectionString;\t\n\t\t$dbname = '';\n\t\t$host = '';\n\t\t$port = '';\n\t\t\n\t\t//$conn_arr = explode( ':', $config );\n\t\t\n\t\t$conn_attr = explode( ';', $config );\n\t\tfor( $i=0; $i<sizeof( $conn_attr ); $i++ )\n\t\t{\n\t\t// find the host\n\t\t\tif( stristr( $conn_attr[$i], 'mysql:host=' ) )\n\t\t\t{\n\t\t\t $host = str_ireplace( 'mysql:host=', '', $conn_attr[$i] );\n\t\t\t}\n\t\t\tif( stristr( $conn_attr[$i], 'mysql:port=' ) )\n\t\t\t{\n\t\t\t$port = str_ireplace( 'mysql:port=', '', $conn_attr[$i] );\n\t\t\t}\n\t\t\t// find the dbname\n\t\t\tif( stristr( $conn_attr[$i], 'dbname=' ) )\n\t\t\t{\n\t\t\t$dbname = str_ireplace( 'dbname=', '', $conn_attr[$i] );\n\t\t\t}\n\t\t\n\t\t }\n\t\tif($port!='')\n\t\t\t$host=$host.':'.$port;\n\t\t\n\t\t//\tinclude ('config.php');\n\t\tinclude ('codebase/connector/scheduler_connector.php');\n\t\t$res=mysql_connect( $host, Yii::app()->db->username,Yii::app()->db->password);\n\t\tmysql_select_db($dbname);\n\t\t\n\t\t//$res=mysql_connect($mysql_server,$mysql_user,$mysql_pass); \n\t\t//mysql_select_db($mysql_db); \n\t\t\n\t\t$scheduler = new schedulerConnector($res);\n\t\t//$scheduler->enable_log(\"log.txt\",true);\n\t\t//list all database fields here...\n\t\t$scheduler->render_table(\"tbl_events\",\"event_id\",\"start_date,end_date,event_name,details,customer\");\n\n\t}", "public function query(): QueryInterface;", "public function getQueryBuilder();", "public function getQueryBuilder();", "public function getClient()\n {\n if ($this->_client === null) {\n $app = \\Yii::app();\n if (!$app->hasComponent('mq'))\n throw new \\CException(__CLASS__.\" expects a 'mq' application component!\");\n $this->_client = $app->getComponent('mq');\n }\n return $this->_client;\n }", "public function getQueryBuilder($type='default') {\n\t\treturn isset($this->queryBuilders[$type]) ? Injector::inst()->create($this->queryBuilders[$type]) : Injector::inst()->create($this->queryBuilders['default']);\n\t}", "protected function getDatabaseConnection()\n {\n return $GLOBALS['TYPO3_CONF_VARS']['DB'];\n }", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "public function connection($name = 'default')\n {\n return Arr::get($this->clients, $name ?: 'default');\n }", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}" ]
[ "0.5628943", "0.5485642", "0.5467886", "0.5462427", "0.5448779", "0.5446621", "0.54332185", "0.5426561", "0.54254514", "0.5370719", "0.5362795", "0.53554094", "0.5302289", "0.5251179", "0.5237816", "0.5226193", "0.52163154", "0.52099204", "0.5207886", "0.5189783", "0.51860017", "0.5181516", "0.517934", "0.5168811", "0.5164369", "0.5162413", "0.5160201", "0.51562357", "0.5147978", "0.51400006", "0.5129718", "0.5129718", "0.5129718", "0.5129718", "0.5129718", "0.5129718", "0.5129718", "0.5129718", "0.5129718", "0.5120394", "0.5108601", "0.51004535", "0.50971586", "0.5096377", "0.5092611", "0.5092417", "0.50810903", "0.50704604", "0.50638396", "0.5061763", "0.50581187", "0.50581187", "0.5051972", "0.50406015", "0.5035155", "0.5033379", "0.5026807", "0.50251454", "0.50251454", "0.5003943", "0.49958822", "0.4989535", "0.49853748", "0.4983437", "0.4983437", "0.4983437", "0.4983437", "0.4983437", "0.4983437", "0.4983437", "0.4983437", "0.4983437", "0.4977284", "0.497417", "0.4969101", "0.4957881", "0.4957881", "0.4957157", "0.49483696", "0.49477208", "0.4944989", "0.4944989", "0.4944989", "0.4944185", "0.49437496", "0.49437496", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.4943749", "0.49430493", "0.49430493" ]
0.5163875
25
Get paging view for a collection of events.
private function getView(Collection $collection) { $view = []; foreach (['first', 'previous', 'next', 'last'] as $key) { $url = $collection->get($key); if ($url) { $info = parse_url($url); if (!empty($info['query'])) { parse_str($info['query'], $query); $view[$key] = Url::fromRoute('event_database_pull.events_list', $query); } } } return $view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $events = Event::whereDate('date', '>=', Carbon::now())\n ->orderBy('date', 'desc')->paginate(15);\n\n return view('event.index', compact('events'))\n ->with('i', (request()->input('page', 1) -1) *15);\n }", "function loadEvents() {\n $events = Event::orderBy('date', 'desc')->paginate(10);\n \n return view('cms.events', ['events' => $events]);\n }", "private function get_list_pageinfo($event) {\n global $config, $database;\n \n // get the amount of images per page\n $images_per_page = $config->get_int('index_images');\n \n // this occurs when viewing post/list without page number\n if ($event->get_arg(0) == null) {// no page listed\n $prefix = \"\"; \n $page_number = 1;\n $total_pages = ceil($database->get_one(\n \"SELECT COUNT(*) FROM images\") / $images_per_page);\n }\n \n // if there are no tags, use default\n else if ($event->get_arg(1) == null){\n $prefix = \"\"; \n $page_number = (int)$event->get_arg(0);\n $total_pages = ceil($database->get_one(\n \"SELECT COUNT(*) FROM images\") / $images_per_page);\n }\n \n else { // if there are tags, use pages with tags\n $prefix = $event->get_arg(0).\"/\";\n $page_number = (int)$event->get_arg(1);\n $total_pages = ceil($database->get_one(\n \"SELECT count FROM tags WHERE tag=:tag\", \n array(\"tag\"=>$event->get_arg(0))) / $images_per_page);\n }\n \n // creates previous & next values \n // When previous first page, go to last page\n if ($page_number <= 1) $prev = $total_pages;\n else $prev = $page_number-1;\n if ($page_number >= $total_pages) $next = 1;\n else $next = $page_number+1;\n \n // Create return array\n $pageinfo = array(\n \"prev\" => $prefix.$prev.$after,\n \"next\" => $prefix.$next.$after,\n );\n \n return $pageinfo;\n }", "public function index()\n\t{\n $events = $this->events->paginate(10);\n $no = $events->getFrom();\n return $this->view('events.index', compact('events', 'no'));\n\t}", "public function index()\n {\n $programEvents = ProgramEvent::orderBy(\"begin_at\")->paginate();\n\n return view('program-event.index', compact('programEvents'))\n ->with('i', (request()->input('page', 1) - 1) * $programEvents->perPage());\n }", "public function indexAction(Request $request)\n {\n $page = $request->query->get('page', 1);\n $em = $this->getDoctrine()->getManager();\n\n $qb = $em->getRepository(Event::class)->findListQueryBuilder();\n\n $events = new Pagerfanta(new DoctrineORMAdapter($qb));\n $events->setMaxPerPage(30);\n $events->setCurrentPage($page);\n\n return $this->render('event/index.html.twig', array(\n 'events' => $events,\n ));\n }", "public function index()\n {\n $events = Event::latest()->paginate(5);\n return view('events',compact('events'));\n }", "public function getTotalPages_events($howmany) {\r\n$total_row = $this->getRowCount_events();\r\n$pages = ceil($total_row / $howmany);\r\nreturn $pages;\r\n}", "public function index()\n {\n $list = Event::paginate(3);\n return view('events.index', compact('list'));\n\n }", "public function run($collection)\n {\n return view(\"admin.widgets.pagination\", [\n 'config' => $this->config,\n 'collection' => $collection\n ]);\n }", "public function index()\n {\n $event = ModelEvent::paginate(9);\n \treturn view('index', ['event' => $event]);\n \n }", "public function index()\n {\n $events = Event::latest()->paginate(10);\n return view('event.events', compact('events'));\n }", "public function index()\n\t{\n\t\t$events = Event::orderBy('id', 'desc')->paginate(10);\n\n\t\treturn view('events.index', compact('events'));\n\t}", "public function getPages();", "public function index()\n {\n $results = Event::with('participants')->orderBy('start_date')->paginate(10);\n return view('adm.events.index')->with(compact('results'));\n }", "public function events()\n {\n //search query\n $query = Input::get('query');\n\n if ($query == 'latest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n elseif ($query == 'oldest')\n {\n $exhibitions = Exhibition::orderBy('date_event', 'asc')->paginate(5);\n }\n else\n {\n $exhibitions = Exhibition::orderBy('date_event', 'desc')->paginate(5);\n }\n return View::make('/events', ['exhibitions' => $exhibitions]);\n }", "public function getPage($pageNumber = 0);", "public function getPerPage();", "public function eventos(){\n \t\n $eventos = Evento::paginate(3);\n $fotos = Foto::all();\n\n return view('eventos', compact('eventos', 'fotos'));\n }", "public function getPaginated();", "public function index()\n {\n $filters = request()->only('date', 'region');\n\n $events = $this->event\n ->when(isset($filters['date']), function ($query) use ($filters) {\n return $query->whereDate('date', $filters['date']);\n })\n ->when(isset($filters['region']), function ($query) use ($filters) {\n return $query->where('place', 'LIKE', \"%{$filters['region']}%\");\n })\n ->paginate(10);\n\n return response()->json([\n 'error' => false,\n 'message' => '',\n 'data' => [\n 'current_page' => $events->currentPage(),\n 'last_page' => $events->lastPage(),\n 'per_page' => $events->perPage(),\n 'path' => $events->path(),\n 'data' => new EventCollection($events)\n ]\n ], 200);\n }", "public function eventsList()\n {\n $alumniId = session('alumni_id');\n $alumni = AlumniBasicInfo::find($alumniId);\n $events = Event::where('dept_info_id',$alumni->dept_info_id)->latest()->paginate(3);\n return view('frontend.events.events-list',compact('events'));\n }", "public function index(Event $event, EventClass $eventClass)\n {\n // Return the event class fleets\n return $eventClass->fleets->paginate(config('pagination.api.limit'));\n }", "public function paginated_list(Request $request){\n $max_per_paginate = 8;\n\n if($request->filter_mode == true || $request->filter_mode == 'true'){\n $filter = $request->filter;\n $data = Event::orderByDesc('started_date')->where('type', '1')->where('name', 'like', \"%$filter%\");\n } else {\n $data = Event::orderByDesc('started_date')->where('type', '1');\n }\n \n $count = $data->count();\n $paginate_count = ceil( $count / $max_per_paginate );\n\n $res = $data->skip( ($request->paginate_position-1)*$max_per_paginate )->take( $max_per_paginate )->get();\n\n return response()->json(['data' => $res, 'paginate_count' => $paginate_count]);\n }", "public function getPages() {}", "public function getPaginationDataSource();", "public function index()\n\t{\n\n\t\t$data['events'] = Event_Manager::paginate(15);\n\t\t$data['page_title'] = 'Events';\n\t\treturn View::make('clientside.events.index',$data);\n\t\t\n\t}", "public function getPageViews()\n {\n return $this->get('PageViews');\n }", "function paginate($collection_or_array, $per_page = 100) {\n if (is_array($collection_or_array)) {\n $collection = collect($collection_or_array);\n } else {\n $collection = $collection_or_array;\n }\n $current_page = \\Illuminate\\Pagination\\LengthAwarePaginator::resolveCurrentPage();\n $paginated_collection = new \\Illuminate\\Pagination\\LengthAwarePaginator($collection->slice(($current_page - 1) * $per_page, $per_page), $collection->count(), $per_page);\n $paginated_collection->setPath(\\Illuminate\\Support\\Facades\\Request::url());\n\n return $paginated_collection;\n }", "public function getItemsPerPage();", "public function getItemsPerPage();", "public function index()\n {\n $events = \\App\\Event::orderBy('id','DESC')->paginate(10);\n return view('admin.events.index', ['events' => $events]);\n }", "public function getPageDetails()\n\t{\n\t\t$v = new View(0);\n\t\treturn $v->getAllRecords( FALSE );\n\t\t\n\t}", "function pagination(){}", "public function paginateLatestQueries($page = 1, $perPage = 15);", "public function getAllEvents(){\n\t\t//$events = EventPage::get()->sort('Date', 'DESC')->limit(5);\n\t\t$limit = 10;\n\n\t\t$items = DataObject::get(\"EventPage\", \"Date > NOW()\", \"Date\", null, $limit);\n\t\treturn $items;\n\n\t}", "public function getToPaginator();", "public function getPageSize();", "public function getPages()\n {\n return $this->getTable('ExhibitPage')->findBy(array('exhibit' => $this->id, 'sort_field' => 'order'));\n }", "public function indexAction($page) \r\n\t{\r\n\t\t$eventManager = $this->get(\"vs.vitrine.event_manager\");\r\n\t\t$eventsGroups = $eventManager->getCurrentEventsOrdered();\r\n\t\t\r\n\t\t$paginator = $this->get('knp_paginator');\r\n\t\t$pagination = $paginator->paginate($eventsGroups, $page, $this->container->getParameter('max_events_on_event_list'));\r\n\r\n\t\treturn $this->render('VSVitrineBundle:Event:index.html.twig', array(\r\n\t\t\t\t'eventsGroup' => $pagination,\r\n\t\t\t));\r\n\t}", "public function index()\n {\n return view(\"admin.event\")->with([\n \"events\" => Event::query()->orderBy(\"created_at\", \"desc\")->paginate()\n ]);\n }", "function getEventsPagination($count, $args) {\n\t \t$wp_args = array();\n\n\t \t$wp_args['base'] = preg_replace( '/(\\?.*)?$/', '', $_SERVER[\"REQUEST_URI\"] ).'%_%';\n\t \t$wp_args['format'] = '?wpcal-page=%#%';\n\n\t \t// Preserver other GET values\n\t \tforeach($_GET as $k => $v) {\n\t \t\tif (strtolower($k) != 'wpcal-page') {\n\t \t\t\tif (isset($wp_args['add_args']))\n\t \t\t\t$wp_args['add_args'] = array();\n\t \t\t\t$wp_args['add_args'][$k] = $v;\n\t \t\t}\n\t \t}\n\n\t \t$epp = 0;\n\t \tif (isset($args['number'])) {\n\t \t\t$epp = intval($args['number']);\n\t \t}\n\t \tif (empty($epp)) {\n\t \t\t$epp = intval(get_option('fse_number'));\n\t \t}\n\n\t \tif (isset($args['pagination_prev_text'])) {\n\t \t\t$wp_args['prev_text'] = $args['pagination_prev_text'];\n\t \t} else {\n\t \t\t$wp_args['prev_text'] = get_option('fse_pagination_prev_text');\n\t \t}\n\n\t \tif (isset($args['pagination_next_text'])) {\n\t \t\t$wp_args['next_text'] = $args['pagination_next_text'];\n\t \t} else {\n\t \t\t$wp_args['next_text'] = get_option('fse_pagination_next_text');\n\t \t}\n\n\t \tif (isset($args['pagination_end_size'])) {\n\t \t\t$wp_args['end_size'] = $args['pagination_end_size'];\n\t \t} else {\n\t \t\t$wp_args['end_size'] = get_option('fse_pagination_end_size');\n\t \t}\n\n\t \tif (isset($args['pagination_mid_size'])) {\n\t \t\t$wp_args['mid_size'] = $args['pagination_mid_size'];\n\t \t} else {\n\t \t\t$wp_args['mid_size'] = get_option('fse_pagination_mid_size');\n\t \t}\n\n\t \tif (isset($args['pagination_use_dots'])) {\n\t \t\t$wp_args['show_all'] = ($args['pagination_use_dots'] == true ? false : true);\n\t \t} else {\n\t \t\t$wp_args['show_all'] = get_option('fse_pagination_usedots') == true ? false : true;\n\t \t}\n\n\t \t$wp_args['prev_next'] = (!empty($wp_args['prev_text']) || !empty($wp_args['next_text']));\n\n\t \t// Calculate number of pages\n\t \t$wp_args['total'] = ceil($count / $epp);\n\n\t \tif ($args['page'] < 1)\n\t \t$wp_args['current'] = 1;\n\t \telseif ($args['page'] > $wp_args['total'])\n\t \t$wp_args['current'] = $wp_args['total'];\n\t \telse\n\t \t$wp_args['current'] = $args['page'];\n\n\t \treturn paginate_links($wp_args);\n\t }", "public function index()\n {\n $events = Event::latest()->when(request()->q, function ($events) {\n $events = $events->where('title', 'like', '%' . request()->q . '%');\n })->paginate(10);\n\n return view('admin.event.index', compact('events'));\n }", "public function ViewAsPage() {\n $this->getResponse()->removeHeader(\"X-Robots-Tag\");\n\n // Include CSS\n Requirements::css('event-management/dist/layout.min.css');\n\n $timestamp = (string)$this->getRequest()->param(\"InstanceTimestamp\");\n\n $eid = (int)$this->getRequest()->param(\"EventID\");\n $event = DataObject::get('Event')->byId($eid);\n if(!is_object($event) || !$event->exists()) {\n $this->getResponse()->setStatusCode(404);\n return $this->customise(\n array(\n \"getTitle\" => \"Event ID #\" . $eid . \" Not Found!\"\n )\n )->renderWith(array('EventPage', 'Page'));\n }\n\n if(!empty($timestamp)) {\n $event->setInstanceDateTimes($timestamp);\n }\n\n return $this->customise(\n array(\n \"Event\" => $event\n )\n )->renderWith(array('EventPage', 'Page'));\n\n }", "public function index()\n {\n $eventos = evento::paginate(5);\n\n return view('system-mgmt/evento/index', ['eventos' => $eventos]);\n }", "public function pastEvents()\n {\n $banner = array(\n 'title' => 'Past Events',\n 'subtitle' => 'A recap of our past events.',\n );\n\n $today = Carbon::today()->toDateString();\n $events = Event::whereDate('event_date', '<', $today);\n\n // Filter by url param\n if ($month = request('month')) {\n $events->whereMonth('event_date', Carbon::parse($month)->month);\n }\n\n if ($year = request('year')) {\n $events->whereYear('event_date', $year);\n }\n\n $events = $events->orderBy('event_date', 'desc')\n ->paginate(5);\n\n\n // Temporary\n $archives = Event::selectRaw('year(event_date) year, monthname(event_date) month, count(*) published')\n ->whereDate('event_date', '<', $today)\n ->groupBy('year', 'month')\n ->orderByRaw('min(event_date) desc')\n ->get()\n ->toArray();\n\n return view('events.past_events', compact('banner','events', 'archives'));\n }", "private function getPagination(){\n\t\t$pager=new pager();\n\t\t$pager->isAjaxCall($this->iAmAjax);\n\t\t$pager->set(\"type\", \"buttons\");\n\t\t$pager->set(\"gridId\",$this->id);\n\t\t$pager->set(\"pages\", $this->pages);\n\t\t$pager->set(\"currPage\", $this->currPage);\n\t\t$pager->set(\"maxNumPages\", $this->maxNumPages);\n\t\t$pager->set(\"maxNumPages\", $this->maxNumPages);\n\t\treturn $pager->render(true);\n\t}", "function sfgovpl_preprocess_views_view__events__page(&$variables) {\n $view = $variables['view'];\n $variables['upcoming_event_count'] = get_upcoming_event_count($view);\n $variables['upcoming_events_url'] = get_upcoming_event_view_url($view);\n $variables['past_events_url'] = get_past_event_view_url($view);\n $variables['is_upcoming_event_display'] = get_is_upcoming_event_display($view);\n}", "public function index()\n {\n //$events = Events::paginate(50);\n $events=Event::all();\n // return view('events.index')->with('events',$events);\n return $events;\n }", "public function index()\n {\n $events = Evenement::orderBy('created_at', 'desc')->paginate(10);\n return view('user.events.index')->with(compact('events' ) );\n }", "public function paging() {\n\t\t$pages = ceil($this->count('all') / $this->_page_length);\n\t\t$response = array('pages' => $pages, 'page' => $this->_on_page,'length' => $this->_page_length,'items' => $this->count('all'));\n\t\treturn (object) $response;\t\t\n\t}", "function getPagedElements() {\n return $this->page_object;\n }", "function page($num = 1)\n {\n // retrieve all data from history table per sorting\n $source = $this->factory->sortAll($this->sort);\n $records = array(); // start with an empty extract\n\n // use a foreach loop, because the record indices may not be sequential\n $index = 0; // where are we in the tasks list\n $count = 0; // how many items have we added to the extract\n $start = ($num - 1) * $this->itemsPerPage;\n \n foreach($source as $record) {\n if ($index++ >= $start) {\n $records[] = $record;\n $count++;\n }\n if ($count >= $this->itemsPerPage) break;\n }\n \n $this->data['pagination'] = $this->pagenav($num);\n $this->showPage($records);\n }", "function get_paged_list($limit = 10, $offset = 0){\n\t $this->db->join('department', 'department.id = employee.Department');\n $this->db->order_by('EmployeeId','asc');\n return $this->db->get($this->tbl_Employeeinfo, $limit, $offset);\n }", "public function index()\r\n {\r\n $events = Evento::orderBy('fecha', 'desc')\r\n ->paginate(20);\r\n \r\n return view('events/index')\r\n ->with('events', $events);\r\n }", "public function index()\n {\n $events=Event::orderby('id','desc')->paginate(20);\n\n return view('backend.events.index',compact('events'));\n }", "public function GetByPaginated($offset, $limit);", "public function paginate(Request $request);", "public function index()\n {\n //DB::table('events')->orderBy('created_at','desc')->get()\n return view('event.index2');//->with('evenements' , Event::paginate(10));\n }", "public function index()\n {\n\n $events = DB::table('events')\n ->where('event_date', '>', date('Y-m-d').' 00:00:00')\n ->orderBy('event_date', 'asc')\n ->take(8)\n ->get();\n\n return view('events.index')->withEvents($events);\n\n }", "function get_paged_template()\n {\n }", "public function indexAction() {\n\t\t$this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n\t\tif (!Engine_Api::_()->core()->hasSubject()) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\t\t// Get subject and check auth\n\t\t$subject = Engine_Api::_()->core()->getSubject('event');\n\t\tif (!$subject->authorization()->isAllowed($viewer, 'view')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t// Prepare data\n\t\t$this->view->event = $event = $subject;\n\t\t$limit =$this->_getParam('max',5);\n\t\t$currentDay = date('Y') . '-' . date('m') . '-' . date('d');\n\t\t\n\t\t$table = Engine_Api::_()->getItemTable('event');\n\t\t$select = $table->select()\n ->where('category_id = ?', $event->category_id)\n ->where('event_id != ?', $event->getIdentity())\n ->order(\"DATEDIFF('{$currentDay}', starttime) DESC\")\n ->limit($limit);\n\n\t\t$showedEvents = $table->fetchAll($select);\n\t\t$this->view->showedEvents = $showedEvents;\n\t\t// Hide if nothing to show\n\t\tif( count($showedEvents) <= 0 ) {\n\t return $this->setNoRender();\n\t }\n }", "public function index(IndexRequest $request): ResourceCollection\n {\n return EventResource::collection(Event::pimp()->paginate($request->input('limit', 20)));\n }", "public function getPageNumbers();", "public function index()\n {\n $events = Event::orderBy('id', 'desc')->paginate(5);\n $jobs = Job::orderBy('id', 'desc')->limit(8)->get();\n $news = News::orderBy('id', 'desc')->limit(5)->get();\n\n return view('events', compact('news', 'jobs', 'events'));\n }", "public function getPaginate ($p_rowsPerPage, $p_currentPage);", "protected function createCollectionPager(BaseCollection $collection)\n {\n $page = $this->getCurrentPage();\n $pageSize = $this->getCurrentPageSize();\n $count = $collection->queryCount();\n $collection->page( $page ,$pageSize );\n // return new RegionPager( $page, $count, $pageSize );\n return new BootstrapRegionPager($page, $count, $pageSize );\n }", "function sfgovpl_preprocess_views_view__events__page_1(&$variables) {\n $view = $variables['view'];\n $variables['upcoming_event_count'] = get_upcoming_event_count($view);\n $variables['upcoming_events_url'] = get_upcoming_event_view_url($view);\n $variables['past_events_url'] = get_past_event_view_url($view);\n $variables['is_upcoming_event_display'] = get_is_upcoming_event_display($view);\n}", "public function index()\n {\n \n $events = Event::all();\n return view('pages.events.index')->with(compact('events'));\n }", "public function onPageLoad() {\n $eventsForUser = DB::table('events')\n ->select()\n ->where('eventOrganiserId', Auth::id())\n ->get();\n return view('myEvents', array('events' => $eventsForUser));\n }", "function getPaging() {\n\t\t//if the total number of rows great than page size\n\t\tif($this->totalRows > $this->pageSize) {\n\t\t\tprint '<div class=\"paging\">';\n\t\t\tprint '<ul>';\n\t\t\tprint $this->first() . $this->prev() . $this->pageList() . $this->next() . $this->end();\n\t\t\tprint '</ul>';\n\t\t\tprint '</div>';\n\t\t}\n }", "public function index(EventRequest $request)\n {\n $relations = $this->prepareRelations($request->get('with'));\n\n $events = Event::withRelations($relations)\n ->paginate(getPerPage());\n\n return $this->response->ok($events);\n }", "public function getPageSize($side);", "function get_test_pager($page, $num_results) {\n\t\t$pager = $this->db->get_pager(\n\t\t\t\"select * from tasks where status < 3 order by suspense_date\"\n\t\t);\n\n\t\t// override defaults\n\t\t$pager->set_rows($num_results);\n\t\t$pager->set_page($page);\n\n\t\treturn $pager;\n\t}", "public function index(Request $request)\n {\n $eventos = Evento::orderBy('id','DESC')->paginate(5);\n return view('Eventos.index',compact('eventos'))\n ->with('i', ($request->input('page', 1) - 1) * 5);\n }", "public function paginate(int $perPage = 15, array $filters = []): LengthAwarePaginator;", "public function listAction(Request $request)\n {\n $user = $this->getUser();\n\n $entityManager = $this->getDoctrine()->getManager();\n $eventsQuery = $entityManager\n ->getRepository('AppBundle:Event')\n ->getUserEventsQuery($user, $request->query->all());\n\n $paginator = $this->get('knp_paginator');\n\n $pagination = $paginator->paginate(\n $eventsQuery,\n $request->query->getInt('page', 1)\n );\n\n $view = $this->view([\n 'events' => $pagination->getItems(),\n 'total' => $pagination->getTotalItemCount()\n ]);\n\n return $this->handleView($view);\n }", "public function show()\r\n {\r\n $events = DB::table('app_event')\r\n ->orderBy('id', 'desc')\r\n ->paginate(10)->toJson();\r\n\r\n return $events;\r\n }", "static public function genPagination(\n int $pageNum, int $firstItemShownOnPage, int $lastItemShownOnPage,\n int $totalItems, array $rangeOfAllItemIndexes, int $numPagesPerPagingView = 4,\n string $pagingFor = '', int $viewNumber = 0, string $baseUrl = ''\n ) {\n return [\n 'currentRange' => [\n 'index' => $pageNum, // the current page's index\n // 'begin' and 'end' are indexes into a $items2 array..\n 'begin' => $firstItemShownOnPage, \n 'end' => $lastItemShownOnPage,\n ],\n 'totalItems' => $totalItems, // the total number of items in the $items2 array\n 'ranges' => $rangeOfAllItemIndexes,\n 'numPerView' => $numPagesPerPagingView,\n 'pagingFor' => $pagingFor,\n 'viewNumber' => $viewNumber,\n 'baseUrl' => $baseUrl\n ];\n }", "protected function getPagerCollectionInstance()\n {\n $pagerCollection = $this->dataBackend->getPagerCollection();\n $pagerCollection->setItemCount($this->dataBackend->getTotalItemsCount());\n return $pagerCollection;\n }", "public function paginate()\n {\n }", "public function viewEvents();", "public function index()\n {\n $event = Event::paginate(9);\n \n return view('start.start', ['events' => $event]);\n }", "private function getTournamentsWithEvents($per_page, $offset, $date = false, $past = false)\n\t{\n\t\t/**\n\t\t * SELECT tournaments.*, COUNT(events.eventId)\n\t\t * FROM tournaments, \n\t\t * events WHERE tournaments.tournamentId = events.tournamentId AND tournaments.tournamentId = 2\n\t\t *GROUP BY tournaments.tournamentId\n\t\t*/\n\t\t\n\t\tif ($offset == 1)\n\t\t{\n\t\t\t$offset = 0;\n\t\t}\n\t\t\n\t\tif ($date != false)\n\t\t{\n\t\t\tif ($past == false)\n\t\t\t{\n\t\t\t\t$logic_operator = \">=\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$logic_operator = \"<\";\n\t\t\t}\n\t\t\t$this->db->where(\"tournaments.end {$logic_operator}\", $date);\n\t\t}\n\t\t\n\t\t$this->db->select('tournaments.*, COUNT(events.eventId)');\n\t\t$this->db->limit($per_page, $offset);\n\t\t$this->db->where(\"tournaments.tournamentId = events.tournamentId\");\n\t\t$this->db->group_by(\"tournaments.tournamentId\"); \n\t\t$query = $this->db->get('tournaments, events');\n\t\t\n\t\treturn $query->result_array();\n\t}", "public function index()\n {\n $events = EventFacade::whereNot('draft')\n ->whereNot('scheduled')\n ->pilotIndex()\n ->orderByStartDate()\n ->paginate(20);\n\n $view = 'published';\n\n return view('pilot::admin.events.index', compact('events', 'view'));\n }", "public function indexAction() {\n $this->view->events = $this->_events->getEventsAdmin($this->_getParam('page'));\n }", "public function index()\n {\n $categories = Category::whereHas('events')->oldest()->get();\n //This works, but not with infinite loading\n $events = Event::latest()->where('approved', true)->get();\n //I cant figure out how to get this to work with infinite loading. \n //$events = Event::latest()->where('approved', true)->paginate(4);\n //return $events;\n return view('events.index',compact('events','categories', 'bugs'));\n }", "public function viewAllEvents();", "public function PaginatedArticles() {\n\t\t$pages = DOArticle::get()->sort('Date DESC');\n\t\t$list = new PaginatedList($pages, $this->request);\n\t\t$list->setPageLength(5);\n\t\treturn $list;\n\t}", "public function index()\n {\n return Press::sorted()->paginate(6);\n }", "public function do_paging()\n {\n }", "public function paginate(int $perPage = 15);", "protected function getOverviewOfPagesUsingTSConfig() {}", "public function index()\n {\n //\n $events=Event::Orderby('id','desc')->where('user_id',Auth::User()->id)->paginate(10);\n return view('Organizer.index',compact('events'));\n \n }", "function get_upcoming_event_count($view): ?int {\n if (!$view) {\n return 0;\n }\n\n $display = $view->current_display;\n switch ($display) {\n // Set the upcoming events link for a topic filtered display.\n case 'page_3': // Event topic display\n case 'page_5': // Past topic display\n $display_to_count = 'page_3';\n break;\n\n // Set the upcoming events link for a department filtered display.\n case 'page_4': // Event department display\n case 'page_6': // Past department display\n $display_to_count = 'page_4';\n break;\n\n // Set the upcoming events link for the all events display.\n case 'page_1': // Event all display\n case 'page_2': // Past all display\n default:\n $display_to_count = 'page_1';\n break;\n }\n\n $dept_id = !empty($view->args[0]) ? $view->args[0] : null;\n $viewId = $view->storage->id();\n $eventsView = Views::getView($viewId);\n $eventsView->setArguments([$dept_id]);\n $eventsView->setDisplay($display_to_count);\n $eventsView->get_total_rows = TRUE;\n $eventsView->preExecute();\n $eventsView->execute();\n\n return $eventsView->total_rows;\n}", "function getPages() {\n\t\t$sql = 'SELECT * FROM page WHERE vis = 1 ORDER BY psn';\n\t\t$qrh = mysqli_query($this->lnk, $sql);\n\t\t$i = 1;\n\t\t\n\t\t// iterate and extract data to be passed to view\n\t\twhile ( $res = mysqli_fetch_array($qrh)) {\n\t\t\t$results[] = array('id' => $res['id'],'name' => $res['nam']);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $results;\n\t\t\n\t}", "public function getPageViews()\n {\n return $this->pageViewNodes;\n }", "public function index()\n {\n\n $sidebar_items = array(\n \"List Events\" => array('url' => URL::route('event.index'), 'icon' => '<i class=\"fa fa-users\"></i>'),\n );\n $FillableDropdown = new FillableDropdown();\n $active = $FillableDropdown->active($default = 2);\n $accessibility = $FillableDropdown->accessibility($default = 2);\n $operations = $FillableDropdown->eventOperations($default = 2);\n\n $authentication = \\App::make('authenticator');\n $user = $authentication->getLoggedUser();\n\n if (isset($user)) {\n\n $user_id = $user->id;\n }\n\n if (isset($user_id)) {\n\n $users = User::findOrFail($user_id);\n }\n $events = Events::orderBy('name', 'asc')->paginate(20);\n\n return view('events.event_listing_page', compact('events', 'users', 'active', 'accessibility', 'operations', 'sidebar_items'));\n\n }", "public function index(Request $request)\n {\n $events = Event::withCount('users')->where(function ($query) {\n $query->upcoming();\n })->orWhere(function ($query) {\n $query->current();\n })->get()->map(function ($event) {\n $event->users = $event->users()->take(5)->get();\n\n return $event;\n });\n\n return new EventCollectionResource($events);\n }", "public function paginate()\n {\n return paginate(SystemLog::latest()->oldest('seen_at'));\n }" ]
[ "0.59467393", "0.5766378", "0.57551855", "0.5740196", "0.572459", "0.5712482", "0.5679925", "0.56694716", "0.5604403", "0.55985415", "0.5577331", "0.54963076", "0.5469232", "0.5458774", "0.54540366", "0.5449997", "0.54391867", "0.54272145", "0.54230356", "0.542053", "0.54171365", "0.5411331", "0.54050505", "0.54048973", "0.5402995", "0.53991646", "0.53818184", "0.5379845", "0.53791463", "0.5375526", "0.5375526", "0.5367829", "0.53558797", "0.53553146", "0.53257173", "0.53234017", "0.53232545", "0.53150624", "0.53107035", "0.5306613", "0.53032094", "0.530198", "0.52639157", "0.52555966", "0.5254178", "0.5251333", "0.525072", "0.5248978", "0.52463233", "0.52368784", "0.52312917", "0.5229128", "0.522742", "0.5222461", "0.52181524", "0.52149105", "0.5201937", "0.5196852", "0.519668", "0.5189289", "0.5164677", "0.5163742", "0.5157538", "0.51458925", "0.5144168", "0.51413536", "0.51384574", "0.5127573", "0.51147604", "0.51091355", "0.51046646", "0.50955933", "0.50925994", "0.5091488", "0.5089638", "0.5084745", "0.5075142", "0.50593626", "0.50592333", "0.50440633", "0.50434846", "0.5043099", "0.5037267", "0.50346226", "0.5029233", "0.5027274", "0.50265646", "0.5023264", "0.50229037", "0.502169", "0.5011331", "0.50104964", "0.50023586", "0.50007415", "0.49987358", "0.4997211", "0.49890915", "0.498745", "0.49868128", "0.49864846" ]
0.5808819
1
Load data fixtures with the passed EntityManager
public function load(ObjectManager $manager) { $names = array('News'); foreach ($names as $i => $name) { $list[$i] = new Album(); $list[$i]->setTitle($name); $list[$i]->setDescription($name); $list[$i]->setCategory($this->getReference('album-category')); $manager->persist($list[$i]); } $this->addReference('album', $list[$i]); $manager->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function loadData(ObjectManager $em);", "public function load(ObjectManager $manager)\n {\n // Fixtures are split into separate files\n }", "private function myLoadFixtures()\n {\n $em = $this->getDatabaseManager();\n\n // load fixtures\n $client = static::createClient();\n $classes = array(\n // classes implementing Doctrine\\Common\\DataFixtures\\FixtureInterface\n 'Demofony2\\AppBundle\\DataFixtures\\ORM\\FixturesLoader',\n );\n\n $this->loadFixtures($classes);\n }", "public function load(ObjectManager $manager)\n {\n $entities = Fixtures::load($this->getFixtures(), $manager);\n }", "private function loadGenerated(ObjectManager $em)\n {\n for ($i = 100; $i <= 130; $i++) {\n $fixture = new AlumniExperiences();\n\n $ref_aid = $this->getReference('alumni-anon-'.$i);\n\n $fixture\n ->setAlumni($em->merge($ref_aid))\n ->setOrganization('PT. '.$i)\n ->setDescription('Pekerjaan '.$i);\n\n $em->persist($fixture);\n }\n\n $em->flush();\n }", "protected function loadData(ObjectManager $em)\n {\n }", "public function load(ObjectManager $manager)\n {\n /**\n * Ingredients fixtures\n */\n\n // Ingredients List\n// $ingredientsList = array(\n// 'Cereals' => ['シリアル', 'cereals.jpg', 0],\n// 'Dairy' => ['乳製品', 'dairy.jpg', 0],\n// 'Fruits' => ['果物', 'fruits.jpg', 0],\n// 'Meat' => ['肉', 'meat.jpg', 0],\n// 'Nuts, seeds & oils' => ['ナツ、油', 'nuts-seeds-oils.jpg', 0],\n// 'Other ingredients' => ['その他', 'other-ingredients.jpg', 0],\n// 'Seafood' => ['シーフード', 'seafood.jpg', 0],\n// 'Spices & herbs' => ['スパイス&ハーブ', 'spices-and-herbs.jpg', 0],\n// 'Sugar products' => ['砂糖', 'sugar-products.jpg', 0],\n// 'Vegetables' => ['野菜', 'vegetables.jpg', 0]\n// );\n//\n// foreach ($ingredientsList as $key => $ingredient) {\n// $ingredientDb = new Ingredient();\n// $ingredientDb->setName($key);\n// $ingredientDb->setNameJa($ingredient[0]);\n// $ingredientDb->setImage($ingredient[1]);\n// $ingredientDb->setParent($ingredient[2]);\n//\n// $manager->persist($ingredientDb);\n// $manager->flush();\n// }\n\n// $parentPath = \"web/images/ingredients\";\n// $parentDir = new DirectoryIterator(dirname($parentPath.\"/*\"));\n// $filetypes = array(\"jpg\", \"png\");\n//\n// foreach ($parentDir as $fileParentInfo) {\n// if (!$fileParentInfo->isDot() && $fileParentInfo->isFile()) {\n//\n// $fullName = str_replace('-',' ', ucfirst(substr($fileParentInfo->getFilename(), 0, -4)));\n// $ingredientDb = new Ingredient();\n// $ingredientDb->setName($fullName);\n//\n// $ingredientDb->setImage($fileParentInfo->getFilename());\n// $ingredientDb->setParent(0);\n// $manager->persist($ingredientDb);\n// $manager->flush();\n//\n// $childPath = $parentPath.'/'.$fullName.'/*';\n// $currentId = $ingredientDb->getId();\n// $childDir = new DirectoryIterator(dirname($childPath));\n//\n// foreach ($childDir as $fileinfo) {\n// if (!$fileinfo->isDot() && $fileinfo->isFile() && in_array(strtolower($fileinfo->getExtension()), $filetypes)) {\n// var_dump($fileinfo->getFilename());\n//\n// $childFullName = str_replace('-',' ', ucfirst(substr($fileinfo->getFilename(), 0, -4)));\n// $ingredientDb = new Ingredient();\n// $ingredientDb->setName($childFullName);\n// $ingredientDb->setImage($fullName.'/'.$fileinfo->getFilename());\n// $ingredientDb->setParent($currentId);\n//\n// $manager->persist($ingredientDb);\n// $manager->flush();\n//\n// }\n// }\n// }\n// }\n\n\n// $dir = new DirectoryIterator(dirname(\"web/images/ingredients/vegetables/*\"));\n//\n//\n//\n// foreach ($dir as $fileinfo) {\n// if (!$fileinfo->isDot() && $fileinfo->isFile() && in_array(strtolower($fileinfo->getExtension()), $filetypes)) {\n//\n// $fullName = str_replace('-',' ', ucfirst(substr($fileinfo->getFilename(), 0, -4)));\n// $ingredientDb = new Ingredient();\n// $ingredientDb->setName($fullName);\n//// $ingredientDb->setNameJa($ingredient[0]);\n// $ingredientDb->setImage($fileinfo->getFilename());\n// $ingredientDb->setParent(10);\n////\n// $manager->persist($ingredientDb);\n// $manager->flush();\n//\n// }\n// }\n\n }", "public function load(ObjectManager $manager)\n {\n// $band->setName('Obituary' . rand(1, 100));\n// $band->setSubGenre('Death Metal');\n//\n// $manager->persist($band);\n// $manager->flush();\n \n Fixtures::load(__DIR__.'/fixtures.yml', $manager, [ 'providers' => [$this] ]);\n \n }", "public function load(ObjectManager $em)\n {\n $faker = FakerFactory::create();\n $admin = $this->getReference('user_admin');\n\n for ($i = 0 ; $i < 30 ; $i++) {\n $article = new Article();\n\n $article->setTitle($faker->sentence(4));\n $article->setAuthor($admin);\n $article->setContent('<p>'.$faker->text(500).'</p>');\n $article->setVisible(0 == $i % 2);\n $article->setCreated(new \\DateTime('-'.($i * 4).' day'));\n\n $em->persist($article);\n }\n\n $em->flush();\n }", "public function load(ObjectManager $manager)\n {\n // Array of data for the fixture\n $usersData = array(\n array(\n 'username' => 'superman',\n 'email' => '[email protected]',\n 'password' => 'sup',\n 'roles' => array('ROLE_ADMIN'),\n ),\n array(\n 'username' => 'batman',\n 'email' => '[email protected]',\n 'password' => 'bat',\n 'roles' => array('ROLE_ADMIN'),\n ),\n array(\n 'username' => 'spiderman',\n 'email' => '[email protected]',\n 'password' => 'spi',\n// 'roles' => array(),\n 'roles' => array('ROLE_USER'),\n ),\n array(\n 'username' => 'Martine',\n 'email' => '[email protected]',\n 'password' => 'mar',\n 'roles' => array(),\n ),\n array(\n 'username' => 'Jean',\n 'email' => '[email protected]',\n 'password' => 'jea',\n 'roles' => array(),\n ),\n array(\n 'username' => 'Marc',\n 'email' => '[email protected]',\n 'password' => 'mar',\n 'roles' => array(),\n ),\n array(\n 'username' => 'David',\n 'email' => '[email protected]',\n 'password' => 'dav',\n 'roles' => array(),\n ),\n\n );\n\n // Accessing the user manager service\n $userManager = $this->container->get('fos_user.user_manager');\n\n foreach ($usersData as $i => $userData)\n {\n $user = $userManager->createUser();\n $user->setUsername($userData['username']);\n $user->setEmail($userData['email']);\n $user->setPlainPassword($userData['password']);\n $user->setEnabled(true);\n $user->setRoles($userData['roles']);\n\n $manager->persist($user);\n $this->addReference(sprintf('user-%s', $i), $user);\n }\n $manager->flush();\n }", "public function loadData(ObjectManager $manager)\n {\n // $manager->persist($product);\n $this->createMany(50, \"abonne\", function($num){\n //\"abonne\" s'il est en clé étrangère dans une autre table\n //$num, quel numéro de boucle\n $prenom = $this->faker->firstName;\n $email = $prenom . \".\" . $this->faker->lastName . \"@yopmail.com\";\n return (new Abonne)->setPrenom($prenom)\n ->setEmail($email);\n });\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n for ($i=1; $i <= 100 ; $i++) { \n \t$article = new Article();\n \t$article->setTitre(\"Titre de l'article n°$i\")\n \t\t\t->setContenu(\"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repudiandae eum et vel inventore harum omnis minus. Minima neque perspiciatis, doloremque quia obcaecati harum, quae ut ipsa illo ad autem facilis beatae doloribus delectus veniam. Alias quibusdam praesentium saepe nisi repellat.\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci ab magnam dolor excepturi quidem blanditiis, consectetur reiciendis similique, voluptates incidunt odio accusantium quas.\n Officia sed, aliquid provident sapiente odio voluptate praesentium neque nobis, culpa animi consequatur ducimus atque repudiandae incidunt aperiam sint! Cum tempora hic velit.\n Dolorum pariatur facere vel consequuntur dignissimos a mollitia sint porro sequi, sed possimus temporibus eum. Ipsum facere quis eius harum, voluptates odit iusto.\n Mollitia, tempore, odio. Itaque sunt ducimus earum nostrum dolorum ratione saepe pariatur ipsum, in ad atque id, corporis, cum ea, omnis hic amet?\n Provident, iure quia nam minus praesentium velit hic placeat soluta ab recusandae, temporibus at aspernatur nisi magnam doloremque. Autem tempore inventore, unde architecto!\")\n \t\t\t->setDate(new \\DateTime());\n\n \t\t\t$manager->persist($article);\n }\n\n $manager->flush();\n }", "protected function reloadDataFixtures()\n {\n $em = $this->getEntityManager();\n $loader = new Loader;\n foreach ($this->dataFixturePaths as $path) {\n $loader->loadFromDirectory($path);\n }\n $purger = new ORMPurger($em);\n $executor = new ORMExecutor($em, $purger);\n $executor->execute($loader->getFixtures());\n $this->fixturesReloaded = true;\n }", "public function testLoadAllFixtures(): void\n {\n $this->loadFixtures();\n $article = $this->getTableLocator()->get('Articles')->get(1);\n $this->assertSame(1, $article->id);\n $category = $this->getTableLocator()->get('Categories')->get(1);\n $this->assertSame(1, $category->id);\n }", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "public function load(ObjectManager $manager)\n {\n //FOR LOAD METHOD WITHOUT DROP TABLE \"symfony console doctrine:fixtures:load --append\"\n $contenu_fichier_json = file_get_contents(__DIR__.'/datas.json');\n $datas = json_decode($contenu_fichier_json, true);\n\n foreach($datas['tools'] as $tools ){\n $user = new User();\n $user->setUsername($this->faker->userName)\n ->setEmail($this->faker->email)\n ->setRoles(User::ROLE_USER)\n ->setPassword($this->encoder->encodePassword($user, \"Hub3E2021!\"));\n $manager->persist($user);\n\n $newTools = new Tools();\n $newTools->setName($tools[\"name\"])\n ->setDescription($tools[\"description\"])\n ->setRelation($user);\n $manager->persist($newTools);\n }\n $simpleUser = new User();\n $simpleUser->setUsername(\"user\")\n ->setEmail(\"[email protected]\")\n ->setRoles(User::ROLE_USER)\n ->setPassword($this->encoder->encodePassword($simpleUser, \"Hub3E2021!\"));\n $manager->persist($simpleUser);\n\n $user = new User();\n $user->setUsername(\"admin\")\n ->setEmail(\"[email protected]\")\n ->setRoles(User::ROLE_ADMIN)\n ->setPassword($this->encoder->encodePassword($user, \"Hub3E2021!\"));\n $manager->persist($user);\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n #\n #\n //Fixtures::load(__DIR__.'/fixtures.yml', $manager);\n\n #\n # Same as above but with an extra 3th argument for the formatter providers\n # providers -> passing in this will add all providers to the yml file\n Fixtures::load(\n __DIR__.'/fixtures.yml',\n $manager,\n ['providers' => [$this] ]\n );\n\n\n\n #\n # Load yml file trough nativeloader\n #\n// $loader = new \\Nelmio\\Alice\\Fixtures\\Loader();\n// $objects = $loader->load(__DIR__.'/fixtures.yml', $manager);\n//\n// $persister = new \\Nelmio\\Alice\\Persister\\Doctrine($manager);\n// $persister->persist($objects);\n\n #\n # Loop a few times to create random entries\n #\n// // create 20 products! Bam!\n// for ($i = 0; $i < 20; $i++) {\n//\n// $genius = new Genius();\n// $genius->setName('Octopus'.rand(1, 100));\n// $genius->setSubFamily('Family'.rand(1, 100));\n// $genius->setSpeciesCount(rand(1, 100));\n// $genius->setFunFact('Funfact: '.rand(1, 100));\n// $genius->setLastUpdateAt( new \\DateTime(\"now\") );\n//\n// $manager->persist($genius);\n// $manager->flush();\n\n\n }", "public function load(ObjectManager $manager)\n {\n $userManager = $this->container->get('fos_user.user_manager');\n\n $user = $userManager->createUser();\n $user->setEmail('[email protected]');\n $user->setUsername('admin');\n $user->setname('admin');\n $user->setPlainPassword('admin');\n $user->setEnabled(true);\n $user->addRole('ROLE_ADMIN');\n $this->addReference('user-admin', $user);\n $userManager->updateUser($user);\n\n // Fixture article !\n for ($i = 0; $i < 8; $i++) {\n $Article = new Article();\n $Article->setTitle('Titre' . $i);\n $Article->setContent('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.');\n $Article->setPrice('1399');\n $Article->setMainPicture('fixture0.jpeg');\n $Article->setGalleryPicture(['fixture1.jpeg','fixture2.jpeg','fixture3.jpeg','fixture4.jpeg','fixture5.jpeg','fixture6.jpeg']);\n $manager->persist($Article);\n }\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // Instance de la classe Faker avec un paramètre pour obtenir les données dans la langue souhaitée ->\n $faker = \\Faker\\Factory::create('fr_FR');\n\n // Création d'un tableau regroupant tous les faux utilisateurs ->\n $users = [];\n\n /*-------------------------------\n | CREATION D'UTILISATEURS |\n -------------------------------*/\n\n for ($m = 0; $m <= 10; $m++) {\n $user = new User();\n $user->setEmail($faker->email())\n ->setUsername($faker->name())\n ->setPassword($this->encoder->encodePassword($user, 'password'));\n\n $manager->persist($user);\n\n // Envoi de l'utilisateur vers le tableau ->\n $users[] = $user;\n } // EO for\n\n /*-------------------------------------------------------------------\n | CREATION DE CATEGORIES, D'ARTICLES, DE COMMENTAIRES ET DE LIKES |\n -------------------------------------------------------------------*/\n\n // Création de 3 fakes catégories ->\n for ($i = 1; $i <= 3; $i++) {\n $category = new Category();\n $category->setTitle($faker->sentence())\n ->setDescription($faker->paragraph());\n\n // Pour préparer la persistance des données ->\n $manager->persist($category);\n\n // Création de fakes articles à l'intérieur de ces catégories (entre 4 et 6) ->\n for ($j = 1; $j <= mt_rand(4, 6); $j++) {\n $article = new Article();\n $article->setTitle($faker->sentence())\n ->setContent($faker->paragraphs(5, true))\n ->setImage($faker->imageUrl(640, 480, 'Article illustration'))\n ->setCreatedAt($faker->dateTimeBetween('-6 months'))\n ->setCategory($category);\n\n $manager->persist($article);\n\n // Création de fakes commentaires pour ces articles (entre 4 et 10) ->\n for ($k = 1; $k <= mt_rand(4, 10); $k++) {\n $comment = new Comment();\n\n // Pour le createdAt du commentaire (forcément compris entre la date de création de l'article et aujourd'hui) ->\n $days = (new \\DateTime())->diff($article->getCreatedAt())->days;\n\n $comment->setAuthor($faker->name())\n ->setContent($faker->paragraphs(2, true))\n ->setCreatedAt($faker->dateTimeBetween('-' . $days . ' days'))\n ->setArticle($article);\n\n $manager->persist($comment);\n } // EO for\n\n // Création de fakes likes pour ces articles (entre 0 et 10) ->\n for ($l = 1; $l <= mt_rand(0, 10); $l++) {\n $like = new ArticleLike();\n $like->setArticle($article)\n ->setUser($faker->randomElement($users));\n\n $manager->persist($like);\n } // EO for\n\n } // EO for\n\n } // EO for\n\n /*-----------------------------\n | ENVOI DES FAUSSES DONNÉES |\n -----------------------------*/\n\n $manager->flush();\n\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n //création de faux articles avec faker sans mettre de 'use'\n $faker = \\Faker\\Factory::create('fr_FR');\n for ($i=0; $i < 10; $i++) { \n $article = new Article();\n $article->setTitle($faker->word(2, true))\n ->setContent($faker->paragraphs(2, true))\n ->setImage($faker->imageUrl(300, 250))\n ->setCreatedAt($faker->dateTimeBetween('-6 month'));\n\n //sauvegarder article (objet) dans un tableau\n $manager->persist($article);\n }\n \n //envoie en bdd\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n foreach( AbstractDataFixtures::CATEGORIES as $cat => $sub){\n $slugger = new AsciiSlugger();\n $mainCat = new Category();\n $mainCat\n ->setName($cat)\n ->setSlug($slugger->slug($cat));\n \n $manager->persist($mainCat);\n \n foreach ($sub as $subcats) {\n $subCat = new Category();\n $subCat\n ->setName($subcats)\n ->setSlug($slugger->slug($subcats))\n ->setParent($mainCat);\n \n $manager->persist($subCat);\n\n // mise en memoire les entité pour pouvoir y acceder dans d'autres fixtures\n // addReference : 2 parametres\n // identifiant unique de la référence\n // entité liée à la référence\n $this->addReference(\"subcategory-$subcats\", $subCat);\n }\n }\n \n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n $this->manager = $manager;\n $this->faker = Faker\\Factory::create('fr_FR');\n\n // Executes the loadData function implemented by the user\n $this->loadData($manager);\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $faker = \\Faker\\Factory::create('fr_FR');\n $user = [];\n for($i=0; $i < 10; $i++){\n $user = new User();\n $user->setFirstname($faker->firstname());\n $user->setLastname($faker->lastname());\n $user->setEmail($faker->email());\n $user->setPassword($faker->password());\n $user->setCreatedAt(new\\DateTime());\n $user->setBirthday(new\\DateTime());\n $manager->persist($user);\n $users[]= $user;\n\n }\n\n $category =[];\n for($i=0; $i < 3; $i++){\n $category = new Category();\n $category->setTitle($faker->text(50));\n $category->setDescription($faker->text(250));\n $category->setImage($faker->imageUrl());\n $manager->persist($category);\n $categories[] = $category;\n }\n $articles = [];\n for($i=0; $i < 6; $i++){\n $article =new Article();\n $article->setTitle($faker->text(50));\n $article->setContent($faker->text(1000));\n $article->setImage($faker->imageUrl());\n $article->setCreatedAt(new\\DateTimeImmutable());\n $article->addCategory($categories[$faker->numberBetween(0,2)]);\n $article->setAuthor($users[$faker->numberBetween(0,9)]);\n $manager->persist($article);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n $faker = \\Faker\\Factory::create();\n\n $category = new Category();\n $category->setName($faker->sentence());\n $category->setDescription(\n $faker->realText($maxNbChars = 150, $indexSize = 2)\n );\n $manager->persist($category);\n $user = new User();\n $user->setUsername('username');\n $user->setEmail($faker->email());\n $user->setPassword($this->encoder->encodePassword($user, 'demo'));\n $user->setToken($faker->md5());\n $user->setIsValidated($faker->boolean());\n $user->setAvatar('avatarDefault.png');\n $user->setSubscribedAT($faker->dateTime());\n $user->setRoles(['ROLE_USER']);\n $manager->persist($user);\n for ($i = 1; $i <=10; $i++) {\n $trick = new Trick();\n $trick->setUser($user);\n $trick->setCategory($category);\n $trick->setName($faker->sentence());\n $content = '<p>'.join($faker->paragraphs(3), '</p><p>').'</p><p>';\n $trick->setDescription($content);\n $trick->setCreatedAt($faker->dateTime());\n $trick->setUpdatedAt($faker->dateTime());\n $manager->persist($trick);\n for ($j=1; $j<=5; $j++) {\n $comment = new Comment();\n $comment->setTrick($trick);\n $comment->setUser($user);\n $comment->setContent($faker->paragraph());\n $comment->setCommentedAt($faker->dateTime());\n $manager->persist($comment);\n }\n for ($k=1; $k<=3; $k++) {\n $image = new Illustration();\n $image->setTrick($trick);\n $image->setName($faker->name());\n $image->setUrl(\"fixtures$k.jpeg\");\n $manager->persist($image);\n }\n for ($m=1; $m<=3; $m++) {\n $media = new Video();\n $media->setTrick($trick);\n $media->setPlatform(\"youtube\");\n $media->setUrl('<iframe width=\"853\" height=\"480\" src=\"https://www.youtube.com/embed/V9xuy-rVj9w\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>');\n $manager->persist($media);\n }\n }\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // TODO : Lorsque les fonctions de location seront créer refaire cette fixture en prenant en compte les état des véhicule (loué ou disponible)\n\n $faker = Factory::create('fr_FR');\n\n $users = $this->userRepository->findAll();\n $vehicle = $this->vehicleRepository->findBy(['state' => true]);\n\n\n for ($i = 0; $i <= 10; $i++) {\n $rental = new Rental();\n $rental->setClient($faker->randomElement($users));\n $rental->setVehicle($faker->randomElement($vehicle));\n $rental->setStartRentalDate(new DateTime());\n $rental->setEstimatedReturnDate(new DateTime());\n $rental->setRealReturnDate(new DateTime());\n $rental->setPrice($faker->randomFloat(2, 20, 220));\n\n $manager->persist($rental);\n }\n\n $manager->flush();\n\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $faker = Factory::create('fr_FR');\n\n for($i=0;$i<15;$i++)\n {\n $post=new Post();\n $title=$faker->sentence($nbWords=5, $variableNbWords = true);\n $post->setTitle($title)\n ->setContent($faker->text($maxNbChars = 10000));\n\n $manager->persist($post);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $faker = Factory::create('fr_FR');\n \n $user = new User();\n $user->setFirstname('Matthieu')\n ->setLastname('Poncet')\n ->setEmail('[email protected]')\n ->setPassword($this->passwordHasher->hashPassword($user,'123456'))\n ->setCreatedAt(new \\DateTime($faker->date('Y-m-d h:i')))\n ->setValid(true)\n ->setRoles(['ROLE_ADMIN']);\n\n $manager->persist($user);\n\n\n for ($i=0; $i < 10; $i++) { \n $category = new Category();\n $category->setTitle($faker->sentence(3))\n ->setDescription($faker->realText(600))\n ->setPicture('https://picsum.photos/300/200?id='.uniqid())\n ->setSlug($faker->slug(4));\n\n $manager->persist($category);\n for ($j=0; $j < 10; $j++) { \n $article = new Article();\n $article->setTitle($faker->sentence(3))\n ->setSubtitle($faker->sentence(10))\n ->setContent($faker->realText(600))\n ->setCreateAt(new \\DateTime($faker->date('Y-m-d H:i')))\n ->setPublishedAt(new \\DateTime($faker->date('Y-m-d H:i')))\n ->setPicture('https://picsum.photos/300/200?id='.uniqid())\n ->setValid(true)\n ->setAuthor($user)\n ->addCategory($category)\n ->setSlug($faker->slug(4));\n \n $manager->persist($article); \n }\n\n }\n\n\n $manager->flush();\n }", "private function loadItems(ObjectManager $em, $items)\n {\n foreach ($items as $ref => $item) {\n $fixture = new AlumniExperiences();\n\n $ref_aid = $this->getReference('alumni-'.$item['aid']);\n\n $fixture\n ->setAlumni($em->merge($ref_aid))\n ->setOrganization($item['organization']);\n\n if (array_key_exists('description', $item)) {\n $fixture->setDescription($item['description']);\n }\n\n if (array_key_exists('job_position', $item)) {\n $fixture->setJobPosition($item['job_position']);\n }\n\n if (array_key_exists('year_in', $item)) {\n $fixture->setYearIn($item['year_in']);\n }\n\n if (array_key_exists('year_out', $item)) {\n $fixture->setYearOut($item['year_out']);\n }\n\n $em->persist($fixture);\n }\n $em->flush();\n }", "public function load(ObjectManager $manager)\n {\n $this->manager = $manager;\n $this->faker = Faker::create();\n\n $this->loadData($manager);\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n $faker = Factory::create('fr_FR');\n\n\n for ($i = 0; $i < 8; $i++) {\n $patient = new Patient();\n\n // $chrono = 1;\n\n $patient->setFirstName($faker->firstName())\n ->setLastName($faker->lastName)\n ->setBirthdate($faker->dateTimeBetween('-30 years', '-15 years'));\n\n $user = new User();\n $user->setUsername(strtolower(substr($patient->getFirstName(), 0, 1)) . '.' . strtolower($patient->getLastName()))\n ->setPatient($patient)\n ->setPassword($this->encoder->encodePassword($user, $patient->getBirthdate()->format('Y-m-d'))); // format mot de passe 2002-07-21\n\n $manager->persist($patient);\n $manager->persist($user);\n\n /*for ($c = 0; $c < mt_rand(0, 4); $c++) {\n $exercice = new Exercice();\n $exercice->setName(strtoupper($faker->randomLetter))\n ->setNumberOf($faker->numberBetween(5, 20))\n ->setPatient($patient)\n ->setChrono($chrono);\n\n $chrono++;\n\n $manager->persist($exercice);\n }*/\n }\n\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n $faker = \\Faker\\Factory::create();\n \n for($i=0; $i<5; $i++)\n { \n $categorie = new Categorie();\n $categorie ->setTitre ($faker->sentence())\n ->setResumer ($faker->paragraph());\n \n $manager ->persist($categorie);\n \n for($j=0; $j<10; $j++)\n {\n $article = new Article();\n $article ->setTitle($faker->sentence())\n ->setContent($faker->paragraph($nbSentences = 10, $variableNbSentences = true))\n ->setImage($faker->imageUrl($width=400, $height=200))\n ->setCreatedAt(new \\DateTime())\n ->setCategorie ($categorie);\n \n $manager->persist($article);\n \n for($k=0; $k<10; $k++)\n {\n $commentaire = new commentaire();\n $commentaire ->setAuteur($faker->userName())\n ->setCommentaire($faker->paragraph())\n ->setCreatedAt(new \\DateTime())\n ->setArticle ($article);\n\n $manager->persist($commentaire);\n\n }\n }\n }\n\n $manager->flush(); \n \n }", "protected function loadData(ObjectManager $manager)\n {\n for ($y = 0; $y < 15; $y++) {\n $this->createMany(User::class, 100, function (User $user, int $i) use ($y) {\n if ($y === 0 && $i === 0) {\n // Create default user\n $user\n ->setEmail('[email protected]')\n ->setFirstName('Default')\n ->setLastName('User')\n ->setAge($this->faker->numberBetween(15, 100))\n ->setSex($this->faker->randomElement(GenderEnum::getAvailableTypes()))\n ->setAboutMe($this->faker->text)\n ->setPassword($this->encoder->encodePassword($user, 'test'))\n ->setRoles(['ROLE_USER']);\n return;\n }\n\n // Create random users\n $user\n ->setEmail(($y + 1) . $i . $this->faker->email)\n ->setFirstName($this->faker->firstName)\n ->setLastName($this->faker->lastName)\n ->setAge($this->faker->numberBetween(7, 120))\n ->setSex($this->faker->randomElement(GenderEnum::getAvailableTypes()))\n ->setAboutMe($this->faker->text)\n ->setPassword($this->encoder->encodePassword($user, $user->getEmail()))\n ->setRoles(['ROLE_USER']);\n }, $y);\n\n $manager->flush();\n }\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $faker = Factory::create('fr_FR');\n\n for ($i = 0; $i < 10; $i++) {\n $post = new Post();\n $post->setTitle($faker->sentence($nbWords = 2, $variableNbWords = true))\n ->setContent($faker->sentence($nbWords = 10, $variableNbWords = true))\n ->setAuthor($faker->name())\n ->setCreatedAt($faker->dateTimeBetween('-6 months'));\n\n $manager->persist($post);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $faker = Faker\\Factory::create('fr_FR');\n //users \n // on créé 10 personnes\n for ($i = 0; $i < 10; $i++) {\n $user = new Users();\n $user->setName($faker->name);\n $manager->persist($user);\n\n $question = new Questions();\n $question->setTitle($faker->title);\n $question->setContent($faker->realText);\n $question->setUser($user);\n $manager->persist($question);\n\n $answer = new Answers();\n $answer->setContent($faker->realText);\n $answer->setStatus($faker->boolean);\n $answer->setQuestion($question);\n $manager->persist($answer);\n }\n\n //answers\n $manager->flush();\n }", "public function load(ObjectManager $em)\n {\n $faker = Faker\\Factory::create('fr_FR');\n\n for ($i = 0; $i < DataParameters::NB_PRODUCT; $i++)\n {\n $product = new Product();\n $product->setName($faker->word(1, true));\n $product->setDescription($faker->sentences(7, true));\n $em->persist($product);\n\n $this->setReference('product_id_' . $i, $product);\n }\n $em->flush();\n\n }", "public function load(ObjectManager $manager)\n {\n $content1 = new Content();\n $content1->setName(\"Test_Content_1\");\n $content1->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content1->setOrdinance(1);\n $manager->persist($content1);\n\n $content2 = new Content();\n $content2->setName(\"Test_Content_2\");\n $content2->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content2->setOrdinance(2);\n $manager->persist($content2);\n\n $content3 = new Content();\n $content3->setName(\"Test_Content_3\");\n $content3->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content3->setOrdinance(3);\n $manager->persist($content3);\n\n $content4 = new Content();\n $content4->setName(\"Test_Content_4\");\n $content4->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content4->setOrdinance(4);\n $manager->persist($content4);\n\n $content5 = new Content();\n $content5->setName(\"Test_Content_5\");\n $content5->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content5->setOrdinance(5);\n $manager->persist($content5);\n\n $manager->flush();\n }", "protected function loadData(ObjectManager $manager)\n {\n }", "public function load(ObjectManager $manager)\n {\n $date = new \\DateTime();\n\n\n for ($i = 0; $i < 20; $i++) {\n $article = new Article();\n $article->setTitle('article ' . $i);\n $article->setContent($this->generer_lipsum(300, 'words'));\n $article->setAuthor('Bibi');\n $article->setDate( $date );\n $article->setCategory('catégorie ' . mt_rand(1, 5));\n $article->setViewCount(mt_rand(1, 1000));\n\n $manager->persist($article);\n }\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n for ($i = 100; $i <= 105; $i++)\n {\n $jobs_sensio_labs = new Job();\n $jobs_sensio_labs->setCategory($manager->merge($this->getReference(\"category-programming\")));\n $jobs_sensio_labs->setType(\"full-time\");\n $jobs_sensio_labs->setCompany(\"Sensio Labs\" . $i);\n $jobs_sensio_labs->setLogo(\"sensio-labs.gif\");\n $jobs_sensio_labs->setUrl(\"http://www.sensiolabs.com/\");\n $jobs_sensio_labs->setPosition(\"Web Developer\");\n $jobs_sensio_labs->setLocation(\"Paris, France\");\n $jobs_sensio_labs->setDescription(\"You've already developed websites with symfony and you want to work with Open-Source technologies. You have a minimum of 3 years experience in web development with PHP or Java and you wish to participate to development of Web 2.0 sites using the best frameworks available.\");\n $jobs_sensio_labs->setHowToApply(\"Send your resume to fabien[a]sensio.com\");\n $jobs_sensio_labs->setIsPublic(true);\n $jobs_sensio_labs->setIsActivated(true);\n $jobs_sensio_labs->setEmail(\"[email protected]\");\n $jobs_sensio_labs->setExpiresAt(new \\DateTime(\"+30 days\"));\n\n $manager->persist($jobs_sensio_labs);\n }\n\n for ($i = 100; $i <= 130; $i++)\n {\n $job_extreme_sensio = new Job();\n $job_extreme_sensio->setCategory($manager->merge($this->getReference('category-design')));\n $job_extreme_sensio->setType('part-time');\n $job_extreme_sensio->setCompany('Extreme Sensio ' . $i);\n $job_extreme_sensio->setLogo('extreme-sensio.gif');\n $job_extreme_sensio->setUrl('http://www.extreme-sensio.com/');\n $job_extreme_sensio->setPosition('Web Designer');\n $job_extreme_sensio->setLocation('Paris, France');\n $job_extreme_sensio->setDescription('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.');\n $job_extreme_sensio->setHowToApply('Send your resume to fabien.potencier [at] sensio.com');\n $job_extreme_sensio->setIsPublic(true);\n $job_extreme_sensio->setIsActivated(true);\n $job_extreme_sensio->setEmail('[email protected]');\n $job_extreme_sensio->setExpiresAt(new \\DateTime('+30 days'));\n\n $manager->persist($job_extreme_sensio);\n }\n\n $manager->flush();\n }", "function load(ObjectManager $manager)\n\t{\n\t\t$entities = [\n\t\t\tEntity::createDefault(1, 18, 0), // 1\n\t\t\tEntity::createDefault(2, 5, 1), // 2\n\t\t\tEntity::createDefault(6, 15, 1), // 3\n\t\t\tEntity::createDefault(16, 17, 1), // 4\n\t\t\tEntity::createDefault(3, 4, 2), // 5\n\t\t\tEntity::createDefault(7, 8, 2), // 6\n\t\t\tEntity::createDefault(9, 10, 2), // 7\n\t\t\tEntity::createDefault(11, 14, 2), // 8\n\t\t\tEntity::createDefault(12, 13, 3), // 9\n\t\t];\n\t\tforeach ($entities as $entity) {\n\t\t\t$manager->persist($entity);\n\t\t}\n\t\t$manager->flush();\n\t}", "public function load(ObjectManager $manager)\n {\n $employees = array(\n array(\"remi\", \"rebeil\", \"blabla\", \"https://www.youtube.com/watch?v=HeNURpr3vaw\"),\n array(\"christophe\", \"lacassagne\", \"blathrhe\", \"https://www.youtube.com/watch?v=Ua4XhSoEQZ0\"),\n array(\"delphine\", \"janton\", \"zdfsdf\", \"https://www.youtube.com/watch?v=DD7hm67cfbc\"),\n );\n\n foreach ($employees as $employee) {\n $employeeObj = new Employees();\n $employeeObj->setFirstName($employee[0]);\n $employeeObj->setLastName($employee[1]);\n $employeeObj->setVideoDescription($employee[2]);\n $employeeObj->setVideoUrl($employee[3]);\n\n $manager->persist($employeeObj);\n unset($employeeObj);\n }\n $manager->flush();\n $manager->clear();\n }", "public function load(ObjectManager $manager)\r\n {\r\n\r\n $faker = Faker::create();\r\n foreach (range(1,20) as $key => $value){\r\n $tag = new Tag();\r\n $tag->setNome($faker->city);\r\n $this->addCustomers($tag);\r\n $this->addCampaigns($tag);\r\n $manager->persist($tag);\r\n }\r\n\r\n $manager->flush();\r\n }", "public function load(ObjectManager $manager)\n {\n // TODO: Implement load() method.\n //load medecin\n for($i=1;$i<20;$i++){\n $medecin= new Medecin();\n $medecin->setNomComplet('medecin'.$i);\n $medecin->setMatricule('mat'.$i);\n $manager->persist($medecin);\n }\n //load patient\n for($i=1;$i<20;$i++){\n $patient= new Patient();\n $patient->setNomComplet('patient'.$i);\n $patient->setDateNaissance(new \\DateTime());\n $patient->setNumDossier('dossier'.' '.$i);\n $manager->persist($patient);\n }\n $user = new User();\n $user->setEmail('[email protected]');\n $user->setUsername('admin');\n $user->setPlainPassword('admin');\n $user->setEnabled(true);\n $manager->persist($user);\n\n //events\n $schedule = new Schedule();\n $schedule->setTitle('Yoga class');\n $today = new \\DateTime();\n $endate= new \\DateTime(\"tomorrow\");\n $schedule->setStart($today);\n $schedule->setEnd($endate);\n $manager->persist($schedule);\n $schedule = new Schedule();\n $schedule->setTitle('German class');\n $tomorrow = new \\DateTime('tomorrow');\n $schedule->setStart($tomorrow);\n $schedule->setEnd($tomorrow);\n $manager->persist($schedule);\n $schedule = new Schedule();\n $schedule->setTitle('rendez vous');\n $tomorrow = new \\DateTime('tomorrow');\n $schedule->setStart($tomorrow);\n $schedule->setEnd($tomorrow);\n $manager->persist($schedule);\n\n //load crenneau medecin\n/* for($i=1;$i<20;$i++){\n $crenneauMedecin=new CreneauxMedecin();\n $crenneauMedecin->setCodeCrenneaux('creMedecin n°'.$i);\n $crenneauMedecin->setMedecin($manager->getRepository('AppBundle:Medecin')->findOneBy(array('nomComplet'=>'medecin'.$i)));\n $crenneauMedecin->setHeureDebut(new \\DateTime());\n $crenneauMedecin->setHeureFin(new \\DateTime());\n $manager->persist($crenneauMedecin);\n\n }*/\n $manager->flush();\n }", "public function createData(EntityManager $em);", "protected function createFixtures()\n {\n // Due to a dubious bug(?) in doctrine - product types need to be loaded first.\n $typeFixtures = new LoadProductTypes();\n $typeFixtures->load($this->entityManager);\n $this->productType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ID);\n $this->addonProductType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ADDON_ID);\n\n $countries = new LoadCountries();\n $countries->load($this->entityManager);\n\n $this->contactTestData = new ContactTestData($this->container);\n\n $loadCurrencies = new LoadCurrencies();\n $loadCurrencies->load($this->entityManager);\n\n $this->currency = $this->getCurrencyRepository()->findByCode($this->defaultCurrencyCode);\n\n $unitFixtures = new LoadUnits();\n $unitFixtures->load($this->entityManager);\n $this->orderUnit = $this->getProductUnitRepository()->find(self::ORDER_UNIT_ID);\n\n $this->contentUnit = $this->getProductUnitRepository()->find(self::CONTENT_UNIT_ID);\n\n $taxClasses = new LoadTaxClasses();\n $taxClasses->load($this->entityManager);\n $this->taxClass = $this->getTaxClassRepository()->find(self::TAX_CLASS_ID);\n\n $countryTaxes = new LoadCountryTaxes();\n $countryTaxes->load($this->entityManager);\n\n $collectionTypes = new LoadCollectionTypes();\n $collectionTypes->load($this->entityManager);\n\n $mediaTypes = new LoadMediaTypes();\n $mediaTypes->load($this->entityManager);\n\n $attributeTypes = new LoadAttributeTypes();\n $attributeTypes->load($this->entityManager);\n $this->attributeType = $this->getAttributeTypeRepository()->find(self::ATTRIBUTE_TYPE_ID);\n\n $statusFixtures = new LoadProductStatuses();\n $statusFixtures->load($this->entityManager);\n $this->productStatus = $this->getProductStatusRepository()->find(Status::ACTIVE);\n $this->productStatusChanged = $this->getProductStatusRepository()->find(Status::CHANGED);\n $this->productStatusImported = $this->getProductStatusRepository()->find(Status::IMPORTED);\n $this->productStatusSubmitted = $this->getProductStatusRepository()->find(Status::SUBMITTED);\n\n $deliveryStatusFixtures = new LoadDeliveryStatuses();\n $deliveryStatusFixtures->load($this->entityManager);\n }", "public function load()\n {\n $this\n ->objectManager\n ->createQuery('DELETE FROM ' . Member::class)\n ->execute()\n ;\n Fixtures::load(\n __DIR__ . '/../../fixtures/members.yml',\n $this->objectManager\n );\n }", "public function load(ObjectManager $manager)\n {\n $faker = Factory::create();\n\n foreach (['ile-mysterieuse', 'dale' ] as $bookRef) {\n $book = $this->getReference($bookRef);\n $exemplaire = new Exemplaire();\n\n $exemplaire->setLivre($book);\n\n $exemplaire->setDateAcquis($faker->dateTime)\n ->setCode($faker->ean8)\n ->setCout(5000)\n ->setEtat(\"parfait\");\n\n $exemplaire->getLivre()->addExemplaire($exemplaire);\n\n $manager->persist($exemplaire);\n $manager->persist($book);\n $manager->flush();\n\n $this->addReference(\"exemplaire-$bookRef\", $exemplaire);\n }\n\n\n }", "public function load(ObjectManager $manager) {\n for ($i = 0; $i < 2; $i++) {\n $jobFaker = Faker\\Factory::create();\n\n // Employeer\n $employeer = new Employeers();\n $employeer->setUsername(\"empleador_$i\");\n $employeer->setEmail(\"[email protected]\");\n $employeer->setPassword(\"4Vientos\");\n\n $employeer->setVCIF(\"82102288A\");\n $employeer->setVName($jobFaker->company);\n $employeer->setVLogo($jobFaker->imageUrl($width = 640, $height = 480));\n $employeer->setVDescription($jobFaker->sentence);\n $employeer->setVContactName($jobFaker->name);\n $employeer->setVContactPhone($jobFaker->phoneNumber);\n $employeer->setVContactMail($jobFaker->companyEmail);\n $employeer->setVLocation($jobFaker->address);\n $employeer->setNNumberOfWorkers($jobFaker->numberBetween(0, 255));\n $employeer->setCreationUser(\"InitialFixture\");\n $employeer->setCreationDate(new \\DateTime(\"2018-6-1\"));\n $employeer->setModificationUser(\"InitialFixture\");\n $employeer->setModificationDate(new \\DateTime(\"2018-6-1\"));\n\n $manager->persist($employeer);\n\n // Poemas\n \n $poema = new poemas();\n $poema->setUser();\n $poema->setTexto($texto);\n $poema->setCategory();\n \n // Offer\n $offer = new Offers();\n $offer->setVOfferCode(\"ACTIVE\");\n $offer->setVOfferType('full-time');\n $offer->setDActivationDate(new \\DateTime(\"2019-1-1\"));\n $offer->setDDueDate(new \\DateTime(\"2019-2-$i\"));\n $offer->setVPosition(\"Developer\");\n $offer->setLtextDuties($jobFaker->paragraph);\n $offer->setLtextDescription($jobFaker->paragraph);\n $offer->setVSalaray(\"1200\");\n $offer->setLtextExperienceRequirements($jobFaker->paragraph);\n $offer->setVLocation($jobFaker->city . ', ' . $jobFaker->country);\n\n $offer->setEmployeer($employeer);\n\n $offer->setCreationUser(\"InitialFixture\");\n $offer->setCreationDate(new \\DateTime(\"2018-6-1\"));\n $offer->setModificationUser(\"InitialFixture\");\n $offer->setModificationDate(new \\DateTime(\"2018-6-1\"));\n\n $manager->persist($offer);\n }\n\n // Creating 2 FormedStudents\n for ($i = 0; $i < 2; $i++) {\n $studentFaker = Faker\\Factory::create();\n\n $formedStudent = new FormerStudents();\n $formedStudent->setUsername(\"exalumno_$i\");\n $formedStudent->setEmail(\"[email protected]\");\n $formedStudent->setPassword(\"4Vientos\");\n\n $formedStudent->setVNIF($studentFaker->randomNumber(6));\n $formedStudent->setVName($studentFaker->firstName);\n $formedStudent->setVSurnames($studentFaker->lastName);\n $formedStudent->setVAddress($studentFaker->streetAddress);\n $formedStudent->setDBirthDate($studentFaker->dateTime);\n $formedStudent->setBVehicle($studentFaker->boolean);\n\n $formedStudent->setCreationUser(\"InitialFixture\");\n $formedStudent->setCreationDate(new \\DateTime(\"2018-8-1\"));\n $formedStudent->setModificationUser(\"InitialFixture\");\n $formedStudent->setModificationDate(new \\DateTime(\"2018-6-1\"));\n $manager->persist($formedStudent);\n }\n\n \n\n\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n\n $faker = Faker\\Factory::create('en_US');\n\n // Creating admin user\n $admin = new User();\n $admin->setEmail('[email protected]');\n $admin->setRoles(['ROLE_ADMIN']);\n $admin->setPassword($this->passwordEncoder->encodePassword(\n $admin,\n 'adminpassword'\n ));\n\n $manager->persist($admin);\n\n // Creating cluber user : run team\n $cluber = new User();\n $cluber->setEmail('[email protected]');\n $cluber->setRoles(['ROLE_CLUBER']);\n $cluber->setPassword($this->passwordEncoder->encodePassword(\n $cluber,\n 'clubpassword'\n ));\n $manager->persist($cluber);\n\n // Creating cluber user : swim team\n $cluber2 = new User();\n $cluber2->setEmail('[email protected]');\n $cluber2->setRoles(['ROLE_CLUBER']);\n $cluber2->setPassword($this->passwordEncoder->encodePassword(\n $cluber2,\n 'clubpassword'\n ));\n $manager->persist($cluber2);\n\n // Fixtures for profil -(//\n $profilClub = new ProfilClub();\n $profilClub->setNameClub('Run Team');\n $profilClub->setCityClub('Lille');\n $profilClub->setLogoClub('avatar2.jpg');\n $profilClub->setDescriptionClub('Petite equipe Lilloise');\n $profilClub->addUser($cluber);\n $manager->persist($profilClub);\n\n $profilClub2 = new ProfilClub();\n $profilClub2->setNameClub('Swim Team');\n $profilClub2->setCityClub('Douai');\n $profilClub2->setLogoClub(\n 'https://image.shutterstock.com/image-vector/swimming-club-logo-design-swimmer-600w-255149764.jpg'\n );\n $profilClub2->setDescriptionClub('Club de natation');\n $profilClub2->addUser($cluber2);\n $manager->persist($profilClub2);\n\n // Fixtures for profil Solo//\n $profilSolo = new ProfilSolo();\n $profilSolo->setLastname('Doe');\n $profilSolo->setFirstname('Jonh');\n $profilSolo->setBirthdate(new DateTime(141220));\n $profilSolo->setDescription('J\\'ai perdu la mémoire ! Mais j\\'aime nager en crawl.');\n $profilSolo->setGender(0);\n $profilSolo->setAvatar('https://randomuser.me/api/portraits/men/97.jpg');\n $profilSolo->setEmergencyContactName('Pascale Dino');\n $profilSolo->setLevel(1);\n $profilSolo->setSportFrequency(2);\n $profilSolo->setPhone('0000000000');\n $profilSolo->setEmergencyPhone('0000000000');\n $profilSolo->setProfilClub($profilClub2);\n $manager->persist($profilSolo);\n\n // Fixtures for profil Solo2//\n $profilSolo2= new ProfilSolo();\n $profilSolo2->setLastname('Franz');\n $profilSolo2->setFirstname('Albert');\n $profilSolo2->setBirthdate(new DateTime(141220));\n $profilSolo2->setDescription('Je suis Albert');\n $profilSolo2->setGender(0);\n $profilSolo2->setAvatar('https://randomuser.me/api/portraits/men/97.jpg');\n $profilSolo2->setEmergencyContactName('Pascale Dino');\n $profilSolo2->setLevel(1);\n $profilSolo2->setSportFrequency(2);\n $profilSolo2->setPhone('0000000000');\n $profilSolo2->setEmergencyPhone('0000000000');\n $profilSolo2->setProfilClub($profilClub2);\n $manager->persist($profilSolo2);\n\n\n // Creating lambda user\n $user = new User();\n $user->setProfilSolo($profilSolo);\n $user->setEmail('[email protected]');\n $user->setRoles(['ROLE_USER']);\n $user->setPassword($this->passwordEncoder->encodePassword(\n $user,\n 'userpassword'\n ));\n\n \n $manager->persist($user);\n\n /* $users[] = $user;*/\n \n // Creating lambda user2\n $user2 = new User();\n $user2->setProfilSolo($profilSolo2);\n $user2->setEmail('[email protected]');\n $user2->setRoles(['ROLE_USER']);\n $user2->setPassword($this->passwordEncoder->encodePassword(\n $user2,\n 'userpassword'\n ));\n $manager->persist($user2);\n\n // Fixtures for sportCategory//\n $sportCategory = new SportCategory();\n $sportCategory->setNameCategory('Running');\n $manager->persist($sportCategory);\n\n // Fixtures for sport//\n $sport= new Sport();\n $sport->setSportName('Course à pied');\n $sport->setSportCategory($sportCategory);\n $manager->persist($sport);\n\n // Fixtures for event page//\n $event = new Event();\n $event->setNameEvent('Entrainement de course ');\n $event->setLevelEvent(1);\n $event->setDateEvent($faker->dateTimeThisMonth);\n $event->setTimeEvent($faker->dateTimeThisMonth);\n $event->setDescription('Courses dans la nature');\n $event->setParticipantLimit('10');\n $event->setPlaceEvent('23 place des ecoliers 59000 Lille');\n $event->setSport($sport);\n $event->setCreatorClub($profilClub);\n $manager->persist($event);\n\n // Fixtures for GeneralChatClub\n $messageClub = new GeneralChatClub();\n $messageClub->setProfilClub($profilClub2);\n $messageClub->setDateMessage(new DateTime('now'));\n $messageClub->setContentMessage('Bonjour, je suis un club de natation');\n $manager->persist($messageClub);\n\n \n //participation\n /*for ($j = 0; $j < mt_rand(0, 10); $j++) {\n $participationLike = new ParticipationLike();\n\n $participationLike->setEvent($event)\n ->setUser($faker->randomElement($users));\n $manager->persist($participationLike);\n\n\n $manager->flush();\n }*/\n\n $messageClub2 = new GeneralChatClub();\n $messageClub2->setProfilClub($profilClub);\n $messageClub2->setDateMessage(new DateTime('now'));\n $messageClub2->setContentMessage('Bonjour, je suis un club de run');\n $manager->persist($messageClub2);\n\n $messageSolo = new GeneralChatClub();\n $messageSolo->setProfilClub($profilClub2);\n $messageSolo->setProfilSolo($profilSolo);\n $messageSolo->setDateMessage(new DateTime('now'));\n $messageSolo->setContentMessage('Bonjour, je suis John.');\n $manager->persist($messageSolo);\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n $exampleSet = array();\n\n shuffle(self::$tweets);\n shuffle(self::$growls);\n shuffle(self::$hisses);\n\n shuffle(self::$feathersDescriptions);\n shuffle(self::$furDescriptions);\n shuffle(self::$scaleDescriptions);\n\n shuffle(self::$names);\n\n $this->loadMammals($exampleSet);\n $this->loadReptiles($exampleSet);\n $this->loadBirds($exampleSet);\n\n foreach ($exampleSet as $example)\n {\n $manager->persist($example);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $person1 = new Person();\n $person1->setPseudo('MOI')\n ->setLastname('Pikachu')\n ->setLevel(100)\n ->setGuild('Pokemon')\n ->setRank($this->getReference(RankFixtures::RANK_ONE))\n ->setImage('')\n ->setUser($this->getReference(UserFixtures::USER_ONE));\n\n $manager->persist($person1);\n $manager->flush();\n\n $person2 = new Person();\n $person2->setPseudo('KAL-EL')\n ->setLastname('Kent')\n ->setFirstname('Clark')\n ->setLevel(90)\n ->setGuild('Alien')\n ->setRank($this->getReference(RankFixtures::RANK_TWO))\n ->setImage('')\n ->setUser($this->getReference(UserFixtures::USER_TWO));\n\n $manager->persist($person2);\n $manager->flush();\n\n $person3 = new Person();\n $person3->setPseudo('One-PunchMan')\n ->setLastname('Saitama')\n ->setLevel(90)\n ->setGuild('Human')\n ->setRank($this->getReference(RankFixtures::RANK_TWO))\n ->setImage('')\n ->setUser($this->getReference(UserFixtures::USER_THREE));\n\n $manager->persist($person3);\n $manager->flush();\n\n $person4 = new Person();\n $person4->setPseudo('Mugiwara')\n ->setName('Monkey.D')\n ->setFirstname('Luffy')\n ->setLevel(80)\n ->setGuild('Pirate')\n ->setRank($this->getReference(RankFixtures::RANK_FOUR))\n ->setImage('')\n ->setUser($this->getReference(UserFixtures::USER_FOUR));\n\n $manager->persist($person4);\n $manager->flush();\n\n }", "public function load(ObjectManager $manager)\n {\n $user = new User();\n $user\n ->setUsername('admin')\n ->setEmail('[email protected]')\n ->setIsActive(true)\n ;\n $password = $this->encoder->encodePassword($user, '20E!xI&$Zx');\n $user->setPassword($password);\n\n $manager->persist($user);\n\n\n $user = new User();\n $user\n ->setUsername('pete')\n ->setEmail('[email protected]')\n ->setIsActive(true)\n ;\n $password = $this->encoder->encodePassword($user, 'shuoop');\n $user->setPassword($password);\n\n $manager->persist($user);\n\n // Create some customers\n for ($i = 0; $i < 25; $i++) {\n $cust = new Customer();\n $cust\n ->setAccountRef('CUST000' . $i)\n ->setName($this->faker->company)\n ->setTelephone($this->faker->phoneNumber)\n ->setEmail($this->faker->companyEmail)\n ->setContactName($this->faker->name)\n ->setAddress($this->address())\n ;\n $manager->persist($cust);\n }\n\n // Create some vehicles\n for ($i = 0; $i < 15; $i++) {\n $vehicle = new Vehicle();\n $vehicle\n ->setRegistration(strtoupper($this->vehicleReg()))\n ->setModel(ucfirst($this->faker->word))\n ->setMake(ucfirst($this->faker->word))\n ->setVehicleType($manager->getReference(VehicleType::class, $this->vehicleTypes()[array_rand($this->vehicleTypes())]))\n ->setDepth($this->faker->randomFloat(2, 0, 100))\n ->setWidth($this->faker->randomFloat(2, 0, 100))\n ->setHeight($this->faker->randomFloat(2, 0, 100))\n ;\n $manager->persist($vehicle);\n }\n\n // Create some drivers\n for ($i = 0; $i < 15; $i++) {\n $driver = new Driver();\n $driver\n ->setName($this->faker->name)\n ->setTelephone($this->faker->phoneNumber)\n ->setEmail($this->faker->freeEmail)\n ->setTradingName($driver->getName())\n ->setAddress($this->address())\n ->setSubcontractor(false)\n ;\n $manager->persist($driver);\n }\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n for ($i = 0; $i < 20; $i++) {\n $article = new Article();\n $article->setTitle('product '.$i)\n ->setSlug(\"product-\".$i)\n ->setContent(\"Contenu du produit...\")\n ->setPicture(\"\")\n ->setIsPublished(true)\n ->setPublishedAt(new \\DateTime('now'))\n ->setUpdatedAt(new \\DateTime('now'))\n ;\n $manager->persist($article);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n\n $parent = new Parents();\n $parent->setPrenom(\"Soiei\");\n $parent->setNom(\"SIe\");\n $parent->setEmail(\"SIseos\");\n $parent->setAdr(\"SOskaoisa\");\n $parent->setMethodeContact(\"OISoeie\");\n $parent->setTel(\"S0Keiosk\");\n $parent->setResponsable(\"OSkes\");\n\n $parents=new ArrayCollection();\n $parents->add($parent);\n\n // create 20 products! Bam!\n for ($i = 0; $i < 3; $i++) {\n $eleve = new Eleve();\n $parent->setEleve($eleve);\n\n $eleve->setNom('NomEns '.$i);\n $eleve->setPrenom('PrenomEns '.$i);\n $eleve->setUsername('setUsername '.$i);\n $eleve->setPassword('setPassword '.$i);\n $eleve->setEmail('setEmail '.$i);\n $eleve->setAdresse('setAdresse '.$i);\n $eleve->setRoles(['ROLE_ELEVE']);\n $eleve->setImageName(\"tester.jpg\");\n $eleve->setDateNaissance(new \\DateTime());\n $eleve->setTelephone(\"2205826\".$i);\n $eleve->setSex(\"H\");\n $eleve->addParent($parent);\n\n\n $manager->persist($eleve);\n $this->addReference('eleve'.$i, $eleve);\n\n }\n\n $manager->flush();\n }", "protected function _loadFixture($fixture)\n {\n $this->db->query(file_get_contents(\n NL_TEST_DIR.\"/tests/migration/fixtures/$fixture.sql\"\n ));\n }", "public function load(ObjectManager $manager)\r\n {\r\n $disciplinas = $manager->getRepository('BackendBundle:Disciplinas')->findAll();\r\n\r\n foreach ($disciplinas as $disciplina) {\r\n $deportesTinn = new CampeonatoDisciplina();\r\n $deportesTinn->setMaximo(50); \r\n $deportesTinn->setMinimo(50);\r\n $deportesTinn->setInicio(new \\DateTime('2016-11-21'));\r\n $deportesTinn->setFin(new \\DateTime('2016-12-16'));\r\n $deportesTinn->setDisciplina($disciplina);\r\n $deportesTinn->setCampeonato($this->getReference('campeonato'));\r\n $deportesTinn->setAbierto(50);\r\n $deportesTinn->setEntrenador(1);\r\n $deportesTinn->setAsistente(1);\r\n $deportesTinn->setDelegado(1);\r\n $deportesTinn->setMedico(1);\r\n $deportesTinn->setLogistico(1);\r\n $manager->persist($deportesTinn);\r\n $manager->flush(); \r\n }\r\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n $empresa1=new Empresas();\n $empresa1->setNombre(\"Vodafone\");\n $empresa1->setDireccion('C/La piruleta 34');\n $empresa1->setFechaRegistro(new \\DateTime('2019-05-04'));\n $manager->persist($empresa1);\n\n $empresa2=new Empresas();\n $empresa2->setNombre(\"Apple\");\n $empresa2->setDireccion('C/Inventada 24');\n $empresa2->setFechaRegistro(new \\DateTime('1980-03-10'));\n $manager->persist($empresa2);\n\n $empresa3=new Empresas();\n $empresa3->setNombre(\"Xiaomi\");\n $empresa3->setDireccion('C/Inexistente 1');\n $empresa3->setFechaRegistro(new \\DateTime('2010-06-12'));\n $manager->persist($empresa3);\n\n $empresa4=new Empresas();\n $empresa4->setNombre(\"Acer\");\n $empresa4->setDireccion('Avda. El Brillante 9');\n $empresa4->setFechaRegistro(new \\DateTime('2004-08-22'));\n $manager->persist($empresa4);\n\n $empresa5=new Empresas();\n $empresa5->setNombre(\"Philips\");\n $empresa5->setDireccion('C/No se 7');\n $empresa5->setFechaRegistro(new \\DateTime('1995-06-02'));\n $manager->persist($empresa5);\n\n\n $empleado1=new Empleados();\n $empleado1->setNombre('Manuel');\n $empleado1->setApellidos('Jimenez Rodriguez');\n $empleado1->setEstadoCivil('soltero');\n $empleado1->setActivo(true);\n $empleado1->setImagen(null);\n $empleado1->setEmpresa($empresa1);\n $empleado1->setNumeroHijos(0);\n $empleado1->setFechaNacimiento(new \\DateTime('2020-01-01'));\n $manager->persist($empleado1);\n\n $empleado2=new Empleados();\n $empleado2->setNombre('Gonzalo');\n $empleado2->setApellidos('Sanchez Lopez');\n $empleado2->setEstadoCivil('divorciado');\n $empleado2->setActivo(true);\n $empleado2->setImagen(null);\n $empleado2->setEmpresa($empresa1);\n $empleado2->setNumeroHijos(1);\n $empleado2->setFechaNacimiento(new \\DateTime('1940-05-10'));\n $manager->persist($empleado2);\n\n $empleado3=new Empleados();\n $empleado3->setNombre('Maria');\n $empleado3->setApellidos('Fernandez Alamo');\n $empleado3->setEstadoCivil('casado');\n $empleado3->setActivo(true);\n $empleado3->setImagen(null);\n $empleado3->setEmpresa($empresa1);\n $empleado3->setNumeroHijos(3);\n $empleado3->setFechaNacimiento(new \\DateTime('1990-01-01'));\n $manager->persist($empleado3);\n\n $empleado4=new Empleados();\n $empleado4->setNombre('Ana');\n $empleado4->setApellidos('Cabezas Rodriguez');\n $empleado4->setEstadoCivil('viudo');\n $empleado4->setActivo(true);\n $empleado4->setImagen(null);\n $empleado4->setEmpresa($empresa2);\n $empleado4->setNumeroHijos(0);\n $empleado4->setFechaNacimiento(new \\DateTime('1993-04-10'));\n $manager->persist($empleado4);\n\n $empleado5=new Empleados();\n $empleado5->setNombre('Raul');\n $empleado5->setApellidos('Prieto Martinez');\n $empleado5->setEstadoCivil('soltero');\n $empleado5->setActivo(true);\n $empleado5->setImagen(null);\n $empleado5->setEmpresa($empresa3);\n $empleado5->setNumeroHijos(0);\n $empleado5->setFechaNacimiento(new \\DateTime('2001-05-12'));\n $manager->persist($empleado5);\n\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n $entry1 = new Entry();\n $entry1->setAvgSpeed(10.0);\n $dateInput = \"2014-01-01\";\n $date = $date = new DateTime();\n $date->setTimestamp(strtotime($dateInput));\n $entry1->setDate($date);\n $entry1->setDistance(12);\n $entry1->setTime(1.2);\n $entry1->setUserId(2);\n $manager->persist($entry1);\n\n $entry2 = new Entry();\n $entry2->setAvgSpeed(2.0);\n $dateInput = \"2013-01-01\";\n $date = $date = new DateTime();\n $date->setTimestamp(strtotime($dateInput));\n $entry2->setDate($date);\n $entry2->setDistance(10);\n $entry2->setTime(5);\n $entry2->setUserId(2);\n $manager->persist($entry2);\n\n\n print(\"Creating some entries\");\n $manager->flush();\n\n }", "public function load(ObjectManager $manager): void\n {\n for ($i = 1; $i < 16; $i++) {\n $task = new Task();\n $task\n ->setTitle('task'.$i)\n ->setContent(\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius at ligula nec sollicitudin.'\n )\n ->setCreatedAt(new DateTime())\n ;\n if ($i < 6) {\n $task->setAuthor(null);\n } elseif ($i > 5 && $i < 11) {\n $task->setAuthor(\n $this->getReference(UserFixtures::AUTHOR_REFERENCE_PREFIX.'1')\n );\n } elseif ($i > 10) {\n $task->setAuthor(\n $this->getReference(UserFixtures::AUTHOR_REFERENCE_PREFIX.'2')\n );\n }\n\n $manager->persist($task);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n /* for($i = 1; $i <= 10; $i++){\n $eleve = new Eleve();\n\n $eleve->setNom(\"Nom n° {$i} \")\n ->setPrenom(\"Prenom n° {$i} \")\n ->setDateNaissanceAt(new \\DateTime())\n ->setMoyenne($i)\n ->setAppreciation(\"Appreciation n° {$i} \")\n ;\n \n $manager->persist($eleve);\n } */\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n\n $images = [\n 'ballon.jpg',\n 'hamac.jpg',\n 'ventilo.jpg',\n 'parasol.jpg',\n 'ete.jpg',\n 'mer-ete.jpg',\n 'ete-plage.jpg'\n\n ];\n\n //Recuperation du Faker\n $generator = Factory::create('fr_FR');\n // Populateur d'Entités (se base sur /src/Entity)\n $populator = new Populator($generator, $manager);\n\n //Creation des categories\n $populator->addEntity(Category::class, 10);\n $populator->addEntity(Tag::class, 20);\n $populator->addEntity(User::class, 20);\n $populator->addEntity(Product::class, 30, [\n 'price' => function () use ($generator) {\n return $generator->randomFloat(2, 0, 9999999, 99);\n },\n 'imageName' => function() use ($images) {\n return $images[rand(0, sizeof($images)-1)];\n }\n\n\n ]);\n\n // Flush\n $populator->execute();\n }", "public function load(ObjectManager $manager)\n {\n $faker = \\Faker\\Factory::create();\n $projets = $manager->getRepository(Projet::class)->findAll();\n $devis = $manager->getRepository(Devis::class)->findAll();\n\n $facture = new Facture();\n $facture->setIdProjet( $projets[array_rand($projets)]);\n $facture->setAutresCharges($faker->randomFloat());\n $facture->setDevis($devis[array_rand($devis)]);\n $facture->setNbrHeures($faker->randomDigitNotNull);\n $facture->setNomFacture($faker->randomLetter);\n $facture->setPrixHT($faker->randomFloat());\n $facture->setPrixTTC($faker->randomFloat());\n $facture->setTauxH($faker->randomDigitNotNull);\n $manager->persist($facture);\n\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n $p1 = new Post();\n $p1->setTitle('Donec mollis turpis orci');\n $p1->setBody('Ut molestie lectus porttitor vel. Aenean sagittis sed mi vitae suscipit. Maecenas eu odio risus. Cras ut libero in diam faucibus condimentum in sit amet sem. Nullam ac varius libero, ac suscipit nisl. Vivamus ullamcorper tortor in lacus lacinia, a porttitor quam iaculis. Vestibulum nec tincidunt sapien, nec maximus diam. Aliquam lobortis sit amet lacus sed maximus. Fusce posuere eget enim nec mollis. Nam vel leo posuere, consectetur sapien sit amet, pulvinar justo.');\n $p1->setAuthor($this->getAuthor($manager, 'David'));\n\n $p2 = new Post();\n $p2->setTitle('Sed pharetra blandit velit id laoreet');\n $p2->setBody('Nulla sodales justo eleifend ipsum efficitur vehicula. In vel pretium libero. Vestibulum dignissim tortor eu efficitur faucibus. Nullam dictum dictum orci, ut consequat mauris volutpat quis. Nam blandit porta orci, aliquet mollis elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean maximus nibh vel purus mollis, eget egestas ipsum viverra. Ut eu maximus enim, vitae luctus magna. In vitae facilisis magna. Nulla ut condimentum metus, ut condimentum odio. Etiam euismod massa id nibh scelerisque, sit amet condimentum enim malesuada.');\n $p2->setAuthor($this->getAuthor($manager, 'Eddie'));\n\n $p3 = new Post();\n $p3->setTitle('Nullam dignissim ipsum sed faucibus finibus');\n $p3->setBody('Maecenas in dui ex. Integer luctus dui metus, eu elementum elit aliquet non. Vestibulum mollis ullamcorper risus. Donec pharetra, mauris at malesuada faucibus, orci odio vehicula risus, id euismod tortor mauris sed libero. Nam libero risus, pharetra quis tortor ut, dapibus luctus dolor. Etiam consequat fermentum lectus. Phasellus id tempus purus, sed ullamcorper dolor. In id justo nibh.');\n $p3->setAuthor($this->getAuthor($manager, 'Eddie'));\n\n $manager->persist($p1);\n $manager->persist($p2);\n $manager->persist($p3);\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n $p1 = new Personne();\n $p1->setNom(\"Milo\");\n $manager->persist($p1);\n\n $p2 = new Personne();\n $p2->setNom(\"Tya\");\n $manager->persist($p2);\n\n $p3 = new Personne();\n $p3->setNom(\"Lili\");\n $manager->persist($p3);\n\n $continent1=new Continent();\n $continent1->setLibelle(\"Europe\");\n $manager->persist($continent1);\n\n $continent2=new Continent();\n $continent2->setLibelle(\"Asie\");\n $manager->persist($continent2);\n\n $continent3=new Continent();\n $continent3->setLibelle(\"Afrique\");\n $manager->persist($continent3);\n\n $continent4=new Continent();\n $continent4->setLibelle(\"Océanie\");\n $manager->persist($continent4);\n\n $continent5=new Continent();\n $continent5->setLibelle(\"Amérique\");\n $manager->persist($continent5);\n\n $c1 = new Famille();\n $c1 ->setDescription(\"Animaux vertébrés nourissant leurs petis avec du lait\")\n ->setLibelle(\"Mammifères\")\n ;\n $manager->persist($c1);\n\n $c2 = new Famille();\n $c2 ->setDescription(\"Animaux vertébrés qui rampent\")\n ->setLibelle(\"Reptiles\")\n ;\n $manager->persist($c2);\n\n $c3 = new Famille();\n $c3 ->setDescription(\"Animaux invertébrés du monde aquatique\")\n ->setLibelle(\"Poissons\")\n ;\n $manager->persist($c3);\n\n\n $a1= new Animal();\n $a1->setNom(\"Chien\")\n ->setDescription(\"Un animal domestique\")\n ->setImage(\"chien.png\")\n ->setPoids(10)\n ->setDangereux(false)\n ->setFamille($c1)\n ->addContinent($continent1)\n ->addContinent($continent2)\n ->addContinent($continent3)\n ->addContinent($continent4)\n ->addContinent($continent5)\n\n ;\n $manager->persist($a1);\n\n $a2= new Animal();\n $a2->setNom(\"Cochon\")\n ->setDescription(\"Un animal d'élevage\")\n ->setImage(\"cochon.png\")\n ->setPoids(300)\n ->setDangereux(false)\n ->setFamille($c1)\n ->addContinent($continent1)\n ->addContinent($continent5)\n\n\n ;\n $manager->persist($a2);\n\n $a3= new Animal();\n $a3->setNom(\"Serpent\")\n ->setDescription(\"Un animal dangereux\")\n ->setImage(\"serpent.png\")\n ->setPoids(5)\n ->setDangereux(true)\n ->setFamille($c2)\n ->addContinent($continent2)\n ->addContinent($continent3)\n ->addContinent($continent4)\n\n ;\n $manager->persist($a3);\n\n $a4= new Animal();\n $a4->setNom(\"Crocodile\")\n ->setDescription(\"Un animal très dangereux\")\n ->setImage(\"croco.png\")\n ->setPoids(500)\n ->setDangereux(true)\n ->setFamille($c2)\n ->addContinent($continent3)\n ->addContinent($continent4)\n ;\n $manager->persist($a4);\n\n $a5= new Animal();\n $a5->setNom(\"Requin\")\n ->setDescription(\"Un animal marin très dangereux\")\n ->setImage(\"requin.png\")\n ->setPoids(800)\n ->setDangereux(true)\n ->setFamille($c3)\n ->addContinent($continent4)\n ->addContinent($continent5)\n ;\n $manager->persist($a5);\n\n $d1 = new Dispose();\n $d1 ->setPersonne($p1)\n ->setAnimal($a1)\n ->setNb(30);\n $manager->persist($d1);\n\n $d2 = new Dispose();\n $d2 ->setPersonne($p1)\n ->setAnimal($a2)\n ->setNb(10);\n $manager->persist($d2);\n\n $d3 = new Dispose();\n $d3 ->setPersonne($p1)\n ->setAnimal($a3)\n ->setNb(2);\n $manager->persist($d3);\n \n $d4 = new Dispose();\n $d4 ->setPersonne($p2)\n ->setAnimal($a3)\n ->setNb(5);\n $manager->persist($d4);\n\n $d5 = new Dispose();\n $d5 ->setPersonne($p2)\n ->setAnimal($a4)\n ->setNb(2);\n $manager->persist($d5);\n\n $d6 = new Dispose();\n $d6 ->setPersonne($p3)\n ->setAnimal($a5)\n ->setNb(20);\n $manager->persist($d6);\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $faker = Factory::create('fr_FR');\n\n for ($i = 0; $i < 30; $i++){\n $adherent = new Adherent();\n for ($i = 0; $i < 2; $i++){\n $sexe = new Sexe();\n $sexe->setNom($faker->lastName);\n $manager->persist($sexe);\n }\n for ($j = 0; $j < 2; $j++){\n $filiere = new Filiere();\n $filiere->setNom($faker->lastName);\n $manager->persist($filiere);\n }\n for ($i = 0; $i < 5; $i++){\n $poste = new Poste();\n $poste->setNom($faker->lastName);\n $manager->persist($poste);\n }\n $adherent\n ->setNom($faker->name)\n ->setPrenom($faker->lastName)\n ->setSexe($sexe)\n ->setPoste($poste)\n ->setFiliere($filiere)\n ->setMatricule('20G0062'.$i)\n ->setMdp('password');\n $manager->persist($adherent);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n $translator = $this->container->get(\"translator\");\n\n /* These are the standard data of the system */\n $standardInserts = [\n [\n 'layoutId' => 0,\n 'title' => $translator->trans('Listing'),\n 'updated' => new \\DateTime(),\n 'entered' => new \\DateTime(),\n 'status' => 'enabled',\n 'price' => 0.00,\n 'catId' => '',\n 'editable' => 'n',\n ],\n ];\n\n $repository = $manager->getRepository('ListingBundle:ListingTemplate');\n\n foreach ($standardInserts as $listingTemplateInsert) {\n $query = $repository->findOneBy([\n 'title' => $listingTemplateInsert['title'],\n ]);\n\n $listingTemplate = new ListingTemplate();\n\n /* checks if the ListingTemplate already exist so they can be updated or added */\n if ($query) {\n $listingTemplate = $query;\n }\n\n $listingTemplate->setLayoutId($listingTemplateInsert['layoutId']);\n $listingTemplate->setTitle($listingTemplateInsert['title']);\n $listingTemplate->setUpdated($listingTemplateInsert['updated']);\n $listingTemplate->setEntered($listingTemplateInsert['entered']);\n $listingTemplate->setStatus($listingTemplateInsert['status']);\n $listingTemplate->setPrice($listingTemplateInsert['price']);\n $listingTemplate->setCatId($listingTemplateInsert['catId']);\n $listingTemplate->setEditable($listingTemplateInsert['editable']);\n\n $manager->persist($listingTemplate);\n }\n\n $manager->flush();\n }", "function load(ObjectManager $manager)\n {\n\n $data = $this->getData();\n\n foreach ($data as $userData) {\n $user = new User();\n\n $user->setUsername($userData['username']);\n $user->setEmail($userData['email']);\n $user->setPlainPassword($userData['plainPassword']);\n $user->setEnabled($userData['enabled']);\n $user->setSuperAdmin($userData['superAdmin']);\n $manager->persist($user);\n $manager->flush();\n $this->setReference($userData['reference'], $user);\n }\n\n// $manager->flush();\n//\n// $admin = new User();\n// $admin->setUsername('admin');\n// $admin->setEmail('[email protected]');\n// $admin->setPlainPassword('admin');\n// $admin->setEnabled(true);\n// $admin->setSuperAdmin(true);\n// $manager->persist($admin);\n//\n// $user1 = new User();\n// $user1->setUsername('user1');\n// $user1->setEmail('[email protected]');\n// $user1->setPlainPassword('user1');\n// $user1->setEnabled(true);\n// $user1->setSuperAdmin(false);\n// $manager->persist($user1);\n//\n// $manager->flush();\n//\n// $this->setReference('user_admin', $admin);\n// $this->setReference('user_user1', $user1);\n }", "protected function getFixtures()\n {\n return array(\n // __DIR__ . '/../../Resources/fixtures/majora_entitys.yml',\n );\n }", "public function load(ObjectManager $manager)\n {\n $ushuaia = new Localidad();\n $ushuaia->setNombre('Ushuaia');\n $ushuaia->setCodigoPostal('9410');\n $rioGrande = new Localidad();\n $rioGrande->setNombre('Río Grande');\n $rioGrande->setCodigoPostal('9420');\n\n $manager->persist($ushuaia);\n $manager->persist($rioGrande);\n $manager->flush();\n\n // Los objetos $ushuaia y $riogrande pueden ser referenciados por otros\n // fixtures que tengan un orden más alto, vía 'ushuaia' y 'riogrande'.\n $this->addReference('ushuaia', $ushuaia);\n $this->addReference('riogrande', $rioGrande);\n\n }", "protected function setUp()\n {\n self::bootKernel();\n\n $this->em = static::$kernel->getContainer()\n ->get('doctrine')\n ->getManager();\n $schemaTool = new SchemaTool($this->em);\n $metadata = $this->em->getMetadataFactory()->getAllMetadata();\n\n // Drop and recreate tables for all entities\n $schemaTool->dropSchema($metadata);\n $schemaTool->createSchema($metadata);\n $users = new LoadUserData();\n $users->setContainer(static::$kernel->getContainer());\n $users->load($this->em);\n }", "public function load(ObjectManager $manager)\n {\n $seed = [];\n for ($i = 0; $i < 20; $i += 2) {\n $seed[$i] = $this->faker->dateTimeBetween('-1 month', 'yesterday');\n $seed[$i+1] = $this->faker->dateTimeInInterval($seed[$i], '+10 hours');\n }\n\n sort($seed);\n\n for ($i = 0; $i < 20; $i += 2) {\n $interval = new TimeInterval();\n /** @var Task $task */\n $task = $this->getReference('Task-' . random_int(1, 5));\n if ($task->getCreatedAt() > $seed[$i]) {\n $task->setCreatedAt($this->faker->dateTimeInInterval($seed[$i], '-2 days'));\n }\n\n $interval->setStartsAt($seed[$i])\n ->setEndsAt($seed[$i+1])\n ->setTask($task)\n ;\n\n $manager->persist($interval);\n }\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n //*\n $faker= Faker\\Factory::create();\n for ($i=0;$i<5;$i++){\n $group = new Group();\n $group->setName($faker->company);\n $group->setRoles(array($this->getRandomRole()));\n $manager->persist($group);\n }\n $manager->flush();\n //*/\n }", "public function load(ObjectManager $em)\n {\n\n /* Create lucie.ginette with teacher role and student role */\n $testUser1 = new User();\n $testUser1->setLogin(\"lucie.ginette\");\n $testUser1->setFirstName(\"Lucie\");\n $testUser1->setLastName(\"GINETTE\");\n $testUser1->setMail(\"[email protected]\");\n $testUser1->setAuthType('internal');\n $testUser1->setSalt(md5(time()));\n $encoder = $this->container->get('security.encoder_factory')->getEncoder($testUser1);\n $testUser1->setPassword($encoder->encodePassword('1234', $testUser1->getSalt()));\n $testUser1->setStudentRole(new StudentRole());\n $testUser1->setTeacherRole(new TeacherRole());\n\n /* Create marc.thomas with admin role */\n $testUser2 = new User();\n $testUser2->setLogin(\"marc.thomas\");\n $testUser2->setFirstName(\"Marc\");\n $testUser2->setLastName(\"THOMAS\");\n $testUser2->setMail(\"[email protected]\");\n $testUser2->setAuthType('internal');\n $testUser2->setSalt(md5(time()));\n $encoder = $this->container->get('security.encoder_factory')->getEncoder($testUser2);\n $testUser2->setPassword($encoder->encodePassword('5678', $testUser2->getSalt()));\n $testUser2->setAdminRole(new AdminRole());\n\n /* Creation of 10 generic sample students */\n for ($i = 0; $i < 10; $i++) {\n $testUser = new User();\n $testUser->setLogin('student.' . $i);\n $testUser->setFirstName('StudentFirstName ' . $i);\n $testUser->setLastName('StudentLastName ' . $i);\n $testUser->setMail('student.' . $i . '@lms.local');\n $testUser->setAuthType('internal');\n $testUser->setSalt(md5(time()));\n $encoder = $this->container->get('security.encoder_factory')->getEncoder($testUser);\n $testUser->setPassword($encoder->encodePassword('student' . $i, $testUser->getSalt()));\n $testUser->setStudentRole(new StudentRole());\n $em->persist($testUser);\n }\n\n $em->persist($testUser1);\n $em->persist($testUser2);\n $em->flush();\n }", "public function load(ObjectManager $manager)\n {\n for ($i = 0; $i < 5; $i++) {\n $equipo = new Equipos();\n $equipo->setNombre('Equipo '.$i);\n $manager->persist($equipo);\n for ($x = 0; $x < 23; $x++) {\n $jugador = new Jugadores();\n $jugador->setNombre(\"Nombre \".$x);\n $jugador->setApellido(\"Apellido \".$x);\n $jugador->setEquipos($equipo);\n $manager->persist($jugador);\n }\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n for ($i = 1; $i < 6; $i++) {\n $task = new Task();\n $task->setName($this->faker->jobTitle)\n ->setDescription($this->faker->text());\n\n $this->addReference('Task-' . $i, $task);\n $manager->persist($task);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n // configurer la langue\n //$faker = Factory::create('fr_FR');\n //for ($p=0; $p < 3; $p++) { \n //$users = new User();\n //$harsh = $this->encoder->encodePassword($users, 'password');\n // users\n //$users->setPrenom($faker->firstname);\n //$users->setNom($faker->lastname);\n //$users->setPassword($harsh);\n //$users->setEmail($faker->email);\n //$users->setProfil($this->getReference(ProfilFixtures::PROFIL));\n //$users->setProfil($this->getReference($p));\n\n // persist\n //$manager->persist($users);\n //}\n\n //$manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // TODO: Implement load() method.\n $participant1 = new Participant();\n $participant1->setNom('BAUDRY');\n $participant1->setPrenom('Quentin');\n $participant1->setPseudo('qbaudry');\n $participant1->setTelephone('0123456789');\n $participant1->setMail('[email protected]');\n $participant1->setRoles(['ROLE_USER']);\n $participant1->setActif(false);\n $password = $this->encoder->encodePassword($participant1, '123');\n $participant1->setPassword($password);\n $site = $this->getReference(SiteFixture::SITE_REFERENCE1);\n $participant1->setSite($site);\n\n $participant2 = new Participant();\n $participant2->setNom('TENAUD');\n $participant2->setPrenom('Willy');\n $participant2->setPseudo('wtenaud');\n $participant2->setTelephone('0123456789');\n $participant2->setMail('[email protected]');\n $participant2->setRoles(['ROLE_USER']);\n $participant2->setActif(true);\n $password = $this->encoder->encodePassword($participant2, '123');\n $participant2->setPassword($password);\n $site = $this->getReference(SiteFixture::SITE_REFERENCE4);\n $participant2->setSite($site);\n\n $participant3 = new Participant();\n $participant3->setNom('LELODET');\n $participant3->setPrenom('Bastien');\n $participant3->setPseudo('blelodet');\n $participant3->setTelephone('0123456789');\n $participant3->setMail('[email protected]');\n $participant3->setRoles(['ROLE_USER']);\n $participant3->setActif(true);\n $password = $this->encoder->encodePassword($participant3, '123');\n $participant3->setPassword($password);\n $site = $this->getReference(SiteFixture::SITE_REFERENCE3);\n $participant3->setSite($site);\n\n $participant4 = new Participant();\n $participant4->setNom('SUPER');\n $participant4->setPrenom('Admin');\n $participant4->setPseudo('admin');\n $participant4->setTelephone('0123456789');\n $participant4->setMail('[email protected]');\n $participant4->setRoles(['ROLE_ADMIN']);\n $participant4->setActif(true);\n $password = $this->encoder->encodePassword($participant4, '123');\n $participant4->setPassword($password);\n $site = $this->getReference(SiteFixture::SITE_REFERENCE1);\n $participant4->setSite($site);\n\n $manager->persist($participant1);\n $manager->persist($participant2);\n $manager->persist($participant3);\n $manager->persist($participant4);\n\n $photo1 = new Profil();\n $photo1->setParticipant($participant1);\n $photo2 = new Profil();\n $photo2->setParticipant($participant2);\n $photo3 = new Profil();\n $photo3->setParticipant($participant3);\n $photo4 = new Profil();\n $photo4->setParticipant($participant4);\n\n $manager->persist($photo1);\n $manager->persist($photo2);\n $manager->persist($photo3);\n $manager->persist($photo4);\n\n $manager->flush();\n\n $this->addReference(self::PARTICIPANT_REFERENCE1, $participant1);\n $this->addReference(self::PARTICIPANT_REFERENCE2, $participant2);\n $this->addReference(self::PARTICIPANT_REFERENCE3, $participant3);\n $this->addReference(self::PARTICIPANT_REFERENCE4, $participant4);\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $faker = Factory::create();\n $faker->seed(2);\n\n for ($i = 0; $i < 20; $i++) {\n $user = $this->getReference('users_user' . $faker->numberBetween(1, 24));\n $article = $this->getReference('articles_article' . $faker->numberBetween(0, 19));\n \n $share = new Shares();\n $share\n ->setArticles($article)\n ->setUser($user)\n ->setSharedAt($faker->dateTimeInInterval('-10 months', '+6 months'));\n $manager->persist($share);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n for($i=1; $i<= 50; $i++){\n //génération aléatoire de date\n $timestamp = mt_rand(1, time());\n $randomDate = date('Y-m-d H:i:s', $timestamp);\n //tableau d'auteurs\n $auteurs = ['Verlaine', 'Hugo', 'Voltaire', 'Philip K Dick', 'Zola', 'Dumas', 'Molière'];\n //génération de lorem\n $content = simplexml_load_file('http://www.lipsum.com/feed/xml?amount=1&what=paras&start=0')->lipsum;\n\n $user = new User();\n if($i===1){\n $roles = ['ROLE_ADMIN', 'ROLE_USER'];\n }else{\n $roles = ['ROLE_USER'];\n }\n $user->setUsername('user' .$i);\n $user->setEmail('user'.$i.'@gmail.com');\n $user->setRoles($roles);\n $plainPwd = 'mdp';\n $mdpEncoded = $this->encoder->encodePassword($user, $plainPwd);\n $user->setPassword($mdpEncoded);\n\n\n\n\n $categorie = new Categorie();\n $categorie->setLibelle('catégorie' . $i);\n $categorie->setDescription('description' . $i);\n $categorie->setDateCreation(new \\DateTime($randomDate));\n\n $message = new Message();\n $message->setSujet('sujet' .$i);\n $message->setContenu($content);\n $message->setEmail('email' .$i);\n $message->setNom($auteurs[array_rand($auteurs)]);\n $message->setDateenvoi(new \\DateTime($randomDate));\n\n $article = new Article();\n $article->setTitle('title' .$i);\n $article->setContent($content);\n $article->setAuthor($auteurs[array_rand($auteurs)]);\n $article->setDatePubli(new \\DateTime($randomDate));\n\n\n\n $manager->persist($categorie);\n $manager->persist($message);\n $manager->persist($article);\n $manager->persist($user);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\r\n {\r\n $data = [\r\n [\r\n 'fields' =>\r\n [\r\n 'familyStatus' => 'Single',\r\n ],\r\n 'reference' => 'family_status_1'\r\n ],\r\n [\r\n 'fields' =>\r\n [\r\n 'familyStatus' => 'Married',\r\n ],\r\n 'reference' => 'family_status_2'\r\n ],\r\n [\r\n 'fields' =>\r\n [\r\n 'familyStatus' => 'Divorced',\r\n ],\r\n 'reference' => 'family_status_3'\r\n ],\r\n [\r\n 'fields' =>\r\n [\r\n 'familyStatus' => 'Widowed',\r\n ],\r\n 'reference' => 'family_status_4'\r\n ],\r\n [\r\n 'fields' =>\r\n [\r\n 'familyStatus' => 'In active search',\r\n ],\r\n 'reference' => 'family_status_5'\r\n ],\r\n [\r\n 'fields' =>\r\n [\r\n 'familyStatus' => 'It\\'s Complicated',\r\n ],\r\n 'reference' => 'family_status_6'\r\n ],\r\n ];\r\n\r\n foreach ($data as $itemData) {\r\n $entity = $this->fillEntityFromArray($itemData['fields'], \\ApiBundle\\Entity\\FamilyStatuses::class);\r\n $manager->persist($entity);\r\n if(array_key_exists('reference', $itemData)){\r\n $this->addReference($itemData['reference'], $entity);\r\n }\r\n }\r\n $manager->flush();\r\n\r\n }", "public function load(ObjectManager $manager)\r\n {\r\n $suffix = 'A';\r\n for($i=0;$i<10;$i++)\r\n {\r\n $project = (new Project())\r\n ->setName('Project'.$suffix);\r\n $suffix++;\r\n\r\n $manager->persist($project);\r\n }\r\n\r\n $manager->flush();\r\n }", "public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }", "public function load(ObjectManager $manager)\n {\n $actividades = $manager->createQuery('Select a FROM EquipoBundle:Actividad a')\n ->setMaxResults(20)\n ->getResult();\n\n foreach ($actividades as $actividad) {\n\n for ($j=1; $j<=5; $j++) {\n $anuncio = new Anuncio();\n\n $nombre = $this->getNombre();\n $anuncio->setNombre($nombre);\n $anuncio->setDescripcion($this->getDescripcion());\n $anuncio->setSlug(Util::slugify($nombre));\n $anuncio->setFecha(new \\DateTime('now - '.rand(1, 150).' days'));\n $anuncio->setActividad($actividad);\n\n $manager->persist($anuncio);\n\n }\n }\n $manager->flush();\n }", "public function load(ObjectManager $om)\n {\n // auto save to db example\n // $members = Fixtures::load(__DIR__.'/members.yml', $om);\n\n $loader = new Loader();\n $members = $loader->load(__DIR__.'/members.yml');\n\n\n $manager = $this->container->get('member.manager');\n\n\n foreach ($members as $member) {\n $manager->updateMember($member, false);\n }\n\n $persister = new Doctrine($om);\n $persister->persist($members);\n }", "public function load(ObjectManager $manager)\n {\n $centers = Yaml::parseFile(__DIR__.'/centersData.yaml');\n\n // loop on 3 centers and set data\n for ($i = 0; $i < 3; $i++) {\n // Center\n $center = New Center();\n $center->setName($centers['name'][$i]);\n $center->setCode(124 + $i);\n $center->setPicture((124 + $i).'.jpg');\n $center->setDescription($centers['description'][$i]);\n\n $address = new Address();\n $address->setAddress($centers['address'][$i]);\n $address->setCity($centers['city'][$i]);\n $address->setZipCode($centers['zipCode'][$i]);\n\n $center->setAddress($address);\n\n $this->addReference(\"center\".$i, $center);\n\n $manager->persist($center);\n }\n\n $manager->flush();\n }", "function load(ObjectManager $manager)\n {\n $data = $this->getData();\n $i = 0;\n\n foreach ($data as $categoryName) {\n $category = new Category();\n $category->setTitle($categoryName);\n $manager->persist($category);\n $this->addReference('category_' . (++$i), $category);\n\n $subData = $this->getData($i);\n $j = 0;\n foreach ($subData as $subcategoryName) {\n $subCategory = new Category();\n $subCategory->setTitle($subcategoryName);\n $subCategory->setParent($category);\n $manager->persist($subCategory);\n $this->addReference('category_' . $i . '_' . (++$j), $subCategory);\n }\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n \t$admin = (new User('admin'))\n \t\t\t\t->setPlainPassword('123')\n \t\t\t\t->addRole(User::ROLE_ADMIN);\n// $tokenAdmin = $JWTTokenManager->create($admin);\n\n \t$customer = (new User('customer'))\n \t\t\t\t->setPlainPassword('123')\n \t\t\t\t->addRole(User::ROLE_CUSTOMER);\n// $tokenCustomer = $JWTTokenManager->create($customer);\n\n \t$manager->persist($admin);\n \t$manager->persist($customer);\n\n $coffeesData = [\n ['name' => 'ristretto', 'intensity' => 10, 'price' => 3, 'stock' => 20],\n ['name' => 'cubita', 'intensity' => 6, 'price' => 2, 'stock' => 50],\n ['name' => 'bustelo', 'intensity' => 9, 'price' => 6, 'stock' => 5],\n ['name' => 'serrano', 'intensity' => 10, 'price' => 3, 'stock' => 10]\n ];\n\n foreach ($coffeesData as $key => $value) {\n $coffee = (new Coffee())\n ->setName($value['name'])\n ->setIntensity($value['intensity'])\n ->setTextPrice($value['price'])\n ->setStock($value['stock']);\n $manager->persist($coffee);\n }\n\n $manager->flush();\n }", "public function load(ObjectManager $dbmanager)\n {\n $employee1 = Employee::createUser(\"johndoe\", \"password123\", \"John Doe\", \"[email protected]\", \"123-456-7890\");\n $employee2 = Employee::createUser(\"janedoe\", \"password123\", \"Jane Doe\", \"[email protected]\", null);\n $employee3 = Employee::createUser(\"billybob\", \"password123\", \"Billy Bob\", \"[email protected]\", \"198-765-4321\");\n $employee4 = Employee::createUser(\"kevinbacon\", \"password123\", \"Kevin Bacon\", \"[email protected]\", \"534-765-6524\");\n $employee5 = Employee::createUser(\"jamesbond\", \"password123\", \"James Bond\", \"[email protected]\", \"432-007-2353\");\n\n $dbmanager->persist($employee1);\n $dbmanager->persist($employee2);\n $dbmanager->persist($employee3);\n $dbmanager->persist($employee4);\n $dbmanager->persist($employee5);\n\n # Create a bunch of managers\n $manager1 = Manager::createUser(\"randyrhoads\", \"password123\", \"Randy Roads\", \"[email protected]\", \"333-231-4432\");\n $manager2 = Manager::createUser(\"dansmith\", \"password123\", \"Dan Smith\", null, \"883-233-4441\");\n\n $dbmanager->persist($manager1);\n $dbmanager->persist($manager2);\n\n # Create a bunch of shifts\n $begin = new \\DateTime('2017-10-01 08:00:00');\n $end = new \\DateTime('2017-11-01 08:00:00');\n\n # A shift for every day inbetween the above dates\n $interval = new \\DateInterval('P1D');\n $daterange = new \\DatePeriod($begin, $interval ,$end);\n\n $managers = [$manager1, $manager2];\n $employees = [$employee1, $employee2, $employee3, $employee4, $employee5, null];\n\n # Create three shifts for each day with random employees and random managers.\n # The null value in the employee list is to allow for empty shifts\n foreach($daterange as $date){\n $shiftEmployeesKeys = array_rand($employees, 3);\n $shiftManagerKey = array_rand($managers);\n\n foreach ($shiftEmployeesKeys as $employeeKey) {\n $startDateTime = clone $date;\n $endDateTime = clone $date;\n $endDateTime->modify('+8 hours');\n\n $shift = new Shift();\n $shift->setStartTime($startDateTime);\n $shift->setEndTime($endDateTime);\n $shift->setBreak(0.5);\n $shift->setEmployee($employees[$employeeKey]);\n $shift->setManager($managers[$shiftManagerKey]);\n $dbmanager->persist($shift);\n }\n }\n\n $dbmanager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // projects\n $preorder = new Project();\n $preorder->setName('preorder.it');\n $preorder->setSlug('preorder-it');\n $preorder->setUrl('http://preorder.it');\n $preorder->setDate(new \\DateTime('now'));\n $preorder->setDescription('Press-releases and reviews of the latest electronic novelties. The possibility to leave a pre-order.');\n $preorder->setUsers('<dl><dt>art-director and designer</dt><dd>Oleg Ulasyuk</dd></dl>');\n $preorder->setOnFrontPage(0);\n $preorder->setOrdernum(0);\n $preorder->addCategory($manager->merge($this->getReference('category-development')));\n $manager->persist($preorder);\n\n $eprice = new Project();\n $eprice->setName('eprice.kz');\n $eprice->setSlug('eprice-kz');\n $eprice->setUrl('http://eprice.kz');\n $eprice->setDate(new \\DateTime('now'));\n $eprice->setDescription('Comparison of the prices of mobile phones, computers, monitors, audio and video in Kazakhstan');\n $eprice->setOnFrontPage(1);\n $eprice->setOrdernum(1);\n $eprice->addCategory($manager->merge($this->getReference('category-development')));\n $manager->persist($eprice);\n\n $manager->flush();\n\n $this->addReference('project-preorder', $preorder);\n $this->addReference('project-eprice', $eprice);\n\n for ($i = 0; $i < 16; $i++) {\n $example = new Project();\n $example->setName('example.com_' . $i);\n $example->setSlug('example-com_' . $i);\n $example->setUrl('http://example.com');\n $example->setDate(new \\DateTime('now'));\n $example->setDescription('As described in RFC 2606, we maintain a number of domains such as EXAMPLE.COM and EXAMPLE.ORG for documentation purposes. These domains may be used as illustrative examples in documents without prior coordination with us. They are not available for registration.');\n $example->setOnFrontPage(0);\n $example->setOrdernum(2 + $i);\n $example->addCategory($manager->merge($this->getReference('category-development')));\n $manager->persist($example);\n }\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n $categories = $this->categoryRepository->findAll();\n $type = $this->typeRepository->findAll();\n\n for($i = 1; $i < 40; $i++){\n $product = new Product();\n $name = 'product' . $i;\n\n $product->setPrice(rand(3, 50));\n $product->setName($name);\n $product->setCategory($categories[array_rand($categories)]);\n $product->setSlug($this->slugify->slugify($name));\n $product->setDescription('whatever' . $i);\n $product->setProductType($type[array_rand($type)]);\n\n $manager->persist($product);\n }\n $manager->flush();\n }", "public function loadFixtures($path) : void\n {\n /** @var EntityManager $em */\n $em = $this->getApplicationServiceLocator()->get(EntityManager::class);\n $em->getConnection()->exec('SET foreign_key_checks = 0');\n $loader = new Loader();\n $loader->loadFromDirectory($path);\n $purger = new ORMPurger($em);\n $purger->setPurgeMode(ORMPurger::PURGE_MODE_TRUNCATE);\n $executor = new ORMExecutor($em, $purger);\n $executor->execute($loader->getFixtures());\n $em->getConnection()->exec('SET foreign_key_checks = 1');\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "public function setUp()\n {\n $this->fixtures('articles');\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n // Créer 2 Catégories\n $category1 = (new Category())->setLabel(\"fruit\");\n $category2 = (new Category())->setLabel(\"exotic\");\n //setProduct\n $manager->persist($category1, $category2);\n\n // Créer 1 Images\n $picture = new Picture();\n $picture\n ->setUrl(\"https://dummyimage.com/200x100.png\")\n ->setDescription(\"iezfj\");\n $manager->persist($picture);\n \n // Créer 3 Produits\n $products = [\n \"Banana\" => 3,\n \"Apple\" => 2,\n \"Grapes\"=> 4\n ];\n\n $productEntity = [];\n\n foreach ($products as $k => $v) {\n $fruit = new Product();\n $fruit\n ->setTitle($k)\n ->setPrice($v)\n ->setRef(\"773894\")\n ->setDescription(\"tasty fruit\")\n ->setInStock(true)\n ->setStockQuantiy(42)\n ->setCategory($category1)\n ->addPicture($picture);\n \n $productEntity[] = $fruit;\n $manager->persist($fruit);\n }\n\n // Créer 1 Utilisateur\n $user = new User();\n $user\n ->setEmail(\"[email protected]\")\n ->setPassword(\"zeiopjJIO%ZEOIJ\")\n ->setCreatedAt(new \\DateTime())\n ->setFirstName(\"Joe\")\n ->setLastName(\"Crazy\");\n $manager->persist($user);\n \n // Créer 2 Lignes de commandes\n $orderLine = new OrderLine();\n $orderLine\n ->setQuantity(34);\n $manager->persist($orderLine);\n \n // Créer 1 Commande\n $order = new Order();\n $order\n ->setCreatedAt(new \\DateTime())\n ->setShippingAt(new \\DateTime(\"2021-08-19\"))\n ->setTotal(42,2)\n ->setValid(false)\n ->addOrderLine($orderLine)\n ->setUser($user);\n\n $manager->persist($order);\n\n\n //////\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n// $pegawai1 = new Pegawai();\n// $pegawai1->setNama('Pegawai 1');\n// $pegawai1->setUser(NewUserFixtures::USER_SUPER_ADMIN);\n// $pegawai1->setTempatLahir('Jakarta');\n// $pegawai1->setTanggalLahir(new DateTimeImmutable());\n// $pegawai1->setJenisKelamin(JenisKelaminFixtures::LAKI);\n// $pegawai1->setAgama(AgamaFixtures::AGAMA_1);\n// $pegawai1->setNik('9999999999999999');\n// $pegawai1->setNip9('999999999');\n// $pegawai1->setNip18('999999999999999999');\n// $manager->persist($pegawai1);\n//\n// $manager->flush();\n//\n// $this->addReference(self::PEGAWAI_1, $pegawai1);\n }", "public function load(ObjectManager $manager)\n {\n // Url\n $url = \"https://my.api.mockaroo.com/json_users_with_avatar.json\";\n // Appel de la fonction de récupération des données\n $datas = $this->makeRequest( $url );\n\n\n // Ensuite on interprète le jeu de données\n foreach ( $datas as $data )\n {\n // Nouvelle instance d'Actor\n $actor = new Actor();\n\n // Charger les données\n $actor->setFirstname( $data['firstname'] )\n ->setLastname( $data['lastname'] )\n ->setAge( $data['age'] )\n ->setImage( $data['image'] )\n ->setBiography( $data['biography'] );\n\n // Persistance en base\n $manager->persist( $actor );\n }\n\n // Méthode 2 : à la main\n // Nouvelle instance d'Actor\n $actor = new Actor();\n\n // Charger les données\n $actor->setFirstname( \"Pascal\" )\n ->setLastname( \"CALVAT\" )\n ->setAge( \"50\" )\n ->setImage( \"https://robohash.org/nostrumnonaut.jpg?size=50x50&set=set1\" )\n ->setBiography( \"Formation Symfony\" );\n\n // Persistance en base\n $manager->persist( $actor );\n\n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n $propriete = new propriete(); \n $propriete->setDescription('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut \n aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.');\n $propriete->setNomPropriete(\"villa bonheur\");\n $propriete->setTypepropriete(\"Appartement\");\n \n $propriete2 = new propriete(); \n $propriete2->setDescription('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut \n aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.');\n $propriete2->setNomPropriete(\"villa\");\n $propriete2->setTypepropriete(\"Maison\");\n \n $propriete3 = new propriete(); \n $propriete3->setDescription('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut \n aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.');\n $propriete3->setNomPropriete(\"villa bonheur\");\n $propriete3->setTypepropriete(\"Villa\");\n \n $propriete4 = new propriete(); \n $propriete4->setDescription('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut \n aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.');\n $propriete4->setNomPropriete(\"villa\");\n $propriete4->setTypepropriete(\"Villa\");\n \n /*GESTION DES CLES */\n $propriete->setAdresse($this->getReference('user_adrPropriete'));\n $propriete->setProprietaire($this->getReference('loca_proprio'));\n \n $propriete2->setAdresse($this->getReference('user_adrPropriete2'));\n $propriete2->setProprietaire($this->getReference('loca_proprio2'));\n \n $propriete3->setAdresse($this->getReference('user_adrPropriete'));\n $propriete3->setProprietaire($this->getReference('loca_proprio'));\n \n $propriete4->setAdresse($this->getReference('user_adrPropriete'));\n $propriete4->setProprietaire($this->getReference('loca_proprio2'));\n \n $manager->persist($propriete);$manager->persist($propriete2);\n $manager->persist($propriete3);$manager->persist($propriete4);\n $manager->flush();\n \n $this->addReference('loca_propriete', $propriete);\n $this->addReference('loca_propriete2', $propriete2);\n $this->addReference('loca_propriete3', $propriete3);\n $this->addReference('loca_propriete4', $propriete4);\n }", "public function load(ObjectManager $manager)\r\n {\r\n\r\n /**\r\n * Database `hackathon2019`\r\n */\r\n\r\n /** new user @fr */\r\n\r\n $user = new User();\r\n $user->setMail('[email protected]');\r\n $user->setMd5Password(md5('test'));\r\n $user->setNom('Roger');\r\n $user->setPrenom('Francois');\r\n $user->setPrivilege(1);\r\n\r\n $manager->persist($user);\r\n\r\n $manager->flush();\r\n\r\n /* `hackathon2019`.`regions` */\r\n $regions = array(\r\n array('ville_nom_simple' => 'saint genis pouilly','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'peronnas','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'miribel','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'divonne les bains','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'lagnieu','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'amberieu en bugey','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'ferney voltaire','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'viriat','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'oyonnax','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'montluel','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'belley','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'jassans riottier','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'meximieux','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'prevessin moens','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'trevoux','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bellegarde sur valserine','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bourg en bresse','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint denis les bourg','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'gex','ville_departement' => '01','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'soissons','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'chauny','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'laon','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'tergnier','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'hirson','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'guise','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'chateau thierry','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint quentin','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'villers cotterets','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bohain en vermandois','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'gauchy','ville_departement' => '02','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'domerat','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'yzeure','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'gannat','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'montlucon','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bellerive sur allier','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint pourcain sur sioule','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'vichy','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'commentry','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'cusset','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'moulins','ville_departement' => '03','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chateau arnoux saint auban','ville_departement' => '04','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'oraison','ville_departement' => '04','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'sisteron','ville_departement' => '04','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'manosque','ville_departement' => '04','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'digne les bains','ville_departement' => '04','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'embrun','ville_departement' => '05','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'gap','ville_departement' => '05','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'briancon','ville_departement' => '05','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la gaude','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'vence','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'grasse','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'peymeinade','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'beausoleil','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'roquefort les pins','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'biot','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'villefranche sur mer','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'valbonne','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'vallauris','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'contes','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'mouans sartoux','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'antibes','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'cannes','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'villeneuve loubet','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'pegomas','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'mougins','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le cannet','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'carros','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la trinite','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'cagnes sur mer','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'menton','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint laurent du var','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'nice','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'roquebrune cap martin','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la colle sur loup','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'mandelieu la napoule','ville_departement' => '06','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint peray','ville_departement' => '07','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'le teil','ville_departement' => '07','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'guilherand granges','ville_departement' => '07','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'privas','ville_departement' => '07','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'tournon sur rhone','ville_departement' => '07','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'annonay','ville_departement' => '07','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bourg saint andeol','ville_departement' => '07','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'aubenas','ville_departement' => '07','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'givet','ville_departement' => '08','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'nouzonville','ville_departement' => '08','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'charleville mezieres','ville_departement' => '08','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'revin','ville_departement' => '08','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'rethel','ville_departement' => '08','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'bogny sur meuse','ville_departement' => '08','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'sedan','ville_departement' => '08','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint girons','ville_departement' => '09','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'foix','ville_departement' => '09','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'lavelanet','ville_departement' => '09','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'pamiers','ville_departement' => '09','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint julien les villas','ville_departement' => '10','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'la chapelle saint luc','ville_departement' => '10','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'sainte savine','ville_departement' => '10','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'nogent sur seine','ville_departement' => '10','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'romilly sur seine','ville_departement' => '10','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint andre les vergers','ville_departement' => '10','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'bar sur aube','ville_departement' => '10','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'troyes','ville_departement' => '10','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'carcassonne','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'castelnaudary','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'limoux','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'narbonne','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'sigean','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'port la nouvelle','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'lezignan corbieres','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'trebes','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'coursan','ville_departement' => '11','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'luc la primaube','ville_departement' => '12','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'onet le chateau','ville_departement' => '12','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'rodez','ville_departement' => '12','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint affrique','ville_departement' => '12','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'millau','ville_departement' => '12','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'villefranche de rouergue','ville_departement' => '12','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'decazeville','ville_departement' => '12','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'la roque d antheron','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'cassis','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'senas','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint remy de provence','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'eguilles','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'istres','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'noves','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'aix en provence','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'allauch','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la fare les oliviers','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint cannat','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'bouc bel air','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'peypin','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la bouilladisse','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint victoret','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'salon de provence','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'marseille','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'port saint louis du rhone','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le puy sainte reparade','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'chateaurenard','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'mallemort','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'cabries','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint chamas','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint mitre les remparts','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'rognac','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'plan de cuques','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'arles','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'venelles','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'aubagne','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'martigues','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'port de bouc','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'gignac la nerthe','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'vitrolles','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'tarascon','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'septemes les vallons','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'sausset les pins','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'miramas','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'fuveau','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'roquevaire','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'fos sur mer','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'meyreuil','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'les pennes mirabeau','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'pelissanne','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la ciotat','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la penne sur huveaune','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'trets','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'gemenos','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'carry le rouet','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint martin de crau','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'ensues la redonne','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'marignane','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'simiane collongue','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'lancon provence','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'lambesc','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'carnoux en provence','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'eyguieres','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'velaux','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'gardanne','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'berre l etang','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'auriol','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'chateauneuf les martigues','ville_departement' => '13','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'blainville sur orne','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'ouistreham','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'vire','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'ifs','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'conde sur noireau','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'colombelles','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'lisieux','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'falaise','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'bayeux','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'mondeville','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'herouville saint clair','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'caen','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'dives sur mer','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'honfleur','ville_departement' => '14','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'aurillac','ville_departement' => '15','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint flour','ville_departement' => '15','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'arpajon sur cere','ville_departement' => '15','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'soyaux','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'la couronne','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint yrieix sur charente','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'gond pontouvre','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'ruelle sur touvre','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'cognac','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'angouleme','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'champniers','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'l isle d espagnac','ville_departement' => '16','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint pierre d oleron','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'surgeres','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'perigny','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saintes','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'nieul sur mer','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saujon','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'la rochelle','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'aytre','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'royan','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'dompierre sur mer','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint jean d angely','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'marennes','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'tonnay charente','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'rochefort','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'lagord','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'chatelaillon plage','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'puilboreau','ville_departement' => '17','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint doulchard','ville_departement' => '18','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint amand montrond','ville_departement' => '18','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'vierzon','ville_departement' => '18','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'mehun sur yevre','ville_departement' => '18','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint florent sur cher','ville_departement' => '18','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'bourges','ville_departement' => '18','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'aubigny sur nere','ville_departement' => '18','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'tulle','ville_departement' => '19','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'ussel','ville_departement' => '19','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'malemort sur correze','ville_departement' => '19','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'brive la gaillarde','ville_departement' => '19','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'quetigny','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'montbard','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'nuits saint georges','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'chenove','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'beaune','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'dijon','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'chatillon sur seine','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'fontaine les dijon','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'talant','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'marsannay la cote','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'genlis','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'auxonne','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'saint apollinaire','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'chevigny saint sauveur','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'longvic','ville_departement' => '21','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'ploufragan','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'perros guirec','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'paimpol','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'loudeac','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'saint brieuc','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'guingamp','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'pordic','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'lannion','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'langueux','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'tregueux','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'dinan','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'lamballe','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'pledran','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'plerin','ville_departement' => '22','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'gueret','ville_departement' => '23','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'la souterraine','ville_departement' => '23','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'boulazac','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'coulounieix chamiers','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'perigueux','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'sarlat la caneda','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'bergerac','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'trelissac','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'montpon menesterol','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint astier','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'terrasson lavilledieu','ville_departement' => '24','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'morteau','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'bethoncourt','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'valentigney','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'pontarlier','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'seloncourt','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'baume les dames','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'montbeliard','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'audincourt','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'besancon','ville_departement' => '25','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'nyons','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'romans sur isere','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'valence','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'crest','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'livron sur drome','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'montelimar','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'tain l hermitage','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint rambert d albon','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bourg les valence','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'loriol sur drome','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint paul trois chateaux','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'portes les valence','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'donzere','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'pierrelatte','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bourg de peage','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chabeuil','ville_departement' => '26','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'gisors','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'louviers','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'bernay','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'pont audemer','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'vernon','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'les andelys','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'val de reuil','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'gaillon','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'evreux','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'verneuil sur avre','ville_departement' => '27','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'epernon','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'luce','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'chartres','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'dreux','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'vernouillet','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'chateaudun','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'mainvilliers','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'nogent le rotrou','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'luisant','ville_departement' => '28','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'le relecq kerhuon','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'guilers','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'lannilis','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'briec','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'quimperle','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'plougastel daoulas','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'saint pol de leon','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'plouguerneau','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'fouesnant','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'scaer','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'chateaulin','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'pont l abbe','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'guipavas','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'saint renan','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'concarneau','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'gouesnou','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'lesneven','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'landivisiau','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'tregunc','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'crozon','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'plabennec','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'morlaix','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'plouzane','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'rosporden','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'bannalec','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'ergue gaberic','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'quimper','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'penmarch','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'douarnenez','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'landerneau','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'moelan sur mer','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'ploneour lanvern','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'carhaix plouguer','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'brest','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'ploudalmezeau','ville_departement' => '29','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'le grau du roi','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'roquemaure','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'beaucaire','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'aigues mortes','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'manduel','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'les angles','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'pont saint esprit','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'rochefort du gard','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'la grand combe','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint gilles','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'nimes','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'bagnols sur ceze','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'milhaud','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'uzes','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'marguerittes','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'ales','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'vauvert','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'villeneuve les avignon','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint christol les ales','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'bellegarde','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'bouillargues','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'laudun l ardoise','ville_departement' => '30','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'beauzelle','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint gaudens','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'leguevin','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'colomiers','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'muret','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint lys','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'ramonville saint agne','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'cornebarrieu','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'fenouillet','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'castanet tolosan','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'tournefeuille','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'portet sur garonne','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'castelginest','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'la salvetat saint gilles','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'villemur sur tarn','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'pibrac','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'blagnac','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'toulouse','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'frouzins','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'auterive','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'escalquens','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'seysses','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'aussonne','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'villeneuve tolosane','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint jean','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'aucamville','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'l union','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'castelnau d estretefonds','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint orens de gameville','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'fonsorbes','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'cugnaux','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'balma','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint alban','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'launaguet','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'plaisance du touch','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'revel','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'grenade','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'fronton','ville_departement' => '31','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'l isle jourdain','ville_departement' => '32','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'auch','ville_departement' => '32','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'condom','ville_departement' => '32','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'fleurance','ville_departement' => '32','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint jean d illac','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'le bouscat','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'libourne','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'floirac','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'langon','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'gradignan','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'coutras','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'biganos','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'bordeaux','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'begles','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'parempuyre','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'audenge','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'bassens','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint aubin de medoc','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'le haillan','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'lesparre medoc','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'la teste de buch','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'eysines','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'pauillac','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'arcachon','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'gujan mestras','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint loubes','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'andernos les bains','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint medard en jalles','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'le teich','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'blanquefort','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'artigues pres bordeaux','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'ares','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'bruges','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'le pian medoc','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'martignas sur jalle','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'lormont','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'carbon blanc','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'villenave d ornon','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'mios','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'cestas','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'ambares et lagrave','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'leognan','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'talence','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'pessac','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'lanton','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'izon','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'merignac','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'le taillan medoc','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'cenon','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'salles','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'lege cap ferret','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint andre de cubzac','ville_departement' => '33','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'mauguio','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'perols','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'castelnau le lez','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'fabregues','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'baillargues','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'marsillargues','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'bedarieux','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'lattes','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint georges d orques','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'agde','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'beziers','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'balaruc les bains','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'meze','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'sete','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint jean de vedas','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'lodeve','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint clement de riviere','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'clapiers','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'pezenas','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'gignac','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint gely du fesc','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'pignan','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'castries','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'frontignan','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'marseillan','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'le cres','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'montpellier','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'villeneuve les maguelone','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'serignan','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'vendargues','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'cournonterral','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'lunel','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'grabels','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'la grande motte','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'vias','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'juvignac','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'clermont l herault','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'gigean','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'palavas les flots','ville_departement' => '34','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'bain de bretagne','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'rennes','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'redon','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'saint malo','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'dinard','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'cancale','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'saint gregoire','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'vern sur seiche','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'combourg','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'liffre','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'montfort sur meu','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'janze','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'bruz','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'thorigne fouillard','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'betton','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'fougeres','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'noyal chatillon sur seiche','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'vitre','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'pleurtuit','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'pace','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'le rheu','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'saint jacques de la lande','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'noyal sur vilaine','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'guichen','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'chantepie','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'cesson sevigne','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'chartres de bretagne','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'chateaugiron','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'melesse','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'acigne','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'mordelles','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'chateaubourg','ville_departement' => '35','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'deols','ville_departement' => '36','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'issoudun','ville_departement' => '36','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'chateauroux','ville_departement' => '36','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'le poinconnet','ville_departement' => '36','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'argenton sur creuse','ville_departement' => '36','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'le blanc','ville_departement' => '36','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'blere','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint cyr sur loire','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'ballan mire','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'amboise','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'loches','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'chinon','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'chambray les tours','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'tours','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint pierre des corps','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'joue les tours','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'monts','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'chateau renault','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'montlouis sur loire','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint avertin','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'fondettes','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'veigne','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'la riche','ville_departement' => '37','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'voiron','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'le peage de roussillon','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint martin d heres','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'meylan','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'charvieu chavagneux','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la verpilliere','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'vizille','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la tour du pin','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'roussillon','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint ismier','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'fontaine','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'echirolles','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'les avenieres','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'grenoble','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'varces allieres et risset','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'domene','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bourgoin jallieu','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint martin le vinoux','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la tronche','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'tignieu jameyzieu','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'le pont de claix','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint egreve','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint martin d uriage','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint marcellin','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'rives','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'moirans','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint maurice l exil','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'villefontaine','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint quentin fallavier','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'pont eveque','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'sassenage','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la mure','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'l isle d abeau','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'gieres','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'villard bonnot','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'tullins','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'crolles','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'voreppe','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'seyssins','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'claix','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'vif','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'seyssinet pariset','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'vienne','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'pontcharra','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'eybens','ville_departement' => '38','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint claude','ville_departement' => '39','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'morez','ville_departement' => '39','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'dole','ville_departement' => '39','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'lons le saunier','ville_departement' => '39','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'champagnole','ville_departement' => '39','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'aire sur l adour','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'parentis en born','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'mimizan','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'biscarrosse','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'dax','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'capbreton','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint pierre du mont','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'tarnos','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'mont de marsan','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'soustons','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint paul les dax','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint vincent de tyrosse','ville_departement' => '40','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'romorantin lanthenay','ville_departement' => '41','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'vineuil','ville_departement' => '41','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'vendome','ville_departement' => '41','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'salbris','ville_departement' => '41','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'blois','ville_departement' => '41','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'mer','ville_departement' => '41','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'rive de gier','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'firminy','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint genest lerpt','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint galmier','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la talaudiere','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'unieux','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'veauche','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'sorbiers','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'montbrison','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint etienne','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint jean bonnefonds','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'sury le comtal','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'andrezieux boutheon','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'le chambon feugerolles','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chazelles sur lyon','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'le coteau','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint chamond','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint just saint rambert','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la grand croix','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint priest en jarez','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'mably','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la ricamarie','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'roche la moliere','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'villars','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'roanne','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'feurs','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'riorges','ville_departement' => '42','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'monistrol sur loire','ville_departement' => '43','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'brioude','ville_departement' => '43','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'aurec sur loire','ville_departement' => '43','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'sainte sigolene','ville_departement' => '43','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'le puy en velay','ville_departement' => '43','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'yssingeaux','ville_departement' => '43','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'sainte pazanne','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'carquefou','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint herblain','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'vallet','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'donges','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'blain','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'pornic','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'suce sur erdre','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'le pouliguen','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'montoir de bretagne','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'basse goulaine','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'le loroux bottereau','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'trignac','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'thouare sur loire','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint andre des eaux','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'bouguenais','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'les sorinieres','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint sebastien sur loire','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'savenay','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'herbignac','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'pont saint martin','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'treillieres','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'la montagne','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'coueron','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'orvault','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'sautron','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'clisson','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'machecoul','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'pontchateau','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint etienne de montluc','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint julien de concelles','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'pornichet','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'vertou','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'nantes','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'sainte luce sur loire','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'reze','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'chateaubriant','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint philbert de grand lieu','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'heric','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'bouaye','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'guerande','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'ancenis','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'nort sur erdre','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint brevin les pins','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'vigneux de bretagne','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'la baule escoublac','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'la chapelle sur erdre','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint nazaire','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'haute goulaine','ville_departement' => '44','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'amilly','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'la ferte saint aubin','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'briare','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint jean de braye','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'gien','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'villemandeur','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'beaugency','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'pithiviers','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'montargis','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'meung sur loire','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'chalette sur loing','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'la chapelle saint mesmin','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'fleury les aubrais','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'checy','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'malesherbes','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saran','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'sully sur loire','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint jean de la ruelle','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint pryve saint mesmin','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint jean le blanc','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'ingre','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'saint denis en val','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'orleans','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'chateauneuf sur loire','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'olivet','ville_departement' => '45','name' => 'Centre-Val de Loire'),\r\n array('ville_nom_simple' => 'figeac','ville_departement' => '46','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'cahors','ville_departement' => '46','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'bon encontre','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'tonneins','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'agen','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'villeneuve sur lot','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'boe','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'le passage','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'marmande','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'sainte livrade sur lot','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'fumel','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'nerac','ville_departement' => '47','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'mende','ville_departement' => '48','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'chemille','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'cholet','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'beaupreau','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'angers','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'beaufort en vallee','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'montreuil juigne','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'trelaze','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint barthelemy d anjou','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'avrille','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'segre','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'chalonnes sur loire','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'bouchemaine','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'doue la fontaine','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'les ponts de ce','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'longue jumelles','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saumur','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'murs erigne','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint macaire en mauges','ville_departement' => '49','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'equeurdreville hainneville','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'avranches','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'tourlaville','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'granville','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'coutances','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'carentan','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'querqueville','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'cherbourg octeville','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'saint lo','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'valognes','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'la glacerie','ville_departement' => '50','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'betheny','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'reims','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'epernay','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'vitry le francois','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'chalons en champagne','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'cormontreuil','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'sezanne','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'tinqueux','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'fismes','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint memmie','ville_departement' => '51','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'chaumont','ville_departement' => '52','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'langres','ville_departement' => '52','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint dizier','ville_departement' => '52','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'chateau gontier','ville_departement' => '53','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'change','ville_departement' => '53','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'ernee','ville_departement' => '53','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint berthevin','ville_departement' => '53','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'mayenne','ville_departement' => '53','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'evron','ville_departement' => '53','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'bonchamp les laval','ville_departement' => '53','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'laval','ville_departement' => '53','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'joeuf','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'tomblaine','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'malzeville','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'mont saint martin','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'laneuveville devant nancy','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint nicolas de port','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'jarville la malgrange','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'jarny','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'villerupt','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'frouard','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'longwy','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint max','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'nancy','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'pompey','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'ludres','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'longuyon','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'pont a mousson','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'champigneulles','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'briey','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'heillecourt','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'luneville','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'essey les nancy','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'seichamps','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'maxeville','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'vandoeuvre les nancy','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'neuves maisons','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'dombasle sur meurthe','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'toul','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'villers les nancy','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'liverdun','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'homecourt','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'laxou','ville_departement' => '54','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'verdun','ville_departement' => '55','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'commercy','ville_departement' => '55','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'bar le duc','ville_departement' => '55','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'auray','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'questembert','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'queven','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'theix','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'sarzeau','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'pontivy','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'lorient','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'vannes','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'arradon','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'sene','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'caudan','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'lanester','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'hennebont','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'languidic','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'ploeren','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'ploemeur','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'larmor plage','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'plouay','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'guidel','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'ploermel','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'inzinzac lochrist','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'guer','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'brech','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'pluvigner','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'baud','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'saint ave','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'kervignac','ville_departement' => '56','name' => 'Bretagne'),\r\n array('ville_nom_simple' => 'behren les forbach','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'marly','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'stiring wendel','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'yutz','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'florange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'amneville','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'mondelange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'uckange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'forbach','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'woippy','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'moulins les metz','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'freyming merlebach','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'l hopital','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'metz','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'hombourg haut','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'hayange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'talange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'fameck','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'petite rosselle','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'guenange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'thionville','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'sarrebourg','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'hagondange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'terville','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'moyeuvre grande','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'faulquemont','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'bitche','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'maizieres les metz','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'rombas','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'farebersviller','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint avold','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'hettange grande','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'sarreguemines','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'audun le tiche','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'marange silvange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'montigny les metz','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'algrange','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'creutzwald','ville_departement' => '57','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'decize','ville_departement' => '58','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'cosne cours sur loire','ville_departement' => '58','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'varennes vauzelles','ville_departement' => '58','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'la charite sur loire','ville_departement' => '58','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'nevers','ville_departement' => '58','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'waziers','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'conde sur l escaut','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'sainghin en weppes','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'roubaix','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wattrelos','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'villeneuve d ascq','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'trith saint leger','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'roncq','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bauvin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'fourmies','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lille','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'marquette lez lille','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'mons en baroeul','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wattignies','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'sin le noble','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'aniche','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'la bassee','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'loos','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'fresnes sur escaut','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'le cateau cambresis','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'halluin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'roost warendin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bourbourg','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'valenciennes','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'la madeleine','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'loon plage','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wormhout','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'louvroil','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lys lez lannoy','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'quesnoy sur deule','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'perenchies','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint saulve','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'santes','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'hazebrouck','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'onnaing','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'templeuve','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bruay sur l escaut','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'houplines','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'vieux conde','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lesquin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'gravelines','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'hautmont','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'aulnoye aymeries','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint andre lez lille','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'quievrechain','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'maubeuge','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'merville','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'tourcoing','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'caudry','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'neuville en ferrain','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'jeumont','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lallaing','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'coudekerque branche','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'annoeullin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'fenain','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'croix','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'anzin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'comines','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'marly','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'pecquencourt','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'ronchin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bondues','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'dunkerque','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'douchy les mines','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'ferriere la grande','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'escaudain','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'flines lez raches','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint amand les eaux','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'douai','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'orchies','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wallers','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'grand fort philippe','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'nieppe','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'la gorgue','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'armentieres','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wasquehal','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'mouvaux','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'seclin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lambersart','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bailleul','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'cambrai','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'marcq en baroeul','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'estaires','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lambres lez douai','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'denain','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'hem','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'la chapelle d armentieres','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'aulnoy lez valenciennes','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'raismes','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'leers','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'cuincy','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'haubourdin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'flers en escrebieux','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'grande synthe','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'teteghem','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'faches thumesnil','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wambrechies','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'somain','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'cappelle la grande','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'feignies','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'ostricourt','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'linselles','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'auby','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'dechy','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wavrin','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'beuvrages','ville_departement' => '59','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'compiegne','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'chambly','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'nogent sur oise','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'mouy','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'meru','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint just en chaussee','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'senlis','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'noyon','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'creil','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'crepy en valois','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'gouvieux','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'pont sainte maxence','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'margny les compiegne','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'beauvais','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lamorlaye','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'liancourt','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'villers saint paul','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'montataire','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'chantilly','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'clermont','ville_departement' => '60','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'flers','ville_departement' => '61','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'argentan','ville_departement' => '61','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'alencon','ville_departement' => '61','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'l aigle','ville_departement' => '61','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'la ferte mace','ville_departement' => '61','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'marquise','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'divion','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'grenay','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'mericourt','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint etienne au mont','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'oignies','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'marck','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lievin','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'auchel','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'henin beaumont','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'guines','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'hersin coupigny','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint omer','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'harnes','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wingles','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'rouvroy','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'cucq','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'arras','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'desvres','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'oye plage','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'sallaumines','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'noyelles sous lens','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'noeux les mines','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'montigny en gohelle','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'marles les mines','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'coulogne','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'annezin','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'beuvry','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'dainville','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'loison sous lens','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'arques','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'calais','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'wimereux','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'boulogne sur mer','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'etaples','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'libercourt','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lillers','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bethune','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'isbergues','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'le touquet paris plage','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint pol sur ternoise','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'courcelles les lens','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'leforest','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'carvin','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'loos en gohelle','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'aire sur la lys','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'le portel','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'barlin','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bully les mines','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'bruay la buissiere','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'dourges','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'avion','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'outreau','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'courrieres','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'noyelles godault','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint laurent blangy','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'billy montigny','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'douvrin','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'fouquieres les lens','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'mazingarbe','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'longuenesse','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'lens','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'blendecques','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'vendin le vieil','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'houdain','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'beaurains','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'berck','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'saint martin boulogne','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'sains en gohelle','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'achicourt','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'calonne ricouart','ville_departement' => '62','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'pont du chateau','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'cournon d auvergne','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'ambert','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'clermont ferrand','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'issoire','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'ceyrat','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'lempdes','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chamalieres','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'thiers','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'lezoux','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'cebazat','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'gerzat','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'riom','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'aubiere','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'beaumont','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chatel guyon','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'romagnat','ville_departement' => '63','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'boucau','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'mourenx','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'hendaye','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'lescar','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'pau','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'oloron sainte marie','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'hasparren','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'lons','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'cambo les bains','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'bayonne','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'biarritz','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'urrugne','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'jurancon','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'bidart','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'ciboure','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'anglet','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'gan','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint pee sur nivelle','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'ustaritz','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'orthez','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint jean de luz','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'billere','ville_departement' => '64','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'aureilhan','ville_departement' => '65','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'lannemezan','ville_departement' => '65','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'tarbes','ville_departement' => '65','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'vic en bigorre','ville_departement' => '65','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'bagneres de bigorre','ville_departement' => '65','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'lourdes','ville_departement' => '65','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'cabestany','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'bompas','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint cyprien','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'ille sur tet','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint esteve','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'argeles sur mer','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'elne','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint laurent de la salanque','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'rivesaltes','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'thuir','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'ceret','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'le boulou','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'pia','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'canet en roussillon','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'prades','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'le soler','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'toulouges','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'perpignan','ville_departement' => '66','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'ostwald','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'mundolsheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'wasselonne','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'molsheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'barr','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'eckbolsheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'obernai','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saverne','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'strasbourg','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'benfeld','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'bischwiller','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'vendenheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'geispolsheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'bischheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'schiltigheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'reichshoffen','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'souffelweyersheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'illkirch graffenstaden','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'selestat','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'hoenheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'erstein','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'brumath','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'la wantzenau','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'fegersheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'haguenau','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'mutzig','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'lingolsheim','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'wissembourg','ville_departement' => '67','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'wittelsheim','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'colmar','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'altkirch','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'kingersheim','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint louis','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'wintzenheim','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'illzach','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'wittenheim','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'sainte marie aux mines','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'cernay','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'thann','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'huningue','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'ensisheim','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'soultz haut rhin','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'riedisheim','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'brunstatt','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'pfastatt','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'sausheim','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'rixheim','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'lutterbach','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'guebwiller','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'mulhouse','ville_departement' => '68','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'oullins','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'neuville sur saone','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'grigny','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'venissieux','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'jonage','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'villefranche sur saone','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'tassin la demi lune','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'mions','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'corbas','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'gleize','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'caluire et cuire','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'irigny','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chaponost','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'lentilly','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint fons','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint genis laval','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'amplepuis','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint symphorien d ozon','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'lyon','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint priest','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'brindas','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'genas','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'vaulx en velin','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'belleville','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chassieu','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'craponne','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint bonnet de mure','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'villeurbanne','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'pierre benite','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'fontaines sur saone','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'francheville','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'brignais','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'ternay','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'meyzieu','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'l arbresle','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint cyr au mont d or','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'anse','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bron','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'rillieux la pape','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la mulatiere','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'ecully','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'decines charpieu','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'dardilly','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint didier au mont d or','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'feyzin','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'tarare','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'mornant','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'givors','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'sainte foy les lyon','ville_departement' => '69','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'lure','ville_departement' => '70','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'vesoul','ville_departement' => '70','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'luxeuil les bains','ville_departement' => '70','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'gray','ville_departement' => '70','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'hericourt','ville_departement' => '70','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'saint vallier','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'louhans','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'tournus','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'saint remy','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'montchanin','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'le creusot','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'digoin','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'montceau les mines','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'charnay les macon','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'chagny','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'paray le monial','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'macon','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'chalon sur saone','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'gueugnon','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'blanzy','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'saint marcel','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'chatenoy le royal','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'autun','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'bourbon lancy','ville_departement' => '71','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'le mans','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'mamers','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'change','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'allonnes','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'sable sur sarthe','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'coulaines','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'la ferte bernard','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'la fleche','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'arnage','ville_departement' => '72','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'aix les bains','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'albertville','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint jean de maurienne','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la ravoire','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chambery','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'challes les eaux','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint alban leysse','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la motte servolex','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'ugine','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bourg saint maurice','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'cognin','ville_departement' => '73','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'la roche sur foron','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'seynod','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'annecy','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'marnaz','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'sciez','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'thyez','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'evian les bains','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'meythet','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'thones','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'ville la grand','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'bonneville','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'passy','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint jorioz','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'thonon les bains','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'annecy le vieux','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'cran gevrier','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint pierre en faucigny','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'reignier esery','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'gaillard','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'sallanches','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'rumilly','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'poisy','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'annemasse','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'chamonix mont blanc','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'vetraz monthoux','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'marignier','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'scionzier','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'publier','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'cranves sales','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint gervais les bains','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'faverges','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'saint julien en genevois','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'cluses','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'ambilly','ville_departement' => '74','name' => 'Auvergne-Rhône-Alpes'),\r\n array('ville_nom_simple' => 'paris','ville_departement' => '75','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint pierre les elbeuf','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'octeville sur mer','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'le treport','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'cleon','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'le petit quevilly','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'gournay en bray','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'oissel','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'eu','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'darnetal','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'yvetot','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'grand couronne','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'le grand quevilly','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'elbeuf','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'bois guillaume','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'barentin','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'harfleur','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'le trait','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'saint etienne du rouvray','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'deville les rouen','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'malaunay','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'maromme','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'notre dame de gravenchon','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'franqueville saint pierre','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'notre dame de bondeville','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'bihorel','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'rouen','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'mont saint aignan','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'bonsecours','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'dieppe','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'montivilliers','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'sotteville les rouen','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'petit couronne','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'pavilly','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'saint aubin les elbeuf','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'caudebec les elbeuf','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'lillebonne','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'sainte adresse','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'le mesnil esnard','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'fecamp','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'gonfreville l orcher','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'canteleu','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'bolbec','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'le havre','ville_departement' => '76','name' => 'Normandie'),\r\n array('ville_nom_simple' => 'emerainville','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'nangis','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'avon','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'nanteuil les meaux','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'magny le hongre','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'lieusaint','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'gretz armainvilliers','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint thibault des vignes','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'moissy cramayel','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vert saint denis','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'lagny sur marne','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint pierre les nemours','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'claye souilly','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bois le roi','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'champs sur marne','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'esbly','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chelles','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'torcy','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'dammarie les lys','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'roissy en brie','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'fontainebleau','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'meaux','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'nemours','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'brie comte robert','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'othis','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vaires sur marne','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montereau fault yonne','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bailly romainvilliers','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'combs la ville','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'pontault combault','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'dammartin en goele','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'coulommiers','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'champagne sur seine','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vaux le penil','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'cesson','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ozoir la ferriere','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'tournan en brie','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'noisiel','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'souppes sur loing','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'lognes','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'provins','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'la ferte sous jouarre','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'thorigny sur marne','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bussy saint georges','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'fontenay tresigny','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'nandy','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'melun','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'savigny le temple','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'serris','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le mee sur seine','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint fargeau ponthierry','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint pathus','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'mitry mory','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montevrain','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villeparisis','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'courtry','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'lesigny','ville_departement' => '77','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chanteloup les vignes','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chambourcy','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'meulan en yvelines','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'rambouillet','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montesson','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le vesinet','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'maisons laffitte','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'maurepas','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'houilles','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'les mureaux','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'sartrouville','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'la verriere','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'croissy sur seine','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bois d arcy','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'triel sur seine','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'acheres','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'carrieres sous poissy','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint nom la breteche','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'poissy','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'les essarts le roi','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'marly le roi','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'carrieres sur seine','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'verneuil sur seine','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'andresy','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'epone','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'plaisir','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'magny les hameaux','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'mantes la ville','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'gargenville','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'rosny sur seine','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint cyr l ecole','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'versailles','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'guyancourt','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'buc','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chatou','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'trappes','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vernouillet','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'fontenay le fleury','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le chesnay','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'beynes','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bougival','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'louveciennes','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'magnanville','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'maule','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'conflans sainte honorine','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'mantes la jolie','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint germain en laye','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'aubergenville','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'voisins le bretonneux','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'les clayes sous bois','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le pecq','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le perray en yvelines','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villepreux','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montigny le bretonneux','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'noisy le roi','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'elancourt','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'jouy en josas','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'viroflay','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villennes sur seine','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'orgeval','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'limay','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'jouars pontchartrain','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le mesnil le roi','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chevreuse','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'la celle saint cloud','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'velizy villacoublay','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le mesnil saint denis','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint remy les chevreuse','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint arnoult en yvelines','ville_departement' => '78','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'parthenay','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'niort','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'chauray','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint maixent l ecole','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'aiffres','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'la creche','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'bressuire','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'thouars','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'nueil les aubiers','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'mauleon','ville_departement' => '79','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'doullens','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'peronne','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'montdidier','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'roye','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'abbeville','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'ham','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'longueau','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'corbie','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'amiens','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'albert','ville_departement' => '80','name' => 'Hauts-de-France'),\r\n array('ville_nom_simple' => 'albi','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'gaillac','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint juery','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'mazamet','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'lavaur','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'graulhet','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'aussillon','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'saint sulpice','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'labruguiere','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'carmaux','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'castres','ville_departement' => '81','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'castelsarrasin','ville_departement' => '82','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'valence','ville_departement' => '82','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'moissac','ville_departement' => '82','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'caussade','ville_departement' => '82','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'montech','ville_departement' => '82','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'montauban','ville_departement' => '82','name' => 'Occitanie'),\r\n array('ville_nom_simple' => 'sollies toucas','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'cogolin','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la londe les maures','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'sainte maxime','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'sollies pont','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint cyr sur mer','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'cavalaire sur mer','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la garde','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'puget sur argens','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'sanary sur mer','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'hyeres','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la valette du var','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'ollioules','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint maximin la sainte baume','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'lorgues','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'les arcs','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'roquebrune sur argens','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le pradet','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'bormes les mimosas','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'carqueiranne','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'six fours les plages','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'vidauban','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'gareoult','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'draguignan','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'montauroux','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'trans en provence','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le muy','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'frejus','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'cuers','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la crau','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le lavandou','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'toulon','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le beausset','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la cadiere d azur','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'brignoles','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint raphael','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le luc','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint tropez','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'pierrefeu du var','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la farlede','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'saint mandrier sur mer','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'bandol','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'la seyne sur mer','ville_departement' => '83','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'bedarrides','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le pontet','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'cavaillon','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'vedene','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'morieres les avignon','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'pernes les fontaines','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'sarrians','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'sorgues','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'l isle sur la sorgue','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'valreas','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'carpentras','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'courthezon','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'entraigues sur la sorgue','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'mazan','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'bollene','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'monteux','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'orange','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'avignon','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'pertuis','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'le thor','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'apt','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'vaison la romaine','ville_departement' => '84','name' => 'Provence-Alpes-Côte d\\'Azur'),\r\n array('ville_nom_simple' => 'talmont saint hilaire','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'le poire sur vie','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'chateau d olonne','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint jean de monts','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'fontenay le comte','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'olonne sur mer','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'pouzauges','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'challans','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'lucon','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'les sables d olonne','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'la roche sur yon','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint gilles croix de vie','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'chantonnay','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'mortagne sur sevre','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'saint hilaire de riez','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'les herbiers','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'aizenay','ville_departement' => '85','name' => 'Pays de la Loire'),\r\n array('ville_nom_simple' => 'montmorillon','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'buxerolles','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'jaunay clan','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'naintre','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'poitiers','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'loudun','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint benoit','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'chatellerault','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'migne auxances','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'chauvigny','ville_departement' => '86','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'isle','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint junien','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'feytiat','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'limoges','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'saint yrieix la perche','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'aixe sur vienne','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'ambazac','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'couzeix','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'panazol','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'le palais sur vienne','ville_departement' => '87','name' => 'Nouvelle-Aquitaine'),\r\n array('ville_nom_simple' => 'vittel','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'epinal','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'golbey','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'thaon les vosges','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'raon l etape','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'gerardmer','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'mirecourt','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'saint die des vosges','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'remiremont','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'rambervillers','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'neufchateau','ville_departement' => '88','name' => 'Grand Est'),\r\n array('ville_nom_simple' => 'tonnerre','ville_departement' => '89','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'villeneuve sur yonne','ville_departement' => '89','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'avallon','ville_departement' => '89','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'migennes','ville_departement' => '89','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'sens','ville_departement' => '89','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'joigny','ville_departement' => '89','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'auxerre','ville_departement' => '89','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'belfort','ville_departement' => '90','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'delle','ville_departement' => '90','name' => 'Bourgogne-Franche-Comté'),\r\n array('ville_nom_simple' => 'brunoy','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villebon sur yvette','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'evry','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'dourdan','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'draveil','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'mennecy','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'grigny','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'wissous','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ris orangis','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bures sur yvette','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'palaiseau','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'arpajon','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'epinay sur orge','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'boussy saint antoine','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'la ville du bois','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'verrieres le buisson','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'crosne','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'longpont sur orge','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint michel sur orge','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint pierre du perray','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ballancourt sur essonne','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vigneux sur seine','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'courcouronnes','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'etrechy','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saintry sur seine','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montlhery','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'fleury merogis','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'quincy sous senart','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'igny','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'viry chatillon','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'etampes','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'corbeil essonnes','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'orsay','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'massy','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'yerres','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'paray vieille poste','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint germain les arpajon','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'gif sur yvette','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'morangis','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chilly mazarin','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'epinay sous senart','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'les ulis','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'athis mons','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'soisy sur seine','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'lisses','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'marcoussis','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'linas','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'morsang sur orge','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'juvisy sur orge','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montgeron','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bretigny sur orge','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villemoisson sur orge','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bondoufle','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'egly','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint germain les corbeil','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'itteville','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'breuillet','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'lardy','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'sainte genevieve des bois','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'savigny sur orge','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'limours','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'longjumeau','ville_departement' => '91','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'neuilly sur seine','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chatillon','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bois colombes','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'puteaux','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'clamart','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'meudon','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'issy les moulineaux','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vaucresson','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'rueil malmaison','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'antony','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le plessis robinson','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'levallois perret','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'boulogne billancourt','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'asnieres sur seine','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'colombes','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'fontenay aux roses','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'garches','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villeneuve la garenne','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'courbevoie','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montrouge','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chatenay malabry','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'clichy','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vanves','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ville d avray','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'suresnes','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'sevres','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'sceaux','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chaville','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'la garenne colombes','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'gennevilliers','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'nanterre','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint cloud','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'malakoff','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bagneux','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bourg la reine','ville_departement' => '92','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le bourget','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bagnolet','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'la courneuve','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'les pavillons sous bois','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'sevran','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villemomble','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montreuil','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'livry gargan','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'aulnay sous bois','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'dugny','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villetaneuse','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le raincy','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint denis','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'les lilas','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'clichy sous bois','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'noisy le grand','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'romainville','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'aubervilliers','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'noisy le sec','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villepinte','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bobigny','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'pierrefitte sur seine','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'tremblay en france','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vaujours','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montfermeil','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'l ile saint denis','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le pre saint gervais','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'stains','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'pantin','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'neuilly plaisance','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'rosny sous bois','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint ouen','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'gournay sur marne','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bondy','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'epinay sur seine','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'neuilly sur marne','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'drancy','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le blanc mesnil','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'gagny','ville_departement' => '93','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'fontenay sous bois','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'l hay les roses','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'limeil brevannes','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'alfortville','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le plessis trevise','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'choisy le roi','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint mande','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'fresnes','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villiers sur marne','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le kremlin bicetre','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'boissy saint leger','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'la queue en brie','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ormesson sur marne','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'arcueil','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'marolles en brie','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villecresnes','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le perreux sur marne','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'valenton','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'nogent sur marne','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'cachan','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint maur des fosses','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'rungis','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'thiais','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'sucy en brie','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vincennes','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'charenton le pont','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint maurice','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bry sur marne','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bonneuil sur marne','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'joinville le pont','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ablon sur seine','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'gentilly','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villejuif','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vitry sur seine','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chevilly larue','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'chennevieres sur marne','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'champigny sur marne','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ivry sur seine','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'maisons alfort','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'orly','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villeneuve le roi','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villeneuve saint georges','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'creteil','ville_departement' => '94','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'osny','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'cergy','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ezanville','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'jouy le moutier','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'magny en vexin','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'domont','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montmorency','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'pontoise','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'vaureal','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'marly la ville','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'groslay','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'menucourt','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'herblay','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ermont','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'auvers sur oise','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint brice sous foret','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'goussainville','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'pierrelaye','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'franconville','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'louvres','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'gonesse','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'deuil la barre','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bezons','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'courdimanche','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint gratien','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'taverny','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bessancourt','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'beaumont sur oise','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'cormeilles en parisis','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'bouffemont','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'sannois','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ecouen','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint prix','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint leu la foret','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'saint ouen l aumone','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'persan','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'l isle adam','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'garges les gonesse','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montmagny','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'montigny les cormeilles','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'eaubonne','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'parmain','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'argenteuil','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'le plessis bouchard','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'villiers le bel','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'eragny','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'sarcelles','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'mery sur oise','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'soisy sous montmorency','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'beauchamp','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'enghien les bains','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'arnouville','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'fosses','ville_departement' => '95','name' => 'Île-de-France'),\r\n array('ville_nom_simple' => 'ajaccio','ville_departement' => '2A','name' => 'Corse'),\r\n array('ville_nom_simple' => 'porto vecchio','ville_departement' => '2A','name' => 'Corse'),\r\n array('ville_nom_simple' => 'corte','ville_departement' => '2B','name' => 'Corse'),\r\n array('ville_nom_simple' => 'bastia','ville_departement' => '2B','name' => 'Corse'),\r\n array('ville_nom_simple' => 'biguglia','ville_departement' => '2B','name' => 'Corse'),\r\n array('ville_nom_simple' => 'borgo','ville_departement' => '2B','name' => 'Corse'),\r\n array('ville_nom_simple' => 'calvi','ville_departement' => '2B','name' => 'Corse'),\r\n array('ville_nom_simple' => 'les abymes','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'baie mahault','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'baillif','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'basse terre','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'pigeon','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'capesterre belle eau','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'gourbeyre','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'grand bourg','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'le gosier','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'goyave','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'lamentin','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'morne a l eau','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'le moule','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'petit bourg','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'petit canal','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'pointe a pitre','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'pointe noire','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'port louis','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'st claude','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'st francois','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'ste anne','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'ste rose','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'trois rivieres','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'vieux habitants','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'le diamant','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'ducos','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'fort de france','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'le francois','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'gros morne','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'le lamentin','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'le lorrain','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'le marin','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'le morne rouge','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'riviere pilote','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'riviere salee','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'le robert','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'st esprit','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'st joseph','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'ste luce','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'ste marie','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'shoelcher','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'la trinite','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'les trois ilets','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'le vauclin','ville_departement' => '972','name' => 'Martinique'),\r\n array('ville_nom_simple' => 'cayenne','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'kourou','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'macouria tonate','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'mana','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'matoury','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'remire montjoly','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'st laurent du maroni','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'maripasoula','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'grand santi','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'apatou','ville_departement' => '973','name' => 'Guyane'),\r\n array('ville_nom_simple' => 'les avirons','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'bras panon','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'entre deux','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'l etang sale','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'petite ile','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'la plaine des palmistes','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'le port','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'la possession','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'st andre','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'st benoit','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'ste clotilde','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'st joseph','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'st leu','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'st louis','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'st paul','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'ravine des cabris','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'st philippe','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'ste marie','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'ste rose','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'ste suzanne','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'salazie','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'le tampon','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'les trois bassins','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'cilaos','ville_departement' => '974','name' => 'La Réunion'),\r\n array('ville_nom_simple' => 'bandraboua','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'bandrele','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'boueni','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'chiconi','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'chirongui','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'dembeni','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'dzaoudzi','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'koungou','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'mamoudzou','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'mtsamboro','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'm tsangamouji','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'ouangani','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'pamandzi','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'sada','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'tsingoni','ville_departement' => '976','name' => 'Mayotte'),\r\n array('ville_nom_simple' => 'st barthelemy','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'st martin','ville_departement' => '971','name' => 'Guadeloupe'),\r\n array('ville_nom_simple' => 'st pierre et miquelon','ville_departement' => '975','name' => 'Collectivités d\\'Outre-Mer')\r\n );\r\n\r\n\r\n foreach ($regions as $region_data) {\r\n\r\n $bool = false;\r\n $all_region = $manager->getRepository(Region::class)->findBy(['name' => $region_data['name']]);\r\n $departement = new Departement();\r\n $departement->setName($region_data['ville_departement']);\r\n foreach ($all_region as $a_region) {\r\n $departement->setRegion($a_region);\r\n $bool = true;\r\n }\r\n\r\n if (!$bool) {\r\n $region = new Region();\r\n $region->setName($region_data['name']);\r\n $departement->setRegion($region);\r\n }\r\n\r\n $manager->persist($departement);\r\n $manager->flush();\r\n }\r\n\r\n $method = 'GET';\r\n\r\n\r\n $url = 'https://api.ozae.com/gnw/articles?date=20180101__20190320&key=f287095e988e47c0804e92fd513b9843&edition=fr-fr&query=accident';\r\n $data = null;\r\n $curl = curl_init();\r\n\r\n switch ($method) {\r\n case \"POST\":\r\n curl_setopt($curl, CURLOPT_POST, 1);\r\n\r\n if ($data)\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n break;\r\n\r\n case \"PUT\":\r\n curl_setopt($curl, CURLOPT_PUT, 1);\r\n break;\r\n default:\r\n if ($data)\r\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\r\n }\r\n\r\n // Optional Authentication:\r\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\r\n curl_setopt($curl, CURLOPT_USERPWD, \"username:password\");\r\n\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n\r\n $result = curl_exec($curl);\r\n\r\n curl_close($curl);\r\n\r\n $result = json_decode($result);\r\n\r\n foreach ($result->articles as $key => $aResult) {\r\n $date = new \\DateTime('2017/1/1');\r\n $date_first_seen = new \\DateTime($aResult->date_first_seen);\r\n $date_last_seen = new \\DateTime($aResult->date_last_seen);\r\n $categories = array();\r\n\r\n $article = new Article();\r\n $html_content = $this->callAPI($aResult->id,'test');\r\n $tags = array(\r\n 'moto',\r\n 'motocyclisme',\r\n 'scooter',\r\n 'circulation',\r\n 'jeep',\r\n 'fourgon',\r\n 'conducteur',\r\n 'chauffeur',\r\n 'voiture',\r\n 'vélo',\r\n 'automobile',\r\n 'avion',\r\n 'véhicule',\r\n 'train',\r\n 'bicyclette',\r\n );\r\n foreach ($tags as $tag) {\r\n if (strpos($html_content, $tag) !== false) {\r\n array_push($categories, $tag);\r\n }\r\n }\r\n $gravite = array();\r\n if (count($categories) !== 0) {\r\n $tags = array(\r\n 'mort',\r\n 'décès',\r\n 'drame',\r\n 'tragédie',\r\n 'dramatique',\r\n 'tragique',\r\n 'trépas',\r\n 'tué',\r\n 'décédé',\r\n 'blessé',\r\n 'grave',\r\n 'sans conséquence',\r\n );\r\n foreach ($tags as $tag) {\r\n if (strpos($html_content, $tag) !== false) {\r\n array_push($gravite, $tag);\r\n }\r\n }\r\n\r\n $tags = array(\r\n 'soirée alcoolisée',\r\n 'minuit',\r\n 'stupéfiant',\r\n 'drogue',\r\n 'cannabis',\r\n );\r\n $causes = array();\r\n foreach ($tags as $tag) {\r\n if (strpos($html_content, 'négatif') === false) {\r\n if (strpos($html_content, $tag) !== false) {\r\n array_push($causes, $tag);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (count($categories) !== 0) {\r\n $article->setName($aResult->name);\r\n $article->setAuthor('John doe');\r\n $article->setArticleScore($aResult->article_score);\r\n $article->setContentHtml($html_content);\r\n $article->setDateFirstSeen($date_first_seen);\r\n $article->setDateLastSeen($date_last_seen);\r\n $article->setImgUri($aResult->img_uri);\r\n $article->setNewsonfire(true);\r\n $article->setShowInterval($date);\r\n $article->setSocialScore($aResult->social_score);\r\n $article->setUrl($aResult->url);\r\n $article->setSocialSpeedSph($aResult->social_speed_sph);\r\n $article->setCategories($categories);\r\n $article->setCauses($causes);\r\n $article->setGravite($gravite);\r\n $all_departement = $manager->getRepository(Departement::class)->findAll();\r\n $added_departement= array();\r\n foreach ($all_departement as $departement) {\r\n if ( (strpos($html_content, $departement->getName()) !== false) ) {\r\n if(!in_array($departement->getName(),$added_departement)) {\r\n array_push($added_departement, $departement->getName());\r\n $article->addDepartement($departement);\r\n $article->addRegion($departement->getRegion());\r\n }\r\n }\r\n }\r\n $manager->persist($article);\r\n }\r\n }\r\n\r\n $manager->flush();\r\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n // admin\n $admin = new User();\n $admin->setLogin('admin');\n $admin->setRoles(['ROLE_ADMIN']);\n $password = $this->encoder->encodePassword($admin, 'Admin_test');\n $admin->setPassword($password);\n $manager->persist($admin);\n $manager->flush();\n\n //utilisateur\n\n $user = new User();\n $user->setLogin('user');\n //$user = setRoles('ROLE_USER');\n $password = $this->encoder->encodePassword($user, 'User_test');\n $user->setPassword($password);\n $manager->persist($user);\n $manager->flush();\n\n // Faker\n\n // $faker = Faker\\Factory::create();\n // echo $faker->name;\n\n // pays\n\n if (($paysFile = fopen(__DIR__ . \"/../../data/ListeDePays.csv\", \"r\")) !== FALSE) {\n while (($data = fgetcsv($paysFile)) !== FALSE) {\n $pays = new Pays();\n $pays->setNom($data[0]);\n $manager->persist($pays);\n }\n\n fclose($paysFile);\n }\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n // $manager->persist($product);\n\n // Projet 1\n $projet = new Projets();\n $projet ->setNom(\"Cadexconseil\");\n $projet ->setLien(\"\");\n $projet ->setDescription(\"\");\n $manager->persist($projet);\n\n // Comppetences\n $skill = new Comppetences();\n $skill ->setNom(\"HTML\");\n $skill ->setType(\"langage\");\n $manager->persist($skill);\n \n\n $manager->flush();\n }", "public function load(ObjectManager $manager)\n {\n $book1 = new Book([\n 'isbn' => 9780132350884,\n 'title' => 'Clean Code: A Handbook of Agile Software Craftsmanship.',\n 'author' => 'Uncle Bob',\n 'description' => 'Clean Code is divided into three parts. The first describes the principles, patterns, and practices of writing clean code. The second part consists of several case studies of increasing complexity. Each case study is an exercise in cleaning up code—of transforming a code base that has some problems into one that is sound and efficient. The third part is the payoff: a single chapter containing a list of heuristics and “smells” gathered while creating the case studies. The result is a knowledge base that describes the way we think when we write, read, and clean code.',\n 'available' => false,\n ]);\n\n $book2 = new Book([\n 'isbn' => 9780135974445,\n 'title' => 'Agile Software Development: Principles, Patterns, and Practices.',\n 'author' => 'Uncle Bob',\n 'description' => 'Written by a software developer for software developers, this book is a unique collection of the latest software development methods. The author includes OOD, UML, Design Patterns, Agile and XP methods with a detailed description of a complete software design for reusable programs in C++ and Java. Using a practical, problem-solving approach, it shows how to develop an object-oriented application—from the early stages of analysis, through the low-level design and into the implementation. Walks readers through the designer\\'s thoughts — showing the errors, blind alleys, and creative insights that occur throughout the software design process. The book covers: Statics and Dynamics; Principles of Class Design; Complexity Management; Principles of Package Design; Analysis and Design; Patterns and Paradigm Crossings.',\n 'available' => true,\n ]);\n\n $manager->persist($book1);\n $manager->persist($book2);\n\n $this->addReference('book1', $book1);\n $this->addReference('book2', $book2);\n\n $manager->flush();\n }" ]
[ "0.7676857", "0.75958014", "0.755091", "0.7403772", "0.7331332", "0.7273764", "0.720747", "0.7035566", "0.7007099", "0.6957492", "0.69085765", "0.68872637", "0.68545777", "0.6848193", "0.6842862", "0.68228793", "0.6822571", "0.68179256", "0.6747948", "0.6745667", "0.6713977", "0.6711099", "0.66828775", "0.6678681", "0.6667624", "0.6662347", "0.6656301", "0.665314", "0.6647578", "0.6633372", "0.66320825", "0.661137", "0.6604569", "0.6569849", "0.6566883", "0.6561258", "0.65542793", "0.6554001", "0.654289", "0.6512663", "0.64803636", "0.64747965", "0.647023", "0.646626", "0.64173484", "0.6412793", "0.6408982", "0.6387502", "0.63843226", "0.6372724", "0.6357128", "0.63554937", "0.63334477", "0.6318487", "0.6317463", "0.6303816", "0.6295169", "0.6293555", "0.62891746", "0.6283905", "0.6278025", "0.6268892", "0.6264388", "0.6263558", "0.62505364", "0.6248125", "0.6242669", "0.6238925", "0.6229864", "0.622933", "0.6226882", "0.6223706", "0.6220189", "0.6216631", "0.6213049", "0.6196255", "0.6190747", "0.6185563", "0.6181813", "0.617501", "0.6164711", "0.6158581", "0.61544114", "0.6150285", "0.6146561", "0.61324066", "0.6118299", "0.6113737", "0.61106324", "0.61068815", "0.61050904", "0.6104289", "0.6101935", "0.60955215", "0.6088773", "0.6073623", "0.60730404", "0.6070483", "0.60660625", "0.6064121", "0.6062171" ]
0.0
-1
Funcion que llamos desde Paso2Listaprecios > Tareas > Funcion contador En donde realizamos RESUMEN, es decir comprueba cuantos registros hay y cuantos son nuevo o existentes.
function contador($nombretabla, $BDImportRecambios,$ConsultaImp) { // Inicializamos array $Tresumen['n'] = 0; //nuevo $Tresumen['t'] = 0; //total $Tresumen['e'] = 0; //existe $Tresumen['v'] = 0; //existe // Contamos los registros que tiene la tabla $total = 0; $whereC = ''; $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC); $Tresumen['t'] = $total; // total registros // Obtenemos lineas de registro en blanco y contamos cuantas $whereC = " WHERE trim(Estado) = ''"; $campo[1]= 'RefFabPrin'; $campo[2]= 'linea'; $RegistrosBlanco = $ConsultaImp->registroLineas($BDImportRecambios,$nombretabla,$campo,$whereC); // Como queremos devolver javascript los creamos $Tresumen['v'] = $RegistrosBlanco['NItems']; $Tresumen['LineasRegistro'] = $RegistrosBlanco; //Registros en blanco // Contamos los registros que tiene la tabla nuevo $total = 0; $whereC = " WHERE Estado = 'nuevo'"; $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC); $Tresumen['n'] = $total; //nuevo // Contamos los registros que tiene la tabla existente $total = 0; $whereC = " WHERE Estado = 'existe'"; $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC); $Tresumen['e'] = $total; //existe return $Tresumen; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contarReprobados($espacios_por_cursar){\n $cantidad=0;\n if(count($espacios_por_cursar)>0){\n foreach ($espacios_por_cursar as $key => $espacio) {\n if($espacio['REPROBADO']==1){\n $cantidad++;\n \t }\n }\n }\n return $cantidad; \n }", "function comprobanteEstaRepetido($cuie, $periodo, $prestacionid, $idprestacion, $idrecepcion, $datosnomenclador, $elcomprobante, $fechaprestacion, $beneficiario, $idfactura, $idvacuna) {\r\n // repitiendo el id de prestacion interno, cosa que no sucede casi nunca\r\n $query = \"SELECT fc.cuie as cuie, ff.recepcion_id AS idrecepcion, id_debito,fp.id_prestacion\r\n FROM facturacion.factura ff \r\n INNER JOIN facturacion.comprobante fc ON (ff.id_factura = fc.id_factura) \r\n INNER JOIN facturacion.prestacion fp ON (fc.id_comprobante = fp.id_comprobante) \r\n LEFT JOIN facturacion.debito d ON (fc.id_comprobante=d.id_comprobante)\r\n WHERE fc.cuie='$cuie' \r\n AND ff.periodo='$periodo' \r\n AND fc.idprestacion='$prestacionid'\r\n AND fp.id_prestacion<>$idprestacion\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $ctrl_repetido['debito'] = false;\r\n $yadebitado = $resultado->fields['id_debito'];\r\n $recibidodespues = $resultado->fields['id_prestacion'] < $prestacionid;\r\n if (($resultado->RecordCount() > 0) && !($yadebitado) && $recibidodespues) {\r\n //$var['existe_id'] = 'si';\r\n $idrecepcion_idb = $resultado->fields['idrecepcion'];\r\n if ($idrecepcion_idb != $idrecepcion) {\r\n $ctrl_repetido['msj_error'] = 'ID Prestacion ya existente en el sistema';\r\n $ctrl_repetido['id_error'] = 73;\r\n }\r\n if ($idrecepcion_idb == $idrecepcion) {\r\n $ctrl_repetido['msj_error'] = 'ID Prestacion ya existente en el archivo';\r\n $ctrl_repetido['id_error'] = 74;\r\n }\r\n $ctrl_repetido['debito'] = true;\r\n } else {\r\n if (esNomencladorVacuna($datosnomenclador)) {\r\n\r\n //Controles para los nomencladores que son vacuna\r\n $query = \"SELECT fc.id_comprobante, nro_exp\r\n FROM facturacion.prestacion fp\r\n INNER JOIN facturacion.comprobante fc ON (fc.id_comprobante = fp.id_comprobante)\r\n INNER JOIN facturacion.factura f ON (fc.id_factura=f.id_factura)\r\n WHERE id_prestacion<>$idprestacion\r\n\t\tAND fc.fecha_comprobante=to_date('$fechaprestacion','DD-MM-YYYY')\r\n AND fp.id_nomenclador='\" . $datosnomenclador[0] . \"'\r\n\t\tAND fc.clavebeneficiario='$beneficiario'\r\n AND fc.id_comprobante<>'$elcomprobante'\r\n AND fc.idvacuna='$idvacuna'\r\n\t\tAND fc.id_comprobante NOT IN(\r\n SELECT id_comprobante \r\n FROM facturacion.debito \r\n WHERE id_factura='$idfactura')\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $recibidodespues = $resultado->fields['id_comprobante'] < $idcomprobante;\r\n if (($resultado->RecordCount() > 0) && ($recibidodespues)) {\r\n $ctrl_repetido['msj_error'] = 'Prestacion liquidada en Expediente: ' . $resultado->fields['nro_exp'];\r\n $ctrl_repetido['id_error'] = 74;\r\n $ctrl_repetido['debito'] = true;\r\n }\r\n } else {\r\n\r\n //Controles para los nomencladores que no son de vacu\r\n $query = \"SELECT fc.id_comprobante, nro_exp\r\n FROM facturacion.prestacion fp\r\n INNER JOIN facturacion.comprobante fc ON (fc.id_comprobante = fp.id_comprobante)\r\n INNER JOIN facturacion.factura f ON (fc.id_factura=f.id_factura)\r\n WHERE id_prestacion<>$idprestacion\r\n\t\tAND fc.fecha_comprobante=to_date('$fechaprestacion','DD-MM-YYYY')\r\n\t\tAND fp.id_nomenclador='\" . $datosnomenclador[0] . \"'\r\n\t\tAND fc.clavebeneficiario='$beneficiario'\r\n AND fc.id_comprobante<>'$elcomprobante'\r\n\t\tAND fc.id_comprobante NOT IN(\r\n SELECT id_comprobante \r\n FROM facturacion.debito \r\n WHERE id_factura='$idfactura')\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $recibidodespues = $resultado->fields['id_comprobante'] < $idcomprobante;\r\n if (($resultado->RecordCount() > 0) && ($recibidodespues)) {\r\n $ctrl_repetido['msj_error'] = 'Prestacion liquidada en Expediente: ' . $resultado->fields['nro_exp'];\r\n $ctrl_repetido['id_error'] = 74;\r\n $ctrl_repetido['debito'] = true;\r\n }\r\n }\r\n }\r\n return $ctrl_repetido;\r\n}", "function controlPracticasRelacionadas($clavebeneficiario, $fecha_comprobante, $datosnomenclador) {\r\n\r\n $ctrl['debito'] = false;\r\n $query = \"SELECT *\r\n FROM facturacion.cfg_practicas_relac\r\n WHERE modo=1 and\r\n trim(pracorigen)=trim('$datosnomenclador[3]')\";\r\n $res_origen = sql($query, \"Error 1\") or fin_pagina();\r\n\r\n if ($res_origen->RecordCount() > 0) {\r\n $ctrl['msj_error'] = \"\";\r\n $res_origen->MoveFirst();\r\n while (!$res_origen->EOF) {\r\n $anexo = $res_origen->fields['anexopracrel'];\r\n $nomencladordetalles['tipo'] = $datosnomenclador[2];\r\n $nomencladordetalles['codigo'] = $res_origen->fields['pracrel'];\r\n //busca si ese afiliado se realiza la practica relacionada\r\n $comprobantedelarelacionada = traemeLaPractica($clavebeneficiario, $nomencladordetalles, $fecha_comprobante, $anexo);\r\n if ($comprobantedelarelacionada != null) {\r\n $limite_dias = $res_origen->fields['dias'];\r\n $limite_dias_time = dias_time($limite_dias);\r\n $fecha_comprobante_time = strtotime(date($fecha_comprobante));\r\n $comprobantedelarelacionada_time = strtotime(date($comprobantedelarelacionada));\r\n $resta_time = $fecha_comprobante_time - $comprobantedelarelacionada_time;\r\n if ($resta_time <= $limite_dias_time) {\r\n //una vez que esta comprobado que se realizo la practica dentro de los 30 dias,\r\n //comprueba si existe otra condicion, o si no es obligatoria y sale. \r\n //TODO: no existe while para otras practicas obligatorias\r\n if (($res_origen->fields['otras'] == 'N') || ($res_origen->fields['tipo'] == 'OR')) {\r\n $ctrl['debito'] = false;\r\n break;\r\n }\r\n } else {\r\n if ($ctrl['msj_error'] != \"\") {\r\n $ctrl['msj_error'].=\" y \";\r\n }\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . '] dentro del limite de tiempo';\r\n $ctrl['id_error'] = '76';\r\n $ctrl['nomenclador_rel'] = $nomencladordetalles['codigo'];\r\n if ($res_origen->fields['tipo'] == 'AND')\r\n break;\r\n }\r\n } else {\r\n if ($ctrl['msj_error'] != \"\") {\r\n $ctrl['msj_error'].=\" y \";\r\n }\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . ']';\r\n $ctrl['id_error'] = '75';\r\n $ctrl['nomenclador_rel'] = $nomencladordetalles['codigo'];\r\n if ($res_origen->fields['tipo'] == 'AND')\r\n break;\r\n }\r\n $res_origen->MoveNext();\r\n }\r\n }\r\n return $ctrl;\r\n}", "function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }", "function evt__form_cargo__modificacion($datos)\r\n\t{\r\n $res=0;\r\n if($this->controlador()->dep('datos')->tabla('cargo')->esta_cargada()){//es una modificacion\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n \r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con($car['id_cargo'],$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']);\r\n }\r\n if($res==1){//hay otro puesto \r\n toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar(); \r\n }\r\n }else{//es un alta\r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con(0,$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']); \r\n }\r\n if($res==1){//hay otro puesto \r\n throw new toba_error('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos');\r\n // toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $pers=$this->controlador()->dep('datos')->tabla('persona')->get(); \r\n $datos['generado_x_pase']=0;\r\n $datos['id_persona']=$pers['id_persona'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar();\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $cargo['id_cargo']=$car['id_cargo'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->cargar($cargo);\r\n } \r\n }\r\n\t}", "function setRetiro($monto, $cheque = DEFAULT_CHEQUE,\t$tipo_de_pago = \"cheque\", $recibo_fiscal = DEFAULT_RECIBO_FISCAL,\n\t\t\t\t\t\t$observaciones = \"\", $grupo = DEFAULT_GRUPO, $fecha = false, $recibo = false){\n\t\t$iduser\t\t= getUsuarioActual();\n\n\t\t/**\n\t\t * verifica el maximo Retirable\n\t\t * Si forzar es VERDADERO, el Maximo retirable es igual al SALDO\n\t\t */\n\t\t if ( $this->mForceOperations == true){\n\t\t \t$maximo_ret\t\t\t= $this->mSaldoActual;\n\t\t \t$this->mMessages \t.= \"WARN\\tLa Operacion sera FORZADA \\r\\n\";\n\t\t } else {\n\t\t\t$maximo_ret\t= $this->getMaximoRetirable($fecha);\n\t\t }\n\t\tif ( $monto > $maximo_ret) {\n\t\t\t$this->mMessages \t.= \"ERROR\\tEl Monto a Retirar($monto) es Mayor al Retirable($maximo_ret) \\r\\n\";\n\t\t\t$monto\t= 0;\n\t\t\t$recibo\t= false;\n\t\t}\n\t\tif ( $monto > 0){\n\t\t\t\tif ( in_array($this->mEstatusActual, $this->mEstatusNoOperativos) == true OR ($monto > $this->mSaldoActual) ){\n\n\t\t\t\t\t$this->mMessages \t.= \"ERROR\\tLa Cuenta no esta permitida para recibir Operacion, tiene estatus \" . $this->mEstatusActual .\" \";\n\t\t\t\t\t$this->mMessages \t.= \"o su saldo(\" . $this->mSaldoActual . \") es Mayor al Monto a retirar($monto) \\r\\n\";\n\t\t\t\t\t$this->mSucess\t\t= false;\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( setNoMenorQueCero($this->mPeriodoCuenta) == 0 ){ $this->mPeriodoCuenta\t= 1; }\n\t\t\t\t\tif ( setNoMenorQueCero($this->mSocioTitular) <= DEFAULT_SOCIO){\t$this->init();\t}\n\n\t\t\t\t\tif ($fecha == false ){\n\t\t\t\t\t\tif ( isset($this->mFechaOperacion) AND ($this->mFechaOperacion != false)) {\n\t\t\t\t\t\t\t$fecha = $this->mFechaOperacion;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$fecha = fechasys();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$fecha\t\t\t\t\t= setFechaValida($fecha);\n\t\t\t\t\t$this->mFechaOperacion\t= $fecha;\n\t\t\t\t\t$socio\t\t\t\t\t= $this->mSocioTitular;\n\n\t\t\t\t\t$CRecibo = new cReciboDeOperacion(8, true);\n\t\t\t\t\t//Set a Mvto Contable\n\t\t\t\t\t//Agregar recibo si no hay\n\t\t\t\t\tif ( setNoMenorQueCero($recibo) == 0 ){\n\t\t\t\t\t\t$recibo = $CRecibo->setNuevoRecibo($socio, $this->mNumeroCuenta,\n\t\t\t\t\t\t\t\t\t\t\t\t$this->mFechaOperacion, $this->mPeriodoCuenta, 8,\n\t\t\t\t\t\t\t\t\t\t\t\t$observaciones, $cheque, $tipo_de_pago, $recibo_fiscal, $grupo );\n\t\t\t\t\t\tif (setNoMenorQueCero( $recibo ) == 0 ){\n\t\t\t\t\t\t\t$this->mMessages\t.= \"OK\\tSe Agrego Exitosamente el Recibo [$recibo] de la Cuenta \" . $this->mNumeroCuenta . \" \\r\\n\";\n\t\t\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\t\t\t\t\t\t\t$this->mSucess\t\t= true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->mMessages\t.= \"ERROR\\tSe Fallo al Agregar el Recibo [$recibo] de la Cuenta \" . $this->mNumeroCuenta . \" \\r\\n\";\n\t\t\t\t\t\t\t$this->mSucess\t\t= false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\n\t\t\t\t\tif ( setNoMenorQueCero($recibo) > 0 ){\n\t\t\t\t\t//Agregar el Movimiento\n\t\t\t\t\t\t$CRecibo->setNumeroDeRecibo($recibo);\n\t\t\t\t\t\t$CRecibo->setNuevoMvto($fecha, $monto, $this->mOperacionRetiro, $this->mPeriodoCuenta, $observaciones, -1, TM_CARGO, $socio, $this->mNumeroCuenta);\n\t\t\t\t\t\t$CRecibo->setFinalizarRecibo(true);\n\t\t\t\t\t\t$CRecibo->setFinalizarTesoreria();\n\t\t\t\t\t\t$this->mNuevoSaldo\t= $this->mSaldoAnterior - $monto;\n\n\t\t\t\t\t\t$this->mSucess\t= true;\n\t\t\t\t\t\t///Actualizar el recibo\n\t\t\t\t\t\t$this->mReciboDeOperacion\t= $recibo;\n\t\t\t\t\t\t//Actualizar la Cuenta\n\t\t\t\t\t\t$this->setUpdateSaldo();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->mMessages\t.= \"ERROR\\tNo Existe Recibo con el cual trabajar($recibo) \\r\\n\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->mMessages\t.= $CRecibo->getMessages();\n\t\t\t\t\t$this->mORec\t\t= $CRecibo;\n\t\t\t\t}\n\t\t}\n\n\t\treturn $recibo;\n\t}", "public function avisoSubirRecibo()\n {\n if (Auth::user()->paymenttype->tipopago !== 'Domiciliación a mi cuenta') {\n if (!Auth::user()->corrientepago) {\n $fecha = Carbon::now()->format('Y-m-d');\n $codigo = 'WIMPRECI';\n $aviso = 'Por favor, Ud. debe hacernos llegar el recibo o justificante del pago de\n su cuota de socio.';\n $solucion = 'Escanéelo en formato pdf y realice una de las siguientes acciones: a)\n Súbalo a esta aplicación. Si desea optar por esta solución abra el desplegable con su\n nombre en la parte superior de la página y acceda a su perfil donde encontrará la opción\n correspondiente. b) Deposítelo en nuestro buzón. c) Entréguelo personalmente en nuestro\n despacho sito en la planta superior sobre la secretaría del colegio. Le recomendamos que\n domicilie el pago de su cuota, así se evitará recibir este aviso en sucesivas ocasiones.';\n $user_id = Auth::user()->id;\n\n return $this->avisos->crearAviso($codigo, $fecha, $aviso, $solucion, $user_id);\n }\n }\n }", "function VerificarRegistrosNuevos(){\n $obCon = new Backups($_SESSION['idUser']);\n $sql=\"SHOW FULL TABLES WHERE Table_type='BASE TABLE'\";\n $consulta=$obCon->Query($sql);\n $i=0;\n $RegistrosXCopiar=0;\n $TablasLocales=[];\n \n while ($DatosTablas=$obCon->FetchArray($consulta)){\n $Tabla=$DatosTablas[0];\n if($Tabla<>'precotizacion' and $Tabla<>'preventa'){\n $sql=\"SELECT COUNT(*) as TotalRegistros FROM $Tabla WHERE Sync = '0000-00-00 00:00:00' OR Sync<>Updated\";\n $ConsultaConteo=$obCon->Query($sql);\n $Registros=$obCon->FetchAssoc($ConsultaConteo);\n $TotalRegistros=$Registros[\"TotalRegistros\"];\n if($TotalRegistros>0){ \n $RegistrosXCopiar=$RegistrosXCopiar+$TotalRegistros;\n $TablasLocales[$i][\"Nombre\"]=$Tabla;\n $TablasLocales[$i][\"Registros\"]=$TotalRegistros;\n $i++; \n }\n }\n }\n\n print(\"OK;$RegistrosXCopiar;\".json_encode($TablasLocales, JSON_FORCE_OBJECT));\n }", "function REMUNERACION_DIARIA($_ARGS) {\r\n\t$sueldo_normal_diario = REDONDEO(($_ARGS['ASIGNACIONES']/30), 2);\r\n\t$sql = \"SELECT SUM(tnec.Monto) AS Monto\r\n\t\t\tFROM\r\n\t\t\t\tpr_tiponominaempleadoconcepto tnec\r\n\t\t\t\tINNER JOIN pr_concepto c ON (tnec.CodConcepto = c.CodConcepto AND\r\n\t\t\t\t\t\t\t\t\t\t\t c.Tipo = 'I' AND\r\n\t\t\t\t\t\t\t\t\t\t\t c.FlagBonoRemuneracion = 'S')\r\n\t\t\tWHERE\r\n\t\t\t\ttnec.CodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\ttnec.Periodo = '\".$_ARGS['PERIODO'].\"'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) $field = mysql_fetch_array($query);\r\n\t$remuneracion_diaria = REDONDEO(($field['Monto']/30), 2);\r\n\t$monto = $sueldo_normal_diario + $remuneracion_diaria;\r\n\treturn $monto;\r\n}", "function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }", "public function procesar_relatorio($factura, $consultores, $costo_fijo, $co_usuario){\n \t$respuesta = false;\n\t\tif( $factura && $consultores && $co_usuario && $costo_fijo);\n\t {\n\t\t\t// Se hacen cero todos los totales\n\t\t\t$total_ganacias_netas = 0;\n\t\t\t$total_costo_fijo = 0;\n\t\t\t$total_comision = 0;\n\t\t\t$total_beneficio = array();\n\n\t\t\t// return resumen\n\t\t\t$resumen = array();\n\t\t\t// Para obtener los nombres completos\n\t\t\t$listado_nombre = $this->listado_no_usuario($co_usuario);\t\t\t\t \t\n\n\t\t\t// facturas agrupadas consultor-fecha\t\n\t\t\tforeach ($consultores as $i_consultor => $v_consultor) \n\t\t\t{\n\t\t\t\t// arreglo relatorio\n\t\t\t\t$l_relatorio = array();\n\t\t\t\t$total_beneficio = array();\n\t\t\t\t$fijo = 0;\n\t\t\t\t$nombre = '';\n\n\t\t\t\t// COSTO FIJO (Custo Fixo)\n\t\t\t\t$fijo = $this->costo_fijo($costo_fijo, $v_consultor['co_usuario']);\n\n\t\t\t\t// COSTO FIJO (Custo Fixo)\t\n\t\t\t\tif ($listado_nombre[$i_consultor]['co_usuario'] == $v_consultor['co_usuario']) \n\t\t\t\t{\n\t\t\t\t\t$nombre = $listado_nombre[$i_consultor]['no_usuario'];\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\t// facturas agrupadas por fechas\t\n\t\t\t\tforeach ($v_consultor['data_emissao'] as $i_periodo => $v_periodo) \n\t\t\t\t{\n\t\t\t\t\t// se hacen cero\n\t\t\t\t\t$ganancias_netas = 0;\n\t\t\t\t\t$comision = 0;\n\n\t\t\t\t\t$total_ganacias_netas = 0;\n\t\t\t\t\t$total_costo_fijo = 0;\n\t\t\t\t\t$total_comision = 0;\n\n\t\t\t\t\t// lista de todas las facturas del consultor\n\t\t\t\t\t$lista_facturas = $factura[$i_consultor]['fatura'];\n\t\t\t\t\t\n\t\t\t\t\t// facturas\n\t\t\t\t\tforeach ($lista_facturas as $i_factura => $v_factura) \n\t\t\t\t\t{\n\t\t\t\t\t\t// CALCULO DE GANACIAS NETAS ( Receita Liquida )\n\t\t\t\t\t\t$valor_neto = $this->calcular_valor_neto($v_factura['valor'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $v_factura['total_imp_inc']);\n\t\t\t\t\t\t// CALCULO DE COMISIONES ( Comissão )\n\t\t\t\t\t\t$valor_comision = $this->calcular_valor_comision( $v_factura['valor'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $v_factura['total_imp_inc'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $v_factura['comissao_cn']);\n\t\t\t\t\t \t// FACTURAS DEL MISMO PERIODO \n\t\t\t\t\t\tif ($v_factura[\"data_emissao\"] == $v_periodo)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GANACIAS NETAS ( Receita Liquida )\n\t\t\t\t\t\t\t$ganancias_netas = $this->calcular_ganancia_neta( $ganancias_netas, $valor_neto );\t\n\t\t\t\t\t\t\t// se suman todas las comisiones por mes de referencia\n\t\t\t\t\t\t\t$comision = ($comision + $valor_comision);\n\t\t\t\t\t\t\t// CALCULO DE BENEFICIO (Lucro)\n\t\t\t\t\t\t\t$beneficio = $this->calcular_beneficios($ganancias_netas, $fijo, $comision);\t\t\t\t\t\n\t\t\t\t\t\t\t// total beneficios\n\t\t\t\t\t\t\t$total_beneficio[$i_periodo] = $beneficio;\n\t\t\t\t\t\t \t// relatorio\n\t\t\t\t\t\t \t$l_relatorio[$i_periodo] = array('periodo' => $v_factura[\"data_emissao\"],\n\t\t\t\t\t\t \t\t\t\t\t\t\t 'ganacia-neta' => round($ganancias_netas, 3),\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'costo-fijo' => round($fijo, 3),\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'comision' => round($comision, 3),\n\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'beneficio' => round($beneficio, 3)\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// FIN FACTURAS DEL MISMO PERIODO \n\n\t\t\t\t\t\t\t// se suman todas las ganacias netas\n\t\t\t\t\t\t\t$total_ganacias_netas = ( $total_ganacias_netas + $valor_neto);\n\n\t\t\t\t\t\t\t// se suman todas las comisiones\n\t\t\t\t\t\t\t$total_comision = ( $total_comision + $valor_comision );\n\t\t\t\t\t}\n\t\t\t\t\t// fin facturas \n\n\t\t\t\t\t// se suman todos los costos fijos\n\t\t\t\t\t$total_costo_fijo = ($fijo * ($i_periodo+1));\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// fin facturas agrupadas por fechas\t\t\t\t\t\n\n\t\t\t// Se agrega el bloque completo de acuerdo al indice fecha del consultor\n\t\t\t$resumen[$i_consultor]['co_usuario'] = $v_consultor['co_usuario'];\n\t\t\t$resumen[$i_consultor]['no_usuario'] = $nombre;\t\t\t\t \n\t\t\t$resumen[$i_consultor]['periodos'] = $l_relatorio;\n\t\t\t$resumen[$i_consultor]['ganancias-netas'] = round( $total_ganacias_netas, 3);\n\t\t\t$resumen[$i_consultor]['costo-fijo'] = round( $total_costo_fijo, 3);\n\t\t\t$resumen[$i_consultor]['comision'] = round( $total_comision, 3);\n\t\t\t$resumen[$i_consultor]['beneficio'] = round( array_sum($total_beneficio), 3);\t\n\t\t\t$resumen[$i_consultor]['estado'] = $v_factura['co_fatura'];\n\n\t\t\t$total_ganacias_netas = 0;\n\t\t\t$total_costo_fijo = 0;\n\t\t\t$total_comision = 0;\n\n\t\t\t}\n\t\t\t// fin facturas agrupadas consultor-fecha\t\t\n\n\t\t$respuesta = $resumen;\n\t\t}\n\t return $respuesta;\n }", "public function atualizarUsuarios($idusuario, $nome, $email, $senha, $senha_confirma, $telefone, $dtnascimento, $habilitado, $idpermissao){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT count(*) as total from tbusuarios WHERE email = '$email' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n \n if($senha != $senha_confirma){\n return 2;\n }elseif ($senha == '' || $senha == null && $senha_confirma == '' || $senha_confirma == null ) {\n $sql = \"UPDATE tbusuarios SET nome = '$nome', email='$email', dt_nascimento='$dtnascimento', telefone='$telefone', data_modificado = NOW(), habilitado='$habilitado', idpermissao='$idpermissao' WHERE idusuario = '$idusuario' \";\n echo $this->conexao->query($sql);\n }else{\n $sql = \"UPDATE tbusuarios SET nome = '$nome', email='$email', senha='$senha', senha_confirma='$senha_confirma' dt_nascimento='$dtnascimento', telefone='$telefone', data_modificado = NOW(), habilitado='$habilitado', idpermissao='$idpermissao' WHERE idusuario = '$idusuario' \";\n\n echo $this->conexao->query($sql);\n }\n }", "public function modificarCantidadMerma($idProducto,$cantidadNueva){\n\t\t//obtenermos el producto caducado del inventario\n\t\t$this->db->where('idProducto',$idProducto);\n\t\t$query =$this->db->query(\"Select * \n\t\t\tfrom productos where idProducto = \". $idProducto .\" \");\n\n\t\t$canActual = 0;\n\t\t$query2 = \"\";\n\t\tif($query -> num_rows() > 0) :\n\t\t\tforeach ($query->result() as $prodCaducado) :\n\t\t\t\t//hacemos una consulta para buscar en el inventario del chofer, \n\t\t\t\t//si tenemos ese producto, le cambiamos uno\n\t\t\t\t$query2 =$this->db->query(\"\n\t\t\t\t\tselect \n\t\t\t\t\t\tp.idProducto as idProducto,\n\t\t\t\t\t\tdse.cantidadLleva as cantidad\n\t\t\t\t\tfrom \t\n\t\t\t\t\t\tdetalle_salidas_entradas as dse\n\t\t\t\t\tinner join \n\t\t\t\t\t\tsalidas_entradas as se on se.idSalidas_entradas = dse.idSalidas_entradas\n\t\t\t\t\tinner join \n\t\t\t\t\t\tproductos as p on p.idProducto = dse.idProducto \n\t\t\t\t\twhere \n\t\t\t\t\t\tp.nombre_producto = \". $prodCaducado->nombre_producto .\" and \n\t\t\t\t\t\tp.presentacion = \". $prodCaducado->presentacion .\" and\n\t\t\t\t\t\tp.precio_fabrica = \". $prodCaducado->precio_fabrica .\" and \n\t\t\t\t\t\tp.precio_publico = \". $prodCaducado->precio_publico .\" and \n\t\t\t\t\t\tp.status = 1 and \n\t\t\t\t\t\tp.fecha_caducidad > (SELECT CURRENT_DATE())\n\t\t\t\t\t\tlimit 1; \n\t\t\t\t\");\n\t\t\t\t//obtenemos la cantidad y la restamos \n\t\t\t\tif($query2 -> num_rows() > 0) :\n\t\t\t\t\t//si se encuentra ese producto en nuestro camion (inventario chofer)\n\t\t\t\t\tforeach ($query2->result() as $prodNuevo) :\n\t\t\t\t\t\t$idProducto = $prodNuevo->idProducto; \n\n\t\t\t\t\t\t$canActual = $prodNuevo->cantidad; \n\n\t\t\t\t\t\t//restamos la cantidad actual menos la que se vendio\n\t\t\t\t\t\tif($cantidadNueva > $canActual){\n\t\t\t\t\t\t\t//la cantidad es mayor que la q se tiene en inventario\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$cantidadNueva = $canActual - $cantidadNueva;\n\t\t\t\t\t\t\t$this->db->query(\"\n\t\t\t\t\t\t\t\tUPDATE \n\t\t\t\t\t\t\t\t\tdetalle_salidas_entradas \n\t\t\t\t\t\t\t\t\tSET cantidadRegreso = \". $cantidadNueva .\"\n\t\t\t\t\t\t\t\tWHERE idProducto = \". $idProducto .\";\n\t\t\t\t\t\t\t\");\n\t\t\t\t\t\t}\n\t\t\t\t\tendforeach;\n\t\t\t\telse: \n\t\t\t\t\treturn false;\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\telse:\n\t\t\treturn false;\n\t\tendif;\n\t\t\n\t}", "function modificarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_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_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_baja','fecha_baja','date');\n\t\t$this->setParametro('nro_cuenta','nro_cuenta','varchar');\n\t\t$this->setParametro('fecha_alta','fecha_alta','date');\n\t\t$this->setParametro('id_institucion','id_institucion','int4');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('denominacion','denominacion','varchar');\n\t\t$this->setParametro('centro','centro','varchar');\n\t\t\n\t\t$this->setParametro('id_finalidads','id_finalidads','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "static public function ctrEliminarReceta($receta){\n\n $idReceta = $receta;\n $tabla = \"Receta\";\n $tablaRecetaDetalle = \"RecetaDetalle\";\n\n //ELIMINAMOS PRIMERO EL DETALLE DE LA VENTA\n\n $eliminoDetalle = ModeloRecetas::mdlEliminarDetalleReceta($tablaRecetaDetalle, $idReceta);\n\n //ELIMINAMOS LA RECETA\n\n $respuesta = ModeloRecetas::mdlEliminarReceta($tabla, $idReceta); \n\n if($respuesta==\"ok\"){\n\n echo 0;\n\n }else{\n\n echo 1;\n\n }\n }", "public function atualizarClientes($reg,$nome,$rg,$cpf,$cnpj,$telefone,$dtnascimento,$habilitado){\n //$conexao = $c->conexao();\n\n $usuid = $_SESSION['usuid'];\n $_SESSION['nomeAnterior'] = $nome;\n\n $sql = \"SELECT reg,rg FROM tbclientes c WHERE reg = '$reg' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if($rg != $row['rg']){\n $sql = \"SELECT count(*) as existe FROM tbclientes c WHERE rg = '$rg' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if ($row['existe'] >= 1 ) {\n return 0;\n }else{ \n\n $sql = \"UPDATE tbclientes SET nome = '$nome', rg = '$rg', cpf='$cpf', cnpj = '$cnpj', telefone = '$telefone', dt_nascimento = '$dtnascimento', habilitado = '$habilitado', modificado = NOW(), usuid = '$usuid' WHERE reg = '$reg'\";\n echo $this->conexao->query($sql);\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" atualizou o Cliente para $nome \";\n $this->salvaLog($mensagem);\n }\n \n }else{ \n\n $sql = \"UPDATE tbclientes SET nome = '$nome', rg = '$rg', cpf='$cpf', cnpj = '$cnpj',telefone = '$telefone', dt_nascimento = '$dtnascimento', habilitado = '$habilitado', modificado = NOW(), usuid = '$usuid' WHERE reg = '$reg'\";\n\n echo $this->conexao->query($sql);\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" atualizou o Cliente para $nome \";\n $this->salvaLog($mensagem);\n\n }\n\n \n\n }", "function actualizarDeuda($acceso,$id_contrato){\n\treturn;\n\t/*\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select sum(cant_serv * costo_cobro) as deuda from contrato_servicio_deuda where id_contrato='$id_contrato' and status_con_ser='DEUDA'\");\n\t\t\t\t\tif($fila=row($acceso)){\n\t\t\t\t\t\t$deuda = trim($fila['deuda']);\n\t\t\t\t\t\t//echo \"<br>Update contrato Set deuda='$deuda' Where id_contrato='$id_contrato'\";\n\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato Set deuda='$deuda' Where id_contrato='$id_contrato'\");\n\t\t\t\t\t}\n\t\t\t\t\t*/\n}", "static public function ctrRegistrarReceta(){\n\n if(isset($_POST[\"productoReceta\"])){\n\n if (preg_match('/^[0-9]+$/', $_POST[\"productoReceta\"])){\n\n $tabla = \"Receta\";\n $idProducto = $_POST[\"productoReceta\"];\n $listaInsumos = json_decode($_POST[\"listadoInsumos\"], true);\n\n $idReceta = ModeloRecetas::mdlRegistrarReceta($tabla, $idProducto);\n\n if ($idReceta != \"error\") {\n \n $tablaRecetaDetalle = \"RecetaDetalle\";\n\n foreach ($listaInsumos as $key => $value) {\n \n $idInsumo = $value[\"idInsumo\"]; \n $Cantidad = $value[\"cantidadInsumo\"];\n \n $respuesta = ModeloRecetas::mdlRegistrarDetalleReceta($tablaRecetaDetalle, $idReceta, $idInsumo, $Cantidad);\n\n }\n\n if($respuesta = \"ok\"){\n\n echo'<script>\n swal({\n title:\"¡Registro Exitoso!\",\n text:\"¡La receta se registró correctamente!\",\n type:\"success\",\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n },\n function(isConfirm){\n if(isConfirm){\n window.location=\"recetas\";\n }\n });\n </script>';\n\n }else{\n\n echo'<script>\n swal({\n title:\"¡Registro Fallido!\",\n text:\"¡Ocurrio un error, revise los datos!'.$respuesta.'\",\n type:\"error\",\n confirmButtonText:\"Cerrar\",\n closeOnConfirm: false\n });\n </script>';\n\n }\n\n }// fin if receta error\n\n\n } else {\n\n echo '<script>\n swal({\n title:\"¡Error!\",\n text:\"¡No ingrese caracteres especiales!\",\n type:\"warning\",\n confirmButtonText:\"Cerrar\",\n closeOnConfirm:false\n },\n function(isConfirm){\n if(isConfirm){\n window.location=\"recetas\";\n }\n });\n </script>';\n\n }\n\n } //if isset\n \n }", "function RegistrarNotasAnticipo($tipoCambioFac = 0,$montoAnticipo=0,$tagref, $monedaFactura, $fechaemision, $DebtorNo, $DebtorTransIDFactura, $tieneIVA,$idAnticipo,$ivaFactura, $db, $puntoVenta = 0, $nocuentaPuntoVenta = '', $nomClientePuntoVenta = ''){\n // *********************************************** //\n // ********************************************** //\n // ******** No dejar echo en la funcion *********//\n // ******** Declarar Variables a usar ******** //\n // ******** Afecta al punto de venta ********* //\n // ****************************************** //\n // ***************************************** //\n \n //global $db;\n $systype_doc = 13;\n /*$tipocambio = $_SESSION['Items' . $identifier]->CurrencyRate;\n $montoAnticipo = $LineAnticipo->Monto;\n $moneda = $_SESSION['Items' . $identifier]->CurrAbrev;\n $fecha = split(\"-\", $fechaemision) ;\n $DebtorNo = $_SESSION['Items' . $identifier]->DebtorNo;\n $tagref = $_SESSION['Items' . $identifier]->Tagref;\n $tieneIVA = $tieneIVA;\n $idAnticipo = $LineAnticipo->TransID;*/\n\n //echo \"<br> AnticipoIVA: \".$tieneIVA;\n $tipocambio = $tipoCambioFac;\n $montoAnticipo = $montoAnticipo;\n $monto = $montoAnticipo;\n $moneda = $monedaFactura;\n $fecha = explode(\"-\", $fechaemision) ;\n $DebtorNo = $DebtorNo;\n $tagref = $tagref;\n $tieneIVA = $tieneIVA;\n $idAnticipo = $idAnticipo;\n $ErrMsg = '';\n $DbgMsg = '';\n\n $InputError = 0;\n\n $FromDia = $fecha [2];\n $FromMes = $fecha [1];\n $FromYear = $fecha [0];\n $_POST['aplparcial'] = 2; // PARA TIMBRAR\n $_POST['cmbUsoCfdi'] = 'G02'; \n $_POST['cmbTipoComprobante'] = 'E';\n $_POST['cmbMetodoPago'] = 'PUE';\n $_POST['cmbTipoRelacion'] = '07';\n $_POST['paymentname'] = 'Aplicacion de anticipos';\n $vrcodepay = utf8_decode('Aplicacion de anticipos');\n $concepto = utf8_decode('Aplicacion de anticipos'); \n $vrcodeasat = '30';\n //$idSaldoAnticipo = $LineAnticipo->TransID;\n $DebtorTransID = $DebtorTransIDFactura ;\n\n $SQLDatosFactura= \"SELECT debtortrans.*, name FROM debtortrans\n INNER JOIN debtorsmaster ON debtortrans.debtorno = debtorsmaster.debtorno\n WHERE id =\" .$DebtorTransIDFactura;\n $resultFactura = DB_query($SQLDatosFactura, $db);\n $myrowFactura = DB_fetch_array($resultFactura);\n $TotalFactura = $myrowFactura['ovamount'] + $myrowFactura['ovgst'];\n $typeFactura = $myrowFactura['type'];\n $nombrecliente= $myrowFactura['name'];\n \n\n //echo \"<br> Tipo cambio BIEN\".$tipoCambioFacBIEN;\n\n $_POST ['TaxCat'] = 2;\n if($tieneIVA == '1'){\n $_POST ['TaxCat'] = 4;\n }\n\n $nocuenta = '';\n if ($puntoVenta == 1) {\n $nocuenta = $nocuentaPuntoVenta;\n } else {\n if (isset($_POST ['nocuenta'])) {\n $nocuenta = $_POST ['nocuenta'];\n }\n }\n\n $nomCliente = '';\n if ($puntoVenta == 1) {\n $nomCliente = $nomClientePuntoVenta;\n } else {\n if (isset($nombrecliente)) {\n $nomCliente = $nombrecliente;\n }\n }\n\n $_POST ['nocuenta'] = $nocuenta;\n\n $nombrecliente = $nomCliente;\n\n $SQLSaldoANT = \"SELECT debtortrans.*, bien.rate as cambiobien FROM debtortrans \n INNER JOIN debtortrans bien ON bien.id = debtortrans.ref1\n WHERE debtortrans.id ='\".$idAnticipo.\"'\"; \n\n //echo \"<br> saldo\".$SQLSaldoANT;\n $resultSaldoANT = DB_query($SQLSaldoANT, $db);\n $rowSaldoANT = DB_fetch_array($resultSaldoANT);\n $monedaSaldoANT = $rowSaldoANT['currcode'];\n $rateSaldoANT = $rowSaldoANT['rate'];\n $ivaSaldoANT = $rowSaldoANT['ovgst'];\n $tipoCambioFacBIEN= $rowSaldoANT['cambiobien'];\n \n\n //echo \"<br> Pruebas: \".$rowSaldoANT;\n //echo \"<br> saldo ANt: \".$rateSaldoANT;\n if ($InputError != 1) {\n $Result = DB_Txn_Begin($db);\n \n // Obtiene el trans no que le corsesponde en base al tagref y al $systype_doc\n $transno = GetNextTransNo($systype_doc, $db);\n \n $taxrate = 0;\n $montoiva = 0;\n $rate = ( $tipocambio);\n $DefaultDispatchDate = $FromDia . '/' . $FromMes . '/' . $FromYear;\n $fechaini = rtrim($FromYear) . '-' . rtrim($FromMes) . '-' . rtrim($FromDia);\n $diae = rtrim($FromDia);\n $mese = rtrim($FromMes);\n $anioe = rtrim($FromYear);\n $horax = date('H:i:s');\n $horax = strtotime($horax);\n $hora = date('H');\n $minuto = date('i');\n $segundo = date('s');\n $fechainic = mktime($hora, $minuto, $segundo, rtrim($mese), rtrim($diae), rtrim($anioe));\n $fechaemision = date(\"Y-m-d H:i:s\", $fechainic);\n $PeriodNo = GetPeriod($DefaultDispatchDate, $db, $tagref);\n $DefaultDispatchDate = FormatDateForSQL($DefaultDispatchDate);\n \n if (isset($_POST ['TaxCat']) and $_POST ['TaxCat'] != \"\") {\n $sqliva = \"SELECT taxrate,taxglcode,taxglcodepaid\n FROM taxauthrates, taxauthorities\n WHERE taxauthrates.taxauthority=taxauthorities.taxid\n AND taxauthrates.taxcatid =\" . $_POST ['TaxCat'];\n\n //echo \"<br> SQL IVA\".$sqliva;\n\n $result = DB_query($sqliva, $db);\n $myrow = DB_fetch_row($result);\n $taxrate = $myrow [0];\n $taxglcode = $myrow [1];\n $taxglcodepaid = $myrow [2];\n }\n\n // calcula iva y desglosa de iva\n // $montosiniva = $monto / (1 + $taxrate);\n // $montoiva = $monto - $montosiniva;\n\n $mntIVA = 0;\n if (isset($_POST['mntIVA'])) {\n $mntIVA = $_POST['mntIVA'];\n }\n\n // calcula iva y desglosa de iva\n if (($mntIVA == 0 || empty($mntIVA))) {\n //Iva del categoria impuestos\n $montosiniva = $monto / (1 + $taxrate);\n $montoiva = $monto - $montosiniva;\n }else{\n //Iva agregado manual\n $_SESSION['IvaManualAbonoDirectoClientes'] = 1;\n //\n $montosiniva = $monto - $mntIVA;\n //$montosiniva = $monto;\n $montoiva = $mntIVA;\n } \n // se valida ya que debe de acuerdo al iva de l factura\n //echo \"<br> ivaFactura2: \".$ivaFactura;\n if( (Round($TotalFactura,2) - Round($monto,2) < -.01) AND $tieneIVA ==1 AND $ivaFactura == 0){\n $monto = $montosiniva;\n $montoiva = $montosiniva - ($montosiniva/1.16);\n $montosiniva = ($montosiniva/1.16);\n $montoAnticipo = $monto;\n }\n \n // Datos del Periodo y fecha ***\n // $DefaultDispatchDate=Date($_SESSION['DefaultDateFormat'],CalcEarliestDispatchDate());\n // $PeriodNo = GetPeriod($DefaultDispatchDate, $db);\n \n // $DefaultDispatchDate = FormatDateForSQL($DefaultDispatchDate);\n // *****************************\n if ($_SESSION['MostrarCuentaNC']=='1') {\n $SQL=\"SELECT accountcode,\n concept AS accountname\n FROM chartbridge\n WHERE accountcode='\".$_POST['GLCode'].\"'\n ORDER BY accountcode\";\n $ResultR=DB_query($SQL, $db);\n $rowR=DB_fetch_array($ResultR);\n $concepto.=' '.$rowR['accountname'];\n }\n // Realiza el insert en la tabla de debtortrans\n $SQL = \"INSERT INTO debtortrans (`tagref`,\n `transno`,`type`,\n `debtorno`,`branchcode`,\n `origtrandate`,`trandate`,`prd`,\n `settled`,`reference`,`tpe`,`order_`,\n `rate`,`ovamount`,`ovgst`,`ovfreight`,\n `ovdiscount`,`diffonexch`,`alloc`,`invtext`,\n `shipvia`,`edisent`,`consignment`,`folio`,`ref1`,`ref2`,`currcode`,paymentname,nocuenta,userid)\";\n $SQL .= \" VALUES (\" . $tagref . \",\n \" . $transno . \",\" . $systype_doc . \",\n '\" . $DebtorNo . \"', '\" . $DebtorNo . \"','\" . $fechaemision . \"','\" . $fechaini . \"',\" . $PeriodNo . \",'0','\" . $concepto . \"', '','0','\" . $rate . \"',\" . ($montosiniva * - 1) . \",\" . ($montoiva * - 1) . \",'0','0','0','0','','1','0','', 'FANT','NCR','NCR','\" . $moneda . \"','\" . $_POST ['paymentname'] . \"','\" . $_POST ['nocuenta'] . \"','\".$_SESSION['UserID'].\"')\";\n // echo '<pre>sql NC:'.$SQL;\n $result = DB_query($SQL, $db);\n \n $DebtorTransIDND = DB_Last_Insert_ID($db, 'debtortrans', 'id');\n\n // ***************************************************************************************************\n // **** CFDI Relacionados ****\n // ***************************************************************************************************\n // \n //******************GENERAR NOTA DE CARGO Y SE HACE LA APLICACION YA QUE ES SIN CONTABILIDAD****************** \n $systype_docN = 21;\n $transnoN = GetNextTransNo($systype_docN, $db); \n $SQLN = \"INSERT INTO debtortrans (`tagref`,\n `transno`,`type`,\n `debtorno`,`branchcode`,\n `origtrandate`,`trandate`,`prd`,\n `settled`,`reference`,`tpe`,`order_`,\n `rate`,`ovamount`,`ovgst`,`ovfreight`,\n `ovdiscount`,`diffonexch`,`alloc`,`invtext`,\n `shipvia`,`edisent`,`consignment`,`folio`,`ref1`,`ref2`,`currcode`,paymentname,nocuenta,userid)\";\n $SQLN .= \" VALUES (\" . $tagref . \",\n \" . $transnoN . \",\" . $systype_docN . \",\n '\" . $DebtorNo . \"', '\" . $DebtorNo . \"','\" . $fechaemision . \"','\" . $fechaini . \"',\" . $PeriodNo . \",'0','\" . $concepto . \"', '','0','\" . $rateSaldoANT . \"',\" . ($montosiniva) . \",\" . ($montoiva) . \",'0','0','0','0','','1','0','', 'FANT','NCR','NCR','\" . $moneda . \"','\" . $_POST['paymentname'] . \"','\" . $_POST ['nocuenta'] . \"','\".$_SESSION['UserID'].\"')\";\n //echo '<pre>sql NC:'.$SQLN;\n $result = DB_query($SQLN, $db);\n $DebtorTransIDCargo = DB_Last_Insert_ID($db, 'debtortrans', 'id');\n\n $ISQL = \"INSERT INTO custallocns (datealloc,transid_allocfrom,amt,transid_allocto, rate_to,currcode_to, rate_from, currcode_from)\n VALUES ( NOW(),\" . $idAnticipo . ',' . abs($montoAnticipo) . ',' . $DebtorTransIDCargo . ',\"'.$tipocambio.'\", \"'.$moneda.'\", \"'.$rate.'\", \"'.$moneda.'\" )';\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n\n $ISQL = \"UPDATE debtortrans SET alloc = alloc + \".($montoAnticipo * -1 ).\" WHERE id = '\".$idAnticipo.\"' \" ;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n\n\n $ISQL = \"UPDATE debtortrans SET alloc = alloc + \".abs($montoAnticipo).\", settled=1 WHERE id = '\".$DebtorTransIDCargo.\"' \" ;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n\n //********************GENERAR NOTA DE CARGO Y SE HACE LA APLICACION YA QUE ES SIN CONTABILIDAD********************\n $percentDescription=\"\";\n if ($_SESSION['FacturaVersion']==\"3.3\") {\n\n $queryInsert=\"INSERT INTO notesorders_invoice(transid,transid_relacion,monto, tiporelacion_relacion, trandate)\";\n $queryInsert.=\" VALUES ('\".$DebtorTransIDND.\"','\".$DebtorTransID.\"',\".str_replace(\",\", \"\", $monto ).\", '\".$_POST['cmbTipoRelacion'].\"', NOW())\";\n\n\n // echo \" Consulta: <br> notesordes: \".$queryInsert;\n $result = DB_query($queryInsert, $db);\n\n // SE HACE LA RELACION DE FACTURA CON NOTA DE CREDITO\n $ISQL = \"INSERT INTO custallocns (datealloc,transid_allocfrom,amt,transid_allocto, rate_to,currcode_to, rate_from, currcode_from )\n VALUES (NOW(),\" . $DebtorTransIDND . ',' . abs($monto ) . ',' . $DebtorTransID . ', \"'.$tipocambio.'\", \"'.$moneda.'\", \"'.$rate.'\", \"'.$moneda.'\")';\n //echo \"<br> PRUEBAS: \".$ISQL;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n\n $ISQL = \"UPDATE debtortrans SET alloc = alloc + \". (abs($monto ) * -1 ).\", settled=1 WHERE id = '\".$DebtorTransIDND.\"' \" ;\n //echo \"<br> PRUEBAS: \".$ISQL;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n $ISQL = \"UPDATE debtortrans SET alloc = alloc + \".abs($monto).\" WHERE id = '\".$DebtorTransID.\"' \" ;\n //echo \"<br> PRUEBAS: \".$ISQL;\n $Result = DB_query($ISQL, $db, $ErrMsg, $DbgMsg, true);\n // SE HACE LA RELACION DE FACTURA CON NOTA DE CREDITO\n \n \n if ($result && 1 == 2) {\n $banderaEx = 0;\n if ($banderaEx > 0) {\n while ($rse = DB_fetch_array($rrr)) {\n $queryFolio=\"SELECT REPLACE(folio,'|','') as folio FROM debtortrans WHERE id = '\".$rse['transid_relacion'].\"'\";\n $resultFolio = DB_query($queryFolio, $db);\n $myrowFolio = DB_fetch_array($resultFolio);\n $percentDescription .= \", aplicado al folio: \" .$myrowFolio['folio'] ;// \", \" . number_format((($rse['monto']/$monto) * 100), '0', '.', '') .\" % al saldo del folio: \" .$myrowFolio['folio'] ;\n }\n } else {\n $queryFolio=\"SELECT REPLACE(folio,'|','') as folio FROM debtortrans WHERE id = '\".$_POST['InvoiceTransId_'.$index].\"'\";\n $resultFolio = DB_query($queryFolio, $db);\n $myrowFolio = DB_fetch_array($resultFolio);\n $percentDescription .= \", aplicado al folio: \" .$myrowFolio['folio'] ;//$percentDescription .= \", \" . number_format((( str_replace(\",\", \"\", $_POST['InvoiceAmount_'.$index])/$monto) * 100), '0', '.', '') .\" % al saldo del folio: \" .$myrowFolio['folio'] ;\n }\n }\n //SE CREA INSERT PARA REGISTRAR LA RELACION DE LA FACTURA CON EL ANTICIPO\n $SQLAnt = \"UPDATE salesinvoiceadvance SET transidncredito = '\".$DebtorTransIDND.\"' , montoncredito = '\".str_replace(\",\", \"\", $monto).\"', transidncargo = '\".$DebtorTransIDCargo.\"' WHERE transidinvoice = '\".$DebtorTransID.\"' AND transidanticipo = '\".$idAnticipo.\"';\";\n $resultado = DB_query($SQLAnt, $db);\n\n //SE CREA INSERT PARA REGISTRAR LA RELACION DE LA FACTURA CON EL ANTICIPO\n\n $querySelect=\"select notesorders_invoice.transid_relacion,(abs(notesorders_invoice.monto)) AS ovamount ,codesat,c_paymentid,paymentname\n from notesorders_invoice\n left join debtortrans on notesorders_invoice.transid_relacion = debtortrans.id\n where notesorders_invoice.transid='\".$DebtorTransIDND.\"'\n order by notesorders_invoice.monto desc limit 1;\";\n $resultSelect = DB_query($querySelect, $db);\n\n if (DB_num_rows($resultSelect)) {\n $myrowResult=DB_fetch_array($resultSelect);\n\n if ($myrowResult['codesat']==null or $myrowResult['codesat']=='') {\n $queryGetCod=\"SELECT debtortrans.paymentname, paymentmethods.codesat\n FROM debtortrans \n INNER JOIN paymentmethods ON paymentmethods.paymentname= debtortrans.paymentname\n WHERE id='\".$myrowResult['transid_relacion'].\"'\n LIMIT 1\";\n $resultGetc = DB_query($queryGetCod, $db);\n if (DB_num_rows($resultGetc)) {\n $myrowGet=DB_fetch_array($resultGetc);\n\n //$vrcodeasat=$myrowGet['codesat'];\n //$vrcodepay=$myrowGet['paymentname'];\n }\n if ($_SESSION['UserID'] == 'desarrollo') {\n //echo '<pre> paymentname:'.$queryGetCod;\n //echo htmlentities($arrayGeneracion['xml']);\n }\n } else {\n //$vrcodeasat=$myrowResult['codesat'];\n //$vrcodepay=$myrowResult['paymentname'];\n }\n\n $vrcodepayid= $_POST['cmbMetodoPago'];\n \n \n $percentDescription = \"\"; // se deja vacio ya que la descripción solo permite 1000 caracteres, si no se timbra, se agrega solo en PDF\n\n $queryUpdate=\"UPDATE debtortrans SET paymentname='\".$vrcodepay.\"',codesat='\".$vrcodeasat.\"',c_TipoDeComprobante='E',c_paymentid='\".$vrcodepayid.\"',c_UsoCFDI='\".$_POST['cmbUsoCfdi'] .\"',invtext=concat(invtext,' ', '\".$percentDescription.\"') WHERE id='\".$DebtorTransIDND.\"'\";\n //echo \"<br>sqlUpdate:<pre>\".$queryUpdate;\n\n $result = DB_query($queryUpdate, $db);\n } else {\n $percentDescription = \"\"; // se deja vacio ya que la descripción solo permite 1000 caracteres, si no se timbra, se agrega solo en PDF\n\n $queryUpdate=\"UPDATE debtortrans SET paymentname='\".$_POST['paymentname'].\"',codesat='\".$vrcodeasat.\"',c_TipoDeComprobante='E',c_paymentid='\".$_POST['cmbMetodoPago'].\"',c_UsoCFDI='\".$_POST['cmbUsoCfdi'] .\"',invtext=concat(invtext,' ', '\".$percentDescription.\"') WHERE id='\".$DebtorTransIDND.\"'\";\n //echo \"<br>sqlUpdate:<pre>\".$queryUpdate;\n\n $result = DB_query($queryUpdate, $db);\n }\n }\n \n \n // ***************************************************************************************************\n // **** AFECTACIONES CONTABLES ****\n // ***************************************************************************************************\n $rmontosiniva = ($montosiniva / $rate);\n $rmontosinivaANT = ($montosiniva / $tipoCambioFacBIEN);\n $rmontoiva = ($montoiva / $rate);\n $rmontoivaP = ($montoiva / $rateSaldoANT);\n $rmonto = ($monto / $rate);\n\n /*echo \"<br> MONTO; TOTAL total: \".$monto.\" \".$rate.\" \".($monto/$rate);\n echo \"<br> MONTO; TOTAL montoiva : \".$montoiva.\" \".$rateSaldoANT.\" \".($montoiva/$rateSaldoANT);\n echo \"<br> MONTO; TOTAL MONTO SIN IVA : \".$montosiniva.\" \".$rate.\" \".($montosiniva/$rate);\n echo \"<br> MONTO; TOTAL MONTO SIN IVA tipoCambioFacBIEN : \".$montosiniva.\" \".$tipoCambioFacBIEN.\" \".($montosiniva/$tipoCambioFacBIEN);*/\n //$montoiva = $ivaNotaCredito/$rate;\n //$rmonto = $montoNotaCredito/$rate;\n \n // Obtiene la cuentas contables que se afectaran\n // *****************************************\n // Se afecta la cuenta de CxC\n // *****************************************\n // $cuenta_cxc=$_SESSION['CompanyRecord']['debtorsact'];\n $SQLClient = \"SELECT typeid FROM debtorsmaster WHERE debtorno='\" . $DebtorNo . \"'\";\n $result_typeclient = DB_query($SQLClient, $db, $ErrMsg, $DbgMsg, true);\n \n if (DB_num_rows($result_typeclient) == 1) {\n $myrowtype = DB_fetch_array($result_typeclient);\n $tipocliente = $myrowtype ['typeid'];\n }\n \n if ($typeFactura == 110 ) {\n \n $cuenta_cxc = ClientAccount($tipocliente, 'gl_accountcontado', $db);\n }else{\n $cuenta_cxc = ClientAccount($tipocliente, 'gl_accountsreceivable', $db);\n }\n\n \n\n $diferenciCambiariaTotal = 0;\n $diferenciCambiariaIVA = 0;\n if($monedaSaldoANT== $moneda aND $moneda!=$_SESSION ['CountryOfOperation'] ){\n\n $diferenciCambiaria=Round( abs((str_replace(\",\", \"\", $montosiniva)/$tipoCambioFacBIEN)) - (str_replace(\",\", \"\", $montosiniva)/$rate),8) ;\n\n $diferenciCambiariaIVA =Round( abs($montosiniva) /$rateSaldoANT - (str_replace(\",\", \"\", $montosiniva)/$rate),8) ;\n }elseif($monedaSaldoANT!=$_SESSION ['CountryOfOperation'] AND $moneda!=$_SESSION ['CountryOfOperation']){\n\n $diferenciCambiaria=Round(abs((str_replace(\",\", \"\", $montosiniva)/$tipoCambioFacBIEN)) - (str_replace(\",\", \"\", $montosiniva)/$rate),8) ;\n $diferenciCambiariaIVA =Round( abs($montoiva) /$rateSaldoANT - (str_replace(\",\", \"\", $montoiva)/$rate),8) ;\n }elseif($monedaSaldoANT!=$_SESSION ['CountryOfOperation'] AND $moneda==$_SESSION ['CountryOfOperation']){\n\n $diferenciCambiaria=Round(abs((str_replace(\",\", \"\", $montosiniva)/$tipoCambioFacBIEN)) - (str_replace(\",\", \"\", $montosiniva)/$rate),8) ;\n $diferenciCambiariaIVA =Round( abs($montoiva) /$rateSaldoANT - (str_replace(\",\", \"\", $montoiva)/$rate),8) ;\n }\n \n \n if ($montoiva != 0) {\n\n $SQL = \"INSERT INTO gltrans (\n type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES (\n '\" . $systype_doc . \"',\n '\" . $transno . \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $taxglcode . \"',\n '\" . $DebtorNo . \" No. de Nota de Credito: \" . $transno . \" @\" . $nombrecliente . \" ',\n '\" . ($rmontoiva) . \"',\n '\" . $tagref . \"'\n )\";\n \n $result = DB_query($SQL, $db);\n\n if( abs($ivaSaldoANT) ==0 ){\n $SQL = \"INSERT INTO gltrans (\n type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES (\n '\" . $systype_doc . \"',\n '\" . $transno . \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $taxglcodepaid . \"',\n '\" . $DebtorNo . \" No. de Nota de Credito: \" . $transno .' @TC:' . (1 / $rateSaldoANT). \" @\" . $nombrecliente . \" ',\n '\" . ($rmontoivaP *-1) . \"',\n '\" . $tagref . \"'\n )\";\n if ($_SESSION ['UserID'] == \"admin\") {\n // echo '<pre>'.$SQL;\n }\n $result = DB_query($SQL, $db);\n\n }else{\n //$diferenciCambiaria = $diferenciCambiaria + $diferenciCambiariaIVA;\n }\n\n\n \n }\n \n // Obtiene la cuentas contables que se afectar�n\n // $cuenta_notacredito=$_SESSION['CompanyRecord']['creditnote'];\n\n $cuenta_notacredito= ClientAccount($tipocliente, 'gl_debtoradvances', $db);\n\n // *****************************************\n // Se afecta la cuenta de CxC\n // *****************************************\n \n $SQL = \"INSERT INTO gltrans (\n type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES (\n '\" . $systype_doc . \"',\n '\" . $transno . \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $cuenta_cxc . \"',\n '\" . $DebtorNo . \" No. de Nota de Credito: \" . $transno .' @TC:' . (1 / $tipoCambioFacBIEN). \" @\" . $nombrecliente . \" ',\n '\" . ($rmonto * - 1) . \"',\n '\" . $tagref . \"'\n )\";\n // echo $SQL;\n if ($_SESSION ['UserID'] == \"admin\") {\n // echo '<pre>'.$SQL;\n }\n $result = DB_query($SQL, $db);\n\n\n\n if(abs($diferenciCambiaria)>0){\n if (($diferenciCambiaria) >= 0) {\n $ctautilidadperdida = $_SESSION ['CompanyRecord'] ['exchangediffact'];\n } else {\n $ctautilidadperdida = $_SESSION ['CompanyRecord'] ['gllink_exchangediffactutil'];\n }\n \n // $PeriodNo = GetPeriod($_SESSION['AllocCustomer']->TransDate, $db, $_SESSION['AllocCustomer']->tagref);\n \n $reference = $DebtorNo . \"@UTIL/PERD CAMBIARIA@\" . $diferenciCambiaria . ' @TC:' . (1 / $rateSaldoANT).' cliente:'.($nombrecliente);\n // extrae porcentaje de iva\n \n //echo \"<br> diferencia cambiaria \".$diferenciCambiaria;\n \n $SQL = \"INSERT INTO gltrans (type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES ('\" . $systype_doc . \"',\n '\" . $transno. \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $ctautilidadperdida . \"',\n '\" . $reference . \"',\n '\" . ($diferenciCambiaria)*(-1) . \"',\n '\" . $tagref . \"')\";\n //echo \"<br>gltrans 510: \".$SQL;\n $ErrMsg = _ ( 'CRITICAL ERROR' ) . '! ' . _ ( 'NOTE DOWN THIS ERROR AND SEEK ASSISTANCE' ) . ': ' . _ ( 'The GL entry for the difference on exchange arising out of this allocation could not be inserted because' );\n $DbgMsg = _ ( 'The following SQL to insert the GLTrans record was used' );\n $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True);\n\n }\n \n \n // *****************************************\n // Se afecta la cuenta de Notas de Credito\n // *****************************************\n \n $DebtorTransIDGL = DB_Last_Insert_ID($db, 'gltrans', 'counterindex');\n \n $SQL = \"INSERT INTO debtortransmovs (`tagref`,`transno`,`type`,`debtorno`,`branchcode`,`origtrandate`,`trandate`,`prd`,`settled`,`reference`,`tpe`,`order_`,`rate`,`ovamount`,`ovgst`,`ovfreight`,`ovdiscount`,`diffonexch`,`alloc`,`invtext`,`shipvia`,`edisent`,`consignment`,`folio`,`ref1`,`ref2`,`currcode`,`idgltrans`,`userid`)\";\n $SQL .= \" VALUES (\" . $tagref . \", \" . $transno . \",\" . $systype_doc . \", '\" . $DebtorNo . \"', '\" . $DebtorNo . \"', now(), '\" . $fechaini . \"',\" . $PeriodNo . \",'0','\" . $concepto . \"', '','0','\" . $rate . \"',\" . ($montosiniva * - 1) . \",\" . ($montoiva * - 1) . \",'0','0','0','0','','1','0','', 'NCR','NCR','NCR','\" . $moneda . \"',\" . $DebtorTransIDGL . \",'\" . $_SESSION ['UserID'] . \"')\";\n $result = DB_query($SQL, $db);\n \n // afecta cuentas de notas de credito\n $SQL = \"INSERT INTO gltrans (\n type,\n typeno,\n trandate,\n periodno,\n account,\n narrative,\n amount,\n tag\n )\n VALUES (\n '\" . $systype_doc . \"',\n '\" . $transno . \"',\n '\" . $DefaultDispatchDate . \"',\n '\" . $PeriodNo . \"',\n '\" . $cuenta_notacredito . \"',\n '\" . $DebtorNo . \" No. de Nota de Credito: \" . $transno . \" @\" . $nombrecliente . \" ',\n '\" . $rmontosinivaANT . \"',\n '\" . $tagref . \"'\n )\";\n if ($_SESSION ['UserID'] == \"admin\") {\n // echo '<pre>'.$SQL;\n }\n $msgexito = '<b>LA NOTA DE CREDITO SE HA GENERADO EXITOSAMENTE...';\n $result = DB_query($SQL, $db, $msgexito);\n \n if ($puntoVenta != 1) {\n prnMsg(_($msgexito), 'success');\n }\n $_SESSION['IvaManualAbonoDirectoClientes'] = 0;\n \n // imprimir datos de la nota de credito\n if (! isset($legaid) or $legaid == '' or ! isset($area) or $area == '') {\n $sql = \"Select legalid,areacode from tags where tagref=\" . $tagref;\n $result = DB_query($sql, $db);\n while ($myrow = DB_fetch_array($result, $db)) {\n $legaid = $myrow ['legalid'];\n $area = $myrow ['areacode'];\n }\n }\n \n // Consulta el rfc y clave de facturacion electronica\n $SQL = \" SELECT l.taxid,l.address5,t.tagname,t.typeinvoice, l.legalname\n FROM legalbusinessunit l, tags t\n WHERE l.legalid=t.legalid AND tagref='\" . $tagref . \"'\";\n \n if ($_SESSION['UserID'] == 'desarrollo')\n echo \"<pre> SQL -> $SQL </pre>\";\n\n $Result = DB_query($SQL, $db);\n if (DB_num_rows($Result) == 1) {\n $myrowtags = DB_fetch_array($Result);\n $rfc = trim($myrowtags ['taxid']);\n $keyfact = trim($myrowtags ['address5']);\n $nombre = trim($myrowtags ['tagname']);\n $tipofacturacionxtag = $myrowtags ['typeinvoice'];\n $legalname = $myrowtags ['legalname'];\n // $nombre=\"SERVILLANTAS DE QUERETARO S.A. DE C.V.\";\n }\n\n if ($_SESSION['UserID'] == 'desarrollo')\n echo \"<pre> tipofacturacionxtag -> $tipofacturacionxtag </pre>\";\n\n if ($tipofacturacionxtag == 0) {\n $InvoiceNoTAG = DocumentNext($systype_doc, $tagref, $area, $legaid, $db);\n } else {\n $InvoiceNoTAG = DocumentNext(11, $tagref, $area, $legaid, $db);\n }\n\n if ($_SESSION['UserID'] == 'desarrollo')\n echo \"<pre> InvoiceNoTAG ->\". print_r($InvoiceNoTAG) .\"</pre>\";\n \n \n $separa = explode('|', $InvoiceNoTAG);\n $serie = $separa [1];\n $folio = $separa [0];\n // echo 'folio:'.$InvoiceNoTAG;\n \n $OrderNo = 0;\n $factelectronica = XSAInvoicingCreditdirect($transno, $OrderNo, $DebtorNo, $systype_doc, $tagref, $serie, $folio, $db);\n // Envia los datos al archivooooo\n $factelectronica = utf8_encode($factelectronica);\n \n if ($_SESSION['UserID'] == 'desarrollo') {\n echo '<pre> cadena de XSAInvoicingCreditdirect:'.$factelectronica;\n //echo htmlentities($arrayGeneracion['xml']);\n }\n \n $empresa = $keyfact . '-' . $rfc;\n $nombre = $nombre;\n $tipo = 'Notas de Credito';\n // if ($ambiente == \"desarrollo\") {\n // $tipo = 'NOTA DE CREDITO';\n // }\n \n // $tipo='NOTA DE CREDITO';\n $myfile = '';\n $factelectronica = $factelectronica;\n // echo '<pre><br>'.$factelectronica;\n $param = array (\n 'in0' => $empresa,\n 'in1' => $nombre,\n 'in2' => $tipo,\n 'in3' => $myfile,\n 'in4' => $factelectronica\n );\n \n // Seccion para validar si selecciono la opcion de timbrar o no\n if ($typeFactura == 119 ) {\n $flagsendfiscal = 0;\n }else{\n $flagsendfiscal = 1;\n }\n \n $ligaN = '';\n\n // Si se va a timbrar el documento entra a esta condicion\n //echo \"<br>tipofacturacionxtag:\". $tipofacturacionxtag;\n if ($flagsendfiscal == 1) {\n if ($tipofacturacionxtag == 1) {\n //echo \"entra1\";\n try {\n $client = new SoapClient($_SESSION ['XSA'] . \"xsamanager/services/FileReceiverService?wsdl\");\n $codigo = $client->guardarDocumento($param);\n } catch (SoapFault $exception) {\n $errorMessage = $exception->getMessage();\n }\n $liga = $_SESSION ['XSA'] . \"xsamanager/downloadCfdWebView?serie=\" . $serie . \"&folio=\" . $folio . \"&tipo=PDF&rfc=\" . $rfc . \"&key=\" . $keyfact;\n $liga = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $liga . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n } elseif ($tipofacturacionxtag == 2) {\n echo \"entra2\";\n $arrayGeneracion = generaXML($factelectronica, 'egreso', $tagref, $serie, $folio, $DebtorTransIDND, 'NCreditoDirect', $OrderNo, $db);\n $XMLElectronico = $arrayGeneracion [\"xml\"];\n // Se agrega la generacion de xml_intermedio\n\n $array = generaXMLIntermedio($factelectronica, $XMLElectronico, ($arrayGeneracion [\"cadenaOriginal\"]), utf8_encode($arrayGeneracion [\"cantidadLetra\"]), $DebtorTransIDND, $db, 13, $tagref, $systype_doc, $transno);\n $xmlImpresion = ( $array [\"xmlImpresion\"] );\n $rfcEmisor = $array [\"rfcEmisor\"];\n $fechaEmision = $array [\"fechaEmision\"];\n\n $XMLElectronico = caracteresEspecialesFactura($XMLElectronico);\n $xmlImpresion = caracteresEspecialesFactura($xmlImpresion);\n $xmlImpresion =str_replace(\"&\", \"&amp;\", $xmlImpresion);\n \n // Almacenar XML\n $XMLElectronico = str_replace(\"<?xml version='1.0' encoding='UTF-8'?>\", '<?xml version=\"1.0\" encoding=\"UTF-8\"?>', $XMLElectronico);\n $query = \"INSERT INTO Xmls(transNo,type,rfcEmisor,fechaEmision,xmlSat,xmlImpresion,fiscal)\n VALUES(\" . $transno . \",\" . $systype_doc . \",'\" . $rfcEmisor . \"','\" . $fechaemision . \"','\" . utf8_decode(addslashes($XMLElectronico)) . \"','\" . utf8_decode(addslashes($xmlImpresion)) . \"',\" . $flagsendfiscal . \");\";\n $Result = DB_query($query, $db, $ErrMsg, $DbgMsg, true);\n \n if ($_SESSION ['Template_V6'] != '1') {\n $ligaN = \"PDFCreditDirect.php\";\n } else {\n $ligaN = \"PDFInvoice.php\";\n }\n // $liga = \"PDFCreditDirect.php\";\n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '?tipo=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Type=13&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n } elseif ($tipofacturacionxtag == 3) {\n // $XMLElectronico=generaXML($factelectronica,'egreso',$tagref,$serie,$folio,$DebtorTransIDND,'NCreditoDirect',$OrderNo,$db);\n \n $ligaN = \"PDFNoteCreditDirectTemplate.php\";\n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '&tipo=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n } elseif ($tipofacturacionxtag == 4) {\n $success = false;\n $config = $_SESSION;\n //echo \"<br>---\".$_SESSION['FacturaVersion'];\n if ($_SESSION['FacturaVersion'] == \"3.3\") {\n //echo \"<br>generaXMLCFDI3_3:\";\n $arrayGeneracion = generaXMLCFDI3_3($factelectronica, 'egreso', $tagref, $serie, $folio, $DebtorTransIDND, 'NCreditoDirect', $OrderNo, $db);\n } else {\n $arrayGeneracion = generaXMLCFDI($factelectronica, 'egreso', $tagref, $serie, $folio, $DebtorTransIDND, 'NCreditoDirect', $OrderNo, $db);\n }\n \n $XMLElectronico = $arrayGeneracion [\"xml\"];\n $XMLElectronico = str_replace('<?xml version=\"1.0\" encoding=\"UTF-8\"?>', '', $XMLElectronico);\n\n if ($_SESSION['UserID'] == 'aenriquez' or $_SESSION['UserID'] == 'desarrollo') {\n //echo '<pre>'.$factelectronica;\n //echo '<br>XMLElectronico: <br><pre>'.htmlentities($XMLElectronico);\n }\n \n //require_once '../../.././' .'timbradores/TimbradorFactory.php';\n //include_once 'timbradores/TimbradorFactory.php';\n $timbrador = TimbradorFactory::getTimbrador($config);\n if ($timbrador != null) {\n $timbrador->setRfcEmisor($rfc);\n $timbrador->setDb($db);\n $cfdi = $timbrador->timbrarDocumento($XMLElectronico);\n $success = ($timbrador->tieneErrores() == false);\n foreach ($timbrador->getErrores() as $error) {\n if ($puntoVenta != 1) {\n prnMsg($error, 'error');\n }\n }\n } else {\n if ($puntoVenta != 1) {\n prnMsg(_('No hay un timbrador configurado en el sistema'), 'error');\n }\n }\n \n if ($success) {\n if ($_SESSION['UserID'] == \"desarrollo\") {\n echo '<br>success';\n }\n // leemos la informacion del cfdi en un arreglo\n $DatosCFDI = TraeTimbreCFDI($cfdi);\n if (strlen($DatosCFDI ['FechaTimbrado']) > 0) {\n //$cadenatimbre = '||1.1|' . $DatosCFDI ['UUID'] . '|' . $DatosCFDI ['FechaTimbrado'] . '|' . $DatosCFDI ['selloCFD'] . '|' . $DatosCFDI ['noCertificadoSAT'] . '||';\n $cadenatimbre = '||1.1|' . $DatosCFDI ['UUID'] . '|' . $DatosCFDI ['FechaTimbrado'] .'|' . $DatosCFDI ['RfcProvCertif']. '||' . $DatosCFDI ['SelloCFD'] . '|' . $DatosCFDI ['NoCertificadoSAT'] . '||';\n \n // guardamos el timbre fiscal en la base de datos para efectos de impresion de datos\n $sql = \"UPDATE debtortrans\n SET fechatimbrado='\" . $DatosCFDI ['FechaTimbrado'] . \"',\n uuid='\" . $DatosCFDI ['UUID'] . \"',\n timbre='\" . $DatosCFDI ['SelloSAT'] . \"',\n cadenatimbre='\" . $cadenatimbre . \"'\n where id=\" . $DebtorTransIDND;\n \n $ErrMsg = _('El Sql que fallo fue');\n $DbgMsg = _('No se pudo actualizar el sello y cadena del documento');\n $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, true);\n $XMLElectronico = $cfdi;\n // Guardamos el XML una vez que se agrego el timbre fiscal\n \n $legalname= caracteresEspecialesFactura($legalname);\n \n $carpeta = 'NCreditoDirect';\n\n $dir = \"/var/www/html\" . dirname($_SERVER ['PHP_SELF']) . \"/companies/\" . $_SESSION ['DatabaseName'] . \"/SAT/\" . utf8_decode(addslashes((str_replace('.', '', str_replace(' ', '', $legalname))))) . \"/XML/\" . $carpeta . \"/\";\n\n //$dir=\"/var/www/html/erpdistribucion/companies/\".$_SESSION ['DatabaseName'].\"/SAT/\".utf8_decode(addslashes((str_replace ( '.', '', str_replace ( ' ', '', $legalname ) )))).\"/XML/NCreditoDirect/\";\n \n if ($puntoVenta == 1) {\n // Si es punto de venta quitar carpetas\n $dir = str_replace('mvc/api/v1/', '', $dir);\n }\n\n \n $nufa = $serie . $folio;\n $mitxt = $dir . $nufa . \".xml\";\n if ($puntoVenta != 1) {\n unlink($mitxt);\n }\n \n //echo \"<br>\".$mitxt;\n // Se modifico la fucion\n $fp = fopen($mitxt, \"w\");\n fwrite($fp, $XMLElectronico);\n fclose($fp);\n\n \n $fp = fopen($mitxt . '.COPIA', \"w\");\n fwrite($fp, $XMLElectronico);\n fclose($fp);\n //Se agrega la generacion de xml_intermedio\n \n $XMLElectronico_Impresion=\"\";\n if ($_SESSION['FacturaVersion'] == \"3.3\") {\n $XMLElectronico_Impresion = generaXMLCFDI_Impresion($factelectronica, $XMLElectronico, $tagref, $db);\n }\n \n\n if (!empty($XMLElectronico_Impresion)) {\n $array = generaXMLIntermedio($factelectronica, $XMLElectronico_Impresion, $cadenatimbre, utf8_encode($arrayGeneracion [\"cantidadLetra\"]), $OrderNo, $db, 13, $tagref, $systype_doc, $transno);\n } else {\n $array = generaXMLIntermedio($factelectronica, $XMLElectronico, $cadenatimbre, utf8_encode($arrayGeneracion [\"cantidadLetra\"]), $DebtorTransIDND, $db, 13, $tagref, $systype_doc, $transno);\n }\n \n\n //$array = generaXMLIntermedio ( $factelectronica, $XMLElectronico, $cadenatimbre, utf8_encode ( $arrayGeneracion [\"cantidadLetra\"] ), $DebtorTransIDND, $db, 13, $tagref, $systype_doc, $transno );\n\n $xmlImpresion = ( $array [\"xmlImpresion\"] );\n $rfcEmisor = $array [\"rfcEmisor\"];\n $fechaEmision = $array [\"fechaEmision\"];\n $XMLElectronico = caracteresEspecialesFactura($XMLElectronico);\n $xmlImpresion = caracteresEspecialesFactura($xmlImpresion);\n $xmlImpresion =str_replace(\"&\", \"&amp;\", $xmlImpresion);\n\n if ($_SESSION['UserID']=='desarrollo') {\n echo '<br>XMLElectronico: <br><pre>'.htmlentities($XMLElectronico);\n echo '<br>xmlImpresion: <br><pre>'.htmlentities($xmlImpresion);\n }\n\n // Almacenar XML//\n $XMLElectronico = str_replace(\"<?xml version='1.0' encoding='UTF-8'?>\", '<?xml version=\"1.0\" encoding=\"UTF-8\"?>', $XMLElectronico);\n $query = \"INSERT INTO Xmls(transNo,type,rfcEmisor,fechaEmision,xmlSat,xmlImpresion,fiscal)\n VALUES(\" . $transno . \",\" . $systype_doc . \",'\" . $rfcEmisor . \"','\" . $fechaemision . \"','\" . utf8_decode(addslashes($XMLElectronico)) . \"','\" . utf8_decode(addslashes($xmlImpresion)) . \"',\" . $flagsendfiscal . \");\";\n $Result = DB_query($query, $db, $ErrMsg, $DbgMsg, true);\n \n if ($_SESSION ['Template_V6'] != '1') {\n $ligaN = \"PDFCreditDirect.php\";\n } else {\n $ligaN = \"PDFInvoice.php\";\n }\n \n if ($puntoVenta != 1) {\n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '?Type=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n }\n } else {\n prnMsg(_('No fue posible realizar el timbrado del documento, verifique con el administrador; el numero de error es:') . $cfdi, 'error');\n // exit;\n }\n }\n } else {\n $ligaN = GetUrlToPrintNu($tagref, $area, $legaid, $systype_doc, $db);\n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '&tipo=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n }\n } else {\n //echo \"<br> flagsendfiscal\";\n // Documento No Fiscal\n $arrayGeneracion = generaXMLCFDI($factelectronica, 'egreso', $tagref, $serie, $folio, $DebtorTransIDND, 'NCreditoDirect', $OrderNo, $db);\n $XMLElectronico = $arrayGeneracion [\"xml\"];\n \n // Se agrega la generacion de xml_intermedio\n $array = generaXMLIntermedio($factelectronica, $XMLElectronico, $arrayGeneracion [\"cadenaOriginal\"], utf8_encode($arrayGeneracion [\"cantidadLetra\"]), $DebtorTransIDND, $db, 13, $tagref, $systype_doc, $transno);\n $xmlImpresion = utf8_decode($array [\"xmlImpresion\"]);\n $rfcEmisor = $array [\"rfcEmisor\"];\n $fechaEmision = $array [\"fechaEmision\"];\n $XMLElectronico = caracteresEspecialesFactura($XMLElectronico);\n $xmlImpresion = caracteresEspecialesFactura($xmlImpresion);\n $xmlImpresion =str_replace(\"&\", \"&amp;\", $xmlImpresion);\n\n \n // Insertar el registro en la tabla de XMLS\n $query = \"INSERT INTO Xmls(transNo,type,rfcEmisor,fechaEmision,xmlSat,xmlImpresion,fiscal)\n VALUES(\" . $transno . \",\" . $systype_doc . \",'\" . $rfcEmisor . \"','\" . $fechaemision . \"','\" . utf8_decode(addslashes($XMLElectronico)) . \"','\" . utf8_decode(addslashes($xmlImpresion)) . \"',\" . $flagsendfiscal . \");\";\n \n $Result = DB_query($query, $db, $ErrMsg, $DbgMsg, true);\n \n if ($_SESSION ['Template_V6'] != '1') {\n $ligaN = \"PDFCreditDirect.php\";\n } else {\n $ligaN = \"PDFInvoice.php\";\n }\n \n $ligaN = '<p><img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _('Imprimir') . '\" alt=\"\">' . ' ' . '<a target=\"_blank\" href=\"' . $rootpath . '/' . $ligaN . SID . '?Type=' . $systype_doc . '&area=' . $area . '&legal=' . $legaid . '&TransNo=' . $transno . '&Tagref=' . $tagref . '\">' . _('Imprimir Nota de Credito') . ' (' . _('Laser') . ')' . '</a>';\n \n /*$PrintDispatchNote = $rootpath . '/' . $liga . '?OrderNo=' . $OrderNo . '&TransNo=' . $BatchNo . '&Type=' . $tipodefacturacion;\n \n echo '<p class=\"page_title_text\">';\n echo '<img src=\"' . $rootpath . '/css/' . $theme . '/images/printer.png\" title=\"' . _ ( 'Imprimir Recibo ' ) . '\" alt=\"\">' . ' ';\n echo '<a href=\"' . $PrintDispatchNote . '\" target=\"_blank\">';\n echo _ ( 'Imprimir Recibo PDF ' ) . '</a></p>';*/\n } // Fin de condicion para timbrar el documento o no\n \n // Actualizar el documento para folio\n $SQL = \"UPDATE debtortrans\n SET folio='\" . $serie . '|' . $folio . \"',\n flagfiscal= '\" . $flagsendfiscal . \"' \n WHERE transno=\" . $transno . \" and type=\" . $systype_doc;\n \n $ErrMsg = _('ERROR CRITICO') . '! ' . _('ANOTE EL ERROR') . ': ' . _('La Actualizacion para saldar la factura, no se pudo realizar');\n $DbgMsg = _('El SQL utilizado para el registro de la fatura es:');\n $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true);\n $Result = DB_Txn_Commit($db);\n\n if ($puntoVenta != 1) {\n echo '<p><div align=\"center\">';\n echo $ligaN;\n echo '</div>';\n }\n\n if (function_exists(\"updateGlTransAccountingInfo\")) {\n $valued = updateGlTransAccountingInfo($systype_doc, $transno, $db);\n }\n \n if ($puntoVenta != 1) {\n echo '<p><div align=\"center\">';\n echo '<a href=\"ReportCustomerInqueryV3.php?CustomerID=' . $DebtorNo . '\">';\n echo '<font size=2 face=\"arial\"><b>';\n echo _('IR AL ESTADO DE CUENTA DEL CLIENTE');\n echo '</b></font>';\n echo '</a>';\n echo '</div>';\n }\n }\n \n // ***************************************************************************************************\n // ***************************************************************************************************\n // ***************************************************************************************************\n}", "function ProjetosRealizadosCliente($empresa = null) {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos WHERE id_projetos_empresas_id = {$empresa}\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd2 = 1;\n }else{\n $qtd2 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd2);\n\n if($porcentagem==100) {\n $count++;\n }\n }\n\n return $count;\n}", "function actualizarDinero($operacion, $cantidadDeposito, $cantidadRetirada){\n include (__ROOT__.'/backend/comprobaciones.php');\n global $db;\n $id = $_SESSION['loggedIn'];\n\n if($operacion === \"depositarDinero\"){\n //compruebo que las cantidades son un entero positivo\n if($cantidadDeposito >= 0){\n //comprobar que la cantidad que quiero retirar no supera la cantidad que tengo ingresada enBanco\n $miDinero = comprobarDinero();\n if($miDinero[0]['cash'] >= $cantidadDeposito){\n $sql = \"UPDATE personajes SET enBanco=enBanco + $cantidadDeposito, cash=cash-$cantidadDeposito WHERE id='$id'\";\n $stmt = $db->query($sql);\n header(\"location: ?page=zona&message=Exito\");\n }\n else{\n header(\"location: ?page=zona&message=Fallo\");\n }\n }\n else{\n header(\"location: ?page=zona&message=Fallo\");\n }\n }\n elseif ($operacion === \"retirarDinero\") {\n //compruebo que las cantidades son un entero positivo\n if($cantidadRetirada >= 0){\n //comprobar que la cantidad que quiero retirar no supera la cantidad que tengo ingresada enBanco\n $miDinero = comprobarDinero();\n if($miDinero[0]['enBanco'] >= $cantidadRetirada){\n $sql = \"UPDATE personajes SET cash=cash+$cantidadRetirada*0.95, enBanco=enBanco-$cantidadRetirada WHERE id='$id'\";\n $stmt = $db->query($sql);\n header(\"location: ?page=zona&message=Exito\");\n }\n else{\n header(\"location: ?page=zona&message=Fallo\");\n }\n }\n else{\n header(\"location: ?page=zona&message=Fallo\");\n }\n }\n \n}", "function updateLevanteCabeza($arregloDatos) {\n if($arregloDatos[parcial]) {\n $arregloDatos[num_grupo] = $this->datos->ultimoGrupoCreado($arregloDatos) + 1;\n $this->datos->updateConteoParciales($arregloDatos);\n } else { // si no marco como parcial se hace de nuevo el conteo y se actualiza\n $gruposcreados = $this->datos->ultimoGrupoCreado($arregloDatos);\n $grupossolicitados = $this->datos->ultimoGrupo($arregloDatos);\n if(grupossolicitados > $gruposcreados) { // se decidio no crear el parcial\n $arregloDatos[num_grupo] = $gruposcreados; // se actualiza el numero real de grupos\n $this->datos->updateConteoParciales($arregloDatos);\n }\n }\n $arregloDatos[mostrar] = 1;\n $this->datos->setCabezaLevante($arregloDatos);\n $arregloDatos[plantilla] = 'levanteCabeza.html';\n $arregloDatos[thisFunction] = 'getCabezaLevante';\n $this->pantalla->setFuncion($arregloDatos,$this->datos);\n }", "function modificarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_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_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\t\t$this->setParametro('desc_cuenta','desc_cuenta','varchar');\n\t\t$this->setParametro('moneda','moneda','int4');\n\t\t$this->setParametro('cuenta','cuenta','varchar');\n\t\t$this->setParametro('tipo_cuenta','tipo_cuenta','bpchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado_cuenta','estado_cuenta','bpchar');\n\t\t$this->setParametro('banco','banco','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function imprimirRegistrosDeDistribuidores() {\n $distribuidores = $this->db\n ->select('di_id,di_usuario,di_direita,di_esquerda')\n ->where('cb_data_hora >=', '2014-02-22')\n ->join('conta_bonus', 'cb_distribuidor=di_id')\n ->group_by('di_id')\n ->get('distribuidores')->result();\n\n $dataInicio = '2014-02-26';\n $dataFinal = '2014-04-08';\n\n $dias = $this->getArrayDias($dataInicio, $dataFinal);\n\n echo \"<table width='800px' cellpadding='5' border='1' cellspacing='0'>\";\n\n foreach ($distribuidores as $distribuidor) {\n echo \"<tr>\";\n echo \"<td colspan='4' style='color:blue'><br><br><b>\" . $distribuidor->di_usuario . \"</b></td>\";\n echo \"</tr>\";\n foreach ($dias as $dia) {\n $plPaga = $this->plFoiPaga($dia, $distribuidor->di_id);\n\n if ($plPaga) {\n foreach($plPaga as $k=> $plP){\n echo \"<tr>\";\n echo \"<td>\" . $this->dataPersonalizada($dia) . \"</td>\";\n echo \"<td>\" . $plP->cb_id . \"</td>\";\n echo \"<td>\" . $plP->cb_descricao . \"</td>\";\n echo \"<td>\" . $plP->cb_credito . \"</td>\";\n echo \"<td>p-\" . count($k+1) . \"</td>\";\n echo \"</tr>\";\n }\n } else {\n //new bonus_pl_nova($distribuidor, $dia);\n echo \"<tr>\";\n echo \"<td>\" . $this->dataPersonalizada($dia) . \"</td>\";\n echo \"<td>--</td>\";\n echo \"<td>--</td>\";\n echo \"<td>-,--</td>\";\n echo \"<td>-</td>\";\n echo \"</tr>\";\n }\n }\n }\n\n echo \"</table>\";\n }", "function Recalcular_Saldo_Venta_AddCobro($idventa){\n\t$datosventa\t\t=\tregistro( runsql(\"select fecha, monto,saldo from ventas where id_venta='$idventa'\") ); \n\t$datoscobros\t=\trunsql(\"select id_cobro,fecha,monto,saldo,moneda from cobros where id_venta='$idventa' order by id_cobro desc LIMIT 1 OFFSET 0 ;\"); // AGARRA EL ULTIMO\n\t$tcUSD\t=\tTipoCambio('USD',$datosventa[fecha]);\n\t$tcEUR\t=\tTipoCambio('EUR',$datosventa[fecha]);\n\t$tcQUE\t=\t1;\n\t$Monto_Pagado\t=\t0;\n\t$SubMonto\t\t=\t0;\n\t$Saldo_Anterior\t=\t$datosventa[saldo];\n\twhile($i=registro($datoscobros)){\n\t\tswitch($i[moneda]){\n\t\t\tcase \"USD\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcUSD;\n\t\t\t\techo $Monto_Pagado;\n\t\t\tbreak;\n\t\t\tcase \"EUR\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcEUR;\n\t\t\t\techo $Monto_Pagado;\t\t\t\t\n\t\t\tbreak;\t\n\t\t\tcase \"QUE\":\n\t\t\t\t$Monto_Pagado\t=\t$i[monto]*$tcQUE;\n\t\t\t\techo $Monto_Pagado;\t\t\t\t\n\t\t\tbreak;\t\t\t\t\t\n\t\t}\n\t}\n\t$Saldo_Actual\t=\t$Saldo_Anterior\t - $Monto_Pagado;\n//\techo \"<br>**************\". $Saldo_Actual\t.\"=\".\t$Saldo_Anterior\t .\"-\". $Monto_Pagado.\" ****<br>\";exit();\n\t$campos=Array();\n $campos[saldo]\t=\t$Saldo_Actual;\n\t$ins=actualizar(\"ventas\",$campos,\"id_venta = '$idventa'\");\n\t//recalcular_saldo_venta($idventa);\n\t//echo \"<br>actualizar(ventas,\".$Saldo_Actual.\",id_venta = $idventa\"; \texit();\n\treturn $Saldo_Actual;\n}", "function Recalcular_Monto_Compra($idcompra){\n//echo \"idcompra=\".$idcompra;\n\t$datoscompra\t\t=\tregistro( runsql(\"select fecha from compras where id_compra='$idcompra'\") );\n\t$datoscompradet\t\t=\trunsql(\"select total,moneda from compras_det where id_compra='$idcompra';\");\n\t$tcUSD\t=\tTipoCambio('USD',$datoscompra[fecha]);\n\t$tcEUR\t=\tTipoCambio('EUR',$datoscompra[fecha]);\n\t$tcQUE\t=\t1;\n\t$Monto_Compra=0;$SubMonto=0;\n\twhile($i=registro($datoscompradet)){\n\t\tswitch($i[moneda]){\n\t\t\tcase \"USD\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcUSD;\n\t\t\tbreak;\n\t\t\tcase \"EUR\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcEUR;\n\t\t\tbreak;\t\n\t\t\tcase \"QUE\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcQUE;\n\t\t\tbreak;\t\t\t\t\t\n\t\t}\n\t\t$Monto_Compra\t=\t$Monto_Compra + $SubMonto;\n\t\t$SubMonto\t\t=\t0;\n\t}\n\t$campos3=Array();\n $campos3[monto]\t=\t$Monto_Compra;\n\t$ins=actualizar(\"compras\",$campos3,\"id_compra = '$idcompra'\");\n}", "function practicasRelacionadas($clavebeneficiario, $fecha_comprobante, $datosnomenclador) {\r\n $query = \"SELECT *\r\n FROM facturacion.cfg_practicas_relac\r\n WHERE modo=2 and \r\n trim(pracorigen)=trim('$datosnomenclador[3]')\";\r\n $res_origen = sql($query, \"Error 1\") or fin_pagina();\r\n if ($res_origen->RecordCount() > 0) {\r\n $res_origen->MoveFirst();\r\n while (!$res_origen->EOF) {\r\n $nomencladordetalles['tipo'] = $datosnomenclador[2];\r\n $nomencladordetalles['codigo'] = $res_origen->fields['pracrel'];\r\n\r\n $fechadelarelacionada = traemeLaPractica($clavebeneficiario, $nomencladordetalles, $fecha_comprobante);\r\n if ($fechadelarelacionada != null) {\r\n $limite_dias = $res_origen->fields['dias'];\r\n $diff = GetCountDaysBetweenTwoDates($fecha_comprobante, $fechadelarelacionada);\r\n if ($diff > $limite_dias) {\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . '] dentro del limite de tiempo';\r\n $ctrl['id_error'] = '76';\r\n }\r\n } else {\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . ']';\r\n $ctrl['id_error'] = '75';\r\n }\r\n $res_origen->MoveNext();\r\n }\r\n return $ctrl;\r\n }\r\n}", "public function unidadReceptoraReal($correspondencia_id) {\n \n // BUSCAR UNIDADES DE RECEPTORES ESTABLECIDOS\n $unidades_receptoras = array();\n $unidad_recibe_id = '';\n $receptores_establecidos = Doctrine::getTable('Correspondencia_Receptor')->findByCorrespondenciaIdAndEstablecido($correspondencia_id, 'S');\n foreach ($receptores_establecidos as $receptor_establecido) {\n $unidades_receptoras[] = $receptor_establecido->getUnidadId();\n if($receptor_establecido->getFuncionarioId() == $this->getUser()->getAttribute('funcionario_id')){\n // SI EL FUNCIONARIO LOGUEADO ES ESTABLECIDO COMO RECEPTOR SE SELECCIONA LA UNIDAD POR LA CUAL RECIBE\n $unidad_recibe_id = $receptor_establecido->getUnidadId();\n }\n }\n \n if($unidad_recibe_id==''){\n // EN CASO DE NO ENCONTRAR LA UNIDAD, BUSCAR SI LE FUE ASIGANADA LA CORRESPONDENCIA COMO UNA TAREA\n $receptor_asignado = Doctrine::getTable('Correspondencia_Receptor')->findOneByCorrespondenciaIdAndFuncionarioIdAndEstablecido($correspondencia_id, $this->getUser()->getAttribute('funcionario_id'), 'A');\n\n if($receptor_asignado){\n $unidad_recibe_id = $receptor_asignado->getUnidadId();\n }\n }\n \n if($unidad_recibe_id==''){\n // BUSCAR LAS UNIDADES A LA QUE PERTENECE EL FUNCIONARIO CON PERMISO DE LEER\n $unidades_receptoras = array_unique($unidades_receptoras);\n \n $funcionario_unidades_leer = Doctrine::getTable('Correspondencia_FuncionarioUnidad')->funcionarioAutorizado($this->getUser()->getAttribute('funcionario_id'),'leer');\n\n foreach($funcionario_unidades_leer as $unidad_leer) {\n if(array_search($unidad_leer->getAutorizadaUnidadId(), $unidades_receptoras)>=0){\n $unidad_recibe_id = $unidad_leer->getAutorizadaUnidadId();\n }\n }\n }\n \n return $unidad_recibe_id;\n }", "public function Registrar_Licencia_noRemunerada3(HojaVida $data) {\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n if($data->lic_id_tipo == 5) \n { // Licencia 3 meses\n $tiporegistro = \"Solicitud Licencia no Remunerada (3 Meses)\";\n }\n else\n {\n $tiporegistro = \"Solicitud Licencia no Remunerada hasta por 2 años\";\n }\n\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario']; // idusuario que registra la solicitud de licencia\n \n $per_DI_other = $_POST['cedula_other'];\n $per_name_other = $_POST['nombre_other'];\n if($per_DI_other != \"\" && $per_name_other != \"\")\n {\n $id_usuario_soli = $_POST['id_servidor']; // id del usuario que solicita la licencia\n $cedula_solicitante = $_POST['cedula_other'];\n $nombre_solicitante = $_POST['nombre_other'];\n $cargo_solicitante = $_POST['cargo_servidor'];\n }\n else\n {\n $id_usuario_soli = $_SESSION['idUsuario']; // id del usuario que solicita la licencia\n $cedula_solicitante = $_SESSION['nomusu'];\n $nombre_solicitante = $_SESSION['nombre'];\n $cargo_solicitante = $_SESSION['cargo'];\n }\n try {\n\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n \n $sql = \"INSERT INTO `th_licencias_no_remunerada`(\n `lic_no_rem_id_tipo_resolucion`, \n `lic_no_rem_fecha_solicitud`, \n `lic_no_rem_fecha_escrito`, \n `lic_no_rem_cedula_servidor`, \n `lic_no_rem_nombre_servidor`, \n `lic_no_rem_fecha_inicio`, \n `lic_no_rem_fecha_fin`, \n `lic_no_rem_motivo`, \n `lic_no_rem_id_user`, \n `lic_no_rem_estado`,\n `lic_no_rem_ruta_doc_escrito`, \n `lic_no_rem_id_user_registra`, \n `lic_no_rem_cargo_cs`) \n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->lic_id_tipo,\n $fechalog,\n $data->fecha_escrito,\n $cedula_solicitante,\n $nombre_solicitante,\n $data->fechaInicio,\n $data->fechaFin,\n $data->comentario,\n $id_usuario_soli,\n 0,\n $data->ruta_doc_adjunto, \n $idusuario, \n $cargo_solicitante\n )\n );\n $this->pdo->exec(\"INSERT INTO log (fecha, accion, detalle, idusuario, idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "function evt__form_integrante_i__modificacion($datos)\r\n {\r\n $perfil = toba::usuario()->get_perfil_datos();\r\n if ($perfil == null) {//es usuario de SCyT\r\n if($this->chequeo_formato_norma($datos['rescd_bm'])){ \r\n $datos2['rescd_bm']=$datos['rescd_bm'];\r\n $datos2['resaval']=$datos['resaval'];\r\n $datos2['cat_investigador']=$datos['cat_investigador'];\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos2);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar('Guardado. Solo modifica ResCD baja/modif, Res Aval, Cat Investigador', 'info');\r\n }\r\n }else{//es usuario de la UA\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n $int=$this->dep('datos')->tabla('integrante_interno_pi')->get(); \r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){//no puede ir fuera del periodo del proyecto\r\n //toba::notificacion()->agregar('Revise las fechas. Fuera del periodo del proyecto!', 'error'); \r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{ \r\n //Pendiente verificar que la modificacion no haga que se superpongan las fechas\r\n $haysuperposicion=false;//no es igual al del alta porque no tengo que considerar el registro vigente$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->superposicion_modif($pi['id_pinv'],$datos['id_docente'],$datos['desde'],$datos['hasta'],$registro['id_designacion'],$registro['desde']);\r\n if(!$haysuperposicion){\r\n $band=false;\r\n if($pi['estado']=='A'){\r\n $band=$this->dep('datos')->tabla('logs_integrante_interno_pi')->fue_chequeado($int['id_designacion'],$int['pinvest'],$int['desde']);\r\n } \r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if (isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD Baja/Modif invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if($band){//si alguna vez fue chequeado por SCyT entonces solo puede modificar fecha_hasta y nada mas (se supone que lo demas ya es correcto) \r\n //fecha_hasta porque puede ocurrir que haya una baja del participante o la modificacion de funcion o carga horaria\r\n unset($datos['funcion_p']);\r\n unset($datos['cat_investigador']);\r\n unset($datos['identificador_personal']);\r\n unset($datos['carga_horaria']);\r\n unset($datos['desde']);\r\n unset($datos['rescd']);\r\n unset($datos['cat_invest_conicet']);\r\n unset($datos['resaval']);\r\n unset($datos['hs_finan_otrafuente']);\r\n //Solo si cambia hasta y resol bm pierde el check\r\n if( $int['hasta']<>$datos['hasta'] or $int['rescd_bm']<>$datos['rescd_bm'] ){\r\n $datos['check_inv']=0;//pierde el check si es que lo tuviera. Solo cuando cambia algo\r\n }\r\n $mensaje='Ha sido chequeado por SCyT, solo puede modificar fecha hasta y resCD baja/modif';\r\n }else{//band false significa que puede modificar cualquier cosa\r\n //esto lo hago porque el set de toba no modifica la fecha desde por ser parte de la clave \r\n $this->dep('datos')->tabla('integrante_interno_pi')->modificar_fecha_desde($int['id_designacion'],$int['pinvest'],$int['desde'],$datos['desde']);\r\n $mensaje=\"Los datos se han guardado correctamente\";\r\n }\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar($mensaje, 'info'); \r\n }\r\n }\r\n }else{\r\n //toba::notificacion()->agregar('Hay superposicion de fechas', 'error'); \r\n throw new toba_error(\"Hay superposicion de fechas\");\r\n }\r\n }\r\n }\r\n //nuevo Lo coloco para que el formulario se oculte al finalizar\r\n $this->dep('datos')->tabla('integrante_interno_pi')->resetear();\r\n $this->s__mostrar_i=0;\r\n }", "public function actionRechazarmul($articulos, $pedidorid, $recibidor)\n {\n $rec = Usuarios::findOne(['id' => $recibidor]);\n $user = Usuarios::find()->where(['id' => $pedidorid])->one();\n $valetodos = true;\n $artic = json_decode($articulos);\n foreach ($artic as $art) {\n $uniform = Uniformes::findOne(['id' => $art[0]]);\n $uniform->cantidad = $uniform->cantidad + $art[1];\n $secs = Secstocks::findOne(['uniforme_id' => $uniform->id]);\n if ($secs !== null && $uniform->cantidad > $secs->mp) {\n $uniform->underss = true;\n $uniform->save();\n }\n if (!$uniform->save()) {\n $valetodos = false;\n }\n }\n\n if ($valetodos) {\n $user->emailRechazarmul($rec->colegio_id);\n Yii::$app->session->setFlash('info', 'Se le ha enviado un correo al usuario informandole que el pedido ha sido rechazado');\n $this->goHome();\n }\n }", "public function concluiTarefa(int $idUsuario, int $idTarefa, string $confirma){\n $usuario = $this->getEm()->getRepository('MyClasses\\Entities\\AclUsuario')\n ->findOneBy(array(\"id\"=>$idUsuario));\n $tarefa = $this->getEm()->getRepository('MyClasses\\Entities\\Tarefa')\n ->findOneBy(array(\"id\"=>$idTarefa));\n $equipeAdm = $this->getEm()->getRepository('MyClasses\\Entities\\AclPerfil')\n ->findOneBy(array(\"id\" => 1));\n if ($usuario->getEquipes()->contains($equipeAdm) || ($tarefa->getUsuario() == $usuario && $tarefa->getProjeto()->getUsuario() == $usuario) ){\n if ($confirma == \"sim\"){\n $tarefa->setStatus(\"concluida\");\n $this->gravaComentario($idUsuario, $idTarefa, \"TAREFA CONCLUIDA!!!\");\n $resposta = \"concluida\";\n }elseif ($usuario->getEquipes()->contains($equipeAdm)){\n $tarefa->setStatus(\"rejeitada\");\n $this->gravaComentario($idUsuario, $idTarefa, \"REJEITADA CONCLUSAO!!!\");\n $resposta = \"rejeitada\";\n }\n }else{\n $tarefa->setStatus(\"concluir\");\n $this->gravaComentario($idUsuario, $idTarefa, \"SOLICITA CONCLUSAO\");\n $resposta = \"concluir\";\n }\n $tarefa->setModificado();\n $this->getEm()->persist($tarefa);\n $this->getEm()->flush();\n if ($tarefa->getId())\n return $resposta;\n else\n return null;\n }", "function comprobar($nombretabla, $BDImportRecambios, $BDRecambios,$id,$l,$f) {\n // Inicializamos variables\n $consfinal = 0;\n $existente = 0;\n $nuevo = 0;\n $consul = \"SELECT * FROM referenciascruzadas where RefFabricanteCru ='\" . $id . \"'\";\n $consultaReca = mysqli_query($BDRecambios, $consul);\n if ($consultaReca == true) {\n // Controlamos que la consulta sea correcta, ya que sino lo es genera un error la funcion fetch\n $consfinal = $consultaReca->fetch_assoc();\n }\n if ($consfinal['RefFabricanteCru'] == $id && $consfinal['IdFabricanteCru'] == $f) {\n $actu = \"UPDATE `listaprecios` SET `Estado`='existe',`RecambioID`=\" . $consfinal['RecambioID'] . \" WHERE `linea` ='\" . $l . \"'\";\n mysqli_query($BDImportRecambios, $actu);\n $existente = 1;\n } else {\n $actu = \"UPDATE `listaprecios` SET `Estado`='nuevo' WHERE `linea` ='\" . $l . \"'\";\n mysqli_query($BDImportRecambios, $actu);\n $nuevo = 1;\n }\n\n\n $datos[0]['n'] = $nuevo;\n $datos[0]['e'] = $existente;\n $datos[0]['t'] = $l;\n return $datos;\n}", "public function reducir($insumo){\n\n\t\t$insumoRegister = Lote::where('insumo', $insumo['id'])\n\t\t\t\t\t\t ->where('codigo', $insumo['lote'])\n\t\t\t\t\t\t ->where('deposito', Auth::user()->deposito)\n\t\t\t\t\t\t ->orderBy('id', 'desc')\n\t\t\t\t\t\t ->first();\n\n\t\t$insumoRegister->cantidad = $insumoRegister->cantidad - $insumo['despachado'];\n\n\t\t$insumoRegister->save();\n\t}", "public function Actualiza_saldo($codigo_tar,$montoTotalCompra,$saldoTarjeta){\n require_once('../conexion_bd/conexion.php');\n $this->usuario='[email protected]';\n $conectado = new conexion();\n $con_res = $conectado->conectar();\n if (strcmp($con_res, \"ok\") == 0) {\n echo 'Conexion exitosa todo bien ';\n $saldo_reemplazar= $montoTotalCompra-$saldoTarjeta;\n \n $varActualiza = \" Update tarjetas_recibidas SET saldo=\".$saldo_reemplazar.\" where codigo_targeta \".$codigo_tar .\" registrada_sistema =TRUE\";\n \n $result = mysql_query( $varActualiza );\n if ($row = mysql_fetch_array($result)) {\n $retornar= 'Listo';\n } else {\n $retornar=''; \n }\n\n mysql_free_result($result);\n $conectado->desconectar();\n return $retornar;\n \n } else {\n echo 'Algo anda mal';\n } \n }", "public function RegistrarAbonos()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"codcliente\"]) or empty($_POST[\"codventa\"]) or empty($_POST[\"montoabono\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\n\tif($_POST[\"montoabono\"] > $_POST[\"totaldebe\"])\n\t{\n\t\techo \"2\";\n\t\texit;\n\n\t} else {\n\n\t\t$query = \" insert into abonoscreditos values (null, ?, ?, ?, ?, ?, ?); \";\n\t\t$stmt = $this->dbh->prepare($query);\n\t\t$stmt->bindParam(1, $codventa);\n\t\t$stmt->bindParam(2, $codcliente);\n\t\t$stmt->bindParam(3, $montoabono);\n\t\t$stmt->bindParam(4, $fechaabono);\n\t\t$stmt->bindParam(5, $codigo);\n\t\t$stmt->bindParam(6, $codcaja);\n\n\t\t$codventa = strip_tags($_POST[\"codventa\"]);\n\t\t$codcliente = strip_tags($_POST[\"codcliente\"]);\n\t\t$montoabono = strip_tags($_POST[\"montoabono\"]);\n\t\t$fechaabono = strip_tags(date(\"Y-m-d h:i:s\"));\n\t\t$codigo = strip_tags($_SESSION[\"codigo\"]);\n\t\t$codcaja = strip_tags($_POST[\"codcaja\"]);\n\t\t$stmt->execute();\n\n\n$sql = \"select ingresos from arqueocaja where codcaja = '\".$_POST[\"codcaja\"].\"' and statusarqueo = '1'\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\t$ingreso = $row['ingresos'];\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $txtTotal);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$txtTotal = strip_tags($_POST[\"montoabono\"]+$ingreso);\n\t\t$codcaja = strip_tags($_POST[\"codcaja\"]);\n\t\t$stmt->execute();\n\n\n############## ACTUALIZAMOS EL STATUS DE LA FACTURA ##################\n\t\tif($_POST[\"montoabono\"] == $_POST[\"totaldebe\"]) {\n\n\t\t\t$sql = \" update ventas set \"\n\t\t\t.\" statusventa = ? \"\n\t\t\t.\" where \"\n\t\t\t.\" codventa = ?;\n\t\t\t\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1, $statusventa);\n\t\t\t$stmt->bindParam(2, $codventa);\n\n\t\t\t$codventa = strip_tags($_POST[\"codventa\"]);\n\t\t\t$statusventa = strip_tags(\"PAGADA\");\n\t\t\t$stmt->execute();\n\t\t}\n\n\t\techo \"<div class='alert alert-success'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<span class='fa fa-check-square-o'></span> EL ABONO AL CR&Eacute;DITO DE FACTURA FUE REGISTRADO EXITOSAMENTE <a href='reportepdf.php?codventa=\".base64_encode($codventa).\"&tipo=\".base64_encode(\"TICKETCREDITOS\").\"' class='on-default' data-placement='left' data-toggle='tooltip' data-original-title='Imprimir Ticket' target='_black'><strong>IMPRIMIR TICKET</strong></a>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n}", "public function actualizar_empresa_controlador(){\n\t\t\n\t\t$cuenta= mainModel::decryption($_POST['codigo']);\n\t\t$nit= mainModel::limpiar_cadena($_POST['nit-update']);\n\t\t$nombre= mainModel::limpiar_cadena($_POST['nombre-update']);\n\t\t$telefono= mainModel::limpiar_cadena($_POST['telefono-update']);\n\t\t$email= mainModel::limpiar_cadena($_POST['email-update']);\n\t\t$direccion= mainModel::limpiar_cadena($_POST['direccion-update']);\n\t\t$director= mainModel::limpiar_cadena($_POST['director-update']);\n\t\t$telefono2= mainModel::limpiar_cadena($_POST['telefono2-update']);\n\t\t$year= mainModel::limpiar_cadena($_POST['year-update']);\n\t\t\n\n\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT * FROM empresa WHERE id='$cuenta'\");\n\t\t$datosEmpresa=$consulta1->fetch();\n\n\t\t\tif($nit!=$datosEmpresa['EmpresaCodigo']){\n\t\t\t\t$const1=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaCodigo FROM empresa WHERE EmpresaCodigo='$nit'\");\n\t\t\t\tif($const1->rowCount()>=1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"La Empresa que acaba de actualizar ya se encuenta registrada.\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t\treturn mainModel::sweet_alert($alerta);\n\t\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t$datosEmpresaAct=[\n\t\t\t\t\t\"Nit\"=>$nit,\n\t\t\t\t\t\"Nombre\"=>$nombre,\n\t\t\t\t\t\"Telefono\"=>$telefono,\n\t\t\t\t\t\"Email\"=>$email,\n\t\t\t\t\t\"Direccion\"=>$direccion,\n\t\t\t\t\t\"Director\"=>$director,\n\t\t\t\t\t\"Telefono2\"=>$telefono2,\n\t\t\t\t\t\"Year\"=>$year,\n\t\t\t\t\t\"Id\"=>$cuenta\n\t\t\t\t];\n\n\t\t\t\tif(empresaModelo::actualizar_empresa_modelo($datosEmpresaAct)){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Datos actualizados\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Los datos fueron actualizados de manera satisfactoria.\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t\t];\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Los datos no han podido ser actualizar los datos, por favor intente nuevamente.\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\treturn mainModel::sweet_alert($alerta);\n\t}", "function actualiza_nro_cargo($id_desig,$nro_cargo){\n if(is_null($nro_cargo)){\n $sql=\"update designacion set nro_cargo=null\"\n . \" where id_designacion=$id_desig\";\n toba::db('designa')->consultar($sql); \n return true;\n \n }else{\n if($id_desig<>-1 and $nro_cargo<>-1){\n $sql=\"select * from designacion where nro_cargo=$nro_cargo and id_designacion<>$id_desig\";\n $res=toba::db('designa')->consultar($sql); \n if(count($res)>0){//ya hay otra designacion con ese numero de cargo\n return false;\n }else{\n $sql=\"update designacion set nro_cargo=$nro_cargo\"\n . \" where id_designacion=$id_desig\";\n toba::db('designa')->consultar($sql); \n return true;\n }\n \n }else{\n return false;\n }\n } \n }", "function modificarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_ime';\n\t\t$this->transaccion='VF_REFACOR_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_reenvio_factura','id_reenvio_factura','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_venta','id_venta','int4');\n\t\t$this->setParametro('correo','correo','varchar');\n\t\t$this->setParametro('observacion','observacion','text');\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}", "private function mensagemPrazoEmissao() {\n\n $oContribuinte = $this->_session->contribuinte;\n $iInscricaoMunicipal = $oContribuinte->getInscricaoMunicipal();\n $iIdContribuinte = $oContribuinte->getIdUsuarioContribuinte();\n\n try {\n\n $iQuantidadeNotasEmissao = Contribuinte_Model_NotaAidof::getQuantidadeNotasPendentes(\n $iInscricaoMunicipal,\n NULL,\n Contribuinte_Model_Nota::GRUPO_NOTA_RPS);\n\n if ($iQuantidadeNotasEmissao == 0) {\n\n $sMensagem = 'Limite de notas para emissão atingido, faça uma nova requisição.';\n $this->view->bloqueado_msg = $this->translate->_($sMensagem);\n\n return FALSE;\n }\n\n $oParamContribuinte = Contribuinte_Model_ParametroContribuinte::getById($iIdContribuinte);\n $sMensagemErroEmissao = 'Você possui \"%s\" notas para emissão. É importante gerar uma nova requisição.';\n\n // Verifica a quantidade de notas pela configuracao do Contribuinte\n if (is_object($oParamContribuinte) && $oParamContribuinte->getAvisofimEmissaoNota() > 0) {\n\n if ($iQuantidadeNotasEmissao <= $oParamContribuinte->getAvisofimEmissaoNota()) {\n\n $this->view->messages[] = array(\n 'warning' => sprintf($this->translate->_($sMensagemErroEmissao), $iQuantidadeNotasEmissao)\n );\n }\n } else {\n\n $oParamPrefeitura = Administrativo_Model_Prefeitura::getDadosPrefeituraBase();\n\n if (is_object($oParamPrefeitura) && $oParamPrefeitura->getQuantidadeAvisoFimEmissao() > 0) {\n\n if ($iQuantidadeNotasEmissao <= $oParamPrefeitura->getQuantidadeAvisoFimEmissao()) {\n\n $this->view->messages[] = array(\n 'warning' => sprintf($this->translate->_($sMensagemErroEmissao), $iQuantidadeNotasEmissao)\n );\n }\n }\n }\n } catch (Exception $e) {\n\n echo $this->translate->_('Ocorreu um erro ao verificar a quantidade limite para emissão de notas.');\n\n return FALSE;\n }\n\n return TRUE;\n }", "public function testRecursosComprometidosPorEmpenhoALiquidar() {\n $filter = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '8.2.1.1.2') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorControle = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorControle = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $filter = function (array $line): bool {\n if (\n str_starts_with($line['conta_contabil'], '6.2.2.1.3.01') && $line['escrituracao'] === 'S'\n ) {\n return true;\n }\n return false;\n };\n $saldoDevedorEmpenhadoALiquidar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorEmpenhadoALiquidar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $filter = function (array $line): bool {\n if (\n str_starts_with($line['conta_contabil'], '6.3.1.1') && $line['escrituracao'] === 'S'\n ) {\n return true;\n }\n return false;\n };\n $saldoDevedorRPNP = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorRPNP = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $this->comparar(\n ($saldoCredorControle - $saldoDevedorControle),\n (\n ($saldoCredorEmpenhadoALiquidar - $saldoDevedorEmpenhadoALiquidar) + ($saldoCredorRPNP - $saldoDevedorRPNP)\n )\n );\n\n $this->saldoVerificado(__METHOD__, '8.2.1.1.2');\n }", "public function abonoupdate($numero, $monto, $idp, $estatusp, $mes, $ultimomesp, $fecha, $user, $hora, $costoc, $inicioc, $finc, $colegiatura)\n {\n\n\n if ($numero == $colegiatura) {\n $estatus = 1;\n } else {\n $estatus = 2;\n }\n //realiza comparaciones con el ultimo registro de pago tipo colegiatura si ya se encuentra pagado estatus 1 crea el siguiente de lo contrario actualiza\n\n if ($estatusp != null) {\n if ($estatusp == 1) {\n //si abonado es igual actualiza a 1\n if (($numero) == $colegiatura) {\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => $estatus,\n 'monto' => $numero,\n 'mes' => $this->funcmes($ultimomesp + 1),\n 'tipo' => 2\n ]\n );\n\n $final = $this->funcmes($ultimomesp + 1);\n $pagoupdate = array('estatus_c' => 1);\n if ($finc == $final) {\n $pag = Pagos_estatus::where('id_usuario', $user)->where('id_nivel', $hora)->first();\n $pag->update($pagoupdate);\n }\n return back();\n } else\n // si el abono es menor crea con estatus 2\n if (($numero) < $colegiatura) {\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => $estatus,\n 'monto' => $numero,\n 'mes' => $this->funcmes($ultimomesp + 1),\n 'tipo' => 2\n ]\n );\n return back();\n } else\n // si abono es mayor crea a sts 1 y la diferencia crea registro del siguiente mes\n if ($numero > $colegiatura) {\n\n if (is_int($numero / $colegiatura) == true) {\n $mesesApagar = $numero / $colegiatura;\n $meses_corridos = $ultimomesp + 1;\n $pagoupdate = array('estatus_c' => 1);\n\n for ($i = 0; $i < $mesesApagar; $i++) {\n $final = $this->funcmes($meses_corridos + $i);\n if ($finc == $final) {\n $pag = Pagos_estatus::where('id_usuario', $user)->where('id_nivel', $hora)->first();\n $pag->update($pagoupdate);\n }\n $aux = 0;\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 1,\n 'monto' => $colegiatura,\n 'mes' => $this->funcmes($meses_corridos + $i),\n 'tipo' => 2\n ]\n );\n $aux++;\n }\n } else {\n\n $mesesApagarC = explode(\".\", $numero / $colegiatura);\n $numeroMeses = $mesesApagarC[0] + 1;\n\n for ($i = 0; $i < $numeroMeses; $i++) {\n if ($i == ($numeroMeses - 1)) {\n $residuo = $numero % $colegiatura;\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 2,\n 'monto' => $residuo,\n 'mes' => $this->funcmes($ultimomesp + $numeroMeses),\n 'tipo' => 2\n ]\n );\n } else {\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 1,\n 'monto' => $colegiatura,\n 'mes' => $this->funcmes($ultimomesp + $i + 1),\n 'tipo' => 2\n ]\n );\n }\n }\n }\n }\n return back();\n } // si no esta pagado hace condiciones\n else {\n\n ////////////////////////////////////////////// \n //si el monto que tenia mas el abonado es igual actualiza a 1\n if (($numero + $monto) == $colegiatura) {\n\n $pagoupdate = array(\n 'fecha_pago' => $fecha,\n 'estatus' => 1,\n 'monto' => ($numero + $monto)\n );\n\n $pag = Pagos::find($idp);\n $pag->update($pagoupdate);\n\n $final = $this->funcmes($ultimomesp);\n $pagoupdatefin = array('estatus_c' => 1);\n if ($finc == $final) {\n $pag = Pagos_estatus::where('id_usuario', $user)->where('id_nivel', $hora)->first();\n $pag->update($pagoupdatefin);\n }\n return back();\n } else\n // si el monto que tenia mas el abonado es menor actualiza monto\n if (($numero + $monto) < $colegiatura) {\n $pagoupdate = array(\n 'fecha_pago' => $fecha,\n 'monto' => ($numero + $monto)\n );\n\n $pag = Pagos::find($idp);\n $pag->update($pagoupdate);\n return back();\n } else\n // si el monto que tenia mas el abonado es mayor actualiza a 1 y la diferencia crea registro del siguiente mes\n if (($numero + $monto) > $colegiatura) {\n\n $pagoupdate = array(\n 'fecha_pago' => $fecha,\n 'estatus' => 1,\n 'monto' => $colegiatura\n );\n\n $pag = Pagos::find($idp);\n $pag->update($pagoupdate);\n\n $faltante = $colegiatura - $monto;\n $abonado2 = $numero - $faltante;\n if (is_int($abonado2 / $colegiatura) == true) {\n $mesesApagar = $abonado2 / $colegiatura;\n $meses_corridos = $ultimomesp + 1;\n $pagoupdate = array('estatus_c' => 1);\n for ($i = 0; $i < $mesesApagar; $i++) {\n $final = $this->funcmes($meses_corridos + $i);\n if ($finc == $final) {\n $pag = Pagos_estatus::where('id_usuario', $user)->where('id_nivel', $hora)->first();\n $pag->update($pagoupdate);\n }\n $aux = 0;\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 1,\n 'monto' => $colegiatura,\n 'mes' => $this->funcmes($meses_corridos + $i),\n 'tipo' => 2\n ]\n );\n $aux++;\n }\n } else {\n\n $mesesApagarC = explode(\".\", $abonado2 / $colegiatura);\n $numeroMeses = $mesesApagarC[0] + 1;\n //si abonado 2 es menor ala colegitura solo se agrega el reg del lo restante si no agrega registros de meses +\n if ($abonado2 < $colegiatura) {\n $residuo = $abonado2 % $colegiatura;\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 2,\n 'monto' => $abonado2,\n 'mes' => $this->funcmes($ultimomesp + $numeroMeses),\n 'tipo' => 2\n ]\n );\n } else {\n for ($i = 0; $i < $numeroMeses; $i++) {\n if ($i == ($numeroMeses - 1)) {\n $residuo = $abonado2 % $colegiatura;\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 2,\n 'monto' => $residuo,\n 'mes' => $this->funcmes($ultimomesp + $numeroMeses),\n 'tipo' => 2\n ]\n );\n } else {\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 1,\n 'monto' => $colegiatura,\n 'mes' => $this->funcmes($ultimomesp + $i + 1),\n 'tipo' => 2\n ]\n );\n }\n }\n }\n }\n }\n return back();\n }\n } else {\n //si no crea registro del primer mes de colegiatura\n //si el curso ya empezo y paga un mes despues o dependiendo guarda el mes que entra\n if ($mes <= $inicioc) {\n $pagomes = $inicioc;\n } else {\n $pagomes = $mes;\n }\n if (($numero) == $colegiatura) {\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => $estatus,\n 'monto' => $numero,\n 'mes' => $this->funcmes($pagomes),\n 'tipo' => 2\n ]\n );\n return back();\n } else\n // si el abono es menor crea con estatus 2\n if (($numero) < $colegiatura) {\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => $estatus,\n 'monto' => $numero,\n 'mes' => $this->funcmes($pagomes),\n 'tipo' => 2\n ]\n );\n return back();\n } else\n // si abono es mayor crea a 1 y la diferencia crea registro del siguiente mes\n if (($numero) > $colegiatura) {\n\n if (is_int($numero / $colegiatura) == true) {\n $mesesApagar = $numero / $colegiatura;\n $meses_corridos = $pagomes;\n $pagoupdate = array('estatus_c' => 1);\n for ($i = 0; $i < $mesesApagar; $i++) {\n\n $final = $this->funcmes($meses_corridos + $i);\n if ($finc == $final) {\n $pag = Pagos_estatus::where('id_usuario', $user)->where('id_nivel', $hora)->first();\n $pag->update($pagoupdate);\n }\n\n $aux = 0;\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 1,\n 'monto' => $colegiatura,\n 'mes' => $this->funcmes($meses_corridos + $i),\n 'tipo' => 2\n ]\n );\n $aux++;\n }\n } else {\n\n $mesesApagarC = explode(\".\", $numero / $colegiatura);\n $numeroMeses = $mesesApagarC[0] + 1;\n\n for ($i = 0; $i < $numeroMeses; $i++) {\n if ($i == ($numeroMeses - 1)) {\n $residuo = $numero % $colegiatura;\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 2,\n 'monto' => $residuo,\n 'mes' => $this->funcmes($pagomes + ($numeroMeses - 1)),\n 'tipo' => 2\n ]\n );\n } else {\n Pagos::create(\n [\n 'id_usuario' => $user,\n 'id_nivel' => $hora,\n 'fecha_pago' => $fecha,\n 'estatus' => 1,\n 'monto' => $colegiatura,\n 'mes' => $this->funcmes($pagomes + $i),\n 'tipo' => 2\n ]\n );\n }\n }\n }\n }\n }\n\n return back();\n }", "static public function ctrCrearRecursos(){\n if (isset($_POST[\"nuevorubro\"])) {\n if (preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevorubro\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoconcepto\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevovalor_rubro\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevovalor_proyecto\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoid_proyecto\"])){\n\n $recursos = \"recursos\"; \n \n $datos = array(\"rubro\" => $_POST[\"nuevorubro\"],\n \"concepto\" => $_POST[\"nuevoconcepto\"],\n \"valor_rubro\" => $_POST[\"nuevovalor_rubro\"],\n \"valor_proyecto\" => $_POST[\"nuevovalor_proyecto\"],\n \"id_proyecto\" => $_POST[\"nuevoid_proyecto\"]);\n $respuesta = ModeloRecurso::mdlIngresarRecursos($recursos, $datos);\n\n if ($respuesta == \"ok\") {\n echo '<script>\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\ttitle: \"¡El recurso ha sido guardado correctamente!\",\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 = \"recurso\";\n\n\t\t\t\t\t\t}\n\n });\n \n\t\t\t\t\t</script>';\n }\n }else{\n echo '<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 recurso 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 = \"recurso\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\n\t\t\t\t</script>';\n }\n }\n }", "public function eliminar_empresa_controlador(){\n\n\t\t$codigo=mainModel::decryption($_POST['codigo-del']);\n\t\t$Privilegio=mainModel::decryption($_POST['privilegio-admin']);\n\n\t\t$codigo=mainModel::limpiar_cadena($codigo);\n\t\t$Privilegio=mainModel::limpiar_cadena($Privilegio);\n\n\t\tif($Privilegio==1){\n\n\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT EmpresaCodigo FROM libro WHERE EmpresaCodigo='$codigo'\");\n\n\t\t\t\n\t\t\tif($consulta1->rowCount()<=0){\n\t\t\t\t$ElimEmp=empresaModelo::eliminar_empresa_modelo($codigo);\n\t\t\t\t\n\t\t\t\tif($ElimEmp->rowCount()==1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Empresa Eliminada\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Se elimino la empresa de manera satisfactoria\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t];\t\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Lo sentimos no se puede eliminar la empresa, \",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t}\t\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa, teniendo en cuenta que hay libros asociados a esta empresa\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t\t}\n\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\"Texto\"=>\"No se puede eliminar la empresa.\",\n\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t];\n\t\t}\n\t\treturn mainModel::sweet_alert($alerta);\n\t\t\n\t}", "function borrar(){\r\n\t\t\t$mysqli=$this->conectarBD();\r\n\t\t\t\t$id=$_SESSION['idr'];\r\n\r\n\t\t\t$sql =\"SELECT FECHA, DNI, COD_ACT,COD_RES FROM reservact WHERE (COD_RES = '\".$id.\"')\";\r\n \t\t\t$result = $mysqli->query($sql);\r\n\r\n \t\t\tif ($result->num_rows == 1){\r\n \t$sql2 = \"UPDATE reservact SET BORRADO ='SI' WHERE COD_RES = '\".$id.\"'\";\r\n \t\t$mysqli->query($sql2);\r\n \t\treturn \"CONFIRM_DELETE_RESERVA\";\r\n \t\t}\r\n \telse{\r\n\r\n \treturn \"NOEXISTS_RESERVA\";\r\n }\r\n\r\n}", "public function gera_pagamentos_renovacao()\n {\n $this->FinanceiroPagamento->geraPagamentoRenovacaoMatriculas();\n }", "function modificar_contenido($nick_user, $nivel, $ubi_tema, $nom_user, $cor_user)\r\n\t\t\t{\r\n\t\t\t\t$clave_seccion_enviada = $_GET[\"clave_seccion\"];\r\n\t\t\t\tif(isset($_POST[\"guardar\"]) && $_POST[\"guardar\"]==\"si\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$formulario_final = $_POST[\"formulario_final\"];\r\n\t\t\t\t\t\t$fecha_inicio = $_POST[\"ano_i\"].\"-\".$_POST[\"mes_i\"].\"-\".$_POST[\"dia_i\"];\r\n\t\t\t\t\t\t$fecha_termino = $_POST[\"ano_t\"].\"-\".$_POST[\"mes_t\"].\"-\".$_POST[\"dia_t\"];\r\n\t\t\t\t\t\t$situacion_total = $_POST[\"situacion_total\"];\r\n\t\t\t\t\t\t$ver_actualizacion = $_POST[\"ver_actualizacion\"];\r\n\t\t\t\t\t\t$usar_caducidad = $_POST[\"usar_caducidad\"];\r\n\r\n\t\t\t\t\t\t$clave_seccion = $_POST[\"clave_seccion\"];\r\n\t\t\t\t\t\t$clave_modulo= $_POST[\"clave_modulo\"];\r\n\t\t\t\t\t\t$clave_contenido = $_POST[\"clave_contenido\"];\r\n\t\t\t\t\t\t$fecha_hoy = date(\"Y-m-d\");\r\n\t\t\t\t\t\t$hora_hoy = date (\"H:i:s\");\r\n\t\t\t\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\r\n\t\t\t\t\t\t$motivo = $this->escapar_caracteres($_POST[\"motivo\"]);\r\n\t\t\t\t\t\t$motivo = strip_tags($motivo);\r\n\t\t\t\t\t\t$correo = $_POST[\"correo\"];\r\n\t\t\t\t\t\t$nombre = $_POST[\"nombre\"];\r\n\t\t\t\t\t\t$situacion_temporal = $_POST[\"situacion_temporal\"];\t\r\n\t\t\t\t\t\tif($correo==\"\")\r\n\t\t\t\t\t\t\t{$correo = $cor_user;}\r\n\t\t\t\t\t\tif($nombre==\"\")\r\n\t\t\t\t\t\t\t{$nombre = $nom_user;}\r\n\t\t\t\t\t\t$nombre = strip_tags($nombre);\r\n\t\t\t\t\t\t$sql_adicional = \"null, '0000-00-00','00:00:00', '', '', '','',\";\r\n\t\t\t\t\t\tif($situacion_temporal==\"activo\")\r\n\t\t\t\t\t\t\t{$sql_adicional = \"'$nick_user', '$fecha_hoy', '$hora_hoy', '$ip', '$motivo', '$nombre', '$correo',\";}\r\n\t\t\t\t\t\t$insert_camb = \"insert into nazep_zmod_contenido_cambios \r\n\t\t\t\t\t\t(clave_contenido, situacion, nick_user_propone, fecha_propone, hora_propone, ip_propone, motivo_propone,\r\n\t\t\t\t\t\tnombre_propone, correo_propone,\r\n\t\t\t\t\t\tnick_user_decide, fecha_decide, hora_decide, ip_decide, motivo_decide,\r\n\t\t\t\t\t\tnombre_decide, correo_decide,\r\n\t\t\t\t\t\tnuevo_situacion, nuevo_ver_actualizacion, nuevo_usar_caducidad, nuevo_fecha_incio, nuevo_fecha_fin, \r\n\t\t\t\t\t\tanterior_situacion, anterior_ver_actualizacion, anterior_usar_caducidad, anterior_fecha_incio, anterior_fecha_fin)\t\t\t\t\t\r\n\t\t\t\t\t\tselect '$clave_contenido', '$situacion_temporal','$nick_user', '$fecha_hoy', '$hora_hoy', '$ip', '$motivo',\r\n\t\t\t\t\t\t'$nombre','$correo',\r\n\t\t\t\t\t\t\".$sql_adicional.\"\r\n\t\t\t\t\t\t'$situacion_total', '$ver_actualizacion', '$usar_caducidad', '$fecha_inicio', '$fecha_termino',\r\n\t\t\t\t\t\tsituacion, ver_actualizacion, usar_caducidad, fecha_incio, fecha_fin\r\n\t\t\t\t\t\tfrom nazep_zmod_contenido \r\n\t\t\t\t\t\twhere clave_contenido = '$clave_contenido'\";\r\n\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t$conexion = $this->conectarse();\r\n\t\t\t\t\t\tmysql_query(\"START TRANSACTION;\");\r\n\t\t\t\t\t\tif (!@mysql_query($insert_camb))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$men = mysql_error();\r\n\t\t\t\t\t\t\t\tmysql_query(\"ROLLBACK;\");\r\n\t\t\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t\t\t$error = 1;\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$paso = true;\r\n\t\t\t\t\t\t\t\t$clave_contenido_cambios_db = mysql_insert_id();\r\n\t\t\t\t\t\t\t\t$clave_contenido_detalle = $_POST[\"clave_contenido_detalle\"];\r\n\t\t\t\t\t\t\t\t$pagina = $_POST[\"pagina\"];\r\n\t\t\t\t\t\t\t\t$texto = $this->escapar_caracteres($_POST[\"conte_texto\"]);\r\n\t\t\t\t\t\t\t\t$situacion_p = $_POST[\"situacion\"];\r\n\t\t\t\t\t\t\t\t$insert_con_cam = \"insert into nazep_zmod_contenido_detalle_cambios\r\n\t\t\t\t\t\t\t\t(clave_contenido_cambios, clave_contenido_detalle, nuevo_pagina, nuevo_texto, nuevo_situacion,\r\n\t\t\t\t\t\t\t\tanterior_pagina, anterior_texto, anterior_situacion)\r\n\t\t\t\t\t\t\t\tselect '$clave_contenido_cambios_db', '$clave_contenido_detalle',\r\n\t\t\t\t\t\t\t\t'$pagina', '$texto', '$situacion_p', pagina, texto, situacion\r\n\t\t\t\t\t\t\t\tfrom nazep_zmod_contenido_detalle\r\n\t\t\t\t\t\t\t\twhere clave_contenido_detalle = '$clave_contenido_detalle'\";\r\n\t\t\t\t\t\t\t\tif (!@mysql_query($insert_con_cam))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$men = mysql_error();\r\n\t\t\t\t\t\t\t\t\t\tmysql_query(\"ROLLBACK;\");\r\n\t\t\t\t\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t\t\t\t\t$error = \"2\";\r\n\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{$paso = true;}\r\n\t\t\t\t\t\t\t\tif($situacion_temporal==\"activo\")\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$update_2 = \"update nazep_zmod_contenido\r\n\t\t\t\t\t\t\t\t\t\tset situacion = '$situacion_total', ver_actualizacion = '$ver_actualizacion', usar_caducidad ='$usar_caducidad', \r\n\t\t\t\t\t\t\t\t\t\tfecha_incio = '$fecha_inicio', fecha_fin = '$fecha_termino',\r\n\t\t\t\t\t\t\t\t\t\tuser_actualizacion = '$nick_user', fecha_actualizacion = '$fecha_hoy', hora_actualizacion = '$hora_hoy',\r\n\t\t\t\t\t\t\t\t\t\tip_actualizacion = '$ip', nombre_actualizacion = '$nombre', correo_actualizacion = '$correo'\r\n\t\t\t\t\t\t\t\t\t\twhere clave_contenido = '$clave_contenido' and clave_modulo = '$clave_modulo'\";\r\n\t\t\t\t\t\t\t\t\t\tif (!@mysql_query($update_2))\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$men = mysql_error();\r\n\t\t\t\t\t\t\t\t\t\t\t\tmysql_query(\"ROLLBACK;\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$error = 3;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$paso = true;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t$clave_contenido_detalle = $_POST[\"clave_contenido_detalle\"];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$pagina = $_POST[\"pagina\"];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$situacion = $_POST[\"situacion\"];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$texto = $this->escapar_caracteres($_POST[\"conte_texto\"]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$update3 = \"update nazep_zmod_contenido_detalle set pagina = '$pagina', texto = '$texto', situacion = '$situacion' \r\n\t\t\t\t\t\t\t\t\t\t\t\twhere clave_contenido_detalle = '$clave_contenido_detalle'\";\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (!@mysql_query($update3))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$men = mysql_error();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmysql_query(\"ROLLBACK;\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$paso = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$error = \"4\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{$paso = true;}\r\n\t\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}\r\n\t\t\t\t\t\tif($paso)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmysql_query(\"COMMIT;\");\r\n\t\t\t\t\t\t\t\techo \"termino-,*-$formulario_final\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo \"Error: Insertar en la base de datos, la consulta: <strong>$error</strong> <br/> con el siguiente mensaje: $men\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$this->desconectarse($conexion);\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$paginas_contenido= $_POST[\"paginas_contenido\"];\r\n\t\t\t\t\t\t$clave_modulo= $_POST[\"clave_modulo\"];\t\t\t\t\t\t\r\n\t\t\t\t\t\t$nombre_sec = HtmlAdmon::historial($clave_seccion_enviada);\r\n\t\t\t\t\t\tHtmlAdmon::titulo_seccion(\"Modificar contenido html de la secci&oacute;n \\\"$nombre_sec\\\"\");\r\n\t\t\t\t\t\t$con_veri = \"select cc.clave_contenido_cambios from nazep_zmod_contenido_cambios cc, nazep_zmod_contenido c\r\n\t\t\t\t\t\twhere c.clave_seccion = '$clave_seccion_enviada' and c.clave_modulo = '$clave_modulo' and \r\n\t\t\t\t\t\t(cc.situacion = 'pendiente' or cc.situacion = 'nueva_pagina' or cc.situacion = 'nuevo')\r\n\t\t\t\t\t\tand c.clave_contenido = cc.clave_contenido\";\r\n\t\t\t\t\t\t$conexion = $this->conectarse();\r\n\t\t\t\t\t\t$res = mysql_query($con_veri);\r\n\t\t\t\t\t\t$cantidad = mysql_num_rows($res);\r\n\t\t\t\t\t\t$this->desconectarse($conexion);\r\n\t\t\t\t\t\tif($cantidad!=0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\techo '<tr><td align=\"center\"><br /><strong>'.cont_txt_tiene_cambio_pen.'</strong><br /><br /></td></tr>';\r\n\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\tHtmlAdmon::boton_regreso(array('clave_usar'=>$clave_seccion_enviada,'texto'=>regresar_opc_mod));\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$variable_archivos = directorio_archivos.\"$clave_seccion_enviada/\";\r\n\t\t\t\t\t\t\t\t$_SESSION[\"direccion_archivos\"] = $variable_archivos;\t\r\n\t\t\t\t\t\t\t\t$con_contenido = \"select fecha_incio, fecha_fin, situacion, ver_actualizacion, usar_caducidad, clave_contenido \r\n\t\t\t\t\t\t\t\tfrom nazep_zmod_contenido where clave_seccion = '$clave_seccion_enviada' and clave_modulo = '$clave_modulo'\";\r\n\t\t\t\t\t\t\t\t$conexion = $this->conectarse();\r\n\t\t\t\t\t\t\t\t$res_contenido = mysql_query($con_contenido);\r\n\t\t\t\t\t\t\t\t$ren = mysql_fetch_array($res_contenido);\r\n\t\t\t\t\t\t\t\t$fecha_incio = $ren[\"fecha_incio\"];\r\n\t\t\t\t\t\t\t\tlist($ano_i, $mes_i, $dia_i) = explode(\"-\",$fecha_incio);\r\n\t\t\t\t\t\t\t\t$fecha_fin = $ren[\"fecha_fin\"];\r\n\t\t\t\t\t\t\t\tlist($ano_t, $mes_t, $dia_t) = explode(\"-\",$fecha_fin);\r\n\t\t\t\t\t\t\t\t$situacion_total = $ren[\"situacion\"];\r\n\t\t\t\t\t\t\t\t$ver_actualizacion = $ren[\"ver_actualizacion\"];\r\n\t\t\t\t\t\t\t\t$usar_caducidad = $ren[\"usar_caducidad\"];\r\n\t\t\t\t\t\t\t\t$clave_contenido = $ren[\"clave_contenido\"];\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\techo '\r\n\t\t\t\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\t\t\t';\r\n\t\t\t\t\t\t\t\techo'\r\n\t\t\t\t\t\t\t\t$(document).ready(function()\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$.frm_elem_color(\"#FACA70\",\"\");\r\n\t\t\t\t\t\t\t\t\t\t\t$.guardar_valores(\"frm_modificar_contenido\");\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tfunction validar_form(formulario, situacion_temporal, nombre_formulario)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.situacion_temporal.value = situacion_temporal;\r\n\t\t\t\t\t\t\t\t\t\t\tif(formulario.motivo.value == \"\") \r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"'.jv_campo_motivo.'\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tformulario.motivo.focus(); \t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tseparador = \"/\";\r\n\t\t\t\t\t\t\t\t\t\t\tfecha_ini = formulario.dia_i.value+\"/\"+formulario.mes_i.value+\"/\"+formulario.ano_i.value;\r\n\t\t\t\t\t\t\t\t\t\t\tfecha_fin = formulario.dia_t.value+\"/\"+formulario.mes_t.value+\"/\"+formulario.ano_t.value;\r\n\t\t\t\t\t\t\t\t\t\t\tif(!Comparar_Fecha(fecha_ini, fecha_fin))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"'.comparar_fecha_veri.'\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tformulario.dia_i.focus(); \r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif(!verificar_fecha(fecha_ini, separador))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"'.verificar_fecha_ini.'\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tformulario.dia_i.focus(); \r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif(!verificar_fecha(fecha_fin, separador))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"'.verificar_fecha_fin.'\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tformulario.dia_t.focus(); \r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tvalorTemporal = FCKeditorAPI.__Instances[\\'conte_texto\\'].GetHTML();\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.conte_texto.value = valorTemporal;\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.btn_guardar1.style.visibility=\"hidden\";\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.btn_guardar1a.style.visibility=\"hidden\";\r\n\t\t\t\t\t\t\t\t\t\t\tdocument.crear_nueva_pagina.btn_nueva_pagina.style.visibility=\"hidden\";\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t';\r\n\t\t\t\t\t\t\t\t\tif($nivel == 1 or $nivel == 2)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\techo 'formulario.btn_guardar2.style.visibility=\"hidden\";\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.btn_guardar2a.style.visibility=\"hidden\";';\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\techo '\r\n\t\t\t\t\t\t\t\t\t\t\tformulario.formulario_final.value = nombre_formulario;\r\n\t\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\techo '</script>';\r\n\t\t\t\t\t\t\t\techo '<form name=\"regresar_pantalla\" id=\"regresar_pantalla\" method=\"post\" action=\"index.php?opc=111&amp;clave_seccion='.$clave_seccion_enviada.'\" class=\"margen_cero\">';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"archivo\" value = \"../librerias/modulos/contenido/contenido_admon.php\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clase\" value = \"clase_contenido\"/>';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"metodo\" value = \"modificar_contenido\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_modulo\" value = \"'.$clave_modulo.'\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"paginas_contenido\" value = \"'.$paginas_contenido.'\" />';\r\n\t\t\t\t\t\t\t\techo '</form>';\t\r\n\t\t\t\t\t\t\t\techo '<form name=\"recargar_pantalla\" id= \"recargar_pantalla\" method=\"get\" action=\"index.php\" class=\"margen_cero\"><input type=\"hidden\" name=\"opc\" value = \"11\" /><input type=\"hidden\" name=\"clave_seccion\" value = \"'.$clave_seccion_enviada.'\" /></form>';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\techo '<form name=\"frm_modificar_contenido\" id=\"frm_modificar_contenido\" method=\"post\" action=\"index.php?opc=111&amp;clave_seccion='.$clave_seccion_enviada.'\" class=\"margen_cero\" >';\r\n\t\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td width=\"400\">'.persona_cambio.'</td><td><input type =\"text\" name = \"nombre\" size = \"60\" /></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.correo_cambio.'</td><td><input type = \"text\" name = \"correo\" size = \"60\" /></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.motivo_cambio.'</td><td><textarea name=\"motivo\" cols=\"45\" rows=\"5\"></textarea></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.situacion.'</td><td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"situacion_total\" id =\"situacion_act\" value=\"activo\" '; if ($situacion_total == \"activo\") { echo 'checked=\"checked\"'; } echo '/> '.activo.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"situacion_total\" id =\"situacion_no\" value=\"cancelado\" '; if ($situacion_total == \"cancelado\") { echo 'checked=\"checked\"'; } echo '/> '.cancelado.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.cont_txt_ver_fec_ac.'</td><td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"ver_actualizacion\" id =\"ver_actualizacion_si\" value=\"SI\" '; if ($ver_actualizacion == \"SI\") { echo 'checked=\"checked\"'; } echo '/> '.si.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"ver_actualizacion\" id =\"ver_actualizacion_no\" value=\"NO\" '; if ($ver_actualizacion == \"NO\") { echo 'checked=\"checked\"'; } echo '/> '.no.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.cont_txt_usar_cad_cont.'</td><td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"usar_caducidad\" id =\"usar_caducidad_si\" value=\"SI\" '; if ($usar_caducidad == \"SI\") { echo 'checked=\"checked\"'; } echo ' /> '.si.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"usar_caducidad\" id =\"usar_caducidad_no\" value=\"NO\" '; if ($usar_caducidad == \"NO\") { echo 'checked=\"checked\"'; } echo ' /> '.no.'&nbsp;';\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.fecha_ini_vig.'</td>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$areglo_meses = FunGral::MesesNumero();\r\n\t\t\t\t\t\t\t\t\t\t\t\techo dia.'&nbsp;<select name = \"dia_i\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($a = 1; $a<=31; $a++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$a.'\" '; if ($dia_i == $a) { echo 'selected=\"selected\"'; } echo ' >'.$a.'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo mes.'&nbsp;<select name = \"mes_i\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($b=1; $b<=12; $b++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$b.'\" '; if ($mes_i == $b) {echo ' selected=\"selected\" ';} echo ' >'. $areglo_meses[$b] .'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo ano.'&nbsp;<select name = \"ano_i\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($c=$ano_i-10; $c<=$ano_i+10; $c++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$c.'\" '; if ($ano_i == $c) {echo ' selected=\"selected\" ';} echo '>'.$c.'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td>'.fecha_fin_vig.'</td>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td>';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo dia.'&nbsp;<select name = \"dia_t\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($a = 1; $a<=31; $a++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$a.'\" '; if ($dia_t == $a) { echo 'selected'; } echo '>'.$a.'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo mes.'&nbsp;<select name = \"mes_t\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($b=1; $b<=12; $b++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ echo '<option value = \"'.$b.'\" '; if ($mes_t == $b) {echo 'selected ';} echo '>'.$areglo_meses[$b].'</option>'; }\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo ano.'&nbsp;<select name = \"ano_t\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor ($c=$ano_t-10; $c<=$ano_t+10; $c++)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{echo '<option value = \"'.$c.'\" '; if ($ano_t == $c) {echo ' selected ';} echo '>'.$c.'</option>';}\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</select>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\t\techo '<br /><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td align=\"center\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"submit\" name=\"btn_guardar1a\" value=\"'.guardar.'\" onclick= \"return validar_form(this.form,\\'pendiente\\', \\'recargar_pantalla\\')\" />';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\t\tif($nivel == 1 or $nivel == 2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{echo '<td align=\"center\"><input type=\"submit\" name=\"btn_guardar2a\" value=\"'.guardar_puliblicar.'\" onclick= \"return validar_form(this.form,\\'activo\\', \\'regresar_pantalla\\')\" /></td>';}\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table><br/>';\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$cons_con_detalle = \"select clave_contenido_detalle, pagina, texto, situacion from nazep_zmod_contenido_detalle\r\n\t\t\t\t\t\t\t\t\twhere clave_contenido = '$clave_contenido' and pagina ='$paginas_contenido' \";\r\n\t\t\t\t\t\t\t\t\t$res = mysql_query($cons_con_detalle);\r\n\t\t\t\t\t\t\t\t\t$con = 1;\r\n\t\t\t\t\t\t\t\t\t$ren = mysql_fetch_array($res);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$pagina = $ren[\"pagina\"];\r\n\t\t\t\t\t\t\t\t\t$texto = stripslashes($ren[\"texto\"]);\r\n\t\t\t\t\t\t\t\t\t$clave_contenido_detalle_base = $ren[\"clave_contenido_detalle\"];\r\n\t\t\t\t\t\t\t\t\t$situacion_texto = $ren[\"situacion\"];\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_contenido_detalle\" value = \"'.$clave_contenido_detalle_base.'\" />';\r\n\t\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td align=\"center\"><strong>'.cont_txt_con_html_pag.' '.$pagina.'</strong></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td width=\"377\">'.cont_txt_num_pag.' '.$pagina.'<input type = \"hidden\" name = \"pagina\" size = \"5\" value =\"'.$pagina.'\" /></td></tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td align=\"center\">'.cont_txt_sit_pag.' '.$pagina.'&nbsp;&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"situacion\" id =\"situacion_act\" value=\"activo\" '; if ($situacion_texto == \"activo\") { echo 'checked=\"checked\"'; } echo '/> '.activo.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"radio\" name=\"situacion\" id =\"situacion_no\" value=\"cancelado\" '; if ($situacion_texto == \"cancelado\") { echo 'checked=\"checked\"'; } echo '/> '.cancelado.'&nbsp;';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr><td><a name=\"texto_link\" id=\"texto_link\"></a>';\r\n\t\t\t\t\t\t\t\t\t\t\t$texto = ($texto!='')?$texto:'&nbsp;'; \r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con] = new FCKeditor(\"conte_texto\");\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->BasePath = '../librerias/fckeditor/';\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Value = $texto;\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Config['EditorAreaCSS'] = $ubi_tema.'fck_editorarea.css';\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Config['StylesXmlPath'] = $ubi_tema.'fckstyles.xml';\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Width = \"100%\";\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Height = \"500\";\r\n\t\t\t\t\t\t\t\t\t\t\t$oFCKeditor[$con]->Create();\r\n\t\t\t\t\t\t\t\t\t\techo '</td></tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"formulario_final\" value = \"\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_contenido\" value = \"'.$clave_contenido.'\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"archivo\" value = \"../librerias/modulos/contenido/contenido_admon.php\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clase\" value = \"clase_contenido\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"metodo\" value = \"modificar_contenido\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"guardar\" value = \"si\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_seccion\" value = \"'.$clave_seccion_enviada.'\" />';\t\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_modulo\" value = \"'.$clave_modulo.'\" />';\r\n\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"situacion_temporal\" value = \"pendiente\" />';\r\n\t\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td align=\"center\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"submit\" name=\"btn_guardar1\" value=\"'.guardar.'\" onclick= \"return validar_form(this.form,\\'pendiente\\', \\'recargar_pantalla\\')\" />';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\t\tif($nivel == 1 or $nivel == 2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{echo '<td align=\"center\"><input type=\"submit\" name=\"btn_guardar2\" value=\"'.guardar_puliblicar.'\" onclick= \"return validar_form(this.form,\\'activo\\', \\'regresar_pantalla\\')\" /></td>';}\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\techo '</form>';\r\n\t\t\t\t\t\t\t\t\techo '<hr />';\r\n\t\t\t\t\t\t\t\t\techo '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >';\r\n\t\t\t\t\t\t\t\t\t\techo '<tr>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '<td align=\"center\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '<form id=\"crear_nueva_pagina\" name=\"crear_nueva_pagina\" action=\"index.php?opc=111&amp;clave_seccion='.$clave_seccion_enviada.'\" method=\"post\" class=\"margen_cero\">';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"archivo\" value =\"../librerias/modulos/contenido/contenido_admon.php\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clase\" value = \"clase_contenido\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"metodo\" value = \"nueva_pagina\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"clave_modulo\" value = \"'.$clave_modulo.'\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" name=\"paginas_contenido\" value = \"'.$paginas_contenido.'\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\techo '<input type=\"submit\" name=\"btn_nueva_pagina\" value=\"'.cont_btn_7_cre_pag.'\" />';\r\n\t\t\t\t\t\t\t\t\t\t\t\techo '</form>';\r\n\t\t\t\t\t\t\t\t\t\t\techo '</td>';\r\n\t\t\t\t\t\t\t\t\t\techo '</tr>';\r\n\t\t\t\t\t\t\t\t\techo '</table>';\r\n\t\t\t\t\t\t\t\tHtmlAdmon::div_res_oper(array());\r\n\t\t\t\t\t\t\t\tHtmlAdmon::boton_regreso(array('clave_usar'=>$clave_seccion_enviada,'texto'=>regresar_opc_mod));\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$this->desconectarse($conexion);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}", "public function RegistrarMovimientoCajas()\n{\nself::SetNames();\nif(empty($_POST[\"tipomovimientocaja\"]) or empty($_POST[\"montomovimientocaja\"]) or empty($_POST[\"mediopagomovimientocaja\"]) or empty($_POST[\"codcaja\"]))\n{\n\techo \"1\";\n\texit;\n}\n\n$sql = \" SELECT * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja WHERE arqueocaja.codcaja = \".$_POST[\"codcaja\"].\" AND statusarqueo = '1'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"2\";\n\t\texit;\n\n\t} \n\telse if($_POST[\"montomovimientocaja\"]>0)\n{\n\t\n\n#################### AQUI AGREGAMOS EL INGRESO A ARQUEO DE CAJA ####################\n\t$sql = \"select montoinicial, ingresos, egresos from arqueocaja where codcaja = '\".$_POST[\"codcaja\"].\"'\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\t$inicial = $row['montoinicial'];\n\t$ingreso = $row['ingresos'];\n\t$egresos = $row['egresos'];\n\t$total = $inicial+$ingreso-$egresos;\n\n\tif($_POST[\"tipomovimientocaja\"]==\"INGRESO\"){\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" ingresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $ingresos);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$ingresos = rount($_POST[\"montomovimientocaja\"]+$ingreso,2);\n\t\t$codcaja = strip_tags($_POST[\"codcaja\"]);\n\t\t$stmt->execute();\n\n\t\t$query = \" insert into movimientoscajas values (null, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t$stmt = $this->dbh->prepare($query);\n\t\t$stmt->bindParam(1, $tipomovimientocaja);\n\t\t$stmt->bindParam(2, $montomovimientocaja);\n\t\t$stmt->bindParam(3, $mediopagomovimientocaja);\n\t\t$stmt->bindParam(4, $codcaja);\n\t\t$stmt->bindParam(5, $descripcionmovimientocaja);\n\t\t$stmt->bindParam(6, $fechamovimientocaja);\n\t\t$stmt->bindParam(7, $codigo);\n\n\t\t$tipomovimientocaja = strip_tags($_POST[\"tipomovimientocaja\"]);\n\t\t$montomovimientocaja = strip_tags($_POST[\"montomovimientocaja\"]);\n\t\t$mediopagomovimientocaja = strip_tags($_POST[\"mediopagomovimientocaja\"]);\n\t\t$codcaja = strip_tags($_POST[\"codcaja\"]);\n\t\t$descripcionmovimientocaja = strip_tags($_POST[\"descripcionmovimientocaja\"]);\n\t\t$fechamovimientocaja = strip_tags(date(\"Y-m-d h:i:s\",strtotime($_POST['fecharegistro'])));\n\t\t$codigo = strip_tags($_SESSION[\"codigo\"]);\n\t\t$stmt->execute();\n\n\t} else {\n\n\t\tif($_POST[\"montomovimientocaja\"]>$total){\n\t\t\n\t\techo \"3\";\n\t\texit;\n\n\t} else {\n\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" egresos = ? \"\n\t\t.\" where \"\n\t\t.\" codcaja = ? and statusarqueo = '1';\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $egresos);\n\t\t$stmt->bindParam(2, $codcaja);\n\n\t\t$egresos = rount($_POST[\"montomovimientocaja\"]+$egresos,2);\n\t\t$codcaja = strip_tags($_POST[\"codcaja\"]);\n\t\t$stmt->execute();\n\n\t\t$query = \" insert into movimientoscajas values (null, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t$stmt = $this->dbh->prepare($query);\n\t\t$stmt->bindParam(1, $tipomovimientocaja);\n\t\t$stmt->bindParam(2, $montomovimientocaja);\n\t\t$stmt->bindParam(3, $mediopagomovimientocaja);\n\t\t$stmt->bindParam(4, $codcaja);\n\t\t$stmt->bindParam(5, $descripcionmovimientocaja);\n\t\t$stmt->bindParam(6, $fechamovimientocaja);\n\t\t$stmt->bindParam(7, $codigo);\n\n\t\t$tipomovimientocaja = strip_tags($_POST[\"tipomovimientocaja\"]);\n\t\t$montomovimientocaja = strip_tags($_POST[\"montomovimientocaja\"]);\n\t\t$mediopagomovimientocaja = strip_tags($_POST[\"mediopagomovimientocaja\"]);\n\t\t$codcaja = strip_tags($_POST[\"codcaja\"]);\n\t\t$descripcionmovimientocaja = strip_tags($_POST[\"descripcionmovimientocaja\"]);\n\t\t$fechamovimientocaja = strip_tags(date(\"Y-m-d h:i:s\",strtotime($_POST['fecharegistro'])));\n\t\t$codigo = strip_tags($_SESSION[\"codigo\"]);\n\t\t$stmt->execute();\n\n\t }\n\n\t}\n\necho \"<div class='alert alert-success'>\";\necho \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\necho \"<span class='fa fa-check-square-o'></span> EL MOVIMIENTO DE CAJA FUE REGISTRADO EXITOSAMENTE\";\necho \"</div>\";\t\t\nexit;\n }\n else\n {\n\techo \"4\";\n\texit;\n }\n}", "function atuOrcreceitaval($codrec,$mes,$valor){\n $msg = \"0|Registro Atualizado !\";\n $clorcreceitaval = new cl_orcreceitaval;\t\t\n $clorcreceita = new cl_orcreceita;\t\t\n if ($mes == 0 || $mes =='0' || $mes === 0){\n // ajusta o saldo previsto\n\t$clorcreceita->o70_valor = $valor;\n\t$clorcreceita->o70_codrec= $codrec;\n\t$clorcreceita->o70_anousu= db_getsession(\"DB_anousu\");\n $rr= $clorcreceita->alterar(db_getsession(\"DB_anousu\"),$codrec);\n\tif ($clorcreceita->erro_status==='0'){\n\t $msg = \"1|\".$clorcreceita->erro_msg;\n\t}else {\n\t $msg = \"0|\".$clorcreceita->erro_msg; \n\t} \n return $msg;\n } \n if ($valor > 0){\n $clorcreceitaval->o71_coddoc = 100; \n }else{\n $clorcreceitaval->o71_coddoc = 101; \n }\n $clorcreceitaval->o71_anousu = db_getsession(\"DB_anousu\"); \n $clorcreceitaval->o71_mes = $mes; \n $clorcreceitaval->o71_codrec = $codrec;\n $clorcreceitaval->o71_valor = $valor; \n\n\n $rr = $clorcreceitaval->sql_record($clorcreceitaval->sql_query_file(db_getsession(\"DB_anousu\"),$codrec,$clorcreceitaval->o71_coddoc,$mes));\n if ($clorcreceitaval->numrows >0){\n $clorcreceitaval->alterar($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n\n } else { \n $clorcreceitaval->incluir($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n }\t \n \n $erro = $clorcreceitaval->erro_msg;\n if ($clorcreceitaval->erro_status===0){\n $msg= \"1|\".$erro;\n\treturn $msg;\n } else {\n $msg = \"0|\".$clorcreceitaval->erro_msg;\n return $msg;\n }\n}", "function ProjetosRealizados() {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd1 = 1;\n }else{\n $qtd1 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd1);\n\n if($porcentagem==100) {\n $count++;\n }\n }\n\n return $count;\n}", "function valida_ingreso_ambulatorio_modo_1($id_comprobante,$prestacion,$cantidad){\n\t$query=\"select codigo from facturacion.nomenclador \n\t\t\twhere id_nomenclador='$prestacion'\";\t \n\t$res_codigo_nomenclador=sql($query, \"Error 1\") or fin_pagina();\t\n\t$codigo=$res_codigo_nomenclador->fields['codigo'];\n\t\n\tif(trim($codigo) == 'CT-C021'){\n\t\t//debo saber si alguna vez se al facturo beneficiario el \"CT-C020\"\n\t\t\n\t\t//traigo el id_smiafiliados para buscar el codigo \"CT-C020\"\n\t\t$query=\"select id_smiafiliados from facturacion.comprobante \n\t\t\t\twhere id_comprobante='$id_comprobante'\";\t \n\t\t$res_codigo_nomenclador=sql($query, \"Error 1\") or fin_pagina();\t\n\t\t$id_smiafiliados=$res_codigo_nomenclador->fields['id_smiafiliados'];\n\t\t\n\t\t//busco el codigo \"CT-C020\"\n\t\t$query=\"SELECT id_prestacion\t\t\t\t\n\t\t\t\tFROM nacer.smiafiliados\n \t\t\t\tINNER JOIN facturacion.comprobante ON (nacer.smiafiliados.id_smiafiliados = facturacion.comprobante.id_smiafiliados)\n \t\t\t\tINNER JOIN facturacion.prestacion ON (facturacion.comprobante.id_comprobante = facturacion.prestacion.id_comprobante)\n \t\t\t\tINNER JOIN facturacion.nomenclador ON (facturacion.prestacion.id_nomenclador = facturacion.nomenclador.id_nomenclador)\n \t\t\t\twhere smiafiliados.id_smiafiliados='$id_smiafiliados' and codigo='CT-C020'\";\n \t\t$cant_pres=sql($query, \"Error 3\") or fin_pagina();\n \t\tif ($cant_pres->RecordCount()>=1)return 1;\n \t\telse return 0;\n\t}\n\telse return 1;\n}", "public function totalRegistros();", "function guardar_receta($objeto){\n\t// Anti hack\n\t\tforeach ($objeto as $key => $value) {\n\t\t\t$datos[$key]=$this->escapalog($value);\n\t\t}\n\n\t// Guarda la receta y regresa el ID\n\t\t$sql=\"\tINSERT INTO\n\t\t\t\t\tcom_recetas\n\t\t\t\t\t\t(id, nombre, precio, ganancia, ids_insumos, ids_insumos_preparados, preparacion)\n\t\t\t\tVALUES\n\t\t\t\t\t(\".$datos['id_receta'].\", '\".$datos['nombre'].\"',\".$datos['precio_venta'].\",\n\t\t\t\t\t\t\".$datos['margen_ganancia'].\",\n\t\t\t\t\t\t'\".$datos['ids'].\"','\".$datos['ids_preparados'].\"','\".$datos['preparacion'].\"'\n\t\t\t\t\t)\";\n\t\t// return $sql;\n\t\t$result =$this->insert_id($sql);\n\n\t// Guarda la actividad\n\t\t$fecha=date('Y-m-d H:i:s');\n\n\t\t$texto = ($datos['tipo']==1) ? 'receta' : 'insumo preparado' ;\n\t// Valida que exista el empleado si no agrega un cero como id\n\t\t$usuario = (!empty($_SESSION['accelog_idempleado'])) ?$_SESSION['accelog_idempleado'] : 0 ;\n\t\t$sql=\"\tINSERT INTO\n\t\t\t\t\tcom_actividades\n\t\t\t\t\t\t(id, empleado, accion, fecha)\n\t\t\t\tVALUES\n\t\t\t\t\t('',\".$usuario.\",'Agrega \".$texto.\"', '\".$fecha.\"')\";\n\t\t$actividad=$this->query($sql);\n\n\t\treturn $result;\n\t}", "function ReportRemissions($fechaInicion, $FechaFin, $buscar) {\n $where = '';\n if ($buscar != '')\n $where .= \" AND (rem.rem_codigo = '\" . $buscar . \"' OR c.cli_nombre_empresa like '%\" . $buscar . \"%' OR rem.rem_total = '\" . $buscar . \"')\";\n\n $sql = 'SELECT rem.*,rd.remd_cantidad AS cantidad\n FROM remisiones rem,\n cliente c, \n usuario u,\n remisiones_detalle rd \n WHERE \n rem.rem_fecha >=\"' . $fechaInicion . '\" \n\t\t\t\tAND rem.rem_fecha <=\"' . $FechaFin . '\" \n AND rem.cli_codigo = c.cli_codigo \n AND rem.usu_codigo = u.usu_codigo\n\t\t\t\tAND rem.rem_estado = 1\n AND rem.rem_anulada = \"No\"\n\t\t\t\t' . $where . '\n\t\t\t\tGROUP BY rem.rem_codigo ORDER BY rem.rem_codigo DESC';\n// echo $sql;die();\n\n $stmt = $this->getEntityManager()\n ->getConnection()\n ->prepare($sql);\n $stmt->execute();\n $data = $stmt->fetchAll();\n return $data;\n }", "function RellenarDesarrolloReunion()\r\n {\r\n $i = 1;\r\n\r\n foreach ($this->eventos as $evento)\r\n {\r\n if (Doctrine_Core::getTable('SAF_EVENTO_CONVOCATORIA')->getEventoConvocatoria($evento, $this->convocatoria)->getStatus() == 'analizado')\r\n {\r\n $this->AddPage();\r\n\r\n if ($i == 1)\r\n {\r\n $i++;\r\n $this->Imprimir('DESARROLLO DE LA REUNIÓN', 10, 12, 18);\r\n }\r\n\r\n $this->RellenarDescripcionDelEvento($evento);\r\n\r\n $this->RellenarFotosDelEvento($evento);\r\n\r\n $this->RellenarRazonesDelEvento($evento);\r\n\r\n $varios = Doctrine_Core::getTable('SAF_VARIO')->findByIdEvento($evento->getID());\r\n\r\n $this->RellenarBitacoraDelEvento($varios);\r\n\r\n $this->RellenarAccionesYRecomendacionesDelEvento($varios);\r\n\r\n $this->RellenarCompromisosDelEvento($varios);\r\n }\r\n }\r\n }", "private function aprobarDetalleSolicitud()\r\n {\r\n $result = false;\r\n $idGenerado = 0;\r\n // modelo de InscripcionSucursal.\r\n $modelInscripcion = self::findInscripcionSucursal();\r\n if ( $modelInscripcion !== null ) {\r\n if ( $modelInscripcion['id_contribuyente'] == $this->_model->id_contribuyente ) {\r\n $result = self::updateSolicitudInscripcion($modelInscripcion);\r\n if ( $result ) {\r\n $idGenerado = self::crearContribuyente($modelInscripcion);\r\n if ( $idGenerado > 0 ) {\r\n $result = true;\r\n } else {\r\n $result = false;\r\n }\r\n }\r\n } else {\r\n self::setErrors(Yii::t('backend', 'Error in the ID of taxpayer'));\r\n }\r\n } else {\r\n self::setErrors(Yii::t('backend', 'Request not find'));\r\n }\r\n\r\n return $result;\r\n }", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlEliminarVenta($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function borrarrepetidosvaloresin($idmodelodetalle,$iddetalleingreso,$cantidadm,$iddetalleingreso,$tallafin,$tallafinal1,$talla1,$return = false ){\n //$sql[] = \"UPDATE historialkardextienda SET precio2bs='$precionuevo' WHERE idcalzado = '$iddetalleingreso'; \";\n $sqlA[] = \"UPDATE adicionkardextienda SET saldocantidad='$cantidadm',cantidad='$cantidadm',generado='0' ,fallado='1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND (talla='$tallafin' OR talla='$tallafinal1');\";\n\n//MostrarConsulta($sqlA);\n ejecutarConsultaSQLBeginCommit($sqlA);\n}", "public function publicacaoReabrir()\r\n {\r\n try\r\n {\r\n $resposta = $this->conexao->Conectar()->prepare(\"UPDATE tbmissao SET id_usuario_concluir = null, data_conclusao = null, status = 0, data = NOW(), conclusao = null\"\r\n . \" WHERE id_missao = ?\");\r\n $resposta->bindValue(1, $this->getIdMissao(), PDO::PARAM_STR);\r\n //$resposta->bindValue(3, $this->getData(), PDO::PARAM_STR);\r\n if($resposta->execute())\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n catch (PDOException $e)\r\n {\r\n return $e->getMenssage();\r\n }\r\n }", "function comprobarTodasColecciones($todasColecciones,$sudoKeys){\r\n $erroresColeccion = [];\r\n for($i=0;$i<count($todasColecciones);$i++){\r\n if(comprobarColeccion($todasColecciones[$i],$sudoKeys)!=\"correcto\"){\r\n //print(\"mal\");\r\n //$aux=comprobarFila($todasColecciones[$i],$sudoKeys);\r\n //array_merge($erroresColeccion,$aux);\r\n $erroresColeccion = array_merge($erroresColeccion,comprobarColeccion($todasColecciones[$i],$sudoKeys));\r\n }else{\r\n //print(\"Estamos bien\");\r\n }\r\n }\r\n \r\n return array_unique($erroresColeccion);\r\n }", "public function actionActRecargas($compania)\n\t{\n\t\t$fecha=date(\"Y-m\").\"-01\";\n\t\t$idBalancesActualizados=array();\n\t\t//traigo el id de la compania\n\t\t$idCompania=Compania::model()->find('nombre=:nombre',array(':nombre'=>$compania))->id;\n\t\t//traigo el id de pabringhtstar\n\t\t$idPabrightstar=Pabrightstar::getIdPorDia(null,$idCompania);\n\t\t//verificar recargas del dia\n\t\t$recargas=Recargas::getMontoRecargaPorDia(null,$idPabrightstar);\n\t\t//verificar saldo de la plataforma administrativa\n\t\t$saldoNeto=Pabrightstar::getSaldoPorDia(null,$idCompania);\n\t\t//conciliar con las recargas pasadas por formulario\n\t\t$balances=Balance::model()->findAll(\"Fecha >=:fecha order by Id asc\",array(':fecha'=>$fecha));\n\t\tif(!empty($_POST))\n {\n \t$array=array();\n \tforeach ($balances as $balance)\n \t{\n \t\tif(!empty($_POST[$compania.$balance->Id]))\n \t\t{\n \t\t\t$array[$balance->Id]=$_POST[$compania.$balance->Id];\n \t\t}\n \t}\n \tif($saldoNeto>=array_sum($array))\n \t{\n \t\tforeach ($balances as $balance)\n \t\t{\n \t\t\tif(!empty($_POST[$compania.$balance->Id]) && is_numeric($_POST[$compania.$balance->Id]))\n \t\t\t{\n \t\t\t\t$recarga=new Recargas;\n \t\t\t\t$recarga->FechaHora=date(\"Y-m-d G:i:s\");\n \t\t\t\t$recarga->MontoRecarga=$_POST[$compania.$balance->Id];\n \t\t\t\t$recarga->BALANCE_Id=$balance->Id;\n \t\t\t\t$recarga->PABRIGHTSTAR_Id=$idPabrightstar;\n \t\t\t\tif($recarga->save())\n \t\t\t\t{\n \t\t\t\t\tarray_push($idBalancesActualizados,$balance->Id);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \telse\n \t{\n Yii::app()->user->setFlash('error',\"El monto total de recargas debe ser menor o igual al disponible\");\n \t\t$this->redirect(\"/recargas/pronostico/\".$compania);\n \t}\n }\n $model=new Balance;\n $this->render('recargas',array('model'=>$model,'compania'=>$compania, 'idCompania'=>$idCompania, 'idBalancesActualizados'=>$idBalancesActualizados));\n\t}", "public function RegistreVenta($idVentaActiva,$TipoVenta,$CuentaDestino,$Comision,$Comisionista)\r\n {\r\n \r\n $fecha=date(\"Y-m-d\");\r\n $Hora=date(\"H:i:s\");\r\n \r\n //////// Averiguamos el ultimo numero de venta/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"ventas\");\r\n$maxID=$this->VerUltimoID();\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumVenta=$campos[\"NumVenta\"];\r\n$NumVenta=$NumVenta+1;\r\n\r\n//////// Averiguamos el ultimo numero de factura/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"facturas\");\r\n$maxID=$this->VerUltimoID();\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumFact=$campos[\"idFacturas\"];\r\n$NumFact=$NumFact+1;\r\n\r\n//////// Averiguamos el ultimo numero de cotizacion/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"cotizaciones\");\r\n$maxID=$this->VerUltimoID();\r\n$idCoti=$maxID+1;\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumCot=$campos[\"NumCotizacion\"];\r\n$NumCot=$NumCot+1;\r\n\r\n//print(\"max id de ventas: $maxID, Numero de Venta: $NumVenta\");\r\n\r\n$DatosVentaActiva=mysql_query(\"SELECT * FROM vestasactivas WHERE idVestasActivas='$idVentaActiva';\", $this->con) or die('problemas para consultas vestasactivas: ' . mysql_error());\r\n$DatosVentaActiva=mysql_fetch_array($DatosVentaActiva);\r\n$idCliente=$DatosVentaActiva[\"Clientes_idClientes\"];\r\n\r\n$registros=mysql_query(\"SELECT * FROM preventa WHERE VestasActivas_idVestasActivas='$idVentaActiva';\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n\r\n//$registros1=mysql_fetch_array($registros);\t\r\n\t\t\t//$this->NombresColumnas(\"productosventa\");\r\n\t\t\tif(mysql_num_rows($registros)){\r\n\t\t\t\t$i=0;\r\n\t\t\t\t//print($i);\r\n\t\t\t\t\r\n\t\t\t\twhile($registros2=mysql_fetch_array($registros)){\r\n\t\t\t\t\t$i++;\t\t\t\r\n\t\t\t\t\t//print(\"fila $i:///////////////////////////////////////////////////////////////<br>\");\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t//print_r($registros2);\r\n\t\t\t\t\t$this->NombresColumnas(\"productosventa\");\r\n\t\t\t\t\t$idProducto=$registros2[\"ProductosVenta_idProductosVenta\"];\r\n\t\t\t\t\t$campos=$this->DevuelveValores($idProducto);\r\n\t\t\t\t\t$TotalVenta=$registros2[\"TotalVenta\"]+$registros2[\"Descuento\"];\r\n\t\t\t\t\t$IVA=$registros2[\"Impuestos\"];\r\n\t\t\t\t\t$TotalCostoP=$registros2[\"Cantidad\"]*$campos[\"CostoUnitario\"]; \r\n\t\t\t\t\t////////empezamos a formar el registro que se hará en ventas empezamos desde porque el id es autoincrement y el numcuentapuc es conocido\r\n\t\t\t\t\t\r\n\t\t\t\t\t$CamposVenta[2]=$NumVenta;\r\n\t\t\t\t\t$CamposVenta[3]=$fecha;\r\n\t\t\t\t\t$CamposVenta[4]=$idProducto;\r\n\t\t\t\t\t$CamposVenta[5]=$campos[\"Nombre\"];\r\n\t\t\t\t\t$CamposVenta[6]=$campos[\"Referencia\"];\r\n\t\t\t\t\t$CamposVenta[7]=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$CamposVenta[8]=$campos[\"CostoUnitario\"];\r\n\t\t\t\t\t$CamposVenta[9]=$registros2[\"ValorAcordado\"];\r\n\t\t\t\t\t$CamposVenta[10]=$registros2[\"Impuestos\"];\r\n\t\t\t\t\t$CamposVenta[11]=$registros2[\"Descuento\"];\r\n\t\t\t\t\t$CamposVenta[12]=$registros2[\"Cantidad\"]*$campos[\"CostoUnitario\"]; //Total costo\r\n\t\t\t\t\t$CamposVenta[13]=$TotalVenta;\r\n\t\t\t\t\t$CamposVenta[14]=$TipoVenta;\r\n\t\t\t\t\t$CamposVenta[15]=\"NO\"; //cerrado en periodo\r\n\t\t\t\t\t$CamposVenta[16]=$campos[\"Especial\"];\r\n\t\t\t\t\t$CamposVenta[17]=$idCliente;\r\n\t\t\t\t\t$CamposVenta[18]=$Hora;\r\n\t\t\t\t\t$CamposVenta[19]=$registros2[\"Usuarios_idUsuarios\"];\r\n\t\t\t\t\t$CamposVenta[20]=$NumFact;\r\n\t\t\t\t\t//print_r($CamposVenta);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Inserto el registro en la tabla ventas\r\n\t\t\t\t\tif($TipoVenta==\"Credito\" and $idCliente==0)\r\n\t\t\t\t\t\texit(\"Usted está intentando Registrar una venta a credito sin seleccionar un cliente, por favor asignelo a esta venta antes de continuar\");\r\n\t\t\t\t\telse\t\r\n\t\t\t\t\t\t$this->GuardaRegistroVentas(\"ventas\", $CamposVenta);\r\n\t\t\t\t\t///////////////////////////Registro el movimiento de SALIDA DE LA VENTA de los productos al Kardex\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Movimiento=\"SALIDA\";\r\n\t\t\t\t\t$Detalle=\"VENTA\";\r\n\t\t\t\t\t$idDocumento=$NumVenta;\r\n\t\t\t\t\t$Cantidad=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$ValorUnitario=$campos[\"CostoUnitario\"];\r\n\t\t\t\t\t$ValorTotalSalidas=round($Cantidad*$ValorUnitario);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->RegistrarKardex(\"kardexmercancias\",\"ProductosVenta_idProductosVenta\",$fecha, $Movimiento, $Detalle, $idDocumento, $Cantidad, $ValorUnitario, $ValorTotalSalidas, $idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Registro el movimiento de SALDOS DESPUES DE LA VENTA de los productos al Kardex\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Movimiento=\"SALDOS\";\r\n\t\t\t\t\t$CantidadSaldo=$campos[\"Existencias\"];\r\n\t\t\t\t\t$NuevoSaldo=$CantidadSaldo-$Cantidad;\r\n\t\t\t\t\t$ValorTotal=$NuevoSaldo*$ValorUnitario;\r\n\t\t\t\t\t$this->RegistrarKardex(\"kardexmercancias\",\"ProductosVenta_idProductosVenta\",$fecha, $Movimiento, $Detalle, $idDocumento, $NuevoSaldo, $ValorUnitario, $ValorTotal, $idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Actualiza tabla de productos venta\r\n\t\t\t\t\t\r\n\t\t\t\t\t$tabla=\"productosventa\";\r\n\t\t\t\t\t$NumRegistros=1;\r\n\t\t\t\t\t$Columnas[0]=\"Existencias\";\r\n\t\t\t\t\t//$Columnas[1]=\"CostoUnitario\";\r\n\t\t\t\t\t//$Columnas[2]=\"CostoTotal\";\r\n\t\t\t\t\t$Valores[0]=$NuevoSaldo;\r\n\t\t\t\t\t//$Valores[1]=$ValorUnitario;\r\n\t\t\t\t\t//$Valores[2]=$ValorTotal;\r\n\t\t\t\t\t$Filtro=\"idProductosVenta\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->EditeValoresTabla($tabla,$NumRegistros,$Columnas,$Valores,$Filtro,$idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Ingresar a Cotizaciones \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$tabla=\"cotizaciones\";\r\n\t\t\t\t\t$NumRegistros=16; \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Columnas[0]=\"Fecha\";\t\t\t\t\t$Valores[0]=$fecha;\r\n\t\t\t\t\t$Columnas[1]=\"NumCotizacion\";\t\t\t$Valores[1]=$NumCot;\r\n\t\t\t\t\t$Columnas[2]=\"Descripcion\";\t\t\t\t$Valores[2]=$campos[\"Nombre\"];\r\n\t\t\t\t\t$Columnas[3]=\"Referencia\";\t\t\t\t$Valores[3]=$campos[\"Referencia\"];\r\n\t\t\t\t\t$Columnas[4]=\"ValorUnitario\";\t\t\t$Valores[4]=$registros2[\"ValorAcordado\"];\r\n\t\t\t\t\t$Columnas[5]=\"Cantidad\";\t\t\t\t$Valores[5]=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$Columnas[6]=\"Subtotal\";\t\t\t\t$Valores[6]=$registros2[\"Subtotal\"];\r\n\t\t\t\t\t$Columnas[7]=\"IVA\";\t\t\t\t\t\t$Valores[7]=$IVA;\r\n\t\t\t\t\t$Columnas[8]=\"Total\";\t\t\t\t\t$Valores[8]=round($registros2[\"Subtotal\"]+$IVA);\r\n\t\t\t\t\t$Columnas[9]=\"Descuento\";\t\t\t\t$Valores[9]=0;\r\n\t\t\t\t\t$Columnas[10]=\"ValorDescuento\";\t\t\t$Valores[10]=$registros2[\"Descuento\"];\r\n\t\t\t\t\t$Columnas[11]=\"Clientes_idClientes\";\t$Valores[11]=$idCliente;\r\n\t\t\t\t\t$Columnas[12]=\"Usuarios_idUsuarios\";\t$Valores[12]=$registros2[\"Usuarios_idUsuarios\"];\r\n\t\t\t\t\t$Columnas[13]=\"TipoItem\";\t\t\t\t$Valores[13]=\"PR\";\r\n\t\t\t\t\t$Columnas[14]=\"PrecioCosto\";\t\t\t$Valores[14]=round($campos[\"CostoUnitario\"]);\r\n\t\t\t\t\t$Columnas[15]=\"SubtotalCosto\";\t\t\t$Valores[15]=round($campos[\"CostoUnitario\"]*$registros2[\"Cantidad\"]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->InsertarRegistro($tabla,$NumRegistros,$Columnas,$Valores);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t}\r\nreturn($NumVenta);\t\r\n//echo \"Venta Registrada\";\r\n\r\n}", "public function probarRegla($memoria){\n //contador\n $contador = 1;\n //contador array resultados\n $contadorArrayRes = 0;\n //guardamos los resultados pasados\n $arrayResultados = [];\n\n //checamos las condicines de la regla a ver si genera otro atomo\n foreach ($this->conectoresLogicos as $conector) {\n /* si nuestra regla solo tiene dos atomos usamos el primer if\n si tiene mas atomos usamos el else\n */\n if($contador <= 1){\n //switch con el tipo de conector logico por el que se itere\n switch ($conector) {\n case '|':\n //checamos si el atomo esta en la memoria de trabajo (puede estar tan solo 1 para que sea true)\n if($memoria->atomoPresente($this->reglaAtomos[$contador - 1]) || $memoria->atomoPresente($this->reglaAtomos[$contador])){\n $arrayResultados[] = true;\n }\n else {\n $arrayResultados[] = false;\n }\n break;\n case '&':\n //tienen que estar los dos atomos en la memoria para que sea true\n if($memoria->atomoPresente($this->reglaAtomos[$contador - 1]) && $memoria->atomoPresente($this->reglaAtomos[$contador])){\n $arrayResultados[] = true;\n }\n else {\n $arrayResultados[] = false;\n }\n break;\n }\n //aumentamos contador\n $contador+=$contador;\n }\n //si se tienen mas de dos atomos o mas de dos conectores logicos\n else {\n\n //switch con el tipo de conector logico por el que se itere\n switch ($conector) {\n case '|':\n //checamos si el atomo esta en la memoria de trabajo (puede estar tan solo 1 para que sea true)\n if($arrayResultados[$contadorArrayRes] || $memoria->atomoPresente($this->reglaAtomos[$contador])){\n $arrayResultados[] = true;\n }\n else {\n $arrayResultados[] = false;\n }\n break;\n case '&':\n //tienen que estar los dos atomos en la memoria para que sea true\n if($arrayResultados[$contadorArrayRes] && $memoria->atomoPresente($this->reglaAtomos[$contador])){\n $arrayResultados[] = true;\n }\n else {\n $arrayResultados[] = false;\n }\n break;\n }\n //aumentamos contadores\n $contador++;\n $contadorArrayRes++;\n }\n }\n\n //regresamos true o false dependiendo si genera el atomo o no\n return end($arrayResultados);\n }", "public function LimpiarCarritoCompras(){\n\t\tif(isset($_POST['EliminarTodo'])):\n\t\t\t$TotalEliminar\t= filter_var($_POST['contadorx'], FILTER_VALIDATE_INT);\n\n\t\t\tfor($xrecibe = 1 ; $xrecibe<=$TotalEliminar; $xrecibe++):\n\t\t\t\t$IdEliminar\t= isset($_POST['IDS'.$xrecibe]) ? $_POST['IDS'.$xrecibe] : null;\n\t\t\t\t$IdProducto\t= filter_var($_POST['IdProducto'.$xrecibe], FILTER_VALIDATE_INT);\n\t\t\t\t$Cantidad\t= filter_var($_POST['cantidad'.$xrecibe], FILTER_VALIDATE_INT);\n\t\t\t\tif($IdEliminar!=\"\"):\n\t\t\t\t\t$EliminarQuery\t= $this->Conectar()->query(\"DELETE FROM `cajatmp` WHERE `id` ='{$IdEliminar}'\");\n\t\t\t\t\t$ActualizarQuery=$this->Conectar()->query(\"UPDATE `producto` SET `stock` = `stock`+{$Cantidad} WHERE `id`='{$IdProducto}'\");\n\n\t\t\t\t\tif($EliminarQuery && $ActualizarQuery == true):\n\t\t\t\t\t\techo'\n\t\t\t\t\t\t<div class=\"alert alert-dismissible alert-success\">\n\t\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>\n\t\t\t\t\t\t\t<strong>&iexcl;Bien hecho!</strong> Se ha eliminado la venta actual con exito.\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<meta http-equiv=\"refresh\" content=\"0;url='.URLBASE.'\"/>';\n\t\t\t\t\telse:\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"alert alert-dismissible alert-danger\">\n\t\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>\n\t\t\t\t\t\t\t<strong>&iexcl;Lo Sentimos!</strong> A ocurrido un error al eliminar la venta actual, intentalo de nuevo.\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<meta http-equiv=\"refresh\" content=\"0;url='.URLBASE.'\"/>';\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\tendfor;\n\t\tendif;\n\t}", "function actualizarCostos($id_vehiculo)\n {\n $sql = \"\n SELECT \n *\n FROM\n gastos\n WHERE \n id_vehiculo = '$id_vehiculo' AND\n eliminado = '0' \n \";\n \n $gastos = $this->getQuery($sql);\n $vehiculos = $this->getRegistros($id_vehiculo);\n \n foreach ($vehiculos as $row) \n {\n $_registro = array(\n 'precio_costo' => $row->precio_toma,\n 'id_calculo' => $row->id_calculo, \n 'calculo' => $row->calculo,\n );\n }\n \n // Suma Costo del Vehiculo\n if($gastos)\n {\n foreach ($gastos as $gasto) \n {\n if($gasto->aumenta_costo == 1)\n {\n $_registro['precio_costo'] = $_registro['precio_costo'] + $gasto->monto;\n }\n } \n }\n \n // Cambio de costos del vehiculo\n if($_registro['id_calculo'] == 1)\n {\n $porcentaje = $_registro['calculo'] * $_registro['precio_costo'] / 100;\n $_registro['precio_venta'] = $_registro['precio_costo'] + $porcentaje; \n }else if($_registro['id_calculo'] == 2)\n {\n $_registro['precio_venta'] = $_registro['precio_costo'] + $_registro['calculo'];\n }\n \n $where = array(\n 'id_vehiculo' => $id_vehiculo,\n ); \n \n $this->update($_registro, $where);\n }", "function contarPruebasAcuerdo1993027($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n if($reglamento['REG_REGLAMENTO']=='S'){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }", "static public function ctrRealizarPago($redireccion){\n\n\t\tif(isset($_POST[\"nuevoPago\"])){\n\n\t\t\t$adeuda = $_POST[\"adeuda\"]-$_POST[\"nuevoPago\"];\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t\n\n\t\t\t$fechaPago = explode(\"-\",$_POST[\"fechaPago\"]); //15-05-2018\n \t $fechaPago = $fecha[2].\"-\".$fecha[1].\"-\".$fecha[0];\n\n\t\t\t\n\n\t\t\t$datos = array(\"id\"=>$_POST[\"idPago\"],\n\t\t\t\t\t\t \"adeuda\"=>$adeuda,\n\t\t\t\t\t\t \"fecha\"=>$_POST[\"fechaPago\"]);\n\n\t\t\n\t\t\t\n\t\t\t$respuesta = ModeloVentas::mdlRealizarPago($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tlocalStorage.removeItem(\"rango\");\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido editada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"'.$redireccion.'\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\n\t\t}\n\n\n\t}", "static public function ctrEditarReceta(){\n\n if(isset($_POST[\"idProductoReceta\"])){\n\n if (preg_match('/^[0-9]+$/', $_POST[\"idProductoReceta\"])){\n\n $tabla = \"Receta\";\n $idProducto = $_POST[\"idProductoReceta\"];\n $idReceta = $_POST[\"idReceta\"];\n $listaInsumos = json_decode($_POST[\"listadoInsumos\"], true);\n\n $tablaRecetaDetalle = \"RecetaDetalle\";\n\n $eliminoDetalle = ModeloRecetas::mdlEliminarDetalleReceta($tablaRecetaDetalle, $idReceta);\n\n foreach ($listaInsumos as $key => $value) {\n \n $idInsumo = $value[\"idInsumo\"]; \n $Cantidad = $value[\"cantidadInsumo\"];\n \n $respuesta = ModeloRecetas::mdlRegistrarDetalleReceta($tablaRecetaDetalle, $idReceta, $idInsumo, $Cantidad);\n\n }\n\n if($respuesta = \"ok\"){\n\n echo'<script>\n swal({\n title:\"¡Registro Exitoso!\",\n text:\"¡La receta se modificó correctamente!\",\n type:\"success\",\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n },\n function(isConfirm){\n if(isConfirm){\n window.location=\"recetas\";\n }\n });\n </script>';\n\n }else{\n\n echo'<script>\n swal({\n title:\"¡Registro Fallido!\",\n text:\"¡Ocurrio un error, revise los datos!'.$respuesta.'\",\n type:\"error\",\n confirmButtonText:\"Cerrar\",\n closeOnConfirm: false\n });\n </script>';\n\n }\n\n \n\n } else {\n\n echo '<script>\n swal({\n title:\"¡Error!\",\n text:\"¡No ingrese caracteres especiales!\",\n type:\"warning\",\n confirmButtonText:\"Cerrar\",\n closeOnConfirm:false\n },\n function(isConfirm){\n if(isConfirm){\n window.location=\"recetas\";\n }\n });\n </script>';\n\n }\n\n } //if isset\n \n }", "public function getRegraLancamento($iCodigoDocumento, $iCodigoLancamento, ILancamentoAuxiliar $oLancamentoAuxiliar) {\n\n $iAno = db_getsession(\"DB_anousu\");\n $sChaveRegistryLancamentos = \"{iCodigoDocumento}{$iCodigoLancamento}\";\n $aDadosTransacao = array();\n\n if (!$aDadosTransacao = DBRegistry::get($sChaveRegistryLancamentos)) {\n\n $oDaoTransacao = db_utils::getDao('contranslr');\n $sWhere = \" c45_coddoc = {$iCodigoDocumento}\";\n $sWhere .= \" and c45_anousu = {$iAno}\";\n $sWhere .= \" and c46_seqtranslan = {$iCodigoLancamento}\";\n\n $sSqlTransacao = $oDaoTransacao->sql_query(null, \"*\", 'c47_compara asc', $sWhere);\n $rsTransacao = $oDaoTransacao->sql_record($sSqlTransacao);\n if ($oDaoTransacao->numrows > 0) {\n\n $aDadosTransacao = db_utils::getCollectionByRecord($rsTransacao);\n DBRegistry::add($sChaveRegistryLancamentos, $aDadosTransacao);\n }\n }\n\n $aTransacoes = array();\n foreach ($aDadosTransacao as $oDadosTransacao) {\n\n switch ($oDadosTransacao->c46_ordem) {\n\n case 1:\n\n if ($oDadosTransacao->c47_compara == 4 ) {\n\n if ($oDadosTransacao->c47_ref == $oLancamentoAuxiliar->getCodigoContaOrcamento()) {\n\n $iContaCredito = $oDadosTransacao->c47_credito;\n $iContaDebito = $oLancamentoAuxiliar->getContaDebito();\n if ($oLancamentoAuxiliar->isEstorno()) {\n\n $iContaDebito = $oDadosTransacao->c47_debito;\n $iContaCredito = $oLancamentoAuxiliar->getContaCredito();\n }\n $oRegraLancamentoContabil = new RegraLancamentoContabil();\n $oRegraLancamentoContabil->setContaCredito($iContaCredito);\n $oRegraLancamentoContabil->setContaDebito($iContaDebito);\n $aTransacoes[] = $oRegraLancamentoContabil;\n }\n } else {\n\n $oRegraLancamentoContabil = new RegraLancamentoContabil();\n $oRegraLancamentoContabil->setContaCredito($oLancamentoAuxiliar->getContaCredito());\n $oRegraLancamentoContabil->setContaDebito($oLancamentoAuxiliar->getContaDebito());\n $aTransacoes[] = $oRegraLancamentoContabil;\n }\n break;\n\n case 2:\n\n if(count($aDadosTransacao) == 1) {\n\n $aTransacoes[] = new RegraLancamentoContabil($oDadosTransacao->c47_seqtranslr);\n break;\n }\n\n $oReceitaContabil = ReceitaContabilRepository::getReceitaByCodigo($oLancamentoAuxiliar->getCodigoReceita(), $iAno);\n $sEstrutural = substr($oReceitaContabil->getContaOrcamento()->getEstrutural(), 0, 3);\n\n if ($oDadosTransacao->c47_compara == RegraLancamentoContabil::COMPARA_CP_IGUAL) {\n\n if ($sEstrutural == \"917\" && $oReceitaContabil->getCaracteristicaPeculiar() == $oDadosTransacao->c47_ref) {\n return new RegraLancamentoContabil($oDadosTransacao->c47_seqtranslr);\n } else if ($sEstrutural[0] == \"9\" && $oReceitaContabil->getCaracteristicaPeculiar() == $oDadosTransacao->c47_ref) {\n return new RegraLancamentoContabil($oDadosTransacao->c47_seqtranslr);\n }\n }\n\n if ($oDadosTransacao->c47_compara == RegraLancamentoContabil::COMPARA_CP_DIFERENTE) {\n\n if ($sEstrutural[0] == \"9\" && ($oReceitaContabil->getCaracteristicaPeculiar() != $oDadosTransacao->c47_ref)) {\n return new RegraLancamentoContabil($oDadosTransacao->c47_seqtranslr);\n }\n }\n\n if ($sEstrutural[0] != \"9\" && $oDadosTransacao->c47_compara == 0) {\n return new RegraLancamentoContabil($oDadosTransacao->c47_seqtranslr);\n }\n\n break;\n\n default:\n\n $oEventoContabilLancamento = EventoContabilLancamentoRepository::getEventoByCodigo($oDadosTransacao->c46_seqtranslan);\n if (count($oEventoContabilLancamento->getRegrasLancamento()) > 1) {\n\n $sMensagemException = \"Mais de uma conta débito/crédito configurada para o \";\n $sMensagemException .= \"lançamento [{$iCodigoLancamento}] de ordem {$oDadosTransacao->c46_ordem}.\";\n throw new BusinessException($sMensagemException);\n }\n $aTransacoes[] = new RegraLancamentoContabil($oDadosTransacao->c47_seqtranslr);\n\n }\n }\n\n if (count($aTransacoes) > 1) {\n\n $sMensagemException = \"Mais de uma conta débito/crédito Encontradas para \";\n $sMensagemException .= \"lançamento [{$iCodigoLancamento}] do documento {$iCodigoDocumento}.\";\n throw new BusinessException($sMensagemException);\n }\n\n /**\n * Nao encontrou regra de lancamento para o documento\n */\n if (count($aTransacoes) == 0) {\n return false;\n }\n\n return $aTransacoes[0];\n }", "function _revisar_proyectos($id_estructura, $yearpoa)\r\n {\r\n $estructura= \" where id_estructura=$id_estructura \";\r\n $aprobado=true;\r\n $proyectos=$this->Proyectos->listar_proyectos($estructura,$yearpoa); \r\n if ($proyectos->num_rows()==0) return $aprobado;\r\n \r\n foreach ($proyectos->result() as $p)\r\n {\r\n $r = $this->comunes->analisis_proyecto($p->monto_aprobado, $p->total, $p->estatus);\r\n $aprobado= ($aprobado and $r['ok']);\r\n } \r\n \r\n return $aprobado;\r\n }", "function modificarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_ime';\n\t\t$this->transaccion='ADQ_PROC_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_proceso_compra','id_proceso_compra','int4');\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t$this->setParametro('num_convocatoria','num_convocatoria','varchar');\n\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('fecha_ini_proc','fecha_ini_proc','date');\n\t\t$this->setParametro('obs_proceso','obs_proceso','varchar');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('num_tramite','num_tramite','varchar');\n\t\t$this->setParametro('codigo_proceso','codigo_proceso','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('num_cotizacion','num_cotizacion','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function modificarSolicitudObligacionPago()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_ime';\r\n $this->transaccion = 'TES_SOOBPG_MOD';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\r\n $this->setParametro('id_proveedor', 'id_proveedor', 'int4');\r\n $this->setParametro('tipo_obligacion', 'tipo_obligacion', 'varchar');\r\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\r\n $this->setParametro('obs', 'obs', 'varchar');\r\n $this->setParametro('porc_retgar', 'porc_retgar', 'numeric');\r\n $this->setParametro('id_subsistema', 'id_subsistema', 'int4');\r\n $this->setParametro('id_funcionario', 'id_funcionario', 'int4');\r\n $this->setParametro('porc_anticipo', 'porc_anticipo', 'numeric');\r\n $this->setParametro('fecha', 'fecha', 'date');\r\n $this->setParametro('id_depto', 'id_depto', 'int4');\r\n $this->setParametro('tipo_cambio_conv', 'tipo_cambio_conv', 'numeric');\r\n $this->setParametro('pago_variable', 'pago_variable', 'varchar');\r\n\r\n $this->setParametro('total_nro_cuota', 'total_nro_cuota', 'int4');\r\n $this->setParametro('fecha_pp_ini', 'fecha_pp_ini', 'date');\r\n $this->setParametro('rotacion', 'rotacion', 'int4');\r\n $this->setParametro('id_plantilla', 'id_plantilla', 'int4');\r\n\r\n $this->setParametro('tipo_anticipo', 'tipo_anticipo', 'varchar');\r\n $this->setParametro('id_contrato', 'id_contrato', 'int4');\r\n\r\n //$this->setParametro('id_funcionario_responsable','id_funcionario_responsable','int4');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function verPuntosConductor ($id_User){\r\n $this->db->query(\"SELECT * FROM viaje WHERE conductor_id = '$id_User' AND borrado_logico='-1'\");\r\n $res1 = $this->db->registrorowCount();\r\n $this->db->query(\"SELECT SUM(b.calificacion_conductor) AS suma \r\n FROM viaje a LEFT JOIN pasajero b ON a.id = b.viaje_id\r\n WHERE a.conductor_id = '$id_User'\r\n \");\r\n $suma = $this->db->registro()->suma - $res1;\r\n return $suma;\r\n }", "public function requisicaoAction() {\n\n $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();\n $oContribuinte = $this->_session->contribuinte;\n $iInscricaoMunicipal = $oContribuinte->getInscricaoMunicipal();\n $aServicos = Contribuinte_Model_Servico::getByIm($iInscricaoMunicipal);\n\n // Verifica se a empresa é prestadora de serviços\n if ($aServicos == NULL || empty($aServicos)) {\n\n $this->view->sMensagemBloqueio = $this->translate->_('Empresa não prestadora de serviço.');\n\n return;\n }\n\n // Verifica se a empresa é emissora de NFSe\n $iTipoEmissaoNota = Contribuinte_Model_ContribuinteAbstract::TIPO_EMISSAO_NOTA;\n\n if ($oContribuinte->getTipoEmissao($iInscricaoMunicipal) != $iTipoEmissaoNota) {\n\n $this->view->sMensagemBloqueio = $this->translate->_('Empresa não emissora de NFS-E.');\n\n return;\n }\n\n $oFormRequisicao = new Contribuinte_Form_RequisicaoRps();\n $oFormRequisicao->setAction($oBaseUrlHelper->baseUrl('/contribuinte/rps/gerar-requisicao'));\n\n $this->view->oFormRequisicao = $oFormRequisicao;\n $this->view->aTipoDocumento = Contribuinte_Model_nota::getTiposNota(Contribuinte_Model_Nota::GRUPO_NOTA_RPS);\n $this->view->aListaRequisicao = Administrativo_Model_RequisicaoAidof::getRequisicoeseAidofs(\n $iInscricaoMunicipal,\n NULL,\n Contribuinte_Model_Nota::GRUPO_NOTA_RPS);\n }", "public function anular($idcompra, $idorden){\n $sql = \"UPDATE compras SET estado='0' WHERE idcompra = '$idcompra'\";\n\n // eliminamos la compra anulada de la tabla libro compras\n $sql2 = \"DELETE FROM libro_compras WHERE idcompra = '$idcompra'\";\n\n // eliminamos la compra anulada de la tabla cuentas a pagar\n $sql3 = \"DELETE FROM cuentas_a_pagar WHERE idcompra = '$idcompra'\";\n\n //volvemos habilitar la orden de compras luego de anular la factura\n $sql4 = \"UPDATE orden_compras SET estado = '1' WHERE idordencompra = '$idorden'\";\n ejecutarConsulta($sql2);\n ejecutarConsulta($sql3);\n ejecutarConsulta($sql4);\n return ejecutarConsulta($sql);\n }", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlMostrarVentas($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function usuario($listaNombres, $listaPasswords, $nombre, $passwords) {\n $encontrado = -3;\n $claveNombre = -1;\n $clavePassword = -2;\n foreach ($listaNombres as $clave => $valor) {\n if ($valor === $nombre) {\n //el nombre es igual al que se pasa del formulario\n $claveNombre = $clave;\n foreach ($listaPasswords as $claveC => $valorC) {\n //la contraseña es igual a la del formulario\n if ($valorC === $passwords) {\n $clavePassword = $claveC;\n if ($clavePassword === $claveNombre) {\n //comprobamos si es el nombre y la contraseña pertenecen a la misma persona\n $encontrado = $clavePassword;\n }\n }\n }\n }\n }\n return $encontrado;\n}", "public function actualizarTipoResiduo($tipoResiduo){\n //Insertar provincia se invoca al metodo en datos\n $this->tipoResiduoAccesoDatos->conectar();\n $resultado = $this->tipoResiduoAccesoDatos->actualizarTipoResiduo($tipoResiduo);\n $this->tipoResiduoAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function recalculer_honoraire($facture_id)\n {\n $facture = Facture::where('id',Crypt::decrypt($facture_id))->first();\n\n// dd(Crypt::decrypt($facture_id));\n $compromis = $facture->compromis;\n \n $mandataire = $facture->user;\n $mandataire->nb_mois_pub_restant += $facture->nb_mois_deduis;\n $mandataire->update();\n \n \n \n // Pour recalculer il faut faire une remise à zéro dans le compromis, puis supprimer la facture et la recalculer\n // $mandataire->nb_mois_pub_restant -= $facture->nb_mois_deduis ; \n // $mandataire->update();\n\n /* --- remise à zéro en fonction du type de facture\n honoraire \n - facture_honoraire_cree\n partage \n - facture_honoraire_partage_cree \n - facture_honoraire_partage_porteur_cree\n\n parrainage \n - facture_honoraire_parrainage_cree\n\n parrainage_partage\n - facture_honoraire_parrainage_partage_cree\n */\n \n $proprietaire = $facture->user->nom.\" \".$facture->user->prenom ;\n $action = Auth::user()->nom.\" \".Auth::user()->prenom.\" a récalculé la facture $facture->type du mandat $compromis->numero_mandat appartenant à $proprietaire \";\n $user_id = Auth::user()->id;\n\n Historique::createHistorique( $user_id,$facture->id,\"facture\",$action );\n\n if($facture->type == \"honoraire\"){\n \n \n // On vérifie qu'il ne sagit pas de la première déduiction de jetons après encaissement de la facture styl si le mandataire est soumis aux jetons\n if( ($mandataire->contrat->deduis_jeton == true && $facture->nb_mois_deduis !== null) || $mandataire->contrat->deduis_jeton == false ){\n $compromis->facture_honoraire_cree = 0 ;\n $compromis->update();\n // dd($facture);\n $facture->delete();\n // dd('ici');\n \n }\n \n \n \n return redirect()->route('facture.preparer_facture_honoraire', [ Crypt::encrypt( $compromis->id)]);\n }elseif($facture->type == \"partage\"){\n // le mandataire qui porte l'affaire\n if($mandataire->id == $compromis->user_id){\n $compromis->facture_honoraire_partage_porteur_cree = 0 ;\n // dd('partage 1 ');\n \n\n }\n // le mandataire qui ne porte pas l'affaire\n else{\n $compromis->facture_honoraire_partage_cree = 0 ;\n // dd('partage 2');\n \n }\n \n \n \n // On vérifie qu'il ne sagit pas de la première déduiction de jetons après encaissement de la facture styl\n if( ($mandataire->contrat->deduis_jeton == true && $facture->nb_mois_deduis !== null) || $mandataire->contrat->deduis_jeton == false){\n $compromis->update();\n $facture->delete();\n }\n \n return redirect()->route('facture.preparer_facture_honoraire_partage', [ Crypt::encrypt( $compromis->id),$mandataire->id]);\n\n }\n elseif($facture->type == \"partage_externe\"){\n \n $compromis->facture_honoraire_partage_externe_cree = 0 ;\n $compromis->update();\n // dd($facture);\n $facture->delete();\n\n return redirect()->route('facture.preparer_facture_honoraire_partage_externe', [ Crypt::encrypt( $compromis->id)]);\n }\n \n \n \n elseif($facture->type == \"parrainage\"){\n $compromis->facture_honoraire_parrainage_cree = 0 ;\n\n $compromis->update();\n $facture->delete();\n \n if($facture->filleul_id !=null){\n return redirect()->route('facture.preparer_facture_honoraire_parrainage', [ Crypt::encrypt( $compromis->id),$facture->filleul_id]);\n\n }else{\n return redirect()->back()->with(\"ok\", \"la propriété filleul_id dans facture est vide\");\n\n }\n\n\n\n\n }elseif($facture->type == \"parrainage_partage\"){\n $compromis->facture_honoraire_parrainage_partage_cree = 0 ;\n\n $compromis->update();\n $facture->delete();\n \n if($facture->filleul_id !=null){\n return redirect()->route('facture.preparer_facture_honoraire_parrainage', [ Crypt::encrypt( $compromis->id),$facture->filleul_id]);\n\n }else{\n return redirect()->back()->with(\"ok\", \"la propriété filleul_id dans facture est vide\");\n\n }\n\n\n }else{\n return redirect()->back()->with(\"ok\", \"La note d'honoraire n'a pas été recalculée\");\n }\n \n\n \n \n $compromis->update();\n $facture->delete();\n\n\n return redirect()->back()->with(\"ok\", \"La note d'honoraire a été recalculée\");\n }", "private function ventasAleatoriasDelDia($fecha, $ventaTotal, $porcentajeMargen=0) {\n\n /**\n * Con una lista de objetos, los filtra dejando solo los que sean\n * candidatos validos según la frecuencia y devuelve uno de ellos\n * al azar\n */\n $objetoAleatorio = function(\n $lista,\n $catalogo, \n $nombre, \n $random,\n $frecuencia) {\n\n return $lista->filter(function($item) use ($random, $frecuencia) {\n return $item->$frecuencia >= $random;\n })->shuffle()->first();\n };\n\n /**\n * Obtiene un objeto aleatorio, bajando el valor de frecuencia\n * de ser necesario para forzar que se obtenga un elemento\n */\n $objetoAleatorioForzado = function(\n $lista,\n $catalogo,\n $nombre,\n $random,\n $frecuencia) use ($objetoAleatorio) {\n while(!$obj = $objetoAleatorio($lista, $catalogo,\n $nombre, $random, $frecuencia)) {\n if($random < 10) \n return null;\n $random = $random * 0.8;\n }\n return $obj;\n };\n\n /**\n * Wrapper para obtener un usuario aleatorio\n */\n $obtenerUsuario = function($random) use ($objetoAleatorioForzado) {\n $usuarios = User::role('vendedor')->get();\n return $objetoAleatorioForzado($usuarios, \n 'usuarios', \n 'name', \n $random,\n 'frecuenciaVentas');\n };\n\n /**\n * Wrapper para obtener un producto aleatorio\n */\n $obtenerProducto = function($random) use ($objetoAleatorioForzado) {\n $productos = Producto::all();\n return $objetoAleatorioForzado($productos, \n 'productos',\n 'nombre', \n $random,\n 'frecuenciaCompras');\n };\n\n /**\n * Fingir una venta, esta funcion es basicamente la misma que\n * Venta::crear() pero con ligeros ajustes para este entorno\n * de población\n */\n $vender = function(User $user, $productos, $fecha) {\n return DB::transaction(function() use ($user, $productos, $fecha) {\n $venta = new Venta;\n $venta->user_id = $user->id;\n $venta->fecha_hora = $fecha;\n $venta->fecha = $fecha->format('Y-m-d');\n $venta->save();\n\n $total = 0;\n foreach($productos as $producto) {\n list($id, $cantidad) = $producto;\n\n $producto = Producto::find($id);\n $total += $producto->precio*$cantidad;\n\n $venta->productos()->attach($producto, [\n 'precio' => $producto->precio,\n 'cantidad' => $cantidad\n ]);\n }\n\n $venta->total = $total;\n $venta->save();\n\n return $venta;\n });\n };\n\n /**\n * Aquí es donde se obtiene el usuario y la lista de productos\n * para generar lo que es una venta individual.\n */ \n $ventaAleatoria = function($fecha, $compraMinima) \n use ($obtenerProducto, $obtenerUsuario, $vender) {\n $fecha = (new Carbon(\"$fecha 09:00\"))\n ->add(rand(0, 12*60*60), 'seconds');\n $usuario = $obtenerUsuario(rand(0, 100));\n\n $total = 0;\n $venta_productos = [];\n\n while($total<$compraMinima) {\n $producto = $obtenerProducto(rand(0, 100));\n $cantidad = rand(1, 3);\n $total += $producto->precio * $cantidad;\n\n $venta_productos[] = [ $producto->id, $cantidad ]; \n }\n\n if(!$total) {\n return [ null, 0 ];\n }\n\n $venta = $vender($usuario, $venta_productos, $fecha);\n return [ $venta, $total ];\n };\n\n /*\n * Generar ventas aleatorias hasta llegar a un monto de venta\n * especifico para el dia\n */\n return DB::transaction(function() \n use ($fecha, $ventaTotal, $ventaAleatoria, $porcentajeMargen) {\n $total = 0;\n $compraMinima = 2000;\n $ventas = [];\n $margen = $ventaTotal*$porcentajeMargen/100;\n $ventaTotal += rand(0, $margen*2)-$margen;\n\n while($total<$ventaTotal) {\n list($venta, $totalOperacion) = $ventaAleatoria($fecha, $compraMinima);\n if(!$venta) {\n break;\n }\n $total += $totalOperacion;\n $ventas[] = $venta;\n }\n echo \"Total($fecha): $\". number_format($total, 2) .\"\\n\";\n return $ventas;\n });\n }", "public function registrarCarro($productos = array(), $direccion_id = null, $peso = 0, $reserva = false, $lista = false, $retiro_tienda = false, $tienda_retiro = false, $observacion = '')\n\t{\n\t\tif ( empty($productos) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Informacion de la direccion\n\t\t */\n\t\t$direccion\t\t= null;\n\t\tif ( ! empty($direccion_id) )\n\t\t{\n\t\t\t$direccion\t\t\t\t= $this->Direccion->find('first', array(\n\t\t\t\t'conditions'\t\t\t=> array('Direccion.id' => $direccion_id),\n\t\t\t\t'callbacks'\t\t\t\t=> false\n\t\t\t));\n\t\t\tif ( ! $direccion )\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Calcula el subtotal y formatea el detalle de la compra\n\t\t */\n\t\t$subtotal\t\t\t\t= 0;\n\t\t$valor_despacho\t\t\t= 0;\n\t\t$detalles\t\t\t\t= array();\n\t\tforeach ( $productos as $catalogo => $data )\n\t\t{\n\t\t\t/**\n\t\t\t * Detecta multi catalogos\n\t\t\t */\n\t\t\t$productos_carro\t\t= array();\n\t\t\tif ( empty($data['Productos']) )\n\t\t\t{\n\t\t\t\tforeach ( $data as $subcatalogo => $subdata )\n\t\t\t\t{\n\t\t\t\t\tforeach ( $subdata['Productos'] as $subid => $subproducto )\n\t\t\t\t\t{\n\t\t\t\t\t\t$productos_carro[]\t= $subproducto;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$productos_carro\t\t= $data['Productos'];\n\t\t\t}\n\n\t\t\tforeach ( $productos_carro as $producto )\n\t\t\t{\n\t\t\t\t$subtotal\t\t\t\t+= ($producto['Meta']['Precio'] * $producto['Meta']['Cantidad']);\n\t\t\t\t$detalle\t\t\t\t= array(\n\t\t\t\t\t'producto_id'\t\t\t\t=> $producto['Data']['Producto']['id'],\n\t\t\t\t\t'cantidad'\t\t\t\t\t=> $producto['Meta']['Cantidad'],\n\t\t\t\t\t'precio_unitario'\t\t\t=> $producto['Data']['Producto']['preciofinal_publico'],\n\t\t\t\t\t'total'\t\t\t\t\t\t=> ($producto['Data']['Producto']['preciofinal_publico'] * $producto['Meta']['Cantidad']),\n\t\t\t\t\t'peso'\t\t\t\t\t\t=> (empty($producto['Data']['Producto']['peso']) ? 0 : $producto['Data']['Producto']['peso'])\n\t\t\t\t);\n\n\t\t\t\t/**\n\t\t\t\t * Determina el origen del producto\n\t\t\t\t */\n\t\t\t\tswitch ( $catalogo )\n\t\t\t\t{\n\t\t\t\t\tcase 'lista':\n\t\t\t\t\t{\n\t\t\t\t\t\t$detalle\t\t= array_merge($detalle, array(\n\t\t\t\t\t\t\t'via_lista'\t\t\t=> true,\n\t\t\t\t\t\t\t'lista_id'\t\t\t=> $producto['Meta']['lista_id']\n\t\t\t\t\t\t));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'reserva':\n\t\t\t\t\t{\n\t\t\t\t\t\t$detalle\t\t= array_merge($detalle, array(\n\t\t\t\t\t\t\t'via_reserva'\t\t=> true,\n\t\t\t\t\t\t\t'reserva_id'\t\t=> $producto['Meta']['reserva_id']\n\t\t\t\t\t\t));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'catalogo':\n\t\t\t\t\t{\n\t\t\t\t\t\t$detalle\t\t= array_merge($detalle, array(\n\t\t\t\t\t\t\t'via_catalogo'\t\t=> true,\n\t\t\t\t\t\t\t'lista_precio'\t\t=> 'catalogo'\n\t\t\t\t\t\t));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'deportes':\n\t\t\t\t\t{\n\t\t\t\t\t\t$detalle\t\t= array_merge($detalle, array(\n\t\t\t\t\t\t\t'via_catalogo'\t\t=> true,\n\t\t\t\t\t\t\t'lista_precio'\t\t=> 'deportes'\n\t\t\t\t\t\t));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'bits':\n\t\t\t\t\t{\n\t\t\t\t\t\t$detalle\t\t= array_merge($detalle, array(\n\t\t\t\t\t\t\t'via_catalogo'\t\t=> true,\n\t\t\t\t\t\t\t'lista_precio'\t\t=> 'bits'\n\t\t\t\t\t\t));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tarray_push($detalles, $detalle);\n\t\t\t}\n\t\t}\n\t\t$data\t\t\t\t\t= array(\n\t\t\t'Compra'\t\t\t\t=> array(\n\t\t\t\t'usuario_id'\t\t\t\t=> AuthComponent::user('id'),\n\t\t\t\t'estado_compra_id'\t\t\t=> 1,\n\t\t\t\t'direccion_id'\t\t\t\t=> $direccion_id,\n\t\t\t\t'sucursal_id'\t\t\t\t=> $tienda_retiro,\n\t\t\t\t'despacho_gratis'\t\t\t=> 0, \n\t\t\t\t'subtotal'\t\t\t\t\t=> $subtotal,\n\t\t\t\t'valor_despacho'\t\t\t=> $valor_despacho,\n\t\t\t\t'total_descuentos'\t\t\t=> 0,\n\t\t\t\t'total'\t\t\t\t\t\t=> ($subtotal + $valor_despacho),\n\t\t\t\t'pagado'\t\t\t\t\t=> false,\n\t\t\t\t'aceptado'\t\t\t\t\t=> false,\n\t\t\t\t'reversado'\t\t\t\t\t=> false,\n\t\t\t\t'modified'\t\t\t\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t'created'\t\t\t\t\t=> date('Y-m-d H:i:s'),\n\t\t\t),\n\t\t\t'DetalleCompra'\t\t\t=> $detalles\n\t\t);\n\n\t\t/**\n\t\t * Si la compra ya existe, actualiza sus datos y borra el detalle para reescribirlo\n\t\t */\n\t\tif ( $this->id )\n\t\t{\n\t\t\t$data['Compra']['id']\t\t= $this->id;\n\t\t\t$this->DetalleCompra->deleteAll(\n\t\t\t\tarray('DetalleCompra.compra_id' => $this->id),\n\t\t\t\tfalse, false\n\t\t\t);\n\t\t}\n\n\t\t// prx($data);\n\n\t\t/**\n\t\t * Guarda la compra\n\t\t */\n\t\tif ( $this->saveAll($data) )\n\t\t{\n\t\t\treturn $this->find('first', array(\n\t\t\t\t'conditions'\t\t=> array('Compra.id' => $this->id),\n\t\t\t\t'contain'\t\t\t=> array(\n\t\t\t\t\t'Usuario',\n\t\t\t\t\t'DetalleCompra'\t\t=> array('Producto'),\n\t\t\t\t\t'EstadoCompra',\n\t\t\t\t\t'Direccion'\t\t\t=> array('Comuna' => array('Region')),\n\t\t\t\t)\n\t\t\t));\n\t\t}else{\n\t\t\tprx($this->validationErrors );\n\t\t}\n\n\t\treturn false;\n\t}", "function guardare(){\n\t\t$m = intval($_POST['totalitem']);\n\t\t$t = 0;\n\t\t// calcula el total de\n\t\tfor ( $i=0; $i < $m; $i++ ){\n\t\t\t$t += $_POST['cana_'.$i];\n\t\t}\n\t\tif ( $t <= 0 ) {\n\t\t\techo \"No hay cambios\";\n\t\t\treturn;\n\t\t}\n\n\t\t$ids = '';\n\t\tfor ( $i=0; $i < $m; $i++ ){\n\t\t\t// Guarda\n\t\t\t$cana = $_POST['cana_'.$i];\n\t\t\t$id = intval($_POST['codigo_'.$i]);\n\t\t\t$mSQL = \"UPDATE itprdop SET producido = ${cana} WHERE id= ${id}\";\n\t\t\t$this->db->query($mSQL);\n\t\t}\n\n\t\t$data['fechap'] = substr($_POST['fechap'],-4).substr($_POST['fechap'],3,2).substr($_POST['fechap'],0,2);\n\n\t\t$id = intval($_POST['codigo_0']);\n\t\t$numero = $this->datasis->dameval(\"SELECT numero FROM itprdop WHERE id=$id\");\n\n\t\t$this->db->where('numero',$id);\n\t\t$this->db->update('prdo', $data);\n\n\t\techo \"Produccion Guardada \".substr($_POST['fechap'],-4).substr($_POST['fechap'],3,2).substr($_POST['fechap'],0,2);\n\t}", "public function modificarHijos($cuentaPadre){\n $cuentasPHijos= CuentaPeriodo::whereRaw('\n cuenta_id in\n (select id from cuenta where padre_id=?)\n and periodo_id=?', [$cuentaPadre->cuenta_id, $cuentaPadre->periodo_id])->get();\n //dd([$cuentaPadre]);\n foreach ($cuentasPHijos as $cuentaHijo) {\n $cuentaHijoM=$this->actualizar(0, $cuentaHijo);\n }\n return true;\n }", "function getCorrelativoComprobante() {\n\t\tglobal $bd;\n\t\tglobal $x_correlativo_comprobante;\n\t\t/// buscamos el ultimo correlativo\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$correlativo_comprobante = 0; \n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\tif ($x_array_comprobante['idtipo_comprobante'] != \"0\"){ // 0 = ninguno | no imprimir comprobante\n\n\t\n\t\t\t$sql_doc_correlativo=\"select (correlativo + 1) as d1 from tipo_comprobante_serie where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\t\t\n\t\t\t$correlativo_comprobante = $bd->xDevolverUnDato($sql_doc_correlativo);\n\n\t\t\t// if ($x_array_comprobante['codsunat'] === \"0\") { // si no es factura electronica\n\t\t\t\t// guardamos el correlativo //\n\t\t\t\t$sql_doc_correlativo = \"update tipo_comprobante_serie set correlativo = \".$correlativo_comprobante.\" where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t\t$bd->xConsulta_NoReturn($sql_doc_correlativo);\n\t\t\t// } \n\t\t\t// si es factura elctronica guarda despues tigger ce \n\t\t} else {\n\t\t\t$correlativo_comprobante='0';\n\t\t}\n\n\t\t// SI TAMBIEN MODIFICA EN REGISTRO PAGO\n\t\t$x_correlativo_comprobante = $correlativo_comprobante;\n\t\tif ( strrpos($x_from, \"e\") !== false ) { $x_from = str_replace('e','',$x_from); setComprobantePagoARegistroPago(); }\n\n\t\t// print $correlativo_comprobante;\n\t\t$x_respuesta = json_encode(array('correlativo_comprobante' => $correlativo_comprobante));\n\t\tprint $x_respuesta.'|';\n\t}", "function verificarComprobante($fecha)\n {\n global $db;\n $sql = \" select count(dateReception) as total from almacen_reception\n where tipoTrans = 'A' and tipoComprobante = 'A';\n and dateReception >= '$fecha' \";\n echo $sql;\n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n \t$info = $db->execute($sql);\n if ($info->fields(\"total\") == 0)\n {\n return 1; // positivo, puede registrar\n }\n else if ($info->fields(\"total\") > 0)\n {\n return 0; // existe ajustes, no puede registrar\n }\n }", "function modificar(){\r\n\t\t\t$mysqli=$this->ConectarBD();\r\n\t\t\t\t$id=$_SESSION['idr'];\r\n\r\n\t\t\t$sql= \"UPDATE reservact SET FECHA ='\".$this->fecha.\"', DNI ='\".$this->dni.\"', COD_ACT='\".$this->codact.\"' WHERE COD_RES = '\".$id.\"'\";\r\n\r\n\r\n\r\n\t\t\t\tif (!($resultado = $mysqli->query($sql))){\r\n\t\t\t\treturn 'ERR_CONS_BD';\r\n\t\t\t\t}else{\r\n\t\t\t \treturn \"CONFIRM_EDIT_RESERVA\";\r\n\t\t\t\t}\r\n\r\n\t\t}", "public function asignarOrden($orden)\n {\n $counters= $this->getDoctrine()->getManager()->getRepository('BaseBundle:Empresa')->getCountersOrderedByTimeOfQueue($orden->getEmpresa()->getId(),$orden->getFecha()->format('H:i:s'));\n \n if($orden instanceof Anulacion)\n {\n $emision= $this->getDoctrine()->getManager()->getRepository('EmisionesBundle:Emision')->findOneBy(array('numeroOrden'=>$orden->getTarjet()));\n if($emision instanceof Emision && $emision->getUsuario() instanceof Usuariointerno)\n {\n// print_r(\"entro\");exit;\n if(in_array($emision->getUsuario()->getId(), array_column($counters, 'id')))\n {\n return $emision->getUsuario(); \n }\n }\n// print_r(\"salio\");exit;\n }\n foreach (array_column($counters, 'id') as $id_counter)\n {\n $counter= $this->getDoctrine()->getManager()->getRepository('EmisionesBundle:Usuariointerno')->find($id_counter);\n if($orden->getFecha() < $counter->getInicioAlmuerzo() && $orden->getFecha()>= $counter->getInicioJornada())\n {//horario mannana del counter\n return $counter; \n }\n elseif($orden->getFecha() > $counter->getFinAlmuerzo() && $orden->getFecha() <= $counter->getFinJornada())\n {//horario de la tarde del counter\n return $counter;\n }\n } \n return false;\n }", "function comprobarColeccion($coleccion,$sudoKeys){\r\n $errores = [];\r\n //We take a box and compare it with the others.\r\n for($j=0;$j<count($coleccion);$j++){\r\n //We check that it isn't a fixed number:\r\n if($sudoKeys[$coleccion[$j]]==0){\r\n //it's not a fixed number-> We compare with the other numbers.\r\n for($i=0;$i<count($coleccion);$i++){\r\n if($_POST[$coleccion[$j]]==$_POST[$coleccion[$i]]){\r\n //Its wrong, numbers match:\r\n if($coleccion[$i]!=$coleccion[$j]){\r\n //print(\"La casilla \".$coleccion[$j].\" está mal. Coinciden: \".$coleccion[$j].\" Con: \".$coleccion[$i].\" . \");\r\n //print(\"La casilla \".$coleccion[$j].\" está mal\");\r\n $errores[] = $coleccion[$j];\r\n }\r\n }else{\r\n //It's all right, it doesn't match.\r\n }\r\n }\r\n }\r\n //print(\"<br>\");\r\n }\r\n \r\n if(count(array_unique($errores))==0){\r\n return \"correcto\";\r\n }else{\r\n //return false;\r\n return $errores;\r\n }\r\n }", "function usuarios_tesoreria_distintos()\n\t{\n\t\tif($_POST['responsable_tecnico_id']==$_POST['valuador_tesoreria_id'])\n\t\t{\n\t\t\t$this->CI->form_validation->set_message('usuarios_tesoreria_distintos', \"El responsable t&eacute;cnico y el valuador de Tesorer&iacute;a deben ser diferentes.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "static public function ctrEditarRecursos(){\n if (isset($_POST[\"editarid_recurso\"])) {\n if (preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarid_recurso\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarrubro\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarconcepto\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarvalor_rubro\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarvalor_proyecto\"]) &&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"editarid_proyecto\"])) {\n\n }\n\n $recursos = \"recursos\";\n\n $datos = array(\"id_recurso\" => $_POST[\"editarid_recurso\"],\n \"rubro\" => $_POST[\"editarrubro\"],\n \"concepto\" => $_POST[\"editarconcepto\"],\n \"valor_rubro\" => $_POST[\"editarvalor_rubro\"],\n \"valor_proyecto\" => $_POST[\"editarvalor_proyecto\"],\n \"id_proyecto\" => $_POST[\"editarid_proyecto\"]);\n\n $respuesta = ModeloRecurso::mdlEditarRecursos($recursos, $datos);\n\n if ($respuesta == \"ok\") {\n\n echo '<script>\n swal({\n type: \"success\",\n title: \"¡El recurso ha sido Actualizada correctamente!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n\n }).then(function(result){\n if(result.value){\n window.location = \"recurso\";\n }\n });\n </script>';\n }else{\n echo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El recurso 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\twindow.location = \"recurso\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t</script>';\n }\n }\n }", "function evt__cuadro_puntajes__aplicar()\n\t{\n //a los que se desea aplicar el puntaje elegido \n $hab = $this->controlador()->get_habilitacion();\n $rel = $this->controlador()->get_relacion_evaluacion();\n \n foreach ($this->s__seleccion_puntajes as $elegido) {\n $fh = $elegido['formulario_habilitado'];\n $conc = ($elegido['concepto'] != '-1') ? $elegido['concepto'] : null;\n $t_elto = ($elegido['tipo_elemento'] != '-1') ? $elegido['tipo_elemento'] : null; \n \n //se debe averiguar primero todos los formulario_habilitado_detalle que correspoden\n //a formulario_habilitado+concepto+tipo_elemento indicados\n $res = $this->get_formularios_detalle($hab, $fh, $conc, $this->s__encuesta, $t_elto);\n foreach ($res as $fhd) {\n $fila['formulario_habilitado'] = $fh;\n $fila['formulario_habilitado_detalle'] = $fhd['formulario_habilitado_detalle'];\n $fila['puntaje'] = $this->s__nuevo_puntaje;\n $this->upsert_puntaje_aplicacion($fh, $fhd['formulario_habilitado_detalle'], $this->s__nuevo_puntaje);\n }\n }\n $rel->sincronizar();\n\t}", "public function reajustar(){\n //calculando según el IPC acumulado\n //entre el último reajuste realizado y ahora. \n $mes_actual = (int)date(\"m\");\n $agno_actual = (int)date('Y');\n $mes_inicio = $mes_actual - $this->reajusta_meses;\n $agno_inicio = $agno_actual;\n if($mes_inicio <= 0){\n $agno_inicio -= 1;\n $mes_inicio+= 12;\n }\n $ipcs = array();\n if($agno_inicio != $agno_actual){\n $ipcs = Ipc::model()->findAll(array('order'=>'mes','condition'=>'mes >= :m and agno = :a','params'=>array(':m'=>$mes_inicio,':a'=>$agno_inicio)));\n $ipcs_actual = Ipc::model()->findAll(array('order'=>'mes','condition'=>'mes < :m and agno = :a','params'=>array(':m'=>$mes_actual,':a'=>$agno_actual)));\n foreach($ipcs_actual as $ipc){\n $ipcs[] = $ipc;\n }\n }\n else{\n $ipcs = Ipc::model()->findAll(array('condition'=>'mes >= :m1 and mes < :m2 and agno = :a','params'=>array(':m1'=>$mes_inicio,':m2'=>$mes_actual,':a'=>$agno_actual)));\n }\n\n $ipc_acumulado = 0;\n foreach($ipcs as $ipc){\n //sumo los ipcs para generar el ipc acumulado\n $ipc_acumulado+= $ipc->porcentaje;\n }\n //para hacer el cálculo según porcentaje\n $ipc_acumulado /= 100;\n\n //saco el último debe pagar para ver cuánto era lo que tenía que pagar antes\n $debePagars = DebePagar::model()->findAllByAttributes(array('contrato_id'=>$this->id),array('order'=>'id DESC'));\n $debePagar = $debePagars[0];\n \n $debeNuevo = new DebePagar();\n $debeNuevo->agno = $agno_actual;\n $debeNuevo->mes = $mes_actual;\n $debeNuevo->dia = $debePagar->dia;\n $debeNuevo->contrato_id = $this->id;\n //ahora hay que reajustar los montos del contrato dependiendo del ipc_acumulado\n //el precio base debe ser el valor anterior en debe pagar\n $debeNuevo->monto_gastocomun = intval($debePagar->monto_gastocomun*(1+$ipc_acumulado));\n $debeNuevo->monto_gastovariable = intval($debePagar->monto_gastovariable*(1+$ipc_acumulado));\n $debeNuevo->monto_mueble = intval($debePagar->monto_mueble*(1+$ipc_acumulado));\n $debeNuevo->monto_renta = intval($debePagar->monto_renta*(1+$ipc_acumulado));\n try{\n //se reajusta el contrato\n $debeNuevo->save(); \n } catch (Exception $ex) {\n }\n }", "function contarPruebasAcuerdo2011004($reglamentoEstudiante){\r\n if(is_array($reglamentoEstudiante)){\r\n $veces=0;\r\n foreach ($reglamentoEstudiante as $reglamento) {\r\n $anioperiodo=$reglamento['REG_ANO'].$reglamento['REG_PER'];\r\n if($reglamento['REG_REGLAMENTO']=='S' && $anioperiodo>=20113){\r\n $veces++;\r\n }\r\n }\r\n }else{\r\n $veces='';\r\n }\r\n return $veces;\r\n }", "public function fracaso()\n\t{\n\t\textract($this->request->data);\n\t\tif ( ! $this->Auth->user() || ! $this->request->is('post') || empty($TBK_ORDEN_COMPRA) )\n\t\t{\n\t\t\t$this->redirect('/');\n\t\t}\n\n\t\t/**\n\t\t * Si existe una compra en proceso, en estado pendiente y corresponde\n\t\t * a la oc informada por webpay, cambia el estado a rechazo\n\t\t */\n\t\tif ( ( $id = $this->Session->read('Flujo.Carro.compra_id') ) && $id == $TBK_ORDEN_COMPRA && ( $this->Compra->pendiente($id) || $this->Compra->rechazada($id) ) )\n\t\t{\n\t\t\t$this->Compra->cambiarEstado($id, 'RECHAZO_TRANSBANK');\n\t\t\t//$this->redirect(array('action' => 'resumen'));\n\t\t}\n\t\t/**\n\t\t * Si no existe la oc o no cumple con las condiciones, informamos numero de oc de webpay\n\t\t */\n\t\telse\n\t\t{\n\t\t\t$id = $TBK_ORDEN_COMPRA;\n\t\t}\n\n\t\t/**\n\t\t * Camino de migas\n\t\t */\n\t\tBreadcrumbComponent::add('Reserva de uniformes', array('action' => 'add'));\n\t\tBreadcrumbComponent::add('Reserva fracasada');\n\t\t$this->set('title', 'Reserva fracasada');\n\t\t$this->set(compact('id'));\n\t}", "function modificarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_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_analisis_porque_det','id_analisis_porque_det','int4');\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t$this->setParametro('solucion','solucion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('porque','porque','varchar');\n\t\t$this->setParametro('respuesta','respuesta','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "private function verrouPoser(){\n\t\t$verrou['etat'] = '';\n\t\tself::verrouSupprimer();\n\t\tif($this->formulaire['cle'] != ''){\n\t\t\t$verrou = self::verrouRechercher();\n\t\t\tif(empty($verrou)){\n\t\t\t\t$verrou = self::verrouInserer();\n\t\t\t\t$verrou['etat'] = 'ok';\n\t\t\t}else{\n\t\t\t\t$verrou['etat'] = 'nok';\n\t\t\t\t$verrou['message'] = \"L'enregistrement \".$verrou['ad_ve_cle'].\" est actuellement verrouillé par \".$verrou['ad_ve_nom'].\" depuis le \".$verrou['ad_ve_date'].\".\\nLes modifications, enregistrement et suppression sont donc impossibles sur cet enregistrement.\";\n\t\t\t}//end if\n\t\t}//end if\n\t\treturn $verrou;\n\t}", "public function calificacionPendiente($changuita, $usuario, $contraparte) {\n $sql = \"select nombre, mail, aviso_ca from usuarios where id = $usuario and activo = '2'\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n if ($fila[\"aviso_ca\"] == 1) {\n $mail = $fila[\"mail\"];\n $nombre = $fila[\"nombre\"];\n $sql = \"select nombre, apellido, mail, celular_area, celular from usuarios where id = $contraparte\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n //$cNombre = $fila[\"nombre\"].\" \".$fila[\"apellido\"];\n $cNombre = $fila[\"nombre\"];\n $cMail = $fila[\"mail\"];\n // $cTel = $fila[\"telefono_area\"].\" \".$fila[\"telefono\"];\n $cCel = $fila[\"celular_area\"] . \" \" . $fila[\"celular\"];\n $sql = \"select usuario, titulo from changuitas where id = $changuita\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n $titulo = $fila[\"titulo\"];\n $txtContrato = \"fuiste elegido por\";\n if ($usuario == $fila[\"usuario\"])\n $txtContrato = \"elegiste a\";\n $this->mailer->Subject = \"Tenés que calificar a $cNombre por la changuita $titulo\";\n $this->mailer->Body = $this->bodyIni;\n $this->mailer->Body .= \"Estimado/a $nombre:<br/><br/>Ya pasaron varios días desde que $txtContrato $cNombre para realizar la changuita <a href='\" . Sitio . \"/#/changuita|\" . $changuita . \"'><strong>$titulo</strong></a>. Por este motivo, te pedimos que lo/a califiques por su amabilidad, claridad y efectividad en el intercambio. Si la changuita ya fue concretada, podés <a href='\" . Sitio . \"/#/changuita|\" . $changuita . \"'>calificarlo/a ahora</a>. De no haberse concretado el intercambio en el tiempo indicado, podés indicarlo y calificar a tu contraparte para obtener una bonificación de los cargos. En ese caso, la reputación de $cNombre se verá afectada negativamente.<br/>Te recordamos sus datos de contacto:<br/>E-mail: $cMail<br/>\";\n // if(trim($cTel) != \"\")\n // $this->mailer->Body .= \"Tel.: $cTel<br/>\";\n if (trim($cCel) != \"\")\n $this->mailer->Body .= \"Cel.: $cCel<br/>\";\n $this->mailer->Body .= \"<br/>\" . $this->bodyFin;\n $this->mailer->ClearAddresses();\n $this->mailer->AddAddress($mail);\n $this->mailer->Send();\n }\n }", "public function regerarCheckSumTodosModelos()\n\t{\n\t\t// recuperando todos os modelos do sistema\n\t\t$arrayNomesModelosSistema = Basico_OPController_UtilOPController::retornaArrayNomeTodosModelosSistema(true);\n\n\t\t// recuperando array de objetos nao versionaveis\n\t\t$arrayNomesObjetosNaoVersionais = self::retornaArrayNomesObjetosNaoVerionaveis();\n\n\t\t// loop para verificar se o array de modelos dos sitema possui algum modelo nao versionavel\n\t\tforeach ($arrayNomesObjetosNaoVersionais as $nomeObjetoNaoVersionavel) {\n\t\t\t// verificando se o modelo nao versionavel existe no array de modelos dos sitema\n\t\t\tif (($chaveObjetoNaoVersionavel = array_search($nomeObjetoNaoVersionavel, $arrayNomesModelosSistema)) !== false) {\n\t\t\t\t// removendo elemento\n\t\t\t\tunset($arrayNomesModelosSistema[$chaveObjetoNaoVersionavel]);\n\t\t\t}\n\t\t}\n\n\t\t// loop para regerar o checksum de todos os modelos do sistema\n\t\tforeach ($arrayNomesModelosSistema as $nomeModeloSistema) {\n\t\t\t// regerando checksum\n\t\t\t$this->regerarChecksumModelo($nomeModeloSistema);\n\t\t}\n\n\t\t// retornando sucesso\n\t\treturn true;\n\t}", "function elimina(&$valores)\n {\n $this->iniVar();\n if (isset($this->bvictimacolectiva->_do->id_grupoper)) {\n $this->eliminaVic($this->bvictimacolectiva->_do, true);\n $_SESSION['fvc_total']--;\n }\n }", "function calcularSemestreEspacioMasAtrasado() {\r\n if (is_array($this->espaciosPlan))\r\n {\r\n if(is_array($this->espaciosAprobados)){\r\n foreach ($this->espaciosPlan as $key => $espaciosPlan) {\r\n foreach ($this->espaciosAprobados as $key2 => $espaciosAprobados) {\r\n if ($espaciosPlan==$espaciosAprobados)\r\n unset ($this->espaciosPlan[$key]);\r\n }\r\n }\r\n }\r\n }else{\r\n $this->mensaje[$this->datosEstudiante['CODIGO']][]=\"No existen espacios registrados en el plan de estudios del estudiante\";\r\n\r\n }\r\n return $this->espaciosPlan[0]['SEMESTRE'];\r\n }" ]
[ "0.65585566", "0.6494105", "0.6490734", "0.6412446", "0.63329184", "0.6311352", "0.63040525", "0.6265099", "0.6230874", "0.62259394", "0.62103623", "0.62041384", "0.61919856", "0.616504", "0.6161417", "0.6156595", "0.61555076", "0.61513865", "0.614656", "0.6111529", "0.6094495", "0.6086805", "0.6085322", "0.6061705", "0.6055367", "0.6054091", "0.6025196", "0.60207635", "0.6009634", "0.599612", "0.59955484", "0.5992656", "0.59734327", "0.59602386", "0.59509677", "0.5948635", "0.5939357", "0.59325993", "0.59322697", "0.59240735", "0.5921973", "0.5920293", "0.59174615", "0.59073794", "0.59041464", "0.5902281", "0.58989054", "0.58949125", "0.5892754", "0.58837384", "0.58832425", "0.58818907", "0.5873289", "0.58634883", "0.58623725", "0.585326", "0.58363426", "0.5835801", "0.58343613", "0.5832302", "0.5828381", "0.5825848", "0.5825773", "0.5825152", "0.58209246", "0.58181643", "0.5813948", "0.5811243", "0.58111936", "0.5810243", "0.58097774", "0.5809061", "0.5805944", "0.5803363", "0.5798659", "0.5798645", "0.5793443", "0.5788011", "0.5781897", "0.5781438", "0.5777177", "0.57753396", "0.5774652", "0.5773947", "0.5771328", "0.57688344", "0.57670707", "0.5766336", "0.57657194", "0.57635564", "0.5763548", "0.5763419", "0.57612926", "0.57589924", "0.57575476", "0.57570523", "0.5756282", "0.57514817", "0.57487726", "0.5743679" ]
0.6567973
0
/ ========================= Funcion de consulta ======================================== Encontramos que la tabla listaprecios tiene registros con el estado VACIO, entonces comprobamos en la tabla REFERENCIASCRUZADAS de BD de RECAMBIOS, si existe la referencia Si existe se pone en ESTADO = "existe" NO existe se pone en ESTADO = "nuevo" Estos cambios son el campor ESTADO de la tabla LISTAPRECIOS de BD IMPORTARRECAMBIOS.
function comprobar($nombretabla, $BDImportRecambios, $BDRecambios,$id,$l,$f) { // Inicializamos variables $consfinal = 0; $existente = 0; $nuevo = 0; $consul = "SELECT * FROM referenciascruzadas where RefFabricanteCru ='" . $id . "'"; $consultaReca = mysqli_query($BDRecambios, $consul); if ($consultaReca == true) { // Controlamos que la consulta sea correcta, ya que sino lo es genera un error la funcion fetch $consfinal = $consultaReca->fetch_assoc(); } if ($consfinal['RefFabricanteCru'] == $id && $consfinal['IdFabricanteCru'] == $f) { $actu = "UPDATE `listaprecios` SET `Estado`='existe',`RecambioID`=" . $consfinal['RecambioID'] . " WHERE `linea` ='" . $l . "'"; mysqli_query($BDImportRecambios, $actu); $existente = 1; } else { $actu = "UPDATE `listaprecios` SET `Estado`='nuevo' WHERE `linea` ='" . $l . "'"; mysqli_query($BDImportRecambios, $actu); $nuevo = 1; } $datos[0]['n'] = $nuevo; $datos[0]['e'] = $existente; $datos[0]['t'] = $l; return $datos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contador($nombretabla, $BDImportRecambios,$ConsultaImp) {\n\t// Inicializamos array\n $Tresumen['n'] = 0; //nuevo\n $Tresumen['t'] = 0; //total\n $Tresumen['e'] = 0; //existe\n\t$Tresumen['v'] = 0; //existe\n\t\n\t// Contamos los registros que tiene la tabla\n \t$total = 0;\n $whereC = '';\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n $Tresumen['t'] = $total; // total registros\n\t\t\n // Obtenemos lineas de registro en blanco y contamos cuantas\n\t$whereC = \" WHERE trim(Estado) = ''\";\n\t$campo[1]= 'RefFabPrin';\n\t$campo[2]= 'linea';\n\t$RegistrosBlanco = $ConsultaImp->registroLineas($BDImportRecambios,$nombretabla,$campo,$whereC);\n\t// Como queremos devolver javascript los creamos\n\t$Tresumen['v'] = $RegistrosBlanco['NItems'];\n\t$Tresumen['LineasRegistro'] = $RegistrosBlanco; //Registros en blanco\n \n \n\t// Contamos los registros que tiene la tabla nuevo\n\t$total = 0;\n\t$whereC = \" WHERE Estado = 'nuevo'\";\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n $Tresumen['n'] = $total; //nuevo\n\t\n\t\n\t\n\t\n\t\n\t\n\t// Contamos los registros que tiene la tabla existente\n\t$total = 0;\n\t$whereC = \" WHERE Estado = 'existe'\";\n $total = $ConsultaImp->contarRegistro($BDImportRecambios,$nombretabla,$whereC);\n\t$Tresumen['e'] = $total; //existe\n return $Tresumen;\n}", "function grabar($datos)\n\t{\n\t\tif (($datos[IDPROVEEDOR]=='') && ($this->exist(\"$this->catalogo.catalogo_proveedor\",'IDPROVEEDOR',\" WHERE NOMBREFISCAL = '$datos[NOMBREFISCAL]'\" )))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$reg_proveedor[IDPROVEEDOR] = $datos[IDPROVEEDOR];\n\t\t\t$reg_proveedor[NOMBREFISCAL] = trim(strtoupper($datos[NOMBREFISCAL]));\n\t\t\t$reg_proveedor[NOMBRECOMERCIAL] = trim(strtoupper($datos[NOMBRECOMERCIAL]));\n\t\t\t$reg_proveedor[IDTIPODOCUMENTO] = $datos[IDTIPODOCUMENTO];\n\t\t\t$reg_proveedor[IDDOCUMENTO] = trim($datos[IDDOCUMENTO]);\n\t\t\t$reg_proveedor[EMAIL1] = trim(strtolower($datos[EMAIL1]));\n\t\t\t$reg_proveedor[EMAIL2] = trim(strtolower($datos[EMAIL2]));\n\t\t\t$reg_proveedor[EMAIL3] = trim(strtolower($datos[EMAIL3]));\n\t\t\t$reg_proveedor[ACTIVO] = $datos[ACTIVO];\n\t\t\t$reg_proveedor[INTERNO] = $datos[INTERNO];\n\n\t\t\tif ($datos[ARREVALRANKING]=='SKILL'){\n\t\t\t\t$reg_proveedor[ARREVALRANKING]=$datos[ARREVALRANKING];\n\t\t\t\t$reg_proveedor[SKILL]= $datos[SKILL];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$reg_proveedor[ARREVALRANKING]='CDE';\n\t\t\t}\n\t\t\t$reg_proveedor[EVALFIDELIDAD]=$datos[EVALFIDELIDAD];\n\t\t\t$reg_proveedor[EVALINFRAESTRUCTURA]=$datos[EVALINFRAESTRUCTURA];\n\t\t\t$reg_proveedor[IDMONEDA]=$datos[IDMONEDA];\n\t\t\t$reg_proveedor[OBSERVACIONES]=$datos[OBSERVACIONES];\n\n\t\t\t$reg_proveedor[BRSCH] = $datos[BRSCH];\n\t\t\t$reg_proveedor[FDGRV] = $datos[FDGRV];\n\t\t\t$reg_proveedor[ZTERM] = $datos[ZTERM];\n\t\t\t$reg_proveedor[MWSKZ] = $datos[MWSKZ];\n\t\t\t$reg_proveedor[PARVO] = $datos[PARVO];\n\t\t\t$reg_proveedor[PAVIP] = $datos[PAVIP];\n\t\t\t$reg_proveedor[FECHAINICIOACTIVIDADES]= trim($datos[ANIO].'-'.$datos[MES].'-'.$datos[DIA]);\n\n\t\t\t$prov_ubigeo[CVEPAIS]= $datos[CVEPAIS];\n\t\t\t$prov_ubigeo[CVEENTIDAD1]= $datos[CVEENTIDAD1];\n\t\t\t$prov_ubigeo[CVEENTIDAD2]= $datos[CVEENTIDAD2];\n\t\t\t$prov_ubigeo[CVEENTIDAD3]= $datos[CVEENTIDAD3];\n\t\t\t$prov_ubigeo[CVEENTIDAD4]= $datos[CVEENTIDAD4];\n\t\t\t$prov_ubigeo[CVEENTIDAD5]= $datos[CVEENTIDAD5];\n\t\t\t$prov_ubigeo[CVEENTIDAD6]= $datos[CVEENTIDAD6];\n\t\t\t$prov_ubigeo[CVEENTIDAD7]= $datos[CVEENTIDAD7];\n\t\t\t$prov_ubigeo[CVETIPOVIA]= $datos[CVETIPOVIA];\n\t\t\t$prov_ubigeo[DIRECCION]= $datos[DIRECCION];\n\t\t\t$prov_ubigeo[NUMERO]= $datos[NUMERO];\n\t\t\t$prov_ubigeo[CODPOSTAL] = $datos[CODPOSTAL];\n\t\t\t$prov_ubigeo[LATITUD] = $datos[LATITUD];\n\t\t\t$prov_ubigeo[LONGITUD] = $datos[LONGITUD];\n\t\t\t$prov_ubigeo[IDUSUARIOMOD]= $datos[IDUSUARIOMOD];\n\t\t\t$prov_ubigeo[REFERENCIA1]= $datos[REFERENCIA1];\n\t\t\t$prov_ubigeo[REFERENCIA2]= $datos[REFERENCIA2];\n\n\t\t\t$datos_telf[CODIGOAREA] = $datos[CODIGOAREA];\n\t\t\t$datos_telf[IDTIPOTELEFONO] = $datos[IDTIPOTELEFONO];\n\t\t\t$datos_telf[NUMEROTELEFONO] = $datos[NUMEROTELEFONO];\n\t\t\t$datos_telf[EXTENSION] = $datos[EXTENSION];\n\t\t\t$datos_telf[IDTSP] = $datos[IDTSP];\n\t\t\t$datos_telf[COMENTARIO]=$datos[TELF_COMENTARIO];\n\t\t\t$datos_telf[IDUSUARIOMOD] = $datos[IDUSUARIOMOD];\n\n\t\t\t$this->borrar_telefono($datos[IDPROVEEDOR]); // BORRA LOS PROVEEDORES\n\n\t\t\tif ( $datos[IDPROVEEDOR]=='')\n\t\t\t{\n\n\t\t\t\t$this->insert_reg(\"$this->catalogo.catalogo_proveedor\",$reg_proveedor);\n\t\t\t\t$datos[IDPROVEEDOR] = $this->reg_id(); //OBTIENE EL ID DEL NUEVO PROVEEDOR\n\t\t\t\t$prov_ubigeo[IDPROVEEDOR]=$datos[IDPROVEEDOR];\n\t\t\t\t$prov_horario[IDPROVEEDOR]=$datos[IDPROVEEDOR];\n\t\t\t\t$this->insert_reg(\"$this->catalogo.catalogo_proveedor_ubigeo\",$prov_ubigeo);\n\t\t\t\t$this->insert_reg(\"$this->catalogo.catalogo_proveedor_horario\",$prov_horario);\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\t$this->update(\"$this->catalogo.catalogo_proveedor\",$reg_proveedor,\" where IDPROVEEDOR = '$datos[IDPROVEEDOR]'\");\n\t\t\t\t$this->update(\"$this->catalogo.catalogo_proveedor_ubigeo\",$prov_ubigeo,\" where IDPROVEEDOR = '$datos[IDPROVEEDOR]'\");\n\t\t\t}\n\n\t\t\tif ($datos[IDPROVEEDOR]!='')\n\t\t\t{\n\t\t\t\tfor($i=0;$i<count($datos_telf[NUMEROTELEFONO]);$i++)\n\t\t\t\t{\n\t\t\t\t\t$telf[IDPROVEEDOR] = $datos[IDPROVEEDOR];\n\t\t\t\t\t$telf[CODIGOAREA]=$datos_telf[CODIGOAREA][$i];\n\t\t\t\t\t$telf[IDTIPOTELEFONO]=$datos_telf[IDTIPOTELEFONO][$i];\n\t\t\t\t\t$telf[NUMEROTELEFONO]=$datos_telf[NUMEROTELEFONO][$i];\n\t\t\t\t\t$telf[EXTENSION]=$datos_telf[EXTENSION][$i];\n\t\t\t\t\t$telf[IDTSP]=$datos_telf[IDTSP][$i];\n\t\t\t\t\t$telf[COMENTARIO]=$datos_telf[COMENTARIO][$i];\n\t\t\t\t\t$telf[IDUSUARIOMOD] = $datos_telf[IDUSUARIOMOD];\n\t\t\t\t\t$telf[PRIORIDAD]=$i+1;\n\n\t\t\t\t\t$this->insert_reg(\"$this->catalogo.catalogo_proveedor_telefono\",$telf);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$datos_sociedad = $datos[IDSOCIEDAD];\n\n\n\t\t\t// GRABA LOS SERVICIOS DEL PROVEEDOR //\n\t\t\t$sql=\"delete from catalogo_proveedor_servicio where IDPROVEEDOR='$datos[IDPROVEEDOR]'\";\n\t\t\t$this->query($sql);\n\n\t\t\t$nueva_prioridad=1;\n\n\t\t\tforeach ($datos[CHECKSERVICIO] as $servi)\n\t\t\t{\n\t\t\t\t$servicio[IDSERVICIO] = $servi;\n\t\t\t\t$servicio[IDPROVEEDOR] = $datos[IDPROVEEDOR];\n\t\t\t\t$servicio[PRIORIDAD] = $nueva_prioridad;\n\t\t\t\t$servicio[IDUSUARIOMOD] = $datos[IDUSUARIOMOD];\n\n\t\t\t\tif ($servi!='')\n\t\t\t\t{\n\t\t\t\t\t$this->insert_reg('catalogo_proveedor_servicio',$servicio);\n\t\t\t\t\t$nueva_prioridad++;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// GRABA LAS SOCIEDADES DEL PROVEEDOR\n\t\t\t$sql=\"delete from catalogo_proveedor_sociedad where IDPROVEEDOR='$datos[IDPROVEEDOR]'\";\n\t\t\t$this->query($sql);\n\t\t\tforeach ($datos[IDSOCIEDAD] as $soc)\n\t\t\t{\n\t\t\t\t$sociedad[IDSOCIEDAD] = $soc;\n\t\t\t\t$sociedad[IDPROVEEDOR] = $datos[IDPROVEEDOR];\n\t\t\t\t$sociedad[IDUSUARIOMOD] = $datos[IDUSUARIOMOD];\n\t\t\t\t$this->insert_reg('catalogo_proveedor_sociedad',$sociedad);\n\t\t\t}\n\t\t\treturn $datos[IDPROVEEDOR];\n\t\t}\n\t\treturn $datos[IDPROVEEDOR];\n\t}", "private function f_ListarValidado(){\n $lobj_AccesoZona = new cls_AccesoZona;\n //creo la peticion\n $pet = array(\n 'operacion' => 'buscarZonas',\n 'codigo_usuario' => $_SESSION['Con']['Nombre']\n );\n //guardo los datos en el objeto y gestiono para obtener una respuesta\n $lobj_AccesoZona->setPeticion($pet);\n $zona = $lobj_AccesoZona->gestionar();\n $cadenaBusqueda = ' where codigo_zona in(';\n if($zona['success'] == 1){\n for($x = 0;$x < count($zona['registros']) - 1; $x++){\n $cadenaBusqueda .= $zona['registros'][$x].',';\n }\n $cadenaBusqueda .= $zona['registros'][count($zona['registros']) - 1].' ';\n }\n $cadenaBusqueda .= \") \";\n $cadenaBusqueda .= ($this->aa_Atributos['valor']=='')?'':\"and nombre_finca like '%\".$this->aa_Atributos['valor'].\"%'\";\n $ls_SqlBase=\"SELECT * FROM agronomia.vfinca $cadenaBusqueda\";\n $orden = ' order by codigo_productor,letra';\n $ls_Sql = $this->f_ArmarPaginacion($ls_SqlBase,$orden);\n $x=0;\n $la_respuesta=array();\n $this->f_Con();\n $lr_tabla=$this->f_Filtro($ls_Sql);\n while($la_registros=$this->f_Arreglo($lr_tabla)){\n $la_respuesta[$x]['codigo']=$la_registros['codigo_productor'];\n $la_respuesta[$x]['nombre']=$la_registros['codigo_productor'].'-'.$la_registros['letra'];\n $la_respuesta[$x]['id_finca']=$la_registros['id_finca'];\n $x++;\n }\n $this->f_Cierra($lr_tabla);\n $this->f_Des();\n $this->aa_Atributos['registros'] = $la_respuesta;\n $lb_Enc=($x == 0)?false:true;\n return $lb_Enc;\n }", "public function consultaRetorno($id_retorno, $primeiraPalavraCliente, $ultimoRetorno, $consultaUltima)\n {\n $this->logSis('DEB', 'Entrou no Retorno. idRetorno: ' . $id_retorno . ' Palavra: ' . $primeiraPalavraCliente . ' UltimoRetorno: ' . $ultimoRetorno . ' Tipo da consulta: ' . $consultaUltima['tipo']);\n\n include(\"dados_conexao.php\");\n include_once(\"horarios.php\");\n include_once(\"servicos.php\");\n\n\n\n if ($consultaUltima['tipo'] == 8) { //( Verifica se o retorno trata-se de uma marcação de horário\n\n\n //( Verifica qual o último subtipo para pesquisar o próximo retorno de acordo com o próximo subtipo\n if ($consultaUltima['subtipo'] == 'mes') {\n $proximoSubtipo = 'dia';\n } else if ($consultaUltima['subtipo'] == 'dia') {\n $proximoSubtipo = 'hora';\n } else if ($consultaUltima['subtipo'] == 'hora') { //( Envia a pergunta de confirmação\n $this->logSis('DEB', 'Entrou no subtipo Hora');\n if (is_numeric($primeiraPalavraCliente)) {\n $this->logSis('DEB', 'É número');\n\n //( Decodifica o Json que foi salvo no BD\n $opcoes = json_decode($this->opcoesVariaveis, true);\n $this->logSis('DEB', 'opcoes->' . print_r($opcoes, true));\n\n $indice = array_search($primeiraPalavraCliente, array_column($opcoes, 'ind'));\n $idHorario = $opcoes[$indice]['id'];\n $this->logSis('DEB', 'idHorario->' . $idHorario);\n\n\n //( Consulta o horário encontrado pra ver se está disponível ainda\n\n $result = fctConsultaParaArray(\n 'ConsultaHorario',\n \"SELECT *, DATE_FORMAT(horario, '%d/%m/%Y %H:%i') AS hora_formatada FROM tbl_horarios WHERE status = 1 AND horario >= NOW() AND id_horario = $idHorario\",\n array('hora_formatada')\n );\n $this->logSis('DEB', 'result->' . print_r($result, true));\n\n if ($result == false) {\n //& VEr se realmente vai ser possível escolher um outro horário\n //& Sugestão aqui seria voltar ao menu anterior\n $this->sendMessage('MensageErro', $this->numero, \"Esse horário não está mais disponível, favor escolher uma outra data.\", \"\");\n } else {\n $horaFormatada = $result[0]['hora_formatada'];\n $texto = \"CONFIRME O HORÁRIO\\n\";\n $texto .= \"*$horaFormatada*\\n\\n\";\n $texto .= \"Você confirma esse horário?\";\n\n $arrayRetorno = array(\n \"modo\" => 9, //tipo confirmação\n \"subtipo\" => 'horario',\n \"id_retorno\" => '',\n \"opcoes\" => $idHorario\n );\n\n //& Organizar o array retorno\n $this->confirmacao($texto, $arrayRetorno);\n }\n } else {\n $this->sendMessage('MensageErro', $this->numero, \"Responda somente com o número referente à opção desejada.\", \"\");\n }\n }\n\n //( Faz a pesquisa do retorno\n $sql = \"SELECT * FROM tbl_retornos WHERE tipo = 8 AND coringa = '$proximoSubtipo'\";\n } else if ($consultaUltima['tipo'] == 9) { //( Uma solicitação de confirmação\n\n //( Verifica que é uma confirmação de horário \n if ($consultaUltima['subtipo'] == 'horario') {\n\n //( Verifica se tem SIM ou NÃO na mensagem do cliente\n $nao = $this->verficaPalavras('', $this->mensagem, array('não', 'nao', 'NÃO', 'Nao', 'NAO', 'NO', 'no'));\n $sim = $this->verficaPalavras('', $this->mensagem, array('sim', 'Sim', 'Si', 'si', 'SI', 'sin', 'Sin', 'SIN', 'SIM'));\n\n\n if ($nao == 1) { //( Se tiver NÃO, é enviada o MENU RAIZ \n $this->envioMenuRaiz($this->numero, \"*OPERAÇÃO CANCELADA*\\n\\n\");\n } else if ($sim == 1) { //( Se tiver SIM, é reservado o horário\n $this->reservaHorario($this->opcoesVariaveis);\n } else { //( Se na mensagem não tem nem SIM nem Não, é enviado a mensagem de erro dizendo que não entendeu\n $this->sendMessage('MensageErro', $this->numero, \"Não compreendi a sua resposta, favor responder exatamente como foi solicitado.\", \"\");\n }\n }\n } else if ($id_retorno == '') { //ou seja, não sei qual o retorno\n $sql = \"SELECT * FROM tbl_retornos WHERE id_retorno = (SELECT resposta FROM tbl_opcoes WHERE id_instancia = $this->idInstancia AND indice = '$primeiraPalavraCliente' AND id_retorno = $ultimoRetorno)\";\n } else { //Sei qual o retorno atual\n //$idInstancia = $this->idInstancia;\n $sql = \"SELECT * FROM tbl_retornos WHERE id_instancia = $this->idInstancia AND id_retorno = $id_retorno\";\n }\n\n $this->logSis('DEB', $sql);\n\n $query = mysqli_query($conn['link'], $sql);\n $consultaRetorno = mysqli_fetch_array($query, MYSQLI_ASSOC);\n $this->logSis('DEB', 'Sql: ' . $sql . ' consultaRetorno->' . print_r($consultaRetorno, true));\n\n $numRow = mysqli_num_rows($query);\n if (!$query) {\n $this->logSis('ERR', 'Mysql Connect: ' . mysqli_error($conn['link']));\n exit(0);\n }\n if ($numRow == 0) { //VERIFICA SE EXISTE NO BANCO DE DADOS\n $this->logSis('ERR', 'Não encontrou a mensagem inicial Instância. Instância: ' . $this->idInstancia);\n exit(0);\n } else {\n\n //& VERIFICAR AQUI SE VAI TER AMBIGUIDADE COM A PRIMEIRA CONSULTA \n $id_retorno = $consultaRetorno['id_retorno']; //ID da tabela retorno (chave)\n $mensagem = utf8_encode($consultaRetorno['mensagem']);\n //Consulta das opções\n $sql = \"SELECT * FROM tbl_opcoes WHERE listavel = 1 AND id_instancia = $this->idInstancia AND id_retorno = $id_retorno ORDER BY indice ASC\";\n $this->logSis('DEB', $sql);\n\n $query = mysqli_query($conn['link'], $sql);\n $numRow = mysqli_num_rows($query);\n\n //Teste DEploy\n if ($numRow != 0) {\n $mensagem .= \"\\n\";\n while ($opcao = mysqli_fetch_array($query)) {\n $mensagem .= '*' . $opcao['indice'] . '.* ' . utf8_encode($opcao['mensagem']) . \"\\n\";\n }\n if ($consultaRetorno['modo'] == 1 && $consultaRetorno['id_retorno'] != $this->menuRaiz) {\n $mensagem .= \"*0.* Voltar ao menu anterior\\n\";\n }\n }\n\n $retorno = array(\n 'id_retorno' => $consultaRetorno['id_retorno'],\n 'nome' => $consultaRetorno['nome'],\n 'modo' => $consultaRetorno['modo'],\n 'tipo' => $consultaRetorno['tipo'],\n 'coringa' => $consultaRetorno['coringa'], //para tipo 6 (Inclusão lista) -> lista_X\n 'mensagem' => $mensagem,\n 'url' => $consultaRetorno['url'],\n 'lat' => $consultaRetorno['lat'],\n 'lng' => $consultaRetorno['lng'],\n 'name' => $consultaRetorno['name'],\n 'address' => $consultaRetorno['address']\n );\n $this->logSis('DEB', 'Retorno->' . print_r($retorno, true));\n\n return $retorno;\n }\n }", "function grabar_experiencia($datos)\n\t{\n\n\t\tif ($this->exist(\"$this->catalogo.catalogo_proveedor_experiencia\",'EMPRESAREFERENCIA',\" WHERE EMPRESAREFERENCIA ='$datos[EMPRESAREFERENCIA]'\"))\n\t\t{\n\t\t\t$this->update(\"$this->catalogo.catalogo_proveedor_experiencia\",$datos, \" WHERE EMPRESAREFERENCIA ='$datos[EMPRESAREFERENCIA]' \");\n\t\t}\n\t\telse {\n\t\t\t$this->insert_reg(\"$this->catalogo.catalogo_proveedor_experiencia\", $datos);\n\t\t}\n\t\treturn;\n\t}", "private function _consultar() {\n $where = \"\";\n if(!empty($this->_idDato)){\n $where = \"AND b.id_valor = $this->_idDato \";\n }\n if(!empty($this->_valor)){\n if(is_array($this->_valor)){\n $aux = each($this->_valor);\n $where = \"AND b.valor {$aux['key']} '{$aux['value']}' \";\n }else{\n $where = \"AND b.valor = '$this->_valor' \";\n }\n \n }\n $query = \"SELECT a.nom_tabla,b.* FROM \nmt_tablas a,\nmt_contenidos b\nWHERE a.id_tablas = {$this->_idTabla}\nAND a.estado = 1 $where\nAND a.id_tablas = b.id_tabla\nAND b.estado = 1\";\n \n if(is_array($this->_orden) && count($this->_orden) == 2){\n $query .= (\" ORDER BY \" . ($this->_orden[0] == 1 ? \"id_valor \" : \"valor \") . $this->_orden[1] );\n }\n $con = ConexionSQL::getInstance();\n $id = $con->consultar($query);\n if($res = $con->obenerFila($id)){\n $R = array();\n do{\n $aux = array();\n foreach($res as $key => $valor){\n if(!is_numeric($key)){\n $aux[$key] = $valor;\n }\n }\n $R[] = $aux;\n }while($res = $con->obenerFila($id));\n return $R;\n }\n return false;\n }", "function RellenaDatosPorEdificio()\n{\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->CODEDIFICIO') \n\t\t\t)\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devuelve el mensaje\n}", "function consulta_registro_compras_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n\t, prosic_comprobante.referencia_fecha\n\t, prosic_comprobante.referencia_serie\n\t, prosic_comprobante.referencia_nro\n\t, prosic_comprobante.referecia_tipo_doc\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=3\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY prosic_tipo_comprobante.sunat_tipo_comprobante,prosic_comprobante.codigo_comprobante\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function getRegistrosRelacionamento($tabela_associativa, $tabela_tradicional, $campo_selecao, $campo_comparacao, $value_comparacao){\n\t$sql = \"select $campo_selecao from $tabela_associativa as ta, $tabela_tradicional as tt where ta.cd_$campo_selecao = tt.id_$campo_selecao and ta.$campo_comparacao = $value_comparacao\";\n\t$rs = mysql_query($sql);\n\t\n\t$i = 0;\n\twhile($row = mysql_fetch_array($rs)){\n\t\t$registros[$i] = $row[0];\n\t\t$i++;\n\t}\n\t\n\tif($i == 0) $registros = NULL;\n\t\n\treturn $registros;\n}", "function consultarUna(){\n try {\n $IDREQ=$this->objRequerimiento->getIDREQ();\t\n $objControlConexion = new ControlConexion();\n $objControlConexion->abrirBd();\n $comandoSql = \"select FKAREA from Requerimiento where IDREQ = '\".$IDREQ.\"' \";\n $rs = $objControlConexion->ejecutarSelect($comandoSql);\n $registro = $rs->fetch_array(MYSQLI_BOTH);\n ($registro!=null)?$id = $registro[\"FKAREA\"]:$id = \"undefine\";\n $this->objRequerimiento->setID($id);\n $objControlConexion->cerrarBd();\n return $this->objRequerimiento;\n } catch(PDOException $e) {\n echo \"Error: \" . $e->getMessage();\n }\n }", "function consulta_personalizada_registro_compras_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=3\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY CAST(prosic_comprobante.codigo_comprobante AS UNSIGNED),prosic_tipo_comprobante.sunat_tipo_comprobante\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function RellenaDatos()\n {\t// se construye la sentencia de busqueda de la tupla\n $sql = \"SELECT * FROM ENTREGA WHERE (IdTrabajo = '$this->idTrabajo' AND login = '$this->login')\";\n // Si la busqueda no da resultados, se devuelve el mensaje de que no existe\n if (!($resultado = $this->mysqli->query($sql))){\n return 'No existe en la base de datos'; //\n }\n else{ // si existe se devuelve la tupla resultado\n $result = $resultado->fetch_array();\n return $result;\n }\n }", "function comprobanteEstaRepetido($cuie, $periodo, $prestacionid, $idprestacion, $idrecepcion, $datosnomenclador, $elcomprobante, $fechaprestacion, $beneficiario, $idfactura, $idvacuna) {\r\n // repitiendo el id de prestacion interno, cosa que no sucede casi nunca\r\n $query = \"SELECT fc.cuie as cuie, ff.recepcion_id AS idrecepcion, id_debito,fp.id_prestacion\r\n FROM facturacion.factura ff \r\n INNER JOIN facturacion.comprobante fc ON (ff.id_factura = fc.id_factura) \r\n INNER JOIN facturacion.prestacion fp ON (fc.id_comprobante = fp.id_comprobante) \r\n LEFT JOIN facturacion.debito d ON (fc.id_comprobante=d.id_comprobante)\r\n WHERE fc.cuie='$cuie' \r\n AND ff.periodo='$periodo' \r\n AND fc.idprestacion='$prestacionid'\r\n AND fp.id_prestacion<>$idprestacion\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $ctrl_repetido['debito'] = false;\r\n $yadebitado = $resultado->fields['id_debito'];\r\n $recibidodespues = $resultado->fields['id_prestacion'] < $prestacionid;\r\n if (($resultado->RecordCount() > 0) && !($yadebitado) && $recibidodespues) {\r\n //$var['existe_id'] = 'si';\r\n $idrecepcion_idb = $resultado->fields['idrecepcion'];\r\n if ($idrecepcion_idb != $idrecepcion) {\r\n $ctrl_repetido['msj_error'] = 'ID Prestacion ya existente en el sistema';\r\n $ctrl_repetido['id_error'] = 73;\r\n }\r\n if ($idrecepcion_idb == $idrecepcion) {\r\n $ctrl_repetido['msj_error'] = 'ID Prestacion ya existente en el archivo';\r\n $ctrl_repetido['id_error'] = 74;\r\n }\r\n $ctrl_repetido['debito'] = true;\r\n } else {\r\n if (esNomencladorVacuna($datosnomenclador)) {\r\n\r\n //Controles para los nomencladores que son vacuna\r\n $query = \"SELECT fc.id_comprobante, nro_exp\r\n FROM facturacion.prestacion fp\r\n INNER JOIN facturacion.comprobante fc ON (fc.id_comprobante = fp.id_comprobante)\r\n INNER JOIN facturacion.factura f ON (fc.id_factura=f.id_factura)\r\n WHERE id_prestacion<>$idprestacion\r\n\t\tAND fc.fecha_comprobante=to_date('$fechaprestacion','DD-MM-YYYY')\r\n AND fp.id_nomenclador='\" . $datosnomenclador[0] . \"'\r\n\t\tAND fc.clavebeneficiario='$beneficiario'\r\n AND fc.id_comprobante<>'$elcomprobante'\r\n AND fc.idvacuna='$idvacuna'\r\n\t\tAND fc.id_comprobante NOT IN(\r\n SELECT id_comprobante \r\n FROM facturacion.debito \r\n WHERE id_factura='$idfactura')\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $recibidodespues = $resultado->fields['id_comprobante'] < $idcomprobante;\r\n if (($resultado->RecordCount() > 0) && ($recibidodespues)) {\r\n $ctrl_repetido['msj_error'] = 'Prestacion liquidada en Expediente: ' . $resultado->fields['nro_exp'];\r\n $ctrl_repetido['id_error'] = 74;\r\n $ctrl_repetido['debito'] = true;\r\n }\r\n } else {\r\n\r\n //Controles para los nomencladores que no son de vacu\r\n $query = \"SELECT fc.id_comprobante, nro_exp\r\n FROM facturacion.prestacion fp\r\n INNER JOIN facturacion.comprobante fc ON (fc.id_comprobante = fp.id_comprobante)\r\n INNER JOIN facturacion.factura f ON (fc.id_factura=f.id_factura)\r\n WHERE id_prestacion<>$idprestacion\r\n\t\tAND fc.fecha_comprobante=to_date('$fechaprestacion','DD-MM-YYYY')\r\n\t\tAND fp.id_nomenclador='\" . $datosnomenclador[0] . \"'\r\n\t\tAND fc.clavebeneficiario='$beneficiario'\r\n AND fc.id_comprobante<>'$elcomprobante'\r\n\t\tAND fc.id_comprobante NOT IN(\r\n SELECT id_comprobante \r\n FROM facturacion.debito \r\n WHERE id_factura='$idfactura')\";\r\n $resultado = sql($query, \"Error al buscar comprobante repetido\", 0) or excepcion(\"Error al buscar comprobante repetido\");\r\n $recibidodespues = $resultado->fields['id_comprobante'] < $idcomprobante;\r\n if (($resultado->RecordCount() > 0) && ($recibidodespues)) {\r\n $ctrl_repetido['msj_error'] = 'Prestacion liquidada en Expediente: ' . $resultado->fields['nro_exp'];\r\n $ctrl_repetido['id_error'] = 74;\r\n $ctrl_repetido['debito'] = true;\r\n }\r\n }\r\n }\r\n return $ctrl_repetido;\r\n}", "function VerificarRegistrosNuevos(){\n $obCon = new Backups($_SESSION['idUser']);\n $sql=\"SHOW FULL TABLES WHERE Table_type='BASE TABLE'\";\n $consulta=$obCon->Query($sql);\n $i=0;\n $RegistrosXCopiar=0;\n $TablasLocales=[];\n \n while ($DatosTablas=$obCon->FetchArray($consulta)){\n $Tabla=$DatosTablas[0];\n if($Tabla<>'precotizacion' and $Tabla<>'preventa'){\n $sql=\"SELECT COUNT(*) as TotalRegistros FROM $Tabla WHERE Sync = '0000-00-00 00:00:00' OR Sync<>Updated\";\n $ConsultaConteo=$obCon->Query($sql);\n $Registros=$obCon->FetchAssoc($ConsultaConteo);\n $TotalRegistros=$Registros[\"TotalRegistros\"];\n if($TotalRegistros>0){ \n $RegistrosXCopiar=$RegistrosXCopiar+$TotalRegistros;\n $TablasLocales[$i][\"Nombre\"]=$Tabla;\n $TablasLocales[$i][\"Registros\"]=$TotalRegistros;\n $i++; \n }\n }\n }\n\n print(\"OK;$RegistrosXCopiar;\".json_encode($TablasLocales, JSON_FORCE_OBJECT));\n }", "function consulta_registro_ventas_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=2\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY prosic_tipo_comprobante.sunat_tipo_comprobante,CAST(prosic_comprobante.codigo_comprobante AS UNSIGNED)\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function controlPracticasRelacionadas($clavebeneficiario, $fecha_comprobante, $datosnomenclador) {\r\n\r\n $ctrl['debito'] = false;\r\n $query = \"SELECT *\r\n FROM facturacion.cfg_practicas_relac\r\n WHERE modo=1 and\r\n trim(pracorigen)=trim('$datosnomenclador[3]')\";\r\n $res_origen = sql($query, \"Error 1\") or fin_pagina();\r\n\r\n if ($res_origen->RecordCount() > 0) {\r\n $ctrl['msj_error'] = \"\";\r\n $res_origen->MoveFirst();\r\n while (!$res_origen->EOF) {\r\n $anexo = $res_origen->fields['anexopracrel'];\r\n $nomencladordetalles['tipo'] = $datosnomenclador[2];\r\n $nomencladordetalles['codigo'] = $res_origen->fields['pracrel'];\r\n //busca si ese afiliado se realiza la practica relacionada\r\n $comprobantedelarelacionada = traemeLaPractica($clavebeneficiario, $nomencladordetalles, $fecha_comprobante, $anexo);\r\n if ($comprobantedelarelacionada != null) {\r\n $limite_dias = $res_origen->fields['dias'];\r\n $limite_dias_time = dias_time($limite_dias);\r\n $fecha_comprobante_time = strtotime(date($fecha_comprobante));\r\n $comprobantedelarelacionada_time = strtotime(date($comprobantedelarelacionada));\r\n $resta_time = $fecha_comprobante_time - $comprobantedelarelacionada_time;\r\n if ($resta_time <= $limite_dias_time) {\r\n //una vez que esta comprobado que se realizo la practica dentro de los 30 dias,\r\n //comprueba si existe otra condicion, o si no es obligatoria y sale. \r\n //TODO: no existe while para otras practicas obligatorias\r\n if (($res_origen->fields['otras'] == 'N') || ($res_origen->fields['tipo'] == 'OR')) {\r\n $ctrl['debito'] = false;\r\n break;\r\n }\r\n } else {\r\n if ($ctrl['msj_error'] != \"\") {\r\n $ctrl['msj_error'].=\" y \";\r\n }\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . '] dentro del limite de tiempo';\r\n $ctrl['id_error'] = '76';\r\n $ctrl['nomenclador_rel'] = $nomencladordetalles['codigo'];\r\n if ($res_origen->fields['tipo'] == 'AND')\r\n break;\r\n }\r\n } else {\r\n if ($ctrl['msj_error'] != \"\") {\r\n $ctrl['msj_error'].=\" y \";\r\n }\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . ']';\r\n $ctrl['id_error'] = '75';\r\n $ctrl['nomenclador_rel'] = $nomencladordetalles['codigo'];\r\n if ($res_origen->fields['tipo'] == 'AND')\r\n break;\r\n }\r\n $res_origen->MoveNext();\r\n }\r\n }\r\n return $ctrl;\r\n}", "function listarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_sel';\n\t\t$this->transaccion='VF_REFACOR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_venta', 'id_venta', 'int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_reenvio_factura','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_venta','int4');\n\t\t$this->captura('correo','varchar');\n\t\t$this->captura('correo_copia','varchar');\n\t\t$this->captura('observacion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('estado_envio_correo','int4');\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}", "function consulta($sql=false,$F=false,$accesos=false){\n if ($sql==false){return false;}\n if(is_utf8($sql)){ $sql = utf8_decode($sql); }\n if(is_array($accesos) && $accesos!=false){\n $servidor = (isset($accesos['servidor']))?$accesos['servidor']:__servidor;\n $base = (isset($accesos['base']))?$accesos['base']:__base;\n $usuario = (isset($accesos['usuario']))?$accesos['usuario']:__usuario;\n $contrasena = (isset($accesos['contrasena']))?$accesos['contrasena']:__contrasena;\n \n }else{\n $servidor = __servidor;\n $base = __base;\n $usuario = __usuario;\n $contrasena = __contrasena;\n }\n $conector = mysqli_connect($servidor , $usuario , $contrasena , $base);\n\n $resultado = mysqli_query($conector , $sql); \n if ($F==false){\n $result['filas_afectadas'] = mysqli_affected_rows($conector);\n $result['IDI'] = mysqli_insert_id($conector); // Ultimo ID insertado\n $qr = $result;\n }else {\n if (!$resultado) {\n $qr = false;\n }else{\n $contador = 0;\n while ($fila = mysqli_fetch_assoc($resultado)){\n $R['resultado'][$contador] = $fila;\n $contador++;\n }\n $R['filas'] = mysqli_num_rows($resultado);\n $R['filas_afectadas'] = mysqli_affected_rows($conector);\n \n if($R['filas']==0){\n $qr = false;\n }else{\n $qr = $R;\n }\n }\n }\n mysqli_close($conector);\n return $qr;\n }", "function localidadConsultarCitasxAutor($res, $idEspecie) {\n\n\t// creando el arreglo de autores para la especie \t\n\t$total = getNumFilas($res); $localidades=\"\";\n\t\n\t$arrayAL1[20] = array(\t\"autor\" => 0, \n\t\t\t\t\t\t\t\t\t\t\t\"idlocalidad\" => 0, \n\t\t\t\t\t\t\t\t\t\t\t\"localidad\" => \"\");\n\t$i=0; $pos = 0;\n\twhile ($i < $total) {\n\t\t$actual = getFila($res);\n\t\t$autores = $actual[\"referencias_id\"];\n\t\t$autores = explode(\",\", $autores);\n\t\t\n\t\tfor ($j = 1; $j < count($autores); $j++) {\n\t\t\tif (!(in_array($autores[$j], $arrayAL1) )) {\n\t\t\t\t\t$arrayAL1[$pos][\"autor\"] = $autores[$j]; \n\t\t\t\t\t$arrayAL1[$pos][\"idlocalidad\"] = $actual[\"localidades_id\"];\n\t\t\t\t\t$arrayAL1[$pos][\"localidad\"] = localidadConsultarNombre($actual[\"localidades_id\"]);\n\t\t\t\t\t$pos++;\n\t\t\t\t}\n\t\t}\n\t$i++;\n\t}\n\t\n\tforeach ($arrayAL1 as $key => $row) {\n\t\t$autor[$key] = $row[\"autor\"];\n\t\t$idlocalidad[$key] = $row[\"idlocalidad\"];\n\t\t$localidad[$key] = $row[\"localidad\"];\n\t}\n\n\tarray_multisort($autor, SORT_ASC, $localidad, SORT_ASC, $arrayAL1);\n\t// print_r($arrayAL1) . \"<br />\"; // muestra cada línea del arreglo $arrayAL1\t\t\t\t\n\n\t// armamos la lista de autores y localidades que reportan\n\t$localidades = \"\"; $total = count($arrayAL1);\n\t$idAutor = 0;\n\tfor ($k = 1; $k < $total; $k++) {\n\t\t\n\t\tif ($idAutor != $arrayAL1[$k][\"autor\"])\n\t\t{\t// nuevo autor\n\t\t\t if ($k>1) $localidades .= \"); \"; // separación entre autores\n\t\t\t $autorRef = \"\"; $agno = \"\";\n\t\t\t consultarCitaxId($arrayAL1[$k][\"autor\"], $autorRef, $agno);\n\t\t\t $localidades .= \"<b>\". $autorRef . \", \" . $agno . \" </b> (\";\n\t\t\t $localidades .= $arrayAL1[$k][\"localidad\"];\t\n\t\t} \n\t\telse { // localidades para el mismo autor\n\t\t\t $localidades .= \", \" . $arrayAL1[$k][\"localidad\"];\n\t\t}\n\t\t$idAutor = $arrayAL1[$k][\"autor\"] ;\n\t}\t // end for\n\tif ($total > 1 ) $localidades .= \").\";\n\telse $localidades = \"\";\n\t\nreturn $localidades;\n}", "public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "function comparar_correo_pago($id_user,$correo, $cedula, $id_transferencia, $pasarela)//comparar correo para ver si existe\r\n\t{ \r\n\t\t\r\n\t\t$conexion=conexion();\r\n\t\t$contador=0;\r\n\t\t$sql=\"SELECT CORREO, CEDULA FROM dato_persona WHERE CORREO = :corre OR CEDULA = :cedu\";\r\n\t\t$resultado=$conexion->prepare($sql);\r\n\t\t$resultado->execute(array(\":corre\"=>$correo, \":cedu\"=>$cedula));\r\n\t\twhile($consulta=$resultado->fetch(PDO::FETCH_ASSOC)){\r\n\t\t\t\r\n\t\t\tif($consulta['CORREO']==$correo && $consulta['CEDULA']==$cedula)\r\n\t\t\t{\t\t\t\t\r\n\t\t\t\t$contador+=4;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\t\tif($contador==0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$error3= \"error: los datos que esta registrando no parecen validos o ya estan registrados, intentelo nuevamente\";\r\n\t\t\t\theader(\"location:confirmar_pago.php?trampa3=$error3&id=$id_user\");\r\n\t\t\t\t}\r\n\t\t\t\telseif($contador==4)\r\n\t\t\t\t{\r\n\t\t\t\t\tcomparar_todo1($id_user, $correo, $id_transferencia, $pasarela);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t}", "public function consulta_asistencia()\n {\n $fecha_reporte = cambiaf_a_mysql($this->txt_fecha_desde->Text);\n $dir = $this->drop_direcciones->SelectedValue;\n $cod_organizacion = usuario_actual('cod_organizacion');\n\n // se obtienen las justificaciones del día seleccionado\n $sql=\"SELECT (p.cedula) as cedula_just, p.nombres, p.apellidos, j.codigo, jd.fecha_desde, jd.hora_desde,\n jd.fecha_hasta, jd.hora_hasta, jd.observaciones, jd.lun, jd.mar, jd.mie, jd.jue, jd.vie,\n tf.descripcion as descripcion_falta, tj.descripcion as descripcion_tipo_justificacion\n\t\t\t\t\t FROM asistencias.justificaciones as j, asistencias.justificaciones_dias as jd,\n\t\t\t\t\t\t asistencias.justificaciones_personas as jp, organizacion.personas as p, organizacion.personas_nivel_dir as n, asistencias.tipo_faltas tf, asistencias.tipo_justificaciones tj\n\t\t\t\t\t\tWHERE ((p.cedula = jp.cedula) and\n\t\t\t\t\t\t (p.cedula = n.cedula) and (jd.codigo_tipo_falta = tf.codigo) and (tj.id = jd.codigo_tipo_justificacion) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t (jd.fecha_desde <= '$fecha_reporte') and\n\t\t\t\t\t\t\t (jd.fecha_hasta >= '$fecha_reporte') and\n\t\t\t\t\t\t\t (j.estatus='1') and (j.codigo=jd.codigo_just) and (j.codigo=jp.codigo_just))\n\t\t\t\t\t\tORDER BY p.nombres, p.apellidos, jp.cedula \";\n $this->justificaciones=cargar_data($sql,$this); \n\n // se obtiene el horario vigente para la fecha seleccionada\n $this->horario_vigente = obtener_horario_vigente($cod_organizacion,$fecha_reporte,$this);\n \n // se realizan las consultas para mostrar los listados\n // Se consultan los asistentes\n $sql=\"SELECT (p.cedula) as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre,\n e.cedula, e.fecha, MIN(e.hora) as entrada, MAX(e.hora) as salida\n FROM asistencias.entrada_salida as e, organizacion.personas as p, organizacion.personas_nivel_dir as n\n WHERE ((p.cedula = e.cedula) and\n (p.cedula = n.cedula) and\n (n.cod_direccion LIKE '$dir%') and\n (p.fecha_ingreso <= '$fecha_reporte') and\n (e.fecha <= '$fecha_reporte') and\n (e.fecha >= '$fecha_reporte'))\n GROUP BY e.cedula\n ORDER BY entrada, p.nombres, p.apellidos \";\n $this->asistentes=cargar_data($sql,$this);\n $this->ind_asistentes = count($this->asistentes);\n\n // se consultan los inasistentes\n $sql2=\"SELECT p.cedula as cedula_integrantes, CONCAT(p.nombres,' ',p.apellidos) as nombre\n\t\t\t\t\t\t\t\t\t FROM organizacion.personas as p, asistencias.personas_status_asistencias as s,\n\t\t\t\t\t\t\t\t\t organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t WHERE ((s.status_asistencia = '1') and\n\t\t\t\t\t\t\t\t\t \t\t (s.cedula = p.cedula) and\n\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%') and\n\t\t\t\t\t\t\t\t\t (p.fecha_ingreso <= '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t (p.cedula not in\n\t\t\t\t\t\t\t\t\t (SELECT e.cedula\n\t\t\t\t\t\t\t\t\t\t FROM asistencias.entrada_salida as e, organizacion.personas_nivel_dir as n\n\t\t\t\t\t\t\t\t\t\t \t WHERE ((e.fecha = '$fecha_reporte') and\n\t\t\t\t\t\t\t\t\t\t\t\t (p.cedula = n.cedula) and\n\t\t\t\t\t\t\t (n.cod_direccion LIKE '$dir%'))\n\t\t\t\t\t\t\t\t\t\t\t GROUP BY e.cedula)))\n\t\t\t\t\t\t\t\t\t ORDER BY p.nombres, p.apellidos\";\n $this->inasistentes=cargar_data($sql2,$this);\n\n\n // Se consultan los asistentes para comparar inconsistencia de horas en el marcado\n // Si le falta hora\n $inconsistentes = array();\n foreach($this->asistentes as $arreglo){\n \n $sql2=\"SELECT COUNT(*) as n_horas FROM asistencias.entrada_salida as e\n\t\t\t WHERE e.fecha = '$fecha_reporte' AND e.cedula = '$arreglo[cedula_integrantes]' \";\n $resultado2=cargar_data($sql2,$this);\n if(!empty($resultado2)){\n if ($resultado2[0][n_horas]%2!=0) {//impar\n array_unshift($inconsistentes, array('cedula'=>$arreglo[cedula_integrantes], 'nombre'=>$arreglo[nombre],'salida'=>$arreglo[salida]));\n }//fin si\n }//fin si\n }//fin each\n\n\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n //$this->DataGrid_fj->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n if(!empty($inconsistentes)){\n $this->DataGrid_fh->DataSource=$inconsistentes;\n $this->DataGrid_fh->dataBind();\n }\n\n // Se enlaza el nuevo arreglo con el listado de Direcciones\n $this->DataGrid->Caption=\"Reporte de Asistencias del \".$this->txt_fecha_desde->Text;\n $this->DataGrid->DataSource=$this->asistentes;\n $this->DataGrid->dataBind();\n\n\n $this->DataGrid_ina->Caption=\"Inasistentes el d&iacute;a \".$this->txt_fecha_desde->Text;\n $this->DataGrid_ina->DataSource=$this->inasistentes;\n $this->DataGrid_ina->dataBind();\n\n /* Por un error que no supe identificar, el cual suma un numero adicional a la variable\n * de inasistentes no justificados, he tenido que sacarla del procedimiento donde normalmente\n * se contaba y tuve que realizarla por resta en esta sección.\n */\n $this->ind_inasistentes_no_just = count($this->inasistentes) - $this->ind_inasistentes_si_just;\n\n $this->Repeater->DataSource = $this->justificaciones;\n $this->Repeater->dataBind();\n\n $xale=rand(100,99999);\n // Se realiza la construcción del gráfico para indicadores\n\n $chart = new PieChart();\n $dataSet = new XYDataSet();\n if ($this->ind_asistentes>=1) {$dataSet->addPoint(new Point(\"Funcionarios Asistentes: (\".$this->ind_asistentes.\")\", $this->ind_asistentes));};\n if ($this->ind_inasistentes_no_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes NO JUSTIFICADOS: (\".$this->ind_inasistentes_no_just.\")\", $this->ind_inasistentes_no_just));};\n if ($this->ind_inasistentes_si_just>=1) {$dataSet->addPoint(new Point(\"Inasistentes JUSTIFICADOS: (\".$this->ind_inasistentes_si_just.\")\", $this->ind_inasistentes_si_just));};\n $chart->setDataSet($dataSet);\n $chart->setTitle(\"Porcentajes de Asistencias / Inasistencias del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_01.png\");\n $chart->render(\"imagenes/temporales/\".$xale.\"_01.png\");\n $this->grafico1->ImageUrl = \"imagenes/temporales/\".$xale.\"_01.png\";\n\n\n $chart2 = new PieChart();\n $dataSet2 = new XYDataSet();\n $this->ind_asistentes_no_retrasados=$this->ind_asistentes-$this->ind_asistentes_tarde_no_just-$this->ind_asistentes_tarde_si_just;\n if ($this->ind_asistentes_no_retrasados>=1) {$dataSet2->addPoint(new Point(\"Puntuales: (\".$this->ind_asistentes_no_retrasados.\")\", $this->ind_asistentes_no_retrasados));};\n if ($this->ind_asistentes_tarde_no_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales NO JUSTIFICADOS: (\".$this->ind_asistentes_tarde_no_just.\")\", $this->ind_asistentes_tarde_no_just));};\n if ($this->ind_asistentes_tarde_si_just>=1) {$dataSet2->addPoint(new Point(\"Impuntuales JUSTIFICADOS: (\".$this->ind_asistentes_tarde_si_just.\")\", $this->ind_asistentes_tarde_si_just));};\n $chart2->setDataSet($dataSet2);\n $chart2->setTitle(\"Porcentajes de Retrasos del: \".$this->txt_fecha_desde->Text);\n elimina_grafico($xale.\"_02.png\");\n $chart2->render(\"imagenes/temporales/\".$xale.\"_02.png\");\n $this->grafico2->ImageUrl = \"imagenes/temporales/\".$xale.\"_02.png\";\n\n // si la consulta de asistentes tiene resultados se habilita la impresion, sino, se deshabilita\n if (!empty($this->asistentes)) {$this->btn_imprimir->Enabled = true;} else {$this->btn_imprimir->Enabled = false;}\n\n }", "public function VerDetallesCreditos()\n{\n\tself::SetNames();\n\t$sql = \" select * FROM abonoscreditos INNER JOIN ventas ON abonoscreditos.codventa = ventas.codventa WHERE abonoscreditos.codventa = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET[\"codventa\"])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN ABONOS PARA CR&Eacute;DITOS ACTUALMENTE</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }", "function affiche_relais_demande () {\n\t\tglobal $bdd;\n\t\t\n\t\t$req = $bdd->query(\"SELECT * FROM relais_mail JOIN utilisateur ON relais_mail.utilisateur_id_utilisateur = utilisateur.id_utilisateur WHERE status_relais = '2'\");\n\t\treturn $req;\n\t\t\n\t\t$req->closeCursor();\n\t}", "function listarVacacion(){\n\t\t$this->procedimiento='asis.ft_vacacion_sel';\n\t\t$this->transaccion='ASIS_VAC_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 $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\t\t$this->captura('id_vacacion','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_funcionario','int4');\n\t\t$this->captura('fecha_inicio','date');\n\t\t$this->captura('fecha_fin','date');\n\t\t$this->captura('dias','numeric');\n\t\t$this->captura('descripcion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n $this->captura('desc_funcionario1','varchar');\n\t\t//wf\n $this->captura('id_proceso_wf','int4');\n $this->captura('id_estado_wf','int4');\n $this->captura('estado','varchar');\n $this->captura('nro_tramite','varchar');\n $this->captura('medio_dia','integer');\n $this->captura('dias_efectivo', 'numeric');\n// medio_dia\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}", "function ColsultarTodosLosID(){///funciona\n try {\n $FKAREA=$this->objRequerimiento->getFKAREA();\n $objControlConexion = new ControlConexion();\n $objControlConexion->abrirBd();\n //$comandoSql = \"select * from Requerimiento where FKAREA = '\".$FKAREA.\"' \";\n $comandoSql = \"SELECT IDREQ ,TITULO,FKEMPLE,FKAREA,FKESTADO,OBSERVACION,FKEMPLEASIGNADO FROM Requerimiento INNER JOIN detallereq ON Requerimiento.IDREQ=detallereq.FKREQ where FKAREA = '\".$FKAREA.\"'\";\n $rs = $objControlConexion->ejecutarSelect($comandoSql);\n return $rs;\n $objControlConexion->cerrarBd();\n } catch(Exception $e) {\n echo \"Error: \" . $e->getMessage();\n }\n}", "function practicasRelacionadas($clavebeneficiario, $fecha_comprobante, $datosnomenclador) {\r\n $query = \"SELECT *\r\n FROM facturacion.cfg_practicas_relac\r\n WHERE modo=2 and \r\n trim(pracorigen)=trim('$datosnomenclador[3]')\";\r\n $res_origen = sql($query, \"Error 1\") or fin_pagina();\r\n if ($res_origen->RecordCount() > 0) {\r\n $res_origen->MoveFirst();\r\n while (!$res_origen->EOF) {\r\n $nomencladordetalles['tipo'] = $datosnomenclador[2];\r\n $nomencladordetalles['codigo'] = $res_origen->fields['pracrel'];\r\n\r\n $fechadelarelacionada = traemeLaPractica($clavebeneficiario, $nomencladordetalles, $fecha_comprobante);\r\n if ($fechadelarelacionada != null) {\r\n $limite_dias = $res_origen->fields['dias'];\r\n $diff = GetCountDaysBetweenTwoDates($fecha_comprobante, $fechadelarelacionada);\r\n if ($diff > $limite_dias) {\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . '] dentro del limite de tiempo';\r\n $ctrl['id_error'] = '76';\r\n }\r\n } else {\r\n $ctrl['debito'] = true;\r\n $ctrl['msj_error'] .= 'No se realizo la practica relacionada [' . $nomencladordetalles['codigo'] . ']';\r\n $ctrl['id_error'] = '75';\r\n }\r\n $res_origen->MoveNext();\r\n }\r\n return $ctrl;\r\n }\r\n}", "function consultar_opedidos(){\n \n $query_RecordsetResumo = \"SELECT * FROM CAIXACUPOM \";\n $query_RecordsetResumo .= \" WHERE TIPOATENDIMENTO = 'DELIVERY' \";\n #$query_RecordsetResumo .= \" AND STATUS_GO4YOU != '4' \";\n $query_RecordsetResumo .= \" ORDER BY CAIXACUPOM_CONTROLE DESC\";\n $query_RecordsetResumo .= \" LIMIT 20\";\n $RecordsetResumo = mysql_query($query_RecordsetResumo, $con) or die(mysql_error());\n $row_RecordsetResumo = mysql_fetch_assoc($RecordsetResumo);\n $totalRows_RecordsetResumo = mysql_num_rows($RecordsetResumo);\n \n $tempo = $_SESSION['TEMPO_PREPARACAO'];\n $pedidos = array();\n $i = 0;\n if($totalRows_RecordsetResumo != 0 ){\n do {\n \n # Checa se percisa alterar o status\n if(dif_hora(acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo)) == 2 && $row_RecordsetResumo['STATUS_GO4YOU'] == \"0\"){\n update_status($row_RecordsetResumo['CAIXACUPOM_CONTROLE'], 2);\n }\n \n # Condicao para gerar contador de Tempo\n $status = \" excedido \";\n if($row_RecordsetResumo['STATUS_GO4YOU'] == \"0\" && dif_hora(acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo)) != 2){\n $status = dif_hora_draw(acrescenta_min($row_RecordsetResumo['DATAHORA'], $tempo), date('Y-m-d H:i:s'));\n }\n \n $pedidos[$i]['CAIXACUPOM_CONTROLE'] = $row_RecordsetResumo['CAIXACUPOM_CONTROLE' ];\n $pedidos[$i]['DATAHORA' ] = dataMySql2BR($row_RecordsetResumo['DATAHORA' ]);\n $pedidos[$i]['TEMPO_PREVISTO' ] = acrescenta_min($row_RecordsetResumo['DATAHORA' ], $tempo);\n $pedidos[$i]['STATUS_GO4YOU' ] = trata_texto(status($row_RecordsetResumo['STATUS_GO4YOU']));\n $pedidos[$i]['TEMPO' ] = $status;\n $pedidos[$i]['STATUS_BTN' ] = $row_RecordsetResumo['STATUS_GO4YOU'] < 4 ? \n '<input type=\"submit\" value=\"'.trata_texto(status($row_RecordsetResumo['STATUS_GO4YOU'] + 1)).'\" onClick=\"update_status('.$row_RecordsetResumo['CAIXACUPOM_CONTROLE'].', '.$row_RecordsetResumo['STATUS_GO4YOU'].')\" style=\"cursor: pointer;\" />' :\n '<input type=\"button\" value=\"Entregue\" disabled />' ;\n ++$i;\n } while ($row_RecordsetResumo = mysql_fetch_assoc($RecordsetResumo)); \n }\n \n return json_encode($pedidos);\n \n}", "function rel_cliente_ag(){\r\n\t\t$db = banco();\r\n\t\t\r\n\t\t$query =\"SELECT user.cod, user.name, user.cpf, cliente.fone, especialidade.nom_espec, consulta.dt_consul, consulta.aprovado, consulta.presente\r\n\t\t\t\tFROM user, cliente, consulta, especialidade\r\n\t\t\t\tWHERE user.cod = cliente.cod_clien AND\r\n\t\t\t\t\t user.cod = consulta.cod_clien AND\r\n\t\t\t\t\t consulta.cd_esp = especialidade.cod_espec\r\n\t\t\t\t\t \r\n\t\t\t\t\";\r\n\t\t$row = $db->query($query);\r\n\t\t$db->close();\r\n\t\treturn $row;\t\r\n\t}", "function consultarNotaAprobatoria() {\r\n\r\n $variables=array('codProyectoEstudiante'=> $this->datosEstudiante['CARRERA'] \r\n );\r\n $cadena_sql = $this->sql->cadena_sql(\"nota_aprobatoria\", $variables);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n return $resultado[0][0];\r\n }", "function verificarCompraSuscripcion($cliente){\n\t\tinclude \"conexion.php\"; \n\n\t\t\t$sql=\"select * from suscripcion\n\t\t\twhere cliente_id=$cliente\n\t\t\t\";\n\t\t\t$result=mysql_query($sql, $conexion) or die (mysql_error());\n\t\t\tif (mysql_num_rows($result)>0)\n\t\t\t{\n\t\t\t\n\t\t\t\t\n\t\t\t\t$error=\"<p>Ya tienes una suscripcion activa</p>\";\n\t\t\t\theader (\"Location: errores.php?errores=$error\");\n\t\t\t\t\n\t\t\t\texit();\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t}", "function CompruebaTabla($conexionUsar, $tablaUsar, $bddUsar){ // Por último, en cada consulta, se comprueba que no vuelva\n $sentenciaTabla = \"select * from \" . $tablaUsar; // vacía ni con errores, y en caso de haberlos, se muestran por pantalla.\n $valor = true;\n $conexionUsar->select_db($bddUsar);\n $queryComprobar = mysqli_query($conexionUsar, $sentenciaTabla);\n if(!$queryComprobar){\n echo \"<h3 style=\\\"margin-left: 1%\\\">ERROR: No se encuentra la tabla \" . $tablaUsar . \"</h3>\";\n echo \"<h3 style=\\\"margin-left: 1%\\\">Base de Datos INCOMPLETA. Se debe realizar una reinstalación.</h3>\";\n $valor = false;\n }\n return($valor);\n }", "public function ConsultarSoporteRefrigerios($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVASR('$busqueda');\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $host= $_SERVER[\"HTTP_HOST\"];\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $rutaFuente= \"<a href='/\".$fila['RutaAutorizacion'].\"'>Descargar Archivo Fuente</a>\";\n $rutaEscaneado= \"<a href='/\".$fila['RutaSoporte'].\"'>Descargar Archivo Soporte</a>\";\n array_push($registro, $fila['Salon'],$fila['Fecha'],$rutaFuente, $rutaEscaneado ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "function insertarReenvioFactura(){\n\t\t$this->procedimiento='vef.ft_reenvio_factura_ime';\n\t\t$this->transaccion='VF_REFACOR_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\t\t\n\t\t$this->setParametro('id_venta','id_venta','int4');\n\t\t$this->setParametro('correo','correo','varchar');\n\t\t$this->setParametro('correo_copia','correo_copia','varchar');\n\t\t$this->setParametro('observacion','observacion','text');\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}", "public function CambiaEstatus()\n {\n \t$consulta = $this->Modelo_direccion->getAllEntradas($this->session->userdata('id_direccion'));\n \t\n \tforeach ($consulta as $key) {\n \t\t$idoficio = $key->id_recepcion;\n\n \t\tif($this->db->query(\"CALL comparar_fechas('\".$idoficio.\"')\"))\n \t\t{\n \t\t\techo 'Ejecutando Cambios';\n \t\t}else{\n \t\t\tshow_error('Error! al ejecutar');\n \t\t}\n \t}\n\n redirect(base_url() . 'Direcciones/Externos/RecepcionDir/');\n }", "function verificar_existencia_profesor_espacio(){\n\t\t$sql_verif= \"SELECT * FROM \n \t\t\t\tPROF_ESPACIO\n \t\t\tWHERE(\n \t\t\t\tCODESPACIO = '$this->CODESPACIO'\n \t\t\t)\n \t\t\t\";\n\nreturn $this->mysqli->query($sql_verif)->num_rows>=1;\n\n}", "public function comprobarReproduccion(){\n $query = \"SELECT COUNT(*) AS existe FROM reproduccion WHERE Usuario_codUsuario = \".parent::string($this->getUsuario_codUsuario()).\" AND Video_codVideo = \".parent::string($this->getVideo_codVideo()).\";\";\n $result = mysqli_query(parent::conexion(), $query);\n if($result){\n $fila = mysqli_fetch_array($result);\n parent::desconectar();\n return $fila;\n } else{\n echo parent::conexion()->error;\n parent::desconectar();\n return false;\n }\n }", "function obtenerDatosFact($ids_Ventas, $rfc, $link, $verificarBoleta)\n{\n //$ids_Ventas=[8];\n if ($rfc == 'XAXX010101000') {\n $complemento = '0';\n $metpags = \"PUE\";\n $descripcionMetPgo = \"Pago en parcialidades o diferido\";\n\n $formPago = \"99\";\n $resp = array('estatus' => '1', 'mensaje' => 'Verificación de datos de Facturación correcta', 'result' => array(\"metodosPago\" => $metpags, \"formaPago\" => $formPago, \"descMetPgo\" => $descripcionMetPgo, \"complemento\" => $complemento));\n return $resp;\n } else {\n $ArrayIdsVentas = array();\n $ArrayIdsVentas = array_merge($ArrayIdsVentas, $ids_Ventas);\n $busqVentas = implode(',', $ArrayIdsVentas);\n $sql = \"SELECT DISTINCT COUNT(vtas.id) AS totalVtas, pgosvta.idFormaPago, metpgos.clave FROM ventas vtas\n INNER JOIN pagosventas pgosvta ON vtas.id= pgosvta.idVenta\n INNER JOIN sat_formapago metpgos ON metpgos.id= pgosvta.idFormaPago\n WHERE vtas.id IN ($busqVentas) GROUP BY pgosvta.idFormaPago\";\n //print_r($sql);\n $resultXpagos = mysqli_query($link, $sql) or die(json_encode(array('estatus' => '3', 'mensaje' => \"Error al Buscar el Metodo de Pago, notifica a tu Administrador\", 'idsErroneos' => mysqli_error($link))));\n $ventaXBoleta = \"<div class='text-danger'>Total de Ventas Pagadas Con Boleta:</div>\";\n $contarxBoleta = 0;\n $erroresVentas = array();\n $total_ventas = mysqli_num_rows($resultXpagos);\n $formaUnica = 0;\n $formaAnterior = \"\";\n $complemento = 0;\n if ($total_ventas == 1) {\n $xpags = mysqli_fetch_array($resultXpagos);\n if ($xpags['idFormaPago'] == '7') {\n $complemento = 1;\n $metpags = \"PPD\";\n $formPago = \"99\";\n $descripcionMetPgo = \"Pago en parcialidades o diferido\";\n $formaUnica = 1;\n }\n //----------------------pago de boletas---------------------------------\n else if ($xpags[\"idFormaPago\"] == \"6\" and $verificarBoleta == '1') {\n $ventaXBoleta .= $xpags[\"totalVtas\"];\n $contarxBoleta++;\n } else if ($xpags['idFormaPago'] == '7') {\n $complemento = 1;\n $metpags = \"PPD\";\n $formPago = \"99\";\n $descripcionMetPgo = \"Pago en parcialidades o diferido\";\n } else {\n $metpags = \"PUE\";\n $formPago = $xpags['clave'];\n $descripcionMetPgo = \"Pago en una sola exhibición\";\n $formaUnica = 1;\n }\n } else {\n while ($dat = mysqli_fetch_array($resultXpagos)) {\n\n if ($complemento == 0) {\n //----------------------pago de boletas---------------------------------\n if ($dat[\"idFormaPago\"] == \"6\" and $verificarBoleta == '1') {\n $ventaXBoleta .= $dat[\"totalVtas\"];\n $contarxBoleta++;\n } else {\n if ($dat['idFormaPago'] == '7') {\n $complemento = 1;\n $metpags = \"PPD\";\n $formPago = \"99\";\n $descripcionMetPgo = \"Pago en parcialidades o diferido\";\n }\n }\n }\n } //cierra While\n\n }\n\n if ($contarxBoleta > 0) {\n array_push($erroresVentas, $ventaXBoleta);\n $resp = array('estatus' => '0', 'mensaje' => 'Ventas Pagadas con Boletas NO se pueden facturar.', 'idsErroneos' => json_encode($erroresVentas));\n return $resp;\n } else {\n if ($formaUnica == 1) {\n\n $resp = array('estatus' => '1', 'mensaje' => 'Verificación de datos de Facturación correcta', 'result' => array(\"metodosPago\" => $metpags, \"formaPago\" => $formPago, \"descMetPgo\" => $descripcionMetPgo, \"complemento\" => $complemento));\n return $resp;\n } else {\n if ($complemento == 1) {\n $resp = array('estatus' => '1', 'mensaje' => 'Verificación de datos de Facturación correcta', 'result' => array(\"metodosPago\" => $metpags, \"formaPago\" => $formPago, \"descMetPgo\" => $descripcionMetPgo, \"complemento\" => $complemento));\n return $resp;\n } else {\n $metpags = \"PUE\";\n $formPago = \"99\";\n $descripcionMetPgo = \"Pago en una sola exhibición\";\n $resp = array('estatus' => '1', 'mensaje' => 'Verificación de datos de Facturación correcta', 'result' => array(\"metodosPago\" => $metpags, \"formaPago\" => $formPago, \"descMetPgo\" => $descripcionMetPgo, \"complemento\" => $complemento));\n return $resp;\n }\n }\n }\n }\n}", "public function contarExistentesGeneral($consulta) {\n\n /****************************Consulta despues de validar *************/\n $database = $this-> ConexionBD->conectarBD();\n\n if($database->connect_errno) {\n $response = -1; //No se puede conectar a la base de datos\n }\n else{\n if ( $result = $database->query($consulta) ) {\n if( $result->num_rows > 0 ) {\n $response = 1;\n }\n else {\n $response = 0;\n }\n\n } else {\n $response = $database->error;\n }\n $this -> ConexionBD->desconectarDB($database);\n }\n\n /**************************** /Consulta despues de validar *************/\n\n return $response;\n }", "function listar($objeto){\n\t\t$condicion.=(!empty($objeto['id']))?' AND r.id='.$objeto['id']:'';\n\t// Filtra por los insumos preparados\n\t\t$condicion.=(!empty($objeto['insumos_preparados']))?' AND ids_insumos_preparados!=\\'\\'':'';\n\t// Filtra por tipo\n\t\t$condicion.=(!empty($objeto['tipo'])) ? ' AND p.tipo_producto = '.$objeto['tipo'] : '';\n\t// Filtros\n\t\t$condicion.=(!empty($objeto['filtro']) && $objeto['filtro'] == 'insumos_preparados_formula') ? ' AND (p.tipo_producto = 8 OR p.tipo_producto = 9) ' : '';\n\n\n\t// Ordena la consulta si existe\n\t\t$condicion.=(!empty($objeto['orden']))?' ORDER BY '.$objeto['orden']:'';\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tp.id AS idProducto, p.nombre, p.costo_servicio AS costo,\n\t\t\t\t\tp.id_unidad_compra AS idunidadCompra, p.id_unidad_venta AS idunidad, p.factor as multiplo,\n\t\t\t\t\t(SELECT\n\t\t\t\t\t\tnombre\n\t\t\t\t\tFROM\n\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad, u.factor, p.tipo_producto,\n\t\t\t\t\tr.ids_insumos_preparados AS insumos_preparados, r.ids_insumos AS insumos,\n\t\t\t\t\tr.preparacion, r.ganancia, ROUND(p.precio, 2) AS precio, p.codigo, p.minimos\n\t\t\t\tFROM\n\t\t\t\t\tapp_productos p\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_campos_foodware f\n\t\t\t\t\tON\n\t\t\t\t\t\tp.id = f.id_producto\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tcom_recetas r\n\t\t\t\t\tON\n\t\t\t\t\t\tr.id = p.id\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_unidades_medida u\n\t\t\t\t\tON\n\t\t\t\t\t\tu.id = p.id_unidad_compra\n\t\t\t\tWHERE\n\t\t\t\t\tp.status = 1 AND (p.tipo_producto = 8 OR p.tipo_producto = 9)\";\n\n\t\treturn $this->queryArray($sql);\n\t}", "private function query_consultores(){\n\n \t$respuesta = false;\n\n\t\ttry {\n\n\t\t\t$this->db->select('cao_usuario.co_usuario');\n\t\t\t$this->db->select('cao_usuario.no_usuario');\n\t\t\t$this->db->select('cao_usuario.no_email');\t\n\t\t\t$this->db->from('cao_usuario');\n\t\t\t$this->db->join('permissao_sistema', 'permissao_sistema.co_usuario = cao_usuario.co_usuario');\n\t\t\t$this->db->where('cao_usuario.co_usuario is NOT NULL', NULL, FALSE);\n\t\t\t$this->db->where('permissao_sistema.co_sistema',$this->_co_sistema);\n\t\t\t$this->db->where('permissao_sistema.in_ativo',$this->_in_ativo);\n\t\t\t$this->db->where_in('permissao_sistema.co_tipo_usuario', $this->_co_tipo_usuario);\n\t\t\t$this->db->order_by(\"cao_usuario.co_usuario\", \"asc\");\t\t\t\n\n\t\t\t$query = $this->db->get();\n\n\t\t if ($query && $query->num_rows() > 0)\n\t\t {\n\t\t\t\t$respuesta = $query->result_array();\n\n\t\t }else{\n\n\t\t throw new Exception('Error al intentar listar todos los consultores');\n\t\t\t log_message('error', 'Error al intentar listar todos los consultores');\t\t \n\n\t\t $respuesta = false;\t\t\t\t\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\n\t\t\t$respuesta = false;\n\t\t}\t\t\t\n\n\t\treturn $respuesta;\n }", "public function findPagoDetalleMontoNegativo()\r\n\t\t{\r\n\t\t\t$registers = self::findPagoDetalleMontoNegativoModel();\r\n\t\t\tif ( !self::guardarConsultaRecaudacion($registers) ) {\r\n\t\t\t\tself::errorCargarData(Yii::t('backend', 'Montos Negativos'));\r\n\t\t\t}\r\n\t\t}", "public function get_rel_referenciasExternas_documentos() {\n $sql = \"SELECT rexDoc.*, dt.sNombre FROM rel_referenciasExternas_documentos AS rexDoc INNER JOIN cat_docTipo dt ON dt.skDocTipo = rexDoc.skDocTipo WHERE rexDoc.skEstatus = 'AC' AND rexDoc.skReferenciaExterna = '\" . $this->refex['skReferenciaExterna'] . \"' \";\n ////exit('<pre>'.print_r($sql,1).'</pre>');\n $result = $this->db->query($sql);\n if ($result) {\n if ($result->num_rows > 0) {\n return $result;\n } else {\n return false;\n }\n }\n }", "public function VerificaArqueoCreditos()\n{\n\tself::SetNames();\n\t\n $sql = \"SELECT * FROM arqueocaja WHERE codigo = ? and statusarqueo = 1\";\n $stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_SESSION[\"codigo\"]));\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n echo \"<div class='alert alert-danger'>\";\n echo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n echo \"<center><span class='fa fa-info-circle'></span> DISCULPE, NO EXISTE UN ARQUEO DE CAJA PARA PROCESAR COBROS DE CREDITOS, DEBERA DE INICIARLA PARA CONTINUAR.<br> SI DESEA REALIZAR UN ARQUEO DE CAJA HAZ CLIC <a href='forarqueo'>AQUI</a></center>\";\n echo \"</div>\";\n\n\t\t} else { \n\n\t$sql = \"SELECT * FROM arqueocaja WHERE codigo = ? and statusarqueo = 1\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_SESSION[\"codigo\"]) );\n\t$num = $stmt->rowCount();\n\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$pae[] = $row;\n\t\t}\n\t$codcaja = $pae[0]['codcaja'];\n\t\t?>\n\n\t<div class=\"row\"> \n\t\t\t\t\t\t\t<div class=\"col-md-12\"> \n <div class=\"form-group has-feedback\"> \n <label class=\"control-label\">B&uacute;squeda de Clientes: <span class=\"symbol required\"></span></label>\n<input type=\"hidden\" name=\"codcaja\" id=\"codcaja\" value=\"<?php echo $codcaja; ?>\" readonly=\"readonly\">\n<input type=\"hidden\" class=\"form-control\" name=\"codcliente\" id=\"codcliente\"><input class=\"form-control\" type=\"text\" name=\"busquedacliente\" id=\"busquedacliente\" onKeyUp=\"this.value=this.value.toUpperCase();\" autocomplete=\"off\" placeholder=\"Ingrese Datos del Cliente para tu b&uacute;squeda\" required=\"required\">\n <i class=\"fa fa-search form-control-feedback\"></i> \n </div> \n </div> \t\n </div><br>\n\t\t\t\t\t\n <div class=\"modal-footer\"> \n<button type=\"button\" onClick=\"BuscaClientesAbonos()\" class=\"btn btn-primary\"><span class=\"fa fa-search\"></span> Realizar B&uacute;squeda</button>\t\t\t\n </div>\n\n\t<?php\n\t}\n}", "private function guardarConsultaRecaudacion($registers)\r\n\t\t{\r\n\t\t\tself::setConexion();\r\n\t\t\t$this->_conn->open();\r\n\t\t\t$this->_transaccion = $this->_conn->beginTransaction();\r\n\r\n\t\t\t// Lo siguiente retorna un arreglo de los taributos de la entidad \"recaudacion-detallada\"\r\n\t\t\t// [\r\n\t\t\t// \t\t[0] => attribute0,\r\n\t\t\t// \t\t[1] => attribute1,\r\n\t\t\t// \t\t.\r\n\t\t\t// \t\t.\r\n\t\t\t// \t\t[N] => attributeN,\r\n\t\t\t// \t]\r\n\t\t\t$attributes = $this->attributes();\r\n\t\t\t$tabla = $this->tableName();\r\n\t\t\t$result = $this->_conexion->guardarLoteRegistros($this->_conn, $tabla, $attributes, $registers);\r\n\t\t\tif ( $result ) {\r\n\t\t\t\t$this->_transaccion->commit();\r\n\t\t\t} else {\r\n\t\t\t\t$this->_transaccion->rollBack();\r\n\t\t\t}\r\n\t\t\t$this->_conn->close();\r\n\t\t\treturn $result;\r\n\t\t}", "function verificaDatos($pedido) {\n\n\t\t$cliente = array(\"clave\"=>$clave, \"nombre\"=>$nombre, \"direccion\"=>$direccion, \"rfc\"=>$rfc, \"cp\"=>$cp, \"edo\"=>$edo, \"municipio\"=>$municipio, \"telefono\"=>$telefono, \"ubicacionMaps\"=>$ubicacionMaps, \"usoCFDISat\"=>$usoCFDISat,\"formaPagoSat\"=>$formaPagoSat, \"metodoPagoSat\"=>$metodoPagoSat);\n\t\t$pegaso = array(\"clave\"=>$clave, \"nombre\"=>$nombre, \"direccion\"=>$direccion, \"rfc\"=>$rfc, \"cp\"=>$cp, \"edo\"=>$edo, \"municipio\"=>$municipio, \"telefono\"=>$telefono, \"ubicacionMaps\"=>$ubicacionMaps, \"usoCFDISat\"=>$usoCFDISat,\"formaPagoSat\"=>$formaPagoSat, \"metodoPagoSat\"=>$metodoPagoSat);\n\n\t\tforeach ($par as $key){\n\t\t\t$impuestos=array(\"Base\"=>$base, \"Impuesto\"=>$impuesto,\"TipoFactor\"=>$tipoFactor, \"TasaOCuota\"=>$tasaOCuota, \"Importe\"=>$importe);\n\t\t\t$partida=array(\n\t\t\t\t\"noIdentificacion\"=>$clave, \n\t\t\t\t\"ClaveProdServ\"=>$claveSat, \n\t\t\t\t\"unidad\"=>$um, \n\t\t\t\t\"ClaveUnidad\"=>$umSat, \n\t\t\t\t\"partida\"=>$partida, \n\t\t\t\t\"Cantidad\"=>$cantidad , \n\t\t\t\t\"descripcion\"=>$descripcion,\n\t\t\t\t\"ValorUnitario\"=>$precio, \n\t\t\t\t\"descuento\"=>$descuento,\n\t\t\t\t\"iva\"=>$iva,\n\t\t\t\t\"tasa\"=>$tasa,\n\t\t\t\t\"Importe\"=>$importe,\n\t\t\t\t\"Impuestos\"=>$impuestos);\n\t\t}\n\t\n\t\t/*\n\t\t\t{\n\t\t\t\t \"conceptos\": [\n\t\t\t\t {\n\t\t\t\t \"ClaveProdServ\": \"15101505\",\n\t\t\t\t \"ClaveUnidad\": \"LTR\",\n\t\t\t\t \"noIdentificacion\": \"16\",\n\t\t\t\t \"unidad\": \"LTS\",\n\t\t\t\t \"Cantidad\": \"2\",\n\t\t\t\t \"descripcion\": \" DIESEL\",\n\t\t\t\t \"ValorUnitario\": \"14.44\",\n\t\t\t\t \"Importe\": \"28.88\",\n\t\t\t\t \"Impuestos\": {\n\t\t\t\t \"Traslados\": [\n\t\t\t\t {\n\t\t\t\t \"Base\": \"28.88\",\n\t\t\t\t \"Impuesto\": \"002\",\n\t\t\t\t \"TipoFactor\": \"Tasa\",\n\t\t\t\t \"TasaOCuota\": \"0.160000\",\n\t\t\t\t \"Importe\": \"4.62\"\n\t\t\t\t },\n\t\t\t\t {\n\t\t\t\t \"Base\": \"2\",\n\t\t\t\t \"Impuesto\": \"003\",\n\t\t\t\t \"TipoFactor\": \"Cuota\",\n\t\t\t\t \"TasaOCuota\": \"0.315400\",\n\t\t\t\t \"Importe\": \"0.63\"\n\t\t\t\t }\n\t\t\t\t ]\n\t\t\t\t }\n\t\t\t\t },\n\t\t*/\n\n\n\t\t$partida[] = json_encode($partida);\n\n\t\t$this->crearFactura($partidas, $clientes);\n\n\t}", "function listarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_sel';\n\t\t$this->transaccion='REC_CLI_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_cliente','int4');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\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\n $this->captura('nombre_completo1','text');\n $this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//$this->captura('nombre','varchar');\n\n\n\n\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}", "function RellenaDatos()\n{//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t\t\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t} //si no se ejecuta con éxito \n\telse\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "private function aprobarDetalleSolicitud()\r\n {\r\n $result = false;\r\n $idGenerado = 0;\r\n // modelo de InscripcionSucursal.\r\n $modelInscripcion = self::findInscripcionSucursal();\r\n if ( $modelInscripcion !== null ) {\r\n if ( $modelInscripcion['id_contribuyente'] == $this->_model->id_contribuyente ) {\r\n $result = self::updateSolicitudInscripcion($modelInscripcion);\r\n if ( $result ) {\r\n $idGenerado = self::crearContribuyente($modelInscripcion);\r\n if ( $idGenerado > 0 ) {\r\n $result = true;\r\n } else {\r\n $result = false;\r\n }\r\n }\r\n } else {\r\n self::setErrors(Yii::t('backend', 'Error in the ID of taxpayer'));\r\n }\r\n } else {\r\n self::setErrors(Yii::t('backend', 'Request not find'));\r\n }\r\n\r\n return $result;\r\n }", "function consultarCitasSinLocalidad($idEspecie) {\n\t\t \n\t$query = \"SELECT localidades_id, especies_id, referencias_id \n\t\t\t\t\t\tFROM localidades_distribucion \n\t\t\t\t\t\tWHERE especies_id = $idEspecie AND referencias_id <>'' AND localidades_id = 0\"; \t\t\t\t\t\t\t\n\t$res = ejecutarQuerySQL($query);\n\t$total = getNumFilas($res);\n\t\n\t$citas=\"\"; $i=1;\t\n\tif ($total > 0 ) {\n\t\t $citas=\"<b>Sin especificar localización: </b>\";\t\n\t\t while ($i <= $total) {\n\t\t \t$actual = getFila($res);\n\t\t\t$valores = $actual['referencias_id'];\n\t\t\tif (strpos($valores, \",\") ) {\n\t\t\t\t // caso del reporte de varios autores para la especie y la localidad\n\t\t\t\t$valores = explode(\",\", $valores);\n\t\t\t\t$total2 = count($valores); $j=1; // inicia en 1 para evitar el caracter de control del inicio\n\t\t\t\t$autorRef = \"\"; $agno=\"\";\n\t\t\t\twhile ($j < $total2) {\t\t\t\t\t\t \t\n\t\t\t\t\t consultarCita($valores[$j], $autorRef, $agno);\t\t\t\t\t \n\t\t\t\t\t $citas = $citas . $autorRef . \" (\" . $agno . \")\";\n\t\t\t\t\t if ($j < $total2-1) $citas = $citas . \"; \"; \n\t\t\t\t\t $j++;\n\t\t\t }\t\t\t \n\t\t}\n\t\telse\n\t\t{ // caso del reporte de un sólo autor para la especie y la localidad\t\t\t\t \n\t\t\t\t $valores = explode(\",\", $valores);\n\t\t\t\t consultarCita($valores[0], $autorRef, $agno);\n\t\t\t\t if ($autorRef <>\"\") $citas = $citas . $autorRef . \" (\" . $agno . \")\";\t\t\n\t\t}\t\t\n\t\t$i++;\n\t\t }\n\t\t$citas = $citas . \".\" ;\n\t}\n\t\nreturn $citas;\n}", "function no_existe_versiculo_en_referencia($versiculo_id, $cita)\n{\n $dato = torrefuerte\\Models\\Referencia::where('versiculo_id', $versiculo_id)\n ->where('cita', $cita)->first();\n\n if( is_null($dato)){\n return true;\n }else{\n return false;\n }\n}", "public function obtenerRegistroFaltantesCompraScot()\n {\n\n $sql = $this->getAdapter()->select()->from(array('ai' => 'anuncio_impreso'),\n array('id_cac' => 'cac.id', 'id_compra' => 'c.id', 'adecsys_code' => 'cac.adecsys_code',\n 'medPub' => 'cac.medio_publicacion'))\n ->joinInner(array('c' => 'compra'), 'c.id = ai.id_compra', null)\n ->joinInner(array('t' => 'tarifa'), 't.id = c.id_tarifa', null)\n ->joinInner(array('p' => 'producto'), 't.id_producto = p.id', null)\n ->joinInner(array('cac' => 'compra_adecsys_codigo'),\n 'cac.id_compra = c.id', null)\n ->where('p.tipo = ?', self::TIPO_PREFERENCIAL)\n ->where('c.estado = ?', self::ESTADO_PAGADO)\n ->where('c.id_tarifa <> ?', Application_Model_Tarifa::GRATUITA)\n ->where('year(c.fh_confirmacion) >= ?', date('Y'))\n ->where('cac.medio_publicacion <> ?',\n Application_Model_CompraAdecsysCodigo::MEDIO_PUB_TALAN_COMBO)\n ->where('(cac.adecsys_code is not null and cac.adecsys_code <> 0 and cac.adecsys_code not like ?)',\n '%Informix%')\n ->where('(cod_scot_aptitus IS NULL AND cod_scot_talan IS NULL)')\n ->where('ai.cod_scot_aptitus is null')\n ->where('c.medio_pago in (?)',\n array(self::FORMA_PAGO_VISA, self::FORMA_PAGO_PAGO_EFECTIVO,\n self::FORMA_PAGO_MASTER_CARD, self::FORMA_PAGO_CREDITO))\n ->where('DATEDIFF(CURDATE(),c.fh_confirmacion) <= ?', 10)\n ->where('t.meses is null')\n //->where('c.id = ?', $id)\n ->order('c.id desc');\n\n return $this->getAdapter()->fetchAll($sql);\n }", "function listarSolicitacoesBusca($solicitacao,$cliente){\r\n\r\n require 'conexao.php';\r\n\r\n $sql = \"SELECT * FROM tb_solicitacao\r\n INNER JOIN tb_cliente ON solcliid = cliid\r\n INNER JOIN tb_servico ON solserid = serid\r\n\r\n WHERE solcliid = $cliente AND (solstatus = 'Pendente' OR solstatus = 'Aguardando Autônomo') AND (soldata LIKE '%\".$solicitacao.\"%' OR serdescricao OR '%\".$solicitacao.\"%' OR solstatus LIKE '%\".$solicitacao.\"%' )\";\r\n\r\n $result = mysqli_query($con,$sql) or die(mysqli_error($con));\r\n\r\n $valida = mysqli_num_rows($result);\r\n\r\n if($valida > 0){\r\n return $result;\r\n\r\n }else{\r\n\r\n return false;\r\n }\r\n}", "public function VerificaArqueosCaja()\n{\n\tself::SetNames();\n\t$sql = \" select * from arqueocaja where statusarqueo = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array('1') );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN ARQUEOS DE CAJAS DISPONIBLES PARA PROCESAR VENTAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}", "public function checarReservaExiste($objetor) {\n /*$reservas->set(\"idTurma\", $_POST[\"idTurma\"]);\n $reservas->set(\"idSala\", $_POST[\"idSala\"]);\n $reservas->set(\"data\", $_POST[\"data\"]);\n $reservas->set(\"hora\", $_POST[\"hora\"]);musashi*/\n $objetor->data = $this->query->dateEua($objetor->data);\n $array = array();\n $i = 0;\n foreach($objetor->idEquipamento as $valor){\n \n $sql = \"\n SELECT \n r.idReserva, \n d.horaInicial, \n d.horaFinal, \n r.data, \n e.nome\n FROM \n reservas r\n INNER JOIN reservas_equipamentos re ON r.idReserva = re.idReserva\n INNER JOIN equipamentos e ON e.idEquipamento = re.idEquipamento\n INNER JOIN turmas t ON r.idTurma = t.idTurma\n INNER JOIN disciplinas d ON t.idDisciplina = d.idDisciplina\n WHERE TIME( '$objetor->hora' ) \n BETWEEN \n d.horaInicial and\n d.horaFinal and\n r.data = '$objetor->data' and\n re.idEquipamento = $valor and\n r.status = 0\n \";\n $query = $this->query->setQuery($sql);\n \n if( $query->num_rows() > 0 )\n { \n $array[\"num_rows\"] = true;\n foreach ( $query->result() as $valor )\n {\n $array[$i][\"nome\"] = $valor->nome;\n $i++;\n }\n //return $query;\n }\n }\n\n return $array;\n }", "function consultar(){\n\t\t\n\t\t$this->mysqli = conectarBD();\n\t\t\n\t\t$sql = \"SELECT Linea_Factura.Id_Linea_Factura,Linea_Factura.Id_Factura,Servicio.Nombre,Linea_Factura.Importe,Linea_Factura.Descripcion FROM Linea_Factura INNER JOIN Servicio WHERE Linea_Factura.Id_Factura='\".$this->factura.\"' AND Linea_Factura.Id_Servicio=Servicio.Id_Servicio AND Linea_Factura.Borrado='0';\";\n\t\t$resultado = $this->mysqli->query($sql);\t\n\t\tif ($resultado->num_rows > 0){\n\t\t\twhile($row = $resultado->fetch_array()){\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t\treturn $array;\n\t\t}\n\t}", "public function userCadConfirm($codConfirmacao=''){\n \n\n \n if($codConfirmacao==''){//se em branco retorna NULL (erro)\n \n \n return null;\n \n }else{//caso codigo informado procede com a conferencia e a ativacao\n \n \n \n $sql = new Sql();\n $ativacao = $sql->select('SELECT * FROM usuarios \n WHERE cod_ativacao_usuario = :cod_ativacao_usuario',\n array(':cod_ativacao_usuario'=>$codConfirmacao)); \n \n if(count($ativacao)==0){\n \n \n return null;//caso nada encontrado retorna NULL (deve pode ser um codigo invalido)\n \n }elseif(count($ativacao)>0){//caso codigo de confirmacao for OK entao ativa o cadastro\n \n \n //obtem o id do usuario\n $id_usuario = $ativacao[0]['id_usuario'];\n \n \n //verifica se existe a necessidade de ativacao\n if($ativacao[0]['status_usuario']==1){//cadastro JA ATIVO basta notificar\n \n return true;//retorna true confirmando que o cadastro esta atualizado \n \n }elseif($ativacao[0]['status_usuario']==0){//CASO INATIVO ENTÃO PROCEDE COM A ATIVACAO\n \n //atualiza o cadastro do usuario ativando ele\n $res = $sql->query('UPDATE usuarios SET status_usuario = 1\n WHERE id_usuario = :id_usuario',\n array(':id_usuario'=>$id_usuario));\n \n if($res>0){//se o numero de linhas afetadas for maior que ZERO\n \n return true;//retorna true confirmando que o cadastro esta atualizado\n \n }else{\n return false;//caso nada encontrado retorna FALSE (pode ter ocorrido erro na atualizacao)\n\n }\n }\n } \n }\n }", "function verifica_caja_virtual($acceso,$id_pd=''){\n\t$ini_u = 'AA';\n\t$fecha= date(\"Y-m-d\");\n\t$id_caja='BB001';\n\t$id_persona='BB00000001';\n\t$id_est='BB001';\n\t$apertura_caja=date(\"H:i:s\");\n\t$status_caja='ABIRTA';\n\t$acceso->objeto->ejecutarSql(\" select id_caja_cob from caja_cobrador where fecha_caja='$fecha' and id_caja='$id_caja' and id_persona='$id_persona' and id_est='$id_est'\");\n\tif($row=row($acceso)){\n\t\t$id_caja_cob=trim($row[\"id_caja_cob\"]);\n\t}else{\n\t\t$acceso->objeto->ejecutarSql(\"select * from caja_cobrador where (id_caja_cob ILIKE '$ini_u%') ORDER BY id_caja_cob desc\"); \n\t\t$id_caja_cob = $ini_u.verCodLong($acceso,\"id_caja_cob\");\n\n\t\t$acceso->objeto->ejecutarSql(\"insert into caja_cobrador(id_caja_cob,id_caja,id_persona,fecha_caja,apertura_caja,status_caja,id_est,fecha_sugerida) values ('$id_caja_cob','$id_caja','$id_persona','$fecha','$apertura_caja','$status_caja','$id_est','$fecha')\");\n\t\t$acceso->objeto->ejecutarSql(\"Update caja Set status_caja='Abierta' Where id_caja='$id_caja'\");\n\t}\n\treturn $id_caja_cob;\n}", "function armar_consulta($pdia,$udia,$anio){\n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n// $sql=\"(SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac,t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// 0 as dias_lic, case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON ( m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// AND t_d.carac = t_c.id_car \n// AND t_d.uni_acad = t_ua.sigla \n// AND t_d.tipo_desig=1 \n// AND not exists(SELECT * from novedad t_no\n// where t_no.id_designacion=t_d.id_designacion\n// and (t_no.tipo_nov=1 or t_no.tipo_nov=2 or t_no.tipo_nov=4 or t_no.tipo_nov=5)))\n// UNION\n// (SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// 0 as dias_lic, case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua,\n// novedad as t_no \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// AND t_d.carac = t_c.id_car \n// AND t_d.uni_acad = t_ua.sigla \n// AND t_d.tipo_desig=1 \n// AND t_no.id_designacion=t_d.id_designacion\n// AND (((t_no.tipo_nov=2 or t_no.tipo_nov=5 ) AND (t_no.tipo_norma is null or t_no.tipo_emite is null or t_no.norma_legal is null))\n// OR (t_no.tipo_nov=1 or t_no.tipo_nov=4))\n// )\n// UNION\n// (SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac,t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// sum((case when (t_no.desde>'\".$udia.\"' or (t_no.hasta is not null and t_no.hasta<'\".$pdia.\"')) then 0 else (case when t_no.desde<='\".$pdia.\"' then ( case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_no.hasta-'\".$pdia.\"')+1) end ) else (case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then ((('\".$udia.\"')-t_no.desde+1)) else ((t_no.hasta-t_no.desde+1)) end ) end )end)*t_no.porcen ) as dias_lic,\n// case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua,\n// novedad as t_no \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// \tAND t_d.carac = t_c.id_car \n// \tAND t_d.uni_acad = t_ua.sigla \n// \tAND t_d.tipo_desig=1 \n// \tAND t_no.id_designacion=t_d.id_designacion \n// \tAND (t_no.tipo_nov=2 or t_no.tipo_nov=5) \n// \tAND t_no.tipo_norma is not null \n// \tAND t_no.tipo_emite is not null \n// \tAND t_no.norma_legal is not null\n// GROUP BY t_d.id_designacion,docente_nombre,t_d1.legajo,t_d.nro_cargo,anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, cat_mapuche_nombre, cat_estat, dedic,t_c.descripcion , t_d3.descripcion , t_a.descripcion , t_o.descripcion ,t_d.uni_acad, t_m.quien_emite_norma, t_n.nro_norma, t_x.nombre_tipo , t_d.nro_540, t_d.observaciones, m_p.nombre, t_t.id_programa, t_t.porc,m_c.costo_diario, check_presup, licencia,t_d.estado \t\n// )\".\n //--sino tiene novedad entonces dias_lic es 0 case when t_no.id_novedad is null \n //--si tiene novedad tipo 2,5 y no tiene norma entonces dias_lic es 0\n $sql=\" SELECT distinct t_d.id_designacion,t_d.por_permuta,t_d.tipo_desig, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n sum(case when t_no.id_novedad is null then 0 else (case when (t_no.desde>'\".$udia.\"' or (t_no.hasta is not null and t_no.hasta<'\".$pdia.\"')) then 0 else (case when t_no.desde<='\".$pdia.\"' then ( case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_no.hasta-'\".$pdia.\"')+1) end ) else (case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then ((('\".$udia.\"')-t_no.desde+1)) else ((t_no.hasta-t_no.desde+1)) end ) end )end)*t_no.porcen end) as dias_lic,\n case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n FROM designacion as t_d \n LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\n LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo)\n LEFT OUTER JOIN novedad t_no ON (t_d.id_designacion=t_no.id_designacion and t_no.tipo_nov in (2,5) and t_no.tipo_norma is not null \n \t\t\t\t\tand t_no.tipo_emite is not null \n \t\t\t\t\tand t_no.norma_legal is not null \n \t\t\t\t\tand t_no.desde<='\".$udia.\"' and t_no.hasta>='\".$pdia.\"'),\n docente as t_d1,\n caracter as t_c,\n unidad_acad as t_ua \n WHERE t_d.id_docente = t_d1.id_docente\n AND t_d.carac = t_c.id_car \n AND t_d.uni_acad = t_ua.sigla \n AND t_d.tipo_desig=1 \n GROUP BY t_d.id_designacion,t_d.por_permuta,t_d.tipo_desig,docente_nombre,t_d1.legajo,t_d.nro_cargo,anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, cat_mapuche_nombre, cat_estat, dedic,t_c.descripcion , t_d3.descripcion , t_a.descripcion , t_o.descripcion ,t_d.uni_acad, t_m.quien_emite_norma, t_n.nro_norma, t_x.nombre_tipo , t_d.nro_540, t_d.observaciones, m_p.nombre, t_t.id_programa, t_t.porc,m_c.costo_diario, check_presup, licencia,t_d.estado \t\".\n\n \" UNION\n (SELECT distinct t_d.id_designacion,0 as por_permuta,t_d.tipo_desig, 'RESERVA'||': '||t_r.descripcion as docente_nombre, 0, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento, t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n 0 as dias_lic,\n case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n caracter as t_c,\n unidad_acad as t_ua,\n reserva as t_r \n \n WHERE t_d.carac = t_c.id_car \n \tAND t_d.uni_acad = t_ua.sigla \n \tAND t_d.tipo_desig=2 \n \tAND t_d.id_reserva = t_r.id_reserva \t\n )\";\n //esto es para las designaciones que tienen mas de un departamento,area,orientacion\n $sql2=\"SELECT distinct sub1.id_designacion,sub1.por_permuta,sub1.tipo_desig,sub1.docente_nombre,sub1.legajo,sub1.nro_cargo,sub1.anio_acad,sub1.desde,sub1.hasta,sub1.cat_mapuche, sub1.cat_mapuche_nombre,\n sub1.cat_estat, sub1.dedic, sub1.carac,case when sub2.id_designacion is not null then sub2.dpto else sub1.id_departamento end as id_departamento,case when sub2.id_designacion is not null then sub2.area else sub1.id_area end as id_area,case when sub2.id_designacion is not null then sub2.orientacion else sub1.id_orientacion end as id_orientacion\n , sub1.uni_acad, sub1.emite_norma, sub1.nro_norma, sub1.tipo_norma, sub1.nro_540, sub1.observaciones, sub1.id_programa, sub1.programa, sub1.porc, sub1.costo_diario, sub1.check_presup, sub1.licencia, sub1.estado, sub1.dias_lic, sub1.dias_des\n FROM (\".$sql.\")sub1\"\n . \" LEFT OUTER JOIN (select d.id_designacion,excepcion_departamento(a.id_designacion)as dpto,excepcion_area(a.id_designacion) as area,excepcion_orientacion(a.id_designacion) as orientacion\n from designacion d,dao_designa a \n where d.desde <='\".$udia.\"' and (d.hasta>='\".$pdia.\"' or d.hasta is null)\n and a.id_designacion=d.id_designacion)sub2 ON (sub1.id_designacion=sub2.id_designacion)\";\n return $sql2;\n }", "function Cargar_alojamientos_condiciones($clave, $filadesde, $buscar_paquete, $buscar_tipo){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\r\n\t\tif($buscar_tipo != ''){\r\n\t\t\t$paq = \" AND PAQUETE = '\".$buscar_paquete.\"'\";\r\n\t\t\t$CADENA_BUSCAR = \" WHERE CLAVE_CUADRO = '\".$clave.\"' AND TIPO = '\".$buscar_tipo.\"'\";\r\n\t\t\tif($buscar_paquete != ''){\r\n\t\t\t\t$CADENA_BUSCAR .= $paq;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_paquete != ''){\r\n\t\t\t$CADENA_BUSCAR = \" WHERE CLAVE_CUADRO = '\".$clave.\"' AND PAQUETE = '\".$buscar_paquete.\"'\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" WHERE CLAVE_CUADRO = '\".$clave.\"'\"; \r\n \t\t}\r\n\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT paquete, tipo, uso,\r\n\t\tDATE_FORMAT(salida_desde, '%d-%m-%Y') AS salida_desde,\r\n\t\tDATE_FORMAT(salida_hasta, '%d-%m-%Y') AS salida_hasta,\r\n\t\tDATE_FORMAT(reserva_desde, '%d-%m-%Y') AS reserva_desde,\r\n\t\tDATE_FORMAT(reserva_hasta, '%d-%m-%Y') AS reserva_hasta,\r\n\t\tmargen_1, margen_2, maximo, forma_calculo, valor_1, valor_2, acumulable, prioritario, aplicacion, regimen FROM hit_producto_cuadros_alojamientos_condiciones \".$CADENA_BUSCAR.\" ORDER BY paquete, tipo, uso, salida_desde, reserva_desde, margen_1\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'PRODUCTO_CUADROS_ALOJAMIENTOS_CONDICIONES' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$folletos_condiciones = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['paquete'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($folletos_condiciones,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $folletos_condiciones;\t\t\t\t\t\t\t\t\t\t\t\r\n\t}", "function getRelaciones() {\r\n //arreglo relacion de tablas\r\n //---------------------------->DEPARTAMENTO(OPERADOR)\r\n //---------------------------->TEMA(TIPO)\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['tabla']='documento_tipo';\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['campo']='dti_id';\r\n\t\t$relacion_tablas['documento_tema']['dti_id']['remplazo']='dti_nombre';\r\n\t\t//---------------------------->TEMA(TIPO)\r\n\r\n\t\t//---------------------------->SUBTEMA(TEMA)\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['tabla']='documento_tema';\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['campo']='dot_id';\r\n\t\t$relacion_tablas['documento_subtema']['dot_id']['remplazo']='dot_nombre';\r\n //---------------------------->SUBTEMA(TEMA)\r\n\r\n //---------------------------->DOCUMENTO(OPERADOR)\r\n $relacion_tablas['documento_actor']['ope_id']['tabla']='operador';\r\n\t\t$relacion_tablas['documento_actor']['ope_id']['campo']='ope_id';\r\n\t\t$relacion_tablas['documento_actor']['ope_id']['remplazo']='ope_nombre';\r\n //---------------------------->DOCUMENTO(TIPO DE ACTOR)\r\n $relacion_tablas['documento_actor']['dta_id']['tabla']='documento_tipo_actor';\r\n\t\t$relacion_tablas['documento_actor']['dta_id']['campo']='dta_id';\r\n\t\t$relacion_tablas['documento_actor']['dta_id']['remplazo']='dta_nombre';\r\n //----------------------------<DOCUMENTO\r\n\r\n\t\t//---------------------------->DEPARTAMENTO(OPERADOR)\r\n\t\t$relacion_tablas['departamento']['ope_id']['tabla']='operador';\r\n\t\t$relacion_tablas['departamento']['ope_id']['campo']='ope_id';\r\n\t\t$relacion_tablas['departamento']['ope_id']['remplazo']='ope_nombre';\r\n\t\t//---------------------------->DEPARTAMENTO(OPERADOR)\r\n\r\n\t\t//---------------------------->DEPARTAMENTO(REGION)\r\n\t\t$relacion_tablas['departamento']['dpr_id']['tabla']='departamento_region';\r\n\t\t$relacion_tablas['departamento']['dpr_id']['campo']='dpr_id';\r\n\t\t$relacion_tablas['departamento']['dpr_id']['remplazo']='dpr_nombre';\r\n //---------------------------->DEPARTAMENTO(REGION)\r\n\r\n\t\t//---------------------------->MUNICIPIO(DEPARTAMENTO)\r\n\t\t$relacion_tablas['municipio']['dep_id']['tabla']='departamento';\r\n\t\t$relacion_tablas['municipio']['dep_id']['campo']='dep_id';\r\n\t\t$relacion_tablas['municipio']['dep_id']['remplazo']='dep_nombre';\r\n //---------------------------->MUNICIPIO(DEPARTAMENTO)\r\n\r\n return $relacion_tablas;\r\n }", "public function RegistreVenta($idVentaActiva,$TipoVenta,$CuentaDestino,$Comision,$Comisionista)\r\n {\r\n \r\n $fecha=date(\"Y-m-d\");\r\n $Hora=date(\"H:i:s\");\r\n \r\n //////// Averiguamos el ultimo numero de venta/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"ventas\");\r\n$maxID=$this->VerUltimoID();\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumVenta=$campos[\"NumVenta\"];\r\n$NumVenta=$NumVenta+1;\r\n\r\n//////// Averiguamos el ultimo numero de factura/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"facturas\");\r\n$maxID=$this->VerUltimoID();\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumFact=$campos[\"idFacturas\"];\r\n$NumFact=$NumFact+1;\r\n\r\n//////// Averiguamos el ultimo numero de cotizacion/////////////////////////////////////////////////////////////////////////////////\r\n\r\n$this->NombresColumnas(\"cotizaciones\");\r\n$maxID=$this->VerUltimoID();\r\n$idCoti=$maxID+1;\r\n$campos=$this->DevuelveValores($maxID);\r\n$NumCot=$campos[\"NumCotizacion\"];\r\n$NumCot=$NumCot+1;\r\n\r\n//print(\"max id de ventas: $maxID, Numero de Venta: $NumVenta\");\r\n\r\n$DatosVentaActiva=mysql_query(\"SELECT * FROM vestasactivas WHERE idVestasActivas='$idVentaActiva';\", $this->con) or die('problemas para consultas vestasactivas: ' . mysql_error());\r\n$DatosVentaActiva=mysql_fetch_array($DatosVentaActiva);\r\n$idCliente=$DatosVentaActiva[\"Clientes_idClientes\"];\r\n\r\n$registros=mysql_query(\"SELECT * FROM preventa WHERE VestasActivas_idVestasActivas='$idVentaActiva';\", $this->con) or die('no se pudo conectar: ' . mysql_error());\r\n\r\n//$registros1=mysql_fetch_array($registros);\t\r\n\t\t\t//$this->NombresColumnas(\"productosventa\");\r\n\t\t\tif(mysql_num_rows($registros)){\r\n\t\t\t\t$i=0;\r\n\t\t\t\t//print($i);\r\n\t\t\t\t\r\n\t\t\t\twhile($registros2=mysql_fetch_array($registros)){\r\n\t\t\t\t\t$i++;\t\t\t\r\n\t\t\t\t\t//print(\"fila $i:///////////////////////////////////////////////////////////////<br>\");\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t//print_r($registros2);\r\n\t\t\t\t\t$this->NombresColumnas(\"productosventa\");\r\n\t\t\t\t\t$idProducto=$registros2[\"ProductosVenta_idProductosVenta\"];\r\n\t\t\t\t\t$campos=$this->DevuelveValores($idProducto);\r\n\t\t\t\t\t$TotalVenta=$registros2[\"TotalVenta\"]+$registros2[\"Descuento\"];\r\n\t\t\t\t\t$IVA=$registros2[\"Impuestos\"];\r\n\t\t\t\t\t$TotalCostoP=$registros2[\"Cantidad\"]*$campos[\"CostoUnitario\"]; \r\n\t\t\t\t\t////////empezamos a formar el registro que se hará en ventas empezamos desde porque el id es autoincrement y el numcuentapuc es conocido\r\n\t\t\t\t\t\r\n\t\t\t\t\t$CamposVenta[2]=$NumVenta;\r\n\t\t\t\t\t$CamposVenta[3]=$fecha;\r\n\t\t\t\t\t$CamposVenta[4]=$idProducto;\r\n\t\t\t\t\t$CamposVenta[5]=$campos[\"Nombre\"];\r\n\t\t\t\t\t$CamposVenta[6]=$campos[\"Referencia\"];\r\n\t\t\t\t\t$CamposVenta[7]=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$CamposVenta[8]=$campos[\"CostoUnitario\"];\r\n\t\t\t\t\t$CamposVenta[9]=$registros2[\"ValorAcordado\"];\r\n\t\t\t\t\t$CamposVenta[10]=$registros2[\"Impuestos\"];\r\n\t\t\t\t\t$CamposVenta[11]=$registros2[\"Descuento\"];\r\n\t\t\t\t\t$CamposVenta[12]=$registros2[\"Cantidad\"]*$campos[\"CostoUnitario\"]; //Total costo\r\n\t\t\t\t\t$CamposVenta[13]=$TotalVenta;\r\n\t\t\t\t\t$CamposVenta[14]=$TipoVenta;\r\n\t\t\t\t\t$CamposVenta[15]=\"NO\"; //cerrado en periodo\r\n\t\t\t\t\t$CamposVenta[16]=$campos[\"Especial\"];\r\n\t\t\t\t\t$CamposVenta[17]=$idCliente;\r\n\t\t\t\t\t$CamposVenta[18]=$Hora;\r\n\t\t\t\t\t$CamposVenta[19]=$registros2[\"Usuarios_idUsuarios\"];\r\n\t\t\t\t\t$CamposVenta[20]=$NumFact;\r\n\t\t\t\t\t//print_r($CamposVenta);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Inserto el registro en la tabla ventas\r\n\t\t\t\t\tif($TipoVenta==\"Credito\" and $idCliente==0)\r\n\t\t\t\t\t\texit(\"Usted está intentando Registrar una venta a credito sin seleccionar un cliente, por favor asignelo a esta venta antes de continuar\");\r\n\t\t\t\t\telse\t\r\n\t\t\t\t\t\t$this->GuardaRegistroVentas(\"ventas\", $CamposVenta);\r\n\t\t\t\t\t///////////////////////////Registro el movimiento de SALIDA DE LA VENTA de los productos al Kardex\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Movimiento=\"SALIDA\";\r\n\t\t\t\t\t$Detalle=\"VENTA\";\r\n\t\t\t\t\t$idDocumento=$NumVenta;\r\n\t\t\t\t\t$Cantidad=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$ValorUnitario=$campos[\"CostoUnitario\"];\r\n\t\t\t\t\t$ValorTotalSalidas=round($Cantidad*$ValorUnitario);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->RegistrarKardex(\"kardexmercancias\",\"ProductosVenta_idProductosVenta\",$fecha, $Movimiento, $Detalle, $idDocumento, $Cantidad, $ValorUnitario, $ValorTotalSalidas, $idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Registro el movimiento de SALDOS DESPUES DE LA VENTA de los productos al Kardex\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Movimiento=\"SALDOS\";\r\n\t\t\t\t\t$CantidadSaldo=$campos[\"Existencias\"];\r\n\t\t\t\t\t$NuevoSaldo=$CantidadSaldo-$Cantidad;\r\n\t\t\t\t\t$ValorTotal=$NuevoSaldo*$ValorUnitario;\r\n\t\t\t\t\t$this->RegistrarKardex(\"kardexmercancias\",\"ProductosVenta_idProductosVenta\",$fecha, $Movimiento, $Detalle, $idDocumento, $NuevoSaldo, $ValorUnitario, $ValorTotal, $idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Actualiza tabla de productos venta\r\n\t\t\t\t\t\r\n\t\t\t\t\t$tabla=\"productosventa\";\r\n\t\t\t\t\t$NumRegistros=1;\r\n\t\t\t\t\t$Columnas[0]=\"Existencias\";\r\n\t\t\t\t\t//$Columnas[1]=\"CostoUnitario\";\r\n\t\t\t\t\t//$Columnas[2]=\"CostoTotal\";\r\n\t\t\t\t\t$Valores[0]=$NuevoSaldo;\r\n\t\t\t\t\t//$Valores[1]=$ValorUnitario;\r\n\t\t\t\t\t//$Valores[2]=$ValorTotal;\r\n\t\t\t\t\t$Filtro=\"idProductosVenta\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->EditeValoresTabla($tabla,$NumRegistros,$Columnas,$Valores,$Filtro,$idProducto);\r\n\t\t\t\t\t\r\n\t\t\t\t\t///////////////////////////Ingresar a Cotizaciones \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$tabla=\"cotizaciones\";\r\n\t\t\t\t\t$NumRegistros=16; \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Columnas[0]=\"Fecha\";\t\t\t\t\t$Valores[0]=$fecha;\r\n\t\t\t\t\t$Columnas[1]=\"NumCotizacion\";\t\t\t$Valores[1]=$NumCot;\r\n\t\t\t\t\t$Columnas[2]=\"Descripcion\";\t\t\t\t$Valores[2]=$campos[\"Nombre\"];\r\n\t\t\t\t\t$Columnas[3]=\"Referencia\";\t\t\t\t$Valores[3]=$campos[\"Referencia\"];\r\n\t\t\t\t\t$Columnas[4]=\"ValorUnitario\";\t\t\t$Valores[4]=$registros2[\"ValorAcordado\"];\r\n\t\t\t\t\t$Columnas[5]=\"Cantidad\";\t\t\t\t$Valores[5]=$registros2[\"Cantidad\"];\r\n\t\t\t\t\t$Columnas[6]=\"Subtotal\";\t\t\t\t$Valores[6]=$registros2[\"Subtotal\"];\r\n\t\t\t\t\t$Columnas[7]=\"IVA\";\t\t\t\t\t\t$Valores[7]=$IVA;\r\n\t\t\t\t\t$Columnas[8]=\"Total\";\t\t\t\t\t$Valores[8]=round($registros2[\"Subtotal\"]+$IVA);\r\n\t\t\t\t\t$Columnas[9]=\"Descuento\";\t\t\t\t$Valores[9]=0;\r\n\t\t\t\t\t$Columnas[10]=\"ValorDescuento\";\t\t\t$Valores[10]=$registros2[\"Descuento\"];\r\n\t\t\t\t\t$Columnas[11]=\"Clientes_idClientes\";\t$Valores[11]=$idCliente;\r\n\t\t\t\t\t$Columnas[12]=\"Usuarios_idUsuarios\";\t$Valores[12]=$registros2[\"Usuarios_idUsuarios\"];\r\n\t\t\t\t\t$Columnas[13]=\"TipoItem\";\t\t\t\t$Valores[13]=\"PR\";\r\n\t\t\t\t\t$Columnas[14]=\"PrecioCosto\";\t\t\t$Valores[14]=round($campos[\"CostoUnitario\"]);\r\n\t\t\t\t\t$Columnas[15]=\"SubtotalCosto\";\t\t\t$Valores[15]=round($campos[\"CostoUnitario\"]*$registros2[\"Cantidad\"]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->InsertarRegistro($tabla,$NumRegistros,$Columnas,$Valores);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t}\r\nreturn($NumVenta);\t\r\n//echo \"Venta Registrada\";\r\n\r\n}", "public function Consultar()\n {\n $condicion = $this->obtenerCondicion();\n $sentenciaSql = \"SELECT \n d.id_detalle_orden\n ,d.valor_inventario\n ,d.valor_venta\n ,d.cantidad\n ,d.id_orden\n ,d.id_producto\n ,d.estado\n ,p.descripcion AS nombre_producto \n FROM \n detalle_orden AS d \n INNER JOIN producto AS p ON d.id_producto = p.id_producto \".$condicion;\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n return true;\n }", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM EDIFICIO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->codedificio') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\tif (!$resultado = $this->mysqli->query($sql)) //Si la consulta no se ha realizado correctamente, mostramos mensaje de error\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devolvemos el mensaje\n\t}\n\telse //Si no, convierte el resultado en array\n\t{\n\t\t$tupla = $resultado->fetch_array(); //guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "function buscar_comprobante_documento($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)/prosic_tipo_cambio.compra_sunat) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function listarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_sel';\n\t\t$this->transaccion='GM_DET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_analisis_porque_det','int4');\n\t\t$this->captura('id_analisis_porque','int4');\n\t\t$this->captura('solucion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porque','varchar');\n\t\t$this->captura('respuesta','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function listarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_sel';\n\t\t$this->transaccion='ADQ_PROC_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_proceso_compra','int4');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('num_convocatoria','varchar');\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_ini_proc','date');\n\t\t$this->captura('obs_proceso','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('codigo_proceso','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('num_cotizacion','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\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\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_solicitud','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "protected function construirConsulta($operacion='seleccionar') {\n //Cerrar grupos abiertos\n while($this->gruposAbiertos) $this->cerrarGrupo();\n\n if($operacion=='insertar') {\n return $this->construirConsultaInsercion();\n } elseif($operacion!='actualizar') {\n $operacion='seleccionar';\n }\n\n $alias=1;\n \n $sql='';\n $parametros=[];\n $tipos=[];\n\n $campos=[];\n $relaciones=[];\n\n if($operacion=='actualizar') {\n $sql='UPDATE ';\n } else {\n $sql='SELECT ';\n\n $array=[];\n $this->prepararRelaciones($alias,true,$array)\n ->construirCamposYRelaciones($campos,$relaciones);\n \n $sql.=implode(',',$this->consultaColumnas?$this->consultaColumnas:$campos);\n\n $sql.=' FROM ';\n }\n\n $sql.='#__'.$this->nombre.' '.$this->alias.' ';\n\n $sql.=implode(' ',$relaciones);\n\n if($operacion=='actualizar') {\n $sql.=' SET ';\n $sql.=$this->construirCamposInsercionActualizacion($operacion,$parametros,$tipos);\n }\n\n if(count($this->consultaCondiciones)) {\n $sql.=' WHERE ';\n\n if(!$this->consultaSeleccionarEliminados) {\n $sql.=$this->alias.'.`e`=0 AND ';\n }\n\n $condiciones='';\n $parentesis=null;\n \n foreach($this->consultaCondiciones as $i=>$condicion) {\n if(!$condicion||!$condicion->condicion) continue;\n\n if(is_string($condicion)&&($condicion==')'||$condicion=='(')) {\n if($i==count($this->consultaCondiciones)-1) {\n //La última condición es )\n $condiciones.=' )';\n } else {\n //Establecer para la próxima condición\n $parentesis=$condicion;\n }\n continue;\n }\n \n if($parentesis==')') $condiciones.=' ) ';\n if($condiciones!='') $condiciones.=' '.$condicion->union.' ';\n if($parentesis=='(') $condiciones.=' ( ';\n $condiciones.='( '.$condicion->condicion.' )';\n foreach($condicion->parametros as $parametro) {\n $parametros[]=$parametro;\n $tipos[]=$this->determinarTipo($parametro);\n }\n\n $parentesis=null;\n }\n\n if(!$condiciones) $condiciones='1';\n $sql.=' ( '.$condiciones.' ) ';\n } elseif($operacion=='actualizar'&&$this->consultaValores->id) {\n $sql.=' WHERE '.$this->alias.'.`id`=? ';\n $parametros[]=$this->consultaValores->id;\n $tipos[]='d';\n } elseif(!$this->consultaSeleccionarEliminados) {\n $sql.=' WHERE '.$this->alias.'.`e`=0 ';\n }\n\n if($operacion=='seleccionar') {\n if($this->consultaAgrupar) {\n $sql.=' GROUP BY ';\n\n $campos=[];\n foreach($this->consultaAgrupar as $campo) {\n if(preg_match('/^[a-z0-9A-Z_]$/',$campo)) {\n $campos[]=$this->alias.'.`'.$campo.'`';\n } else {\n $campos[]=$campo;\n }\n }\n $sql.=implode(',',$campos);\n }\n\n if(count($this->consultaTeniendo)) {\n $sql.=' HAVING ';\n\n $condiciones=[];\n \n foreach($this->consultaTeniendo as $condicion) {\n $condiciones[]=$condicion->condicion;\n foreach($condicion->parametros as $parametro) {\n $parametros[]=$parametro;\n $tipos[]=$this->determinarTipo($parametro);\n }\n }\n\n $sql.=' ( '.implode(' ) AND ( ',$condiciones).' ) ';\n }\n\n if($this->consultaOrden) {\n $sql.=' ORDER BY ';\n\n $campos=[];\n foreach($this->consultaOrden as $orden) {\n if($orden->orden) {\n $campo=trim($orden->campo,'\\'` ');\n if(strpos($campo,'.')===false) $campo=$this->alias.'.`'.$campo.'`';\n $campos[]=$campo.' '.$orden->orden;\n } else {\n $campos[]=$orden->campo;\n }\n }\n $sql.=implode(',',$campos);\n }\n }\n\n if($this->consultaLimite||$this->consultaCantidad) {\n $sql.=' LIMIT ';\n\n $sql.=$this->consultaLimite?$this->consultaLimite:'0';\n\n if($this->consultaCantidad) $sql.=','.$this->consultaCantidad;\n }\n \n $this->sql=$sql;\n $this->parametros=$parametros;\n $this->tipos=$tipos;\n return $this;\n }", "function buscar() //funcion para ver si el registro existe \n\t{\n\t$sql=\"select * from slc_unid_medida where nomenc_unid_medida= '$this->abr' and desc_unid_medida= '$this->des'\"; \n\t $result=mysql_query($sql,$this->conexion);\n\t $n=mysql_num_rows($result);\n\t if($n==0)\n\t\t\t return 'false';\n\t\t\telse\n\t\t\t return 'true';\n\t}", "function getRecibida($fecha, $remitente, $guia) {\n $db = $this->getAdapter();\n $select = $db->select();\n $select->distinct(true);\n $select->from(array('e' => 'encomienda'), array(\n \"id_encomienda\", \"remitente\", \"guia\", \"detalle\",\n \"sucursal_de\", \"nombre_destino\", \"destinatario\",\n \"tipo\", \"fecha\"));\n $select->join(array('me'=>'movimiento_encomienda'),\"me.encomienda=e.id_encomienda\");\n if (isset($fecha) && $fecha != \"\") {\n $select->where(\"e.fecha='$fecha'\");\n }\n if (isset($remitente) && $remitente != \"\") {\n $select->where(\"e.remitente like '%\" . strtoupper($remitente) . \"%'\");\n }\n if (isset($guia) && $guia != \"\" && $guia != \"0\") {\n $select->where(\"e.guia='$guia'\");\n }\n $select->where(\"UPPER(me.movimiento)='RECIBIDO'\");\n// $select->orWhere(\"UPPER(e.estado)=?\", 'TRASPASO');\n $select->order(\"nombre_destino\");\n// echo $select->__toString();\n $log = Zend_Registry::get(\"log\");\n $log->info(\"recuperando encomiendas lista para entregar :\" . $select->__toString());\n return $db->fetchAll($select);\n }", "function listarUcedifobracivil(){\n\t\t$this->procedimiento='snx.ft_ucedifobracivil_sel';\n\t\t$this->transaccion='SNX_UDOC_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_ucedifobracivil','int4');\n\t\t$this->captura('id_ucedifsubgrupo','int4');\n\t\t$this->captura('cantidadobracivil','numeric');\n\t\t$this->captura('id_obracivilmoe','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_ai','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('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');\t\t\n\t\t$this->captura('desc_obracivilmoe','varchar');\n\t\t$this->captura('unidad','varchar');\t\t\n\t\t$this->captura('valortotalrlp','numeric');\n\t\t$this->captura('valortotalrcb','numeric');\t\n\t\t$this->captura('valortotalrsc','numeric');\t\t\n\t\t$this->captura('preciounitariorlp','numeric');\n\t\t$this->captura('preciounitariorcb','numeric');\n\t\t$this->captura('preciounitariorsc','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}", "function guardar_receta($objeto){\n\t// Anti hack\n\t\tforeach ($objeto as $key => $value) {\n\t\t\t$datos[$key]=$this->escapalog($value);\n\t\t}\n\n\t// Guarda la receta y regresa el ID\n\t\t$sql=\"\tINSERT INTO\n\t\t\t\t\tcom_recetas\n\t\t\t\t\t\t(id, nombre, precio, ganancia, ids_insumos, ids_insumos_preparados, preparacion)\n\t\t\t\tVALUES\n\t\t\t\t\t(\".$datos['id_receta'].\", '\".$datos['nombre'].\"',\".$datos['precio_venta'].\",\n\t\t\t\t\t\t\".$datos['margen_ganancia'].\",\n\t\t\t\t\t\t'\".$datos['ids'].\"','\".$datos['ids_preparados'].\"','\".$datos['preparacion'].\"'\n\t\t\t\t\t)\";\n\t\t// return $sql;\n\t\t$result =$this->insert_id($sql);\n\n\t// Guarda la actividad\n\t\t$fecha=date('Y-m-d H:i:s');\n\n\t\t$texto = ($datos['tipo']==1) ? 'receta' : 'insumo preparado' ;\n\t// Valida que exista el empleado si no agrega un cero como id\n\t\t$usuario = (!empty($_SESSION['accelog_idempleado'])) ?$_SESSION['accelog_idempleado'] : 0 ;\n\t\t$sql=\"\tINSERT INTO\n\t\t\t\t\tcom_actividades\n\t\t\t\t\t\t(id, empleado, accion, fecha)\n\t\t\t\tVALUES\n\t\t\t\t\t('',\".$usuario.\",'Agrega \".$texto.\"', '\".$fecha.\"')\";\n\t\t$actividad=$this->query($sql);\n\n\t\treturn $result;\n\t}", "public function buscarEstudianteActa() {\n\n $sql = \"SELECT\n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n WHERE \n E.codigoestudiante = ?\n AND E.codigoestudiante NOT IN ( \n SELECT \n DC.EstudianteId\n FROM \n DetalleAcuerdoActa DC\n WHERE \n CodigoEstado = 100)\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n $carrera = new Carrera(null);\n\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $fechaGrado->setCarrera($carrera);\n $this->setTipoDocumento($tipoDocumento);\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "function ocupa_reserva($id_desig){\n $sql=\"select * from reserva_ocupada_por where id_designacion=\".$id_desig;\n $res= toba::db('designa')->consultar($sql);\n if(count($res)>0){\n return true;\n }else{\n return false;\n }\n }", "function buscarNovas($solicitacao, $cliente){\r\n\r\n require 'conexao.php';\r\n\r\n $sql = \"SELECT * FROM tb_solicitacao\r\n INNER JOIN tb_cliente ON solcliid = cliid\r\n INNER JOIN tb_servico ON solserid = serid\r\n INNER JOIN tb_autonomo ON solautid = autid\r\n WHERE solcliid = $cliente\";\r\n\r\n $result = mysqli_query($con,$sql) or die(mysqli_error($con));\r\n\r\n $valida = mysqli_num_rows($result);\r\n\r\n //valida busca e retorna o resultado ou falso\r\n if($valida > 0){\r\n return $result;\r\n }else{\r\n return false;\r\n }\r\n}", "function SEARCH_PISTAS_LIBRES(){\n\t\t$sql1 = \"SELECT *\n\t\t\t\tFROM PARTIDO PA\n\t\t\t\tWHERE ( ( PA.FECHA = '$this->fecha') AND ( PA.HORARIO_ID = '$this->horario_ID'))\";\n $sql2 = \"SELECT *\n FROM RESERVA R\n WHERE ( ( R.FECHA = '$this->fecha') AND ( R.HORARIO_ID = '$this->horario_ID'))\";\n\n if ( !($resultado1 = $this->mysqli->query($sql1)) || !($resultado2 = $this->mysqli->query($sql2))){\n return 'ERROR: Fallo en la consulta sobre la base de datos';\n }\n else{ // si la busqueda es correcta devolvemos el recordset resultado\n $pistasLibres = NULL;\n \t$num_rows1 = mysqli_num_rows($resultado1);\n $num_rows2 = mysqli_num_rows($resultado2);\n\n \tif(($num_rows1 == 0) && (($num_rows2 == 0) )){ //Si no hay reservas ni partidos ese dia a esa hora\n\t\t\t\t$sql = \"SELECT * FROM PISTA ORDER BY ID\";\n\t\t if (!($resultado = $this->mysqli->query($sql)) ){\n\t\t return 'ERROR: Fallo en la consulta sobre la base de datos';\n\t\t }else{\n while($row = mysqli_fetch_array($resultado)){\n $pistasLibres[$row[\"ID\"]] = array($row[\"NOMBRE\"],$row[\"TIPO\"]);\n }\n\t\t \treturn $pistasLibres;\n\t\t }\n \t}else{\n\n $sql1 = \"SELECT PA.PISTA_ID\n FROM PARTIDO PA\n WHERE PA.FECHA = '$this->fecha' AND PA.HORARIO_ID = '$this->horario_ID'\n ORDER BY PA.ID\";\n $sql2 = \"SELECT R.PISTA_ID\n FROM RESERVA R\n WHERE R.FECHA = '$this->fecha' AND R.HORARIO_ID = '$this->horario_ID'\n ORDER BY R.ID\";\n $sql3 = \"SELECT * FROM PISTA ORDER BY ID\";\n\n if ( !($resultado1 = $this->mysqli->query($sql1))\n || !($resultado2 = $this->mysqli->query($sql2))\n || !($resultado3 = $this->mysqli->query($sql3)) ){\n return 'ERROR: Fallo en la consulta sobre la base de datos';\n }else{\n\n if($resultado1 <> NULL){\n while($row = mysqli_fetch_array($resultado1)){\n $list[$row[\"PISTA_ID\"]] = \"Ocupada\";\n }\n }\n if($resultado2 <> NULL){\n while($row = mysqli_fetch_array($resultado2)){\n $list[$row[\"PISTA_ID\"]] = \"Ocupada\";\n }\n }\n if($resultado3 <> NULL){\n while($row = mysqli_fetch_array($resultado3)){\n if(!array_key_exists($row[\"ID\"], $list)){\n $pistasLibres[$row[\"ID\"]] = array($row[\"NOMBRE\"],$row[\"TIPO\"]);\n }\n }\n }\n return $pistasLibres;\n }//fin del else\n return NULL;\n }//fin else\n } //fin else\n }", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlEliminarVenta($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "public function unidadReceptoraReal($correspondencia_id) {\n \n // BUSCAR UNIDADES DE RECEPTORES ESTABLECIDOS\n $unidades_receptoras = array();\n $unidad_recibe_id = '';\n $receptores_establecidos = Doctrine::getTable('Correspondencia_Receptor')->findByCorrespondenciaIdAndEstablecido($correspondencia_id, 'S');\n foreach ($receptores_establecidos as $receptor_establecido) {\n $unidades_receptoras[] = $receptor_establecido->getUnidadId();\n if($receptor_establecido->getFuncionarioId() == $this->getUser()->getAttribute('funcionario_id')){\n // SI EL FUNCIONARIO LOGUEADO ES ESTABLECIDO COMO RECEPTOR SE SELECCIONA LA UNIDAD POR LA CUAL RECIBE\n $unidad_recibe_id = $receptor_establecido->getUnidadId();\n }\n }\n \n if($unidad_recibe_id==''){\n // EN CASO DE NO ENCONTRAR LA UNIDAD, BUSCAR SI LE FUE ASIGANADA LA CORRESPONDENCIA COMO UNA TAREA\n $receptor_asignado = Doctrine::getTable('Correspondencia_Receptor')->findOneByCorrespondenciaIdAndFuncionarioIdAndEstablecido($correspondencia_id, $this->getUser()->getAttribute('funcionario_id'), 'A');\n\n if($receptor_asignado){\n $unidad_recibe_id = $receptor_asignado->getUnidadId();\n }\n }\n \n if($unidad_recibe_id==''){\n // BUSCAR LAS UNIDADES A LA QUE PERTENECE EL FUNCIONARIO CON PERMISO DE LEER\n $unidades_receptoras = array_unique($unidades_receptoras);\n \n $funcionario_unidades_leer = Doctrine::getTable('Correspondencia_FuncionarioUnidad')->funcionarioAutorizado($this->getUser()->getAttribute('funcionario_id'),'leer');\n\n foreach($funcionario_unidades_leer as $unidad_leer) {\n if(array_search($unidad_leer->getAutorizadaUnidadId(), $unidades_receptoras)>=0){\n $unidad_recibe_id = $unidad_leer->getAutorizadaUnidadId();\n }\n }\n }\n \n return $unidad_recibe_id;\n }", "function getVentasUsuario(){\n if(isset($_GET['id'])){\n\n // Obtencion del id del usuario\n $idUsuario = $_GET['id'];\n\n // Conexion a la base de datos\n $con = conexion();\n\n // Selecciona todas las ventas del usuario\n $query = \"SELECT * FROM ver_ventas_usuario WHERE usu_id = \".$idUsuario;\n $select = $con -> query($query);\n\n // Validacion de que el usuario tenga boletos comprados\n if($select -> num_rows > 0){\n\n // Creacion de array vacio que contendra todas las compras\n $arrayVentas = array();\n\n // Mientras exista una venta de boletos del usuario crea un array de la seccion y lo\n // agrega a la variable de todas las compras que existen\n while($row = $select -> fetch_assoc()){\n $compra = [\n \"id_venta\" => $row['ven_id'],\n \"estado_de_pago\" => $row['ven_pago_realizado'],\n \"id_seccion\" => $row['sec_id'],\n \"nombre_seccion\" => $row['sec_nombre'],\n \"costo\" => $row['sec_costo'],\n \"id_evento\" => $row['eve_id'],\n \"nombre_evento\" => $row['eve_nombre'],\n \"estado\" => $row['eve_estado'],\n \"ciudad\" => $row['eve_ciudad'],\n \"direccion\" => $row['eve_direccion'],\n \"lugar\" => $row['eve_lugar'],\n \"fecha\" => $row['eve_fecha'],\n \"hora\" => $row['eve_hora'],\n \"foto\" => $row['eve_foto'],\n \"descripcion\" => $row['eve_descripcion'],\n \"nombre_categoria\" => $row['cat_nombre'],\n \"id_usuario\" => $row['usu_id'],\n \"correo_usuario\" => $row['usu_correo'],\n ];\n $arrayVentas[] = $compra;\n }\n\n // Crea el array de respuesta con todas las compras del usuario de la base de datos\n $compras = [\"res\" => \"1\", \"compras\" => $arrayVentas];\n\n // Creacion del JSON, cierre de la conexion a la base de datos e imprime el JSON\n $json = json_encode($compras);\n $con -> close();\n print($json);\n }else{\n // Respuesta en caso de que no contenga boletos comprados el usuario\n $json = json_encode([\"res\" => \"0\", \"msg\" => \"No se encontraron boletos comprados\"]);\n $con->close();\n print($json);\n }\n }else{\n // Respuesta en caso de que la url no contenga el id del usuario\n $json = json_encode([\"res\"=>\"0\", \"msg\"=>\"La operación deseada no existe\"]);\n print($json);\n }\n}", "function leerClientes(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idClienteTg, c.NombreCte,c.RFCCte, c.direccion, c.ciudad,c.estado, c.email, c.telefono, c.numTg,r.nombreReferencia FROM referencias r join tarjetas_clientes c on r.idreferencia=c.referenciaId where c.status=1\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }", "public function getResidenciales() {\n $this->consulta = \"SELECT\n `usuario`.`idUsuario`,\n CONCAT(`empleado`.`primerNombre`, ' ', `empleado`.`segundoNombre`) AS nombres, \n CONCAT(`empleado`.`primerApellido`, ' ', `empleado`.`segundoApellido`) AS apellidos, \n `usuario`.`idResidencial`,\n `usuario`.`login`,\n `usuario`.`fechaHoraUltIN`,\n `usuario`.`estado`\n\n FROM\n `usuario`\n INNER JOIN `empleado` ON `usuario`.`idEmpleado` = `empleado`.`idEmpleado`\n WHERE\n `usuario`.`tipoUsuario` = 'Empleado'\";\n if ($this->consultarBD() > 0) {\n $this->mensaje = 'Seccion Usuarios Residenciales <br> Registros Encontrados: <b>' . count($this->registros) . '</b>';\n return true;\n } else {\n return false;\n }\n }", "static public function ctrEliminarVenta(){\n\n\t\tif(isset($_GET[\"idVenta\"])){\n\n\t\t\t$tabla = \"ventas\";\n\n\t\t\t$item = \"id\";\n\t\t\t$valor = $_GET[\"idVenta\"];\n\n\t\t\t$traerVenta = ModeloVentas::mdlMostrarVentas($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR FECHA ÚLTIMA COMPRA\n\t\t\t=============================================*/\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemVentas = null;\n\t\t\t$valorVentas = null;\n\n\t\t\t$traerVentas = ModeloVentas::mdlMostrarVentas($tabla, $itemVentas, $valorVentas);\n\n\t\t\t$guardarFechas = array();\n\n\t\t\tforeach ($traerVentas as $key => $value) {\n\t\t\t\t\n\t\t\t\tif($value[\"id_cliente\"] == $traerVenta[\"id_cliente\"]){\n\n\t\t\t\t\tarray_push($guardarFechas, $value[\"fecha\"]);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(count($guardarFechas) > 1){\n\n\t\t\t\tif($traerVenta[\"fecha\"] > $guardarFechas[count($guardarFechas)-2]){\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-2];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}else{\n\n\t\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t\t$valor = $guardarFechas[count($guardarFechas)-1];\n\t\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\t$item = \"ultima_compra\";\n\t\t\t\t$valor = \"0000-00-00 00:00:00\";\n\t\t\t\t$valorIdCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item, $valor, $valorIdCliente);\n\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\n\t\t\t$productos = json_decode($traerVenta[\"productos\"], true);\n\n\t\t\t$totalProductosComprados = array();\n\n\t\t\tforeach ($productos as $key => $value) {\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\t\t\t\t\n\t\t\t\t$tablaProductos = \"productos\";\n\n\t\t\t\t$item = \"id\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$orden = \"id\";\n\n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n\t\t\t\t$item1a = \"ventas\";\n\t\t\t\t$valor1a = $traerProducto[\"ventas\"] - $value[\"cantidad\"];\n\n\t\t\t\t$nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n\t\t\t\t$item1b = \"stock\";\n\t\t\t\t$valor1b = $value[\"cantidad\"] + $traerProducto[\"stock\"];\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\t\t\t}\n\n\t\t\t$tablaClientes = \"clientes\";\n\n\t\t\t$itemCliente = \"id\";\n\t\t\t$valorCliente = $traerVenta[\"id_cliente\"];\n\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tablaClientes, $itemCliente, $valorCliente);\n\n\t\t\t$item1a = \"compras\";\n\t\t\t$valor1a = $traerCliente[\"compras\"] - array_sum($totalProductosComprados);\n\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tablaClientes, $item1a, $valor1a, $valorCliente);\n\n\t\t\t/*=============================================\n\t\t\tELIMINAR VENTA\n\t\t\t=============================================*/\n\n\t\t\t$respuesta = ModeloVentas::mdlEliminarVenta($tabla, $_GET[\"idVenta\"]);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La venta ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"ventas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t}\n\n\t}", "function Cargar_servicios_precios($clave, $filadesde, $buscar_servicio, $buscar_fecha){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\r\n\t\tif($buscar_servicio != null){\r\n\t\t\t$fech = \" AND '\".date(\"Y-m-d\",strtotime($buscar_fecha)).\"' BETWEEN FECHA_DESDE AND FECHA_HASTA\";\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"' AND CLAVE_SERVICIO = '\".$buscar_servicio.\"'\";\r\n\t\t\tif($buscar_fecha != null){\r\n\t\t\t\t$CADENA_BUSCAR .= $fech;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_fecha != null){\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"' AND '\".date(\"Y-m-d\",strtotime($buscar_fecha)).\"' BETWEEN FECHA_DESDE AND FECHA_HASTA\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"'\"; \r\n \t\t}\r\n\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT clave_servicio,clave_calendario, pax_desde, pax_hasta, precio, precio_ninos\r\n\t\t\t\t\t\t\t\t\t\tFROM hit_producto_cuadros_servicios_precios \r\n\t\t\t\t\t\t\t\t\t\tWHERE \".$CADENA_BUSCAR.\" ORDER BY numero, fecha_desde, pax_desde\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'PRODUCTO_CUADROS_SERVICIOS_PRECIOS' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$folletos_servicios_precios = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['clave_servicio'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($folletos_servicios_precios,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $folletos_servicios_precios;\r\n\t}", "function existe_definitiva ($datos){\n $cuatrimestre=$this->obtener_cuatrimestre();\n $fecha= getdate();\n $anio=$fecha['year'];\n //$resultado=FALSE;\n //en la fecha actual no debe existir ninguna asignacion por periodo o parte de la misma\n //incluir en JOIN asignacion_periodo AND ($fecha_actual BETWEEN t_p.fecha_inicio AND t_p.fecha_fin)\n $fecha_actual=date('y-m-d');\n// $sql=\"(SELECT t_a.id_asignacion, t_a.finalidad, t_a.hora_inicio, t_a.hora_fin \n// FROM asignacion t_a \n// JOIN aula t_au ON (t_a.id_aula=t_au.id_aula)\n// JOIN asignacion_definitiva t_d ON (t_a.id_asignacion=t_d.id_asignacion)\n// WHERE t_d.nombre='{$this->s__dia}' AND t_d.cuatrimestre=$cuatrimestre AND t_d.anio=$anio AND t_au.id_aula={$datos['id_aula']} AND ('{$datos['hora_inicio']}' BETWEEN t_a.hora_inicio AND t_a.hora_fin) AND ('{$datos['hora_fin']}' BETWEEN t_a.hora_inicio AND t_a.hora_fin)) \n// \n// UNION \n// \n// (SELECT t_a.id_asignacion, t_a.finalidad, t_a.hora_inicio, t_a.hora_fin \n// FROM asignacion t_a\n// JOIN aula t_au ON (t_a.id_aula=t_au.id_aula)\n// JOIN asignacion_periodo t_p ON (t_a.id_asignacion=t_p.id_asignacion )\n// JOIN esta_formada t_f ON (t_p.id_asignacion=t_f.id_asignacion) \n// WHERE t_f.nombre='{$this->s__dia}' AND t_f.cuatrimestre=$cuatrimestre AND t_f.anio=$anio AND t_au.id_aula={$datos['id_aula']} AND ('{$datos['hora_inicio']}' BETWEEN t_a.hora_inicio AND t_a.hora_fin) AND ('{$datos['hora_fin']}' BETWEEN t_a.hora_inicio AND t_a.hora_fin)) \n// \";\n// $asignacion=toba::db('gestion_aulas')->consultar($sql);\n $asignaciones=$this->dep('datos')->tabla('asignacion')->get_asignaciones_por_aula($datos['dia_semana'], $cuatrimestre, $anio, $datos['id_aula']);\n \n //print_r($asignaciones);exit();\n \n //el formato de este arreglo es : indice => array('id_aula'=>x 'aula'=>y). La función solamente\n //requiere el id_aula\n $aulas=array(array('id_aula'=>$datos['id_aula']));\n \n //obtenemos un arreglo con todos los horarios disponibles\n $horarios_disponibles=$this->obtener_horarios_disponibles($aulas, $asignaciones);\n \n// print_r(\"<br><br> Estos son los horarios disponibles : <br><br>\");\n// print_r($this->s__horarios_disponibles);exit();\n return ($this->verificar_inclusion_de_horario($datos['hora_inicio'], $datos['hora_fin']));\n //$resultado=TRUE;\n //}\n \n //return $resultado;\n }", "function validar($objeto){\n\t\t$sql = \"SELECT\n\t\t\t\t\tid\n\t\t\t\tFROM\n\t\t\t\t\tcom_recetas\n\t\t\t\tWHERE\n\t\t\t\t\tid = \".$objeto['id_receta'];\n\t\t// return $sql;\n\t\t$result =$this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "function listar_originales_idioma($registrado,$id_tipo,$letra,$filtrado,$orden,$id_subtema,$id_idioma,$tipo_pictograma,$txt_locate,$sql) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND palabras.id_tipo_palabra='.$id_tipo.''; }\n\t\t\t\n\t\tif (isset($sql) && $sql !='') { \n\t\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\t\t'.$sql; \n\t\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t} else {\n\t\t\t\n\t\t\tif ($id_subtema==99999) { \n\t\t\t\t$sql_subtema=''; \n\t\t\t\t$subtema_tabla='';\n\t\t\t\t$subtema_tabla_from='';\n\t\t\t} \n\t\t\telse { \n\t\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\t\tAND palabra_subtema.id_subtema='.$id_subtema.''; \n\t\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($letra==\"\") { $sql_letra=''; } \n\t\telse { \n\t\t\n\t\t\tswitch ($txt_locate) { \n\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 2:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '%%$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 3:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '%%$letra'\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion='$letra'\"; \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t$sql_letra=\"AND traducciones_\".$id_idioma.\".traduccion LIKE '$letra%%'\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}\t\n\t\t\n\t\tif ($filtrado==1) { $sql_filtrado='imagenes.ultima_modificacion'; } \n\t\telseif ($filtrado==2) { $sql_filtrado='palabras.palabra'; }\n\t\t\n\t\t$query = \"SELECT COUNT(*)\n\t\tFROM palabra_imagen, imagenes, palabras, traducciones_\".$id_idioma.\" $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabra_imagen.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".id_palabra=palabras.id_palabra\n\t\tAND traducciones_\".$id_idioma.\".traduccion IS NOT NULL\n\t\t$sql_letra\n\t\t$sql_tipo\n\t\t$sql_subtema\t\n\t\tAND imagenes.id_tipo_imagen=$tipo_pictograma\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\t$mostrar_registradas\n\t\tORDER BY $sql_filtrado $orden\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $row[0];\n\t\t\n\t}", "function buscarEspaciosVistos(){\r\n $i=0;\r\n $espacios_vistos=isset($espacios_vistos)?$espacios_vistos:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if(is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $espacio) {\r\n $espacios[$i]=$espacio[0];\r\n $i++;\r\n }\r\n }\r\n \r\n if(is_array($espacios)){\r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $espacios_vistos[$key]['CODIGO']=$cursado['CODIGO'];\r\n $espacios_vistos[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n }\r\n }else{\r\n $espacios_vistos=$espacios;\r\n }\r\n \r\n }\r\n return $espacios_vistos;\r\n }", "function get_estatus_recibo($idArticulo) {\n $query = \"SELECT \" .\n \"doc_validar_pago \" .\n \"FROM \" .\n \"tblDocumentos \" .\n \"WHERE \" .\n \"art_id=$idArticulo\";\n\n $sth = $this->db->prepare($query);\n $sth->setFetchMode(PDO::FETCH_ASSOC);\n $sth->execute();\n $count = $sth->rowCount();\n $data = NULL;\n if ($count > 0) {\n $data = $sth->fetchAll();\n $data = $data[0];\n $data = $data['doc_validar_pago'];\n } else {\n $data = FALSE;\n }\n return $data;\n }", "function queryRicercaAvanzata ($info_utente, $hobby){\r\n \r\n // condizione dell'info utente\r\n $cond_info_utente = '';\r\n $cond_hobby = '';\r\n \r\n foreach ($info_utente as $key => $value) {\r\n if($value != 'NULL'){\r\n $cond_info_utente .= $key . '=' . $value . ' AND ';\r\n } \r\n }\r\n \r\n //considero il caso cui siano stati inseriti hobby nella ricerca\r\n //in caso affermativo viene aggiunta la condizione per gli hobby\r\n if(!empty($hobby)){\r\n foreach ($hobby as $key => $value) {\r\n $cond_hobby .= 'tipo_hobby' . '=' . $value . ' OR '; \r\n } \r\n $condizione = (trim($cond_info_utente . '(' . $cond_hobby , 'OR ')) . ')'; \r\n }\r\n // nel caso gli hobby non siano stati inseriti ripulisco la condizione togliendo and finali e \r\n // considero solo come condizione le info utente\r\n else{\r\n $condizione = trim($cond_info_utente , 'AND ');\r\n }\r\n \r\n $sql = 'SELECT email_utente, nickname, utente_esperto, utente_seguito, utente_seguace, path_img_profilo, data_ora_richiesta, ' .\r\n 'richiesta_accettata, data_ora_risposta ' . \r\n 'FROM (utente NATURAL JOIN info_utente ) LEFT OUTER JOIN seguaci_seguiti ' . \r\n 'ON email_utente = utente_seguito AND utente_seguace =' . \r\n \"'\" . $_SESSION['email_utente'] . \"' \" .\r\n 'WHERE email_utente IN (' .\r\n 'SELECT email_utente ' .\r\n 'FROM info_utente NATURAL LEFT OUTER JOIN hobby ' .\r\n 'WHERE ' . $condizione . ')'; \r\n\r\n return $sql;\r\n}", "function Cuerpo($acceso,$id_contrato)\n\t{\n\t\t//echo \"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT tarifa_ser FROM vista_tarifa where id_serv='BM00001'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$costo_inst=utf8_decode(trim($row['tarifa_ser']));\n\t\t}\n\t\t//echo \"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\");\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\");\n\t\tif($row=row($acceso)){\n\t\t\n\t\t\t$observacion=utf8_decode(trim($row['observacion']));\n\t\t\t$costo_contrato=utf8_decode(trim($row['costo_contrato']));\n\t\t\t$tipo_cliente=utf8_decode(trim($row['tipo_cliente']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombrecli']));\n\t\t\t$apellidocli=utf8_decode(trim($row['apellido']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombre']));\n\t\t\t$etiqueta=utf8_decode(trim($row['etiqueta']));\n\t\t\t$cedulacli=utf8_decode(trim($row['cedula']));\n\t\t\t\n\t\t\t$fecha=formatofecha(trim($row[\"fecha_contrato\"]));\n\t\t\t$fecha_nac=formatofecha(trim($row[\"fecha_nac\"]));\n\t\t\t\n\t\t\t\n\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t$id_contrato=trim($row['id_contrato']);\n\t\t\n\t\t\n\t\t\t$puntos=utf8_decode(trim($row['puntos']));\n\t\t\t$deuda=utf8_decode(trim($row['deuda']));\n\t\t\tif($deuda==\"\"){\n\t\t\t\t$deuda=0;\n\t\t\t}\n\t\t\t\n\t\t\t$deuda=number_format($deuda, 2, ',', '.');\n\t\t\t$nombre_zona=utf8_decode(trim($row['nombre_zona']));\n\t\t\t$nombre_sector=utf8_decode(trim($row['nombre_sector']));\n\t\t\t$nombre_calle=utf8_decode(trim($row['nombre_calle']));\n\t\t\t$numero_casa=utf8_decode(trim($row['numero_casa']));\n\t\t\t$telefono=utf8_decode(trim($row['telefono']));\n\t\t\t$telf_casa=utf8_decode(trim($row['telf_casa']));\n\t\t\t$telf_adic=utf8_decode(trim($row['telf_adic']));\n\t\t\t$email=utf8_decode(trim($row['email']));\n\t\t\t$direc_adicional=utf8_decode(trim($row['direc_adicional']));\n\t\t\t$id_persona=utf8_decode(trim($row['id_persona']));\n\t\t\t$postel=utf8_decode(trim($row['postel']));\n\t\t\t$taps=utf8_decode(trim($row['taps']));\n\t\t\t$pto=utf8_decode(trim($row['pto']));\n\t\t\t$edificio=utf8_decode(trim($row['edificio']));\n\t\t\t$numero_piso=utf8_decode(trim($row['numero_piso']));\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre,apellido FROM persona where id_persona='$id_persona' LIMIT 1 offset 0 \");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$vendedor=utf8_decode(trim($row['nombre'])).\" \".utf8_decode(trim($row['apellido']));\n\t\t\t\n\t\t}\n\n\t\tif($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}\n\t\t\n\t\t\n\t\t$this->Ln();\t\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetXY(10,35);\t\t\n\t\t$this->Cell(195,10,\"Abonado: $nro_contrato\",\"0\",0,\"R\");\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->SetXY(40,50);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA JURIDICA.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Razón Social.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Actividad.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Telef.\",\"1\",0,\"J\");\n\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Representante Legal\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cargo en la Empresa.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA NATURAL.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: $nombrecli $apellidocli\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: $fecha_nac\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ingreso Mensual: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Deposito en Garantia: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Tipo Vivienda: Propia ___ Alquilado ___ Canon Mensual: ____\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(65,6,\"Vencimiento del Contrato: / / \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DATOS DEL CONYUGUE.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Ingreso Mensual.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DOMICILIO DEL SERVICIO\",\"1\",0,\"C\");\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Apellidos: $apellidocli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Vendedor: $vendedor\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Suscriptor Nº: $nro_contrato\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha: $fecha\",\"1\",0,\"J\");*/\n\t\t\t\t\n\t\n\t\t/*if($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}*/\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I. $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Ocupación: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Grupo Familiar Nº:\",\"1\",0,\"J\");\n\t\tif($fecha_nac=='11/11/1111'){\n\t\t\t$fecha_nac='';\n\t\t}\n\t\t$this->Cell(65,6,\"Fecha de Nacimiento : $fecha_nac\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"DOMICILIO DE SERVICIO\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb o Sector: $nombre_sector\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Calle n°: \",\"1\",0,\"J\");\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Avenida o Calle: $nombre_calle\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Vereda : \",\"1\",0,\"J\");\t\t\n\t\t\n\t\tif($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Piso:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"N° de Casa o Apto: $numero_casa $apto\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Referencia o Zona: $nombre_zona N°Poste:$postel\",\"1\",0,\"J\");\n\t\t//$this->Cell(65,6,\"N° de Poste: $postel\",\"0\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ruta Cuenta: \",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Zona: $nombre_zona\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Manzana: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb.: $nombre_sector\",\"1\",0,\"J\");*/\n\t\t\n\t\t/*if($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Cell(97,6,\"Apto.: $apto\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cod. Postal: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t//Rect( float x, float y, float w, float h [, string style])\n\t\t$this->Cell(98,6,\"Vivienda Alquilada: SI ____ NO ____\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha de Vencimineto de Alquiler: \",\"1\",0,\"J\");\n\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Proveedor de Internet: \",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\");\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"SERVICIOS \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,6,\"CANT.\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"P. UNITARIO \",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"P. TOTAL \",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Instalación Principal\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"1\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Tomas Adicionales\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Cable Coaxial\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Conectores\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Espliter\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\" \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(60,5,\"TOTAL A PAGAR BS\",\"1\",0,\"R\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"FECHA ESTIMADA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"HORA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"TOTAL A\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"$costo_contrato\",\"LRT\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"DE INSTALACION\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"SUGERIDA\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"PAGAR Bs.\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"\",\"LRB\",0,\"C\");*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PROGRAMACIÓN\",\"1\",0,\"C\");\t\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Descripción.\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Descripción\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Familiar Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Extendido Bs \",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Adulto Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Comercial I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Monto de Contrato: Bs. $costo_inst\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Firma del Abonado:_________________________ \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Puntos Adicionales:_________________________\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Costo Punto Adicional:_______________________\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Tiempo de Instalación:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Total a Cancelar Mensual:\",\"1\",0,\"J\");\n\t\t$this->Cell(30,6,\"Total:\",\"1\",0,\"J\");\n\t\t$this->Cell(35,6,\"Contrato:\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Observaciones.\",\"1\",0,\"J\");\n\t\t\t\t\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"$observacion\",\"1\",0,\"J\");*/\n\t\t\n\t/*\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"RECIBO DE PAGO\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"*EL PRECIO INCLUYE EL IMPUESTO DE LEY\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Efectivo\",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"Cheque\",\"1\",0,\"C\");\n\t\t$this->Cell(65,6,\"Cargo Cta. Cte.\",\"1\",0,\"C\");\n\t\t$this->Cell(60,6,\"Tarjeta de Credito:\",\"1\",0,\"C\");\n\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Bs. $costo_contrato\",\"1\",0,\"L\");\n\t\t$this->Cell(35,6,\"Nº.\",\"1\",0,\"L\");\n\t\t$this->Cell(65,6,\"Cta. Nº Bco.\",\"1\",0,\"L\");\n\t\t$this->Cell(60,6,\"Nombre:\",\"1\",0,\"L\");\n\t\t\n\t\n\t\t\n\t\t\n\t\t$this->Ln(15);\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Nota:\",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"En caso de que el televisor no acepte la señal de todos los canales del cable, es posible que amerite la instalación de un amplificador de sintonia, el cual deberá ser adquirido por el SUSCRIPTOR\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Atención: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"La Empresa. No autoriza el retiro de televisores y/o VHS por el personal de la empresa. El SUSCRIPTOR conoce y acepta las condiciones del contrato del servicio que apacen al dorso del presente\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Aviso: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"Se le informa a todos los suscriptores y publico en general de acuerdo a la Ley Orgánica de Telecomunicaciones, en el Artículo 189, Literal 2: será penado con prisión de uno (1) a cuatro (4) años, el que utilizando equipos o tecnologías de cualquier tipo, proporciones a un tercero el acceso o disfrute en forma fraudulenta o indebida de un serbicio o facilidad de telecomunicaciones \",\"0\",\"J\");\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,5,\"________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"_________________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"__________________________\",\"0\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Firma del Vendedor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Nombre y Apellido del Suscriptor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Firma del Suscriptor\",\"0\",0,\"C\");*/\n\t\t\n\t\t/*$this->Ln(4);\n\t\t\n\t\t$this->SetDrawColor(76,136,206);\n\t\t$this->SetLineWidth(.4);\n\t\t$this->SetFont('times','I',12);\n\t\t$this->SetX(10);\n\t\t$this->MultiCell(195,5,'Av. Perimetral, Centro Comercial Residencial Central. P.B. Local Nº 07. Cúa, Edo. Miranda.\[email protected] / [email protected]',\"TB\",\"C\");*/\n\t\t\n\t\t//$this->clausulas();\n\t\t\n\t\treturn $cad;\n\t}", "function buscar_si_existe_simbolo_final($id_palabra,$id_tipo_simbolo,$marco,$contraste,$sup_con_texto,$sup_idioma,$sup_mayusculas,$sup_font,$inf_con_texto,$inf_idioma,$inf_mayusculas,$inf_font,$id_imagen,$sup_id_traduccion,$inf_id_traduccion) {\n\t\t$query = \"SELECT *\n\t\tFROM simbolos\n\t\tWHERE id_palabra='$id_palabra' \n\t\tAND id_tipo_simbolo='$id_tipo_simbolo'\n\t\tAND marco='$marco'\n\t\tAND contraste='$contraste'\n\t\tAND sup_con_texto='$sup_con_texto'\n\t\tAND sup_idioma='$sup_idioma'\n\t\tAND sup_mayusculas='$sup_mayusculas'\n\t\tAND sup_font='$sup_font'\n\t\tAND inf_con_texto='$inf_con_texto'\n\t\tAND inf_idioma='$inf_idioma'\n\t\tAND inf_mayusculas='$inf_mayusculas'\n\t\tAND inf_font='$inf_font'\n\t\tAND id_imagen='$id_imagen'\n\t\tAND sup_id_traduccion='$sup_id_traduccion'\n\t\tAND inf_id_traduccion='$inf_id_traduccion'\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\tmysql_close($connection);\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\tmysql_close($connection);\n\t\t\treturn 1;\n\t\t}\n\t}", "public function selecionarEmpresaContratada()\n {\n try\n {\n $sql = \"SELECT * FROM empresa_contratada\";\n $busca = $this->conexao->conectar()->prepare($sql);\n $busca->execute();\n return $busca->fetchALL(PDO::FETCH_OBJ);\n }\n catch(PDOException $erro)\n {\n echo \"Erro\" . $erro->getMessage();\n }\n\n }", "function afficherRendezvouss(){\n\t\t$sql=\"SElECT * From rendezvous\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "function validaFactAnt($ids_Ventas, $link)\n{\n $userReg = $_SESSION['LZFident'];\n //vaciar ids en un array\n // $ids_Ventas=[1,6,34,8];\n $ArrayIdsVentas = array();\n $ArrayIdsVentas = array_merge($ArrayIdsVentas, $ids_Ventas);\n $resp = array(); //array para retornar\n\n $busqVentas = implode(',', $ArrayIdsVentas);\n //VALIDAR QUE EXISTA LA VENTA Y ESTE CERRADA\n $idsDefectuosos = array();\n $idAnt = '';\n for ($i = 0; $i <= count($ArrayIdsVentas) - 1; $i++) {\n $idVenta = $ArrayIdsVentas[$i];\n $sql = \"SELECT\n COUNT( factgencancel.id ) AS factCanceladas,\n COUNT( factgen.id ) AS totalFact\nFROM\n vtasfact vf\n INNER JOIN facturasgeneradas factgen ON factgen.id = vf.idFactgen\n LEFT JOIN facturasgeneradas factgencancel ON factgencancel.id = vf.idFactgen\n AND factgencancel.idCancelada != ''\n WHERE vf.idVenta='$idVenta'\";\n\n $result = mysqli_query($link, $sql) or die(json_encode(array('estatus' => '3', 'mensaje' => 'Error al consultar la Facturas de la venta, notifica a tu Administrador', 'idsErroneos' => mysqli_error($link))));\n $array_resultado = mysqli_fetch_array($result);\n $factCanceladas = $array_resultado['factCanceladas'];\n $totalFact = $array_resultado['totalFact'];\n //Se verifica que el total de cancelaciones sea igual al total de las facturas emitidas\n if ($totalFact > $factCanceladas) {\n array_push($idsDefectuosos, \"#\" . $idVenta);\n }\n }\n if (count($idsDefectuosos) > 0) {\n $resp = array('estatus' => '0', 'mensaje' => 'Verifica que las ventas no tengan facturas ACTIVAS.', 'idsErroneos' => json_encode($idsDefectuosos));\n return $resp;\n } else {\n $resp = array('estatus' => '1', 'mensaje' => 'Verificación de los ticket(s) de venta(s) correcta', 'idsErroneos' => '');\n return $resp;\n } //no permitidas\n}", "function validarCliente(){\n $this->procedimiento='rec.ft_cliente_ime';\n $this->transaccion='CLI_VALIDAR_GET';\n $this->tipo_procedimiento='IME';//tipo de transaccion\n $this->setCount(false);\n $this->setParametro('nombre','nombre','varchar');\n $this->setParametro('apellido','apellido','varchar');\n $this->setParametro('genero','genero','varchar');\n $this->setParametro('ci','ci','varchar');\n\n\n $this->captura('v_valid','varchar');\n $this->captura('v_desc_func','varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->respuesta); exit;\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function valida_ingreso_ambulatorio_modo_1($id_comprobante,$prestacion,$cantidad){\n\t$query=\"select codigo from facturacion.nomenclador \n\t\t\twhere id_nomenclador='$prestacion'\";\t \n\t$res_codigo_nomenclador=sql($query, \"Error 1\") or fin_pagina();\t\n\t$codigo=$res_codigo_nomenclador->fields['codigo'];\n\t\n\tif(trim($codigo) == 'CT-C021'){\n\t\t//debo saber si alguna vez se al facturo beneficiario el \"CT-C020\"\n\t\t\n\t\t//traigo el id_smiafiliados para buscar el codigo \"CT-C020\"\n\t\t$query=\"select id_smiafiliados from facturacion.comprobante \n\t\t\t\twhere id_comprobante='$id_comprobante'\";\t \n\t\t$res_codigo_nomenclador=sql($query, \"Error 1\") or fin_pagina();\t\n\t\t$id_smiafiliados=$res_codigo_nomenclador->fields['id_smiafiliados'];\n\t\t\n\t\t//busco el codigo \"CT-C020\"\n\t\t$query=\"SELECT id_prestacion\t\t\t\t\n\t\t\t\tFROM nacer.smiafiliados\n \t\t\t\tINNER JOIN facturacion.comprobante ON (nacer.smiafiliados.id_smiafiliados = facturacion.comprobante.id_smiafiliados)\n \t\t\t\tINNER JOIN facturacion.prestacion ON (facturacion.comprobante.id_comprobante = facturacion.prestacion.id_comprobante)\n \t\t\t\tINNER JOIN facturacion.nomenclador ON (facturacion.prestacion.id_nomenclador = facturacion.nomenclador.id_nomenclador)\n \t\t\t\twhere smiafiliados.id_smiafiliados='$id_smiafiliados' and codigo='CT-C020'\";\n \t\t$cant_pres=sql($query, \"Error 3\") or fin_pagina();\n \t\tif ($cant_pres->RecordCount()>=1)return 1;\n \t\telse return 0;\n\t}\n\telse return 1;\n}", "public function listar($inicio = 0, $cantidad = 0, $excepcion = NULL, $condicion = NULL, $idCurso = NULL) {\n global $sql, $configuracion;\n\n /* * * Validar la fila inicial de la consulta ** */\n if (!is_int($inicio) || $inicio < 0) {\n $inicio = 0;\n }\n\n /* * * Validar la cantidad de registros requeridos en la consulta ** */\n if (!is_int($cantidad) || $cantidad <= 0) {\n $cantidad = 0;\n }\n\n /* * * Validar que la condición sea una cadena de texto ** */\n if (!is_string($condicion)) {\n $condicion = '';\n }\n\n /* * * Validar que la excepción sea un arreglo y contenga elementos ** */\n if (isset($excepcion) && is_array($excepcion) && count($excepcion)) {\n $excepcion = implode(',', $excepcion);\n $condicion .= 'ac.id NOT IN (' . $excepcion . ') AND ';\n }\n\n /* * * Definir el orden de presentación de los datos ** */\n if ($this->listaAscendente) {\n $orden = 'ac.fecha_publicacion ASC';\n } else {\n $orden = 'ac.fecha_publicacion DESC';\n }\n\n $tablas = array(\n 'ac' => 'actividades_curso'\n );\n\n $columnas = array(\n 'id' => 'ac.id',\n 'idCurso' => 'ac.id_curso',\n 'idUsuario' => 'ac.id_usuario',\n 'titulo' => 'ac.titulo',\n 'descripcion' => 'ac.descripcion',\n 'fechaPublicacion' => 'UNIX_TIMESTAMP(ac.fecha_publicacion)',\n 'fechaLimite' => 'UNIX_TIMESTAMP(ac.fecha_limite)',\n 'diasRestantes' => 'DATEDIFF(ac.fecha_limite, NOW())'\n );\n\n $condicion .= 'ac.id_curso = \"'.$idCurso.'\"';\n\n if (is_null($this->registros)) {\n $sql->seleccionar($tablas, $columnas, $condicion);\n $this->registros = $sql->filasDevueltas;\n }\n\n $consulta = $sql->seleccionar($tablas, $columnas, $condicion, '', $orden, $inicio, $cantidad);\n\n $lista = array();\n if ($sql->filasDevueltas) {\n\n while ($actividad = $sql->filaEnObjeto($consulta)) {\n $actividad->icono = $configuracion['SERVIDOR']['media'] . $configuracion['RUTAS']['imagenesEstilos'] . 'activity.png';\n $lista[] = $actividad;\n }\n }\n\n return $lista;\n }", "function verificarCompraPublicacion($cliente,$edicion){\n\t\tinclude \"conexion.php\"; \n\n\t\t\t$sql=\"select * from compra\n\t\t\twhere cliente_id=$cliente and $edicion=edicion_id\n\t\t\t\";\n\t\t\t$result=mysql_query($sql, $conexion) or die (mysql_error());\n\t\t\tif (mysql_num_rows($result)>0)\n\t\t\t{\n\n\t\t\t$error=\"<p>Ya has comprado esta edicion</p>\";\n\t\t\theader (\"Location: errores.php?errores=$error\");\n\t\t\t\t\n\t\t\t\texit();\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t}", "function verificarComprobante($fecha)\n {\n global $db;\n $sql = \" select count(dateReception) as total from almacen_reception\n where tipoTrans = 'A' and tipoComprobante = 'A';\n and dateReception >= '$fecha' \";\n echo $sql;\n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n \t$info = $db->execute($sql);\n if ($info->fields(\"total\") == 0)\n {\n return 1; // positivo, puede registrar\n }\n else if ($info->fields(\"total\") > 0)\n {\n return 0; // existe ajustes, no puede registrar\n }\n }" ]
[ "0.6617181", "0.65739983", "0.648753", "0.64374495", "0.6424512", "0.64021033", "0.6375148", "0.63681793", "0.63302773", "0.6233157", "0.6202936", "0.61929715", "0.61892015", "0.6185677", "0.6175933", "0.61495763", "0.6146274", "0.6141519", "0.61402285", "0.6120325", "0.60868144", "0.6084576", "0.60837", "0.6083643", "0.60816395", "0.6069712", "0.60666186", "0.60598296", "0.60546285", "0.604959", "0.60446215", "0.6044067", "0.60406", "0.6027949", "0.6013303", "0.60098904", "0.60082936", "0.60018915", "0.59943444", "0.5983556", "0.59732735", "0.59626985", "0.59575975", "0.59422964", "0.5939309", "0.59302384", "0.59301466", "0.59219205", "0.5915648", "0.5911822", "0.5908202", "0.5894724", "0.5883982", "0.5882367", "0.5881357", "0.5875496", "0.58730346", "0.58724624", "0.5871599", "0.58683467", "0.58621395", "0.5861018", "0.5860946", "0.5859803", "0.58573693", "0.5856043", "0.585521", "0.5851868", "0.58502316", "0.5849795", "0.5847827", "0.58432245", "0.58406925", "0.58403486", "0.583703", "0.5832383", "0.5832361", "0.5829496", "0.5828753", "0.5826551", "0.58259034", "0.5821725", "0.58152914", "0.5814765", "0.5813645", "0.5808922", "0.58056307", "0.58050054", "0.5804656", "0.58020765", "0.5801792", "0.579843", "0.5797658", "0.57975477", "0.5794508", "0.5789101", "0.57882637", "0.57881147", "0.5784112", "0.5780848" ]
0.65383846
2
Reemplazar Model por el modelo que corresponda al modulo
public function run() { if(isset($_GET['id'])){ $id = $_GET['id']; } else{ $id = ''; } if($id != ""){ $catalogo = Catalogos::model()->findByPk($id); } else{ $catalogo = new Catalogos; } if(isset($_POST['Catalogos'])){ $catalogo->attributes = $_POST['Catalogos']; $catalogo->save(); $id = $catalogo->id; $this->controller->redirect(Yii::app()->createUrl('/administracion/default/formCatalogo/', array('id' => $id))); } if(isset($_GET['producto'])){ $producto = $_GET['producto']; } else{ $producto = ''; } if(isset($_GET['accion'])){ $accion = $_GET['accion']; } else{ $accion = ''; } if(isset($_GET['despues'])){ $despues = $_GET['despues']; } else{ $despues = ''; } if(isset($_GET['nombre'])){ $nombre = $_GET['nombre']; } else{ $nombre = ''; } if(isset($_GET['minimo'])){ $minimo = str_replace(".", "", $_GET['minimo']); $minimo_ingresado = $_GET['minimo']; } else{ $minimo = ''; $minimo_ingresado = ''; } if(isset($_GET['maximo'])){ $maximo = str_replace(".", "", $_GET['maximo']); $maximo_ingresado = $_GET['maximo']; } else{ $maximo = ''; $maximo_ingresado = ''; } if(isset($_GET['estado'])){ $estado = $_GET['estado']; } else{ $estado = 1; } if(isset($_GET['tipo'])){ $tipo = $_GET['tipo']; } else{ $tipo = ''; } if(isset($_GET['linea'])){ $linea = $_GET['linea']; } else{ $linea = ''; } $errores = ''; //Calculo de errores if($minimo != '' && !is_numeric($minimo)){ $minimo = ''; $errores = $errores . "- Desde debe ser un valor numerico<br>"; } if($maximo != '' && !is_numeric($maximo)){ $maximo = ''; $errores = $errores . "- Hasta debe ser un valor numerico<br>"; } //Fin del calculo de errores if($errores != ''){ $errores = '<div class="alert alert-warning" role="alert">' . $errores . '</div>'; } if($minimo == ''){ $min = -1; } else{ $min = $minimo; } if($maximo == ''){ $max = 1000000000; } else{ $max = $maximo; } if($producto != ''){ $this->aplicar($id, $producto, $accion, $despues); unset($_GET['producto']); } $criteria = new CDbCriteria; $criteria->compare('id_catalogo', $id); $criteria->order = 'posicion ASC'; $productos_catalogo_ids = ProductosCatalogo::model()->findAll($criteria); $productos_catalogo = new CActiveDataProvider(new ProductosCatalogo, array('criteria' => $criteria)); $ids = array(); foreach($productos_catalogo_ids as $i){ $ids[] = $i['id_producto']; } $criteria = new CDbCriteria; $criteria->addCondition('precio_producto >= ' . $min . ' AND precio_producto <= ' . $max); $criteria->addCondition('nombre_producto LIKE "%'. $nombre . '%"'); $criteria->addNotInCondition('id', $ids); $criteria->compare('estado_producto', $estado); $criteria->compare('id_tipo_producto', $tipo); $criteria->compare('id_linea_producto', $linea); $reporte = new CActiveDataProvider(new Productos, array('criteria' => $criteria)); $tipos = CHtml::listData(TiposProducto::model()->findAll(), 'id', 'nombre_tipo_producto'); $tipos[""] = 'Todas los tipos'; ksort($tipos); $lineas = CHtml::listData(LineasProducto::model()->findAll(), 'id', 'nombre_linea_producto'); $lineas[""] = 'Todas las lineas'; ksort($lineas); $this->controller->render('formulario_catalogos',array( 'nombre' => $nombre, 'minimo' => $minimo, 'maximo' => $maximo, 'estado' => $estado, 'tipo' => $tipo, 'linea' => $linea, 'errores' => $errores, 'id' => $id, 'producto' => $producto, 'catalogo' => $catalogo, 'dataProvider' => $reporte, 'productos_catalogo' => $productos_catalogo, 'tipos' => $tipos, 'lineas' => $lineas, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function model();", "abstract protected function model();", "abstract protected function model();", "abstract function model();", "abstract function model();", "abstract function model();", "abstract function model();", "public function modulo(){\n return $this->belongsTo('App\\Models\\Modulo');\n }", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract function getModel();", "public abstract function model();", "abstract public function getModel();", "abstract protected function getModel();", "public function getModel() {\r\n\tforeach (glob('modules/' . $this->name . '/model/*.php') as $filename) {\r\n\t $model = basename($filename, '.php');\r\n\t $this->model[$model] = $this->getEntity($model);\r\n\t}\r\n\treturn $this->model;\r\n }", "public function model();", "public function model();", "private static function model()\n {\n $files = ['ORM_', 'CRUD', 'ORM', 'Collection', 'ModelArray'];\n $folder = static::$root.'MVC/Model'.'/';\n\n self::call($files, $folder);\n\n $files = ['ForeingKeyMethodException', 'ColumnNotEmptyException', 'ManyPrimaryKeysException', 'TableNotFoundException', 'ModelNotFoundException', 'PrimaryKeyNotFoundException'];\n $folder = static::$root.'MVC/Model/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function model()\n {\n //use model\n }", "public function getModel(){ }", "protected function _getTmsModModel()\n\t{\n\t\treturn $this->getModelFromCache('TMS_Model_Modification');\n\t}", "public function loadModel()\n {\n $data = ModelsPegawai::find($this->dataId);\n $this->name = $data->name;\n $this->email = $data->email;\n $this->username = $data->username;\n $this->password = $data->password;\n $this->level = $data->level;\n\n }", "public function indexModel(){\n $this->model('auditor/indexModel');\n \n $this->model->load(); \n }", "public function __construct() {\n $this->noticia_modelo = $this->modelo('NoticiaModelo');\n }", "public function buildModel() {}", "protected function setModel()\n {\n $class = 'Src\\Modules\\\\' . $this->module_name . '\\Models\\\\' . $this->class . 'Model';\n $this->model = new $class;\n $this->model->setModuleName( $this->module_name );\n $this->model->run();\n }", "abstract public function getPrimaryModel();", "public function model() {\n require_once \"../app/models/model.php\";\n $this->model = new Model($this->db);\n }", "public function generateModels () {\r\n $modelParam = \\app\\lib\\router::getModel();\r\n $ModelPath = \\app\\lib\\router::getPath();\r\n $ModelName = \"app\\model\\\\\" . end($ModelPath);\r\n $this->model =new $ModelName;\r\n }", "function getModel($name);", "public function getModel();", "public function getModel();", "public function getModel();", "public static function modulos()\n {\n\t //return Sistema::hasMany(Sistema::class);\n\n\t return (new Sistema())->hasManyThrough(\n\t\t\tnew Modulos(), //modelo final\n\t\t\tnew SistemaModulos(), //modelo intermedio\n\t\t\t'IDSISTEMA', // Foreign key on users table... . El tercer argumento es el nombre de la clave externa en el modelo intermedio\n\t\t\t'IDMODULO', // Foreign key on posts table...\n\t\t\t'IDSISTEMA', // Local key on countries table...\n\t\t\t'IDMODULO' // Local key on users table...\n\t\t)->with('objacceso');\n\n\n\n\t}", "public function model($nome){\r\n\r\n\t\t\t#procura arquivo do model\r\n\t\t\tif(file_exists(\"model/{$nome}.php\")){\r\n\t\t\t\tinclude_once \"model/{$nome}.php\";\r\n\t\t\t} else {\r\n\t\t\t\tdie(\"Model {$nome} não encontrado na pasta modelos\");\r\n\t\t\t}\r\n\r\n\t\t\t#instancia o arquivo caso encontrado\r\n\t\t\t$this->$nome = new $nome();\r\n\t\t}", "function M($model)\n{\n\n $modelFile = APP.'/Model/'.$model.'Model.class.php';\n $modelClass = '\\\\'.MODULE.'\\Model\\\\'.$model.'Model';\n if (is_file($modelFile)) {\n \t$model = new $modelClass();\n \treturn $model;\n } else {\n \tthrow new \\Exception('找不到模型', $modelClass);\n }\n}", "public function __construct() {\n $this->porcentajesCursoModel = $this->model('PorcentajesCursoModel');\n $this->tipoModuloModel = $this->model('TipoModuloModel');\n $this->cursoModel = $this->model('CursoModel');\n }", "function miguel_MCourse() \r\n {\t\r\n $this->base_Model();\r\n }", "public function makeModel()\n {\n return $this->model;\n }", "public function loadModel(){\n $this->load->model('Data_Model');\n return new Data_Model($this->used_table,$this->used_db);\n }", "abstract protected function modelFactory();", "abstract public function getModel($name);", "public function modulos()\n {\n return $this->hasMany('App\\Models\\glb\\Modulo');\n }", "public function model()\n {\n $model = $this->_model;\n return new $model;\n\n }", "function getModelObject(){\n\t\t\n\t\tif ( !isset($this->modObj) ){\n\t\t\t$this->modObj = new DoctrineModel();\n\t\t}\t\n\t\treturn $this->modObj;\n\t}", "public function __construct()\n {\n \t parent::__construct();\n \t $this->load->model('Modelo');\n }", "public static function preModel(){\n\t\t\n\t}", "public function getModel(): Model;", "public function getModel(): Model;", "public function model($model) {\r\n require_once \"../app/models/$model.php\";\r\n return new $model; //return class\r\n }", "public function populateModels()\n {\n }", "public function module()\n {\n \t// belongsTo(RelatedModel, foreignKey = module_id, keyOnRelatedModel = id)\n \treturn $this->belongsTo(Module::class);\n }", "public function getModo()\n {\n return $this->hasOne(InterModos::className(), ['id' => 'modo_id']);\n }", "public function modulos()\n {\n return $this->hasMany('App\\Modulo');\n }", "public function model()\n {\n return Movimento::class;\n }", "function getModelObject(){\n\t\t\n\t\tif ( !isset($this->modObj) ){\n\t\t\t//$this->modObj = new Menu_PDO_Model();\n\t\t\t$this->modObj = new DoctrineMenu();\t\n\t\t}\n\t\t\n\t\treturn $this->modObj;\n\t}", "public function model()\n {\n return Receitas::class;\n }", "public function getModel():IModel;", "abstract protected function model($id = NULL);", "function loadModel($model){\n $url='models/'.$model.'model.php';//models/alumnomodel.php\n //validando que el modelo exista\n if(file_exists($url)){\n //si axiste lo llamamos\n require $url;\n $modelName=$model.'Model';\n //instancia de la clase del modelo recibido\n $this->model=new $modelName;\n }\n }", "function loadModel($modelName,$negocio){\r\n\tif($modelName=='database'){\r\n\t\t$modelPath = '../Config/'.$negocio.'_'.$modelName.'.php';\r\n\t\tif(is_file($modelPath)){\r\n\t\t\tif (!class_exists($modelName)) {\r\n\t\t\t\trequire_once($modelPath);\r\n\t\t\t}\t\t\r\n\t\t}else{\r\n\t\t\techo 'No existe la conexion'.$modelPath;\r\n\t\t\texit();\r\n\t\t}\r\n\t\t$model = new $modelName();\r\n\t\treturn $model;\t\r\n\t}else{\r\n\t\t$modelPath = '../Model/'.$modelName.'.php';\r\n\t\tif(is_file($modelPath)){\r\n\t\t\tif (!class_exists($modelName)) {\r\n\t\t\t\trequire_once($modelPath);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\techo 'No existe este modelo '.$modelPath;\r\n\t\t\texit();\r\n\t\t}\r\n\t\t$model = new $modelName();\r\n\t\tif($negocio != 'null'){\r\n\t\t\t$model->negocio = $negocio;\r\n\t\t}\t\t\r\n\t\treturn $model;\r\n\t}\r\n}", "protected function _getPermissionModel()\n\t{\n\t\treturn $this->getModelFromCache('XenForo_Model_Permission');\n\t}", "public function __construct() {\n parent::__construct();\n $this->load->model(\"modelo_base\");\n \n }", "private function createModel()\n {\n $class = get_class($this->data);\n\n $this->name = strtolower(class_basename($class));\n\n $result = $this->callEvent($class, [$class => $this->data]);\n\n if ($result instanceof $this->data) {\n $this->data = $result;\n }\n\n $this->makePaginator();\n }", "public function model(int $id)\n {\n }", "protected function getScaffoldedModel($className)\n {\n $model = $this->cache->getModelName(); // post\n $models = Pluralizer::plural($model); // posts\n $Models = ucwords($models); // Posts\n $Model = Pluralizer::singular($Models); // Post\n\n $file=new File();\n $p=new PathsInfo;\n $templateCustomsPath=$p->pathTemplatesCustoms().\"/$models\";\n\n /*Crea las reglas*/\n /*Verifica si hay reglas definidas por el usuarios*/\n $path=\"$templateCustomsPath/rules.php\";\n $model_rules='';\n if (file_exists($path))\n {\n $model_rules = $this->purgePHPTags(PHP_EOL.$file->get($path).PHP_EOL);\n\n }else{\n /*si no existen entonces las crea*/\n if (! $fields = $this->cache->getFields())\n {\n $model_rules ='/*no rules*/';\n } else {\n\n $rules = array_map(function($field) {\n return \"'$field' => 'required'\";\n }, array_keys($fields));\n\n $model_rules = $this->makeRules($rules);\n }\n }\n\n\n\n /*hay algo que agregar al modelo?*/\n $path=\"$templateCustomsPath/append_to_model.template.php\";\n $append_to_model=\"\";\n if (file_exists($path))\n {\n $append_to_model = $this->purgePHPTags(PHP_EOL.$file->get($path).PHP_EOL);\n }\n\n\n /*cambia el resto del template*/\n foreach(array('model', 'models', 'Models', 'Model', 'append_to_model', 'model_rules') as $var)\n {\n $this->template = str_replace('{{'.$var.'}}', $$var, $this->template);\n }\n\n return $this->template;\n }", "public function _instanciar_model() {\n $Model = ClassRegistry::init('Autenticacao.' . $this->config['model_usuario']);\n return $Model;\n }", "public function getModelo(int $id): ?Model;", "public function __CONSTRUCT(){\n $this->model = new Estadobien();\n }", "public function moduleKeyForModel($model);", "public function getModel()\n{\nreturn $this->model;\n}", "public function loadModel()\n {\n $data = Contest::find($this->modelId);\n $this->title = $data->title;\n $this->description = $data->description;\n $this->image = $data->image;\n $this->featured_image = $data->featured_image;\n\n }", "protected function _model() {\n\t\treturn $this->_container->model;\n\t}", "function miguel_mMain()\r\n {\t\r\n\t\t$this->base_Model();\r\n }", "public function LoadModel($model = \"\"){\n\t\t$model = $model != \"\" ? $model : CONTROLLER_CALLED;\t\t// Si $model esta vacia significa que se esta llamando al modelo que se llama igual al controlador actual\n\t\t$nameModel = $model.\"Model\";\n\t\t$routeModelModule = MODULE_USED.\"models/\".$model.\".php\";\n\t\tif(is_file($routeModelModule)){\n\t\t\t// Vista del Modulo actual\n\t\t\t$routeModel = $routeModelModule;\n\t\t}else{\n\t\t\tif(strpos($model,\"/\") !== false){\t\t\t// Con slashes ignificaria que se esta llamando el modelo de otro modulo\n\t\t\t\t$modelInfo = explode(\"/\",$model);\n\t\t\t\t$module = $modelInfo[0];\n\t\t\t\t$model2 = $modelInfo[1];\n\t\t\t\t$nameModel = $model2.\"Model\";\n\t\t\t\t\n\t\t\t\t$routeModelApp = APP_PATH.\"modules/\".$module.\"/models/\".$model2.\".php\";\n\t\t\t\tif(is_file($routeModelApp)){\n\t\t\t\t\t$routeModel = $routeModelApp;\n\t\t\t\t}else{\n\t\t\t\t\tthrow new \\Exception(\"The model \".$model.\" is not found in the application\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthrow new \\Exception(\"The model \".$model.\" is not found in the module application\");\n\t\t\t}\n\t\t}\n\t\tinclude($routeModel);\n\t\t$objModel = new $nameModel;\n\t\treturn $objModel;\n\t}", "public function refresh(): ModelInterface;", "public static function model($className=__CLASS__) { return parent::model($className); }", "public function indexModel(){\n }", "abstract protected function prepareModels();", "function __construct()\n {\n // load model\n Load::loadModel(\"group\");\n }", "public function getModel($modelName);", "public function GruporModelo()\n\t\t{\n\t\t\t$id = \"\";\n\t\t\t$numero = \"\";\n\t\t\t$franja = \"\";\n\t\t}", "protected function GetModel() {\n\t\treturn parent::GetModel();\n\t}", "public function getModel(){\n\t\tif( isset($this->model) ){\n\t\t\treturn $this->model;\n\t\t}\n\t\t$nameModel = str_replace(' View' , 'Model' ,__CLASS__ );\n\t\t$this->model = new $nameModel();\n\t}", "public function model()\n {\n return Questionario::class;\n }", "public static function loadModel($id, $modo = 'iduser')\n {\n return self::model()->findByAttributes(array($modo => $id));\n }", "abstract public function instanceModel(): Model;", "abstract function load(Model $model);", "public function loadModel(){\n\t\t$className = get_class($this);\n\t\tforeach(func_get_args() as $model){\n\t\t\t$entity = EntityManager::getEntityInstance($model);\n\t\t\tself::$_settingLock[$className] = true;\n\t\t\t$this->$model = $entity;\n\t\t\tself::$_settingLock[$className] = false;\n\t\t}\n\t}", "function loadModel($model = null) {\n\t\tif ($model && $this->$model == null) {\n\t\t\tApp::import('Model',\"Seo.$model\");\n\t\t\t$this->$model = ClassRegistry::init(\"Seo.$model\");\n\t\t}\n\t}", "public function models();", "public function getModel($data = array());", "abstract protected function getDefaultModel();", "public function run()\n {\n \tModulo::create([\n \t'name' => 'administracion',\n \t'display_name' => 'Administracion',\n \t'nivel1' => 1\n \t]);\n\n Modulo::create([\n 'name' => 'cartera',\n 'display_name' => 'Cartera',\n 'nivel1' => 2\n ]);\n\n \tModulo::create([\n \t'name' => 'contabilidad',\n \t'display_name' => 'Contabilidad',\n \t'nivel1' => 3\n \t]);\n\n \tModulo::create([\n \t'name' => 'inventario',\n \t'display_name' => 'Inventario',\n \t'nivel1' => 4\n \t]);\n\n // Administracion\n Modulo::create([\n 'display_name' => 'Modulos',\n 'nivel1' => 1,\n 'nivel2' => 1\n ]);\n\n Modulo::create([\n 'display_name' => 'Referencias',\n 'nivel1' => 1,\n 'nivel2' => 2\n ]);\n\n //Modulos\n Modulo::create([\n 'name' => 'tercerosinterno',\n 'display_name' => 'Terceros internos',\n 'nivel1' => 1,\n 'nivel2' => 1,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'roles',\n 'display_name' => 'Roles',\n 'nivel1' => 1,\n 'nivel2' => 1,\n 'nivel3' => 2\n ]);\n\n //Referencias\n Modulo::create([\n 'name' => 'permisos',\n 'display_name' => 'Permisos',\n 'nivel1' => 1,\n 'nivel2' => 2,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'modulos',\n 'display_name' => 'Modulos',\n 'nivel1' => 1,\n 'nivel2' => 2,\n 'nivel3' => 2\n ]);\n\n // Cartera\n Modulo::create([\n 'display_name' => 'Modulos',\n 'nivel1' => 2,\n 'nivel2' => 1\n ]);\n\n Modulo::create([\n 'display_name' => 'Reportes',\n 'nivel1' => 2,\n 'nivel2' => 2\n ]);\n\n Modulo::create([\n 'display_name' => 'Documentación',\n 'nivel1' => 2,\n 'nivel2' => 3\n ]);\n\n //Modulos\n Modulo::create([\n 'name' => 'amortizaciones',\n 'display_name' => 'Amortizaciones',\n 'nivel1' => 2,\n 'nivel2' => 1,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'generarintereses',\n 'display_name' => 'Generar intereses',\n 'nivel1' => 2,\n 'nivel2' => 1,\n 'nivel3' => 2\n ]);\n\n Modulo::create([\n 'name' => 'enviarintereses',\n 'display_name' => 'Enviar intereses',\n 'nivel1' => 2,\n 'nivel2' => 1,\n 'nivel3' => 3\n ]);\n\n // Reportes\n Modulo::create([\n 'name' => 'reporteedades',\n 'display_name' => 'Edades de cartera',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'reporteposfechados',\n 'display_name' => 'Cheques posfechados',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 2\n ]);\n\n Modulo::create([\n 'name' => 'rintereses',\n 'display_name' => 'Intereses generados',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 3\n ]);\n\n Modulo::create([\n 'name' => 'reporterecibos',\n 'display_name' => 'Recibos de caja',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 4\n ]);\n\n Modulo::create([\n 'name' => 'reporteresumencobro',\n 'display_name' => 'Resumen de cobro',\n 'nivel1' => 2,\n 'nivel2' => 2,\n 'nivel3' => 5\n ]);\n\n // Documentacion\n Modulo::create([\n 'name' => 'reporteverextractos',\n 'display_name' => 'Ver extractos',\n 'nivel1' => 2,\n 'nivel2' => 3,\n 'nivel3' => 1\n ]);\n\n // Contabilidad\n Modulo::create([\n 'display_name' => 'Reportes',\n 'nivel1' => 3,\n 'nivel2' => 1\n ]);\n\n // Reportes\n Modulo::create([\n 'name' => 'reportearp',\n 'display_name' => 'Gastos ARP',\n 'nivel1' => 3,\n 'nivel2' => 1,\n 'nivel3' => 1\n ]);\n\n // Inventario\n Modulo::create([\n 'display_name' => 'Reportes',\n 'nivel1' => 4,\n 'nivel2' => 1\n ]);\n\n // Reportes\n Modulo::create([\n 'name' => 'reporteanalisisinventario',\n 'display_name' => 'Análisis inventario',\n 'nivel1' => 4,\n 'nivel2' => 1,\n 'nivel3' => 1\n ]);\n\n Modulo::create([\n 'name' => 'reporteentradassalidas',\n 'display_name' => 'Entradas y salidas',\n 'nivel1' => 4,\n 'nivel2' => 1,\n 'nivel3' => 2\n ]);\n }", "function getModel($model)\n{\n $models = [];\n /* $models['Address'] = new Address;\n $models['Agency'] = new Agency;\n $models['AgencyBranch'] = new AgencyBranch;\n $models['AgencySolicitorPartnership'] = new AgencySolicitorPartnership;\n $models['Cache'] = new Cache;\n $models['ConveyancingCase'] = new ConveyancingCase;\n $models['User'] = new User;\n $models['UserAddress'] = new UserAddress;\n $models['UserPermission'] = new UserPermission;\n $models['UserRole'] = new UserRole;*/\n $models['TargetsAgencyBranch'] = new TargetsAgencyBranch;\n return $models[$model];\n}", "function Controller_Utilisateur(){\n\t\tparent::__construct();\n\t\trequire_once './Modele/Modele_Utilisateur.php';\n\t\t$this->selfModel = new Utilisateur(); // appel du modèle correspondant à la classe Controller_Utilisateur\n\t}", "public function getModelo(){ return $this->modelo;}", "public static function model($className=__CLASS__) \n { \n return parent::model($className); \n }", "public static function model($className=__CLASS__) \n { \n return parent::model($className); \n }" ]
[ "0.6640075", "0.65487695", "0.65487695", "0.6525854", "0.6525854", "0.6525854", "0.6525854", "0.6522622", "0.6501978", "0.6501978", "0.6501978", "0.6501978", "0.6470406", "0.64699185", "0.6320553", "0.63167083", "0.6243065", "0.6113767", "0.6113767", "0.5995438", "0.59857804", "0.5945781", "0.5924482", "0.5905677", "0.5894152", "0.5877545", "0.585638", "0.5837026", "0.58310467", "0.5830757", "0.5814564", "0.58136827", "0.57927847", "0.57927847", "0.57927847", "0.5780552", "0.5776295", "0.5773634", "0.57640487", "0.5753934", "0.57522625", "0.5748502", "0.57409585", "0.57386863", "0.57336485", "0.5702196", "0.56993157", "0.5693846", "0.56935656", "0.5686674", "0.5686674", "0.56810087", "0.5671215", "0.56611866", "0.56554705", "0.56512886", "0.5650867", "0.5646374", "0.5639911", "0.5634186", "0.5631249", "0.5613393", "0.5613256", "0.5599006", "0.55917907", "0.5567016", "0.55632186", "0.5556824", "0.5552505", "0.5545236", "0.5530218", "0.552703", "0.5525284", "0.5523194", "0.5519935", "0.55139655", "0.5510467", "0.5504416", "0.54949737", "0.5494658", "0.5492449", "0.5486519", "0.54857975", "0.54828227", "0.54801893", "0.5475933", "0.5463517", "0.54604524", "0.54582614", "0.5457042", "0.5453692", "0.5451626", "0.5450947", "0.54471654", "0.5442831", "0.543395", "0.5431108", "0.5427706", "0.54276", "0.54238445", "0.54238445" ]
0.0
-1
Verify that there an implementation for the recorded protocol
public static function getInstance($oTicketingConfig, $bLoggingEnabled) { $sClass = 'Ticketing_Import_'.strtoupper($oTicketingConfig->protocol); if (!class_exists($sClass)) { throw new Exception("Invalid protocol in the current ticketing_config: {$oTicketingConfig->protocol}. There is no implementation of this protocol ({$sClass})"); } // Return an instance of the implementation class $oInstance = new $sClass($oTicketingConfig, $bLoggingEnabled); return $oInstance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verifyImplementation()\n {\n }", "public function testSerializationCapabilities()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n $tmp = serialize($protocol);\n $tmp = unserialize($tmp);\n\n $this->assertEquals($protocol, $tmp);\n $this->assertNotEmpty($tmp->generateExchangeRequestInformation());\n\n unset($tmp);\n $this->assertNotNull($protocol);\n }", "public function checkFeatureImplemented();", "protected function checkForValidImplementingClass()\n {\n $this->validateModel();\n $this->validateItemId();\n }", "public function verify();", "function have_interface() {\n\t\treturn count($this->watches) > 0;\n\t}", "public function testInterface()\n {\n \t$this->assertType('Util_Format_Interface', $this->object);\n }", "public function testInterface()\n {\n \t$this->assertType('Util_Format_Interface', $this->object);\n }", "public function readyForInterface() {}", "public function testThatFacebookAdapterAwareTraitMatchesInterface()\n {\n new FacebookAdapterAware;\n }", "public function testProtocolDetect() {\n\n\t\t$router = new Nether\\Avenue\\Router(static::$RequestData['Test']);\n\t\t(new Verify(\n\t\t\t'check that GetProtocol() thinks its on HTTP right now.',\n\t\t\t$router->GetProtocol()\n\t\t))->equals('http');\n\n\t\t$_SERVER['HTTPS'] = true;\n\t\t(new Verify(\n\t\t\t'check that GetProtocol() thinks its on HTTPS right now.',\n\t\t\t$router->GetProtocol()\n\t\t))->equals('https');\n\n\t\treturn;\n\t}", "public function hasVerification()\n {\n return true;\n }", "public function createProtocol()\n {\n }", "public function validate_protocol($protocol)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $firewall = new Firewall();\n\n return $firewall->validate_protocol($protocol);\n }", "abstract public function verify($data, $signature);", "protected function checkWebsocProtocol($protocol) \n\t{\n\t\treturn true; // Override and return false if a protocol is not found that you would expect.\n\t}", "public function testIfClassCanBeCreated()\n {\n $this->assertInstanceOf(Validator::class, $this->_validator);\n }", "public function testDebugCapabilities()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n $this->assertNotEmpty(var_export($protocol, true));\n }", "public function hasUserProto(){\n return $this->_has(2);\n }", "public function hasUserProto(){\n return $this->_has(2);\n }", "private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}", "public function isSignatureRequired();", "public function getVerifier();", "public function testEverythingImplemented() {\n id(new PhutilSymbolLoader())->selectAndLoadSymbols();\n }", "abstract public function is_have();", "public function needsVerificationMessage ();", "public function testMethodExists()\n {\n $this->assertTrue(method_exists($this->subscriber, 'addMedia'));\n $this->assertTrue(method_exists($this->subscriber, 'generateAlternatives'));\n }", "#[@test]\n public function classImplementsArchivedInterface() {\n $class= $this->classloader->loadClass($this->classname);\n $interface= $this->classloader->loadClass($this->interfacename);\n\n $interfaces= new HashSet();\n $interfaces->addAll($class->getInterfaces());\n $this->assertTrue($interfaces->contains($interface));\n }", "public function testPersistNotImplementing(): void\n {\n $this->persistEvent->getDocument()->willReturn($this->notImplementing);\n $this->persistEvent->getNode()->shouldNotBeCalled();\n $this->subscriber->saveStructureData($this->persistEvent->reveal());\n }", "public function checkClassImplementedMiddlewareInstance(object $middleware)\n {\n if(!$middleware instanceof MiddlewareInterface)\n {\n die(\"Included Middleware Doesnt implemented middleware instance\");\n }\n }", "public function libraryOk(): bool;", "private function checkPersister()\n {\n if ($this->persister === null) {\n throw new \\InvalidArgumentException('Persister is not defined');\n }\n }", "function sql_get_proto_info($dbh=NULL)\n {\n //not implemented\n global $SQL_DBH;\n if (is_null($dbh))\n return false;\n else\n return false;\n }", "protected function _havePIMChanges()\n {\n throw new Horde_ActiveSync_Exception('Must be implemented in concrete class.');\n }", "#[@test]\n public function classImplementsComparatorInterface() {\n $class= $this->classloader->loadClass($this->classname);\n $interface= XPClass::forName('util.Comparator');\n $interfaces= new HashSet();\n $interfaces->addAll($class->getInterfaces());\n $this->assertTrue($interfaces->contains($interface));\n }", "public function testProtosGet()\n {\n }", "function is_compatible() {\r\r\n\t\tasido::trigger_abstract_error(\r\r\n\t\t\t__CLASS__,\r\r\n\t\t\t__FUNCTION__\r\r\n\t\t\t);\r\r\n\t\t}", "protected function assertPayload(): void\n {\n }", "protected function assertPayload(): void\n {\n }", "protected function assertPayload(): void\n {\n }", "public function testRespondsTo() {\n\t\terror_reporting(($backup = error_reporting()) & ~E_USER_DEPRECATED);\n\n\t\t$query = new Query();\n\t\t$this->assertTrue($query->respondsTo('calculate'));\n\t\t$this->assertFalse($query->respondsTo('foobarbaz'));\n\n\t\terror_reporting($backup);\n\t}", "public function testPhoneHasCorrectContracts()\n {\n $phone = new Phone('5154940511');\n $this->assertInstanceOf(PhoneInterface::class, $phone);\n $this->assertInstanceOf(Arrayable::class, $phone);\n }", "public function testNotImplementingInterface() {\n\t\tCakeLog::config('fail', array('engine' => 'stdClass'));\n\t}", "public function phpunit_get_store_implements() {\n return class_implements($this->get_store());\n }", "public function phpunit_get_store_implements() {\n return class_implements($this->get_store());\n }", "public function phpunit_get_store_implements() {\n return class_implements($this->get_store());\n }", "function isCompilable() ;", "public function testValidate(): void\n {\n $this->assertTrue(method_exists(OrderCallback::class, 'validate'));\n }", "public function testNotImplementingInterface(): void\n {\n $this->expectException('\\RuntimeException');\n\n Queue::setConfig('fail', ['engine' => '\\stdClass']);\n Queue::engine('fail');\n }", "public function verifyRequest()\n {\n }", "public function testValidateDeclineRequest(): void\n {\n $this->assertTrue(method_exists($this->stack, 'validateDeclineRequest'));\n }", "public function testValidateIssueRequest(): void\n {\n $this->assertTrue(method_exists($this->stack, 'validateIssueRequest'));\n }", "public function testTypeDetection() {\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\util'));\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\analysis'));\n\t\t$this->assertEqual('class', Inspector::type('lithium\\analysis\\Inspector'));\n\t\t$this->assertEqual('property', Inspector::type('Inspector::$_classes'));\n\t\t$this->assertEqual('method', Inspector::type('Inspector::type'));\n\t\t$this->assertEqual('method', Inspector::type('Inspector::type()'));\n\n\t\t$this->assertEqual('class', Inspector::type('\\lithium\\security\\Auth'));\n\t\t$this->assertEqual('class', Inspector::type('lithium\\security\\Auth'));\n\n\t\t$this->assertEqual('namespace', Inspector::type('\\lithium\\security\\auth'));\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\security\\auth'));\n\t}", "public function test_implementation_of_contract_registered_to_container()\n {\n $implementation = app(GuestContract::class);\n\n $this->assertInstanceOf(GuestContract::class, $implementation);\n\n $this->assertInstanceOf(Guest::class, $implementation);\n }", "public function test_dotorg_communication()\n {\n }", "abstract public function verifyRequest(): void;", "abstract public function verifyRequest(): void;", "public function hasRecord() {}", "protected function hasKnownSubclasses() : bool\n {\n return true;\n }", "public function hasAdapter();", "public function checkExtObj() {}", "public function checkExtObj() {}", "public function checkOperationality()\n {\n }", "public function testHasValidMorhClass()\n {\n $this->assertSame($this->stub->getMorphClass(), 'Antares\\Customfields\\Model\\FieldType');\n }", "public function testSupports()\n {\n $validator = $this->createValidatorMock();\n\n $injector = new Validator($validator);\n\n $intention = $this->createIntentionMock('ParametersIntentionInterface');\n $this->assertTrue($injector->supports($intention));\n\n $intention = $this->createIntentionMock('PagingAwareIntentionInterface');\n $this->assertFalse($injector->supports($intention));\n\n $intention = $this->createIntentionMock('IntentionInterface');\n $this->assertFalse($injector->supports($intention));\n }", "public function testPolymorphic()\n {\n //$this->fail();\n }", "public function testValidateGetOrderRequest(): void\n {\n $this->assertTrue(method_exists($this->stack, 'validateGetOrderRequest'));\n }", "public function getVerify(): bool\n {\n }", "public function hasStreamBlobImpl();", "public function supports( $what );", "public function testValidationCaseForInvalidTypeOfKeyExpansionServicePassedOnInitialization()\n {\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\RuntimeException::class);\n\n $protocol = new KeyExchange(null);\n } else {\n $hasThrown = null;\n\n try {\n $protocol = new KeyExchange(null);\n } catch (\\RuntimeException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "public function isVerified();", "protected function verifyHandlerType(HookHandler $handler) {\n\t\tif (!is_callable(array($handler,$this->hookName))) {\n\t\t\ttrigger_error('Could not locate a method named: '.$this->hookName.' or a generic __call method on the handler. Handler methods has to be the same as the hook name or provide a _call method',E_USER_ERROR);\n\t\t}\n\t}", "public function testInterface()\n {\n $this->assertInstanceOf('MediaAlignedText\\\\Core\\\\Interfaces\\\\MediaTextSegmentAlignmentInterface', $this->alignment);\n }", "public function should_track_identity()\n {\n }", "public function testHasMediator()\n {\n $data = new \\stdClass();\n\n $unsupportMediator = $this->createMock(ExternalDataMediatorInterface::class);\n $unsupportMediator->expects($this->exactly(2))\n ->method('support')\n ->with($this->identicalTo($data))\n ->willReturn(false);\n\n $instance = new GenericDataMediatorResolver();\n $instance->attach($unsupportMediator);\n\n $this->assertFalse($instance->hasMediator($data));\n\n $supportMediator = $this->createMock(ExternalDataMediatorInterface::class);\n $supportMediator->expects($this->once())\n ->method('support')\n ->with($this->identicalTo($data))\n ->willReturn(true);\n $instance->attach($supportMediator);\n\n $this->assertTrue($instance->hasMediator($data));\n }", "public function requiresInstance() : bool;", "public function test_instance() {\n $this->assertInstanceOf(\\mediasource_bbc\\definition::class, $this->source);\n }", "public function isHasRecord(): bool;", "abstract function isSupported(): bool;", "public function validate_payload() {\n if (isset($this->initial_data[\"interface\"])) {\n $this->initial_data[\"interface\"] = APITools\\get_pfsense_if_id($this->initial_data[\"interface\"]);\n # Check that interface exists\n if (is_string($this->initial_data[\"interface\"])) {\n $if_conf = $this->config[\"interfaces\"][$this->initial_data[\"interface\"]];\n # Check that interface hosts a static network with multiple addresses\n if (isset($if_conf[\"enable\"]) and is_ipaddrv4($if_conf[\"ipaddr\"]) and $if_conf[\"subnet\"] <= 31) {\n\n } else {\n $this->errors[] = APIResponse\\get(2019);\n }\n } else {\n $this->errors[] = APIResponse\\get(2018);\n }\n } else {\n $this->errors[] = APIResponse\\get(2017);\n }\n\n # Check for our required 'id' payload value\n if (isset($this->initial_data[\"id\"])) {\n # Ensure this ID exists\n $dhcp_maps = $this->config[\"dhcpd\"][$this->initial_data[\"interface\"]][\"staticmap\"];\n if (array_key_exists($this->initial_data[\"id\"], $dhcp_maps)) {\n $this->id = $this->initial_data[\"id\"];\n } else {\n $this->errors[] = APIResponse\\get(2045);\n }\n } else {\n $this->errors[] = APIResponse\\get(2044);\n }\n }", "public static function should_decode($headers)\n {\n }", "public function didHandshake()\n {\n return $this->handshake->isComplete();\n }", "public function testImplementsInterface()\n {\n $this->assertInstanceOf(\"\\Metagist\\Api\\WorkerInterface\", $this->client);\n }", "private function _registered($mod,$protocol)\n\t{\n\t\t$mod=(String)$mod;\n\t\t$protocol=(String)$protocol;\n\t\tif(array_key_exists($mod,$this->engines))\n\t\t{\n\t\t\tforeach($this->engines[$mod] as $k=>$v)\n\t\t\t{\n\t\t\t\tif($k==$protocol) return true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function testValidateDocumentAutodetectValidation()\n {\n }", "public function testImplementsInterface()\n {\n $expectedType = 'Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface';\n $this->assertInstanceOf($expectedType, $this->compilerPass);\n }", "public function testValidation()\n {\n $this->driver->loadMetadataForClass(new \\ReflectionClass(InvalidExample::class));\n }", "public function it_can_be_instantiated(): void\n {\n static::assertInstanceOf(Translator::class, $this->translator);\n }", "public function validateInboundMessage(){\n\t\t$hashData = $this->timestamp . \"\" . $this->token;\n\t\t$computedSignature = hash_hmac(\"sha256\",$hashData , $this->MGAPIKEY);\n\t\t$providedSignature = $this->signature;\n\t\tif ($computedSignature == $providedSignature){\n\t\t\tif($this->validateSender()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function isSupported();", "public function isSupported();", "private function assertValidAuthType()\n {\n if (\n !array_key_exists($this->authType, $this->authenticators)\n || !class_exists($this->authenticators[$this->authType])\n || !is_subclass_of($this->authenticators[$this->authType], AbstractAuthenticator::class)\n ) {\n throw new UnregisteredAuthenticatorException(\n $this->authType . ' is not a registered authentication type'\n );\n }\n }", "public function testInterface()\n {\n $this->assertInstanceOf(GeneratorInterface::class, $this->generator);\n }", "public function checkRegistryRequestsAnswers()\n {\n return $this->trackEngine instanceof \\Gems_Tracker_Engine_TrackEngineInterface;\n }", "public function testRejectsAnInterfaceWithAnIncorrectTypeForResolveType()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $objectWithIsTypeOf = newObjectType([\n 'name' => 'ObjectWithIsTypeOf',\n 'fields' => ['f' => ['type' => stringType()]],\n 'isTypeOf' => function () {\n return true;\n }\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeUnion must provide \"resolveType\" as a function.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithField(\n newUnionType([\n 'name' => 'SomeUnion',\n 'types' => [$objectWithIsTypeOf],\n 'resolveType' => ''\n ])\n );\n\n $this->addToAssertionCount(1);\n }", "public function testCloningCapabilities()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n $tmp = clone $protocol;\n\n $this->assertEquals($protocol, $tmp);\n $this->assertNotEmpty($tmp->generateExchangeRequestInformation());\n\n unset($tmp);\n $this->assertNotNull($protocol);\n }", "public function canGetExtensionKey() {\n\t\t$provider = $this->getConfigurationProviderInstance();\n\t\t$record = $this->getBasicRecord();\n\t\t$extensionKey = $provider->getExtensionKey($record);\n\t\t$this->assertNull($extensionKey);\n\t}", "public function hasSingleStore()\n {\n throw new \\Exception('Method not implemented');\n }", "public function testSerializationCapabilities()\n {\n $generator = $this->getTokenGeneratorForTesting();\n\n $tmp = serialize($generator);\n $tmp = unserialize($tmp);\n\n $this->assertEquals($generator, $tmp);\n $this->assertNotEmpty($tmp->getTokenString(10));\n\n unset($tmp);\n $this->assertNotNull($generator);\n }", "public function hasAnswer(AnswerInterface $answer);" ]
[ "0.70697767", "0.594251", "0.5503519", "0.54659015", "0.5463955", "0.54587543", "0.5349956", "0.5349956", "0.52931255", "0.5283725", "0.5247275", "0.52162075", "0.51983833", "0.5111475", "0.50989795", "0.5077895", "0.50709355", "0.50644857", "0.5059951", "0.5059951", "0.50355124", "0.5028702", "0.5024577", "0.5007974", "0.49949247", "0.4973951", "0.496373", "0.49562567", "0.4932332", "0.4931635", "0.49267864", "0.49188778", "0.49082333", "0.4886571", "0.48807362", "0.48797715", "0.48776117", "0.48638275", "0.48638275", "0.48638275", "0.48634744", "0.48616713", "0.48436219", "0.48343402", "0.48343402", "0.48343402", "0.48205936", "0.48105696", "0.48094538", "0.48010942", "0.47993475", "0.4796598", "0.47724646", "0.475026", "0.471623", "0.4715333", "0.4715333", "0.47135267", "0.47081485", "0.4699903", "0.4696275", "0.46959445", "0.46802008", "0.46785694", "0.4676757", "0.4675879", "0.4675104", "0.46628633", "0.46517375", "0.46498585", "0.4643825", "0.46368036", "0.463488", "0.46295163", "0.4623043", "0.46166164", "0.4613716", "0.46128008", "0.46101704", "0.46055925", "0.46046486", "0.46020654", "0.45944542", "0.45937142", "0.45893055", "0.4586826", "0.4583417", "0.45792904", "0.4571109", "0.45661148", "0.45596993", "0.45596993", "0.45594588", "0.4554434", "0.45505077", "0.45487738", "0.4546754", "0.45371538", "0.45340154", "0.45301226", "0.4525455" ]
0.0
-1
Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // For security, start by assuming the visitor is NOT authorized. $isValid = False; // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. // Therefore, we know that a user is NOT logged in if that Session variable is blank. if (!empty($UserName)) { // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. // Parse the strings into arrays. $arrUsers = Explode(",", $strUsers); $arrGroups = Explode(",", $strGroups); if (in_array($UserName, $arrUsers)) { $isValid = true; } // Or, you may restrict access to only certain users based on their username. if (in_array($UserGroup, $arrGroups)) { $isValid = true; } if (($strUsers == "") && false) { $isValid = true; } } return $isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkPageAllowed() {\n\n if (!$this->user->isPersonnalManager()) {\n\n header('Location: ./index.php');\n exit();\n }\n }", "public function restricted()\n {\n $site = new SiteContainer($this->db);\n\n $site->printHeader();\n if (isset($_SESSION['type']))\n $site->printNav($_SESSION['type']);\n echo \"You are not allowed to access this resource. Return <a href=\\\"index.php\\\">Home</a>\";\n $site->printFooter();\n\n }", "function user_can_access_admin_page()\n {\n }", "public function restrict() {\n\t\tif (!$this->is_logged_in()) {\n\t\t\tredirect('login', 'refresh');\n\t\t}\n\t}", "function isRestricted() {\t\n\n\t\tif (isset($_SESSION['logged-in']) && $_SESSION['isAdmin']) {\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader(\"Location: restricted.php\");//Instant Re direct to Restricted due to lack of permissions.\n\t\t}\t\t\t\n\t}", "public function manage_comments_page_access() {\n\t\tif ( ! current_user_can( 'moderate_comments' ) ) {\n\t\t\twp_die(\n\t\t\t\t__( 'You do not have permission to moderate comments.', 'wpcampus-network' ),\n\t\t\t\t__( 'Moderating Comments', 'wpcampus-network' ),\n\t\t\t\t[ 'back_link' => true ]\n\t\t\t);\n\t\t}\n\t}", "public function canManagePages();", "function show_deny() {\n\t\t\tshow_error(\n\t\t\t\t'403 Forbidden',\n\t\t\t\t'You do not have sufficient clearance to view this page.'\n\t\t\t);\n\t\t}", "public function checkAccessToPage($path){\n\t\t//Get current authenticated user data\n\t\t$admin = Auth::user();\n\t\t//Get user role\n\t\t$admin_roles = Roles::select('slug', 'access_pages')->where('slug', '=', $admin['role'])->first();\n\t\t//Check for Grant-access rules\n\t\tif($admin_roles->access_pages == 'grant_access'){\n\t\t\treturn true;\n\t\t}\n\n\t\t//Get accesses list for current role (access_pages is forbidden pages list)\n\t\t$forbidden_pages = (array)json_decode($admin_roles->access_pages);\n\t\t//get path for current page\n\t\t$natural_path = $this->getNaturalPath($path);\n\t\t//Get current page data\n\t\t$current_page = AdminMenu::select('id', 'slug')->where('slug', '=', $natural_path)->first();\n\n\t\t//if there is no id of current page in forbidden pages list\n\t\tif(!in_array($current_page->id, array_keys($forbidden_pages))){\n\t\t\treturn true;\n\t\t}else{\n\t\t\t//Check for CRUD restrictions\n\t\t\t$forbidden_pages = json_decode($admin_roles->access_pages);\n\t\t\t$current_page_id = $current_page->id;\n\n\t\t\t//convert current page path to full-slash view\n\t\t\t$path = (substr($path, 0,1) != '/')? '/'.$path: $path;\n\t\t\t//create path to links array\n\t\t\t$path_array = array_values(array_diff(explode('/',$path), ['']));\n\t\t\t//check for action-path\n\t\t\tswitch($path_array[count($path_array) -1]){\n\t\t\t\tcase 'edit':\n\t\t\t\tcase 'update':\n\t\t\t\t\tif(strpos($forbidden_pages->$current_page_id, 'u') !== false){\n\t\t\t\t\t\treturn abort(503);\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 'create':\n\t\t\t\tcase 'store':\n\t\t\t\t\tif(strpos($forbidden_pages->$current_page_id, 'c') !== false){\n\t\t\t\t\t\treturn abort(503);\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif(strpos($forbidden_pages->$current_page_id, 'r') !== false){\n\t\t\t\t\t\treturn abort(503);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}", "public function responsableDashboard()\n{\n $this->denyAccessUnlessGranted('ROLE_RESPONSABLE');\n\n // or add an optional message - seen by developers\n $this->denyAccessUnlessGranted('ROLE_RESPONSABLE', null, 'User tried to access a page without having ROLE_RESPONSABLE');\n}", "public function testRestrictPage()\n {\n $this->assertTrue(true);\n }", "function require_permission($required)\n{\n require_login();\n\n // owners have full access\n if ($_SESSION['permission'] == OWN) {\n return;\n }\n\n if ($required != $_SESSION['permission']) {\n redirect_to(url_for(\"/index.php\"));\n }\n}", "abstract public function require_access();", "function allow_user_privileges() {\n\tif(!$_SESSION['role']):\n\t\theader('Location: ?q=start');\n\tendif;\n}", "protected function restrict() {\n $this->restrict_to_permission('blog');\n }", "public function veterinaireDashboard()\n{\n $this->denyAccessUnlessGranted('ROLE_VETERINAIRE');\n\n // or add an optional message - seen by developers\n $this->denyAccessUnlessGranted('ROLE_VETERINAIRE', null, 'User tried to access a page without having ROLE_VETERINAIRE');\n}", "public function check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}", "public static function denyAccess()\n {\n static::redirect(static::adminPath(), cbTrans('denied_access'));\n }", "public function page_test() {\n\n\t\tprint_r($this->permissions->check(\"can_view_admin\"));\n\t}", "function restrictedToAdmin(\n $redirectPage\n) {\n restrictedToAuthorized($redirectPage);\n $authUser = Authorizer::getAuthorizedUser();\n if ($authUser == null || ! $authUser->isAdmin()) {\n header(\"Location: \" . $redirectPage);\n exit();\n }\n}", "protected function _isAllowed()\n {\n \treturn true;\n }", "public function index()\n {\n if (Gate::allows('admin-only', auth()->user())) {\n \n return view('page.page01');\n\n }else if(Gate::allows('about-page', auth()->user())){\n\n return view('page.page01');\n\n }else{\n \n return redirect('/denied')->with('error','You dont have access to page -ABOUT- ! Your Admin Premission without page access!'); \n }\n }", "abstract protected function canAccess();", "public function restrict($url){\n if($this->session->get('auth') == null){\n header(\"Location : $url\");\n exit();\n }\n }", "function page_allowed($conn,$conn_admin,$id,$page)\n {\n $sql=\"select cn.id from customer_navbar cn left outer join customer_navbar_corresponding_pages cncp on cn.id=cncp.navbar_id where cn.link='$page' or cncp.link='$page' \";\n $res=$conn_admin->query($sql);\n if($res->num_rows>0)\n {\n $row=$res->fetch_assoc();\n $nid=$row['id'];\n $sql=\"select access from navbar_access where navbar_id=$nid and staff_id=$id\";\n \t\tif($res=$conn->query($sql))\n \t\t{\n \t\t\tif($res->num_rows>0)\n \t\t\t{\n \t\t\t\t$row=$res->fetch_assoc();\n \t\t\t\tif($row['access']!=0)\n \t\t\t\t\treturn true;\n \t\t\t\telse\n \t\t\t\t\treturn false;\n \t\t\t}\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$sql=\"\";\n \t\t\treturn false;\n \t\t}\n }\n\t\telse\n\t\t{\n\t\t\t$sql=\"\";\n\t\t\treturn false;\n\t\t} \n }", "public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }", "function admEnforceAccess()\n{\n if( !admCheckAccess() ) {\n // no access. stop right now.\n\n // should print error message, but hey. let's just dump back to homepage\n header( \"Location: /\" ); \n exit;\n }\n}", "public function livreurDashboard()\n{\n $this->denyAccessUnlessGranted('ROLE_LIVREUR');\n\n // or add an optional message - seen by developers\n $this->denyAccessUnlessGranted('ROLE_LIVREUR', null, 'User tried to access a page without having ROLE_LIVREUR');\n}", "public function adminDashboard()\n{\n $this->denyAccessUnlessGranted('ROLE_ADMINISTRATEUR');\n\n // or add an optional message - seen by developers\n $this->denyAccessUnlessGranted('ROLE_ADMINISTRATEUR', null, 'User tried to access a page without having ROLE_ADMINISTRATEUR');\n}", "function authorizedAdminOnly(){\n global $authenticatedUser;\n if(!$authenticatedUser['admin']){\n header(\"HTTP/1.1 403 Forbidden\");\n header(\"Location: https://eso.vse.cz/~frim00/marvelous-movies/error-403\");\n exit();\n }\n }", "function securePage($uri) {\n\n //Separate document name from uri\n $tokens = explode('/', $uri);\n $page = $tokens[sizeof($tokens) - 1];\n global $mysqli, $db_table_prefix, $loggedInUser;\n //retrieve page details\n $stmt = $mysqli->prepare(\"SELECT \n\t\tid,\n\t\tpage,\n\t\tprivate\n\t\tFROM \" . $db_table_prefix . \"pages\n\t\tWHERE\n\t\tpage = ?\n\t\tLIMIT 1\");\n $stmt->bind_param(\"s\", $page);\n $stmt->execute();\n $stmt->bind_result($id, $page, $private);\n while ($stmt->fetch()) {\n $pageDetails = array('id' => $id, 'page' => $page, 'private' => $private);\n }\n $stmt->close();\n //If page does not exist in DB, allow access\n if (empty($pageDetails)) {\n return true;\n }\n //If page is public, allow access\n elseif ($pageDetails['private'] == 0) {\n return true;\n }\n //If user is not logged in, deny access\n elseif (!isUserLoggedIn()) {\n header(\"Location: index.php\");\n return false;\n } else {\n //Retrieve list of permission levels with access to page\n $stmt = $mysqli->prepare(\"SELECT\n\t\t\tpermission_id\n\t\t\tFROM \" . $db_table_prefix . \"permission_page_matches\n\t\t\tWHERE page_id = ?\n\t\t\t\");\n $stmt->bind_param(\"i\", $pageDetails['id']);\n $stmt->execute();\n $stmt->bind_result($permission);\n while ($stmt->fetch()) {\n $pagePermissions[] = $permission;\n }\n $stmt->close();\n //Check if user's permission levels allow access to page\n if ($loggedInUser->checkPermission($pagePermissions)) {\n return true;\n }\n //Grant access if master user\n elseif ($loggedInUser->user_id == $master_account) {\n return true;\n } else {\n header(\"Location: account.php\");\n return false;\n }\n }\n}", "public function denyAccess(): AccessResultInterface;", "function userCanEditPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageEdit(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "public function checkAccess() {\n // if the user is not allowed access to the ACL, then redirect him\n if (!$this->user->isAllowed(ACL_RESOURCE, ACL_PRIVILEGE)) {\n // @todo change redirect to login page\n $this->redirect('Denied:');\n }\n }", "function restrict($id_module='0', $teh=null)\r\n\t{\r\n\t\tif($this->is_logged_in() === FALSE) {\r\n\r\n\t\t\tredirect(base_url());\r\n\r\n\t\t} else if($id_module != 0 && $this->izin($id_module, $teh) === FALSE) {\r\n\r\n\t\t\tredirect(base_url('admin/access_forbidden'));\r\n\r\n\t\t\tdie();\r\n\r\n\t\t}\r\n\t}", "public function denyLink()\n {\n }", "function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "public function authorize()\n {\n abort_if(Gate::denies('permission_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n return true;\n }", "function restrictedToAuthorized(\n $redirectPage = null\n) {\n if ($redirectPage == null) {\n $redirectPage = $GLOBALS[\"pagelink\"][\"register\"];\n }\n if (!Authorizer::userIsAuthorized()) {\n $_SESSION['redirect_url'] = \\Web\\Framework\\Request\\getSubUrl();\n header(\"Location: \" . $redirectPage);\n exit();\n }\n}", "public function checkAccess()\n {\n // need to be modified for security\n }", "function deny($message = null) {\n // Ignore soft 403 for ajax requests as redirections is transparent.\n if (config\\SOFT_403 != false && !\\melt\\request\\is_ajax()) {\n $user = get_user();\n if ($user === null) {\n if (config\\LAST_DENY_AUTOREDIRECT)\n $_SESSION['userx\\LAST_DENY_PATH'] = APP_ROOT_URL . \\substr(REQ_URL, 1);\n if ($message === null)\n $message = _(\"Access denied. You are not logged in.\");\n \\melt\\messenger\\redirect_message(config\\SOFT_403, $message, \"bad\");\n } else {\n if ($message === null)\n $message = _(\"Access denied. Insufficient permissions.\");\n \\melt\\messenger\\redirect_message(config\\SOFT_403, $message, \"bad\");\n }\n } else\n \\melt\\request\\show_xyz(403);\n exit;\n}", "function allow_admin_privileges() {\n\tif($_SESSION['role']!=='administrator'):\n\t\theader('Location: ?q=start');\n\tendif;\n}", "function checkAccess() ;", "function securePage($uri){\r\n\t\r\n\t//Separate document name from uri\r\n\t$tokens = explode('/', $uri);\r\n\t$page = $tokens[sizeof($tokens)-1];\r\n\tglobal $mysqli,$db_table_prefix,$loggedInUser;\r\n\t//retrieve page details\r\n\t$stmt = $mysqli->prepare(\"SELECT \r\n\t\tid,\r\n\t\tpage,\r\n\t\tprivate\r\n\t\tFROM \".$db_table_prefix.\"pages\r\n\t\tWHERE\r\n\t\tpage = ?\r\n\t\tLIMIT 1\");\r\n\t$stmt->bind_param(\"s\", $page);\r\n\t$stmt->execute();\r\n\t$stmt->bind_result($id, $page, $private);\r\n\twhile ($stmt->fetch()){\r\n\t\t$pageDetails = array('id' => $id, 'page' => $page, 'private' => $private);\r\n\t}\r\n\t$stmt->close();\r\n\t//If page does not exist in DB, allow access\r\n\tif (empty($pageDetails)){\r\n\t\treturn true;\r\n\t}\r\n\t//If page is public, allow access\r\n\telseif ($pageDetails['private'] == 0) {\r\n\t\treturn true;\t\r\n\t}\r\n\t//If user is not logged in, deny access\r\n\telseif(!isUserLoggedIn()) \r\n\t{\r\n\t\theader(\"Location: login.php\");\r\n\t\treturn false;\r\n\t}\r\n\telse {\r\n\t\t//Retrieve list of permission levels with access to page\r\n\t\t$stmt = $mysqli->prepare(\"SELECT\r\n\t\t\tpermission_id\r\n\t\t\tFROM \".$db_table_prefix.\"permission_page_matches\r\n\t\t\tWHERE page_id = ?\r\n\t\t\t\");\r\n\t\t$stmt->bind_param(\"i\", $pageDetails['id']);\t\r\n\t\t$stmt->execute();\r\n\t\t$stmt->bind_result($permission);\r\n\t\twhile ($stmt->fetch()){\r\n\t\t\t$pagePermissions[] = $permission;\r\n\t\t}\r\n\t\t$stmt->close();\r\n\t\t//Check if user's permission levels allow access to page\r\n\t\tif ($loggedInUser->checkPermission($pagePermissions)){ \r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t//Grant access if master user\r\n\t\telseif ($loggedInUser->user_id == $master_account){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\theader(\"Location: account.php\");\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\t}\r\n}", "public function isForbidden();", "private function authorize()\n {\n $authorized = FALSE;\n\n if ( in_array(ee()->session->userdata['group_id'], ee()->publisher_setting->can_admin_publisher()))\n {\n $authorized = TRUE;\n }\n\n if (ee()->session->userdata['group_id'] == 1)\n {\n $authorized = TRUE;\n }\n\n if ( !$authorized)\n {\n ee()->publisher_helper_url->redirect(ee()->publisher_helper_cp->mod_link('view_unauthorized'));\n }\n }", "function AllowAnonymousUser() {\n\t\tswitch (EW_PAGE_ID) {\n\t\t\tcase \"add\":\n\t\t\tcase \"register\":\n\t\t\tcase \"addopt\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"edit\":\n\t\t\tcase \"update\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"delete\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"view\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"search\":\n\t\t\t\treturn FALSE;\n\t\t\tdefault:\n\t\t\t\treturn FALSE;\n\t\t}\n\t}", "public function customAccessPage() {\r\n return [\r\n '#markup' => $this->t('This menu entry will not be visible and access will result\r\n in a 403 error unless the user has the \"authenticated\" role. This is\r\n accomplished with a custom access check plugin.'),\r\n ];\r\n }", "public function authorize() {\n\t\treturn false;\n }", "public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') ) ) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }", "function protect_page() {\n if(!logged_in()) {\n header('Location: protected.php');\n exit();\n }\n }", "abstract public function url_authorize();", "private function prepareForViewing($pagename) {\n Wi3::inst()->sitearea->setpage($pagename); // Will also execute the \"wi3.init.sitearea.page.loaded\" event\n // Now check the rights for this page\n // Pages can only be viewed if the page has not set any 'viewright' or if the user that requests the page is logged in and has that required viewright\n $page = Wi3::inst()->sitearea->page;\n // TODO: rewrite with ACL, see adminarea\n if (!empty($page->viewright))\n {\n // Check for required role\n $requiredrole = $page->viewright;\n $hasrequiredrole = false;\n // Check if there is a logged-in user for this site at all\n $user = Wi3::inst()->sitearea->auth->user;\n if (is_object($user))\n {\n // Check user rights\n $roles = $user->roles;\n foreach($roles as $role)\n {\n if (strtolower($role->name) === strtolower($requiredrole) OR $role->name === strtolower(\"admin\"))\n {\n $hasrequiredrole = true;\n break;\n }\n }\n }\n // Check\n if (!$hasrequiredrole)\n {\n // Redirect to the loginpage of the site (if known, that is)\n $site = Wi3::inst()->sitearea->site;\n if(strlen($site->loginpage) > 0)\n {\n Request::instance()->redirect(Wi3::inst()->urlof->page($site->loginpage));\n }\n else\n {\n throw(new ACL_Exception_403()); // Permission denied\n exit;\n }\n }\n }\n // Caching is per user\n Wi3::inst()->cache->requireCacheParameter(\"user\");\n $user = Wi3::inst()->sitearea->auth->user;\n if (is_object($user)) {\n $userid = $user->id;\n } else {\n $userid = \"\";\n }\n //Wi3::inst()->cache->doRemoveCacheWhenAllRequiredCacheParametersAreFilled();\n Wi3::inst()->cache->fillCacheParameter(\"user\", $userid);\n // By default, don't cache pages\n // This can be overridden in the user template, if desired\n Wi3::inst()->cache->doNotCache();\n }", "public function getExplicitlyAllowAndDeny() {}", "public function allow()\n {\n ++$this->allowed;\n\n if (NODE_ACCESS_DENY !== $this->result) {\n $this->result = NODE_ACCESS_ALLOW;\n }\n }", "private function userNotPermit(){\n throw new \\Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException('Bad user',null, 403);\n }", "private function userHasAccessToPages() {\n\t\t$configurationProxy = tx_oelib_configurationProxy::getInstance('realty');\n\n\t\t$objectsPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForRealtyObjectsAndImages'\n\t\t);\n\t\t$canWriteObjectsPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $objectsPid), 16\n\t\t);\n\n\t\t$auxiliaryPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForAuxiliaryRecords'\n\t\t);\n\t\t$canWriteAuxiliaryPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $auxiliaryPid), 16\n\t\t);\n\n\t\tif (!$canWriteObjectsPage) {\n\t\t\t$this->storeErrorMessage('objects_pid', $objectsPid);\n\t\t}\n\t\tif (!$canWriteAuxiliaryPage) {\n\t\t\t$this->storeErrorMessage('auxiliary_pid', $auxiliaryPid);\n\t\t}\n\n\t\treturn $canWriteObjectsPage && $canWriteAuxiliaryPage;\n\t}", "function plasso_protect_pages() {\n\t$options = get_theme_mod('plasso');\n\t$protected = $options['space_page'];\n\n\t// If we are on a protected page.\n if(is_page($protected)) {\n $plassoBilling = new PlassoBilling((isset($_GET['__logout']))?'logout':(isset($_GET['_plasso_token'])?$_GET['_plasso_token']:NULL));\n\t}\n}", "function securePage($uri){ // every file in the framework uses this\r\n\t//Separate document name from uri\r\n\r\n\t$tokens = explode('/', $uri);\r\n\r\n\t$page = $tokens[sizeof($tokens)-1];\r\n\r\n\tglobal $mysqli,$db_table_prefix,$loggedInUser;\r\n\r\n\t//retrieve page details\r\n\r\n\t$stmt = $mysqli->prepare(\"SELECT \r\n\r\n\t\tid,\r\n\r\n\t\tpage,\r\n\r\n\t\tprivate\r\n\r\n\t\tFROM \".$db_table_prefix.\"pages\r\n\r\n\t\tWHERE\r\n\r\n\t\tpage = ?\r\n\r\n\t\tLIMIT 1\");\r\n\r\n\t$stmt->bind_param(\"s\", $page);\r\n\r\n\t$stmt->execute();\r\n\r\n\t$stmt->bind_result($id, $page, $private);\r\n\r\n\twhile ($stmt->fetch()){\r\n\r\n\t\t$pageDetails = array('id' => $id, 'page' => $page, 'private' => $private);\r\n\r\n\t}\r\n\r\n\t$stmt->close();\r\n\r\n\t//If page does not exist in DB, allow access\r\n\r\n\tif (empty($pageDetails)){\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\t//If page is public, allow access\r\n\r\n\telseif ($pageDetails['private'] == 0) {\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\t//If user is not logged in, deny access and prompt them to log in\r\n\r\n\telseif(!isUserLoggedIn()) \r\n\r\n\t{\t\r\n\t\theader(\"Location: login.php\"); exit();\r\n\t\t\r\n\t}\r\n\r\n\telse {\r\n\r\n\t\t// The page exists, it is private, and user is logged in, so...\r\n\t\t//Retrieve list of permission levels with access to page\r\n\r\n\t\t$stmt = $mysqli->prepare(\"SELECT\r\n\r\n\t\t\tpermission_id\r\n\r\n\t\t\tFROM \".$db_table_prefix.\"permission_page_matches\r\n\r\n\t\t\tWHERE page_id = ?\r\n\r\n\t\t\t\");\r\n\r\n\t\t$stmt->bind_param(\"i\", $pageDetails['id']);\t\r\n\r\n\t\t$stmt->execute();\r\n\r\n\t\t$stmt->bind_result($permission);\r\n\r\n\t\twhile ($stmt->fetch()){\r\n\r\n\t\t\t$pagePermissions[] = $permission;\r\n\r\n\t\t}\r\n\r\n\t\t$stmt->close();\r\n\r\n\t\t//Check if user's permission levels allow access to page\r\n\r\n\t\tif ($loggedInUser->checkPermission($pagePermissions)){ \r\n\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\r\n\t\t//Grant access if master user\r\n\r\n\t\telseif ($loggedInUser->user_id == $master_account){\r\n\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\theader(\"Location: account.php\"); // why here? User is logged in, but can't get to the requested page. Dump them to account\r\n\r\n\t\t\treturn false;\t\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}", "protected function restrict() {\n $this->restrict_to_permission('manage_products');\n }", "public function action_access_denied()\r\n\t{\r\n\t\t$this->title = \"Access Denied\";\r\n\t\t$this->template->content = View::factory('access_denied');\r\n\t}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "function applies() {\n\t\t$context =& $this->_router->getContext($this->_request);\n\t\treturn ( $context && $context->getSetting('restrictSiteAccess'));\n\t}", "function chekPrivies($privReq = '0', $privChek = '0'){\n\n\t// Get User Privilege from session\n\n\t$privChek = (int)$_SESSION['Privilege']; //Cast as int\n\n\t//if Priv less then access required redirect to main index.\n\tif ($privChek < $privReq){\n\t\t$myURL = VIRTUAL_PATH;\n\t\tmyRedirect($myURL);\n\t}\n}", "function admin_protect() {\n global $user_data;\n if($user_data['type'] != 1) {\n header(\"location: index.php\");\n exit();\n }\n }", "public function claimPageAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LOGGED IN USER INFORMATION \n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET LEVEL ID\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $authorizationTable = Engine_Api::_()->getItemTable('authorization_level');\n $authorization = $authorizationTable->fetchRow(array('type = ?' => 'public', 'flag = ?' => 'public'));\n if (!empty($authorization))\n $level_id = $authorization->level_id;\n }\n\n $getPackageClaim = Engine_Api::_()->sitepage()->getPackageAuthInfo('sitepage');\n $this->_helper->layout->setLayout('default-simple');\n\n //GET PAGE ID\n $page_id = $this->_getParam('page_id', null);\n\n //SET PARAMS\n $paramss = array();\n $paramss['page_id'] = $page_id;\n $paramss['viewer_id'] = $viewer_id;\n $inforow = Engine_Api::_()->getDbtable('claims', 'sitepage')->getClaimStatus($paramss);\n\n $this->view->status = 0;\n if (!empty($inforow)) {\n $this->view->status = $inforow->status;\n }\n\n\t\t//GET ADMIN EMAIL\n\t\t$coreApiSettings = Engine_Api::_()->getApi('settings', 'core');\n\t\t$adminEmail = $coreApiSettings->getSetting('core.mail.contact', $coreApiSettings->getSetting('core.mail.from', \"[email protected]\"));\n\t\tif(!$adminEmail) $adminEmail = $coreApiSettings->getSetting('core.mail.from', \"[email protected]\");\n \n //CHECK STATUS\n if ($this->view->status == 2) {\n echo '<div class=\"global_form\" style=\"margin:15px 0 0 15px;\"><div><div><h3>' . $this->view->translate(\"Alert!\") . '</h3>';\n echo '<div class=\"form-elements\" style=\"margin-top:10px;\"><div class=\"form-wrapper\" style=\"margin-bottom:10px;\">' . $this->view->translate(\"You have already send a request to claim for this page which has been declined by the site admin.\") . '</div>';\n echo '<div class=\"form-wrapper\"><button onclick=\"parent.Smoothbox.close()\">' . $this->view->translate(\"Close\") . '</button></div></div></div></div></div>';\n }\n\n $this->view->claimoption = $claimoption = Engine_Api::_()->authorization()->getPermission($level_id, 'sitepage_page', 'claim');\n\n //FETCH\n $paramss = array();\n $this->view->userclaim = $userclaim = 0;\n $paramss['page_id'] = $page_id;\n $paramss['limit'] = 1;\n $pageclaiminfo = Engine_Api::_()->getDbtable('pages', 'sitepage')->getSuggestClaimPage($paramss);\n\n if (!$claimoption || !$pageclaiminfo[0]['userclaim'] || !Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.claimlink', 1)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if (isset($pageclaiminfo[0]['userclaim'])) {\n $this->view->userclaim = $userclaim = $pageclaiminfo[0]['userclaim'];\n }\n\n if ($inforow['status'] == 3 || $inforow['status'] == 4) {\n echo '<div class=\"global_form\" style=\"margin:15px 0 0 15px;\"><div><div><h3>' . $this->view->translate(\"Alert!\") . '</h3>';\n echo '<div class=\"form-elements\" style=\"margin-top:10px;\"><div class=\"form-wrapper\" style=\"margin-bottom:10px;\">' . $this->view->translate(\"You have already filed a claim for this page: \\\"%s\\\", which is either on hold or is awaiting action by administration.\", Engine_Api::_()->getItem('sitepage_page', $page_id)->title) . '</div>';\n echo '<div class=\"form-wrapper\"><button onclick=\"parent.Smoothbox.close()\">' . $this->view->translate(\"Close\") . '</button></div></div></div></div></div>';\n }\n\n if (!$inforow['status'] && $claimoption && $userclaim) {\n //GET FORM \n $this->view->form = $form = new Sitepage_Form_Claimpage();\n\n //POPULATE FORM\n if (!empty($viewer_id)) {\n $value['email'] = $viewer->email;\n $value['nickname'] = $viewer->displayname;\n $form->populate($value);\n }\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET FORM VALUES\n $values = $form->getValues();\n\n //GET EMAIL\n $email = $values['email'];\n\n //CHECK EMAIL VALIDATION\n $validator = new Zend_Validate_EmailAddress();\n if (!$validator->isValid($email)) {\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter a valid email address.'));\n return;\n }\n\n //GET CLAIM TABLE\n $tableClaim = Engine_Api::_()->getDbTable('claims', 'sitepage');\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //SAVE VALUES\n if (!empty($getPackageClaim)) {\n\n //GET SITEPAGE ITEM\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n\n //GET PAGE URL\n $page_url = Engine_Api::_()->sitepage()->getPageUrl($page_id);\n\n //SEND SITEPAGE TITLE TO THE TPL\n $page_title = $sitepage->title;\n\n //SEND CHANGE OWNER EMAIL\n\t\t\t\t\t\tif(Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.claim.email', 1) && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.claimlink', 1)) {\n\t\t\t\t\t\t\tEngine_Api::_()->getApi('mail', 'core')->sendSystem($adminEmail, 'SITEPAGE_CLAIMOWNER_EMAIL', array(\n\t\t\t\t\t\t\t\t\t'page_title' => $page_title,\n\t\t\t\t\t\t\t\t\t'page_title_with_link' => '<a href=\"' . 'http://' . $_SERVER['HTTP_HOST'] .\n\t\t\t\t\t\t\t\t\tZend_Controller_Front::getInstance()->getRouter()->assemble(array('page_url' => $page_url), 'sitepage_entry_view', true) . '\" >' . $page_title . ' </a>',\n\t\t\t\t\t\t\t\t\t'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n\t\t\t\t\t\t\t\t\tZend_Controller_Front::getInstance()->getRouter()->assemble(array('page_url' => $page_url), 'sitepage_entry_view', true),\n\t\t\t\t\t\t\t\t\t'email' => $coreApiSettings->getSetting('core.mail.from', \"[email protected]\"),\n\t\t\t\t\t\t\t\t\t'queue' => true\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t}\n\n $row = $tableClaim->createRow();\n $row->page_id = $page_id;\n $row->user_id = $viewer_id;\n $row->about = $values['about'];\n $row->nickname = $values['nickname'];\n $row->email = $email;\n $row->contactno = $values['contactno'];\n $row->usercomments = $values['usercomments'];\n $row->status = 3;\n $row->save();\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefreshTime' => '60',\n 'parentRefresh' => 'true',\n 'format' => 'smoothbox',\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your request has been send successfully. You will now receive an email confirming Admin approval of your request.'))\n ));\n }\n }\n }", "public static function refererProtect() {\r\n\r\n $referer = Environment::get(\"HTTP_REFERER\");\r\n\r\n $match = preg_match(VALID_REFERER, $referer);\r\n\r\n if ($match === 1) {\r\n return true;\r\n } else {\r\n\r\n $template = Template::init('v_403_forbidden');\r\n $template->render(403);\r\n\r\n exit();\r\n }\r\n\r\n }", "function accessPage($con, $accID)\n\t{\n\t\t$accountAccess = allowAccess($con, $accID);\n\n\t\tif($accountAccess == 1 || $accountAccess == 2)\n\t\t{\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('location: error.php');\n\t\t}\n\n\t\t#return $accessPage;\n\t}", "protected function _isAllowed() {\r\n return Mage::getSingleton('admin/session')->isAllowed('sales/bookme/reseauchx_reservationreseau/siege');\r\n }", "public function notAllowedDeliverHook()\n {\n if (CHAMELEON_CHECK_VALID_USER_SESSION_ON_PROTECTED_DOWNLOADS) {\n throw new AccessDeniedHttpException('Access denied.');\n }\n }", "function effect() {\n\t\t// Get the user\n\t\t$user =& $this->_request->getUser();\n\t\tif (!is_a($user, 'PKPUser')) return AUTHORIZATION_DENY;\n\n\t\t// Get the copyeditor submission\n\t\t$copyeditorSubmission =& $this->getAuthorizedContextObject(ASSOC_TYPE_ARTICLE);\n\t\tif (!is_a($copyeditorSubmission, 'CopyeditorSubmission')) return AUTHORIZATION_DENY;\n\n\t\t// Copyeditors can only access submissions\n\t\t// they have been explicitly assigned to.\n\t\tif ($copyeditorSubmission->getUserIdBySignoffType('SIGNOFF_COPYEDITING_INITIAL') != $user->getId()) return AUTHORIZATION_DENY;\n\n\t\treturn AUTHORIZATION_PERMIT;\n\t}", "public function verifyAccess (\n\t)\t\t\t\t\t// RETURNS <void> redirects if user is not allowed editing access.\n\t\n\t// $contentForm->verifyAccess();\n\t{\n\t\tif(Me::$clearance >= 6) { return; }\n\t\t\n\t\t// Check if guest users are allowed to post on this site\n\t\tif(!$this->guestPosts) { $this->redirect(); }\n\t\t\n\t\t// Make sure you own this content\n\t\tif($this->contentData['uni_id'] != Me::$id)\n\t\t{\n\t\t\tAlert::error(\"Invalid User\", \"You do not have permissions to edit this content.\", 7);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\n\t\t\n\t\t// If this entry is set to official, guest submitters cannot change it any longer\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL)\n\t\t{\n\t\t\tAlert::saveInfo(\"Editing Disabled\", \"This entry is now an official live post, and cannot be edited.\");\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\n\t}", "function btwp_restrict_admin_access() {\n\t\n\tglobal $current_user;\n\tget_currentuserinfo();\n\t\n\tif( !array_key_exists( 'administrator', $current_user->caps ) ) {\n\t\twp_redirect( get_bloginfo( 'url' ) );\n\t\texit;\n\t}\n\n}", "public function indexAction()\n {\n echo 'Forbidden access';\n }", "private function _limited_access_by_page($page, $global = FALSE) {\n\t\t// Let's check the page variable, because\n\t\t// we don't want to show anything if we're\n\t\t// not on the right page.\n\t\t// \n\t\t// ignore this if it's global.\n\t\tif ($global !== 'yes') {\n\t\t\tif ($page) {\n\t\t\t\t// Allow for bar|separated|pages\n\t\t\t\tif (strpos($page, '|')) {\n\t\t\t\t\t$pages = explode('|', $page);\n\t\t\t\t} else {\n\t\t\t\t\t$pages = array($page);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Let's use a boolean to check for permissions\n\t\t\t\t$yo_brother_can_i_access_your_blog = FALSE;\n\t\t\t\t$default_page = $this->mojo->site_model->default_page();\n\t\t\t\t\n\t\t\t\t// Loop through the pages and check\n\t\t\t\tforeach ($pages as $possible_page) {\n\t\t\t\t\t$url = implode('/', $this->mojo->uri->rsegments);\n\t\t\t\t\t\n\t\t\t\t\tif ('page/content/' . $possible_page == $url || $possible_page == $default_page) {\n\t\t\t\t\t\t$yo_brother_can_i_access_your_blog = TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Are we on the right page? No? Well leave!\n\t\t\t\tif (!$yo_brother_can_i_access_your_blog) {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// I'm glad we got that over with\n\t\treturn TRUE;\n\t}", "function restrict_menus() {\n if (!current_user_can('manage_options') && is_user_logged_in()) {\n $path = get_site_url();\n $screen = get_current_screen();\n $base = $screen->id;\n\n if( 'profile' == $base || 'edit-contact' == $base || 'contact' == $base || 'edit-category' == $base ) {\n // only load these pages\n } else {\n wp_redirect($path.'/wp-admin/edit.php?post_type=contact');\n }\n }\n}", "function can_access($group_id = FALSE, $page = FALSE)\n {\n $count = $this->db\n ->from('group_permission')\n ->where('group_id', $group_id)\n ->where('module_id', '0')\n ->count_all_results();\n if ($count) {\n return TRUE;\n }\n\n // if not allowed to access everything\n // check if allowed to access requested page\n return $this->db\n ->from('module')\n ->join('group_permission', 'group_permission.module_id = module.module_id')\n ->where('group_permission.group_id', $group_id)\n ->where('module.url', $page)\n ->count_all_results();\n }", "public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->redirect('contao/main.php?act=error');\n\t}", "public function authorize()\n {\n //return false;\n\t\treturn true;\n }", "public function authorize()\n {\n //return false;\n\t\treturn true;\n }", "public function authorize()\n {\n //return false;\n\t\treturn true;\n }", "function failed_access_blocker_adminGate($allow, $page) {\n\t//\tclean out expired attempts\n\t$sql = 'DELETE FROM '.prefix('plugin_storage').' WHERE `type`=\"failed_access\" AND `aux` < \"'.(time()-getOption('failed_access_blocker_timeout')*60).'\"';\n\tquery($sql);\n\t//\tadd this attempt\n\t$sql = 'INSERT INTO '.prefix('plugin_storage').' (`type`, `aux`,`data`) VALUES (\"failed_access\", \"'.time().'\",\"'.getUserIP().'\")';\n\tquery($sql);\n\t//\tcheck how many times this has happened recently\n\t$sql = 'SELECT COUNT(*) FROM '.prefix('plugin_storage'). 'WHERE `type`=\"failed_access\" AND `data`=\"'.getUserIP().'\"';\n\t$result = query($sql);\n\t$count = db_result($result, 0);\n\tif ($count >= getOption('failed_access_blocker_attempt_threshold')) {\n\t\t$block = getOption('failed_access_blocker_forbidden');\n\t\tif ($block) {\n\t\t\t$block = unserialize($block);\n\t\t} else {\n\t\t\t$block = array();\n\t\t}\n\t\t$block[getUserIP()] = time();\n\t\tsetOption('failed_access_blocker_forbidden',serialize($block));\n\t}\n\treturn $allow;\n}", "public function authorize()\n {\n return true; //admin guard\n }", "public function deny()\n {\n ++$this->denied;\n\n $this->result = NODE_ACCESS_DENY;\n\n // Where the actual magic happens please read the README.md file.\n if (!$this->byVote) {\n $this->stopPropagation();\n }\n }", "public function privacy_policy()\n {\n $url = array('url' => current_url());\n\n $this->session->set_userdata($url);\n\n $this->data['privacy'] = $this->home_m->get_data('privacy')->row_array();\n\n\n $body = 'privacy' ;\n\n $this->load_pages($body,$this->data);\n }", "public function authorize() {\n\t\tif (Auth::user()->user_type == \"S\" || Auth::user()->user_type == \"O\") {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tabort(404);\n\t\t}\n\t}", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "function verify_access($user_access){\n\n switch($user_access){\n case \"ADMIN\":\n break;\n default:\n header('Location:index.php?error=0000000001');\n }\n}", "public function is_allowed_to_set_content_object_rights();", "public static function protect(){\n\t\tif(!(isset($_SESSION[\"user\"]) && isset($_SESSION[\"user\"]['userId']))){\n\t\t\theader(\"location: \".$GLOBALS['web_root']);\n\t\t\texit();\n\t\t}\n\n\t}", "function beforeFilter() {\n\t\t//parent::beforeFilter(); \n\t\t//$this->Auth->allow('*');\n\t\tif( $this->Session->read('Auth.User.status') == 0 ) // status means admin\n\t\t\t$this->redirect( array('controller'=>'pages') );\n\t}", "public function authorize()\n {\n abort_if(Gate::denies('comment_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n return false;\n }", "function chksecurity($page,$type=0,$redirect=0){\n $checkAll\t = false;\n $Secure\t = false;\n $obj_kind\t = $type;\n $operator\t = getUser();\n $otherRight = \"\";\n switch($type){\n\tcase 0://SYSTEM CHECK\n\t\t$objectParam=0;\n\tbreak;\n\tcase 1:// GROUP CHECK\n\t\t$objectParam=get_param(\"group\");\n\tbreak;\n\tcase 2:// SHOP CHECK\n\t\t$objectParam=get_param(\"group\").\";\".get_param(\"shop\");\n\tbreak;\n\tcase 3:// TERMINAL CHECK\n\t\t$objectParam=get_param(\"group\").\";\".get_param(\"shop\").\";\".get_param(\"term\");\n //$otherRight=\"_term\";\n\tbreak;\n\tcase 99: //CHECK IN ALL OPERATOR'S RIGHTS.\n\t\t$checkAll=true;\n\tbreak;\n }\n $pageRight =get_db_value(\"select mask from webpages where name='$page'\");\n if(!$checkAll){\n\t//take Operator's rights.\n\t$operRights=get_db_value(\"select rights$otherRight from obj_rights where op_kind=0 and obj_kind=$obj_kind and operator='$operator' and object='$objectParam;'\");\n\t//take page's security\n\tif (( (abs($pageRight) & abs($operRights)) == abs($pageRight))&& (!($pageRight==\"\")))\n\t\t$Secure=true;\n }//IF ! CHECK ALL\n else{ // -=check all=-\n\t $Secure=(get_db_value(\"select count(*) from obj_rights where operator='$operator' and (rights$otherRight|'$pageRight') = rights$otherRight\" )>0);\n\t }//end else check all\nif ($Secure&&(strlen($pageRight)))\n\treturn true;\nelse\n if ($redirect)\n \t header(\"Location: norights.php\");\n else\n return false;\n\n\n}" ]
[ "0.7619632", "0.7072883", "0.6896645", "0.68458045", "0.67869216", "0.67810124", "0.6758489", "0.6695543", "0.66813356", "0.66748095", "0.6660849", "0.66419417", "0.66035354", "0.6597928", "0.65839565", "0.6561224", "0.6559891", "0.6547126", "0.6542498", "0.654157", "0.65374285", "0.6510251", "0.6503634", "0.6488583", "0.6481371", "0.6481033", "0.6461588", "0.64409184", "0.6408593", "0.639587", "0.63882416", "0.6376586", "0.6367722", "0.6365693", "0.63590765", "0.6345976", "0.6312543", "0.63119256", "0.62939626", "0.6293003", "0.62697554", "0.62571824", "0.6252476", "0.62506735", "0.6249124", "0.62476355", "0.62416345", "0.62395346", "0.62347794", "0.6223548", "0.62130183", "0.62100637", "0.62006515", "0.6175869", "0.61735314", "0.616581", "0.61515886", "0.614226", "0.61223227", "0.6121973", "0.6090235", "0.6089613", "0.60849833", "0.60849833", "0.60841084", "0.60841084", "0.60841084", "0.60828453", "0.60828453", "0.60828453", "0.60805935", "0.60798395", "0.60769314", "0.60737383", "0.60648197", "0.60587317", "0.6045292", "0.6039892", "0.6034163", "0.6022825", "0.6022147", "0.60191447", "0.6017539", "0.6016024", "0.6008946", "0.6007557", "0.60060716", "0.60060716", "0.60060716", "0.6003628", "0.599973", "0.59893143", "0.5988885", "0.5979292", "0.5976822", "0.5975322", "0.59720373", "0.5970474", "0.59683084", "0.5959371", "0.59488744" ]
0.0
-1
Fired just before querying.
public function onQuerying(Builder $query) { if ($discount = $this->getDiscount()) { $query->where('discount_id', $discount->getId()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "abstract protected function initQuery(): void;", "function query() {\n // Do nothing: fake field.\n }", "public function _query()\n {\n }", "public function testQueryEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function pre_query() {\n $this->view->field += $this->casetracker_fields;\n unset($this->view->field['cuid']); // this could be more surgical.\n }", "public function init_save_queries()\n {\n }", "public function preRetrieve();", "public function triggerBeforeFind()\n {\n if (!$this->_beforeFindFired && $this->clause('action') === self::ACTION_READ) {\n /** @var \\Muffin\\Webservice\\Model\\Endpoint $endpoint */\n $endpoint = $this->getRepository();\n $this->_beforeFindFired = true;\n $endpoint->dispatchEvent('Model.beforeFind', [\n $this,\n new ArrayObject($this->_options),\n !$this->isEagerLoaded(),\n ]);\n }\n }", "public function beforeQuery()\n\t{\n\t\tif (!$this->checkPermissions()) {\n\t\t\treturn $this->modx->lexicon('access_denied');\n\t\t}\n\n\t\treturn true;\n\t}", "function addQuery() {}", "public function query()\n {\n }", "public function query()\n {\n }", "function onReload()\n {\n try\n {\n Transaction::open( $this->connection );\n $repository = new Repository( $this->activeRecord );\n // cria um critério de seleção de dados\n $criteria = new Criteria;\n $criteria->setProperty('order', 'id');\n \n if (isset($this->filter))\n {\n $criteria->add($this->filter);\n }\n \n // carreta os objetos que satisfazem o critério\n $objects = $repository->load($criteria);\n $this->datagrid->clear();\n if ($objects)\n {\n foreach ($objects as $object)\n {\n // adiciona o objeto na DataGrid\n $this->datagrid->addItem($object);\n }\n }\n Transaction::close();\n }\n catch (Exception $e)\n {\n new Message($e->getMessage());\n }\n }", "function query() {\n }", "public static function query()\n {\n }", "private function initQuery()\n {\n // reset\n $this->result = false;\n \n $this->errorCode = 0;\n $this->errorMessage = '';\n }", "public static function enableQueryLog()\n {\n }", "public function beforeQuery()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n\n return true;\n }", "protected function preQuery(SolariumQueryInterface $solarium_query, QueryInterface $query) {\n }", "protected function buildQueryCallback() {\n }", "public function query() {\n // Leave empty to avoid a query on this field.\n }", "public function run()\n {\n DB::disableQueryLog();\n parent::run();\n }", "public function beforeFind($query) {\n $this->query = $query['conditions']['query'];\n }", "function query() {}", "public function query() {\n if (!empty($this->value)) {\n parent::query();\n }\n }", "public function enableQueryLog()\n\t{\n\t\t$this->neoeloquent->enableQueryLog();\n\t}", "public function before($query);", "public function query()\n\t{\n\t\t\n\t}", "public function beforeSave()\n {\n if ($this->fixResultSets)\n {\n foreach ($this->fixResultSets as $property => $__)\n {\n if (isset($this->$property) && ($value = $this->$property) instanceof \\Phalcon\\Mvc\\Model\\ResultSetInterface)\n {\n unset($this->fixResultSets[$property]);\n $this->$property = $value->filter(function($r) {\n return $r;\n });\n }\n }\n }\n }", "public function triggerBeforeFind()\n {\n if (!$this->_beforeFindFired && $this->_type === 'select') {\n $table = $this->repository();\n $this->_beforeFindFired = true;\n /* @var \\Cake\\Event\\EventDispatcherInterface $table */\n $table->dispatchEvent('Model.beforeFind', [\n $this,\n new ArrayObject($this->_options),\n !$this->isEagerLoaded()\n ]);\n }\n }", "function query() {\n $this->add_additional_fields();\n }", "public function enableQueryLog()\n {\n $this->loggingQueries = true;\n }", "public function preExecute(SelectInterface $query = NULL);", "public function hook_query(&$query)\n {\n \n }", "public function hook_query(&$query)\n {\n \n }", "public function flushQuery();", "private function resetQuery() {\r\n\t\tunset($this->query);\r\n\t\t$this->query = $this->createQuery();\r\n\t\tunset($this->queryConstraints);\r\n\t\t$this->queryConstraints = array();\r\n\t}", "protected function prepareQueryForLogging(string &$query): void\n {\n }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "public function hook_query(&$query) {\n\n\t\t }", "private function before_execute()\n {\n }", "abstract public function query();", "public function prepare_query()\n {\n }", "public static function flushQueryLog()\n {\n }", "function BeforeQueryView(&$strSQL, &$strWhereClause, &$pageObject)\n{\n\n\t\t$strSQL = calendar_getDbValuesById($_REQUEST[\"editid1\"], $pageObject->connection);\n;\t\t\n}", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "public function beforeFind(EventInterface $event, Query $query, ArrayObject $options, $primary)\n\t{\n // $query->iterateClause(function($val) {\n // if($val->getField()){\n // dump($val->getField());\n // }\n \n // }); \n //dd($conds);\n // dd($query->clause('where'));\n $model = $this->_table->getAlias();\n\t $query->where([$model.'.listing_id' => \\Cake\\Core\\Configure::read('LISTING_ID')]);\n\t}", "public function check_queries() {\r\n\t\tQueryManager::check_queries();\r\n\t}", "public function __construct()\n {\n DB::enableQueryLog();\n }", "public function __construct(){\n DB::enableQueryLog();\n }", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function is_main_query()\n {\n }", "public function createQuery() {}", "public function triggerBeforeFind(): void\n {\n if (!$this->_beforeFindFired && $this->_type === 'select') {\n parent::triggerBeforeFind();\n\n $repository = $this->getRepository();\n $options = $this->getOptions();\n\n if (is_array($options) && in_array('onlyDeleted', $options, true)) {\n $aliasedField = $repository->aliasField($repository->getSoftDeleteField());\n $this->andWhere($aliasedField . ' IS NOT NULL');\n } elseif (!is_array($options) || !in_array('withDeleted', $options, true)) {\n $aliasedField = $repository->aliasField($repository->getSoftDeleteField());\n $this->andWhere($aliasedField . ' IS NULL');\n }\n\n if (\n is_array($options) && isset($options['containWithDeleted']) && is_array($options['containWithDeleted'])\n ) {\n $contains = [];\n foreach ($options['containWithDeleted'] as $alias) {\n $contains[$alias] = function (Query $aliasQuery) {\n return $aliasQuery->applyOptions(['withDeleted']);\n };\n }\n $this->contain($contains);\n }\n }\n }", "public function onExtbaseQueryFilter(ModifyQueryBeforeFetchingObjectDataEvent $e): void\n {\n $query = $e->getQuery();\n $source = $query->getSource();\n if (! $source instanceof Selector) {\n return;\n }\n \n if (! $this->visibilityAspect->includeHiddenOfTable($source->getSelectorName())) {\n return;\n }\n \n $settings = $query->getQuerySettings();\n $settings->setIgnoreEnableFields(true);\n $settings->setEnableFieldsToBeIgnored(['disabled']);\n }", "protected function afterQuery() {\n\n // Make WP_User_Query behaves like WP_Query\n if ($this->query['number'] && $this->total_users) {\n $this->max_num_pages = ceil($this->total_users / $this->query['number']);\n }\n\n foreach ($this->results as $key => $user) {\n if ($user instanceof WP_User) {\n do_action('vtcore_wordpress_pre_get_user_object', $this->results[$key]);\n }\n }\n }", "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "protected function resetQuery()\n {\n $this->bindings = [];\n $this->types = [];\n }", "function query() {\n $this->field_alias = $this->real_field;\n }", "function query() {\n $this->field_alias = $this->real_field;\n }", "public function query() {\n $this->field_alias = $this->real_field;\n }", "protected function beforeInserting()\n {\n }", "function discardQuery() {}", "public function query()\n\t{\n\t\treturn false;\n\t}", "private function initQuery()\n {\n $this->_lastSql = null;\n $this->_limit = null;\n $this->_offset = null;\n $this->_order = array();\n $this->_group = array();\n $this->_table = null;\n $this->_stmt = null;\n\n $this->fromStates = array();\n $this->selectFields = array();\n $this->whereStates = array();\n $this->havingStates = array();\n $this->values = array();\n $this->joinStates = array();\n }", "public function flushQueryLog()\n\t{\n\t\t$this->neoeloquent->flushQueryLog();\n\t}", "public function resetQuery(): void\n\t{\n\t\t$this->state = new State();\n\t\t$this->explain = FALSE;\n\t}", "protected function beforeGetData()\n {\n\n }", "protected function beforeUpdating()\n {\n }", "protected function prepareQuery($query) {}", "public function flushQueryLog()\n {\n $this->queryLog = array();\n }", "public function flushQuery()\n\t{\n\t\t$this->cur_query = \"\";\n\t}", "function set_query($query) {\n\t\t\t// it just sets the query with which to get a recordset\n\t\t\t$this->query = $query;\n\t\t}", "private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}", "public function query() {\n\n }", "public function Query() {\n \n }", "protected function resetQuery()\n {\n array_forget($this->query, ['start', 'end']);\n }", "public function query();", "public function query();", "public function query();", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public function get_query()\n {\n }", "public static function disableQueryLog()\n {\n }", "public function beforeFind(Model $model, $query) {\n parent::beforeFind($model, $query);\n }", "function OnBeforeGetDataBuildQuery($db, $format, &$mode, &$selector, &$where, &$order, &$limit){\n\t\treturn true;\n\t}", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function Query(){\n\t}", "public function get_query_log()\n {\n }" ]
[ "0.6609827", "0.6597186", "0.6559771", "0.6520574", "0.64788073", "0.6369351", "0.6236459", "0.62258685", "0.6171485", "0.61372197", "0.6119678", "0.6098182", "0.6098182", "0.60953087", "0.6070383", "0.60596144", "0.6058109", "0.60563844", "0.6048864", "0.6043183", "0.6041956", "0.6036287", "0.6012663", "0.59982115", "0.5971795", "0.59568936", "0.59367806", "0.59305626", "0.5902199", "0.5884598", "0.5883397", "0.5878692", "0.5860457", "0.58364844", "0.58273387", "0.58273387", "0.5807892", "0.5799827", "0.5790867", "0.5786081", "0.5786081", "0.5786081", "0.5786081", "0.5781792", "0.57673", "0.5759196", "0.5757576", "0.5739787", "0.5719113", "0.568659", "0.5679416", "0.5669165", "0.5661611", "0.5659424", "0.5659424", "0.5659424", "0.56593716", "0.56568646", "0.56466854", "0.56452155", "0.5635424", "0.5626367", "0.56157523", "0.56095564", "0.56095564", "0.5602905", "0.5598819", "0.55876166", "0.55702", "0.55622697", "0.5561932", "0.5552345", "0.55491024", "0.5541837", "0.55385447", "0.5537136", "0.5536365", "0.55209386", "0.5519153", "0.55121917", "0.55090654", "0.5478901", "0.5477849", "0.5477849", "0.5477849", "0.5471", "0.5471", "0.5471", "0.5471", "0.5471", "0.5471", "0.5471", "0.5471", "0.5471", "0.5466916", "0.54620504", "0.5460063", "0.5452149", "0.5452149", "0.5452149", "0.5450352" ]
0.0
-1
seta todos os atributos
public function sets(array $atributos){ foreach ($atributos as $atributo=>$valor){ switch ($atributo){ case 'senha': $this->$atributo = sha1($_POST[$atributo]); break; default: $this->$atributo = $_POST[$atributo];break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAtributos($atributos)\n {\n $this->atributos = collect($atributos)->map(function ($item) {\n return [\"atributo_id\" => $item];\n });\n }", "public function setAttributes();", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_asignatura('');\n $this->setId_situacion('');\n // la fecha debe estar antes del acta por si hay que usar la funcion inventarActa.\n $this->setF_acta('');\n $this->setActa('');\n $this->setDetalle('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setEpoca('');\n $this->setId_activ('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setTipo_acta('');\n $this->setPrimary_key($aPK);\n }", "private function setRutasVista() {\n /* variable relacionadas a un controlador especifico */\n $this->_rutas = [\n 'vista' => RUTA_MODULOS . 'vista' . DS . $this->_controlador . DS,\n 'img' => URL_MODULOS . \"vista/\" . $this->_controlador . \"/img/\",\n 'js' => URL_MODULOS . \"vista/\" . $this->_controlador . \"/js/\",\n 'css' => URL_MODULOS . \"vista/\" . $this->_controlador . \"/css/\",\n ];\n }", "abstract public function setMetas();", "public function getAtributos() {\r\n\t\t\t\r\n\t\t\t$atributos = array();\r\n\t\t\t$atributos[0] = \"nombreUnidad\";\r\n\t\t\t$atributos[1] = \"telefono\";\r\n\t\t\treturn $atributos;\r\n\t\t}", "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::role('admin', __('Yonetici'), [\n 'create',\n 'read',\n 'update',\n 'delete',\n ])->description(__('Şirket hakkındaki herşeyi yapabilir'));\n\n Jetstream::role('editor', __('İlan Yöneticisi'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Sadece ilanları yönetebilir'));\n Jetstream::role('operasyon', __('Operasyon Yöneticisi'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Sadece operasyonları yönetebilir'));\n\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setNivel_stgr('');\n $this->setDesc_nivel('');\n $this->setDesc_breve('');\n $this->setOrden('');\n $this->setPrimary_key($aPK);\n }", "public function setup()\n {\n CRUD::setModel(\\App\\Models\\Setting::class);\n CRUD::setRoute(config('backpack.base.route_prefix').'/setting');\n CRUD::setEntityNameStrings('paramètre', 'paramètres');\n\n if (User::min('id') !== backpack_user()->id) {\n CRUD::denyAccess(['delete', 'create']);\n }\n }", "function set_attrs($attrs)\n {\n foreach($attrs as $key => $value) {\n if ($key == \"meta_name\") { continue; }\n if ($key == \"vocab\") { continue; }\n if ($key == \"text\") { continue; }\n if ($key == \"lang\") { continue; }\n $this->attrs[$key] = $value; \n }\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_dl('');\n $this->setDl('');\n $this->setRegion('');\n $this->setNombre_dl('');\n $this->setGrupo_estudios('');\n $this->setRegion_stgr('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }", "private function camposObligatorios()\n {\n $this->setRequiredField(\"mascara\");\n $this->setRequiredField(\"etiqueta\");\n/*\n $this->setRequiredField(\"id_padre\");\n*/\n $this->setRequiredField(\"posicion\");\n $this->setRequiredField(\"visible\");\n $this->setRequiredField(\"nivel_acceso\");\n/*\n $this->setRequiredField(\"accion\");\n*/\n\n return;\n }", "protected function fijarAtributos(){\n \n return array(\"cod_categoria\",\"nombre\");\n \n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setF_gasto('');\n $this->setTipo('');\n $this->setCantidad('');\n $this->setPrimary_key($aPK);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_enc('');\n $this->setId_nom('');\n $this->setModo('');\n $this->setF_ini('');\n $this->setF_fin('');\n $this->setId_nom_new('');\n $this->setPrimary_key($aPK);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_activ('');\n $this->setId_asignatura('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_situacion('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setActa('');\n $this->setPrimary_key($aPK);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setId_tarifa('');\n $this->setYear('');\n $this->setCantidad('');\n $this->setObserv('');\n $this->setId_serie('');\n $this->setPrimary_key($aPK);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_situacion('');\n $this->setDescripcion('');\n $this->setSuperada('');\n $this->setBreve('');\n $this->setPrimary_key($aPK);\n }", "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_region('');\n $this->setRegion('');\n $this->setNombre_region('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }", "public function setUserAttributes();", "protected function addAtributosMetadata(ReeverAttributeMetadata $attr){\n\t\t$this->_atributosMetadata[$attr->attrName] = $attr;\n\t}", "private function savePermissions(): void\n {\n $this->client->isPayor = $this->isPayor;\n $this->client->isAgencyBankAccountSetup = $this->isAgencyBankAccountSetup;\n $this->client->canViewDocumentation = $this->canViewDocumentation;\n }", "public function setAttrs($attrs);", "public function seta_permissoes()\n\t{\n\t\tif(!$this->auth->esta_autenticado())\n\t\t{\n\t\t\tredirect(URL_PREFIX, 'location');\n\t\t}else{\n\t\t\t$n_cod_user = $this->input->post('n_cod_user');\n\t\t\t$local = $this->input->post('local');\n\t\t\t$sessao = $this->input->post('sessao');\n\t\t\t$acao = $this->input->post('acao');\n\n\t\t\t$matriz = array('n_cod_user' => $n_cod_user,\n\t\t\t\t\t\t\t'c_sessao' => $local,\n\t\t\t\t\t\t\t'c_subsessao' => $sessao,\n\t\t\t\t\t\t\t'c_acao' => $acao);\n\t\t\t$valida = $this->gph_crud->buscar(DB_PREFIX.'permissoes', 'sql', $matriz);\n\t\t\tif($valida->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$this->gph_crud->excluir(DB_PREFIX.'permissoes', $matriz);\n\t\t\t\techo '<img src=\"'.base_url('sites/admin/_images/botoes/auto_off.jpg').'\" width=\"66\" height=\"28\" />';\n\t\t\t}else{\n\t\t\t\t$this->gph_crud->adiciona(DB_PREFIX.'permissoes', $matriz);\n\t\t\t\techo '<img src=\"'.base_url('sites/admin/_images/botoes/auto_on.jpg').'\" width=\"66\" height=\"28\" />';\n\t\t\t}\n\t\t}\n\t}", "public function setModifiersFromTags(): void\n {\n $hasFinalTag = count($this->getTags('final')) > 0;\n $hasProtectedTag = count($this->getTags('protected')) > 0;\n $hasPrivateTag = count($this->getTags('private')) > 0;\n $hasPublicTag = count($this->getTags('public')) > 0;\n $hasStaticTag = count($this->getTags('static')) > 0;\n $accessTags = $this->getTags('access');\n $hasAccessTag = count($accessTags) > 0;\n $flags = $this->modifiers ?? 0;\n\n if ($hasAccessTag) {\n $accessTag = strtolower(trim(implode('', $accessTags[0])));\n if ($accessTag === 'protected') {\n $hasProtectedTag = true;\n } elseif ($accessTag === 'private') {\n $hasPrivateTag = true;\n } elseif ($accessTag === 'public') {\n $hasPublicTag = true;\n }\n }\n\n if ($hasFinalTag) {\n $flags |= self::MODIFIER_FINAL;\n }\n if ($hasProtectedTag) {\n $flags |= self::MODIFIER_PROTECTED;\n }\n if ($hasPrivateTag) {\n $flags |= self::MODIFIER_PRIVATE;\n }\n if ($hasPublicTag) {\n $flags |= self::MODIFIER_PUBLIC;\n }\n if ($hasStaticTag) {\n $flags |= self::MODIFIER_STATIC;\n }\n\n $this->setModifiers($flags);\n }", "protected function setTags()\n {\n /*todo check role and flush based on tags*/\n $this->authBasedTag();\n }", "public function setAllRoles()\n {\n Role::create(['name' => 'Member']);\n Role::create(['name' => 'Creator']);\n Role::create(['name' => 'Admin']);\n }", "public function setObjectPermissions(array $permissions): void;", "public function getAtributosP() {\r\n\t\t\t$atributos = array();\r\n\t\t\t$atributos[0] = \"nombreUnidad\";\r\n\t\t\t$atributos[1] = \"telefono\";\r\n\t\t\treturn $atributos;\r\n\t\t}", "public function setAttributes($attributes){ }", "public function acessarRelatorios(){\n\n }", "function setPrivileges() {\n $this->Session->write('Privilege.User.id', $this->Session->read('Auth.User.id'));\n foreach(Configure::read('Privilege') as $entity => $privileges) {\n foreach($privileges as $key => $privilege) {\n $key = \"Club.\".Configure::read('Club.id').\".Privilege.$entity.$key\";\n $this->Session->write($key, $this->isAuthorized($privilege));\n }\n }\n }", "public function setNameAll($name = NULL ){\n\t\t$this->nameAll = $name ? $name : \"Todo(a)s \".$this->name;\n\t}", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_documento',\n 'fk_funcionario',\n 'accion',\n 'fecha',\n 'descripcion',\n 'titulo'\n ],\n 'date' => ['fecha']\n ];\n }", "public function setTerms(){\n\t\t$this->terms = new stdClass();\n\t\tforeach (get_taxonomies() as $taxonomy ) {\n\t\t\t$this->terms->$taxonomy = $this->getTerms( $taxonomy);\n\t\t\t//$this->{'terms_'.$taxonomy} = $this->terms[$taxonomy];\n\t\t}\n\t}", "public function setAttributes()\n\t{\n\t\t$this->title \t\t= Input::get( 'title' );\n\t\t$this->description \t= Input::get( 'description' );\n\t\t$this->color \t\t= Input::get( 'color' );\n\t\t$this->type \t\t= Input::get( 'type' );\n\t\t$this->canvas_id\t= Input::get( 'canvas_id', Input::get( 'canvasId' ) );\n\t}", "function SeteoCampos(){\n\t\t// Campos que van en en detalle, deben empezar su nombre con 'C'\n\t\t$this->addField('C1', 99999,\t0, 15);\n $this->addField('C2', 99999,\t0, 15);\n $this->addField('C3', 99999,\t0, 40);\t\t\n $this->addField('C4', 99999,\t0, 65);\t\t\n $this->addField('C5', 99999,\t0, 40);\n $this->addField('C6', 99999,\t0, 25);\t\t\n $this->addField('C7', 99999,\t0, 65);\t\t\n\t\t\n\t\t$this->addField('HG1', 0,\t0,\t160);\n\t\t\t\t\n\t}", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }", "public function setTentativas($tentativas){\n\t\t\t$this->tentativas = $tentativas;\n\t\t}", "protected function setApplicationPermissions()\n\t{\n\t\t$base = $this->app['path.base'].'/';\n\t\t$app = str_replace($base, null, $this->app['path']);\n\t\t$storage = str_replace($base, null, $this->app['path.storage']);\n\t\t$public = str_replace($base, null, $this->app['path.public']);\n\n\t\t$this->setPermissions($app.'/database/production.sqlite');\n\t\t$this->setPermissions($storage);\n\t\t$this->setPermissions($public);\n\t}", "public function addMetaboxes() {}", "public function __construct($daten = array())\n{\n if ($daten) {\n foreach ($daten as $k => $v) {\n $setterName = 'set' . ucfirst($k);\n // wenn ein ungültiges Attribut übergeben wurde\n // (ohne Setter), ignoriere es\n if (method_exists($this, $setterName)) {\n $this->$setterName($v);\n }\n }\n }\n}", "protected\tfunction\tsetRelations() {}", "protected\tfunction\tsetRelations() {}", "public function setAttributes($values, $safeOnly = true){\n $params = $this->limpiarParametrosConEspacios($values);\n parent::setAttributes($params, $safeOnly);\n $this->barrio = strtolower($this->barrio);\n $this->calle = strtolower($this->calle);\n }", "public static function setters();", "public function testSetAllUserAttributes()\n {\n }", "public function _setup()\n {\n foreach($this->get_taxonomies() as $tax)\n {\n add_action(\"{$tax}_edit_form\", array($this, 'render'), 10, 2);\n }\n add_action('edit_term', array($this, 'save'), 10, 3);\n }", "protected function applyCustomSettings()\n {\n $this->disable(array('read_counter', 'edit_counter', 'deleted_at', 'version', 'creator_user_id', 'created_at'));\n \n $this['updated_at']->setMetaWidgetClassName('ullMetaWidgetDate');\n \n //configure subject\n $this['subject']\n ->setLabel('Subject')\n ->setWidgetAttribute('size', 50)\n ->setMetaWidgetClassName('ullMetaWidgetLink');\n \n //configure body\n $this['body']\n ->setMetaWidgetClassName('ullMetaWidgetFCKEditor')\n ->setLabel('Text');\n \n // configure access level\n $this['ull_wiki_access_level_id']->setLabel(__('Access level', null, 'ullWikiMessages'));\n \n $this['is_outdated']->setLabel(__('Is outdated', null, 'ullWikiMessages'));\n \n // configure tags\n $this['duplicate_tags_for_search']\n ->setLabel('Tags')\n ->setMetaWidgetClassName('ullMetaWidgetTaggable');\n \n if ($this->isCreateOrEditAction())\n {\n $this->disable(array('id', 'updator_user_id', 'updated_at'));\n } \n\n if ($this->isListAction())\n {\n $this->disableAllExcept(array('id', 'subject'));\n $this->enable(array('updator_user_id', 'updated_at'));\n } \n }", "public function edit(){\n $carros = array();\n\n $nomes[] = 'Astra';\n $nomes[] = 'Caravan';\n $nomes[] = 'Ipanema';\n $nomes[] = 'Kadett';\n $nomes[] = 'Monza';\n $nomes[] = 'Opala';\n $nomes[] = 'Veraneio';\n\n $this->set('carros',$nomes);\n }", "public function testUpdatePermissionSet()\n {\n }", "protected function setTags()\n {\n $this->authBasedTag();\n $this->nameBasedTag($this->relatedEntities);\n }", "public function setAcl()\n {\n Zend_Registry::set('acl',$this->acl);\n }", "protected function asignarCamposRelacionales() {\n foreach($this->campos as $nombre=>$campo) {\n if($campo->tipo!='relacional'||($campo->relacion!='1:1'&&$campo->relacion!='1:0')) continue;\n $columna=$campo->columna;\n if(is_object($this->consultaValores->$nombre)) {\n //Asignado como entidad u objeto anónimo\n $this->consultaValores->$columna=$this->consultaValores->$nombre->id;\n } elseif(is_array($this->consultaValores->$nombre)) {\n //Asignado como array\n $this->consultaValores->$columna=$this->consultaValores->$nombre['id'];\n }\n }\n }", "public function setIntentos($intentos){\n $this->intentos = $intentos;\n }", "public function run()\n {\n Permission::create([\n \t'name'\t\t\t=>\t'Inventario',\n \t'slug'\t\t\t=>\t'inventario.read',\n \t'description'\t=>\t'Listar y navegar inventario del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Inventario',\n 'slug' => 'inventario.edit',\n 'description' => 'Edita inventario del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Configuracion',\n \t'slug'\t\t\t=>\t'configuracion.read',\n \t'description'\t=>\t'Listar y navegar configuracion del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Configuracion',\n 'slug' => 'configuracion.edit',\n 'description' => 'Edita configuracion del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Avanzado',\n \t'slug'\t\t\t=>\t'avanzado.read',\n \t'description'\t=>\t'Listar y navegar avanzado del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Avanzado',\n 'slug' => 'avanzado.edit',\n 'description' => 'Edita avanzado del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Ventas',\n \t'slug'\t\t\t=>\t'ventas.read',\n \t'description'\t=>\t'Listar y navegar ventas del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Ventas',\n 'slug' => 'ventas.edit',\n 'description' => 'Edita ventas del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Clientes',\n \t'slug'\t\t\t=>\t'clientes.read',\n \t'description'\t=>\t'Listar y navegar clientes del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Clientes',\n 'slug' => 'clientes.edit',\n 'description' => 'Edita clientes del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Compras',\n \t'slug'\t\t\t=>\t'compras.read',\n \t'description'\t=>\t'Listar y navegar compras del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Compras',\n 'slug' => 'compras.edit',\n 'description' => 'Edita compras del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Pedidos',\n \t'slug'\t\t\t=>\t'pedidos.read',\n \t'description'\t=>\t'Listar y navegar pedidos del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Pedidos',\n 'slug' => 'pedidos.edit',\n 'description' => 'Edita pedidos del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Mesas',\n \t'slug'\t\t\t=>\t'mesas.read',\n \t'description'\t=>\t'Listar y navegar mesas del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Mesas',\n 'slug' => 'mesas.edit',\n 'description' => 'Edita mesas del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Reportes',\n \t'slug'\t\t\t=>\t'reportes.read',\n \t'description'\t=>\t'Listar y navegar reportes del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Reportes',\n 'slug' => 'reportes.edit',\n 'description' => 'Edita reportes del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Cortes',\n \t'slug'\t\t\t=>\t'cortes.read',\n \t'description'\t=>\t'Listar y navegar cortes del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Cortes',\n 'slug' => 'cortes.edit',\n 'description' => 'Edita cortes del sistema',\n ]);\n Permission::create([\n \t'name'\t\t\t=>\t'Cobros',\n \t'slug'\t\t\t=>\t'cobros.read',\n \t'description'\t=>\t'Listar y navegar cobros del sistema',\n ]);\n //EDIT\n Permission::create([\n 'name' => 'Cobros',\n 'slug' => 'cobros.edit',\n 'description' => 'Edita cobros del sistema',\n ]);\n }", "public function setPermissions($permissions) {}", "function getSettori() {\n\t\treturn ModelFactory::lista('Settore', $this->soc->getIDSettori());\n\t}", "public function set_view_contato_anunciante(View_Contato_Anunciante $view_contato_anunciante) : void\r\n {\r\n self::$view_contato_anunciante = $view_contato_anunciante;\r\n }", "public function addOwners(): void\n {\n foreach ($this->attributes as $attributeName) {\n $this->linkModelWithOwner($attributeName, $this->owner->{$attributeName});\n }\n }", "public static function alumnos()\n\t{\n\t\tthrow new Exception('No implementado aun ');\n\t}", "private function setTrees()\n {\n if (empty($this->generator->types[CustomsInterface::CUSTOM_TYPES_TREES][ApiInterface::RAML_PROPS]) === false) {\n foreach ($this->generator->types[CustomsInterface::CUSTOM_TYPES_TREES][ApiInterface::RAML_PROPS] as $propKey => $propVal) {\n if (is_array($propVal) && empty($this->generator->types[ucfirst($propKey)]) === false) {\n // ensure that there is a type of propKey ex.: Menu with parent_id field set\n $this->openEntity(ConfigInterface::TREES);\n $this->setParamDefault($propKey, $propVal[ApiInterface::RAML_KEY_DEFAULT]);\n $this->closeEntities();\n }\n }\n }\n }", "public function setRole() {\n\n $res= $_POST['link']->query(\"SELECT t2.perm_name FROM role_perm as t1\n JOIN permissions as t2 ON t1.perm_id = t2.perm_id\n WHERE t1.role_id = $this->rol_id\");\n\n\n foreach($res as $item)\n $this->role_perm[]= $item['perm_name'];\n }", "public function attributes();", "public function setAttributes(array $attributes);", "public function setAttributes(array $attributes);", "public function setAttributes(array $attributes);", "public function setPrivilages()\n {\n // $this->acl->allow('guest',null, array('view', 'index'));\n // $this->acl->allow('editor',array('view','edit'));\n // $this->acl->allow('admin');\n \n // Setting privilages for actions as per particular controller\n // $this->acl->allow('<role>','<controller>', <array of controller actions>);\n // You can also fetch it from DB.\n \n// // $this->acl->deny('guest','news', 'index');\n// $this->acl->allow('guest','news', array( 'demo1', 'view', 'index'));\n// $this->acl->allow('guest','job-board', array('index'));\n//\n// $this->acl->allow('editor','news', array( 'edit', 'view', 'index')); \n// $this->acl->allow('editor','job-board', array('edit', 'index'));\n//\n// $this->acl->allow('admin');\n //$this->acl->allow('guest');\n //Guest ACL\n $this->acl->deny('guest',array('user','shop','admin'));\n $this->acl->allow('guest','index');\n \n //User ACL\n $this->acl->deny('user',array('shop','admin'));\n $this->acl->allow('user','user');\n $this->acl->allow('user','index',array('logout','notfound'));\n \n \n // Shop ACL\n $this->acl->deny('shop',array('user','admin'));\n $this->acl->allow('shop',array('index','shop'));\n \n //Admin ACL\n //$this->acl->deny('admin',array('user','shop'));\n //$this->acl->allow('admin',array('index','admin'));\n $this->acl->allow('admin');\n // Note that the actions which are not mentioned above i.e. inside array of\n // controller-action - becomes access-denied automatically\n // as in above example, news controller also have one more action demo2,\n // but demo2 is not mentioned in above allow actions, so \n // when guest tries to access the action - demo2, it would not show the \n // content of demo2, rather It would show content of error/index.phtml\n }", "function setLinks($links) \r\n {\r\n\r\n $this->activity_list->setLinks($links); \r\n \t\t \r\n// \t\t echo print_r($this->linkValues,true);\t \r\n \t parent::setLinks($links);\r\n \r\n }", "function set_items() { \n\n\t\t$this->items = $this->get_items();\n\n\t}", "public function actionSetKeys()\n {\n $this->setKeys($this->generateKeysPaths);\n }", "public function setAttributes($attributes);", "public function setRelations() {}", "public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}", "public function setPrejuizos_Acumulados($object){\n\t\tif($object->getrelacao_cr_db()->getCr() == '2.3.3.02') {\n\t\t\t$this->Prejuizos_Acumulados -= $object->getvalor();\n\t\t}\n\t\t\n\t\t// Debita no prejuizos acumulados.\n\t\tif($object->getrelacao_cr_db()->getDb() == '2.3.3.02') {\n\t\t\t$this->Prejuizos_Acumulados += $object->getvalor();\n\t\t}\n\t}", "public function setIcons() {\n\t\t$this->icons = array(\n\t\t\t'slider' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'carousel' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'testimonial' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'portfolio' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'options' => 'dashicons-admin-generic'\n\t\t);\n\t}", "public function set_atts($where)\n {\n //select vis_name, and both database names that contain the unique uri. Return as one array.\n $data = $this->db->get_where('user_visualisation', $where)->row_array();\n //set the left and right attributes using the data just selected from the database...\n $left = array_merge($this->db->list_fields($data['db_one']), $this->db->list_fields($data['db_two']));\n $right = array('att_one' => $data['att_one'], 'att_two' => $data['att_two'], 'att_three' => $data['att_three']);\n return array('content' => $data, 'attributes' => array_diff($left, $right), 'set_attributes' => $right);\n }", "private function setEditors($ids,$log=false){\n \t$editorPermission = $this->getEditorPermission();\n \tforeach ($ids as $id)\n \t\tNewDao::getInstance()->insert('user_permissions',array('user_id'=>$id,'permission_id'=>$editorPermission),$log);\n }", "protected function registerTCAIcons() {}", "public function setTableNames() {\n $caseFormat = $this->settingsAll['Model'][self::$meta_model]['tablecaseformat'];\n $aliasFormat = $this->settingsAll['Model'][self::$meta_model]['tablealiasformat'];\n foreach ($this->settingsAll as $k => $v) {\n # do not process __meta\n if (in_array($k, array(self::$meta))) {\n continue;\n }\n $tableName = $this->getRealTableName($caseFormat, $k);\n # settingsAll.k.this->meta.tablename\n # - genTable responsible for having tableName set\n $custom_set = null;\n if (isset($this->settingsAll[$k][self::$meta]['tablename'])) {\n $custom_set = $this->settingsAll[$k][self::$meta]['tablename'];\n }\n $this->log(\"setTableNames / style: {$caseFormat} / k: {$k} / tableName: {$tableName} / custom-set: \" . $custom_set);\n # set correct tablename as defined in schema, but do not override individual defaults\n if (!isset($this->settingsAll[$k][self::$meta]['tablename'])) {\n $this->settingsAll[$k][self::$meta]['tablename'] = $tableName;\n }\n # ALIAS\n $this->settingsAll[$k][self::$meta]['alias'] = $this->getTableAlias($aliasFormat, $k);\n }\n }", "function set_deputados() {\n\n\t\ttry {\n\n\t\t\t$dadosAbertosClient = new dadosAbertosClient;\n\n\t\t\t// legislatura de valor 18 foi definida pois eh o periodo onde estao os deputados vigentes no ano de 2017\n\t\t\t$listaDeputados = $dadosAbertosClient->listaDeputadosPorLegislatura(18);\n\n\t\t\tforeach ($listaDeputados as $deputado) {\n\n\t\t\t\t$deputado = Deputado::findByIdDeputado($deputado['id']);\t\n\n\t\t\t\tif($deputado)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$deputadoData = [\n\t\t\t\t\t'id_deputado' => $deputado->id,\n\t\t\t\t\t'nome' => $deputado->nome,\n\t\t\t\t\t'partido' => $deputado->partido,\n\t\t\t\t\t'tag_localizacao' => $deputado->tagLocalizacao\n\t\t\t\t];\n\n\t\t\t\tDeputado::create($deputadoData);\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t}", "public function setPermissions()\n\t{\n\t\treturn [\n\t\t\t'product.create',\n\t\t 'issue.create',\n\t\t 'issue.edit'\n\t\t];\n\t}", "private function setDefaults()\n {\n $defaults = config('sevDeskApi.defaults.'.lcfirst($this->objectName));\n\n foreach($defaults as $attribute => $defaultValue)\n {\n if (!isset($this->$attribute))\n $this->$attribute = $defaultValue;\n }\n }", "protected function editar()\n {\n }", "public function configureMenuItems(): iterable\n {\n yield MenuItem::linkToCrud('Пользователи', 'fas fa-users', User::class);\n yield MenuItem::linkToCrud('Отчеты', 'fas fa-file', Report::class)\n ->setDefaultSort(['createdAt' => 'DESC'])\n ;\n yield MenuItem::linkToCrud('Рассматриваемые объекты', 'fas fa-eye', ObjectInQuestion::class)\n ->setDefaultSort(['id' => 'DESC'])\n ;\n yield MenuItem::linkToCrud('Веб-ресурсы', 'fas fa-globe', Resource::class);\n yield MenuItem::linkToCrud('Модели', 'fas fa-object-ungroup', Model::class);\n }", "public function setAttrs($attrs) {\n\t\t$this->attrs = $attrs;\n\t}", "public function setPermissions() {\r\n\t\tif ($this->canSave) {\r\n\t\t\t$this->canSave = $this->resource->checkPolicy('save');\r\n\t\t}\r\n\t\t$this->canEdit = $this->modx->hasPermission('edit_document');\r\n\t\t$this->canCreate = $this->modx->hasPermission('new_document');\r\n\t\t$this->canPublish = $this->modx->hasPermission('publish_document');\r\n\t\t$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));\r\n\t\t$this->canDuplicate = $this->resource->checkPolicy('save');\r\n\t}", "public function setup()\n {\n CRUD::setModel(\\App\\Models\\About::class);\n CRUD::setRoute(config('backpack.base.route_prefix') . '/about');\n CRUD::setEntityNameStrings('запись', 'О нас');\n }", "private function registerUsableFields(): void\n {\n $this->attributeList = $this->filterSystemControlFields(\n \\get_object_vars($this)\n );\n }", "public function passaAtributo(){\n\t\t$this->seletor = 0; // Por algum motivo que não quero investigar, a condicional for nñao está se comportando como eu esperava. Por isso estou usando while\n\t\t$this->alvo = file_get_contents($this->alvo);\n\t\t\twhile ($this->seletor < $this->atributos) { \n\n\t\t\t\t\t\t\t\t$dom = new DOMDocument();\n\t\t\t\t\t\t\t\t$dom->loadHTMLFile($this->modelo);\n\t\t\t\t\t\t\t\t$controle = 0; // Variável de controle\n\t\t\t\t\t\t\t\t// Consultando os links\n\t\t\t\t\t\t\t\t$links = $dom->getElementsByTagName($this->valores[$this->seletor]); // Seleione a tag de pesquisa atual\n\t\t\t\t\t\t\t\tforeach ($links as $link) {\n\t\t\t\t\t\t\t\t\t\t\t\tif ($controle == 0) { // Pega primeiro valor da class e assume como padrão (uma por tag)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->tag = $this->valores[$this->seletor];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->class = $link->getAttribute('class'); // Retorna tag do HTML com a nova class\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->alvo = str_replace(\"<$this->tag\", \"<$this->tag class='$this->class' \", $this->alvo);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$controle++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t/*echo \"<p>Executando...\".$this->valores[$this->seletor].\"\"; */\n\t\t\t\t$this->seletor++;\n\t\t\t}\n\t\t\techo \"<p>\".$this->alvo;\n\n\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}", "function activate()\n {\n $aData = array( 'SIZE_AVATAR' => 50,\n 'NUMERO_POST' => 5 );\n\n // Comprobamos si existe opciones para este Widget, si no existe las creamos por el contrario actualizamos\n if( ! get_option( 'ultimosPostPorAutor' ) )\n add_option( 'ultimosPostPorAutor' , $aData );\n else\n update_option( 'ultimosPostPorAutor' , $data);\n }", "public function registerSettings()\n\t\t{\n\t\t\tforeach($this->options as $id => $options) {\n\t\t\t\tregister_setting('thingdom-options', $this->tag.$id);\n\t\t\t}\n\t\t}", "private function setButtons()\n {\n $this->createFolderButton = config('godesk.filemanager.buttons.create_folder', true);\n $this->uploadButton = config('godesk.filemanager.buttons.upload_button', true);\n $this->dragAndDropUpload = config('godesk.filemanager.buttons.upload_drag', true);\n $this->renameFolderButton = config('godesk.filemanager.buttons.rename_folder', true);\n $this->deleteFolderButton = config('godesk.filemanager.buttons.delete_folder', true);\n $this->renameFileButton = config('godesk.filemanager.buttons.rename_file', true);\n $this->deleteFileButton = config('godesk.filemanager.buttons.delete_file', true);\n $this->downloadFileButton = config('godesk.filemanager.buttons.download_file', true);\n }", "private function setResources() {\r\n\t\t/*\r\n\t\t$dir = new DirectoryIterator(APPLICATION_PATH . '/controllers');\r\n\t\tforeach ($dir as $file) {\r\n\t\t\tif ($file->isDir() || $file->isDot()) continue;\r\n\t\t\t$file = $file->getFileName();\r\n\t\t\t$pos = strpos($file, 'Controller');\r\n\t\t\tif ($pos === false) continue;\r\n\t\t\t$this->getAcl()->add(new Zend_Acl_Resource(strtolower(substr($file, 0, $pos))));\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t//add tabs as resources\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Dashboard'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Welcome'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Inspections'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Building Owners'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('My Company'));\t\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Buildings'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Inspection Companies'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('<i>Online</i> <b>DOOR</b>DATA'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('System Settings'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Log Out'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('User Files'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('Help'));\r\n\t\t\r\n\t\t//add grids as resources\r\n\t\t\r\n\t\t/*Building Owners tab */\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('company_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('company_buildings_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('company_employees_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('company_inspections_grid'));\r\n\t\t\r\n\t\t\r\n\t\t/*Inspection tab */\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('inspection_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('inspection_inspects_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('inspection_door_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('hardware_grid', 'inspection_door_grid')); //###\r\n\r\n\t\t/*Buildings tab */\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('building_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('building_inspection_grid'));\r\n\t\t\r\n\t\t/*Systems Settings tab */\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('dictionary_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('users_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('user_roles_grid'));\r\n\t\t\r\n\t\t/*Inspection Company grid*/\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('inspection_company_grid'));\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('emp_grid'));\r\n\t\t\r\n\t\t/*User File grid*/\r\n\t\t$this->getAcl()->add(new Zend_Acl_Resource('user_file_grid'));\r\n\r\n\t}", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "public function set_atletas_codigo($atletas_codigo) {\n $this->atletas_codigo = $atletas_codigo;\n }", "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::role('admin', __('Administrator'), [\n 'create',\n 'read',\n 'update',\n 'delete',\n ])->description(__('Administrator users can perform any action.'));\n\n Jetstream::role('editor', __('Editor'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Editor users have the ability to read, create, and update.'));\n }", "public function configureMenuItems(): iterable\n {\n yield MenuItem::section('My informations', 'fa fa-info');\n yield MenuItem::linkToCrud('Profile', 'fas fa-user', User::class)->setAction(Action::DETAIL)->setEntityId($this->getUser()->getId());\n yield MenuItem::linkToCrud('Your Restaurants', 'fas fa-utensils', Restaurant::class);\n yield MenuItem::section('');\n yield MenuItem::linkToRoute('Back to site', 'fas fa-undo', 'homepage');\n }" ]
[ "0.69275504", "0.62879723", "0.58324474", "0.56806564", "0.5678256", "0.5557661", "0.5530896", "0.5518108", "0.55104375", "0.5472165", "0.5460451", "0.54436713", "0.5439721", "0.5411758", "0.540787", "0.53992563", "0.53980637", "0.5364945", "0.5364144", "0.5338474", "0.52698827", "0.5225339", "0.5223222", "0.51659465", "0.51570493", "0.51315516", "0.5093041", "0.5082258", "0.5081324", "0.50700366", "0.50666463", "0.50641894", "0.50640243", "0.5051036", "0.50462866", "0.5036934", "0.50334984", "0.50316995", "0.50271595", "0.49820673", "0.4975199", "0.49666375", "0.49627316", "0.4939882", "0.4939882", "0.4936387", "0.49331975", "0.4929217", "0.49253094", "0.49210486", "0.4920497", "0.49091938", "0.48964328", "0.4894286", "0.48866645", "0.48861814", "0.48844418", "0.48698562", "0.48681667", "0.48530287", "0.48466226", "0.48376542", "0.48340866", "0.48325655", "0.48221892", "0.4812506", "0.4812506", "0.4812506", "0.4808074", "0.48002076", "0.4799158", "0.4798141", "0.47980264", "0.4794871", "0.47935903", "0.47922078", "0.47855395", "0.47802988", "0.47751197", "0.47746915", "0.47727576", "0.4753338", "0.47504154", "0.4748661", "0.47452205", "0.4735489", "0.4735399", "0.47286648", "0.47282675", "0.47218555", "0.47183123", "0.471186", "0.47059837", "0.4704791", "0.47038528", "0.4701008", "0.47005412", "0.46942613", "0.46924284", "0.46803147" ]
0.5738588
3
/ This is a code that prints a minileaguetable such as team1 9 team4 8 team9 8 team2 4 FEEL FREE TO MODIFY!! / Module: Tplleaguestats Author: Mithrandir/TPL Design Licence: GNU
function b_minitable_show( ) { global $xoopsDB; $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname('cricketstats'); //Get config for News module $config_handler =& xoops_gethandler('config'); if ($module) { $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); } //Season id $sql = "SELECT SeasonID, SeasonName FROM ".$xoopsDB->prefix("cricket_seasonnames")." WHERE SeasonDefault=1"; $cricket_seasonname = $xoopsDB->query($sql); $cricket_seasonname = $xoopsDB->fetchArray($cricket_seasonname); $cricket_season_id = $cricket_seasonname['SeasonID']; $cricket_seasonname = $cricket_seasonname['SeasonName']; //League id $sql2 = "SELECT LeagueID, LeagueName FROM ".$xoopsDB->prefix("cricket_leaguenames")." WHERE LeagueDefault=1"; $cricket_leaguename = $xoopsDB->query($sql2); $cricket_leaguename = $xoopsDB->fetchArray($cricket_leaguename); $cricket_league_id = $cricket_leaguename['LeagueID']; $cricket_leaguename = $cricket_leaguename['LeagueName']; //For win, draw and lost? $cricket_for_win = $moduleConfig['forwin']; $cricket_for_draw = $moduleConfig['fordraw']; $cricket_for_lose = $moduleConfig['forloss']; //Query to get teams from selected season & league $cricket_get_teams = $xoopsDB->query("SELECT DISTINCT O.OpponentName AS name, O.OpponentID AS id FROM ".$xoopsDB->prefix("cricket_opponents")." O, ".$xoopsDB->prefix("cricket_leaguematches")." LM WHERE LM.LeagueMatchSeasonID = '$cricket_season_id' AND LM.LeagueMatchLeagueID = '$cricket_league_id' AND (O.OpponentID = LM.LeagueMatchHomeID OR O.OpponentID = LM.LeagueMatchAwayID) ORDER BY name"); //Lets read teams into the table $i = 0; while($cricket_data = $xoopsDB->fetchArray($cricket_get_teams)) { $team[$cricket_data['id']]['name'] = $cricket_data['name']; $team[$cricket_data['id']]['homewins'] = 0; $team[$cricket_data['id']]['awaywins'] = 0; $team[$cricket_data['id']]['homeloss'] = 0; $team[$cricket_data['id']]['awayloss'] = 0; $team[$cricket_data['id']]['hometie'] = 0; $team[$cricket_data['id']]['awaytie'] = 0; $team[$cricket_data['id']]['homerunsfor'] = 0; $team[$cricket_data['id']]['homerunsagainst'] = 0; $team[$cricket_data['id']]['awayrunsfor'] = 0; $team[$cricket_data['id']]['awayrunsagainst'] = 0; $team[$cricket_data['id']]['matches'] = 0; } //Match data $query = $xoopsDB->query("SELECT LM.LeagueMatchID AS mid, LM.LeagueMatchHomeID as homeid, LM.LeagueMatchAwayID as awayid, LM.LeagueMatchHomeRuns as homeruns, LM.LeagueMatchAwayRuns as awayruns FROM ".$xoopsDB->prefix("cricket_leaguematches")." LM WHERE LM.LeagueMatchSeasonID = '$cricket_season_id' AND LM.LeagueMatchLeagueID = '$cricket_league_id' AND LM.LeagueMatchHomeRuns IS NOT NULL"); while ($cricket_matchdata = $xoopsDB->fetchArray($query)) { $cricket_hometeam = $cricket_matchdata['homeid']; $cricket_awayteam = $cricket_matchdata['awayid']; $team[$cricket_hometeam]['matches'] = $team[$cricket_hometeam]['matches'] + 1; $team[$cricket_awayteam]['matches'] = $team[$cricket_awayteam]['matches'] + 1; $team[$cricket_hometeam]['homerunsfor'] = $team[$cricket_hometeam]['homerunsfor'] + $cricket_matchdata['homeruns']; $team[$cricket_awayteam]['awayrunsagainst'] = $team[$cricket_awayteam]['awayrunsagainst'] + $cricket_matchdata['homeruns']; $team[$cricket_awayteam]['awayrunsfor'] = $team[$cricket_awayteam]['awayrunsfor'] + $cricket_matchdata['awayruns']; $team[$cricket_hometeam]['homerunsagainst'] = $team[$cricket_hometeam]['homerunsagainst'] + $cricket_matchdata['awayruns']; $rundiff = $cricket_matchdata['homeruns'] - $cricket_matchdata['awayruns']; if ($rundiff > 0) { $team[$cricket_hometeam]['homewins'] = $team[$cricket_hometeam]['homewins'] + 1; $team[$cricket_awayteam]['awayloss'] = $team[$cricket_awayteam]['awayloss'] + 1; } elseif ($rundiff == 0) { $team[$cricket_hometeam]['hometie'] = $team[$cricket_hometeam]['hometie'] + 1; $team[$cricket_awayteam]['awaytie'] = $team[$cricket_awayteam]['awaytie'] + 1; } elseif ($rundiff < 0) { $team[$cricket_hometeam]['homeloss'] = $team[$cricket_hometeam]['homeloss'] + 1; $team[$cricket_awayteam]['awaywins'] = $team[$cricket_awayteam]['awaywins'] + 1; } } $cricket_get_deduct = $xoopsDB->query("SELECT points, teamid FROM ".$xoopsDB->prefix("cricket_deductedpoints")." WHERE seasonid = '$cricket_season_id' AND leagueid = '$cricket_league_id'"); while ($cricket_d_points = $xoopsDB->fetchArray($cricket_get_deduct)) { $team[$cricket_d_points["teamid"]]['d_points'] = $cricket_d_points['points']; } foreach ($team as $teamid => $thisteam) { $temp_points = isset($thisteam['d_points']) ? $thisteam['d_points'] : 0; $cricket_points[$teamid] = ($thisteam['homewins'] * $cricket_for_win) + ($thisteam['awaywins'] * $cricket_for_win) + ($thisteam['hometie'] * $cricket_for_draw) + ($thisteam['awaytie'] * $cricket_for_draw) + $temp_points; $cricket_runsfor[$teamid] = $thisteam['homerunsfor'] + $thisteam['awayrunsfor']; $cricket_runsagainst[$teamid] = $thisteam['homerunsagainst'] + $thisteam['awayrunsagainst']; } array_multisort($cricket_points, SORT_NUMERIC, SORT_DESC, $cricket_runsfor, SORT_NUMERIC, SORT_DESC, $cricket_runsagainst, SORT_NUMERIC, SORT_DESC, $team, SORT_STRING, SORT_ASC); //Print the table $block['title'] = _BL_CRICK_MINITABLE; $block['content'] = "<table width='100%' cellspacing='2' cellpadding='2' border='0'> <tr> <td width='50%' align='left'><span style='font-size: 10px; font-weight: bold;'><u>"._BL_CRICK_TEAM."</u></span></td> <td width='15%' align='center'><span style='font-size: 10px; font-weight: bold;'><u>"._BL_CRICK_POINTS."</u></span></td> <td width='35%' align='center'><span style='font-size: 10px; font-weight: bold;'><u>"._BL_CRICK_RUNS."</u></span></td> </tr></table><marquee behavior='scroll' direction='up' width='100%' height='100' scrollamount='1' scrolldelay='60' onmouseover='this.stop()' onmouseout='this.start()'><table width='100%' cellspacing='2' cellpadding='2' border='0'>"; foreach ($team as $teamid => $thisteam) { $block['content'] .= "<tr> <td width='50%' align='left'><span style='font-size: 10px; font-weight: normal;'>".$thisteam['name']."</span></td> <td width='15%' align='center'><span style='font-size: 10px; font-weight: normal;'>".$cricket_points[$teamid]."</span></td> <td width='35%' align='center'><span style='font-size: 10px; font-weight: normal;'>".$cricket_runsfor[$teamid]."-".$cricket_runsagainst[$teamid]."</span></td> </tr>"; } $block['content'] .= "</table><br><div align=\"center\"><a href=\"".XOOPS_URL."/modules/cricketstats/index.php\">"._BL_CRICK_GOTOMAIN."</a></div></marquee>"; return $block; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPlayinTeams(){\n return array(\n //winner to [25]\n array('name'=>'UCLA','elo'=>1542,'off'=>114.1,'def'=>96.8,'tempo'=>64.7),\n array('name'=>'Michigan State','elo'=>1596,'off'=>107.7,'def'=>92.2,'tempo'=>68.6),\n //winner to [17]\n array('name'=>'Texas Southern','elo'=>1395,'off'=>99.7,'def'=>104.3,'tempo'=>72.0),\n array('name'=>'Mt. St Marys','elo'=>1278,'off'=>96.1,'def'=>99.7,'tempo'=>62.2),\n //winner to [9]\n array('name'=>'Drake','elo'=>1540,'off'=>114.6,'def'=>98.6,'tempo'=>66.8),\n array('name'=>'Wichita State','elo'=>1592,'off'=>110.7,'def'=>97.7,'tempo'=>67.6),\n //winner to [1]\n array('name'=>'Appalachian State','elo'=>1378,'off'=>100.1,'def'=>103.0,'tempo'=>65.7),\n array('name'=>'Norfolk St','elo'=>1310,'off'=>101.3,'def'=>103.6,'tempo'=>67.7),\n );\n}", "public function getKillsLeaderboard() : string {\n\t\t$array = [];\n\t\tfor ($i=0;$i<count($this->playerdata->getAll());$i++) {\n\t\t\t$b = $this->playerdata->getAll(true)[$i];\n\t\t\tif (empty($this->playerdata->get($b)[\"kills\"])) continue;\n\t\t\t$array[$this->playerdata->getAll(true)[$i]] = $this->playerdata->get($b)[\"kills\"];\n\t\t}\n\t\tarsort($array);\n\t\t$string = \"§eTop Kills Overall.\\n\";\n\t\t$num = 1;\n\t\tforeach($array as $name => $kills) {\n\t\t\tif ($num > 10) break;\n\t\t\t$string .= \"§7{$num}§e. {$name}§7: §6{$kills}\\n\";\n\t\t\t$num++;\n\t\t}\n\t\treturn $string;\n\t}", "function display_player_stats($res) {\n\n echo '<br><div class=\"stat-sheet\"><h3>Regular Season Stats</h3><br>';\n\n // Table header:\n echo '<table class=\"player-tbl\" cellspacing=\"5\" cellpadding=\"5\"\n width=\"75%\">\n\t<tr class=\"player-stat-heading\">\n\t\t<td align=\"left\"><b>Year</b></td>\n\t\t<td align=\"left\"><b>Team</b></td>\n\t\t<td align=\"left\"><b>Lg</b></td>\n\t\t<td align=\"left\"><b>G</b></td>\n\t\t<td align=\"left\"><b>Min</b></td>\n\t\t<td align=\"left\"><b>Pts</b></td>\n\t\t<td align=\"left\"><b>PPG</b></td>\n\t\t<td align=\"left\"><b>FGM</b></td>\n\t\t<td align=\"left\"><b>FGA</b></td>\n\t\t<td align=\"left\"><b>FGP</b></td>\n\t\t<td align=\"left\"><b>FTM</b></td>\n\t\t<td align=\"left\"><b>FTA</b></td>\n\t\t<td align=\"left\"><b>FTP</b></td>\n\t\t<td align=\"left\"><b>3PM</b></td>\n\t\t<td align=\"left\"><b>3PA</b></td>\n\t\t<td align=\"left\"><b>3PP</b></td>\n\t\t<td align=\"left\"><b>ORB</b></td>\n\t\t<td align=\"left\"><b>DRB</b></td>\n\t\t<td align=\"left\"><b>TRB</b></td>\n\t\t<td align=\"left\"><b>RPG</b></td>\n\t\t<td align=\"left\"><b>AST</b></td>\n\t\t<td align=\"left\"><b>APG</b></td>\n\t\t<td align=\"left\"><b>STL</b></td>\n\t\t<td align=\"left\"><b>BLK</b></td>\n\t\t<td align=\"left\"><b>TO</b></td>\n\t\t<td align=\"left\"><b>PF</b></td>\n\t</tr>\n';\n\n // Fetch and print all the records:\n while ($row = mysqli_fetch_array($res, MYSQLI_ASSOC)) {\n echo '<tr class=\"player-stat\">\n\t\t\t<td align=\"left\">' . $row['year'] . '</td>\n\t\t\t<td align=\"left\">' . $row['team'] . '</td>\n\t\t\t<td align=\"left\">' . $row['lg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['g'] . '</td>\n\t\t\t<td align=\"left\">' . $row['min'] . '</td>\n\t\t\t<td align=\"left\">' . $row['pts'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ppg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fgm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fga'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fgp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ftm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fta'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ftp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpa'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['orb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['drb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['trb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['rpg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ast'] . '</td>\n\t\t\t<td align=\"left\">' . $row['apg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['stl'] . '</td>\n\t\t\t<td align=\"left\">' . $row['blk'] . '</td>\n\t\t\t<td align=\"left\">' . $row['turnover'] . '</td>\n\t\t\t<td align=\"left\">' . $row['pf'] . '</td>\n\t\t</tr>\n\t\t';\n }\n\n echo '</table></div>';\n\n}", "function make_table($matches,$teams,$last_schedule){\n\t\t\n\t\t$table=array();\n\n\t\tforeach($teams as $row){\n\t\t\t$table[$row->id]=array('id'=>$row->id,'name'=>$row->name,'section'=>$row->section);\n\t\t\t$table[$row->id]['points']=0;\n \t\t$table[$row->id]['pj']=0;\n \t\t$table[$row->id]['pg']=0;\n \t\t$table[$row->id]['pe']=0;\n \t\t$table[$row->id]['pp']=0;\n \t\t$table[$row->id]['gf']=0;\n \t\t$table[$row->id]['gc']=0;\n \t\t$table[$row->id]['gd']=0;\n \t\t$table[$row->id]['change']=1;\n \t\t$table[$row->id]['updown']=0;\n\t\t}\n\t\t$table_ant=$table;\n\t\n\t\tforeach($matches as $row){\n\t\t\t$home=false;\n\t\t\t$away=false;\n\t\t\t$result=trim($row->result);\n \t\t$h=(int)trim(substr($result,0,1));\n \t\t$a=(int)trim(substr($result,3));\n\t\t\t\n \t\tif(isset($table[$row->home])){\n \t\t\t$table[$row->home]['pj']+=1;\n\t\t\t\t$home=true;\n\t\t\t\tif($row->schedule_id!=$last_schedule)\n\t\t\t\t\t$table_ant[$row->home]['pj']+=1;\n\t\t\t}\n \t\tif(isset($table[$row->away])){\n \t\t\t$table[$row->away]['pj']+=1;\n \t\t\t$away=true;\n \t\t\tif($row->schedule_id!=$last_schedule)\n\t\t\t\t\t$table_ant[$row->away]['pj']+=1;\n \t\t}\n \t\t\n \t\t//Si el equipo local gana\n \t\tif($h>$a){\n \t\t\tif($home){\n\t\t\t\t\t$table[$row->home]['points']+=3;\n\t\t\t\t\t$table[$row->home]['pg']+=1;\n\t\t\t\t\t$table[$row->home]['gf']+=$h;\n\t\t\t\t\t$table[$row->home]['gc']+=$a;\n\t\t\t\t\t$table[$row->home]['gd']+=$h-$a;\n\t\t\t\t\tif($row->schedule_id!=$last_schedule){\n\t\t\t\t\t\t$table_ant[$row->home]['points']+=3;\n\t\t\t\t\t\t$table_ant[$row->home]['pg']+=1;\n\t\t\t\t\t\t$table_ant[$row->home]['gf']+=$h;\n\t\t\t\t\t\t$table_ant[$row->home]['gc']+=$a;\n\t\t\t\t\t\t$table_ant[$row->home]['gd']+=$h-$a;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\tif($away){\n\t\t\t\t\t$table[$row->away]['pp']+=1;\n\t\t\t\t\t$table[$row->away]['gf']+=$a;\n\t\t\t\t\t$table[$row->away]['gc']+=$h;\n\t\t\t\t\t$table[$row->away]['gd']+=$a-$h;\n \t\t\t\tif($row->schedule_id!=$last_schedule){\n\t\t\t\t\t\t$table_ant[$row->away]['pp']+=1;\n\t\t\t\t\t\t$table_ant[$row->away]['gf']+=$a;\n\t\t\t\t\t\t$table_ant[$row->away]['gc']+=$h;\n\t\t\t\t\t\t$table_ant[$row->away]['gd']+=$a-$h;\n\t\t\t\t\t}\n \t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Si Empatan\n\t\t\t\tif($h==$a){\n\t\t\t\t\tif($home){\n\t\t\t\t\t\t$table[$row->home]['points']+=1;\n\t\t\t\t\t\t$table[$row->home]['pe']+=1;\n\t\t\t\t\t\t$table[$row->home]['gf']+=$h;\n\t\t\t\t\t\t$table[$row->home]['gc']+=$a;\n\t\t\t\t\t\tif($row->schedule_id!=$last_schedule){\n\t\t\t\t\t\t\t$table_ant[$row->home]['points']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->home]['pe']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gf']+=$h;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gc']+=$a;\n\t\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif($away){\n\t \t\t\t\t$table[$row->away]['points']+=1;\n\t\t\t\t\t\t$table[$row->away]['pe']+=1;\n\t\t\t\t\t\t$table[$row->away]['gf']+=$a;\n\t\t\t\t\t\t$table[$row->away]['gc']+=$h;\n\t \t\t\t\tif($row->schedule_id!=$last_schedule){\n\t \t\t\t\t\t$table_ant[$row->away]['points']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->away]['pe']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gf']+=$a;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gc']+=$h;\n\t\t\t\t\t\t}\n\t \t\t\t}\n\t\t\t\t}\n\t\t\t\t//Si el Equipo visitante gana\n\t\t\t\telse{\n\t\t\t\t\tif($home){\n\t\t\t\t\t\t$table[$row->home]['pp']+=1;\n\t\t\t\t\t\t$table[$row->home]['gf']+=$h;\n\t\t\t\t\t\t$table[$row->home]['gc']+=$a;\n\t\t\t\t\t\t$table[$row->home]['gd']+=$h-$a;\n\t\t\t\t\t\tif($row->schedule_id!=$last_schedule){\n\t\t\t\t\t\t\t$table_ant[$row->home]['pp']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gf']+=$h;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gc']+=$a;\n\t\t\t\t\t\t\t$table_ant[$row->home]['gd']+=$h-$a;\n\t\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif($away){\n\t \t\t\t\t$table[$row->away]['points']+=3;\n\t\t\t\t\t\t$table[$row->away]['pg']+=1;\n\t\t\t\t\t\t$table[$row->away]['gf']+=$a;\n\t\t\t\t\t\t$table[$row->away]['gc']+=$h;\n\t\t\t\t\t\t$table[$row->away]['gd']+=$a-$h;\n\t \t\t\t\tif($row->schedule_id!=$last_schedule){\n\t \t\t\t\t\t$table_ant[$row->away]['points']+=3;\n\t\t\t\t\t\t\t$table_ant[$row->away]['pg']+=1;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gf']+=$a;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gc']+=$h;\n\t\t\t\t\t\t\t$table_ant[$row->away]['gd']+=$a-$h;\n\t\t\t\t\t\t}\n\t \t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Ordeno las dos tablas generadas\n\t\tforeach ($table as $key=>$arr):\n\t\t\t$pun[$key] = $arr['points'];\n\t\t\t$g1[$key] = $arr['gd'];\n\t\t\t$g2[$key] = $arr['gf'];\n\t\t\t$g3[$key] = $arr['gc'];\t\n\t\tendforeach;\n\t\t\t\n\t\tarray_multisort($pun,SORT_DESC,$g1,SORT_DESC,$g2,SORT_DESC,$g3,SORT_ASC,$table);\n\t\t\n\t\t$pun=$g1=$g2=$g3=array();\n\t\tforeach ($table_ant as $key=>$arr):\n\t\t\t$pun[$key] = $arr['points'];\n\t\t\t$g1[$key] = $arr['gd'];\n\t\t\t$g2[$key] = $arr['gf'];\n\t\t\t$g3[$key] = $arr['gc'];\t\n\t\tendforeach;\n\t\t\t\t\n\t\tarray_multisort($pun,SORT_DESC,$g1,SORT_DESC,$g2,SORT_DESC,$g3,SORT_ASC,$table_ant);\n\t\t\n\t\t//Reviso posiciones con la ultima fecha y cuanto se han movido\n\t\tforeach($table as $key=>$row){\n\t\t\tforeach($table_ant as $key2=>$row2){\n\t\t\t\tif($row['id']==$row2['id']){\n\t\t\t\t\tif($key>$key2){\n\t\t\t\t\t\t$table[$key]['change']=2;\n\t\t\t\t\t\t$table[$key]['updown']=abs($key-$key2);\n\t\t\t\t\t}\n\t\t\t\t\tif($key<$key2){\n\t\t\t\t\t\t$table[$key]['change']=0;\n\t\t\t\t\t\t$table[$key]['updown']=abs($key-$key2);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $table;\n\t}", "function getTeams(){\n return array(\n //Gonzaga ~96%\n array('name'=>'Gonzaga','elo'=>1870,'off'=>126.8,'def'=>88.8,'tempo'=>74.8),\n array(),\n //Missouri 53%\n array('name'=>'Oklahoma','elo'=>1534,'off'=>112.1,'def'=>94.1,'tempo'=>67.7),\n array('name'=>'Missouri','elo'=>1548,'off'=>110.9,'def'=>94.9,'tempo'=>68.7),\n //Creighton 70%\n array('name'=>'Creighton','elo'=>1650,'off'=>115.6,'def'=>92.8,'tempo'=>69.1),\n array('name'=>'UCSB','elo'=>1496,'off'=>109.9,'def'=>96.3,'tempo'=>66.1),\n //Virginia 73%\n array('name'=>'Virginia','elo'=>1682,'off'=>116.3,'def'=>92.3,'tempo'=>60.1),\n array('name'=>'Ohio','elo'=>1507,'off'=>113.7,'def'=>101.2,'tempo'=>69.3),\n // USC 55%\n array('name'=>'USC','elo'=>1628,'off'=>113.6,'def'=>89.9,'tempo'=>67,3),\n array(),\n //Kansas 79%\n array('name'=>'Kansas','elo'=>1701,'off'=>110.3,'def'=>87.9,'tempo'=>68.3),\n array('name'=>'E Washington','elo'=>1469,'off'=>108.4,'def'=>100.3,'tempo'=>72.4),\n //Oregon 65%\n array('name'=>'Oregon','elo'=>1669,'off'=>115.1,'def'=>96.0,'tempo'=>67.2),\n array('name'=>'VCU','elo'=>1558,'off'=>106.2,'def'=>88.8,'tempo'=>69.8),\n //Iowa 86%\n array('name'=>'Iowa','elo'=>1710,'off'=>124.2,'def'=>93.9,'tempo'=>70.0),\n array('name'=>'Grand Canyon','elo'=>1383,'off'=>104.2,'def'=>95.8,'tempo'=>65.5),\n //Michigan 87%\n array('name'=>'Michigan','elo'=>1727,'off'=>120.1,'def'=>87.9,'tempo'=>66.8),\n array(),\n //LSU 55%\n array('name'=>'LSU','elo'=>1633,'off'=>120.5,'def'=>99.4,'tempo'=>70.8),\n array('name'=>'St Bonaventure','elo'=>1597,'off'=>112.0,'def'=>89.8,'tempo'=>65.2),\n //Colorado 56%\n array('name'=>'Colorado','elo'=>1639,'off'=>115.1,'def'=>92.0,'tempo'=>66.4),\n array('name'=>'Georgetown','elo'=>1593,'off'=>108.4,'def'=>92.9,'tempo'=>69.6),\n //Florida State 65%\n array('name'=>'Florida State','elo'=>1632,'off'=>117.1,'def'=>93.6,'tempo'=>70.6),\n array('name'=>'UNCG','elo'=>1519,'off'=>104.8,'def'=>95.2,'tempo'=>68.5),\n //BYU 62%\n array('name'=>'BYU','elo'=>1632,'off'=>113.8,'def'=>91.4,'tempo'=>68.0),\n array(),\n //Texas 78%\n array('name'=>'Texas','elo'=>1705,'off'=>114.5,'def'=>92.5,'tempo'=>69.2),\n array('name'=>'Abilene Christian','elo'=>1481,'off'=>103.7,'def'=>92.2,'tempo'=>70.0),\n //UCONN 59%\n array('name'=>'UCONN','elo'=>1610,'off'=>114.3,'def'=>90.9,'tempo'=>66.0),\n array('name'=>'Maryland','elo'=>1546,'off'=>111.6,'def'=>91.5,'tempo'=>65.3),\n //Alabama 90%\n array('name'=>'Alabama','elo'=>1753,'off'=>112.4,'def'=>86.0,'tempo'=>73.9),\n array('name'=>'Iona','elo'=>1371,'off'=>101.1,'def'=>100.7,'tempo'=>68.3),\n //Baylor 92%\n array('name'=>'Baylor','elo'=>1806,'off'=>124.0,'def'=>93.0,'tempo'=>68.4),\n array('name'=>'Hartford','elo'=>1359,'off'=>98.2,'def'=>99.5,'tempo'=>66.7),\n //UNC 60%\n array('name'=>'North Carolina','elo'=>1624,'off'=>110.8,'def'=>89.3,'tempo'=>71.8),\n array('name'=>'Wisconsin','elo'=>1553,'off'=>113.2,'def'=>89.1,'tempo'=>64.9),\n //Villanova 60%\n array('name'=>'Villanova','elo'=>1634,'off'=>119.3,'def'=>95.3,'tempo'=>65.1),\n array('name'=>'Winthrop','elo'=>1558,'off'=>105.8,'def'=>95.4,'tempo'=>73.6),\n //Purdue 68%\n array('name'=>'Purdue','elo'=>1622,'off'=>114.3,'def'=>90.6,'tempo'=>66.5),\n array('name'=>'North Texas','elo'=>1484,'off'=>106.1,'def'=>92.9,'tempo'=>63.1),\n //Texas Tech 52%\n array('name'=>'Texas Tech','elo'=>1595,'off'=>113.1,'def'=>90.7,'tempo'=>65.4),\n array('name'=>'Utah State','elo'=>1576,'off'=>106.4,'def'=>88.5,'tempo'=>68.9),\n //Arkansas 66%\n array('name'=>'Arkansas','elo'=>1679,'off'=>112.2,'def'=>89.2,'tempo'=>73.1),\n array('name'=>'Colgate','elo'=>1559,'off'=>111.6,'def'=>99.9,'tempo'=>72.5),\n //Florida 52%\n array('name'=>'Florida','elo'=>1550,'off'=>111.7,'def'=>92.7,'tempo'=>68.7),\n array('name'=>'Virginia Tech','elo'=>1530,'off'=>110.7,'def'=>94.1,'tempo'=>66.2),\n //Ohio St 85%\n array('name'=>'Ohio State','elo'=>1681,'off'=>123.0,'def'=>96.1,'tempo'=>67.1),\n array('name'=>'Oral Roberts','elo'=>1373,'off'=>109.4,'def'=>106.7,'tempo'=>71.8),\n //Illinois 92%\n array('name'=>'Illinois','elo'=>1807,'off'=>119.7,'def'=>87.6,'tempo'=>70.7),\n array('name'=>'Drexel','elo'=>1362,'off'=>107.8,'def'=>104.8,'tempo'=>64.2),\n //Georgia Tech 51%\n array('name'=>'Loyola Chicago','elo'=>1655,'off'=>111.1,'def'=>85.9,'tempo'=>64.2),\n array('name'=>'Georgia Tech','elo'=>1659,'off'=>114.0,'def'=>94.1,'tempo'=>67.8),\n //Tennessee 51%\n array('name'=>'Tennessee','elo'=>1602,'off'=>109.5,'def'=>87.0,'tempo'=>67.3),\n array('name'=>'Oregon State','elo'=>1591,'off'=>110.0,'def'=>98.4,'tempo'=>65.4),\n //Oklahoma St 74%\n array('name'=>'Oklahoma State','elo'=>1700,'off'=>110.8,'def'=>90.6,'tempo'=>72.0),\n array('name'=>'Liberty','elo'=>1517,'off'=>110.8,'def'=>101.0,'tempo'=>63.1),\n //SD State 66%\n array('name'=>'San Diego State','elo'=>1697,'off'=>111.5,'def'=>88.8,'tempo'=>66.1),\n array('name'=>'Syracuse','elo'=>1574,'off'=>114.5,'def'=>96.9,'tempo'=>69.2),\n //West Virginia 69%\n array('name'=>'West Virginia','elo'=>1633,'off'=>116.8,'def'=>95.1,'tempo'=>69.6),\n array('name'=>'Morehead State','elo'=>1492,'off'=>100.9,'def'=>95.5,'tempo'=>65.6),\n //Clemson 52%\n array('name'=>'Clemson','elo'=>1571,'off'=>107.6,'def'=>90.0,'tempo'=>64.2),\n array('name'=>'Rutgers','elo'=>1556,'off'=>109.3,'def'=>89.8,'tempo'=>67.8),\n //Houston 88%\n array('name'=>'Houston','elo'=>1742,'off'=>119.6,'def'=>89.4,'tempo'=>64.9),\n array('name'=>'Cleveland State','elo'=>1395,'off'=>101.5,'def'=>98.7,'tempo'=>66.3),\n );\n}", "function LeagueSeasonTeamsResults(){\n\t\n\tglobal $db_league_leagues,$db_league_teams,$db_league_teams_sub,$db_league_seasons,$db_league_seasons_results_teams,$db_league_awards;\n\tglobal $db_country,$db_league_seasons_rounds;\n\tglobal $eden_cfg;\n\tglobal $url_flags,$url_league_awards;\n\t\n\t$result = \"\";\n\t$result .= \"<table style=\\\"width:400px;\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\t$result .= \"\t<tr>\\n\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:40px;\\\">\"._LEAGUE_SEASON_ROUND_POSITION.\"</td>\\n\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:60px;text-align:center;\\\">\"._LEAGUE_SEASON_ROUND_POINTS.\"</td>\\n\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:50px;\\\">\"._CMN_COUNTRY.\"</td>\\n\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\\n\";\n\t$result .= \"\t</tr>\\n\";\n \t$res_results_teams = mysql_query(\"\n\tSELECT lt.league_team_id, lt.league_team_name, lsrt.league_season_result_team_team_sub_id, lsrt.league_season_result_team_points, c.country_shortname, c.country_name, ls.league_season_end \n\tFROM $db_league_seasons_results_teams AS lsrt \n\tJOIN $db_league_teams AS lt ON lt.league_team_id = lsrt.league_season_result_team_team_id \n\tJOIN $db_country AS c ON c.country_id = lt.league_team_country_id \n\tJOIN $db_league_seasons AS ls ON ls.league_season_id = \".(integer)$_GET['sid'].\" \n\tWHERE lsrt.league_season_result_team_season_id = \".(integer)$_GET['sid'].\" \n\tORDER BY lsrt.league_season_result_team_points DESC LIMIT 10\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$i = 1;\n\twhile ($ar_results_teams = mysql_fetch_array($res_results_teams)){\n\t\t// Call function\n\t\t$ar_award = LeagueCheckAwards(2,(integer)$_GET['sid'],0,(integer)$ar_results_teams['league_season_result_team_team_sub_id']);\n\t\t\n\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t$result .= \"\t<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t$result .= \"\t\t<td align=\\\"right\\\" valign=\\\"top\\\">\"; if($ar_award['league_award_place']){$result .= \"<img src=\\\"\".$url_league_awards.$ar_award['league_award_img'].\"\\\" alt=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" title=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" />\";} else { $result .= \"<strong>\".$i.\"</strong>\";} $result .= \"</td>\\n\";\n\t\t$result .= \"\t\t<td valign=\\\"top\\\" align=\\\"right\\\">\".$ar_results_teams['league_season_result_team_points'].\"</td>\\n\";\n\t\t$result .= \"\t\t<td valign=\\\"top\\\" align=\\\"center\\\"><img src=\\\"\".$url_flags.$ar_results_teams['country_shortname'].\".gif\\\" alt=\\\"\".stripslashes($ar_results_teams['country_name']).\"\\\" title=\\\"\".stripslashes($ar_results_teams['country_name']).\"\\\" /></td>\\n\";\n\t \t$result .= \"\t\t<td valign=\\\"top\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=league_team&mode=team_home&ltid=\".$ar_results_teams['league_team_id'].\"&lang=\".$_GET['lang'].\"&filter=\".$_GET['filter'].\"\\\" target=\\\"_self\\\">\".stripslashes($ar_results_teams['league_team_name']).\"</a></td>\\n\";\n\t\t$result .= \"\t</tr>\\n\";\n\t\t$i++;\n\t}\n\t// Show button for setting awards only if season is over\n\tif ($ar_results_teams['league_season_end'] < date(\"Y-m-d H:i:s\")){\n\t\t$result .= \"\t<tr>\\n\";\n\t\t$result .= \"\t\t<td colspan=\\\"5\\\"><br /><form action=\\\"sys_save.php?action=league_awards_give_to_teams&sid=\".$_GET['sid'].\"\\\" method=\\\"post\\\" name=\\\"form1\\\" enctype=\\\"multipart/form-data\\\">\\n\";\n\t\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"sid\\\" value=\\\"\".$_GET['sid'].\"\\\">\\n\";\n\t\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"confirm\\\" value=\\\"true\\\">\\n\";\n\t\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"project\\\" value=\\\"\".$_SESSION['project'].\"\\\">\\n\";\n\t\t$result .= \"\t\t\t<input type=\\\"submit\\\" value=\\\"\"._LEAGUE_AWARD_SUBMIT_TEAM.\"\\\" class=\\\"eden_button\\\">\\n\";\n\t\t$result .= \"\t\t</form>\\n\";\n\t\t$result .= \"\t\t</td>\\n\";\n\t\t$result .= \"\t</tr>\\n\";\n\t}\n\t$result .= \"</table>\\n\";\n\t\n\treturn $result;\n}", "function LeagueSeasonPlayersResults(){\n\t\n\tglobal $db_admin,$db_admin_contact,$db_admin_guids,$db_league_teams,$db_league_teams_sub,$db_league_seasons,$db_league_seasons_results_players;\n\tglobal $db_country,$db_league_seasons_rounds,$db_league_players,$db_league_awards;\n\tglobal $eden_cfg;\n\tglobal $url_flags,$url_league_awards;\n\t\n\t$result = \"\";\n\t$result .= \"<table style=\\\"width:500px;\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\t$result .= \"\t<tr>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:40px;\\\">\"._LEAGUE_SEASON_ROUND_POSITION.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\" style=\\\"width:60px;\\\">\"._LEAGUE_SEASON_ROUND_POINTS.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._CMN_COUNTRY.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_GUID.\"</td>\";\n\t$result .= \"\t\t<td class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\";\n\t$result .= \"\t</tr>\";\n \t$res_results_players = mysql_query(\"\n\tSELECT lsrp.league_season_result_player_player_id, a.admin_id, a.admin_nick, lt.league_team_id, lt.league_team_name, \n\tlsrp.league_season_result_player_points, c.country_shortname, c.country_name, agid.admin_guid_guid \n\tFROM $db_league_seasons_results_players AS lsrp \n\tJOIN $db_league_players AS lp ON lp.league_player_id = lsrp.league_season_result_player_player_id \n\tJOIN $db_admin AS a ON a.admin_id = lp.league_player_admin_id \n\tJOIN $db_admin_contact AS ac ON ac.aid = a.admin_id \n\tJOIN $db_admin_guids AS agid ON agid.aid = a.admin_id AND agid.admin_guid_game_id = lp.league_player_game_id \n\tJOIN $db_league_teams AS lt ON lt.league_team_id = lp.league_player_team_id \n\tJOIN $db_country AS c ON c.country_id = ac.admin_contact_country \n\tWHERE lsrp.league_season_result_player_season_id = \".(integer)$_GET['sid'].\" \n\tORDER BY lsrp.league_season_result_player_points DESC LIMIT 10\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$i = 1;\n\twhile ($ar_results_players = mysql_fetch_array($res_results_players)){\n\t\t// Call function\n\t\t$ar_award = LeagueCheckAwards(1,(integer)$_GET['sid'],(integer)$ar_results_players['league_season_result_player_player_id'],0);\n\t\t\n\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t$result .= \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t$result .= \"\t<td align=\\\"right\\\" valign=\\\"top\\\">\"; if($ar_award['league_award_place']){$result .= \"<img src=\\\"\".$url_league_awards.$ar_award['league_award_img'].\"\\\" alt=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" title=\\\"\".stripslashes($ar_award['league_award_name']).\"\\\" />\";} else {$result .= \"<strong>\".$i.\"</strong>\";} $result .= \"</td>\";\n\t\t$result .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\".$ar_results_players['league_season_result_player_points'].\"</td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\"><img src=\\\"\".$url_flags.$ar_results_players['country_shortname'].\".gif\\\" alt=\\\"\".stripslashes($ar_results_players['country_name']).\"\\\" title=\\\"\".stripslashes($ar_results_players['country_name']).\"\\\" /></td>\";\n\t \t$result .= \"\t<td valign=\\\"top\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=player&amp;mode=player_acc&amp;id=\".$ar_results_players['admin_id'].\"&amp;lang=\".$_GET['lang'].\"&amp;filter=\".$_GET['filter'].\"\\\" target=\\\"_self\\\">\".stripslashes($ar_results_players['admin_nick']).\"</a></td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\">\".$ar_results_players['admin_guid_guid'].\"</td>\";\n\t\t$result .= \"\t<td valign=\\\"top\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=league_team&amp;mode=team_home&amp;ltid=\".$ar_results_players['league_team_id'].\"&amp;lang=\".$_GET['lang'].\"&amp;filter=\".$_GET['filter'].\"\\\" target=\\\"_self\\\">\".stripslashes($ar_results_players['league_team_name']).\"</a></td>\";\n\t\t$result .= \"</tr>\";\n\t\t$i++;\n\t}\n\t$result .= \"\t<tr>\\n\";\n\t$result .= \"\t\t<td colspan=\\\"5\\\"><br /><form action=\\\"sys_save.php?action=league_awards_give_to_players&sid=\".$_GET['sid'].\"\\\" method=\\\"post\\\" name=\\\"form1\\\" enctype=\\\"multipart/form-data\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"sid\\\" value=\\\"\".$_GET['sid'].\"\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"confirm\\\" value=\\\"true\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"hidden\\\" name=\\\"project\\\" value=\\\"\".$_SESSION['project'].\"\\\">\\n\";\n\t$result .= \"\t\t\t<input type=\\\"submit\\\" value=\\\"\"._LEAGUE_AWARD_SUBMIT_PLAYER.\"\\\" class=\\\"eden_button\\\">\\n\";\n\t$result .= \"\t\t</form>\\n\";\n\t$result .= \"\t\t</td>\\n\";\n\t$result .= \"\t</tr>\\n\";\n\t$result .= \"</table>\\n\";\n\t\n\treturn $result;\n}", "function playTournament(){\n $teams = getTeams();\n $playin = getPlayinTeams();\n $teams[25] = compete2($playin[0],$playin[1]);\n $teams[17] = compete2($playin[2],$playin[3]);\n $teams[9] = compete2($playin[4],$playin[5]);\n $teams[1] = compete2($playin[6],$playin[7]);\n while(count($teams)>1){\n $newteams = array();\n for($i=0;$i<count($teams);$i+=2){\n $newteams[] = compete2($teams[$i],$teams[$i+1]);\n }\n $teams = $newteams;\n }\n return $teams[0]['name'];\n}", "function team_list()\n {\n }", "function showteam( $ffanumber, $lastname )\n{\n\t\t$db_hostname = 'gungahlinunitedfc.org.au';\n\t\t$db_username = 'gufcweb_dev';\n\t\t$db_password = 'deve!oper';\n\t\t$db_database = 'gufcweb_player';\n\n \t$mysqli = new mysqli($db_hostname,$db_username,$db_password, $db_database);\n\n\t\t$playerteam = \"\";\n\t\t\n\t\t$sqlinner = \" SELECT * FROM gufcdraws.player where FFANumber = '\".$ffanumber.\"' and LastName = '\".$lastname.\"' and display = 'Y'\";\n\n\t\t$sqlexample1 = \" SELECT * FROM gufcdraws.player where FFANumber = 28069631 and LastName = 'Chilmaid' and display = 'Y' \";\n\t\t$sqlexample2 = \" SELECT * FROM gufcdraws.player where fkteamid = 'U16 Div 2 Boys' and display = 'Y' \";\n\t\t\n\t\t$r_queryinner = $mysqli->query($sqlinner);\n\n\t\t$todays_date = date(\"Y-m-d\");\t\t\t\t\t\t\n\n\t\t$msg = 'No player found.';\t\n\n\t\techo '<table class=\"table\" align=\"center\" border=\"1\" >';\n\t\techo '<th>First Name</th>';\n\t\techo '<th>Last Name</th>';\n\t\techo '<th>Team Name</th>';\n\n\t\tif ( ! $r_queryinner )\n\t\t{\n\t\t\techo 'Player not found'; \n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$sqlteam = \" SELECT FirstName,LastName,fkteamid FROM gufcdraws.player where fkteamid = '\".$playerteam.\"' and display = 'Y'\";\n\t\t\t\n\t\t\t$r_queryteam = $mysqli->query($sqlteam);\n\t\t\t\n\t\t\tif ( $r_queryteam ) {\n\t\t\t\n\t\t\t\t$rowteam = mysqli_fetch_assoc($r_queryteam)\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<td>'.$rowteam['FirstName'].'</td>';\n\t\t\t\techo '<td>'.$rowteam['LastName'].'</td>';\n\t\t\t\techo '<td>'.$rowteam['fkteamid'].'</td>';\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\techo '</table>';\n\t\t\techo '<p/>';\n\t\t}\n}", "public function run()\n {\n $teams = [\n ['team'=>'Manchester City',\n 'team_id'=>1001,\n 'league_id'=>1,\n 'points'=>77,\n 'wins'=>24,\n 'draws'=>5,\n 'losses'=>4,\n 'gd'=>45,\n 'sport_id'=>1,\n 'img_name'=>'manCity.png'],\n ['team'=>'Manchester United',\n 'team_id'=>1002,\n 'league_id'=>1,\n 'points'=>67,\n 'wins'=>19,\n 'draws'=>10,\n 'losses'=>4,\n 'gd'=>29,\n 'sport_id'=>1,\n 'img_name'=>'manUtd.png'],\n ['team'=>'Leicester City',\n 'team_id'=>1003,\n 'league_id'=>1,\n 'points'=>62,\n 'wins'=>19,\n 'draws'=>5,\n 'losses'=>9,\n 'gd'=>22,\n 'sport_id'=>1,\n 'img_name'=>'leicesterCity.png'],\n ['team'=>'Chelsea',\n 'team_id'=>1004,\n 'league_id'=>1,\n 'points'=>58,\n 'wins'=>16,\n 'draws'=>10,\n 'losses'=>7,\n 'gd'=>20,\n 'sport_id'=>1,\n 'img_name'=>'chelsea.png'],\n ['team'=>'West Ham',\n 'team_id'=>1005,\n 'league_id'=>1,\n 'points'=>55,\n 'wins'=>16,\n 'draws'=>7,\n 'losses'=>10,\n 'gd'=>10,\n 'sport_id'=>1,\n 'img_name'=>'westHam.png'],\n ['team'=>'Liverpool',\n 'team_id'=>1006,\n 'league_id'=>1,\n 'points'=>54,\n 'wins'=>15,\n 'draws'=>9,\n 'losses'=>9,\n 'gd'=>16,\n 'sport_id'=>1,\n 'img_name'=>'liverpool.png'],\n ['team'=>'Tottenham',\n 'team_id'=>1007,\n 'league_id'=>1,\n 'points'=>53,\n 'wins'=>15,\n 'draws'=>8,\n 'losses'=>10,\n 'gd'=>18,\n 'sport_id'=>1,\n 'img_name'=>'tottenham.png'],\n ['team'=>'Everton',\n 'team_id'=>1008,\n 'league_id'=>1,\n 'points'=>52,\n 'wins'=>15,\n 'draws'=>7,\n 'losses'=>10,\n 'gd'=>4,\n 'sport_id'=>1,\n 'img_name'=>'everton.png'],\n ['team'=>'Leeds United',\n 'team_id'=>1009,\n 'league_id'=>1,\n 'points'=>47,\n 'wins'=>14,\n 'draws'=>5,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'leedsUtd.png'],\n ['team'=>'Arsenal',\n 'team_id'=>1010,\n 'league_id'=>1,\n 'points'=>46,\n 'wins'=>13,\n 'draws'=>7,\n 'losses'=>13,\n 'gd'=>7,\n 'sport_id'=>1,\n 'img_name'=>'arsenal.png'],\n ['team'=>'Aston Villa',\n 'team_id'=>1011,\n 'league_id'=>1,\n 'points'=>45,\n 'wins'=>13,\n 'draws'=>6,\n 'losses'=>13,\n 'gd'=>9,\n 'sport_id'=>1,\n 'img_name'=>'astonVilla.png'],\n ['team'=>'Wolves',\n 'team_id'=>1012,\n 'league_id'=>1,\n 'points'=>41,\n 'wins'=>11,\n 'draws'=>8,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'wolves.png'],\n ['team'=>'Crystal Palace',\n 'team_id'=>1013,\n 'league_id'=>1,\n 'points'=>38,\n 'wins'=>10,\n 'draws'=>8,\n 'losses'=>14,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'crystalPalace.png'],\n ['team'=>'Burnley',\n 'team_id'=>1014,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>9,\n 'draws'=>9,\n 'losses'=>15,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'burnley.png'],\n ['team'=>'Southampton',\n 'team_id'=>1015,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>10,\n 'draws'=>6,\n 'losses'=>16,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'southampton.png'],\n ['team'=>'Newcastle',\n 'team_id'=>1016,\n 'league_id'=>1,\n 'points'=>36,\n 'wins'=>9,\n 'draws'=>9,\n 'losses'=>15,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'newcastle.png'],\n ['team'=>'Brighton',\n 'team_id'=>1017,\n 'league_id'=>1,\n 'points'=>34,\n 'wins'=>7,\n 'draws'=>13,\n 'losses'=>13,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'brighton.png'],\n ['team'=>'Fullham',\n 'team_id'=>1018,\n 'league_id'=>1,\n 'points'=>27,\n 'wins'=>5,\n 'draws'=>10,\n 'losses'=>18,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'fullham.png'],\n ['team'=>'West Brom',\n 'team_id'=>1019,\n 'league_id'=>1,\n 'points'=>25,\n 'wins'=>5,\n 'draws'=>10,\n 'losses'=>18,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'westBrom.png'],\n ['team'=>'Sheffield United',\n 'team_id'=>1020,\n 'league_id'=>1,\n 'points'=>17,\n 'wins'=>5,\n 'draws'=>2,\n 'losses'=>26,\n 'gd'=>0,\n 'sport_id'=>1,\n 'img_name'=>'sheffieldUtd.png'],\n ];\n\n foreach($teams as $team){\n football::create([\n 'team'=> $team['team'],\n 'team_id'=> $team['team_id'],\n 'league_id'=> $team['league_id'],\n 'points'=> $team['points'],\n 'wins'=> $team['wins'],\n 'draws'=> $team['draws'],\n 'losses'=> $team['losses'],\n 'gd'=> $team['gd'],\n 'sport_id'=> $team['sport_id'],\n 'img_name'=>$team['img_name']\n ]);\n }\n }", "function fantacalcio_admin_teams_list() {\n $out = l(\"Aggiungi squadra\", \"admin/fantacalcio/teams/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $teams = Team::all();\n \n if ($teams) {\n \n $header = array(\"Nome\", \"Utente\", \"Gironi\", \"Attiva\");\n \n foreach ($teams as $t_id => $team) {\n \n $account = User::get($team->user);\n \n $groups_team = \"\";\n foreach ($team->getCompetitions() as $competition) {\n $groups_team .= $competition . \"<br>\";\n }\n $rows[] = array(\n l($team->name, \"admin/fantacalcio/teams/\" . $t_id), \n $account != null ? $account->name : \"\", \n $groups_team, \n fantacalcio_check_value($team->active));\n }\n $out .= theme(\"table\", array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table table-responsive\")), \n \"sticky\" => TRUE, \n \"empty\" => t(\"Nessuna squadra\")));\n }\n \n return $out;\n}", "public function leaderboards()\n\t{\n\t\t$table = 'eb23990_scores';\n\t\t$where = 'score > 0 ORDER BY score';\n\t\t$activeRecords = $GLOBALS['db']->GetActiveRecords($table,$where);\n\t\t$result = '';\n\t\t$i = 0;\n\t\tforeach ($activeRecords as $record) {\n\t\t\tif($i < 10){\n\t\t\t\t$result = $result.$record->nickname .':'.$record->score.\",\";\n\t\t\t\t++$i;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function xstats_displayRanking( $gameId ) {\n include ('../../inc.conf.php');\n echo( \"<H3>Skrupel Rang nach Spielende</H3>\");\n $ranking = array();\n for($k=1; $k<=10; $k++) {\n $result = @mysql_query(\"SELECT * FROM skrupel_spiele WHERE id='$gameId'\") or die(mysql_error());\n $result = @mysql_fetch_array($result);\n $playerId = $result['spieler_'.$k];\n $playerRank = $result['spieler_'.$k.'_platz'];\n if($playerId != 0) {\n $ranking[] = '<tr><td>'.\n '<strong>'.$playerRank.'. </strong>'.\n '<img src=\"../../daten/'.$result['spieler_'.$k.'_rasse'].'/bilder_allgemein/menu.png\" height=\"18\" class=\"beveled\">'.\n ' <strong><font color=\"'.$spielerfarbe[$k].'\"> '.\n xstats_getPlayerNick($playerId).'</font></strong></td><td>als '.$result['spieler_'.$k.'_rassename'].\n ':</td><td align=\"center\">'.$result['spieler_'.$k.'_planeten'].'</td><td align=\"center\">'.\n $result['spieler_'.$k.'_schiffe'].'</td><td align=\"center\">'.\n $result['spieler_'.$k.'_basen'].'</td></tr>';\n }\n }\n natsort( $ranking );\n echo( '<table border=\"0\">');\n echo '<tr><td colspan=\"2\"><img src=\"../../lang/de/topics/dieimperien.gif\" width=\"140\"></td>';\n echo '<td><img src=\"../../bilder/aufbau/rang_2.gif\"></td>';\n echo '<td><img src=\"../../bilder/aufbau/rang_3.gif\"></td>';\n echo '<td><img src=\"../../bilder/aufbau/rang_1.gif\"></td>';\n echo '<td>';\n foreach( $ranking as $rankLine) {\n echo( $rankLine);\n }\n echo( '</table>');\n}", "function GetLeaderboards($db) {\n\t$query = \"SELECT m.member_id, m.name, SUM(tier1_amt + tier2_amt + tier3_amt) AS sum_commissions\n\t\t\t\tFROM commissions c\n\t\t\t\tJOIN transactions t USING (trans_id)\n\t\t\t\tJOIN members m ON m.member_id = t.member_id\n\t\t\t\tWHERE m.member_id > 100\n\t\t\t\tGROUP BY m.member_id\n\t\t\t\tORDER BY sum_commissions DESC\n\t\t\t\tLIMIT 5\";\n\t\t\t\t// Add in date ranges\n\t$result = mysqli_query($db, $query) or die(mysqli_error($db));\n\t$table_rows = false;\n\tfor($i=1; $row = mysqli_fetch_assoc($result); $i++) {\n\t\t$table_rows .= \"<tr>\"\n\t\t. WriteTD($i)\t\n#\t\t. WriteTD(WriteDate($row['member_id']))\t\n\t\t. WriteTD($row['name'])\t\n#\t\t. WriteTD(WriteDollars($row['sum_commissions']), TD_RIGHT)\t\n\t\t. \"</tr>\";\n\t}\n\t\n\tif (!$table_rows) {\n\t\t$res = \"There are no members with commissions at this time.\";\n\t} else {\n\t\t$table_header = \"<tr><thead>\"\n\t\t. WriteTH(\"Rank\")\t\n\t\t. WriteTH(\"Member\")\t\n#\t\t. WriteTH(\"Member ID\")\t\n#\t\t. WriteTH(\"Commissions\", TD_RIGHT)\t\n\t\t. \"</tr></thead>\";\n\t\t$res = '<link rel=\"stylesheet\" type=\"text/css\" href=\"http://digialti.com/css/style.css\">';\n\t\t$res .= \"<table width='300px' class='daTable'>\";\n\t\t$res .= $table_header;\n\t\t$res .= $table_rows;\n\t\t$res .= \"</table>\";\n}\n\t$res = \"<h3>All Time Top Income Earners</h3>\".$res;\n\treturn $res;\n}", "public function team();", "function ListAllowedPlayers(){\n\t\n\tglobal $db_admin,$db_admin_guids,$db_league_teams,$db_league_teams_sub,$db_league_teams_sub_leagues,$db_league_leagues,$db_league_players,$db_clan_games,$db_league_seasons_round_allowed_players;\n\t\n\tif ($_GET['mode'] != \"league\"){\n\t\t\n\t\techo Menu();\n\t\t\n\t\tKillUse($_SESSION['loginid']);\n\t}\n\techo \"<table width=\\\"857\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\" class=\\\"eden_main_table\\\">\\n\";\n\tif ($_GET['lid'] == 0){\n\t\techo \"\t<tr>\\n\";\n\t\techo \"\t\t<td>\"._LEAGUE_NO_LEAGUE_ID.\"</td>\\n\";\n \t\techo \"\t</tr>\\n\";\n\t} else {\n\t\techo \"\t<tr>\\n\";\n\t\tif ($_GET['show'] != \"id\" && $_GET['show'] != \"season_players_all_guid\"){\n\t\t\techo \"\t\t<td width=\\\"30\\\" valign=\\\"middle\\\" class=\\\"eden_title\\\">ID</td>\\n\";\n\t\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title\\\">\"._LEAGUE_TEAM.\"</td>\\n\";\n\t\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\\n\";\n\t\t}\n\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title\\\">\"._LEAGUE_GUID.\"</td>\\n\";\n\t\techo \"\t</tr>\\n\";\n\t\t//$msg = LeagueGenerateListAllowedPlayers((float)$_GET['lid'],(float)$_GET['sid'],(float)$_GET['rid']);\n\t\tswitch ($_GET['show']){\n\t \t\tcase \"id\":\n\t \t\t\t$colspan = 1;\n\t\t\t\t$res_round = mysql_query(\"\n\t\t\t\tSELECT league_season_round_allowed_player_guid \n\t\t\t\tFROM $db_league_seasons_round_allowed_players \n\t\t\t\tWHERE league_season_round_allowed_player_season_round_id=\".(float)$_GET['rid'].\" \n\t\t\t\tORDER BY league_season_round_allowed_player_guid\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t \t\tbreak;\n\t\t\tcase \"season_players_all\":\n\t\t\t\t$colspan = 4;\n\t \t\tbreak;\n\t\t\tcase \"season_players_all_guid\":\n\t \t\t\t$colspan = 1;\n\t \t\tbreak;\n\t\t\tdefault:\n\t \t\t\t$colspan = 4;\n\t\t\t\t$res_round = mysql_query(\"\n\t\t\t\tSELECT a.admin_id, a.admin_nick, lt.league_team_id, lt.league_team_name, ll.league_league_id, ll.league_league_game_id, lsrap.league_season_round_allowed_player_guid \n\t\t\t\tFROM $db_league_seasons_round_allowed_players AS lsrap \n\t\t\t\tJOIN $db_league_leagues AS ll ON ll.league_league_id=lsrap.league_season_round_allowed_player_league_id \n\t\t\t\tJOIN $db_league_teams AS lt ON lt.league_team_id=lsrap.league_season_round_allowed_player_team_id \n\t\t\t\tJOIN $db_admin AS a ON a.admin_id=lsrap.league_season_round_allowed_player_admin_id \n\t\t\t\tWHERE lsrap.league_season_round_allowed_player_season_round_id=\".(float)$_GET['rid'].\" \n\t\t\t\tORDER BY lsrap.league_season_round_allowed_player_team_sub_id ASC, a.admin_nick ASC\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t\t$_GET['show'] = \"all\";\n\t\t}\n\t\t\n\t\t$cislo = 0;\n\t\t// pro zobrazeni povolenych hracu\n\t\tif ($_GET['show'] == \"id\" || $_GET['show'] == \"all\"){\n\t\t\twhile ($ar_round = mysql_fetch_array($res_round)){\n\t\t\t\tif ($cislo % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t\t\techo \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t\t\tif ($_GET['show'] != \"id\"){\n\t\t\t\t\techo \"\t\t<td width=\\\"30\\\" align=\\\"right\\\" valign=\\\"top\\\">\".$ar_round['admin_id'].\"</td>\\n\";\n\t\t\t \t\techo \"\t\t<td width=\\\"150\\\" align=\\\"left\\\" valign=\\\"top\\\">\".stripslashes($ar_round['league_team_name']).\"</td>\\n\";\n\t\t\t \t\techo \"\t\t<td valign=\\\"middle\\\"><strong>\".stripslashes($ar_round['admin_nick']).\"</strong></td>\\n\";\n\t\t\t\t}\n\t\t\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\">\"; if (empty($ar_round['league_season_round_allowed_player_guid'])){echo \"<span class=\\\"red\\\">\"._LEAGUE_PLAYER_NO_GUID.\"</span>\";} else {echo stripslashes($ar_round['league_season_round_allowed_player_guid']);} echo \"</td>\\n\";\n\t\t\t\techo \"\t</tr>\\n\";\n\t\t\t\t$cislo++;\n\t\t\t}\n\t\t\tunset($ar_round);\n\t\t}\n\t\t// pro zobrazeni vsech hracu\n\t\tif ($_GET['show'] == \"season_players_all\" || $_GET['show'] == \"season_players_all_guid\"){\n\t\t\t$res_team = mysql_query(\"\n\t\t\tSELECT lt.league_team_id, lt.league_team_name, ltsl.league_teams_sub_league_team_sub_id, ltsl.league_teams_sub_league_league_id \n\t\t\tFROM $db_league_teams_sub_leagues AS ltsl \n\t\t\tJOIN $db_league_teams AS lt ON lt.league_team_id=ltsl.league_teams_sub_league_team_id \n\t\t\tWHERE ltsl.league_teams_sub_league_league_id=\".(integer)$_GET['lid']) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\twhile ($ar_team = mysql_fetch_array($res_team)){\n\t\t\t\t$res_player = mysql_query(\"\n\t\t\t\tSELECT a.admin_id, a.admin_nick, ag.admin_guid_guid, lp.league_player_id \n\t\t\t\tFROM $db_league_players AS lp \n\t\t\t\tJOIN $db_admin AS a ON a.admin_id=lp.league_player_admin_id \n\t\t\t\tJOIN $db_admin_guids AS ag ON ag.aid=lp.league_player_admin_id AND ag.admin_guid_league_guid_id=\".(integer)$ar_team['league_teams_sub_league_league_id'].\" AND ag.admin_guid_guid != '' \n\t\t\t\tWHERE lp.league_player_team_sub_id=\".(integer)$ar_team['league_teams_sub_league_team_sub_id']) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t\t\t$i=1;\n\t\t\t\twhile ($ar_player = mysql_fetch_array($res_player)){\n\t\t\t\t\tif ($i % 2 == 0){ $cat_class = \"cat_level1_even\";} else { $cat_class = \"cat_level1_odd\";}\n\t\t\t\t\techo \"<tr class=\\\"\".$cat_class.\"\\\" onmouseover=\\\"this.className='cat_over'\\\" onmouseout=\\\"this.className='\".$cat_class.\"'\\\">\\n\";\n\t\t\t\t\tif ($_GET['show'] != \"season_players_all_guid\"){\n\t\t\t\t\t\techo \"\t\t<td width=\\\"30\\\" align=\\\"right\\\" valign=\\\"top\\\">\".$ar_player['admin_id'].\"</td>\\n\";\n\t\t\t\t \t\techo \"\t\t<td width=\\\"150\\\" align=\\\"left\\\" valign=\\\"top\\\">\".stripslashes($ar_team['league_team_name']).\"</td>\\n\";\n\t\t\t\t \t\techo \"\t\t<td valign=\\\"middle\\\"><strong>\".stripslashes($ar_player['admin_nick']).\"</strong></td>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\t\t<td align=\\\"left\\\" valign=\\\"top\\\">\".stripslashes($ar_player['admin_guid_guid']).\"</td>\\n\";\n\t\t\t\t\techo \"\t</tr>\\n\";\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\techo \"</table>\\n\";\n}", "public function resultString($team_id) {\n\t\t\n\t\t$scored=0;\n\t\t$received=0;\n\t\t$matchfound=false;\n\t\tif ($this->home_team_id == $team_id && !is_null($this->away_team_id)) {\n\t\t\t$scored=$this->homeScore;\n\t\t\t$received=$this->awayScore;\n\t\t\t$matchfound=true;\t\n\t\t} elseif ($this->away_team_id == $team_id && !is_null($this->home_team_id)) {\n\t\t\t$scored=$this->awayScore;\n\t\t\t$received=$this->homeScore;\n\t\t\t$matchfound=true;\n\t\t} elseif ($this->home_team_id == $team_id || $this->away_team_id == $team_id ) {\n\t\t\t$bye=true;\n\t\t} else {\n\t\t\tdie('team with id '.$team_id.' did not play in match with id '.$this->id);\n\t\t}\n\n\t\tif ($scored > $received) {\n\t\t\treturn $scored.'-'.$received.' win';\n\t\t} elseif ($scored < $received) {\n\t\t\treturn $scored.'-'.$received.' loss';\n\t\t} elseif ($scored == $received && $matchfound == true) {\n\t\t\treturn $scored.'-'.$received.' tie';\n\t\t} elseif ($bye === true) { // team had a BYE (\" a break \")\n\t\t\treturn 'break';\n\t\t} else {\n\t\t\tdie('hae?');\n\t\t}\n\t\t\n\t}", "public function populateMatchStandings(){\n\t\t $team = new Application_Model_Mapper_Team();\n\t\t //cath all teams\n\t\t $teamList=$team->fetchAll();\n\t\t $prosGoal= null;\n\t\t $agaistGoal=null;\n\t\t if(count($teamList)>0){\n\t\t \t foreach($teamList as $row){\n\t\t \t \t //begin team statistics by 0\n\t\t \t \t $row->setWins(0);\n\t\t \t \t $row->setLosses(0);\n\t\t \t \t $row->setPoints(0);\n\t\t \t \t $row->setDraws(0);\n\t\t \t \t //catch all matches by team\n\t\t $championship = $this->seachMatchByTeam($row->getId());\n\t\t foreach ($championship as $match) {\n\t\t //if a team is a visitor team goals of visitor team it is\n\t\t \t $prosGoal=$match['goalVisitorTeam'];\n\t\t \t $agaistGoal=$match['goalHomeTeam'];\n\t\t \t //if a team is a home team goals of home team it is\n\t\t \t if($match['idHomeTeam']==$row->getId()){\n\t\t \t \t $prosGoal=$match['goalHomeTeam'];\n\t\t \t \t $agaistGoal=$match['goalVisitorTeam'];\n\t\t \t }\n\t\t \t //if team win\n\t\t \t if($agaistGoal<$prosGoal){\n\t\t \t \t$row->setWins($row->getWins()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+3);\n\t\t \t }//if team lost\n\t\t \t elseif($agaistGoal>$prosGoal){\n\t\t \t \t$row->setLosses($row->getLosses()+1);\n\t\t \t }//if team draw\n\t\t \t else{\n\t\t \t \t$row->setDraws($row->getDraws()+1);\n\t\t \t \t$row->setPoints($row->getPoints()+1);\n\t\t \t }\n\t\t }\n\t\t //update table team\n\t\t $team->updateTeam($row);\n\t\t \t }\n\t\t }\n\t}", "public function getGamesChampion()\n {\n //test if change brasil per this->winer to works\n $vet = $this->file->xpath(\"//time[contains(., 'Brasil')]/..\"); \n $string = \"\";\n \n foreach ($vet as $key => $value) {\n $string .= $this->start. $value->time[0].\" \".$value->time[0]->gols. \" X \".\n $value->time[1]->gols .\" \".$value->time[1].$this->end;\n }\n \n return $string;\n }", "function xstats_displayShipsExpBattleships( $gameId, $maxRows) {\n include ('../../inc.conf.php');\n $maxTurn = xstats_getMaxTurn($gameId);\n $result = @mysql_query(\"SELECT * FROM skrupel_xstats_ships WHERE gameId='\".$gameId.\"' AND(beamcount>0 OR hangarcount>0 OR tubecount>0) ORDER BY experience DESC\") or die(mysql_error());\n echo '<br><h4>Die erfahrensten Besatzungen (Kampfschiffe):</h4>';\n echo '<table class=\"shiptable\" border=\"0\">';\n echo '<tr><th>Schiff</th><th>Siege</th><th>Herstellungsort</th><th>In Betrieb</th></tr>';\n $counter = 0;\n while ($counter++ < $maxRows && $row = mysql_fetch_array($result)) {\n if( $row['untilturn'] == '0' || $row['untilturn'] == 0) {\n $untilTurn = $maxTurn;\n }else {\n $untilTurn = $row['untilturn'];\n }\n echo '<tr>';\n //ship\n echo '<td>'.xstats_getShipFullDescription( $gameId, $row['shipid'], $row['shiprace'], $row['picturesmall'], $row['experience'], $untilTurn,$row['shipclass'],$row['shipname']).'</td>';\n //victories\n echo '<td>'.$row['victories'].'</td>';\n //home planet\n $planetOwnerIndex = xstats_getShipOwnerIndexAtTurn($gameId, $row['shipid'], $row['sinceturn']);\n echo '<td>'.xstats_getPlanetDescription( $gameId, $row['buildposx'], $row['buildposy'], $planetOwnerIndex, $row['buildplanetname'] ).'</td>';\n //from-to\n echo '<td>Runde '.$row['sinceturn'].'-'.$untilTurn.'</td>';\n echo '</tr>';\n }\n echo '</table>';\n}", "function _displayWeeksGames( $schedGames ) {\n\n/* ... data declarations */\n $dayOfWeek = array();\n $textBlock = \"\";\n\n/* ... figure out which games are on which days of the week */\n for ($i = 0; $i < count( $schedGames ); $i++) {\n $dayOfWeek[date( \"D\", strtotime( $schedGames[$i]['Date'] ) )][] = $i;\n }\n\n/* ... we'll buffer the XHTML output and then pass it back in a string */\n ob_start();\n\n/* ... for each day of the week with games, we will now build a block with that day's games */\n $firstBlock = true;\n foreach ($dayOfWeek as $dow => $games) {\n\n?>\n <div id=\"dayOfGames\" class=\"<?= !$firstBlock ? 'notFirst' : '' ?>\">\n <table id=\"<?= $dow ?>\" width=\"100%\">\n <caption><?= $dow ?></caption>\n\n<?php\n foreach ($games as $gameIndex) {\n if ($schedGames[$gameIndex]['Status'] == \"PLAYED\") {\n if ($schedGames[$gameIndex]['VisitScore'] >= $schedGames[$gameIndex]['HomeScore']) {\n $team1 = htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['VisitTeamID'] ) ).\": \".$schedGames[$gameIndex]['VisitScore'];\n $state = \"vs\";\n $team2 = htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['HomeTeamID'] ) ).\": \".$schedGames[$gameIndex]['HomeScore'];\n }\n else {\n $team1 = htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['HomeTeamID'] ) ).\": \".$schedGames[$gameIndex]['HomeScore'];\n $state = \"vs\";\n $team2 = htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['VisitTeamID'] ) ).\": \".$schedGames[$gameIndex]['VisitScore'];\n }\n }\n elseif ($schedGames[$gameIndex]['Status'] == \"SCHEDULED\") {\n $team1 = htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['VisitTeamID'] ) );\n $state = \"at\";\n $team2 = htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['HomeTeamID'] ) );\n }\n else {\n $team1 = htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['VisitTeamID'] ) );\n $state = \"RAINED OUT\";\n $team2 = htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['HomeTeamID'] ) );\n }\n?>\n<!--\n <tr>\n <td><?= htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['VisitTeamID'] ) ).\":\" ?></td>\n <td><?= $schedGames[$gameIndex]['VisitScore'] ?></td>\n <td> at </td>\n <td><?= htmlspecialchars( $this->Model_Team->getTeamName( $schedGames[$gameIndex]['HomeTeamID'] ) ).\":\" ?></td>\n <td><?= $schedGames[$gameIndex]['HomeScore'] ?></td>\n </tr>\n-->\n <tr>\n <td><?= $team1 ?></td>\n <td><?= $state ?> </td>\n <td><?= $team2 ?></td>\n </tr>\n\n<?php\n }\n?>\n </table>\n </div>\n\n<?php\n/* ... if this is the first block of games for the week, unset our flag used to define spacing between subsequent blocks */\n $firstBlock = false;\n\n }\n\n/* ... time to go */\n $textBlock = ob_get_contents();\n ob_end_clean();\n return( $textBlock );\n }", "function printStatsPlayers($players) {\n\n\t\t$report = \"Player Stats:\\n\"\n\t\t\t. \"=============\\n\"\n\t\t\t;\n\n\t\tforeach ($players as $key => $value) {\n\t\t\t//$this->logger->info(\"Player: \" . json_encode($value->getStats()));\n\t\t\t$stats = $value->getStats();\n\n\t\t\t$report .= sprintf(\"\"\n\t\t\t\t. \"%15s: %20s\\n\"\n\t\t\t\t. \"%15s: %10d\\n\"\n\t\t\t\t. \"%15s: %10d\\n\"\n\t\t\t\t. \"%15s: %10d\\n\"\n\t\t\t\t. \"%15s: %10d\\n\"\n\t\t\t\t. \"%15s: %10d\\n\"\n\t\t\t\t. \"%15s: %10d\\n\"\n\t\t\t\t. \"%15s: $this->green%10.2f$this->default\\n\"\n\t\t\t\t. \"%15s: $this->red%10.2f$this->default\\n\"\n\t\t\t\t. \"%15s: %10.2f\\n\"\n\t\t\t\t. \"\\n\",\n\t\t\t\t\"Name\", $stats[\"name\"],\n\t\t\t\t\"Games Played\", $stats[\"stats\"][\"num_games\"],\n\t\t\t\t\"Bet\", $stats[\"stats\"][\"strategy\"][\"bet\"],\n\t\t\t\t\"Took Odds?\", $stats[\"stats\"][\"strategy\"][\"take_odds\"],\n\t\t\t\t\"Bail At\", $stats[\"stats\"][\"strategy\"][\"bail_at\"],\n\t\t\t\t\"Wins\", $stats[\"stats\"][\"wins\"],\n\t\t\t\t\"Losses\", $stats[\"stats\"][\"losses\"],\n\t\t\t\t\"Amount Won\", $stats[\"stats\"][\"amount_won\"],\n\t\t\t\t\"Amount Lost\", $stats[\"stats\"][\"amount_lost\"],\n\t\t\t\t\"Balance\", $stats[\"balance\"]\n\t\t\t\t);\n\n\t\t}\n\n\t\tprint $report;\n\n\t}", "function galaxy_show_ranking_player() {\n\tglobal $db;\n\tglobal $pub_order_by, $pub_date, $pub_interval;\n\n\tif (!isset($pub_order_by)) {\n\t\t$pub_order_by = \"general\";\n\t}\n\tif ($pub_order_by != \"general\" && $pub_order_by != \"fleet\" && $pub_order_by != \"research\") {\n\t\t$pub_order_by = \"general\";\n\t}\n\n\tif (!isset($pub_interval)) {\n\t\t$pub_interval = 1;\n\t}\n\tif (($pub_interval-1)%100 != 0 || $pub_interval > 1401) {\n\t\t$pub_interval = 1;\n\t}\n\t$limit_down = $pub_interval;\n\t$limit_up = $pub_interval + 99;\n\n\t$order = array();\n\t$ranking = array();\n\t$ranking_available = array();\n\n\tswitch ($pub_order_by) {\n\t\tcase \"general\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"fleet\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\tbreak;\n\t\tcase \"research\":\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_RESEARCH, \"arrayname\" => \"research\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_POINTS, \"arrayname\" => \"general\");\n\t\t$table[] = array(\"tablename\" => TABLE_RANK_PLAYER_FLEET, \"arrayname\" => \"fleet\");\n\t\tbreak;\n\t}\n\t$i=0;\n\n\tif (!isset($pub_date)) {\n\t\t$request = \"select max(datadate) from \".$table[$i][\"tablename\"];\n\t\t$result = $db->sql_query($request);\n\t\tlist($last_ranking) = $db->sql_fetch_row($result);\n\t}\n\telse $last_ranking = $pub_date;\n\n\t$request = \"select rank, player, ally, points, username\";\n\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t$request .= \" on sender_id = user_id\";\n\t$request .= \" where rank between \".$limit_down.\" and \".$limit_up;\n\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t$request .= \" order by rank\";\n\t$result = $db->sql_query($request);\n\n\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t$order[$rank] = $player;\n\t\t}\n\t}\n\n\t$request = \"select distinct datadate from \".$table[$i][\"tablename\"].\" order by datadate desc\";\n\t$result_2 = $db->sql_query($request);\n\twhile ($row = $db->sql_fetch_assoc($result_2)) {\n\t\t$ranking_available[] = $row[\"datadate\"];\n\t}\n\n\tfor ($i ; $i<3 ; $i++) {\n\t\treset($ranking);\n\t\twhile ($value = current($ranking)) {\n\t\t\t$request = \"select rank, player, ally, points, username\";\n\t\t\t$request .= \" from \".$table[$i][\"tablename\"].\" left join \".TABLE_USER;\n\t\t\t$request .= \" on sender_id = user_id\";\n\t\t\t$request .= \" where player = '\".mysql_real_escape_string(key($ranking)).\"'\";\n\t\t\t$request .= isset($last_ranking) ? \" and datadate = \".mysql_real_escape_string($last_ranking) : \"\";\n\t\t\t$request .= \" order by rank\";\n\t\t\t$result = $db->sql_query($request);\n\n\t\t\twhile (list($rank, $player, $ally, $points, $username) = $db->sql_fetch_row($result)) {\n\t\t\t\t$ranking[$player][$table[$i][\"arrayname\"]] = array(\"rank\" => $rank, \"points\" => $points);\n\t\t\t\t$ranking[$player][\"ally\"] = $ally;\n\t\t\t\t$ranking[$player][\"sender\"] = $username;\n\n\t\t\t\tif ($pub_order_by == $table[$i][\"arrayname\"]) {\n\t\t\t\t\t$order[$rank] = $player;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext($ranking);\n\t\t}\n\t}\n\n\t$ranking_available = array_unique($ranking_available);\n\n\treturn array($order, $ranking, $ranking_available);\n}", "function viewTeamStatistics() {\n global $user;\n $params = drupal_get_query_parameters();\n $UID = $user->uid;\n\n if (isset($params['TID'])){\n $TID = $params['TID'];\n $team = dbGetTeam($TID);\n $teamNumber = $team['number'];\n } else {\n $currentTeam = getCurrentTeam();\n $TID = $currentTeam['TID'];\n $teamNumber = $currentTeam['number'];\n }\n\n // checks if team has permission to acces page\n if (teamIsIneligible($TID)) {\n drupal_set_message('Your team does not have permission to access this page.', 'error');\n drupal_goto($_SERVER['HTTP_REFERER']);\n }\n \n $markup = \"<script src=\\\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.js\\\"></script>\";\n $markup .= '<script src=\"numberCounting.js\"></script>';\n // create table and header\n $markup .= '<table id=\"teamStats\"><tr><td colspan=\"2\" style=\"text-align:center\">';\n \n $markup .= '<div class=\"help tooltip1\">';\n $markup .= '<h2><b>Team Stats</b></h2>';\n $markup .= '<span id=\"helptext\"; class=\"helptext tooltiptext1\">';\n $markup .= 'These are the total numbers of hours and outreaches your team has inputted into CROMA.';\n $markup .= '</span></div>';\n $markup .= '</td></tr>';\n\n // links to all team outreach page\n $markup .= '<tr><td style=\"text-align:center\"><a href=\"?q=outreach&allTeamOutreach\"><b>HOURS</b></a></td>';\n $markup .= '<td style=\"text-align:center\"><a href=\"?q=outreach&allTeamOutreach\"><b>OUTREACHES</b></a></td></tr>';\n $markup .= '<tr style=\"font-size:48pt; font-family: \"Open Sans\", sans-serif;\"><td style=\"text-align:center\"><b class=\"countUp\">' . dbGetHoursForTeam($TID) . '</a></b></td>';\n $markup .= '<td style=\"text-align:center\"><b class=\"countUp\">' . dbGetNumOutreachForTeam($TID);\n $markup .= '</b></td></tr></table>';\n\n return array('#markup' => $markup);\n}", "public function printOut() {\n\t\t$html = new Html(\"\");\n\t\t$html->printTeamOut($this->challengeId, $this->challengeName, $this->challengeAmount);\n\t}", "function xstats_displayAllFights( $gameId ) {\n include ('../../inc.conf.php');\n echo '<br><h4>Liste aller Raumk&auml;mpfe nach Runden</h4>';\n $query = \"SELECT * FROM skrupel_xstats_ships ships,skrupel_xstats_shipvsship shipvsship WHERE shipvsship.shipid=ships.shipid AND (shipvsship.fightresult=2 OR shipvsship.fightresult=3) AND shipvsship.gameid=\".$gameId.\" AND ships.gameid=\".$gameId.\" ORDER BY turn,shipvsship.id\";\n $result = @mysql_query( $query ) or die(mysql_error());\n echo '<table class=\"shiptable\" border=\"0\">';\n echo '<tr><th>Runde</th><th colspan=\"3\">Kampf</th><th>H&uuml;llenschaden</tr>';\n while ($row = mysql_fetch_array($result)) {\n echo \"<tr>\";\n //turn\n echo '<td class=\"highlight\">'.$row['turn'].'</td>';\n echo '<td>';\n //get victorous ship\n $query = \"SELECT * FROM skrupel_xstats_ships WHERE gameid=\".$gameId.\" AND shipid=\".$row['enemyshipid'];\n $victoryResult = @mysql_query( $query ) or die(mysql_error());\n $victoryRow = mysql_fetch_array($victoryResult);\n echo xstats_getShipFullDescription( $gameId, $victoryRow['shipid'], $victoryRow['shiprace'], $victoryRow['picturesmall'], $victoryRow['experience'], $row['turn'],$victoryRow['shipclass'],$victoryRow['shipname']);\n echo '</td><td>';\n if( $row['fightresult'] == 2) {\n $turnToUse = $row['turn'];\n echo ' zerst&ouml;rt ';\n }else {\n echo ' erobert ';\n //display the formerly owner of this ship\n $turnToUse = $row['turn']-1;\n }\n echo '</td><td>';\n echo xstats_getShipFullDescription( $gameId, $row['shipid'], $row['shiprace'], $row['picturesmall'], $row['experience'], $turnToUse,$row['shipclass'],$row['shipname']);\n echo '</td>';\n //get hull damage of winning ship\n $query = \"SELECT * FROM skrupel_xstats_shipvsship WHERE shipid=\".$row['enemyshipid'].\" AND enemyshipid=\".$row['shipid'].\" AND gameid=\".$gameId;\n $winnerResult = @mysql_query( $query ) or die(mysql_error());\n $winnerResult = mysql_fetch_array($winnerResult);\n $hullDamage = $winnerResult['hulldamage'];\n echo '<td>'.$hullDamage.'%';\n //hull damage bar\n echo '<div class=\"hulldamage\">';\n echo '<div style=\"width: '.(100-$hullDamage).'%\"></div>';\n echo '</div>';\n echo '</td>';\n echo \"</tr>\";\n }\n echo '</table>';\n}", "function ShowTeamShowPlayers($team_id,$team_sub_id,$game_id,$mode = 1,$allowed_player_id = 0){\n\t\n\tglobal $db_league_players,$db_admin,$db_admin_guids,$db_clan_games;\n\t\n\tif ($mode == 2){\n\t\t$admin_guids = \"\";\n\t\t$sub_team = \"\";\n\t} else {\n\t\t$res_game = mysql_query(\"SELECT clan_games_game FROM $db_clan_games WHERE clan_games_id = \".(integer)$game_id) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t\t$ar_game = mysql_fetch_array($res_game);\n\t\t$sub_team = \"<tr style=\\\"background: #DCE3F1;\\\">\\n\";\n\t\t$sub_team .= \"\t<td colspan=\\\"5\\\" class=\\\"eden_title_middle\\\">Sub Team - \".$ar_game['clan_games_game'].\"</td>\\n\";\n\t \t$sub_team .= \"</tr>\\n\";\n\t}\n\t$output = $sub_team;\n\t$res_player = mysql_query(\"\n\tSELECT a.admin_id, a.admin_nick, a.admin_team_own_id, ag.admin_guid_guid, lp.league_player_id, lp.league_player_position_captain, lp.league_player_position_assistant, lp.league_player_position_player \n\tFROM $db_league_players AS lp \n\tJOIN $db_admin AS a ON a.admin_id=lp.league_player_admin_id \n\tLEFT JOIN $db_admin_guids AS ag ON ag.aid=lp.league_player_admin_id AND ag.admin_guid_game_id=\".(integer)$game_id.\" \n\tWHERE lp.league_player_team_id=\".(integer)$team_id.\" AND lp.league_player_game_id=\".(integer)$game_id) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$num = mysql_num_rows($res_player);\n\t$output .= \"<tr style=\\\"background: #ff8080;\\\">\\n\";\n\tif ($num > 0){\n\t\t$output .= \"\t<td width=\\\"120\\\" valign=\\\"middle\\\" class=\\\"eden_title_middle\\\">ID</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title_middle\\\">\"._LEAGUE_PLAYER_NICK.\"</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title_middle\\\">\"._LEAGUE_PLAYER_POSITION.\"</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title_middle\\\">\"._LEAGUE_GUID.\"</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\" class=\\\"eden_title_middle\\\"></td>\\n\";\n\t} else {\n\t\t$output .= \"\t<td colspan=\\\"5\\\" class=\\\"eden_title_middle\\\">\"._LEAGUE_TEAM_NO_PLAYER_IN_SUB.\"</td>\\n\";\n\t}\n\t$output .= \"</tr>\\n\";\n\t$cislo = 0;\n\twhile ($ar_player = mysql_fetch_array($res_player)){\n\t\tif ($cislo % 2 == 0){ $cat_class = \"cat_level2_even\";} else { $cat_class = \"cat_level2_odd\";}\n\t\t$output .= \"<tr class=\\\"\".$cat_class.\"\\\">\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\".$ar_player['admin_id'].\"</td>\\n\";\n\t\t$output .= \"\t<td width=\\\"120\\\" valign=\\\"middle\\\">\";\n\t\t\t\t\t\tif ($mode == 2){\n\t\t\t\t\t\t\t$output .= \"<img src=\\\"./images/sys_\"; \n\t\t\t\t\t\t\tif (in_array($ar_player['league_player_id'],$allowed_player_id)){\n\t\t\t\t\t\t\t\t$output .= \"yes\"; $alt = _LEAGUE_PLAYER_PLAY;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$output .= \"no\"; $alt = _LEAGUE_PLAYER_NO_PLAY;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t$output .= \".gif\\\" width=\\\"15\\\" height=\\\"15\\\" alt=\\\"\".$alt.\"\\\" title=\\\"\".$alt.\"\\\"> \"; \n\t\t\t\t\t\t} \n\t\t\t\t\t\t$output .= \"<strong>\".stripslashes($ar_player['admin_nick']).\"</strong>\";\n\t\t$output .= \"\t</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\"; \n\t\t\t\t\tif (LeagueCheckPrivileges(\"O\",$ar_player['admin_id'],$team_id,\"\") == $team_id){$output .= _LEAGUE_PLAYER_POSITION_O; $comma = \", \";} else {$comma = \"\";}\n\t\t\t\t\tif (LeagueCheckPrivileges(\"C\",$ar_player['admin_id'],$team_id,$team_sub_id) == 1){$output .= $comma._LEAGUE_PLAYER_POSITION_C;} \n\t\t\t\t\tif (LeagueCheckPrivileges(\"A\",$ar_player['admin_id'],$team_id,$team_sub_id) == 1){$output .= $comma._LEAGUE_PLAYER_POSITION_A;} \n\t\t\t\t\tif (LeagueCheckPrivileges(\"P\",$ar_player['admin_id'],$team_id,$team_sub_id) == 1){$output .= $comma._LEAGUE_PLAYER_POSITION_P;} \n\t\t$output .= \"\t</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\">\"; if ($ar_player['admin_guid_guid'] != \"\"){ $output .= stripslashes($ar_player['admin_guid_guid']);} else {$output .= \"<span class=\\\"red\\\">\"._LEAGUE_PLAYER_NO_GUID.\"</span>\";} $output .= \"</td>\\n\";\n\t\t$output .= \"\t<td align=\\\"left\\\" valign=\\\"top\\\"></td>\\n\";\n\t\t$output .= \"</tr>\\n\";\n\t\t$cislo++;\n\t}\n\t\n\treturn $output;\n}", "function show_champ($db)\n{\n global $PHP_SELF,$bluebdr,$greenbdr,$yellowbdr;\n\n if (!$db->Exists(\"SELECT * FROM champions\")) {\n echo \"<p>The Champions database is being edited. Please check back shortly.</p>\\n\";\n return;\n } else {\n\n\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \"<tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \"<tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n echo \" <font class=\\\"10px\\\">You are here:</font> <a href=\\\"/index.php\\\">Home</a> &raquo; <font class=\\\"10px\\\">Champions</font></p>\\n\";\n echo \" </td>\\n\";\n //echo \" <td align=\\\"right\\\" valign=\\\"top\\\">\\n\";\n //require (\"includes/navtop.php\");\n //echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n\n echo \"<b class=\\\"16px\\\">Historical Champions</b><br><br>\\n\";\n\n //////////////////////////////////////////////////////////////////////////////////////////\n // League Champions List\n //////////////////////////////////////////////////////////////////////////////////////////\n// 8-Oct-2015 10:30pm - Modified SQL to get the ChampTeam2 and ChampTeam3, and used LEFT JOINs\n $db->Query(\"\n SELECT\n ch.*,\n te.TeamName, te.TeamAbbrev, te.TeamID, \n\t\t\t\tte2.TeamName as TeamName2, te2.TeamAbbrev as TeamAbbrev2, te2.TeamID as TeamID2, \n\t\t\t\tte3.TeamName as TeamName3, te3.TeamAbbrev as TeamAbbrev3, te3.TeamID as TeamID3,\n se.*\n FROM\n champions ch\n INNER JOIN\n teams te ON ch.ChampTeam = te.TeamID\n\t\t\tLEFT JOIN\n teams te2 ON ch.ChampTeam2 = te2.TeamID\n\t\t\tLEFT JOIN\n teams te3 ON ch.ChampTeam3 = te3.TeamID\n\t\t\tINNER JOIN \n seasons se ON ch.ChampSeason = se.SeasonID\n WHERE\n se.SeasonName NOT LIKE '%KO%'\n ORDER BY\n se.SeasonName DESC\n \");\n \n\n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bordercolor=\\\"$bluebdr\\\" align=\\\"center\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"$bluebdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">&nbsp;LEAGUE CHAMPIONS LIST</td>\\n\";\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"#FFFFFF\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\" colspan=\\\"2\\\">\\n\";\n\n echo \" <table width=\\\"100%\\\" cellspacing=\\\"1\\\" cellpadding=\\\"3\\\" class=\\\"tablehead\\\">\\n\"; \n\n echo \"<tr class=\\\"colhead\\\">\\n\"; \n echo \" <td align=\\\"left\\\" width=\\\"40%\\\"><b>SEASON</b></td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>Champion</b></td>\\n\"; // 8-Oct-2015 10:30pm\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>Runners</b></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>3rd</b></td>\\n\";\n echo \"</tr>\\n\";\n \n for ($x=0; $x<$db->rows; $x++) {\n $db->GetRow($x);\n \n // setup variables\n\n $tna = $db->data['TeamName'];\n $tab = $db->data['TeamAbbrev'];\n $sn = $db->data['SeasonName'];\n $tid = $db->data['TeamID'];\n \n\t\t$tna2 = $db->data['TeamName2']; // 8-Oct-2015 10:30pm\n $tab2 = $db->data['TeamAbbrev2'];\n $tid2 = $db->data['TeamID2'];\n\t\t\n\t\t$tna3 = $db->data['TeamName3']; // 8-Oct-2015 10:30pm\n $tab3 = $db->data['TeamAbbrev3'];\n $tid3 = $db->data['TeamID3'];\n\t\t\n echo '<tr class=\"trrow', ($x % 2 ? '1' : '2'), '\">';\n// 1-Mar-2010 - removed the words League Champions. \n echo \" <td align=\\\"left\\\" width=\\\"40%\\\">$sn</td>\\n\";\n// echo \" <td align=\\\"left\\\" width=\\\"40%\\\">$sn League Champions</td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid&ccl_mode=1\\\">$tab</a></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid2&ccl_mode=1\\\">$tab2</a></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid3&ccl_mode=1\\\">$tab3</a></td>\\n\";\n echo \"</tr>\\n\";\n \n }\n\n echo \"</table>\\n\";\n\n echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table><br>\\n\";\n \n //////////////////////////////////////////////////////////////////////////////////////////\n // KO Champions List\n //////////////////////////////////////////////////////////////////////////////////////////\n// 8-Oct-2015 10:30pm - Modified SQL to get the ChampTeam2 and ChampTeam3, and used LEFT JOINs\n\n $db->Query(\"\n SELECT\n ch.*,\n te.TeamName, te.TeamAbbrev, te.TeamID,\n\t\t\t\tte2.TeamName as TeamName2, te2.TeamAbbrev as TeamAbbrev2, te2.TeamID as TeamID2, \n\t\t\t\tte3.TeamName as TeamName3, te3.TeamAbbrev as TeamAbbrev3, te3.TeamID as TeamID3,\t\t\t\t\n se.*\n FROM\n champions ch\n INNER JOIN\n teams te ON ch.ChampTeam = te.TeamID\n\t\t\tLEFT JOIN\n teams te2 ON ch.ChampTeam2 = te2.TeamID\n\t\t\tLEFT JOIN\n teams te3 ON ch.ChampTeam3 = te3.TeamID\n INNER JOIN \n seasons se ON ch.ChampSeason = se.SeasonID\n WHERE\n se.SeasonName LIKE '%KO%'\n ORDER BY\n se.SeasonName DESC\n \");\n \n\n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bordercolor=\\\"$greenbdr\\\" align=\\\"center\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"$greenbdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">&nbsp;KNOCKOUT CHAMPIONS LIST</td>\\n\";\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"#FFFFFF\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\" colspan=\\\"2\\\">\\n\";\n\n echo \" <table width=\\\"100%\\\" cellspacing=\\\"1\\\" cellpadding=\\\"3\\\" class=\\\"tablehead\\\">\\n\"; \n\n echo \"<tr class=\\\"colhead\\\">\\n\"; \n echo \" <td align=\\\"left\\\" width=\\\"40%\\\"><b>SEASON</b></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>Champion</b></td>\\n\"; // 8-Oct-2015 10:30pm\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>Runners</b></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><b>3rd</b></td>\\n\";\n echo \"</tr>\\n\";\n\n for ($x=0; $x<$db->rows; $x++) {\n $db->GetRow($x);\n \n // setup variables\n\n $tna = $db->data['TeamName'];\n $tab = $db->data['TeamAbbrev'];\n $sn = $db->data['SeasonName'];\n $tid = $db->data['TeamID'];\n \n\t\t$tna2 = $db->data['TeamName2']; // 8-Oct-2015 10:30pm\n $tab2 = $db->data['TeamAbbrev2'];\n $tid2 = $db->data['TeamID2'];\n\t\t\n\t\t$tna3 = $db->data['TeamName3']; // 8-Oct-2015 10:30pm\n $tab3 = $db->data['TeamAbbrev3'];\n $tid3 = $db->data['TeamID3'];\n\t\t\n echo '<tr class=\"trrow', ($x % 2 ? '1' : '2'), '\">';\n// 1-Mar-2010 - removed the words League Champions. \necho \" <td align=\\\"left\\\" width=\\\"40%\\\">$sn</td>\\n\";\n// echo \" <td align=\\\"left\\\" width=\\\"40%\\\">$sn League Champions</td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid&ccl_mode=1\\\">$tab</a></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid2&ccl_mode=1\\\">$tab2</a></td>\\n\";\n\t\techo \" <td align=\\\"left\\\" width=\\\"20%\\\"><a href=\\\"/teamdetails.php?teams=$tid3&ccl_mode=1\\\">$tab3</a></td>\\n\";\n\t\t\n echo \"</tr>\\n\";\n \n }\n\n echo \"</table>\\n\";\n\n echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n \n\n echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n }\n}", "function getRankingsTableString($user_id, $viewmore = true, $viewresults = 10, $viewlink, $page=0, $filter=null, $filterparam=null)\n{\n $rankings_results = contest_query(\"select_rankings\");\n // If query fails\n if (!$rankings_results) {\n return \"<p>Rankings are not available at the moment. Check back soon!</p>\";\n }\n\n $table = \"\";\n if ($filter != NULL) {\n $table .= \"<a href=\\\"rankings.php\\\">&#0171; Back to Main Leaderboard</a>\";\n }\n\n$table .= <<<EOT\n<table class=\"leaderboard\">\n<thead>\n<tr>\n <th>Rank</th>\n <!--<th>Score</th>-->\n <th>Username</th>\n <th>Country</th>\n <th>Organization</th>\n <th>Language</th>\n <th>Skill</th>\n <!--<th>Wins</th>-->\n <!--<th>Losses</th>-->\n <!--<th>Draws</th>-->\n</tr>\n</thead>\n<tbody>\nEOT;\n $old_score = 999999;\n $old_rank = -1;\n for ($i = 1; $row = mysql_fetch_assoc($rankings_results); $i += 1) {\n $username = htmlentities($row[\"username\"], ENT_COMPAT, 'UTF-8');\n $programming_language = $row[\"programming_language\"];\n\t$score = $row[\"skill\"];\n $programming_language_link = urlencode($row[\"programming_language\"]);\n $rank = $row[\"rank\"];\n\tif ($score == $old_score) {\n\t $rank = $old_rank;\n\t}\n\t$old_score = $score;\n\t$old_rank = $rank;\n $rank = ($filter == null)? $rank : ($i + $offset) . \" <span title='Global Rank'>($rank)</span>\";\n $rank_percent = $row[\"rank_percent\"];\n $wins = $row[\"wins\"];\n $losses = $row[\"losses\"];\n $draws = $row[\"draws\"];\n $flag_filename = $row[\"flag_filename\"];\n $country_id = $row[\"country_id\"];\n $country_name = $row[\"country_name\"];\n $country_name = $country_name == NULL ? \"Unknown\" : htmlentities($country_name, ENT_COMPAT, 'UTF-8');\n $org_name = htmlentities($row[\"org_name\"], ENT_COMPAT, 'UTF-8');\n $org_id = $row[\"org_id\"];\n $user_id = $row[\"user_id\"];\n $row_class = $i % 2 == 0 ? \"even\" : \"odd\";\n $flag_filename = $flag_filename == NULL ? \"unk.png\" : $flag_filename;\n $flag_filename = \"<img alt=\\\"$country_name\\\" width=\\\"16\\\" height=\\\"11\\\" title=\\\"$country_name\\\" src=\\\"flags/$flag_filename\\\" />\";\n if (current_username() == $username) {\n $table .= \" <tr class=\\\"$row_class, user\\\">\\n\";\n } else {\n $table .= \" <tr class=\\\"$row_class\\\">\\n\";\n }\n $table .= \" <td>$rank</td>\\n\";\n //$table .= \" <td>$rank_percent</td>\\n\";\n $table .= \" <td><a href=\\\"profile.php?user= $user_id\\\">$username</a></td>\\n\";\n $table .= \" <td><a href=\\\"country_profile.php?country=$country_id\\\">$flag_filename</a></td>\";\n $table .= \" <td><a href=\\\"organization_profile.php?org=$org_id\\\">$org_name</a></td>\";\n $table .= \" <td><a href=\\\"language_profile.php?language=$programming_language_link\\\">$programming_language</a></td>\";\n\t$table .= \" <td>$score</td>\";\n //$table .= \" <td>$wins</td>\";\n //$table .= \" <td>$losses</td>\";\n //$table .= \" <td>$draws</td>\";\n $table .= \" </tr>\\n\";\n }\n $table .= \"</tbody></table>\";\n if (!$viewmore) {\n $table .= $pagination;\n }\n if ($viewmore && $rowcount > $viewresults) {\n $table .= \"<a href=\\\"$viewlink\\\">View More</a>\";\n }\n return $table;\n}", "function xstats_displayMaxValueListMisc($gameId) {\n echo( \"<H3>Spitzenwerte im Spiel</H3>\");\n $statsAvailablePlayerIndicies = xstats_getAvailablePlayerIndicies($gameId);\n $statsMaxTurn = xstats_getMaxTurn($gameId);\n echo( xstats_displayMaxSum( $gameId, 'coloniestakencount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxValue( $gameId, 'planetcount') );\n echo( xstats_displayMaxValue( $gameId, 'colonistcount') );\n echo( xstats_displayMaxValue( $gameId, 'cantoxcount') );\n echo( xstats_displayMaxValue( $gameId, 'lemincount') );\n echo( xstats_displayMaxValue( $gameId, 'factorycount') );\n echo( xstats_displayMaxValue( $gameId, 'minescount') );\n xstats_displayMaxWaitTime( $gameId );\n}", "function xstats_displayShipsExpFreighter( $gameId, $maxRows) {\n include ('../../inc.conf.php');\n $maxTurn = xstats_getMaxTurn($gameId);\n $result = @mysql_query(\"SELECT * FROM skrupel_xstats_ships WHERE gameId='\".$gameId.\"' AND beamcount=0 AND hangarcount=0 AND tubecount=0 ORDER BY experience DESC\") or die(mysql_error());\n echo '<br><h4>Die erfahrensten Besatzungen (Frachter):</h4>';\n echo '<table class=\"shiptable\" border=\"0\">';\n echo '<tr><th>Schiff</th><th>Herstellungsort</th><th>In Betrieb</th></tr>';\n $counter = 0;\n while ($counter++ < $maxRows && $row = mysql_fetch_array($result)) {\n if( $row['untilturn'] == '0' || $row['untilturn'] == 0) {\n $untilTurn = $maxTurn;\n }else {\n $untilTurn = $row['untilturn'];\n }\n echo '<tr>';\n //ship\n echo '<td>'.xstats_getShipFullDescription( $gameId, $row['shipid'], $row['shiprace'], $row['picturesmall'], $row['experience'], $untilTurn,$row['shipclass'],$row['shipname']).'</td>';\n //home planet\n $planetOwnerIndex = xstats_getShipOwnerIndexAtTurn($gameId, $row['shipid'], $row['sinceturn']);\n echo '<td>'.xstats_getPlanetDescription( $gameId, $row['buildposx'], $row['buildposy'], $planetOwnerIndex, $row['buildplanetname'] ).'</td>';\n //from-to\n echo '<td>Runde '.$row['sinceturn'].'-'.$untilTurn.'</td>';\n echo '</tr>';\n }\n echo '</table>';\n}", "function timeline($json){\n\tforeach ($json['order'] as $turn => $player) {\n\t\tif($player == $json['proposer']){\n\t\t\t$turn_class = \" turn\";\n\t\t} else {\n\t\t\t$turn_class = \"\";\n\t\t}\n\t\tif($player==$json['proposer']){\n\t\t\techo \"<div class='mini_mini_badge current_player$turn_class'>\" . ($player+1) . \"</div>\";\n\t\t} else {\n\t\t\techo \"<div class='mini_mini_badge style_\" . ($player+1) . \"$turn_class'>\" . ($player+1) . \"</div>\";\n\t\t}\n\t}\n\techo \" &nbsp; &nbsp; \";\n\t// display for rounds\n\tfor ($i=1; $i <= 3; $i++) {\n\t\tif($json['proposer']==count($json['order'])&&$json['stage']=='results'){\n\t\t\tif($i<$json['round']){\n\t\t\t\techo \"<div class='round'>&nbsp;</div>\";\n\t\t\t} else {\n\t\t\t\techo \"<div class='round future_round'>&nbsp;</div>\";\n\t\t\t}\n\t\t} else {\n\t\t\tif($i<=$json['round']){\n\t\t\t\techo \"<div class='round'>&nbsp;</div>\";\n\t\t\t} else {\n\t\t\t\techo \"<div class='round future_round'>&nbsp;</div>\";\n\t\t\t}\n\t\t}\n\t}\n}", "function checkteam($team) {\n\t$result = $team->list_members();\n\tif (count($result) < 3) {\n\t\tprint <<<EOT\n<h1>Edit Match</h1>\n<p>\nSorry but there are not enough members in {$team->display_name()} yet to\nmake up a match with.</p>\n<p>Please <a href=\"javascript:history.back()\">click here</a> to go back\nor <a href=\"teamsupd.php\">here</a> to update teams.</p>\n\nEOT;\n\t\tlg_html_footer();\n\t\texit(0);\n\t}\n\tforeach ($result as $p) {\n\t\t$p->fetchdets();\n\t}\n\treturn $result;\n}", "function xstats_displayShipFightsByShip( $gameId, $maxRows) {\n include ('../../inc.conf.php');\n $maxTurn = xstats_getMaxTurn($gameId);\n $query = \"SELECT * FROM skrupel_xstats_ships WHERE gameid=\".$gameId.\" AND victories > 0\";\n $result = @mysql_query($query) or die(mysql_error());\n echo '<br><h4>Liste der Raumk&auml;mpfe nach Produktionsrunde der Schiffe:</h4>';\n echo '<table class=\"shiptable\" border=\"0\">';\n echo '<tr><th>Schiff</th><th>Siege</th><th>In Betrieb</th><th>Antriebe</th><th>Laser</th><th>Torp</th><th>Hangar</th></tr>';\n while ($row = mysql_fetch_array($result)) {\n //dont display ships without victory\n if( $row['victories'] == 0 ) {\n break;\n }\n echo '<tr>';\n //ship\n echo '<td>'.xstats_getShipFullDescription( $gameId, $row['shipid'], $row['shiprace'], $row['picturesmall'], $row['experience'], $row['untilturn'], $row['shipclass'], $row['shipname']).'</td>';\n //victory count\n echo '<td>'.$row['victories'].'</td>';\n //from-to\n if( $row['untilturn'] == '0' || $row['untilturn'] == 0) {\n $untilTurn = $maxTurn;\n }else {\n $untilTurn = $row['untilturn'];\n }\n echo '<td class=\"highlight\">Runde '.$row['sinceturn'].'-'.$untilTurn.'</td>';\n //engine\n $levelEngine = $row['levelengine'];\n if( $levelEngine == 8 ) {\n $levelEngine = 7;\n }\n echo '<td>'.$row['enginecount'].'* Lvl '.$levelEngine.'</td>';\n //laser\n if( $row['beamcount'] == 0 ) {\n echo( \"<td>0</td>\");\n }\n else {\n echo '<td>'.$row['beamcount'].'* Lvl '.$row['levelbeam'].'</td>';\n }\n //tubes\n if( $row['tubecount'] == 0 ) {\n echo( \"<td>0</td>\");\n }\n else {\n echo '<td>'.$row['tubecount'].'* Lvl '.$row['leveltube'].'</td>';\n }\n //hangar\n echo '<td>'.$row['hangarcount'].'</td>';\n echo '</tr>';\n $query = \"SELECT * FROM skrupel_xstats_ships ships,skrupel_xstats_shipvsship shipvsship WHERE shipvsship.shipid=ships.shipid AND (shipvsship.fightresult=2 OR shipvsship.fightresult=3) AND enemyshipid=\".$row['shipid'].\" AND shipvsship.gameid=\".$gameId.\" AND ships.gameid=\".$gameId.\" ORDER BY turn\";\n $victoryResult = @mysql_query( $query ) or die(mysql_error());\n while ($victoryRow = mysql_fetch_array($victoryResult)) {\n echo \"<tr>\";\n echo \"<td></td>\";\n echo '<td colspan=\"6\">';\n if( $victoryRow['fightresult'] == 2) {\n echo 'Zerst&ouml;rt ';\n $usedTurn = $victoryRow['turn'];\n }else {\n echo 'Erobert ';\n $usedTurn = $victoryRow['turn']-1;\n }\n echo xstats_getShipFullDescription( $gameId, $victoryRow['shipid'], $victoryRow['shiprace'], $victoryRow['picturesmall'], $victoryRow['experience'], $usedTurn, $victoryRow['shipclass'],$victoryRow['shipname']);\n echo ' in Runde '.$victoryRow['turn'];\n echo '</td>';\n echo \"</tr>\";\n }\n //find out who captured the ship\n $query = \"SELECT * FROM skrupel_xstats_shipvsship WHERE shipid=\".$row['shipid'].\" AND fightresult=3 AND gameid=\".$gameId;\n $captureResult = @mysql_query( $query ) or die(mysql_error());\n if( mysql_num_rows($captureResult)>0 ) {\n while($captureRow = mysql_fetch_array($captureResult)) {\n $captureInfoResult = @mysql_query(\"SELECT * FROM skrupel_xstats_ships WHERE gameId='\".$gameId.\"' AND shipid=\".$captureRow['enemyshipid']) or die(mysql_error());\n $captureInfoRow = mysql_fetch_array($captureInfoResult);\n echo \"<tr>\";\n echo \"<td></td>\";\n echo '<td colspan=\"6\">';\n echo 'Wurde erobert von '.xstats_getShipFullDescription( $gameId, $captureInfoRow['shipid'], $captureInfoRow['shiprace'], $captureInfoRow['picturesmall'], $captureInfoRow['experience'], $captureInfoRow['turn'],$captureInfoRow['shipclass'],$captureInfoRow['shipname']);\n echo ' in Runde '.$captureRow['turn'];\n echo '</td>';\n echo '</tr>';\n }\n }\n //find out who destroyed the ship finally\n $query = \"SELECT * FROM skrupel_xstats_shipvsship WHERE shipid=\".$row['shipid'].\" AND fightresult=2 AND gameid=\".$gameId;\n $destroyerResult = @mysql_query( $query ) or die(mysql_error());\n if( mysql_num_rows($destroyerResult)>0 ) {\n $destroyerRow = mysql_fetch_array($destroyerResult);\n $destroyerInfoResult = @mysql_query(\"SELECT * FROM skrupel_xstats_ships WHERE gameId='\".$gameId.\"' AND shipid=\".$destroyerRow['enemyshipid']) or die(mysql_error());\n $destroyerInfoRow = mysql_fetch_array($destroyerInfoResult);\n echo \"<tr>\";\n echo \"<td></td>\";\n echo '<td colspan=\"6\">';\n echo 'Wurde zerst&ouml;rt von '.xstats_getShipFullDescription( $gameId, $destroyerInfoRow['shipid'], $destroyerInfoRow['shiprace'], $destroyerInfoRow['picturesmall'], $destroyerInfoRow['experience'], $destroyerRow['turn'],$destroyerInfoRow['shipclass'],$destroyerInfoRow['shipname']);\n echo ' in Runde '.$destroyerRow['turn'];\n echo '</td>';\n echo '</tr>';\n }else {\n //perhaps destroyed by planetary defense?\n $query = \"SELECT * FROM skrupel_xstats_shipvsplanet WHERE shipid=\".$row['shipid'].\" AND eventtype=1 AND gameid=\".$gameId;\n $destroyerInfoResult = @mysql_query( $query ) or die(mysql_error());\n if( mysql_num_rows($destroyerInfoResult)>0 ) {\n $destroyerInfoRow = mysql_fetch_array($destroyerInfoResult);\n echo \"<tr>\";\n echo \"<td></td>\";\n echo '<td colspan=\"6\">';\n echo 'Wurde zerst&ouml;rt von '.xstats_getPlanetDescription( $gameId, $destroyerInfoRow['posx'], $destroyerInfoRow['posy'], $destroyerInfoRow['planetownerindex'], $row['buildplanetname']).' (Planetare Verteidigung)';\n echo ' in Runde '.$destroyerRow['turn'];\n echo '</td>';\n echo '</tr>';\n }\n }\n }\n echo '</table>';\n}", "function whoWins(){\n $winners = array();\n $n = 100;\n for($i=0;$i<=$n;$i++){\n $winner = playTournament();\n if(!isset($winners[$winner])){\n $winners[$winner] = 1;\n } else {\n $winners[$winner] += 1;\n }\n }\n arsort($winners);\n foreach($winners as $key=>$value){\n echo $key.' '.$value.\"\\n\";\n }\n}", "function gaMatch_getResultString($appGlobals, $roster, $pSep = ' ,') {\n $s = '';\n $sSep = '';\n for ($i=0; $i < $this->game_opponents_count; ++$i) {\n //$kidPeriod = $appGlobals->rst_cur_period->perd_getKidPeriodObject($this->game_opponents_kidPeriodId[$i]);\n //$kidName = ($kidPeriod==NULL) ? '***' : $kidPeriod->kidPer_kidObject->rstKid_uniqueName;\n $kidName = $roster->rst_cur_period->perd_getKidUniqueName($this->game_opponents_kidPeriodId[$i]);\n $sep = '';\n $s1 = '';\n $tot = $this->game_opponents_wins[$i] + $this->game_opponents_losts[$i] + $this->game_opponents_draws[$i];\n if ($this->game_opponents_wins[$i] > 0) {\n $s1 = ($this->game_opponents_wins[$i] + $tot == 2)? 'Won' : ' Won ' . $this->game_opponents_wins[$i] ;\n $sep = ', ';\n }\n if ($this->game_opponents_losts[$i] > 0) {\n $lost = ($this->game_opponents_losts[$i] + $tot == 2)? 'Lost' : ' Lost ' . $this->game_opponents_losts[$i] ;\n $s1 .= $sep . $lost;\n $sep = ', ';\n }\n if ($this->game_opponents_draws[$i] > 0) {\n $draw = ($this->game_opponents_draws[$i] + $tot == 2)? 'Draw' : ' Draw ' . $this->game_opponents_draws[$i];\n $s1 .= $sep . $draw; ;\n $sep = ', ';\n }\n $s .= $sSep . $kidName . ' (' . $s1 . ')';\n $sSep = $pSep;\n }\n return $s;\n //return kcmRosterLib_getDesc_gameType($appGlobals->gb_form->chain->chn_posted_object->sesGame->game_gameType) . ' Game Saved: ' . $s;\n}", "public function getTeam() {\n\t\t\treturn \"<p>\".$this->team.\"</p>\";\n\t\t}", "function xstats_displayMaxSum( $gameId, $colName, $maxTurn, &$xstatsAvailablePlayerIndicies ) {\n $maxValue = 0;\n $maxPlayerId = 0;\n $maxPlayerIndex = 0;\n $displayStr = \"\";\n foreach( $xstatsAvailablePlayerIndicies as $playerIndex ) {\n $computedValue = 0;\n $computedPlayerId = 0;\n $computedPlayerIndex = 0;\n for($currentTurn=1; $currentTurn<=$maxTurn; $currentTurn++) {\n $query = \"SELECT {$colName},playerid FROM skrupel_xstats WHERE playerindex={$playerIndex} AND gameid={$gameId} AND turn={$currentTurn}\";\n $result = @mysql_query($query) or die(mysql_error());\n $result = @mysql_fetch_array($result);\n $colNameResult = $result[$colName];\n if( !is_null( $colNameResult )) {\n $computedPlayerId = $result['playerid'];\n $computedPlayerIndex = $playerIndex;\n $computedValue+=$colNameResult;\n }\n }\n //new max value found\n if( $computedValue > $maxValue ) {\n $maxValue = $computedValue;\n $maxPlayerId = $computedPlayerId;\n $maxPlayerIndex = $computedPlayerIndex;\n }\n }\n if( $maxValue > 0 ) {\n if( $colName == 'lj' ) {\n $displayStr=$displayStr.\"Gr&ouml;&szlig;te Gesamtdistanz: <strong>\".$maxValue.\"</strong> Lichtjahre\";\n }else if( $colName == 'battlecount' ) {\n $displayStr=$displayStr.\"An den meisten Raumk&auml;mpfen teilgenommen: <strong>\".$maxValue.\"</strong> K&auml;mpfe\";\n }else if( $colName == 'battlewoncount' ) {\n $displayStr=$displayStr.\"Die meisten Raumk&auml;mpfe gewonnen: <strong>\".$maxValue.\"</strong> K&auml;mpfe\";\n }else if( $colName == 'battlecount-battlewoncount' ) {\n $displayStr=$displayStr.\"Die meisten Raumk&auml;mpfe verloren: <strong>\".$maxValue.\"</strong> K&auml;mpfe\";\n }else if( $colName == 'coloniestakencount' ) {\n $displayStr=$displayStr.\"Die meisten Kolonien erobert: <strong>\".$maxValue.\"</strong> Kolonien\";\n }\n include ('../../inc.conf.php');\n $displayStr = $displayStr.', erreicht durch <font color=\"'.$spielerfarbe[$maxPlayerIndex].'\"><strong>'.xstats_getPlayerNick($maxPlayerId).'</strong></font><br>';\n echo($displayStr );\n }\n}", "public function toString() {\r\n\t\t$string = \"Team: (int) id=\".$this->getId().\", (string) name='\".$this->getName().\"' \";\r\n\t\t\r\n\t\treturn $string;\r\n\t}", "function xstats_displayMaxValueShipVSShip($gameId) {\n echo( \"<H3>Spitzenwerte im Spiel</H3>\");\n $statsAvailablePlayerIndicies = xstats_getAvailablePlayerIndicies($gameId);\n $statsMaxTurn = xstats_getMaxTurn($gameId);\n echo( xstats_displayMaxSum( $gameId, 'battlecount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxSum( $gameId, 'battlewoncount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxSum( $gameId, 'battlecount-battlewoncount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n}", "function game_play($link) {\r\n echo '<br />'; \r\n if ($this->grid_size > 3) {\r\n \r\n }\r\n echo '<font face = \"courier\" size = \"5\">';\r\n echo '<table cols = \"' . ($this->debug ? $this->grid_size + 2 : $this->grid_size) . '\" border = \"1\" style = \"font-weight:bold; border-collapse: collapse\">';\r\n if ($this->debug) {\r\n echo '<thead><tr><th></th>';\r\n for ($col = 1; $col <= $this->grid_size; $col++) {\r\n echo '<th style=\"padding: 5px;\"> Column ' . $col . '</th>';\r\n }\r\n echo '<th></th></tr></thead>';\r\n echo '<tfoot><tr><th></th>';\r\n for ($col = 1; $col <= $this->grid_size; $col++) {\r\n echo '<th> Column ' . $col . '</th>';\r\n }\r\n echo '<th></th></tr></tfoot>';\r\n }\r\n echo '<tbody><tr>';\r\n $row = 1; \r\n if ($this->debug) {\r\n echo '<th style=\"padding: 5px;\">Row ' . $row . '</th>';\r\n }\r\n for ($pos = 0; $pos < pow($this->grid_size, 2); $pos++) {\r\n if ($link) {\r\n echo $this->show_cell($pos);\r\n } else {\r\n\t\t\t\t\r\n\t\t\t\t\t echo '<td style=\"text-align:center;' . (in_array($pos, $this->winning_line[0]) ? ' background-color: #90EE90;' : ' opacity: 0.5;' ) . '\"><div style=\"padding: 1em;\">' . $this->position[$pos] . ($this->debug ? ('<br /><span style=\"font-size:66%;\">' . $pos . ':(' . $row . ',' . (($pos % $this->grid_size) + 1) . ')</span>') : '') . '</div></td>';\r\n\t\t\t\t\t\r\n\t\t\t}\r\n if (($pos + 1) % $this->grid_size == 0) {\r\n if ($this->debug) {\r\n echo '<th style=\"padding: 5px;\">Row ' . $row++ . '</th>';\r\n }\r\n if (($pos + 1) != pow($this->grid_size, 2)) {\r\n echo '</tr><tr>';\r\n if ($this->debug) {\r\n echo '<th style=\"padding: 5px;\">Row ' . $row . '</th>';\r\n }\r\n }\r\n }\r\n }\r\n echo '</tr></tbody>';\r\n echo '</table>';\r\n echo '</font>';\r\n echo '<br /><hr />';\r\n }", "function getCountryRankingsTableString($top)\n{\n\n $username = current_username();\n\n if ($username !== null) {\n // Fetch Country ID for logged in user\n $user_query = <<<EOT\nselect\n u.country_id\nfrom\n user u\nwhere\n username = '$username'\nEOT;\n\n $user_country_data = mysql_query($user_query);\n if ($user_country_data) {\n list ($user_country_id) = mysql_fetch_row($user_country_data);\n } else {\n $user_country_id = -1;\n }\n }\n\n // Fetch Rows\n $rankings_query = <<<EOT\nselect\n c.name as country_name,\n c.country_id,\n c.flag_filename,\n count(*) as num_leaders\nfrom\n ranking r\n inner join submission s on s.submission_id = r.submission_id\n inner join user u on u.user_id = s.user_id\n inner join country c on c.country_id = u.country_id\nwhere\n r.leaderboard_id = (select max(leaderboard_id) from leaderboard\n where complete=1)\n and r.rank <= $top\ngroup by u.country_id\norder by num_leaders desc\nEOT;\n $rankings_results = mysql_query($rankings_query);\n\n // If query fails\n if (!$rankings_results) {\n return \"<p>Rankings are not available at the moment. Check back soon!</p>\";\n }\n\n $table = \"\";\n$table .= <<<EOT\n<table class=\"leaderboard\">\n<thead>\n<tr>\n <th>Rank</th>\n <th>Leaders</th>\n <th>Country</th>\n</tr>\n</thead>\n<tbody>\nEOT;\n for ($i = 1; $row = mysql_fetch_assoc($rankings_results); $i += 1) {\n $num_leaders = $row[\"num_leaders\"];\n $country_id = $row[\"country_id\"];\n $country_name = $row[\"country_name\"];\n $country_name = $country_name == NULL ? \"Unknown\" : htmlentities($country_name, ENT_COMPAT, 'UTF-8');\n $flag_filename = $row[\"flag_filename\"];\n $flag_filename = $flag_filename == NULL ? \"unk.png\" : $flag_filename;\n $flag_filename = \"<img alt=\\\"$country_name\\\" width=\\\"16\\\" height=\\\"11\\\" title=\\\"$country_name\\\" src=\\\"flags/$flag_filename\\\" />\";\n\n $row_class = $i % 2 == 0 ? \"even\" : \"odd\";\n if ($country_id == $user_country_id) {\n $table .= \" <tr class=\\\"$row_class, user\\\">\\n\";\n } else {\n $table .= \" <tr class=\\\"$row_class\\\">\\n\";\n }\n $table .= \" <td>$i</td>\\n\";\n $table .= \" <td>$num_leaders</td>\\n\";\n $table .= \" <td><a href=\\\"country_profile.php?country_id=$country_id\\\">$country_name</a></td>\";\n $table .= \" </tr>\\n\";\n }\n $table .= \"</tbody></table>\";\n return $table;\n}", "function displayBoard() {\n\tglobal $game, $output;\t\n\t$board = $game[\"board\"];\n\tif ($game[\"clicked\"] == 9) {\n\t\tfor( $i = 0; $i < 9; $i++ ) {\n\t\t\t$output .= '<td><input class=\"available\" type=\"submit\" name=\"curCell\" placeholder=\"-\" value=\"' . $i . '\"></td>';\n\t\t\tif(($i+1)% 3 == 0 && $i < 8)\n\t\t\t\t$output .= \"</tr><tr>\";\t\n\t\t}\t\t\n\t}\n\tif ($game[\"clicked\"] != 9) {\n\t\t$curWinner = checkWinner($game); //print_r($curWinner);\t\t \n\t\tfor( $i = 0; $i < 9; $i++ ) {\t\t\n\t\t\tswitch ($board[$i]) {\n\t\t\t\tcase 2:\n\t\t\t\t\t$output .= ($curWinner > 990)\n\t\t\t\t\t\t? '<td><input class=\"available\" type=\"submit\" name=\"curCell\" placeholder=\"-\" value=\"' . $i . '\"></td>'\n : \"<td class='played'></td>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\t$output .= (substr_count($curWinner, $i)) \n\t\t\t\t\t\t? \"<td class='winner'>X</td>\"\n : \"<td class='played'>X</td>\";\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$output .= (substr_count($curWinner, $i)) \n\t\t\t\t\t\t? \"<td class='winner'>O</td>\"\n : \"<td class='played'>O</td>\";\t\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t}\t\n\t\t\tif(($i+1)% 3 == 0 && $i < 8)\n\t\t\t\t$output .= \"</tr><tr>\";\t\n\t\t}\n\t} \n\treturn $output;\n}", "function showGames( $curDivision=\"\" ) {\n\n/* ... define values for template variables to display on page */\n if ($curDivision == \"\") {\n $data['title'] = \"Playoffs - \".$this->config->item( 'siteName' );\n }\n else {\n $data['title'] = \"Division \".$curDivision.\" Playoffs - \".$this->config->item( 'siteName' );\n }\n\n/* ... get the schedule details from the database */ \n if ($curDivision == \"\") { \n $data['tournDetails'] = $this->Model_Tournament->getAllDetails();\n $data['tournHeader'] = \"League Playoff Schedule\";\n }\n else {\n $data['tournDetails'] = $this->Model_Tournament->getDivDetails( $curDivision );\n $data['tournHeader'] = \"Division \".$curDivision.\" Playoff Schedule\";\n }\n\n/* ... replace seeding placeholders in the schedule with appropriate team ids */\n for ($i=0; $i < count( $data['tournDetails'] ); $i++) {\n\n if ($data['tournDetails'][$i]['Status'] == \"SCHEDULED\") {\n if ($curDivision == \"\") {\n $seedDiv = substr( $data['tournDetails'][$i]['TournamentID'], 0, 1 );\n }\n else {\n $seedDiv = $curDivision;\n }\n if ($data['tournDetails'][$i]['HomeTeamID'] == NULL && $data['tournDetails'][$i]['HomeSeed'] != NULL) {\n $teamID = $this->Model_Tournament->getSeedTeamID( $data['tournDetails'][$i]['HomeSeed'], $seedDiv );\n $data['tournDetails'][$i]['HomeTeamID'] = $teamID > 0 ? $teamID : \"\";\n }\n if ($data['tournDetails'][$i]['VisitTeamID'] == NULL && $data['tournDetails'][$i]['VisitSeed'] != NULL) {\n $teamID = $this->Model_Tournament->getSeedTeamID( $data['tournDetails'][$i]['VisitSeed'], $seedDiv );\n $data['tournDetails'][$i]['VisitTeamID'] = $teamID > 0 ? $teamID : \"\";\n }\n }\n }\n \n/* ... set the name of the page to be displayed */\n $data['main'] = \"schedule/sched_tournamentMaster\";\n\n $this->index( $data );\n \n/* ... time to go */\n return;\n }", "function getAllTeams(){\r\n /*for testing purposes only, replace with request to db\r\n return array(\r\n array(\"name\" => \"Usine\", \"score\" => 2000),\r\n array(\"name\" => \"Abattoirs\", \"score\" => 1000),\r\n array(\"name\" => \"Caserne\", \"score\" => 1200),\r\n array(\"name\" => \"Asile\", \"score\" => 5000),\r\n array(\"name\" => \"Zombie\", \"score\" => -10000)\r\n );*/\r\n\r\n //$GLOBALS['link'] = connect();\r\n $res = mysqli_query($GLOBALS['link'], 'select `id`, `name`, `score` from teams;');\r\n\r\n return fetch_result($res);\r\n}", "function showTableData($row) {\n\techo \"<tr>\";\n\techo \"\t<td>{$row['fbm_id']}</td>\";\n\techo \"\t<td>\". formatDate($row['matchDay']) .\"&nbsp;{$row['matchTimeLocal']}</td>\";\n\techo \"\t<td>{$row['city']}</td>\";\n\techo ($row['phaseName'] == 'Gruppenphase') ? \"\t<td>{$row['groupName']}</td>\" : \"\t<td></td>\";\n\techo \"\t<td>\". getTeamFlag($row['teamHomeCC']) . (($row['scoreTeamHome'] > $row['scoreTeamGuest']) ? \" <strong>{$row['teamNameHome']}</strong></td>\" : \" {$row['teamNameHome']}</td>\");\n\techo \"\t<td><input type='text' name='txtScoreTeamHome[{$row['fbm_id']}]' size='1' value='{$row['scoreTeamHome']}' class='score' pattern='\\d+' min='1' max='999' oninvalid='this.setCustomValidity(&quot;Bitte Zahl zwischen 1 und 999 angeben&quot;)'/> : <input type='text' name='txtScoreTeamGuest[{$row['fbm_id']}]' size='1' value='{$row['scoreTeamGuest']}' class='score' pattern='\\d+' min='1' max='999' oninvalid='this.setCustomValidity(&quot;Bitte Zahl zwischen 1 und 999 angeben&quot;)'/></td>\";\n\techo \"\t<td>\". getTeamFlag($row['teamGuestCC']) . (($row['scoreTeamHome'] < $row['scoreTeamGuest']) ? \" <strong>{$row['teamNameGuest']}</strong></td>\" : \" {$row['teamNameGuest']}</td>\");\n\techo \"</tr>\";\n}", "function next_games($championship,$num){\n\t\t$query=$this->db->query('Select m.*, t1.name as t1name,t2.name as t2name, UNIX_TIMESTAMP(m.date_match) as dm \n\t\t\t\t\t\t \t\t From matches as m, matches_teams as mt, teams as t1, teams as t2, groups as g, rounds as r, championships as c \n\t\t\t\t\t\t \t\t Where c.id='.$championship.' AND c.id=r.championship_id AND r.id=g.round_id AND g.id=m.group_id AND m.id=mt.match_id AND mt.team_id_home=t1.id AND mt.team_id_away=t2.id AND m.state=0 AND m.date_match > \"'.mdate(\"%Y-%m-%d 00:00:00\").'\"\n\t\t\t\t\t\t \t\t Order by date_match ASC\n\t\t\t\t\t\t \t\t Limit 0,'.$num);\n\t\t\n\t\t$partido=array();\n\t\t$i=0;\n\t\tforeach($query->result() as $row):\n\t\t\t$partido[$i]['id']=$row->id;\n\t\t\t$partido[$i]['fecha']=mdate(\"%Y/%m/%d\",$row->dm);\n\t\t\t$partido[$i]['hora']=mdate(\"%h:%i\",$row->dm);\n\t\t\t$partido[$i]['hequipo']=$row->t1name;\n\t\t\t$partido[$i]['aequipo']=$row->t2name;\n\t\t\t$i+=1;\n\t\tendforeach;\n\t\t\n\t\treturn $partido;\n\t}", "function insertTeamStats() {\n $conn = getConnection();\n $sql = \"SELECT id FROM teams\";\n $result = $conn -> query($sql);\n $insertSql = \"INSERT INTO Stats VALUES \";\n while($row = $result -> fetch_assoc()) {\n $team_id = $row[\"id\"];\n $url = \"https://statsapi.web.nhl.com/api/v1/teams/\".$team_id.\"/stats\";\n $jsonString = file_get_contents($url);\n $jsonObject = json_decode($jsonString);\n\n // get all stats from API\n $jsonObject = $jsonObject -> stats[0] -> splits[0] -> stat;\n $insertSql .= \"(\".$team_id.\", \".$jsonObject->goalsPerGame.\", \".$jsonObject->goalsAgainstPerGame.\", \".$jsonObject->powerPlayPercentage.\", \".$jsonObject->penaltyKillPercentage.\", \".$jsonObject->shootingPctg.\", \".$jsonObject->savePctg.\"),\";\n\n\n }\n // replace last comma with a semicolon\n $insertSql = substr($insertSql, 0, -1).\";\";\n\n $conn -> query($insertSql);\n }", "function getStandings($allSchools){\n \n $all_records = [];\n $all_leagues = [];\n $brk = [];\n $ccc = [];\n $cra = [];\n $csc = [];\n $ecc = [];\n $fciac = [];\n $nvl = [];\n $nccc = [];\n $scc = [];\n $shr = [];\n $swc = [];\n \n $db_standings = new Database();\n //\n foreach($allSchools as $team){\n $getTeamRecord = \"CALL getRecord('$team[0]')\";\n $record = $db_standings->getData($getTeamRecord);\n $record = getRecords($record, $team);\n\n if($record['league'] == 'Berkshire'){ array_push($brk, $record); }\n elseif($record['league']=='Central Connecticut'){ array_push($ccc, $record); }\n elseif($record['league']=='Capital Region Athletic'){ array_push($cra,$record); }\n elseif($record['league']=='Constitution State'){ array_push($csc, $record); }\n elseif($record['league']=='Eastern Connecticut'){ array_push($ecc, $record); }\n elseif($record['league']=='Fairfield County Interscholastic Athletic'){ array_push($fciac, $record); }\n elseif($record['league']=='Naugatuck Valley'){ array_push($nvl, $record); }\n elseif($record['league']=='North Central Connecticut'){ array_push($nccc, $record); }\n elseif($record['league']=='Southern Connecticut'){ array_push($scc, $record); }\n elseif($record['league']=='Shoreline'){ array_push($shr, $record); }\n elseif($record['league']=='South West'){ array_push($swc, $record); }\n else{ array_push($all_records, $record); }\n\n // Sort brk arrays by overall w,l\n usort($brk,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort ccc arrays by overall w,l\n usort($ccc,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort cra arrays by overall w,l\n usort($cra,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort csc arrays by overall w,l\n usort($csc,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort ecc arrays by overall w,l\n usort($ecc,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort fcica arrays by overall w,l\n usort($fciac,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort nccc arrays by overall w,l\n usort($nccc,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort nvl arrays by overall w,l\n usort($nvl,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort scc arrays by overall w,l\n usort($scc,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort shr arrays by overall w,l\n usort($shr,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n // Sort swc arrays by overall w,l\n usort($swc,make_comparer(['points',SORT_DESC],['lwin',SORT_DESC],['lloss',SORT_ASC],['lgf',SORT_DESC],['owin',SORT_DESC],['oloss',SORT_ASC],['ogf',SORT_DESC],['team',SORT_ASC]));\n \n // Combine sorted divisions into all leagues array\n $all_leagues = [\n 'berkshire'=>$brk,\n 'capital region athletic'=>$cra,\n 'central connecticut'=>$ccc,\n 'constitution state'=>$csc,\n 'eastern connecticut'=>$ecc,\n 'fairfield county interscholastic athletic'=>$fciac,\n 'north central connecticut'=>$nccc,\n 'naugatuck valley'=>$nvl,\n 'shoreline'=>$shr,\n 'southern connecticut'=>$scc,\n 'south west'=>$swc\n ];\n }\n \n return $all_leagues;\n}", "function crawl_games_per_season($param_season, $param_gameType, $param_team) {\n\t\n\t$base_link = 'http://www.nhl.com/ice/schedulebyseason.htm';\n\t\t\n\t$html_games = file_get_html(\"$base_link?season=$param_season&gameType=$param_gameType&team=$param_team\");\n\t\n\tif(!$html_games) {\n\t\techo 'GET HTML FALSE <br>';\n\t}\n\t\n\t$games_list = array();\n\t\n\t\n\tforeach($html_games->find('table[class=data schedTbl] tbody tr') as $match) {\n\t\t\n\t\t//Don't take into account where column is less than 6, filtering out header and blank rows.\n\t\tif(count($match->find('td')) == 6) {\n\t\t\t\n\t\t\t //Need to check if it's the FINAL result by checking if it starts with 'FINAL:'.\n\t\t\t //Additionally read out teams involved, determine winner/loser, and if there has been overtime.\n\t\t\t \n\t\t\t $item_result = $match->find('td.tvInfo', 0)->plaintext;\n\t\t\t $item_result_split = explode(' ', $item_result);\n\t\t\t \n\t\t\t \n\t\t\t if($item_result_split[1] == 'FINAL:') {\n\t\t\t \t\n\t\t\t\t$item['final'] = $item_result_split[1];\n\t\t\t\t$item['visiting_team'] = $item_result_split[3];\n\t\t\t\t$item['visiting_team_score'] = trim($item_result_split[4], '()');\n\t\t\t\t$item['home_team'] = $item_result_split[8];\n\t\t\t\t$item['home_team_score'] = trim($item_result_split[9], '()');\n\t\t\t\t$item['overtime'] = $item_result_split[10];\n\t\t\t\t \n\t\t\t\t$item_date = $match->find('td.date .skedStartDateSite', 0)->plaintext;\n\t\t\t\t$item['date'] = date(\"Y-m-d\", strtotime($item_date));\n\t\t\t\t \n\t\t\t\t//No need for retrieve teams directly, because we need to analyze result string above, and retrieve more information.\n\t\t\t\t//$item['visiting_team'] = $match->find('td.team', 0)->plaintext;\n\t\t\t\t//$item['home_team'] = $match->find('td.team', 1)->plaintext;\n\t\t\t\t \n\t\t\t\t//Read out the link to the \"Recap\" article.\n\t\t\t\t$item['recap'] = $match->find('td.skedLinks a', 0)->href;\n\t\t\t\t \n\t\t\t\t$games_list[] = $item;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t}\n\t\n\treturn $games_list;\n\n}", "function fantacalcio_calcola_totali($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n\n// $vote_round = get_last_votes();\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $matches = array();\n foreach ($competitions as $c_id => $competition) {\n $competition_round = get_last_competition_round($c_id);\n $matches_competitions = get_round_matches($competition_round, '', $c_id);\n\n $matches = array_merge($matches, $matches_competitions);\n }\n\n $out = '';\n\n $header = array(\"Comp\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"W\");\n\n foreach ($matches as $m_id => $match) {\n $t1_id = $match->t1_id;\n $t2_id = $match->t2_id;\n $competition_round = $match->round;\n $c_id = get_cid_by_gid($match->g_id);\n\n $mod_por_1 = $match->mod_por_1;\n $mod_por_2 = $match->mod_por_2;\n $mod_dif_1 = $match->mod_dif_1;\n $mod_dif_2 = $match->mod_dif_2;\n $mod_centr_1 = $match->mod_centr_1;\n $mod_centr_2 = $match->mod_centr_2;\n $mod_att_1 = $match->mod_att_1;\n $mod_att_2 = $match->mod_att_2;\n \n $bonus_t1 = $match->bonus_t1;\n $bonus_t2 = $match->bonus_t2;\n\n $tot_voti_1 = get_totale($t1_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n $tot_voti_2 = get_totale($t2_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n\n $tot_1 = $tot_voti_1 + $mod_por_1 + $mod_dif_2 + $mod_centr_1 + $mod_att_1 + $bonus_t1;\n $tot_2 = $tot_voti_2 + $mod_por_2 + $mod_dif_1 + $mod_centr_2 + $mod_att_2 + $bonus_t2;\n\n $goals_1 = floor(($tot_1 -60) / 6);\n $goals_2 = floor(($tot_2 -60) / 6);\n $goals_1 = ($goals_1 >= 0) ? $goals_1 : 0;\n $goals_2 = ($goals_2 >= 0) ? $goals_2 : 0;\n \n //vittoria con scarto\n if (variable_get('fantacalcio_scarto', '0') && variable_get('fantacalcio_scarto_punti', '0') > 0) {\n if ( ($goals_1 == $goals_2) && ($tot_1 - $tot_2) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_1++;\n if ( ($goals_1 == $goals_2) && ($tot_2 - $tot_1) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_2++;\n }\n\n $winner_id = ($goals_1 > $goals_2) ? $t1_id : $t2_id;\n $winner_id = ($goals_1 == $goals_2) ? -1 : $winner_id;\n\n //aggiorno partite\n $sql = \"UPDATE {fanta_matches} SET \n pt_1 = '%f', \n pt_2 = '%f', \n tot_1 = '%f', \n tot_2 = '%f', \n goals_1 = '%d', \n goals_2 = '%d', \n played = 1, \n winner_id = '%d' \n WHERE m_id = '%d'\";\n $result = db_query($sql, $tot_voti_1, $tot_voti_2, $tot_1, $tot_2, $goals_1, $goals_2, $winner_id, $match->m_id);\n \n }\n\n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($rowx = db_fetch_array($resultx)) {\n $c_id = $rowx['c_id'];\n $competition_round = $rowx['competition_round'];\n\n $sql = \"SELECT * FROM {fanta_matches} \" .\n \"WHERE g_id IN (SELECT g_id FROM {fanta_groups} WHERE c_id = '%d') \" .\n \"AND round = '%d' \";\n $result = db_query($sql, $c_id, $competition_round);\n $out .= \"<h3>\" . check_plain($competitions[$c_id]->name) . \"</h3>\";\n\n $header = array(\"Squadra\", \"Punti\", \"Totale\", \"Goal\", \"Vincitore\");\n $rows = array();\n\n while ($row = db_fetch_array($result)) {\n $rows[$row['m_id'] . \"_1\"][] = $teams[$row['t1_id']]->name;\n $rows[$row['m_id'] . \"_1\"][] = $row['pt_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['tot_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['goals_1'];\n //$rows[$row['m_id'] . \"_1\"][] = $row['mod_att_1'];\n $rows[$row['m_id'] . \"_2\"][] = $teams[$row['t2_id']]->name;//squadra 2\n $rows[$row['m_id'] . \"_2\"][] = $row['pt_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['tot_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['goals_2'];\n $rows[$row['m_id'] . \"_2\"][] = ($row['winner_id'] == -1) ? \" - \" : $teams[$row['winner_id']]->name;\n \n $rows[$row['m_id'] . \"_3\"][] = array(\"data\" => \"<hr>\", \"colspan\" => 5);//separatore\n }\n $out .= theme_table($header, $rows);\n\n }\n\n return $out;\n}", "function xstats_displayMaxValueListShips($gameId) {\n echo( \"<H3>Spitzenwerte im Spiel</H3>\");\n $statsAvailablePlayerIndicies = xstats_getAvailablePlayerIndicies($gameId);\n $statsMaxTurn = xstats_getMaxTurn($gameId);\n echo( xstats_displayMaxSum( $gameId, 'lj', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxValue( $gameId, 'shipcount') );\n echo( xstats_displayMaxValue( $gameId, 'freightercount') );\n echo( xstats_displayMaxValue( $gameId, 'shipcount-freightercount') );\n echo( xstats_displayMaxValue( $gameId, 'sumcargohold') );\n}", "public function dump() {\n $fmt = \"%-25s | %s | %2s | %s\\n\";\n foreach ($this->blocks as $block) {\n printf(\"Team: %25s\\n Rep: %s\\n\", $block->team, $block->representative);\n foreach (array('A', 'B', 'C', 'D') as $div) {\n foreach (array(RP::SKIPPER, RP::CREW) as $role) {\n $section = sprintf('%s_%s', $role, $div);\n foreach ($block->$section as $s) {\n printf($fmt,\n $s->getSailorName(),\n $s->division,\n $s->getSailorYear(),\n DB::makeRange($s->races_nums));\n }\n print(\"\\n\");\n }\n print(\"--------------------\\n\");\n }\n print(\"--------------------\\n\");\n }\n }", "public function run()\n {\n $matches = [\n ['team1_id' => 28, 'team2_id' => 4, 'start_time' => '2018-06-14 18:00:00'],\n ['team1_id' => 6, 'team2_id' => 18, 'start_time' => '2018-06-15 17:00:00'],\n ['team1_id' => 7, 'team2_id' => 2, 'start_time' => '2018-06-15 18:00:00'],\n ['team1_id' => 27, 'team2_id' => 30, 'start_time' => '2018-06-15 21:00:00'],\n ['team1_id' => 23, 'team2_id' => 1, 'start_time' => '2018-06-16 13:00:00'],\n ['team1_id' => 14, 'team2_id' => 25, 'start_time' => '2018-06-16 16:00:00'],\n ['team1_id' => 17, 'team2_id' => 21, 'start_time' => '2018-06-16 19:00:00'],\n ['team1_id' => 20, 'team2_id' => 8, 'start_time' => '2018-06-16 21:00:00'],\n ['team1_id' => 11, 'team2_id' => 29, 'start_time' => '2018-06-17 16:00:00'],\n ['team1_id' => 24, 'team2_id' => 12, 'start_time' => '2018-06-17 18:00:00'],\n ['team1_id' => 15, 'team2_id' => 32, 'start_time' => '2018-06-17 21:00:00'],\n ['team1_id' => 31, 'team2_id' => 5, 'start_time' => '2018-06-18 15:00:00'],\n ['team1_id' => 19, 'team2_id' => 13, 'start_time' => '2018-06-18 18:00:00'],\n ['team1_id' => 10, 'team2_id' => 22, 'start_time' => '2018-06-18 21:00:00'],\n ['team1_id' => 16, 'team2_id' => 3, 'start_time' => '2018-06-19 15:00:00'],\n ['team1_id' => 26, 'team2_id' => 9, 'start_time' => '2018-06-19 18:00:00'],\n ];\n\n foreach ($matches as $match)\n {\n Match::create($match);\n }\n }", "function printResultsTable($year, $competition, $oneAct)\n{\n assertValidOneAct($oneAct);\n assertValidCompetition($competition);\n assertValidYear($year);\n\n $oneActStr = getOneActString($oneAct);\n\n $resultsArray = buildResultsArray($competition, $year, $oneActStr);\n printTable($resultsArray);\n}", "function xstats_displayShipListOfUser( $gameId, $userIndex ) {\n $userId = xstats_getPlayerId($gameId, $userIndex);\n $maxTurn = xstats_getMaxTurn($gameId);\n include ('../../inc.conf.php');\n $query = \"SELECT *FROM skrupel_xstats_ships ships INNER JOIN skrupel_xstats_shipowner shipowner ON (ships.shipid=shipowner.shipid AND ships.sinceturn=shipowner.turn AND ships.gameid=shipowner.gameid) WHERE shipowner.ownerindex=\".$userIndex.\" AND ships.gameId=\".$gameId.\" ORDER BY ships.sinceturn\";\n $result = @mysql_query($query) or die(mysql_error());\n $maxFleet = xstats_getMaxValueOfUser($gameId, \"shipcount\", $userId);\n echo '<br><h3>Liste aller produzierten Schiffe von <font color=\"'.$spielerfarbe[$userIndex].'\">'.xstats_getPlayerNick($userId).'</font></h3><h4>Gr&ouml;&szlig;te Flotte: '.$maxFleet.' Schiffe</h4>';\n echo '<table class=\"shiptable\" border=\"0\">';\n echo '<tr><th>Schiff</th><th>Von</th><th>Siege</th><th>In Betrieb</th><th>Masse</th><th>Antriebe</th><th>Laser</th><th>Torp</th><th>Hangar</th><th>Zerst&ouml;rt von</th></tr>';\n while ($row = mysql_fetch_array($result)) {\n echo '<tr>';\n //ship\n echo '<td>'.xstats_getShipFullDescription( $gameId, $row['shipid'], $row['shiprace'], $row['picturesmall'], $row['experience'], $row['sinceturn'],$row['shipclass'],$row['shipname']).'</td>';\n //production planet\n echo '<td>'.xstats_getPlanetDescription( $gameId, $row['buildposx'], $row['buildposy'], $userIndex, $row['buildplanetname']).'</td>';\n //victory count\n echo '<td>'.$row['victories'].'</td>';\n //from-to\n if( $row['untilturn'] == '0' || $row['untilturn'] == 0) {\n $untilTurn = $maxTurn;\n }else {\n $untilTurn = $row['untilturn'];\n }\n echo '<td>Runde '.$row['sinceturn'].'-'.$untilTurn.'</td>';\n //mass\n echo '<td>'.$row['mass'].' kT</td>';\n //engine\n $levelEngine = $row['levelengine'];\n if( $levelEngine == 8 ) {\n $levelEngine = 7;\n }\n echo '<td>'.$row['enginecount'].'* Lvl '.$levelEngine.'</td>';\n //laser\n if( $row['beamcount'] == 0 ) {\n echo( \"<td>0</td>\");\n }\n else {\n echo '<td>'.$row['beamcount'].'* Lvl '.$row['levelbeam'].'</td>';\n }\n //tubes\n if( $row['tubecount'] == 0 ) {\n echo( \"<td>0</td>\");\n }\n else {\n echo '<td>'.$row['tubecount'].'* Lvl '.$row['leveltube'].'</td>';\n }\n //hangar\n echo '<td>'.$row['hangarcount'].'</td>';\n //destroyed by\n $query = \"SELECT * FROM skrupel_xstats_shipvsship WHERE shipid=\".$row['shipid'].\" AND fightresult=2 AND gameid=\".$gameId;\n $destroyerResult = @mysql_query( $query ) or die(mysql_error());\n if( mysql_num_rows($destroyerResult)>0 ) {\n $destroyerRow = mysql_fetch_array($destroyerResult);\n $query = \"SELECT * FROM skrupel_xstats_ships WHERE gameId='\".$gameId.\"' AND shipid=\".$destroyerRow['enemyshipid'];\n $destroyerInfoResult = @mysql_query($query) or die(mysql_error());\n $destroyerInfoRow = mysql_fetch_array($destroyerInfoResult);\n echo '<td>'.xstats_getShipFullDescription( $gameId, $destroyerInfoRow['shipid'], $destroyerInfoRow['shiprace'], $destroyerInfoRow['picturesmall'], $destroyerInfoRow['experience'], $destroyerInfoRow['sinceturn'],$destroyerInfoRow['shipclass'],$destroyerInfoRow['shipname']).'</td>';\n }else {\n //not destroyed by a ship, destroyed by a planetary defense\n $query = \"SELECT * FROM skrupel_xstats_shipvsplanet WHERE shipid=\".$row['shipid'].\" AND eventtype=1 AND gameid=\".$gameId;\n $destroyerResult = @mysql_query( $query ) or die(mysql_error());\n if( mysql_num_rows($destroyerResult)>0 ) {\n $destroyerInfoRow = mysql_fetch_array($destroyerResult);\n echo '<td>'.xstats_getPlanetDescription( $gameId, $destroyerInfoRow['posx'], $destroyerInfoRow['posy'], $destroyerInfoRow['planetownerindex'], $destroyerInfoRow['planetname']).' (Planetare Verteidigung)</td>';\n }else {\n //not destroyed\n echo '<td></td>';\n }\n }\n echo '<tr>';\n }\n echo '</table>';\n}", "public function teamList()\n {\n $teams = Team::all();\n $countTC = 0;\n $countBranch = 0;\n foreach ($teams as $t) {\n if($t->respo->branch == \"TC\" && $t->respo->level < 4){\n $countTC ++;\n }\n else\n $countBranch++;\n }\n //info(\"Nombre de team de TC : \" . $countTC . \" Nombre de team de Branche : \" . $countBranch);\n\n return View::make('dashboard.ce.teamlist', [\n 'teams' => Team::all(),\n 'teamLeftTC' => Config::get('services.ce.maxTeamTc') - $countTC,\n 'teamLeftBranch' => Config::get('services.ce.maxTeamBranch') - $countBranch,\n ]);\n }", "function get_standing_team_db($idSeason)\n{\n require('./model/connect_db.php');\n $sql = \"select t.idTeam, t.nameTeam, sum(r.Points) as points from team t, race r, season s where r.idTeam = t.idTeam and s.idseason = '%d' and s.idseason = r.idseason group by t.nameTeam order by points desc \";\n $request = sprintf($sql,$idSeason);\n $result = mysqli_query($link,$request) or die(utf8_encode(\"request error\") . $request);\n $standing = array();\n while($line = mysqli_fetch_assoc($result) and isset($line))\n {\n $standing[] = $line;\n }\n return $standing;\n}", "function displayChessboard ($pieces)\r\n{\r\n\r\n\t$alphaIndex = array ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');\r\n\t\r\n\tprint (\"<table border=\\\"1\\\" cellpadding=\\\"10\\\">\");\r\n\tprint (\"<tr>\");\r\n\tprint (\"<td> </td>\");\r\n\tforeach ($alphaIndex as $aI)\r\n\t{\r\n\t\tprint (\"<td> $aI </td>\");\r\n\t} \r\n\tprint (\"<td> </td>\");\r\n\tprint (\"</tr>\");\r\n\t\r\n\tfor ($j = 8; $j > 0; $j--)\r\n\t{\r\n\t\tprint (\"<tr>\");\r\n\t\tprint (\"<td>$j</td>\");\r\n\t\tforeach ($alphaIndex as $aI)\r\n\t\t{\r\n\t\t\tif (!empty($pieces[$j][$aI]))\r\n\t\t\t{\r\n\t\t\t\t$abbrev \t= $pieces[$j][$aI]->getTypeAbbrev();\r\n\t\t\t\t$colorNote = $pieces[$j][$aI]->getColorAbbrev();\r\n\t\t\t\tprint (\"<td>\" . $colorNote . $abbrev . \"</td>\"); \r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tprint (\"<td> </td>\");\r\n\t\t}\r\n\t\tprint (\"<td>$j</td>\");\t\t\r\n\t}\t\r\n\r\n\tprint (\"<tr>\");\r\n\tprint (\"<td> </td>\");\r\n\tforeach ($alphaIndex as $aI)\r\n\t{\r\n\t\tprint (\"<td> $aI </td>\");\r\n\t} \r\n\tprint (\"<td> </td>\");\r\n\tprint (\"</tr>\");\r\n\t\r\n\tprint (\"</table>\");\r\n\r\n}", "function show_stats($a,$b,$c)\n{\necho '<br />\n<table border=\"1\" width=\"500\">\n<tr><td width=\"250\"><u>Die Letzten '.$c.' Tage:</u>';\n\nshow_past($a,$b,$c);\n\necho '</td><td><u>Die Besten '.$c.' Tage:</u>';\nshow_best($a,$b,$c);;\necho '</td></tr><tr><td><u>Die Schlechtesten '.$c.' Tage:</u><br />';\n\nshow_worse($a,$b,$c);\n\necho '</td><td width=\"250\"><hr /><u>Durchschnitt aller Tage:</u>';\n\nshow_average($a,$b);\n\necho '<hr /><u>Gesamt aller Tage:</u>';\n\nshow_all($a,$b);\n\necho '<hr /></td></tr></table>';\n}", "function affichagetableau6_12($tab)\n{\n foreach ($tab as $elt) {\n echo \"[\" . $elt . \"]\" . \"\\t\";\n }\n echo \"\\nLes valeurs du tableau ont été incrémentées de 1.\";\n}", "function fantacalcio_trova_titolari($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n\n $out = \"\";\n\n// $vote_round = get_last_votes();\n\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $pl_votes = array();\n foreach ($votes as $vote)\n $pl_votes[] = $vote->pl_id;\n\n $elenco_pl_ids = implode(',', $pl_votes);\n \n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} \" .\n \"WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($row = db_fetch_array($resultx)) {\n\n $c_id = $row['c_id'];\n $competition_round = $row['competition_round'];\n \n $out .= \"<h3>\" . $competitions[$c_id]->name . \"</h3>\";\n \n //resetto i valori \n $sql = \"UPDATE {fanta_lineups} \n SET has_played = 0 \n WHERE round = '%d' \n AND c_id = '%d'\";\n $result = db_query($sql, $competition_round, $c_id);\n\n #titolari con voto\n $sql = \"UPDATE {fanta_lineups} \" .\n \"SET has_played = 1 \" .\n \"WHERE position = 1 \" .\n \"AND round = '%d' \" .\n \"AND c_id = '%d'\" .\n \"AND pl_id IN ($elenco_pl_ids)\";\n //echo $sql;\n $result = db_query($sql, $competition_round, $c_id);\n \n switch (variable_get(\"fantacalcio_riserve_fisse\", 0) ) {\n case 0: //riserve libere\n fantacalcio_get_titolari_riserve_libere($pl_votes, $competition_round, $c_id);\n break;\n case 1: //riserve fisse\n fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id);\n break;\n default:\n fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id);\n }\n\n #report\n $sql = \"SELECT count(*) AS n, t_id FROM {fanta_lineups} \" .\n \"WHERE has_played = 1 \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\" .\n \"GROUP BY t_id\";\n $result = db_query($sql, $c_id, $competition_round);\n $played = array();\n $i = 0;\n while ($row = db_fetch_array($result)) {\n $i++;\n $played[$i]['t_id'] = $row['t_id'];\n $played[$i]['n'] = $row['n'];\n }\n\n $players = get_players();\n\n $sql = \"SELECT * FROM {fanta_lineups} \" .\n \"WHERE c_id = '%d' \" .\n \"AND round = '%d'\";\n $result = db_query($sql, $c_id, $competition_round);\n $formazioni = array();\n while ($row = db_fetch_object($result)) {\n\n $role = $players[$row->pl_id]->role;\n\n if ($row->position == 1) $formazioni[$row->t_id][\"titolari\"][$role]++;\n if ($row->has_played == 1) $formazioni[$row->t_id][\"played\"][$role]++;\n }\n\n #riepilogo titolari squadre\n $header = array(\"Squadra\", \"N&deg; Titolari\", \"Modulo Titolari\", \"Modulo Formazione\");\n\n $rows = array();\n foreach ($formazioni as $key => $value) {\n $n_titolari = array_sum($formazioni[$key][\"played\"]);\n\n $style = ($n_titolari == 11) ? \"\" : \"font-weight: bold; color: red;\";\n\n ksort($formazioni[$key][\"played\"]);\n ksort($formazioni[$key][\"titolari\"]);\n\n $rows[$key][] = $teams[$key]->name;\n $rows[$key][] = array(\"data\" => $n_titolari, \"style\" => $style);\n $rows[$key][] = implode(\"-\", $formazioni[$key][\"played\"]);\n $rows[$key][] = implode(\"-\", $formazioni[$key][\"titolari\"]);\n }\n $out .= theme_table($header, $rows);\n\n }\n\n return $out;\n\n}", "function fantacalcio_admin_real_teams_list() {\n \n $out = \"\";\n \n $out .= l(\"Aggiungi Squadra\", \"admin/fantacalcio/realteams/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n\n $out .= l(\"Importa squadre\", \"admin/fantacalcio/realteams/import\", array(\n \"attributes\" => array(\"class\" => \"btn btn-warning\"))) . \"<br/><br/>\";\n \n $real_teams = RealTeam::all();\n if ($real_teams) {\n $header = array(\n t(\"Nome\"));\n\n foreach ($real_teams as $rt_id => $real_team) {\n $rows[] = array(\n l($real_team->name, \"admin/fantacalcio/realteams/\" . $rt_id));\n }\n\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"sticky\" => \"\", \n \"empty\" => t(\"Nessuna squadra\"))));\n }\n return $out;\n}", "function displayUserdataTable($steamID){\n\t\t\t\t\t\trequire_once(\"database\\database_connection.php\");\n\t\t\t\t\t\t$conn=database();\n\t\t\t\t\t\t//Query the database\n\t\t\t\t\t\t$resultSet = $conn->query(\"SELECT * FROM csgoRankings.Statistics WHERE steamID =\".$steamID.\"\");\n\n\t\t\t\t\t\tif($resultSet->num_rows != 0){\n\t\t\t\t\t\t\twhile($rows = $resultSet->fetch_assoc()){\n\t\t\t\t\t\t\t\t$total_time_played = intval($rows['total_time_played'])/60;\n\t\t\t\t\t\t\t\t$time_played_2weeks = intval($rows['time_played_2w'])/60;\n\t\t\t\t\t\t\t\t$total_damage_done = $rows['total_damage_done'];\n\t\t\t\t\t\t\t\t$total_kills = $rows['total_kills'];\n\t\t\t\t\t\t\t\t$total_deaths = $rows['total_deaths'];\n\t\t\t\t\t\t\t\t$total_money_earned = $rows['total_money_earned'];\n\t\t\t\t\t\t\t\t$total_kills_headshot = $rows['total_kills_headshot'];\n\t\t\t\t\t\t\t\t$total_shots_hit = $rows['total_shots_hit'];\n\t\t\t\t\t\t\t\t$total_shots_fired = $rows['total_shots_fired'];\n\t\t\t\t\t\t\t\t$total_kills_awp = $rows['total_kills_awp'];\n\t\t\t\t\t\t\t\t$total_shots_awp = $rows['total_shots_awp'];\n\t\t\t\t\t\t\t\t$total_hits_awp = $rows['total_hits_awp'];\n\t\t\t\t\t\t\t\t$total_kills_ak47 = $rows['total_kills_ak47'];\n\t\t\t\t\t\t\t\t$total_shots_ak47 = $rows['total_shots_ak47'];\n\t\t\t\t\t\t\t\t$total_hits_ak47 = $rows['total_hits_ak47'];\n\t\t\t\t\t\t\t\t$total_kills_glock = $rows['total_kills_glock'];\n\t\t\t\t\t\t\t\t$total_shots_glock = $rows['total_shots_glock'];\n\t\t\t\t\t\t\t\t$total_hits_glock = $rows['total_hits_glock'];\n\t\t\t\t\t\t\t\t$total_kills_hkp2000 = $rows['total_kills_hkp2000'];\n\t\t\t\t\t\t\t\t$total_shots_hkp2000 = $rows['total_shots_hkp2000'];\n\t\t\t\t\t\t\t\t$total_hits_hkp2000 = $rows['total_hits_hkp2000'];\n\t\t\t\t\t\t\t\t$total_shots_ssg08 = $rows['total_shots_ssg08'];\n\t\t\t\t\t\t\t\t$total_hits_ssg08 = $rows['total_hits_ssg08'];\n\t\t\t\t\t\t\t\t$total_kills_ssg08 = $rows['total_kills_ssg08'];\n\t\t\t\t\t\t\t\t$total_kills_m4a1 = $rows['total_kills_m4a1'];\n\t\t\t\t\t\t\t\t$total_shots_m4a1 = $rows['total_shots_m4a1'];\n\t\t\t\t\t\t\t\t$total_hits_m4a1 = $rows['total_hits_m4a1'];\n\n\t\t\t\t\t\t\t\techo \"<tr>\n\t\t\t\t\t\t\t\t<td>Total time played</td>\n\t\t\t\t\t\t\t\t<td>{$total_time_played}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>Time played last 2 weeks</td>\n\t\t\t\t\t\t\t\t<td>{$time_played_2weeks}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total damage done</td>\n\t\t\t\t\t\t\t\t<td>{$total_damage_done}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total kills</td>\n\t\t\t\t\t\t\t\t<td>{$total_kills}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total deaths</td>\n\t\t\t\t\t\t\t\t<td>{$total_deaths}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total money earned</td>\n\t\t\t\t\t\t\t\t<td>{$total_money_earned}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total kills headshot</td>\n\t\t\t\t\t\t\t\t<td>{$total_kills_headshot}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total shots hit</td>\n\t\t\t\t\t\t\t\t<td>{$total_shots_hit}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total shots fired</td>\n\t\t\t\t\t\t\t\t<td>{$total_shots_fired}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total kills awp</td>\n\t\t\t\t\t\t\t\t<td>{$total_kills_awp}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total shots awp</td>\n\t\t\t\t\t\t\t\t<td>{$total_shots_awp}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total hits awp</td>\n\t\t\t\t\t\t\t\t<td>{$total_hits_awp}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total kills ak47</td>\n\t\t\t\t\t\t\t\t<td>{$total_kills_ak47}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total shots ak47</td>\n\t\t\t\t\t\t\t\t<td>{$total_shots_ak47}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total hits ak47</td>\n\t\t\t\t\t\t\t\t<td>{$total_hits_ak47}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total kills glock</td>\n\t\t\t\t\t\t\t\t<td>{$total_kills_glock}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total shots glock</td>\n\t\t\t\t\t\t\t\t<td>{$total_shots_glock}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total hits glock</td>\n\t\t\t\t\t\t\t\t<td>{$total_hits_glock}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total kills hkp2000</td>\n\t\t\t\t\t\t\t\t<td>{$total_kills_hkp2000}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total shots hkp2000</td>\n\t\t\t\t\t\t\t\t<td>{$total_shots_hkp2000}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total hits hkp2000</td>\n\t\t\t\t\t\t\t\t<td>{$total_hits_hkp2000}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total kills ssg08</td>\n\t\t\t\t\t\t\t\t<td>{$total_kills_ssg08}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total shots ssg08</td>\n\t\t\t\t\t\t\t\t<td>{$total_shots_ssg08}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total hits ssg08</td>\n\t\t\t\t\t\t\t\t<td>{$total_hits_ssg08}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total kills m4a1</td>\n\t\t\t\t\t\t\t\t<td>{$total_kills_m4a1}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total shots m4a1</td>\n\t\t\t\t\t\t\t\t<td>{$total_shots_m4a1}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>total hits m4a1</td>\n\t\t\t\t\t\t\t\t<td>{$total_hits_m4a1}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\";\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\techo\"ERROR\";\n\t\t\t\t\t\t}\n\t\t\t \t\t$conn->close();\n\t\t\t \t}", "function display_career_stats($res) {\n\n echo '<br><div class=\"stat-sheet\"><h3>Career Stats</h3><br>';\n\n // Table header:\n echo '<table class=\"player-tbl\" cellspacing=\"5\" cellpadding=\"5\"\n width=\"75%\">\n\t<tr class=\"player-stat-heading\">\n\t\t<td align=\"left\"><b>Lg</b></td>\n\t\t<td align=\"left\"><b>G</b></td>\n\t\t<td align=\"left\"><b>Min</b></td>\n\t\t<td align=\"left\"><b>Pts</b></td>\n\t\t<td align=\"left\"><b>PPG</b></td>\n\t\t<td align=\"left\"><b>FGM</b></td>\n\t\t<td align=\"left\"><b>FGA</b></td>\n\t\t<td align=\"left\"><b>FGP</b></td>\n\t\t<td align=\"left\"><b>FTM</b></td>\n\t\t<td align=\"left\"><b>FTA</b></td>\n\t\t<td align=\"left\"><b>FTP</b></td>\n\t\t<td align=\"left\"><b>3PM</b></td>\n\t\t<td align=\"left\"><b>3PA</b></td>\n\t\t<td align=\"left\"><b>3PP</b></td>\n\t\t<td align=\"left\"><b>ORB</b></td>\n\t\t<td align=\"left\"><b>DRB</b></td>\n\t\t<td align=\"left\"><b>TRB</b></td>\n\t\t<td align=\"left\"><b>RPG</b></td>\n\t\t<td align=\"left\"><b>AST</b></td>\n\t\t<td align=\"left\"><b>APG</b></td>\n\t\t<td align=\"left\"><b>STL</b></td>\n\t\t<td align=\"left\"><b>BLK</b></td>\n\t\t<td align=\"left\"><b>TO</b></td>\n\t\t<td align=\"left\"><b>PF</b></td>\n\t</tr>\n';\n\n // Fetch and print all the records:\n while ($row = mysqli_fetch_array($res, MYSQLI_ASSOC)) {\n echo '<tr class=\"player-stat\">\n\t\t\t<td align=\"left\">' . $row['lg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['g'] . '</td>\n\t\t\t<td align=\"left\">' . $row['min'] . '</td>\n\t\t\t<td align=\"left\">' . $row['pts'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ppg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fgm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fga'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fgp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ftm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['fta'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ftp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpm'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpa'] . '</td>\n\t\t\t<td align=\"left\">' . $row['tpp'] . '</td>\n\t\t\t<td align=\"left\">' . $row['orb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['drb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['trb'] . '</td>\n\t\t\t<td align=\"left\">' . $row['rpg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['ast'] . '</td>\n\t\t\t<td align=\"left\">' . $row['apg'] . '</td>\n\t\t\t<td align=\"left\">' . $row['stl'] . '</td>\n\t\t\t<td align=\"left\">' . $row['blk'] . '</td>\n\t\t\t<td align=\"left\">' . $row['turnover'] . '</td>\n\t\t\t<td align=\"left\">' . $row['pf'] . '</td>\n\t\t</tr>\n\t\t';\n }\n\n echo '</table></div>';\n\n}", "function show_worse($a,$b,$c)\n{\n$sql = \"SELECT datum, views FROM stats_site WHERE pageid='\".$a.\"' AND modus='\".$b.\"' ORDER BY 'views' ASC LIMIT 0,$c\";\n$result = mysql_db_query(\"portal\",$sql);\necho \"<table>\";\nwhile ($zeile=mysql_fetch_array($result))\n{\nextract($zeile);\necho '<tr><td>';\nwochentag($datum);\necho '</td><td width=\"100\">'.substr($datum,8,2).'.'.substr($datum,5,2).'.'.substr($datum,0,4).'</td><td><b>'. $views .'</b></td></tr>';\n}\necho \"</table>\";\n}", "function chcekTheWinner($dom, $owner){\n $instance = DbConnector::getInstance();\n $playersList = handEvaluator();\n usort($playersList, array(\"Player\", \"cmp\")); \n $i = 0;\n echo \"<div id=\\\"summary\\\"><div>--- Summary ---</div>\";\n echo \"<table border=\\\"1\\\" BORDERCOLOR=RED style=\\\"width:100%\\\"><tr><th>Player</th><th>Score</th><th>Hand</th><th>Cards</th></tr>\";\n foreach($playersList as $player){ \n if($i === 0){\n $sql = \"SELECT `TotalMoneyOnTable`, `Transfer` FROM `TableCreatedBy_\" . $owner . \"` where `user`='\" . $player->player . \"';\"; \n $retval = $instance->sendRequest($sql);\n while ($row = mysql_fetch_row($retval)) {\n $value = $row[0];\n $flag = $row[1];\n }\n if($flag == 0){ //transfer money to accunt\n $sql = \"UPDATE `TableCreatedBy_\" . $owner . \"` SET `Money` = `Money` + \".$value.\", `Transfer`=1 where `user`='\" . $player->player . \"';\"; \n $retval = $instance->sendRequest($sql);\n }\n echo \"<td>\" . $player->player . \" won \".$value.\"</td><td>\". $player->cardsValue . \"</td><td>\" . $player->handValue . \"</td><td>\" . $player->hand . \"</td></tr>\";\n }else{\n echo \"<td>\" . $player->player . \"</td><td>\". $player->cardsValue . \"</td><td>\" . $player->handValue . \"</td><td>\" . $player->hand . \"</td></tr>\";\n }\n $i++;\n }\n echo \"</table></div>\";\n}", "function get_standing_team($idSeason)\n{\n $table_standing = get_standing_team_db($idSeason);\n return $table_standing;\n}", "public static function get_all_team()\r\n {\r\n $result = db::sql(\"SELECT DISTINCT Team FROM `superrugby_2016_scores_18`;\", DB_NAME);\r\n $all_team = null;\r\n if (mysqli_num_rows($result)){\r\n while(list($team) = mysqli_fetch_array($result)){\r\n $all_team[] = $team;\r\n }\r\n }\r\n return $all_team;\r\n }", "function printHTML() \n {\n?>\n <center>\n <table class='gains' border='0'>\n <tr>\n<?\n for ($i=0; $i<count($this->machines); $i++) {\n $m = $this->machines[$i];\n if ($i == 0)\n echo \"<td align='center' colspan='2'>\".substr($m,4,2).\"</td>\\n\";\n else\n echo \"<th align='center' colspan='2'>\".substr($m,4,2).\"</th>\\n\";\n }\n?>\n </tr>\n <tr>\n<?\n for ($i=0; $i<count($this->machines); $i++) {\n $m = $this->machines[$i];\n echo \"<td align='center'>\\n\";\n echo \"<span id=\\\"\".$m.\"_pol0_bar\\\">[ Loading Progress Bar ]</span>\\n\";\n echo \"<td align='center'>\\n\";\n echo \"<span id=\\\"\".$m.\"_pol1_bar\\\">[ Loading Progress Bar ]</span>\\n\";\n echo \"</td>\\n\";\n }\n?>\n </tr>\n <tr>\n<?\n for ($i=0; $i<count($this->machines); $i++) {\n $m = $this->machines[$i];\n echo \"<td colspan='2'>\\n\";\n echo \"<div id='\".$m.\"_pol0_value'></div>\\n\";\n echo \"<div id='\".$m.\"_pol1_value'></div>\\n\";\n echo \"</td>\\n\";\n }\n?>\n </tr>\n <!--<tr><td colspan='32' align='center'><span id=\"max_gain\"></span></td></tr>-->\n </table>\n </center>\n<?\n }", "public function getMaxTeamsList(){\n return $this->_get(11);\n }", "function xstats_displayShipMaxLJ( $gameId, $maxRows ) {\n include ('../../inc.conf.php');\n $maxTurn = xstats_getMaxTurn($gameId);\n $result = @mysql_query(\"SELECT * FROM skrupel_xstats_ships WHERE gameId='\".$gameId.\"' ORDER BY lj DESC\") or die(mysql_error());\n echo '<h4>Die gr&ouml;&szlig;ten zur&uuml;ckgelegten Strecken:</h4>';\n echo '<table class=\"shiptable\" border=\"0\">';\n echo '<tr><th>Schiff</th><th>Strecke</th><th>Herstellungsort</th><th>In Betrieb</th></tr>';\n $maxDistance = -1;\n $counter = 0;\n while ($counter++ < $maxRows && $row = mysql_fetch_array($result)) {\n if( $row['untilturn'] == '0' || $row['untilturn'] == 0) {\n $untilTurn = $maxTurn;\n }else {\n $untilTurn = $row['untilturn'];\n }\n echo '<tr>';\n //ship\n echo '<td>'.xstats_getShipFullDescription( $gameId, $row['shipid'], $row['shiprace'], $row['picturesmall'], $row['experience'], $untilTurn, $row['shipclass'],$row['shipname']).'</td>';\n //distance\n //first value is max distance\n if( $maxDistance == -1 ) {\n $maxDistance = $row['lj'];\n }\n echo '<td class=\"highlight\">';\n echo '<div class=\"percentbar\">';\n $distancePercent = $row['lj']*100/$maxDistance;\n echo '<div style=\"width: '.$distancePercent.'%\"></div>';\n echo '</div>';\n echo $row['lj'].' Lj';\n echo '</td>';\n //home planet, this is the planet where the ship occured first\n $planetOwnerIndex = xstats_getShipOwnerIndexAtTurn($gameId, $row['shipid'], $row['sinceturn']);\n echo '<td>'.xstats_getPlanetDescription( $gameId, $row['buildposx'], $row['buildposy'], $planetOwnerIndex, $row['buildplanetname'] ).'</td>';\n //from-to\n echo '<td>Runde '.$row['sinceturn'].'-'.$untilTurn.'</td>';\n echo '</tr>';\n }\n echo '</table>';\n}", "function divisions($sc2id) {\n\t\t\n\t\t$bnetprofile = ($sc2id);\n \t$html = file_get_contents($bnetprofile);\n \t\n \t$preg_fourvfour = preg_match_all(\n\t\t'/<div class=\"ladder\" data-tooltip=\"#best-team-4\">.*?<span class=\"(.*?)\">.*?<div class=\"tooltip-title\">Highest Ranked in 4v4<\\/div>.*?<strong>Division:<\\/strong> (.*?)<br \\/>.*?<strong>Rank:<\\/strong> (.*?)<\\/div>/s',\n\t\t$html,\n\t\t$games,\n\t\tPREG_SET_ORDER\n\t\t);\n\t\n\t\t\n\t\treturn $games;\n\t}", "function printStatsTable($table) {\n\n\t\t$stats = $table->getStats();\n\t\t$dice_rolls = $stats[\"dice_rolls\"];\n\t\t$report = sprintf(\"\"\n\t\t\t. \"Table Stats:\\n\"\n\t\t\t. \"============\\n\"\n\t\t\t. \"\\n\"\n\t\t\t. \"%15s: %5d\\n\"\n\t\t\t. \"%15s: %5d\\n\"\n\t\t\t. \"%15s: $this->green%5d$this->default\\n\"\n\t\t\t. \"%15s: $this->red%5d$this->default\\n\"\n\t\t\t. \"%15s: \\n\"\n\t\t\t. \"%15s: %5d %5s: %5d\\n\"\n\t\t\t. \"%15s: %5d %5s: %5d\\n\"\n\t\t\t. \"%15s: %5d %5s: %5d\\n\"\n\t\t\t. \"%15s: %5d %5s: %5d\\n\"\n\t\t\t. \"%15s: %5d %5s: %5d\\n\"\n\t\t\t. \"%31s: %5d\\n\"\n\t\t\t. \"\\n\",\n\t\t\t\"Games Played\",\n\t\t\t$stats[\"num_games\"],\n\t\t\t\"Rolls Made\",\n\t\t\t$stats[\"num_rolls\"],\n\t\t\t\"Wins\",\n\t\t\t$stats[\"wins\"],\n\t\t\t\"Losses\",\n\t\t\t$stats[\"losses\"],\n\t\t\t\"Dice Rolls\",\n\t\t\t2, $dice_rolls[2], 7, $dice_rolls[7],\n\t\t\t3, $dice_rolls[3], 8, $dice_rolls[8],\n\t\t\t4, $dice_rolls[4], 9, $dice_rolls[9],\n\t\t\t5, $dice_rolls[5], 10, $dice_rolls[10],\n\t\t\t6, $dice_rolls[6], 11, $dice_rolls[11],\n\t\t\t12, $dice_rolls[12]\n\t\t\t);\n\n\t\tprint $report;\n\n\t}", "private function htmlGameTime()\n {\n $html = '<div class=\"d-inline-flex jumbotron DarkJumbotron width100\" style=\"background-color: #161b22;\" >\n <div class=\"container\">\n <div class=\"row\"><h2>User\\'s time in games</h2></div>\n <div class=\"row cardGameBox box\">\n ';\n\n $listGamesBrut = $this->game->getListOfGameWithTimeUser($_SESSION['user']->idUser);\n foreach ($listGamesBrut as $key => $games) {\n\n\n $html .= $this->createCardHTMLTime($games['idGame']);\n }\n\n $html .= '</div>\n </div>\n </div>';\n return $html;\n }", "public static function seperate20PlayersInto4BalancedTeams($data) {\n\t$ret = array ();\n\tif (is_array ( $data ) && count ( $data ) > 0) {\n\t\t\t// in 10ner teams aufteilen\n\t\t$seperatedData = General::seperate10PlayersInto2BalancedTeams ( $data );\n\t\t$seperatedArrays = $seperatedData ['data'];\n\t\tif (is_array ( $seperatedArrays ) && count ( $seperatedArrays ) > 0) {\n\t\t\t$i = 0;\n\t\t\t$teams = array (1=>\"\", 2=>\"\", 3=>\"\", 4=>\"\");\n\t\t\tforeach ( $seperatedArrays as $k => $v ) {\n\t\t\t\t$doubleSeperatedData = array ();\n\t\t\t\t$doubleSeperatedData = General::seperate10PlayersInto2BalancedTeams ( $v );\n\t\t\t\t$doubleSeperatedArray = $doubleSeperatedData ['data'];\n\n\t\t\t\t\t// wenn erste iteration -> dann in team1 und 2 aufteilen\n\t\t\t\tif ($i === 0) {\n\t\t\t\t\t$teams [1] = $doubleSeperatedArray [1];\n\t\t\t\t\t$teams [2] = $doubleSeperatedArray [2];\n\t\t\t\t\t} \t\t\t\t\t// sonst team3 und 4\n\t\t\t\t\telse {\n\t\t\t\t\t\t$teams [3] = $doubleSeperatedArray [1];\n\t\t\t\t\t\t$teams [4] = $doubleSeperatedArray [2];\n\t\t\t\t\t}\n\t\t\t\t\t$i ++;\n\t\t\t\t}\n\t\t\t\t$ret ['data'] = $teams;\n\t\t\t}\n\t\t} else {\n\t\t\t$ret ['status'] = \"Eingabe Array leer\";\n\t\t}\n\n\t\treturn $ret;\n\t}", "function display_table($title, $sql, $none=false, $foot=false,$data_header=false, $tag=false, $translate=false)\n{\n\tglobal $session, $from, $to, $page, $playersperpage, $totalplayers;\n\n\t$title = translate_inline($title);\n\tif ($foot !== false) $foot = translate_inline($foot);\n\tif ($none !== false) $none = translate_inline($none);\n\telse $none = translate_inline(\"No players found.\");\n\tif ($data_header !== false) {\n\t\t$data_header = translate_inline($data_header);\n\t\treset ($data_header);\n\t}\n\tif ($tag !== false) $tag = translate_inline($tag);\n\t$rank = translate_inline(\"Rank\");\n\t$name = translate_inline(\"Name\");\n\t\n\t$timeselect = array(\"daily\",\"weekly\",\"overall\");\n\tforeach ($timeselect as $key){\n\t\tif (httpget('subop') != $key) $$key = \"<a href='hof.php?op=\".httpget('op').\"&subop=\".$key.\"'>\".ucfirst($key).\"</a>\";\n\t\t\telse $$key = ucfirst($key);\n\t\t\taddnav(\"\",\"hof.php?op=\".httpget('op').\"&subop=\".$key);\n\t\tif ($key == \"daily\" && httpget('subop') == \"\") $$key = ucfirst($key);\n\t}\n\toutput(\"`c`b`^%s`0`b `0`n\", $title);\n\tif (httpget('op') == \"kills\" || httpget('op') == \"\") output(\"`2[`0$daily`2] &nbsp; `2[`0$weekly`2] &nbsp; `2[`0$overall`2]`c\",true);\n\telse output(\"`c\");\n\trawoutput(\"<table cellspacing='0' cellpadding='2' align='center'>\");\n\trawoutput(\"<tr class='trhead'>\");\n\toutput_notl(\"<td>`b$rank`b</td><td>`b$name`b</td>\", true);\n\tif ($data_header !== false) {\n\t\tfor ($i = 0; $i < count($data_header); $i++) {\n\t\t\toutput_notl(\"<td>`b{$data_header[$i]}`b</td>\", true);\n\t\t}\n\t}\n\t$result = db_query($sql);\n\tif (db_num_rows($result)==0){\n\t\t$size = ($data_header === false) ? 2 : 2+count($data_header);\n\t\toutput_notl(\"<tr class='trlight'><td colspan='$size' align='center'>`&$none`0</td></tr>\",true);\n\t} else {\n\t\t$i=-1;\n\t\twhile ($row = db_fetch_assoc($result)) {\n\t\t\t$i++;\n\t\t\tif ($row['name']==$session['user']['name']){\n\t\t\t\trawoutput(\"<tr class='hilight'>\");\n\t\t\t} else {\n\t\t\t\trawoutput(\"<tr class='\".($i%2?\"trlight\":\"trdark\").\"'>\");\n\t\t\t}\n\t\t\toutput_notl(\"<td>%s</td><td>`&%s`0</td>\",($i+$from), $row['name'], true);\n\t\t\tif ($data_header !== false) {\n\t\t\t\tfor ($j = 0; $j < count($data_header); $j++) {\n\t\t\t\t\t$id = \"data\" . ($j+1);\n\t\t\t\t\t$val = $row[$id];\n\t\t\t\t\tif (isset($translate[$id]) &&\n\t\t\t\t\t\t\t$translate[$id] == 1 && !is_numeric($val)) {\n\t\t\t\t\t\t$val = translate_inline($val);\n\t\t\t\t\t}\n\t\t\t\t\tif ($tag !== false) $val = $val . \" \" . $tag[$j];\n\t\t\t\t\toutput_notl(\"<td align='right'>%s</td>\", $val, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\trawoutput(\"</tr>\");\n\t\t}\n\t}\n\trawoutput(\"</table>\");\n\tif ($foot !== false) output_notl(\"`n`c%s`c\", $foot);\n}", "public function printStats() {\n\t\t$html = new Html(\"\");\n\t\t$html->printChallengeStats($this->challengeName, $this->challengeAmount, $this->challengeDescription);\n\t}", "function getTeamNamesForQuiz($quiz) {\r\n\t}", "function buildRow($network){\n $offset = 0;\n $i = 0;\n while($i < 7){\n $currentTitle = getTitle($network, getTime($offset));\n if (count($currentTitle) == 0){\n echo '<td colspan=\"1\">Local Programming</td>';\n $collumns = 1;\n $offset += 30;\n }\n else{\n $collumns = (int)($currentTitle[0]['RUNTIME'] / 30);\n if($i + $collumns > 7 ){\n $collumns = 2;\n }\n else if ($i + $collumns == 7){\n $collumns += 1;\n }\n echo '<td colspan=\"'. $collumns.'\"><a href = \"/phase5/pages/info.php?id= ' . $currentTitle[0]['ID']. '\">' . $currentTitle[0]['TITLE'] . '</td> ';\n $offset += $currentTitle[0]['RUNTIME'] ;\n }\n $i += $collumns; \n }\n}", "public function all_team_member_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_team WHERE publication_status = 1 ORDER BY team_member_id DESC LIMIT 4\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function getTeam();", "function display_scores(){\n // Create a query for all scores:\n $result3 = db_query(\"SELECT * FROM `highscore` ORDER BY `score`\");\n\n // Store The query of all scores in an array:\n if($result3 === false){\n }else{\n $rows2 = array();\n while($row2 = mysqli_fetch_assoc($result3)){\n $rows2[] = $row2;\n }\n }\n\n // Get the total size of the array:\n $size = count($rows2);\n \n echo \"<br><h2>Leaderboard</h2>\";\n // Loop through and display array:\n for($i=0; $i < $size; $i++){\n echo \"Initials: \";\n print_r($rows2[$i]['user_initials']);\n echo \"<br>\";\n echo \"Score: \";\n print_r($rows2[$i]['score']);\n echo \"<br>\";\n echo \"Date/Time: \";\n print_r($rows2[$i]['date']);\n echo \"<br><br>\";\n }\n\n}", "function get_team_player_pitching_stats($year,$team_id) {\n global $db;\n $query = 'SELECT concat(players.first_name, \" \", players.last_name) AS player\n , g\n , gs\n , ip\n , ab\n , ha\n , k\n , bb\n , bf\n , war\n , k9\n , bb9\n , HR9\n , WHIP\n , `K/BB`\n , BABIP\n , ERA\n , FIP\n , xFIP\n , ERAminus\n , ERAplus\n , FIPminus\n , CalcPitching.player_id\n\n\n FROM CalcPitching INNER JOIN players ON CalcPitching.player_id = players.player_id\n\n WHERE year = :year AND CalcPitching.team_id = :team_id\n ORDER BY gs DESC, players.last_name';\n $statement = $db->prepare($query);\n $statement->bindValue(':year', $year);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $pitchers = $statement->fetchAll();\n $statement->closeCursor();\n return $pitchers;\n}", "public function preDisplay()\n {\n if (!$GLOBALS['current_user']->isAdminForModule('Users') && !$GLOBALS['current_user']->isDeveloperForModule('Users'))\n dotb_die(\"Unauthorized access to administration.\");\n\n\n //Customize Team Management - By Lap Nguyen\n include_once(\"custom/modules/Teams/_helper.php\");\n $ss = new Dotb_Smarty();\n $region = $GLOBALS['app_list_strings']['region_list'];\n $nodes = getTeamNodes();\n $ss->assign(\"MOD\", $GLOBALS['mod_strings']);\n $ss->assign(\"NODES\", json_encode($nodes));\n $ss->assign(\"APPS\", $GLOBALS['app_strings']);\n $ss->assign(\"CURRENT_USER_ID\", $GLOBALS['current_user']->id);\n\n $detail = getTeamDetail('1');\n $ss->assign(\"team_name\", $detail['team']['team_name']);\n $ss->assign(\"legal_name\", $detail['team']['legal_name']);\n $ss->assign(\"short_name\", $detail['team']['short_name']);\n $ss->assign(\"prefix\", $detail['team']['prefix']);\n $ss->assign(\"phone_number\", $detail['team']['phone_number']);\n $ss->assign(\"team_id\", $detail['team']['team_id']);\n $ss->assign(\"parent_name\", $detail['team']['parent_name']);\n $ss->assign(\"parent_id\", $detail['team']['parent_id']);\n $ss->assign(\"manager_user_id\", $detail['team']['manager_user_id']);\n $ss->assign(\"manager_user_name\", $detail['team']['manager_user_name']);\n $ss->assign(\"description\", $detail['team']['description']);\n $ss->assign(\"count_user\", $detail['team']['count_user']);\n $ss->assign(\"region\", $detail['team']['region']);\n $ss->assign(\"select_region\", $region);\n\n echo $ss->fetch('custom/modules/Teams/tpls/TeamManagement.tpl');\n dotb_die();\n }", "function getRecords($record, $team){\n // league standings\n $l_win = 0;\n $l_loss = 0;\n $l_tie = 0;\n // overall standings\n $o_win = 0;\n $o_loss = 0;\n $o_tie = 0;\n // league goals\n $l_pf = 0;\n $l_pa = 0;\n // overall goals\n $o_pf = 0;\n $o_pa = 0;\n // total points\n $points = 0;\n\n foreach($record as $result){\n if($result['winner'] != NULL){\n //get the final scores for both teams\n if($result['away_final'] != NULL && $result['home_final'] != NULL){\n $away_score = $result['away_final'];\n $home_score = $result['home_final']; \n }\n //get pf/pa and w/l for league\n if($result['away_league'] == $result['home_league']){\n //if school won, +1 to win, else +1 to loss\n if($result['team_id'] == $result['winner']){\n $l_win++;\n }\n elseif($result['winner'] == \"TIE\"){\n $l_tie++;\n }\n else{\n $l_loss++;\n }\n //is school home or away, add points to appropriate total\n if($result['team_id'] == $result['away_id']){\n // if away, add score to points for and opponent to points against \n $l_pf += $away_score;\n $l_pa += $home_score;\n }else{\n // if home, add score to points for and opponent to points against\n $l_pf += $home_score;\n $l_pa += $away_score;\n }\n }\n //get pf/pa and w/l for overall\n //if school won, +1 to win, else +1 to loss\n if($result['team_id'] == $result['winner']){\n $o_win++;\n $points += 3;\n }\n elseif($result['winner'] == \"TIE\"){\n $o_tie++;\n $points += 1;\n }\n else{\n $o_loss++;\n }\n //is school home or away, add points to appropriate total\n if($result['team_id'] == $result['away_id']){\n // if away, add score to points for and opponent to points against \n $o_pf += $away_score;\n $o_pa += $home_score;\n }else{\n // if home, add score to points for and opponent to points against\n $o_pf += $home_score;\n $o_pa += $away_score;\n }\n }\n }\n // push team record info into array\n $team_record = ['team'=>$team['name'],'team_id'=>$team['school_id'],'league'=>$team['league'],'class'=>$team['class'],'lwin'=>$l_win,'lloss'=>$l_loss,'ltie'=>$l_tie,'lgf'=>$l_pf,'lga'=>$l_pa,'owin'=>$o_win,'oloss'=>$o_loss,'otie'=>$o_tie,'ogf'=>$o_pf,'oga'=>$o_pa,'points'=>$points];\n\n return $team_record;\n}", "public function displayWinner()\n {\n // Search in array scores, for the username with the highest score.\n $nameWinner = array_search(max($this->scores), $this->scores);\n $scoreWinner = max($this->scores);\n\n $this->console->stdInput(1);\n $this->console->getInpunt(\"De winnaar met \" . $scoreWinner[\"scoreTotal\"] . \" punten is: \" . $nameWinner . \"\\nPress enter to end the game!\");\n $this->console->stdInput(1);\n }", "public function printDebug() {\n foreach ($this->debug_results as $index => $oDebugInfo) {\n $str.= '<table style=\"padding:0;border:1px solid black; background:rgba(0,0,0,0.1); margin:5px;max-width:100%;\">';\n $str.= '<tbody style=\"padding:0;margin:0;\">';\n $str.= '<tr style=\"margin:0;padding:0\">';\n $str.= '<td colspan=2 style=\"vertical-align: top; min-width:150px;text-align:left;margin:0;padding:0;\"><div style=\"font-size:20px;background:rgba(0,0,0,0.5);color:white;padding:4px;width:fit-content;width:-moz-fit-content;width:-webkit-fit-content\">Petición #' . ($index + 1) . '</div></td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Funcion</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->function . '</td>';\n $str.= '</tr>';\n $str.= '<tr style=\"vertical-align: top; min-width:150px;text-align:left;\">';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Tipo de petición</th>';\n $str.= '<td>' . strtoupper($oDebugInfo->debug_request_type) . '</td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Tiempo de actualización:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->maxTimeElapsed . 's</td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Tiempo gastado:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->timeSpent . '</td>';\n $str.= '</tr>';\n if ($oDebugInfo->debug_request_type == DebugInfo::DEBUG_REQUEST_TYPE_URL) {\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Resource Url:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">[' . $oDebugInfo->url_request_type . '] ' . $oDebugInfo->resourceUrl . '</td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Url Params:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">';\n if (is_array($oDebugInfo->params)) {\n $str.= '<ul style=\"list-style:none;padding:0;\">';\n foreach ($oDebugInfo->params as $key => $value) {\n $str.= '<li>' . $key . ' = ' . $value . '</li>';\n }\n $str.= '</ul>';\n } else {\n $str.= $oDebugInfo->params;\n }\n $str.= '</td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Full url:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\"><a href=\"' . $oDebugInfo->fullUrl . '\" target=\"_blank\">' . $oDebugInfo->fullUrl . '</a></td>';\n $str.= '</tr>';\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">HTTP CODE:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->last_http_code . '</td>';\n $str.= '</tr>';\n if ($oDebugInfo->last_http_code != 200 && $oDebugInfo->exception) {\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\"><font color=\"red\">Excepción:</font></th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\"><font color=\"red\">';\n $str.= '<strong>' . $oDebugInfo->exception->getCode() . ' - ' . $oDebugInfo->exception->getMessage() . '</strong>';\n $str.= '<ul style=\"padding-left:10px;margin:0;\">';\n foreach ($oDebugInfo->exception->getTrace() as $trace) {\n $str.= '<li>' . $trace['file'] . ' (' . $trace['line'] . ') - ' . $trace['class'] . '-><strong>' . $trace['function'] . '(' . implode(',', $trace['args']) . ')</strong></li>';\n }\n $str.= '</ul>';\n $str.= '</font></td>';\n $str.= '</tr>';\n }\n } elseif ($oDebugInfo->debug_request_type == DebugInfo::DEBUG_REQUEST_TYPE_CACHE) {\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Cache Index:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\"><a target=\"_blank\" href=\"' . str_replace('/', '\\\\', \\LolApi\\Cache\\CacheManager::$static_cache_folder) . $oDebugInfo->cacheIndex . '.json\">' . $oDebugInfo->cacheIndex . '</a></td>';\n $str.= '</tr>';\n }\n if ($oDebugInfo->last_http_code == 200) {\n $str.= '<tr>';\n $str.= '<th style=\"vertical-align: top; min-width:150px;text-align:left;\">Datos:</th>';\n $str.= '<td style=\"vertical-align: top; min-width:150px;text-align:left;\">' . $oDebugInfo->data . '</td>';\n $str.= '</tr>';\n }\n $str.= '</tbody>';\n $str.= '</table>';\n }\n\n $str.= '<ul>';\n $str.= '<li>Tiempo total dedicado: ' . $this->debug_time_spent . '</li>';\n $str.= '<li>Peticiones de URL: ' . $this->debug_total_url_requests . '</li>';\n $str.= '<li>Peticiones de Caché: ' . $this->debug_total_cache_requests . '</li>';\n $str.= '<li>Número total de peticiones: ' . $this->getTotalRequests() . '</li>';\n $str.= '</ul>';\n $str.= '</div>';\n return $str;\n }", "function listTeams() {\n global $oDbHelper;\n\n $sQuery = \"SELECT * FROM team WHERE competition_id = \" . COMPETITION_ID;\n $oResult = $oDbHelper->executeQuery($sQuery);\n $oDbHelper->printDbResult($oResult);\n}", "function display() {\r\n echo '<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\r\n echo '<tr>'; \r\n for ($pos = 0; $pos < 9; $pos++) { \r\n echo $this->show_cell($pos); \r\n if ($pos % 3 == 2) {\r\n echo '</tr><tr>';\r\n } \r\n }\r\n echo '</tr>';\r\n echo '</table>';\r\n }", "function printTails ($bottomList) {\t\n\n echo \"<table align=center valign=bottom width=100%>\";\n\n echo \"<tr bgcolor=><td align=center class=fixedlinings>&nbsp;\\n\";\n\n $tabs = \"\";\n\n foreach ($bottomList as $entry){\n\n if ($tabs){\n\n echo \" | \";\n\n }\n\n else {\n\n $tabs = 1;\n\n }\n\n echo $entry, \"\\n\";\n\n }\n\n echo \"&nbsp;</td></tr>\";\n\n\n\n}", "public function getTeams();", "function get_team_fipm_leaders($year,$team_id) {\n global $db;\n $query = 'SELECT p.player_id\n , CONCAT(pl.first_name,\" \",pl.last_name) AS player\n , p.FIPminus\n FROM CalcPitching p INNER JOIN players pl ON p.player_id=pl.player_id\n INNER JOIN team_history_record t ON p.team_id=t.team_id AND p.year=t.year\n WHERE p.year = :year AND p.team_id = :team_id\n AND p.g >= 35\n ORDER BY p.FIPminus\n LIMIT 3';\n $statement = $db->prepare($query);\n $statement->bindValue(':year', $year);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $team_fipm_leaders = $statement->fetchAll();\n $statement->closeCursor();\n return $team_fipm_leaders;\n}", "function wti($pagenum) {\n$gamename = \"Voided Alliance\"; //Whatever your heart desires raygoe... :D\n\t\tswitch ($pagenum){\n\t\tCase 0:\n\t\techo \"$gamename - Index\";\n\t\tbreak;\n\t\tCase 1:\n\t\techo \"$gamename - Game\";\n\t\tbreak;\n\t\tCase 2:\n\t\techo \"$gamename - Register\";\n\t\tbreak;\n\t\tCase 3:\n\t\techo \"$gamename - Login\";\n\t\tbreak;\n\t\tCase 4:\n\t\techo \"$gamename - Player\";\n\t\tbreak;\n\t\tCase 5:\n\t\techo \"$gamename - Not Released\";\n\t\tbreak;\n\t\t}\n}", "public function displayScore()\n\t{\n\n\t\t$score = '<div id=\"scoreboard\" class=\"section\"><ol>'; //Scoreboard div and ordered list start\n\n\t\tfor ($correct = 0; $correct < $this->lives - $this->phrase->counter(); $correct++) {\n\t\t\t$score .= '<li class=\"tries\"><img src=\"images/liveHeart.png\" height=\"35px\"></li>';\n\t\t}\n\n\t\tfor ($wrong = 0; $wrong < $this->phrase->counter(); $wrong++ ) {\n\t\t\t$score .= '<li class=\"tries\"><img src=\"images/lostHeart.png\" height=\"35px\"></li>';\n\t\t}\n\n\t\t$score .= '</ol></div>'; //Scoreboard div and ordered list end\n\n\t\treturn $score;\n\n\t}", "public function get_name() {\n\t\treturn 'team';\n\t}", "function display() {\n echo'<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\n echo'<tr>'; //first row\n for ($pos = 0; $pos < 9; $pos++) {\n echo $this->show_cell($pos);\n if ($pos % 3 == 2)\n echo '</tr><tr>'; //next square is in a new row\n }\n echo'</tr>';\n echo'</table>';\n }", "private function generateTableData(&$matches, &$teams)\n {\n $ret = [];\n\n reset($matches);\n reset($teams);\n $teamIds = array_keys($teams);\n $teamCnt = count($teamIds);\n $initArray = array_flip($teamIds);\n foreach ($teams as $uid => $team) {\n $ret[$uid] = $initArray;\n $ret[$uid][$uid] = ''; // Das Spiel gegen sich selbst\n // In das Array alle Heimspiele des Teams legen\n for ($i = 0; $i < $teamCnt; ++$i) {\n if ($uid == $teamIds[$i]) {\n $ret[$uid][$uid] = $this->ownMatchStr;\n } // Das Spiel gegen sich selbst\n else {\n $ret[$uid][$teamIds[$i]] = $this->findMatch($matches, $uid, $teamIds[$i]);\n }\n }\n }\n\n return $ret;\n }", "function display_teamsingleschedule($season, $team, $output = 'html', $week = null)\n{\n\tglobal $tpl, $db;\n\n\tif (empty($season)) {\n\t\t// default to this year\n\t\t$season = get_current_season();\n\t}\n\n\tif (!is_numeric($season)) {\n\t\tdisplay_message(\"Invalid season\", SCHEDULE_HEADER);\n\t\treturn;\n\t}\n\n\t$user = user_logged_in();\n\n\t$gamesstmt = $db->prepare('SELECT games.week, games.start, games.home_score, games.away_score, home_teams.abbreviation AS home_team_abbr, away_teams.abbreviation AS away_team_abbr FROM ' . TOTE_TABLE_GAMES . ' AS games LEFT JOIN ' . TOTE_TABLE_SEASONS . ' AS seasons ON games.season_id=seasons.id LEFT JOIN ' . TOTE_TABLE_TEAMS . ' AS home_teams ON games.home_team_id=home_teams.id LEFT JOIN ' . TOTE_TABLE_TEAMS . ' AS away_teams ON games.away_team_id=away_teams.id WHERE seasons.year=:year AND (games.away_team_id=:away_team_id OR games.home_team_id=:home_team_id) ORDER BY week');\n\t$gamesstmt->bindParam(':year', $season, PDO::PARAM_INT);\n\t$gamesstmt->bindParam(':away_team_id', $team, PDO::PARAM_INT);\n\t$gamesstmt->bindParam(':home_team_id', $team, PDO::PARAM_INT);\n\t$gamesstmt->execute();\n\n\t$tz = date_default_timezone_get();\n\tdate_default_timezone_set('UTC');\n\t$teamgames = array();\n\twhile ($game = $gamesstmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t$game['start'] = strtotime($game['start']);\n\t\t$game['localstart'] = get_local_datetime($game['start'], (!empty($user['timezone']) ? $user['timezone'] : null));\n\t\t$teamgames[(int)$game['week']] = $game;\n\t}\n\tdate_default_timezone_set($tz);\n\t\n\t$gamesstmt = null;\n\n\t$seasonweeks = get_season_weeks($season);\n\n\tfor ($i = 1; $i <= $seasonweeks; $i++) {\n\t\tif (!isset($teamgames[$i])) {\n\t\t\t$teamgames[$i] = array('bye' => true);\n\t\t}\n\t}\n\tksort($teamgames);\n\n\t$teamstmt = $db->prepare('SELECT teams.home, teams.team FROM . ' . TOTE_TABLE_TEAMS . ' WHERE id=:team_id');\n\t$teamstmt->bindParam(':team_id', $team, PDO::PARAM_INT);\n\t$teamstmt->execute();\n\t$teamobj = $teamstmt->fetch(PDO::FETCH_ASSOC);\n\t$teamstmt = null;\n\n\thttp_headers();\n\n\t$tpl->assign('team', $teamobj);\n\tif (empty($week)) {\n\t\t$tpl->assign('allseasons', array_reverse(get_seasons()));\n\t}\n\t$mobile = mobile_browser();\n\tif ($mobile) {\n\t\t$tpl->assign('mobile', true);\n\t}\n\n\t$tpl->assign('year', $season);\n\t$tpl->assign('games', $teamgames);\n\tif (!empty($week))\n\t\t$tpl->assign('week', $week);\n\n\tif ($output == 'js')\n\t\t$tpl->assign('js', true);\n\n\t$tpl->display('teamsingleschedule.tpl');\n}" ]
[ "0.64923745", "0.63641", "0.6343724", "0.6284793", "0.62629074", "0.6219896", "0.6206723", "0.61959416", "0.6145775", "0.61189675", "0.6095231", "0.60321915", "0.5998101", "0.58968467", "0.58784753", "0.58676875", "0.5841235", "0.5841121", "0.5830934", "0.58199495", "0.57998", "0.57887053", "0.57862675", "0.57839626", "0.57796234", "0.57697445", "0.5736394", "0.5692504", "0.5688753", "0.56543803", "0.5647681", "0.5640392", "0.564034", "0.56185764", "0.5595187", "0.5582569", "0.5575327", "0.55688316", "0.5564787", "0.55639195", "0.5557358", "0.555089", "0.5540463", "0.5522117", "0.552202", "0.55102193", "0.55090094", "0.5482005", "0.5480228", "0.5476141", "0.5474377", "0.54570967", "0.5441875", "0.5440766", "0.5427349", "0.54200184", "0.5414486", "0.5396738", "0.5396223", "0.53957784", "0.5394645", "0.539464", "0.5384134", "0.53821534", "0.53792423", "0.53752565", "0.5368988", "0.53676265", "0.53648293", "0.5363535", "0.53571266", "0.53483003", "0.53399247", "0.5337503", "0.5336734", "0.53316873", "0.532926", "0.53262657", "0.53254294", "0.5324994", "0.5315219", "0.5312787", "0.5310177", "0.5298588", "0.5298441", "0.5293702", "0.5292019", "0.5291918", "0.52917063", "0.5278859", "0.52376574", "0.5234029", "0.522851", "0.52271694", "0.5226955", "0.52218837", "0.5217428", "0.52123255", "0.52064466", "0.51996315" ]
0.60148877
12
/ echo ""; print_r($_POST); $get_date = "20100301";
function ShowDayOfMonth($get_month){ $arr_d1 = explode("-",$get_month); $xdd = "01"; $xmm = "$arr_d1[1]"; $xyy = "$arr_d1[0]"; $get_date = "$xyy-$xmm-$xdd"; // วันเริ่มต้น //echo $get_date."<br>"; $xFTime1 = getdate(date(mktime(0, 0, 0, intval($xmm+1), intval($xdd-1), intval($xyy)))); $numcount = $xFTime1['mday']; // ฝันที่สุดท้ายของเดือน if($numcount > 0){ $j=1; for($i = 0 ; $i < $numcount ; $i++){ $xbasedate = strtotime("$get_date"); $xdate = strtotime("$i day",$xbasedate); $xsdate = date("Y-m-d",$xdate);// วันถัดไป $arr_d2 = explode("-",$xsdate); $xFTime = getdate(date(mktime(0, 0, 0, intval($arr_d2[1]), intval($arr_d2[2]), intval($arr_d2[0])))); if($xFTime['wday'] == 0){ $j++; } if($xFTime['wday'] != "0"){ $arr_date[$j][$xFTime['wday']] = $xsdate; } } }//end if($numcount > 0){ return $arr_date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function datumtest()\n{\n datest($_REQUEST['vondatum']);\n datest($_REQUEST['bisdatum']);\n}", "function formataData($dateString){\n $arr = date_parse($dateString);\n return $arr[\"day\"].\"/\".$arr[\"month\"].\"/\".$arr[\"year\"];\n }", "function getDailyEventData($date) {\n //Check date format\n $format = \"m/d/Y\";\n $eventDate = date_create_from_format($format, $date);\n if(!$eventDate) {\n // createFromFormat returns false if the format is invalid or date is invalid\n echo \"Please enter a valid date in mm/dd/yyyy format. Cannot proceed due to invalid date error\";\n } else {\n $data;\n $data['SelectedDate'] = $date;\n $data['surfSelect']=0;\n $data['sChange']=\"Get Date\";\n return parent::convertByPOST(self::$dailyEventUrl,$data,3);\n }\n }", "function form_date($variable='date', $date='', $nopop = false) {\n\n\tglobal $request;\n\n\t/***********\n\t* Select the current date\n\t***********/\n\n\t// use now\n\tif ($date == 'NOW') {\n\n\t\t$date = convert_gmt_timestamp_to_local_input(TIMENOW);\n\n\t// use the value submitted by form\n\t} elseif ($date == 'FORM') {\n\n\t\t$date = $request->getArrayString($variable);\n\n\t// use a numeric\n\t} elseif (is_numeric($date) AND $date > 0) {\n\t\t$date = convert_gmt_timestamp_to_local_input($date);\n\t}\n\n\t// the other option is an array for $date; which all the others are converted to so it is covered\n\tif (dpcheckdate($date)) {\n\t\t$month = $date['month'];\n\t\t$day = $date['day'];\n\t\t$year = $date['year'];\n\t}\n\n\t// we load the javascript & css if this is first time here\n\tif (!defined('DESKPRO_JSLOADED_DATA')) {\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/calendar.js');\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/lang/calendar-en.js');\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/calendar-setup.js');\n\t\t$html .= get_css('./../3rdparty/selectcalendar/calendar-win2k-cold-1.css');\n\t\tdefine('DESKPRO_JSLOADED_DATA', 1);\n\t}\n\n\t// random button link\n\t$button = 'data' . dp_rand(1,1000000);\n\n\t// the html for creating the calendar\n\t$html .= \"\n\t<table cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><tr>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_day($variable . '[day]', $day, $variable . '_day') . \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_month($variable . '[month]', $month, $variable . '_month'). \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_year($variable . '[year]', $year, $variable . '_year') . \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\n\n\t<input style=\\\"display:none\\\" type=\\\"text\\\" value=\\\"$current\\\" name=\\\"$variable\" . \"_selector\\\" id=\\\"$variable\\\" /></td>\";\n\n\tif (!$nopop) {\n\n\t\t$html .= \"<td>\" . html_image('icons/view_calendar.gif', '', \"id=\\\"$button\\\" title=\\\"Date selector\\\"\n onmouseover=\\\"this.style.background='red';\\\" onmouseout=\\\"this.style.background=''\\\"\");\n\n\t\tif ($time) {\n\n\t\t\t$html .= \"\n\t\t\t<script type=\\\"text/javascript\\\">\n\t\t\t\tCalendar.setup({\n\t\t\t\t\tinputField : \\\"$variable\" . \"_selector\\\",\n\t\t\t\t\tifFormat : \\\"%Y-%m-%d %H:%M\\\",\n\t\t\t\t\tshowsTime : true,\n\t\t\t\t\tbutton : \\\"$button\\\",\n\t\t\t\t\tsingleClick : true,\n\t\t\t\t\talign\t\t\t:\t'Bl',\n\t\t\t\t\tstep : 1,\n\t\t\t\t\tonSelect : onSelect\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t\";\n\n\t\t} else {\n\n\t\t\t$html .= \"\n\t\t\t<script type=\\\"text/javascript\\\">\n\t\t\t\tCalendar.setup({\n\t\t\t\t\tinputField : \\\"$variable\\\",\n\t\t\t\t\tifFormat : \\\"%Y-%m-%d\\\",\n\t\t\t\t\tshowsTime : false,\n\t\t\t\t\tbutton : \\\"$button\\\",\n\t\t\t\t\tsingleClick : true,\n\t\t\t\t\talign\t\t\t:\t'Bl',\n\t\t\t\t\tstep : 1,\n\t\t\t\t\tonSelect : onSelect\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t\";\n\n\t\t}\n\n\t\t$html .= \"</td>\";\n\n\t}\n\n\t$html .= \"</tr></table>\";\n\n\treturn $html;\n}", "function _get_input_date($stub,$get_also=false)\n{\n\t$timezone=post_param('timezone',get_users_timezone());\n\tif ($get_also)\n\t{\n//\t\tif (either_param_integer($stub,0)==0) return NULL; // NULL was chosen\t\tDoesn't work like this now\n\n\t\t$year=either_param_integer($stub.'_year',NULL);\n\t\tif (is_null($year)) return NULL;\n\t\t$month=either_param_integer($stub.'_month',NULL);\n\t\tif (is_null($month)) return NULL;\n\t\t$day=either_param_integer($stub.'_day',NULL);\n\t\tif (is_null($day)) return NULL;\n\t\t$hour=either_param_integer($stub.'_hour',NULL);\n\t\t$minute=either_param_integer($stub.'_minute',NULL);\n\t} else\n\t{\n//\t\tif (post_param_integer($stub,0)==0) return NULL; // NULL was chosen\t\tDoesn't work like this now\n\n\t\t$year=post_param_integer($stub.'_year',NULL);\n\t\tif (is_null($year)) return NULL;\n\t\t$month=post_param_integer($stub.'_month',NULL);\n\t\tif (is_null($month)) return NULL;\n\t\t$day=post_param_integer($stub.'_day',NULL);\n\t\tif (is_null($day)) return NULL;\n\t\t$hour=post_param_integer($stub.'_hour',NULL);\n\t\t$minute=post_param_integer($stub.'_minute',NULL);\n\t}\t\n\n\tif (!checkdate($month,$day,$year)) warn_exit(do_lang_tempcode('INVALID_DATE_GIVEN'));\n\n\tif (is_null($hour))\n\t{\n\t\tif (strpos($stub,'end')!==false)\n\t\t{\n\t\t\t$hour=23;\n\t\t\t$minute=59;\n\t\t} else\n\t\t{\n\t\t\t$hour=0;\n\t\t\t$minute=0;\n\t\t}\n\t}\n\n\t$time=mktime($hour,$minute,0,$month,$day,$year);\n\tif (($year>=1970) || (@strftime('%Y',@mktime(0,0,0,1,1,1963))=='1963')) // Only try and do timezone conversion if we can do proper maths this far back\n\t{\n\t\t$amount_forward=tz_time($time,$timezone)-$time;\n\t\t$time=$time-$amount_forward;\n\t}\n\n\treturn $time;\n}", "function _groom_get_reference_date()\n{\n $date = new DateTime();\n $get_params = drupal_get_query_parameters();\n\n if (!empty($get_params['month-display']) && preg_match('/^[0-9]{4}-[0-9]{2}$/', $get_params['month-display'])) {\n $date = new DateTime($get_params['month-display']);\n }\n\n return $date;\n}", "function dateNumberForm_1($dateTime)\n{\n\t$rtnValue\t=\t\"\";\n\tif(substr($dateTime,0,10) == date(\"Y-m-d\"))\n\t{\n\t\t$rtnValue\t=\tsubstr($dateTime, 11 , 8);\n\t}else{\n\t\t$rtnValue\t=\tsubstr($dateTime, 0 , 10);\n\t}//\tend if\n\t\n\treturn $rtnValue;\n}", "public function getDate(){\n return $this->getParameter('date');\n }", "public function postReporte(Request $request){\n\n dd($request->date);\n }", "public function requestDate();", "public function post_date( $key ) {\n\t\t$this->data['post_date'] = $key;\n\t}", "function checkPostDate (string $key, array $min, array $max):string{\n if (!array_key_exists($key, $_POST) || empty($_POST[$key])) {\n $message = \"Merci de saisir une date\";\n }elseif (strlen($_POST[$key]) !== 10){\n $message = \"La date n'est pas valide\";\n }else{\n $date = explode (\"-\", $_POST[$key]);\n $annee = intval($date[0]);\n $mois = intval($date[1]);\n $jour = intval($date[2]);\n if (sizeof($date) !== 3 || checkdate($mois, $jour, $annee) != true) {\n $message = \"La date saisie n'est pas valide\";\n }else{\n $timestamp = mktime(0, 0, 0, $mois, $jour, $annee);\n $timestampMin = mktime(0,0,0,$min[1],$min[2],$min[0]);\n $timestampMax = mktime(0,0,0,$max[1],$max[2],$max[0]);\n if ($timestamp < $timestampMin){\n $message = \"La date saisie doit être après le $min[2]/$min[1]/$min[0]\";\n }\n if ($timestamp > $timestampMax){\n $message = \"La date saisie doit être avant le $max[2]/$max[1]/$max[0]\";\n }\n }\n }\n return $message ?? '';\n}", "private function setDate(){\n\t// Validate incoming parameters\n\t\t$this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\tif (isset($_GET['month'])) {\n\t\tis_numeric($_GET['month']) or die('month has to be numeric');\n\t}\n\tif (isset($_GET['year'])) {\n\t\tis_numeric($_GET['year']) or die('year has to be numeric');\n\t}\n\n\t// Set new date\n\t$this->newMonth = isset($_GET['month']) ? ($_GET['month']) : $this->currentMonth;\n\t$this->newYear = isset($_GET['year']) ? ($_GET['year']) : $this->currentYear;\n\n\tif ($this->newMonth > 12) {\n\t\t$this->newYear = $this->newYear +1;\n\t\t$this->newMonth = 1;\n\t\t$_GET['month'] = 1;\n\n\t}\n\telse if ($this->newMonth < 1) {\n\t\t$this->newYear = $this->newYear -1;\n\t\t$this->newMonth = 12;\n\t\t$_GET['month'] = 12;\n\t}\n\t\n\t}", "function FetchRecordByPOST()\n {\n\n // sales date is required.\n if (!$_POST[\"SalesDate\"]) throw new MissingRecordDataException(\"SalesDate is missing\");\n return Array( \n \"SalesDate\" => $_POST[\"SalesDate\"],\n \"Comment\" => $_POST[\"Comment\"],\n \"SalesRecordNumber\" => $_POST[\"SalesRecordNumber\"] ?? null\n );\n }", "function pickup_submit()\n\t{\n\t\t$year = $this->name . '_year';\n\t\t$month = $this->name . '_month';\n\t\t$day = $this->name . '_day';\n\t\tglobal $$year, $$month, $$day;\n\n\t\t$this->value = $$year . \".\" . $$month . \".\" . $$day;\n\t}", "function getFromPost() {\r\n\t\t\r\n\t\t//Event Page variables.\r\n\t\t$this->name = $_POST['eventName'];\r\n\t\t$this->date = $_POST['eventDate'];\r\n\t\t$this->time = $_POST['eventTime'];\r\n\t\t$this->time_before = $_POST['time_before'];\r\n\t\t$this->freq = $_POST['frequency'];\r\n\t\t$this->notif_method = $_POST['method'];\r\n\t}", "function acf_convert_date_to_php($date = '')\n{\n}", "public function verifyPOST(){\n\t\tif (isset($_POST['rom']) && !empty($_POST['rom'])) {\n\t\t\t$rom = $_POST['rom'];\n\t\t}\n\t\tif (isset($_POST['lastName']) && !empty($_POST['lastName'])) {\n\t\t\t$lastName = $_POST['lastName'];\t\t\t\n\t\t} else {\n\t\t\theader(\"Location: \".BASE_URL.\"projects/calendar?err=f\");\n\t\t}\n\n\t\tif (isset($_POST['firstName']) && !empty($_POST['firstName'])) {\n\t\t\t$firstName = $_POST['firstName'];\t\t\t\n\t\t} else {\n\t\t\theader(\"Location: \".BASE_URL.\"projects/calendar?err=f\");\n\t\t}\n\n\t\tif (isset($_POST['days']) && !empty($_POST['days'])) {\n\t\t\t$days = $_POST['days'];\n\t\t} else {\n\t\t\theader(\"Location: \".BASE_URL.\"projects/calendar?err=p\");\n\t\t}\n\n\t\tif (isset($_POST['date']) && !empty($_POST['date'])) {\n\t\t\t$date_init = $_POST['date'];\n\t\t\t$date_end = date('Y-m-d', strtotime($days.' days', strtotime($date_init)));\t\t\t\n\t\t} else {\n\t\t\theader(\"Location: \".BASE_URL.\"projects/calendar?err=d\");\n\t\t}\t\n\n\t\tif (!empty($rom) && !empty($firstName) && !empty($lastName) && !empty($date_init) && !empty($date_end) && !empty($days)) {\n\t\t\t$this->rent($rom, $firstName, $lastName, $date_init, $date_end, $days);\n\t\t} else {\n\t\t\theader(\"Location: \".BASE_URL.\"projects/calendar\");\n\t\t}\t\n\t}", "function setDate($date = null)\r\n\t{\t\r\n\t\t$day = substr($date ,8, 2);\r\n\t\t$month = substr($date ,5, 2);\r\n\t\t$year = substr($date ,0, 4);\r\n\t\t\r\n\t\t$newDate = $day.'-'.$month.'-'.$year;\r\n\t\t\r\n\t\treturn $newDate;\r\n\t}", "function dateformatusa($date)\n{\n\t$ndate = explode(\"-\",$date);\n\t$year = $ndate[2];\n\t$day = $ndate[0];\n\t$month = $ndate[1];\n\t\n\treturn $year . \"-\" . $month . \"-\" . $day;\n}", "function get_agent_date(){\n\t\t$field_id = $this->input->post('field_id');\n\t\t$contact_number = $this->input->post('contact_number');\n\t\t$agent_name = $this->input->post('agent_name');\n\t\t$email_id = $this->input->post('email_id');\n\t\t$data['contact_number']= $contact_number;\n\t\t$data['agent_name']= $agent_name;\n\t\t$data['email_id']= $email_id;\n\t\t$this->load->view('common/agent_details_content',$data); \n\t\t}", "function cfdef_input_date( $p_field_def, $p_custom_field_value ) {\n\tprint_date_selection_set( 'custom_field_' . $p_field_def['id'], config_get( 'short_date_format' ), $p_custom_field_value, false, true );\n}", "function COM_JSdate(&$date) {\r\n\t//note: the \"intval\" removes the leading zero which JS interprets as octal number;\r\n\t//\t\"-1\" needed because JS expects month rel to 0 (but not day) and same as \"intval\")\r\n\treturn $date->format(\"Y\").\",\".($date->format(\"m\")-1).\",\".intval($date->format(\"d\"));\r\n}", "function tripal_jobs_get_submit_date($job){\n return format_date($job->submit_date);\n}", "function entrydate($str='now'){\n return $time=strtotime($str); \n }", "function _field_date_us($fval) \n {\n $f_date = \"\";\n if ($fval) {\n list($m,$d,$y) = split('/', $fval);\n $f_date = array($y, $m, $d);\n }\n return $this->_field_date($f_date);\n }", "function search_by_date(){\n if($_SERVER['REQUEST_METHOD']==\"POST\" || isset($_POST['submit'])){\n $Selected_date = escape_string(trim($_POST['sch_date']));\n $_SESSION['sch_date'] = $Selected_date;\n redirect('schedules.php');\n }\n}", "function data_form($datasql) {\n\tif (!empty($datasql)){\n\t$p_dt = explode('-',$datasql);\n\t$data_br = $p_dt[2].'/'.$p_dt[1].'/'.$p_dt[0];\n\treturn $data_br;\n\t}\n}", "private function retrieve_date() {\n\t\t$replacement = null;\n\n\t\tif ( $this->args->post_date !== '' ) {\n\t\t\t$replacement = mysql2date( get_option( 'date_format' ), $this->args->post_date, true );\n\t\t}\n\t\telse {\n\t\t\tif ( get_query_var( 'day' ) && get_query_var( 'day' ) !== '' ) {\n\t\t\t\t$replacement = get_the_date();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( single_month_title( ' ', false ) && single_month_title( ' ', false ) !== '' ) {\n\t\t\t\t\t$replacement = single_month_title( ' ', false );\n\t\t\t\t}\n\t\t\t\telseif ( get_query_var( 'year' ) !== '' ) {\n\t\t\t\t\t$replacement = get_query_var( 'year' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}", "function WriteID()\r\n{\r\n if (isset($_POST))\r\n {\r\n if (!empty($_POST) && !empty($_POST['delivery']))\r\n {\r\n echo $_POST['delivery'];\r\n }\r\n\r\n }\r\n}", "function date_picker_to_db( $strdate )\n{\n\tif( strpos($strdate, '-') !== false) { return $strdate; }\n\tif( !isset($strdate) || $strdate == '' ){ return NULL; }\n\n\tlist($datetime['day'], $datetime['month'], $datetime['year']) = explode('/', $strdate);\n\n\tif( count( $datetime ) != 3 ) { return NULL; }\n\treturn ($datetime['year'] . '-' . $datetime['month'] . '-' . $datetime['day']) ;\n}", "function demo_display_callback($post)\n {\n ?>\n <form>\n <p >\n <label for=\"published_date\">Published Date</label>\n <input id=\"published_date\" type=\"date\" name=\"published_date\"\n value=\"<?php echo esc_attr( get_post_meta( get_the_ID(), 'published_date', true ) ); ?>\">\n </p>\n </form> \n<?php\n }", "function Date($key=\"\")\n {\n if (empty($this->Date))\n {\n $date=$this->CGI_GETOrPOSTint($this->DateGETField);\n if (!empty($date))\n {\n $this->Date=\n $this->DatesObj()->Sql_Select_Hash\n (\n array\n (\n \"ID\" => $date,\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n )\n );\n }\n \n }\n\n if (!empty($key)) { return $this->Date[ $key ]; }\n \n return $this->Date;\n }", "function formDate($data) {\n\t\t\t// AQUI RECEBER O PADRAO PARA ENTAO EFETUAR O TIMESTAMP\n\t\t\t$timestamp \t= explode(\" \", $data);\n\t\t\t$getData\t= $timestamp[0];\n\t\t\t$getTime\t= $timestamp[1];\n\n\t\t\t\t$setData\t= explode('/', $getData);\n\t\t\t\t$dia \t\t= $setData[0];\n\t\t\t\t$mes \t\t= $setData[1];\n\t\t\t\t$ano \t\t= $setData[2];\n\t\t\t// AQUI VAMOS DEFINIR AS HORAS, CASO SELECIONA OU NAO\n\t\t\t\tif (!$getTime):\n\t\t\t\t\t$getTime = date('H:i:s');\n\t\t\t\tendif;\n\t\t\t$result \t= $ano.'-'.$mes.'-'.$dia.' '.$getTime;\n\n\t\t\treturn $result;\n\t\t}", "function get_post_datetime($post = \\null, $field = 'date', $source = 'local')\n {\n }", "function getData(){\n $data=array();\n $data[0]=(isset($_POST['id']) ? $_POST['id'] : '');\n $data[1]=(isset($_POST['bcg']) ? $_POST['bcg'] : '');\n $data[2]=(isset($_POST['date1']) ? $_POST['date1'] : '');\n $data[3]=(isset($_POST['date2']) ? $_POST['date2'] : '');\n $data[4]=(isset($_POST['date3']) ? $_POST['date3'] : '');\n $data[5]=(isset($_POST['date4']) ? $_POST['date4'] : '');\n $data[6]=(isset($_POST['date5']) ? $_POST['date5'] : '');\n $data[7]=(isset($_POST['date6']) ? $_POST['date6'] : '');\n $data[8]=(isset($_POST['date7']) ? $_POST['date7'] : '');\n $data[9]=(isset($_POST['date8']) ? $_POST['date8'] : '');\n $data[10]=(isset($_POST['date9']) ? $_POST['date9'] : '');\n $data[11]=(isset($_POST['date10']) ? $_POST['date10'] : '');\n $data[12]=(isset($_POST['date11']) ? $_POST['date11'] : '');\n $data[13]=(isset($_POST['date12']) ? $_POST['date12'] : '');\n $data[14]=(isset($_POST['date13']) ? $_POST['date13'] : '');\n $data[15]=(isset($_POST['date14']) ? $_POST['date14'] : '');\n $data[16]=(isset($_POST['date15']) ? $_POST['date15'] : '');\n $data[17]=(isset($_POST['date16']) ? $_POST['date16'] : '');\n $data[18]=(isset($_POST['date17']) ? $_POST['date17'] : '');\n $data[19]=(isset($_POST['date18']) ? $_POST['date18'] : '');\n $data[20]=(isset($_POST['date19']) ? $_POST['date19'] : '');\n $data[21]=(isset($_POST['date20']) ? $_POST['date20'] : '');\n $data[22]=(isset($_POST['date21']) ? $_POST['date21'] : '');\n $data[23]=(isset($_POST['date22']) ? $_POST['date22'] : '');\n $data[24]=(isset($_POST['date23']) ? $_POST['date23'] : '');\n $data[25]=(isset($_POST['date24']) ? $_POST['date24'] : '');\n $data[26]=(isset($_POST['date25']) ? $_POST['date25'] : '');\n $data[27]=(isset($_POST['num1']) ? $_POST['num1'] : '');\n $data[28]=(isset($_POST['num2']) ? $_POST['num2'] : '');\n $data[29]=(isset($_POST['num3']) ? $_POST['num3'] : '');\n $data[30]=(isset($_POST['num4']) ? $_POST['num4'] : '');\n $data[31]=(isset($_POST['num5']) ? $_POST['num5'] : '');\n $data[32]=(isset($_POST['num6']) ? $_POST['num6'] : '');\n $data[33]=(isset($_POST['num7']) ? $_POST['num7'] : '');\n $data[34]=(isset($_POST['num8']) ? $_POST['num8'] : '');\n $data[35]=(isset($_POST['num9']) ? $_POST['num9'] : '');\n $data[36]=(isset($_POST['num10']) ? $_POST['num10'] : '');\n $data[37]=(isset($_POST['num11']) ? $_POST['num11'] : '');\n $data[38]=(isset($_POST['num12']) ? $_POST['num12'] : '');\n $data[39]=(isset($_POST['num13']) ? $_POST['num13'] : '');\n $data[40]=(isset($_POST['num14']) ? $_POST['num14'] : '');\n $data[41]=(isset($_POST['num15']) ? $_POST['num15'] : '');\n $data[42]=(isset($_POST['num16']) ? $_POST['num16'] : '');\n $data[43]=(isset($_POST['num17']) ? $_POST['num17'] : '');\n $data[44]=(isset($_POST['num18']) ? $_POST['num18'] : '');\n $data[45]=(isset($_POST['num19']) ? $_POST['num19'] : '');\n $data[46]=(isset($_POST['num20']) ? $_POST['num20'] : '');\n $data[47]=(isset($_POST['num21']) ? $_POST['num21'] : '');\n $data[48]=(isset($_POST['num22']) ? $_POST['num22'] : '');\n $data[49]=(isset($_POST['num23']) ? $_POST['num23'] : '');\n $data[50]=(isset($_POST['num24']) ? $_POST['num24'] : '');\n $data[51]=(isset($_POST['num25']) ? $_POST['num25'] : '');\n $data[52]=(isset($_POST['test1']) ? $_POST['test1'] : '');\n $data[53]=(isset($_POST['test2']) ? $_POST['test2'] : '');\n $data[54]=(isset($_POST['test3']) ? $_POST['test3'] : '');\n $data[55]=(isset($_POST['test4']) ? $_POST['test4'] : '');\n $data[56]=(isset($_POST['test5']) ? $_POST['test5'] : '');\n $data[57]=(isset($_POST['test6']) ? $_POST['test6'] : '');\n $data[58]=(isset($_POST['test7']) ? $_POST['test7'] : '');\n $data[59]=(isset($_POST['test8']) ? $_POST['test8'] : '');\n $data[60]=(isset($_POST['test9']) ? $_POST['test9'] : '');\n $data[61]=(isset($_POST['test10']) ? $_POST['test10'] : '');\n $data[62]=(isset($_POST['test11']) ? $_POST['test11'] : '');\n $data[63]=(isset($_POST['test12']) ? $_POST['test12'] : '');\n $data[64]=(isset($_POST['test13']) ? $_POST['test13'] : '');\n $data[65]=(isset($_POST['test14']) ? $_POST['test14'] : '');\n $data[66]=(isset($_POST['test15']) ? $_POST['test15'] : '');\n $data[67]=(isset($_POST['test16']) ? $_POST['test16'] : '');\n $data[68]=(isset($_POST['test17']) ? $_POST['test17'] : '');\n $data[69]=(isset($_POST['test18']) ? $_POST['test18'] : '');\n $data[70]=(isset($_POST['test19']) ? $_POST['test19'] : '');\n $data[71]=(isset($_POST['test20']) ? $_POST['test20'] : '');\n $data[72]=(isset($_POST['test21']) ? $_POST['test21'] : '');\n $data[73]=(isset($_POST['test22']) ? $_POST['test22'] : '');\n $data[74]=(isset($_POST['test23']) ? $_POST['test23'] : '');\n $data[75]=(isset($_POST['test24']) ? $_POST['test24'] : '');\n $data[76]=(isset($_POST['test25']) ? $_POST['test25'] : '');\n $data[77]=(isset($_POST['date26']) ? $_POST['date26'] : '');\n $data[78]=(isset($_POST['num26']) ? $_POST['num26'] : '');\n $data[79]=(isset($_POST['test26']) ? $_POST['test26'] : '');\n return $data;\n}", "function getWeeklyEventData($date) {\n //Check date format\n $format = \"m/d/Y\";\n $eventDate = date_create_from_format($format, $date);\n if(!$eventDate) {\n // createFromFormat returns false if the format is invalid or date is invalid\n echo \"Please enter a valid date in mm/dd/yyyy format. Cannot proceed due to invalid date error\";\n } else {\n $data;\n $data['nextDay']=\"View Next Week >>\";\n $data['hbdate'] = \"{ts '\".date_format($eventDate,\"Y-m-d\").\" 02:37:51'}\";\n return parent::convertByPOST(self::$weekEventUrl,$data,2);\n }\n }", "function uwwtd_get_DD_MM_YYYY_from_YYYY_MM_DD_XXX($date) {\n $return = '';\n if (!empty($date)) {\n if (strlen($date) > 10) {\n $date = substr($date, 0, 10);\n }\n $dateObj = new DateTime($date);\n $return = $dateObj->format('d/m/Y');\n }\n return $return;\n}", "public function getInputDateNow($data)\n {\n $query = \"SELECT DAY(input_date) FROM \".$this->table.\" WHERE id_baru=0 AND tid=:tid\";\n\n $this->db->query($query);\n\n $this->db->bind('tid', $data);\n\n return $this->db->single();\n }", "function getInputValues() {\r\n $vals = array();\r\n \r\n $vals['datetime'] = @$_REQUEST['datetime'];\r\n $vals['mileage'] = @$_REQUEST['mileage'];\r\n $vals['location'] = @$_REQUEST['location'];\r\n $vals['pricepergallon'] = @$_REQUEST['pricepergallon'];\r\n $vals['gallons'] = @$_REQUEST['gallons'];\r\n $vals['grade'] = @$_REQUEST['grade'];\r\n $vals['pumpprice'] = @$_REQUEST['pumpprice'];\r\n $vals['notes'] = @$_REQUEST['notes'];\r\n \r\n return $vals;\r\n}", "function _fechaInput($fecha = ''){\n return \\Carbon\\Carbon::parse($fecha)->format('d/m/Y');\n // return \"{$d}/{$m}/{$y}\";\n\n\n\n\n }", "function template_date_select($params,&$smarty)\n {\n extract($params);\n \n if (empty($name)) {\n return;\n }\n \n $buffer = '<input type=\"text\" size=\"12\" maxlength=\"12\" name=\"'.$name.'\" value=\"'.$value.'\" /> (Format: mm/dd/yyyy)';\n return $buffer;\n }", "function create_date_value($date) {\n\t\t// Since no calendar is specified, should we always convert to gregorian?\n\t\t$date=$date->convert_to_cal('gregorian');\n\t\treturn\n\t\t\t($date->y==0 ? '????' : $date->Format('Y')) .'-'.\n\t\t\t($date->m==0 ? '??' : $date->Format('m')) .'-'.\n\t\t\t($date->d==0 ? '??' : $date->Format('d'));\n\t}", "function mysqldate($varin) {\n list($dd,$mm,$yy)=split(\"-\",$varin);\n $varout=$yy.\"-\".$mm.\"-\".$dd;\n return $varout;\n}", "public function postDate(string $field_name, string $input_format = '')\n {\n return $this->field_datetime(INPUT_POST, $field_name, $input_format, 'Y-m-d');\n }", "function uwwtd_get_MM_DD_YYYY_from_YYYY_MM_DD_XXX($date) {\n $return = '';\n if (!empty($date)) {\n if (strlen($date) > 10) {\n $date = substr($date, 0, 10);\n }\n $dateObj = new DateTime($date);\n $return = $dateObj->format('m/d/Y');\n }\n return $return;\n}", "public function getBOPFormSubmissionDate()\n {\n return $this->BOP_form_submission_date;\n }", "public function getWeekDate_post() {\n $this->form_validation->set_rules('SessionKey', 'SessionKey', 'trim|required|callback_validateSession');\n $this->form_validation->set_rules('SeriesGUID', 'SeriesGUID', 'trim|required|callback_validateEntityGUID[Series,SeriesID]');\n $this->form_validation->set_rules('WeekID', 'WeekID', 'trim|numeric');\n $this->form_validation->validation($this); /* Run validation */\n\n /* Get Contests Data */\n $ContestData = $this->SnakeDrafts_model->getWeekDate($this->SeriesID,$this->Post['WeekID']);\n if (!empty($ContestData)) {\n $this->Return['Data'] = $ContestData;\n }\n }", "function get_form_time($time){\n\trequire(FORM_DIR.'form.time.php');\n}", "function returnDate($date){\r\n $Newdate = explode(\" \",$date);\r\n $Newdate = substr($Newdate[0],0, 10);\r\n return($Newdate);\r\n }", "function onlyDate($date) {\r\n\r\n if ($date == null)\r\n $rtn = \"\";\r\n else\r\n $rtn = substr($date,0,10);\r\n\r\n return $rtn;\r\n}", "function date( \n\t $name, $title=null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_DATE,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_DATE\n );\n\t}", "function dms_get_date($var_name, $current_value = -1)\n\t{\n\tif($current_value != -1)\n\t\t{\n\t\t$month = (int)strftime(\"%m\",$current_value);\n\t\t$day = (int)strftime(\"%d\",$current_value);\n\t\t$year = (int)strftime(\"%Y\",$current_value);\n\t\t}\n\t\t\n// Get Month\n\tprint \"<select name='slct_\".$var_name.\"_month'>\\r\";\n\tfor($index = 1;$index <= 12; $index++)\n\t\t{\n\t\t$selected = \"\";\n\t\tif( ($current_value != -1) && ($index == $month) ) $selected = \"SELECTED\";\n\t\tprint \" <option \".$selected.\">\".$index.\"</option>\\r\";\n\t\t}\n\tprint \"</select>\\r\";\n\n\tprint \"/&nbsp;\";\n\t\n// Get Day\n\tprint \"<select name='slct_\".$var_name.\"_day'>\\r\";\n\tfor($index = 1;$index <= 31; $index++)\n\t\t{\n\t\t$selected = \"\";\n\t\tif( ($current_value != -1) && ($index == $day) ) $selected = \"SELECTED\";\n\t\tprint \" <option \".$selected.\">\".$index.\"</option>\\r\";\n\t\t}\n\tprint \"</select>\\r\";\n\n\tprint \"/&nbsp;\";\n\t\n// Get Year\n\tprint \"<select name='slct_\".$var_name.\"_year'>\\r\";\n\tfor($index = 2007;$index <= 2030; $index++)\n\t\t{\n\t\t$selected = \"\";\n\t\tif( ($current_value != -1) && ($index == $year) ) $selected = \"SELECTED\";\n\t\tprint \" <option \".$selected.\">\".$index.\"</option>\\r\";\n\t\t}\n\tprint \"</select>\\r\";\n\t}", "public static function checkNewPost($date){\n\t\t$baru = \"\"; $timezone = date('d', time());\n\t\t$string = $date;\n\t\t$timestamp = strtotime($string);\n\t\t$tgl = date(\"d\", $timestamp);\n\t\t\n\t\tif ($timezone - $tgl <= 2) {\n\t\t\t$baru = \"baru\";\n\t\t}\n\n\t\treturn $baru;\n\t}", "function prp() \r\n{\r\n\tprintarr($_POST, '$_POST:');\r\n}", "function getDateJhjjmmtt() {\n\t\n\t$date \t= getdate();\n\t$year \t= $date['year'];\n\t$mon \t= $date['mon'];\n $day\t\t= $date['mday'];\n \n\tif( $mon < \"10\" ) \t\t$mon = \"0\".$mon;\n\tif( $day < \"10\" )\t\t$day = \"0\".$day;\n\t\n\t$moddate \t= $year.$mon.$day;\n\n\treturn $moddate;\n}", "function get_post_timestamp($post = \\null, $field = 'date')\n {\n }", "public static function create()\n {\n print_r($_POST);\n }", "public function GetFormPostedValues() {\n\t\t$req_fields=array(\"description\",\"date_open\",\"date_closed\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}", "function returnDate(){\n\n\t\t//get date of return\n\t\tif (func_num_args() == 0){\n \treturn $this->returnDate;\n \t}\n \t// set date of return\n \telse if (func_num_args() == 1) {\n \t\t$this->returnDate = filter_var(func_get_arg(0),FILTER_SANITIZE_STRING);\n \t}\n\t\treturn $this;\n\t}", "function lesson_title(){\n return $_POST['lesson-title'];\n}", "private function getFormmatedDob($date)\r\n {\r\n return $date ? date(\"d/m/Y\", strtotime($date)) : null;\r\n }", "function formGenerate($action){\n $form=\"<form class='form-group' name='formularz' action='$action' method='post'>\";\n $form.=\"<fieldset><legend>Podgląd rezerwacji</legend>\";\n $form.=\"<label class='col-form-label' for='data'>Data:</label>\";\n $form.=\"<input type='date' name='data' id='data' min='2010-01-01' max='2020-12-31' value='\".date('Y-m-d').\"' required class='form-control' onchange='show_reservations_by_color()' onclick='show_reservations_by_color()'>\";\n $form.=\"</fieldset></form>\";\n return $form;\n}", "function unpack_post() {\n // Globals\n global $min_words;\n global $add_num;\n global $add_char;\n global $case_opt;\n global $separator;\n\n if (array_key_exists('min-words', $_POST)) {\n $min_words = $_POST['min-words'];\n }\n\n if (array_key_exists('add-num', $_POST)) {\n $add_num = True;\n }\n\n if (array_key_exists('add-char', $_POST)) {\n $add_char = True;\n }\n\n if (array_key_exists('separator', $_POST)) {\n $separator = $_POST['separator'];\n }\n\n if (array_key_exists('case-opt', $_POST)) {\n $case_opt = $_POST['case-opt'];\n }\n\n // Mostly just for testing\n return [$min_words, (int)$add_num, (int)$add_char, $separator, $case_opt];\n}", "function get_post($name = '', $clean = true) {\n\tif($name === '') {\n\t\t$return = array();\n\n\t\tforeach ($_POST as $key => $post) {\n\t\t\t$return[$key] = $clean ? clean_variable($post) : $post;\n\t\t}\n\t\treturn $return;\n\t}\n\n\tif (!isset($_POST[$name])) {\n\t\treturn '';\n\t}\n\n\treturn $clean ? clean_variable($_POST[$name]) : $_POST[$name];\n}", "function get_number_info() {\n\n $CallSid = $_POST['fieldname'];\n $AccountSid=$_POST['fieldname'];\n $CallFrom=$_POST['fieldname'];\n $CallTo=$_POST['fieldname'];\n $CallStatus=$_POST['fieldname'];\n $ApiVersion=$_POST['fieldname'];\n $Direction=$_POST['fieldname'];\n\n if (isset($_POST['fieldname'])) {\n $FromCity=$_POST['fieldname'];\n $FromState=$_POST['fieldname'];\n $FromZip=$_POST['fieldname'];\n $FromCountry=$_POST['fieldname'];\n } else {\n $FromCity=\"\";\n $FromState=\"\";\n $FromZip=\"\";\n $FromCountry=\"\";\n }\n $ToCity=$_POST['fieldname'];\n $ToState=$_POST['fieldname'];\n $ToZip=$_POST['fieldname'];\n $ToCountry=$_POST['fieldname'];\n\n $vars = array($CallSid,$AccountSid,$CallFrom,$CallTo,$CallStatus,$ApiVersion,$Direction,$FromCity,$FromState,$FromZip,$FromCountry,$ToCity,$ToState,$ToZip,$ToCountry);\n return $vars;\n }", "function splitdate( $date ) {\n\t\n\t$year = substr( $date, 0, 4 );\n\t$mon = substr( $date, 4, 2 );\n\t$day = substr( $date, 6, 2 );\n\t$datum= $day.\".\".$mon.\".\".$year;\n\n\treturn $datum;\n}", "public function check_date(){\n $pstDate = $this->security->xss_clean(strip_tags(trim($this->input->post('dateval'))));\n $pstDate = toDbDate($pstDate);\n $str = $this->session->userdata('UNAME') ;\n $psStr = $this->session->userdata('ACCESSPOINT') ; \n if($psStr=='PS')\n {\n $str=substr($str, 4) ; \n }\n $chkDate = $this->{$this->model}->getPsreports($str,$pstDate);\n echo $chkDate['C'];\n }", "function engagements_save_date( $post_id ){\n\tif ( !isset( $_POST['engagements_date_box_nonce'] ) || !wp_verify_nonce( $_POST['engagements_date_box_nonce'], basename( __FILE__ ) ) ){\n\treturn;}\n \n // Check the user's permissions.\nif ( ! current_user_can( 'edit_post', $post_id ) ){\n\treturn;\n}\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post->ID;\n}\n //save value\n if ( isset( $_REQUEST['engagements_date'] ) ) {\n\tupdate_post_meta( $post_id, '_engagements_date', sanitize_text_field( $_POST['engagements_date'] ) );\n}\n \n}", "protected function saveDate()\n\t{\n\t\t$this->year = FilterSingleton::number($_POST['year']);\n\t\t$this->month = FilterSingleton::number($_POST['month']); \n\n\t\tif($this->year !== 0 && $this->month !== 0){\n\t\t\tsetcookie(\"date\", json_encode([$this->year, $this->month]), time()+3600, '/');\n\t\t}\n\t\telse {\n\t\t\tif( isset($_COOKIE['date']) ){\n\t\t\t\t$date = json_decode($_COOKIE['date'], true);\n\t\t\t\t$this->year = $date[0];\n\t\t\t\t$this->month = $date[1];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->year = getdate()['year'];\n\t\t\t\t$this->month = getdate()['mon'];\n\t\t\t}\n\t\t}\n\t}", "function getPost($key) {\n\t$value = '';\n\tif (isset($_POST[$key])) {\n\t\t$value = $_POST[$key];\n\t}\n\t// return $value;\n\t//Phan 2: Ham xu ly ky tu dac biet\n\treturn removeSpecialCharacter($value);\n}", "function ageCalculator($age)\n{\n echo \"please enter your birthday\";\n// $birthDate = $_POST;\n $age = $_POST['number0'];\n\n// $user = $_POST[$birthDate];\n if (is_numeric(str_replace('.', '/', $user))) {\n $birthDate = is_numeric('mm/dd/yyyy');\n $user = sprintf('int', $birthDate);\n echo $user;\n } else {\n echo 'wrong';\n }\n$age = $_POST['number0'];\n//$birthDate = \"12/30/1998\";\n $birthDate = explode(\"/\", $birthDate);\n $age = (date(\"md\", date(\"U\",\n mktime(0, 0, 0, $birthDate[0], $birthDate[1],\n $birthDate[2]))) > date(\"md\")\n ? ((date(\"Y\") - $birthDate[2]) - 1)\n : (date(\"Y\") - $birthDate[2]));\n echo \"Age is:\" . $user;\n}", "public function getDateFromString($date){\n\t\t$date = strtotime($date);\n\t\treturn $date;\n\t}", "private static function processInputAsDateString() {\n $unix = strtotime(self::$input);\n\n if ($unix) { \n self::$timestamp = $unix;\n self::setDateFromTimestamp(self::$timestamp);\n } else {\n self::setMessage(\"Sorry. Your input was invalid.\");\n }\n }", "function get_feed_build_date($format)\n {\n }", "function getPost( $name ) #version 1\n{\n if ( isset($_POST[$name]) ) \n {\n return htmlspecialchars($_POST[$name]);\n }\n return \"\";\n}", "function custompost_display_callback($post)\n {\n ?>\n <form>\n <p >\n <label for=\"published_date\">Published Date</label>\n <input id=\"published_date\" type=\"date\" name=\"published_date\"\n value=\"<?php echo esc_attr( get_post_meta( get_the_ID(), 'published_date', true ));?>\">\n </p>\n </form> \n<?php\n }", "function wp_checkdate($month, $day, $year, $source_date)\n {\n }", "abstract public function get_posted_value();", "function value_date($value){\r\n\tif(substr($value, 4, 1) == \"-\" && substr($value, 7, 1) == \"-\" && strlen($value) == 10){\r\n\t\t$value = implode(\"/\", array_reverse(explode(\"-\", $value)));\r\n\t}\r\n\tif(valid_date($value)){\r\n\t\treturn date_year($value).\"-\".date_month($value).\"-\".date_day($value);\r\n\t}else{\r\n\t\treturn NULL;\r\n\t}\r\n}", "function ExibeData($data){\n\t\treturn date(\"d/m/Y\", strtotime($data));\n\t}", "function datum_nu2() {\n //\n\t\t\t$datestring \t\t\t\t= \"%Y-%m-%d\" ; \n\t\t\t$time \t\t\t\t\t\t= time();\t\t\t\n\t\t\treturn mdate($datestring, $time);\n\t}", "function df_meta_fields( $post, $mph_var ) {\n\t\t$date_field_object = $mph_var['args'];\n\t\t$date_field_object->df_create_fields();\n\t}", "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}", "function getAspDate($humanDate){\r\n\t\treturn $this->post('utilities/getdatetime/asp', $humanDate);\r\n\t}", "function validDate($input_data) \r\n{\r\n $date = DateTime::createFromFormat($input_data, readline(\"Masukkan tanggal/bulan/tahun dengan angka! : \"));\r\n echo $date->format('l d-M-Y');\r\n}", "public function get_calendar_data_spec(){\r\n\r\n if (Go_to::is_on_page(\"edit_calendar\")){\r\n \r\n $this->active_month = $_GET['month'];\r\n $this->active_year = $_GET['year']; \r\n \r\n \r\n }\r\n if (Go_to::is_on_page(\"calendar_submit\")){\r\n \r\n $this->active_month = $_SESSION['active_month'];\r\n $this->active_year = $_SESSION['active_year']; \r\n// echo \"MIJESECCCCCC \" . $this->active_month; \r\n \r\n }\r\n \r\n \r\n if (Go_to::is_on_page(\"print_calendar\")){\r\n $room_id = $_POST['room_id'];\r\n \r\n }\r\n \r\n \r\n }", "function get_str_date( $strdate, $month_as_str=1 )\r\n{\r\n if( $strdate == \"\")\r\n {\r\n $cStr = \"00-00-0000\";\r\n }\r\n else\r\n {\r\n if( getsessionvar(\"db_type\") == \"mysql\" )\r\n\t $cmonth = substr( $strdate, 5, 2);\r\n\r\n if( $month_as_str == 1 )\r\n\t {\r\n\t\t if( $cmonth == \"01\" ) { $cmonth = \"Ene\"; }\r\n\t\t elseif( $cmonth == \"02\" ) { $cmonth = \"Feb\"; }\r\n\t\t elseif( $cmonth == \"03\" ) { $cmonth = \"Mar\"; }\r\n\t\t elseif( $cmonth == \"04\" ) { $cmonth = \"Abr\"; }\r\n\t\t elseif( $cmonth == \"05\" ) { $cmonth = \"May\"; }\r\n\t\t elseif( $cmonth == \"06\" ) { $cmonth = \"Jun\"; }\r\n\t\t elseif( $cmonth == \"07\" ) { $cmonth = \"Jul\"; }\r\n\t\t elseif( $cmonth == \"08\" ) { $cmonth = \"Ago\"; }\r\n\t\t elseif( $cmonth == \"09\" ) { $cmonth = \"Sep\"; }\r\n\t\t elseif( $cmonth == \"10\" ) { $cmonth = \"Oct\"; }\r\n\t\t elseif( $cmonth == \"11\" ) { $cmonth = \"Nov\"; }\r\n\t\t elseif( $cmonth == \"12\" ) { $cmonth = \"Dic\"; }\r\n\t }\r\n\r\n if( getsessionvar(\"db_type\") == \"mysql\" )\r\n $cStr = substr( $strdate, 8, 2) . \"-\" . $cmonth . \"-\" . substr( $strdate, 0, 4);\r\n }\r\n \r\n return $cStr;\r\n}", "function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}", "function cc_post_get( $var ) {\n\tcc_post_fail_if_not_valid( $var );\n\n\tif ( cc_post_isset( $var ) )\n\t\treturn $_POST[$var];\n\telse\n\t\treturn \"\";\n}", "function parseDate ($date){\n $arrayDate = explode(\" \" , $date);\n return $arrayDate[0];\n }", "function getData()\r\n{\r\n$data = array();\r\n$data[0]=$_POST['ID_student'];\r\n$data[1]=$_POST['fname'];\r\n$data[2]=$_POST['lname'];\r\n$data[3]=$_POST['phone'];\r\n$data[4]=$_POST['email'];\r\n$data[5]=$_POST['status'];\r\n$data[6]=$_POST['start_date'];\r\n$data[7]=$_POST['end_date'];\r\nreturn $data;\r\n}", "public function formatedDate($date)\n {\n return $date;\n }", "public function date_valid_func($date) {\n\t\t\n\t\t$date_value = null;\n\t\t// Checking date has value or not\n\t\tif (isset($date) && !empty($date) && strlen($date) == 10) {\n\t\t\t$date_explode = explode(\"/\",$date);\n\t\t\tif (count($date_explode) == 3) {\n\t\t\t\t$date_value+=strlen($date_explode[0]);\n\t\t\t\t$date_value+=strlen($date_explode[1]);\n\t\t\t\t$date_value+=strlen($date_explode[2]);\n\t\t\t\tif ($date_value === 8) {\n\t\t\t\t\t $date_value = 'date';\n\t\t\t\t} else {\n\t\t\t\t\t$date_value = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $date_value;\n\t\t}\n\t}", "function set_event_date($eventDateBegin, $date)\n{\n\n if ($date) {\n $eventdate = $date;\n } else {\n $parts = explode(\"-\", $eventDateBegin);\n $eventdate = $parts[2] . $parts[0] . $parts[1];\n }\n\n return $eventdate;\n\n}", "function sede_origen()\n{\n echo \"<input type='hidden' name='sede_origen' value='{$_REQUEST['sede_origen']}'>\";\n}", "function delivery_posted_on() {\n\techo delivery_get_posted_on();\n}", "public function getDate($date=null){\n\t\treturn date_format($this->createDate($date),\"d\");\n\t}", "public function testDateFieldValidation()\n {\n $field = $this->table->getField('dateone');\n\n $testDate = 'July 4, 2016';\n\n $fldObj = $field->getPHPValue($testDate);\n\n $this->assertInstanceOf('DateTime', $fldObj);\n $this->assertEquals('2016-07-04', $fldObj->format('Y-m-d'));\n\n $fieldVal = $field->getSqlBoundValue($testDate);\n $key = $fieldVal->getValueMarker();\n\n $this->assertEquals(1, $fieldVal->getBindCount());\n $this->assertEquals('2016-07-04', $fieldVal->getBoundValues()[$key]);\n }", "function atkGetPostVar($key=\"\")\n{\n\tif(empty($key) || $key==\"\")\n\t{\n\t\treturn $_REQUEST;\n\t}\n\telse\n\t{\n\t\tif (array_key_exists($key,$_REQUEST) && $_REQUEST[$key]!=\"\") return $_REQUEST[$key];\n\t\treturn \"\";\n\t}\n}", "function prettyDate($postDate){\n\t$originalDate = $postDate;\n\t$newDate = date('d F Y', strtotime($originalDate));\n\treturn $newDate;\n}" ]
[ "0.62329185", "0.59288216", "0.5884172", "0.58514893", "0.58479774", "0.57871974", "0.57681197", "0.57651544", "0.5614333", "0.5601476", "0.5599552", "0.557984", "0.55598944", "0.55118257", "0.55111307", "0.5488358", "0.5478534", "0.54614586", "0.5454159", "0.5446209", "0.5418818", "0.5390035", "0.5352124", "0.53414714", "0.5341366", "0.53305084", "0.5330119", "0.5289327", "0.52805763", "0.5280476", "0.5276553", "0.5273583", "0.52729625", "0.52710325", "0.5261403", "0.5246843", "0.5238348", "0.5232801", "0.5228212", "0.52230895", "0.5223023", "0.5219004", "0.5216498", "0.5213422", "0.52055764", "0.5198528", "0.5194667", "0.5185453", "0.51774496", "0.5173673", "0.5170665", "0.5167858", "0.51666594", "0.51663214", "0.5160881", "0.5158851", "0.5147379", "0.514412", "0.51417017", "0.5138419", "0.5134769", "0.5134347", "0.5132542", "0.51317525", "0.5131636", "0.51251906", "0.51213294", "0.5118124", "0.51160866", "0.511523", "0.5111841", "0.5097055", "0.5094081", "0.5090632", "0.5084645", "0.5070095", "0.50628126", "0.5057836", "0.505588", "0.5054865", "0.50499743", "0.5046396", "0.5043973", "0.5042586", "0.503801", "0.5035596", "0.50350875", "0.5029789", "0.50289947", "0.5027139", "0.50269645", "0.50222546", "0.50203294", "0.50123894", "0.5011263", "0.5009511", "0.5008204", "0.49972633", "0.49972296", "0.49960116", "0.4993327" ]
0.0
-1
membuat function agar jadi satu, supaya jadi efektif dan efisien
function query($query) { //untuk memasukkan variabel $conn karena kalau langsung tidak bisa, grgr scope global $conn; //membuat array kosong untuk menampung data $result = mysqli_query($conn, $query); //untuk mengambil data dari database $rows = []; while ($row = mysqli_fetch_assoc($result)) { $rows[] = $row; } return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selmundat($xent, &$area, &$habit, &$freg, &$dia_fer, &$des_fer ) {\n\t$sqls=\"select * from munp1.municip where cod = '$xent'\";\n\t$ress=mysql_db_query(\"munp1\",$sqls); //\n\t\tif ($ress) {\n\t\t\t\t$regs=mysql_fetch_array($ress);\n\t\t\t\tif ( $regs ) {\n\t\t\t\t\t\t\t\t$area = $regs[\"med_area\"];\n\t\t\t\t\t\t\t\t$habit = $regs[\"num_habit\"];\n\t\t\t\t\t\t\t\t$freg = $regs[\"num_freg\"];\n\t\t\t\t\t\t\t\t$dia_fer = $regs[\"dat_fermun\"];\n\t\t\t\t\t\t\t\t$des_fer = $regs[\"des_fermun\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($ress);\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n \t\t\t\t\telse return 0;\n\t\t }\n// printf(\"vai sair 0\");\nreturn 0;\n}", "public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}", "public function valorpasaje();", "public function AggiornaPrezzi(){\n\t}", "function atuOrcreceitaval($codrec,$mes,$valor){\n $msg = \"0|Registro Atualizado !\";\n $clorcreceitaval = new cl_orcreceitaval;\t\t\n $clorcreceita = new cl_orcreceita;\t\t\n if ($mes == 0 || $mes =='0' || $mes === 0){\n // ajusta o saldo previsto\n\t$clorcreceita->o70_valor = $valor;\n\t$clorcreceita->o70_codrec= $codrec;\n\t$clorcreceita->o70_anousu= db_getsession(\"DB_anousu\");\n $rr= $clorcreceita->alterar(db_getsession(\"DB_anousu\"),$codrec);\n\tif ($clorcreceita->erro_status==='0'){\n\t $msg = \"1|\".$clorcreceita->erro_msg;\n\t}else {\n\t $msg = \"0|\".$clorcreceita->erro_msg; \n\t} \n return $msg;\n } \n if ($valor > 0){\n $clorcreceitaval->o71_coddoc = 100; \n }else{\n $clorcreceitaval->o71_coddoc = 101; \n }\n $clorcreceitaval->o71_anousu = db_getsession(\"DB_anousu\"); \n $clorcreceitaval->o71_mes = $mes; \n $clorcreceitaval->o71_codrec = $codrec;\n $clorcreceitaval->o71_valor = $valor; \n\n\n $rr = $clorcreceitaval->sql_record($clorcreceitaval->sql_query_file(db_getsession(\"DB_anousu\"),$codrec,$clorcreceitaval->o71_coddoc,$mes));\n if ($clorcreceitaval->numrows >0){\n $clorcreceitaval->alterar($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n\n } else { \n $clorcreceitaval->incluir($clorcreceitaval->o71_anousu,$clorcreceitaval->o71_codrec,$clorcreceitaval->o71_coddoc,$clorcreceitaval->o71_mes);\n }\t \n \n $erro = $clorcreceitaval->erro_msg;\n if ($clorcreceitaval->erro_status===0){\n $msg= \"1|\".$erro;\n\treturn $msg;\n } else {\n $msg = \"0|\".$clorcreceitaval->erro_msg;\n return $msg;\n }\n}", "function fTraeAuxiliar($pTip, $pCod){\n global $db, $cla, $olEsq;\n $slDato= substr($olEsq->par_Clave,4,2);\n if ($slDato == \"CL\") { // el movimiento se asocia al Cliente\n $iAuxi = $cla->codProv;\n }\n else {\n $iAuxi = NZ(fDBValor($db, \"fistablassri\", \"tab_txtData3\", \"tab_codTabla = '\" . $pTip . \"' AND tab_codigo = '\" . $pCod . \"'\" ),0);\n }\n//echo \"<br>aux\" . $olEsq->par_Clave. \" / \" .$slDato . \" $iAuxi <br>\";\n error_log(\" aux: \" . $iAuxi. \" \\n\", 3,\"/tmp/dimm_log.err\");\t\n return $iAuxi;\n}", "function tabledata_Fiche($table, $serveur, $field, $key , $idLigne, $modeFiche =\"voir\")\r\n{\r\n\r\n $nombre_Enregistrements = 0;\r\n\r\n // $mode : possible ajout, modif, voir , effacer\r\n switch ($modeFiche)\r\n {\r\n case \"ajout\" :\r\n $boolSQL = false;\r\n $txtReadonly = \"\";\r\n $nombre_Enregistrements = 1; // pour forcer passage car pas de requete\r\n break;\r\n case \"effacer\" :\r\n $boolSQL = true;\r\n $txtReadonly = \" READONLY \";\r\n break;\r\n case \"modif\" :\r\n $boolSQL = true;\r\n $txtReadonly = \"\";\r\n break;\r\n case \"voir\" :\r\n $boolSQL = true;\r\n $txtReadonly = \" READONLY \";\r\n break;\r\n default :\r\n $boolSQL = false;\r\n $txtReadonly = \" READONLY \";\r\n }\r\n\r\n if ($boolSQL)\r\n {\r\n $sqlResult = tabledata_Cde_select($table , $field,\"\",\"\", $key, $idLigne);\r\n $nombre_Enregistrements = sql_count($sqlResult); //2.0\r\n }\r\n\r\n if ($nombre_Enregistrements>0)\r\n {\r\n $total = '';\r\n $hiddens = '';\r\n\r\n if ($boolSQL)\r\n {\r\n $tabUnEnregistrement = sql_fetch($sqlResult);\r\n }\r\n else\r\n {\r\n foreach ($field as $k => $v)\r\n {\r\n $tabUnEnregistrement[$k] = \"\";\r\n }\r\n }\r\n\r\n foreach ($field as $k => $v)\r\n {\r\n if (array_search($k, $key) == \"PRIMARY KEY\")\r\n {\r\n if ($boolSQL)\r\n {\r\n $strDebut = \"Enregistrement ayant comme cl&#233; primaire :<br/><i><b>\"\r\n .$k.\"='\".$tabUnEnregistrement[$k].\"'</b></i><br/>\";\r\n }\r\n }\r\n else\r\n {\r\n preg_match(\"/^ *([A-Za-z]+) *(\\(([^)]+)\\))?(.*DEFAULT *'(.*)')?/\", $v, $m);\r\n $type = $m[1];\r\n $s = ($m[5] ? \" value='$m[5]' \" : '');\r\n $t = $m[3];\r\n if ($m[2])\r\n {\r\n if (is_numeric($t))\r\n {\r\n if ($t <= 32)\r\n {\r\n $s .= \" sizemax='$t' size='\" . ($t * 2) . \"'\";\r\n }\r\n else\r\n {\r\n $type = 'BLOB';\r\n }\r\n }\r\n else\r\n {\r\n preg_match(\"/^ *'?(.*[^'])'? *$/\", $t, $m2); $t = $m2[1];\r\n }\r\n }\r\n\r\n switch (strtoupper($type))\r\n {\r\n case TINYINT:\r\n if ($t==1)\r\n {\r\n $checked = \"\";\r\n if ($tabUnEnregistrement[$k] == 1)\r\n {\r\n $checked = \" checked\";\r\n }\r\n $s = \"<td>\"\r\n .\"<input type='checkbox' name='\".$k.\"'\"\r\n .\" value='1'\".$checked.$txtReadonly.\"/>\"\r\n .\"</td>\\n\";\r\n break;\r\n }\r\n case INT:\r\n case INTEGER:\r\n case BIGINT:\r\n case TINYINT:\r\n case CHAR:\r\n case VARCHAR:\r\n case TEXT:\r\n case TINYTEXT:\r\n case TINYBLOB:\r\n case YEAR:\r\n case DATETIME:\r\n case DATE:\r\n case TIME:\r\n $s = \"<td>\"\r\n .\"<input type='text'\".$s.\" name='\".$k.\"'\"\r\n .\" value='\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES)\r\n .\"'\".$txtReadonly.\"/>\"\r\n .\"</td>\\n\";\r\n break;\r\n case ENUM:\r\n case SET: //ajout JFM\r\n $s = \"<td><select name='\".$k.\"'\".$txtReadonly.\">\\n\";\r\n foreach (preg_split(\"/'? *, *'?/\",$t) as $v)\r\n {\r\n if ($tabUnEnregistrement[$k]==$v)\r\n {\r\n $s .= \"<option selected>\".$v.\"</option>\\n\";\r\n }\r\n else\r\n {\r\n $s .= \"<option>\".$v.\"</option>\\n\";\r\n }\r\n } //foreach (preg_split(\"/'? *, *'?/\",$t) as $v)\r\n $s .= \"</select></td>\\n\";\r\n break;\r\n case TIMESTAMP:\r\n $s = '';\r\n if ($mode==\"ajout\")\r\n {\r\n $hiddens .= \"<input type='hidden' name='\".$k.\"' value='NOW()'/>\\n\";\r\n }\r\n else\r\n {\r\n $hiddens .= \"<input type='hidden' name='\".$k.\"' value='\".$v.\"'/>\\n\";\r\n }\r\n break;\r\n case LONGBLOB:\r\n $s = \"<td><textarea name='$k' cols='45' rows='20'\".$txtReadonly.\">\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES ).\"</textarea></td>\\n\"; //modif. JFM\r\n break;\r\n default:\r\n $t = floor($t / 45)+1;\r\n $s = \"<td><textarea name='$k' cols='45' rows='$t'\".$txtReadonly.\">\".htmlentities(utf8_decode($tabUnEnregistrement[$k]), ENT_QUOTES ).\"</textarea></td>\\n\";\r\n break;\r\n } //switch (strtoupper($type))\r\n if ($s)\r\n $total .= \"<tr><td>$k</td>\\n$s</tr>\\n\";\r\n }\r\n }\r\n $hiddens .= \"<input type='hidden' name='serveur' value='\".$serveur.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='table' value='\".$table.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='mode' value='\".$mode.\"'/>\\n\";\r\n\r\n\r\n // $idLigne = htmlentities(stripcslashes($idLigne), ENT_QUOTES );\r\n $idLigne = htmlentities($idLigne, ENT_QUOTES );\r\n\r\n switch ($modeFiche)\r\n {\r\n case \"ajout\" :\r\n $txtbouton =\"Ajouter\";\r\n break;\r\n case \"effacer\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='ordresuplig'/>\\n\";\r\n $txtbouton =\"Effacer d&#233;finitivement\";\r\n break;\r\n case \"modif\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='maj'/>\\n\";\r\n $txtbouton =\"Modifier\";\r\n break;\r\n case \"voir\" :\r\n $hiddens .= \"<input type='hidden' name='id_ligne' value='\".$idLigne.\"'/>\\n\";\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='AUCUN'/>\\n\";\r\n $txtbouton =\"--\";\r\n break;\r\n default:\r\n $hiddens .= \"<input type='hidden' name='tdaction' value='AUCUN'/>\\n\";\r\n $txtbouton =\"AUCUN\";\r\n }\r\n\r\n return \"\\n\\n\\n\".tabledata_url_generer_post_ecrire(\r\n 'tabledata'\r\n , \"<table>\\n\".$strDebut.$total\r\n .\"</table>\".$hiddens,$txtbouton);\r\n } // if ($nombre_Enregistrements>0)\r\n\r\n}", "public static function Znevalidni_kolize_ucastnika_formulare($iducast,$formular) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table left join s_typ_kolize on (s_typ_kolize.id_s_typ_kolize = uc_kolize_table.id_s_typ_kolize_FK) \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and s_typ_kolize.formular='\" . $formular . \"' and uc_kolize_table.valid\" ;\r\n \r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika_formulare: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute();\r\n \r\n while($zaznam_kolize = $sth->fetch()) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "function hitungDenda(){\n\n return 0;\n }", "public function masodik()\n {\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->k04_sequencial = ($this->k04_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_sequencial\"]:$this->k04_sequencial);\n $this->k04_receit = ($this->k04_receit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_receit\"]:$this->k04_receit);\n $this->k04_codjm = ($this->k04_codjm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_codjm\"]:$this->k04_codjm);\n if($this->k04_dtini == \"\"){\n $this->k04_dtini_dia = ($this->k04_dtini_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_dtini_dia\"]:$this->k04_dtini_dia);\n $this->k04_dtini_mes = ($this->k04_dtini_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_dtini_mes\"]:$this->k04_dtini_mes);\n $this->k04_dtini_ano = ($this->k04_dtini_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_dtini_ano\"]:$this->k04_dtini_ano);\n if($this->k04_dtini_dia != \"\"){\n $this->k04_dtini = $this->k04_dtini_ano.\"-\".$this->k04_dtini_mes.\"-\".$this->k04_dtini_dia;\n }\n }\n if($this->k04_dtfim == \"\"){\n $this->k04_dtfim_dia = ($this->k04_dtfim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_dtfim_dia\"]:$this->k04_dtfim_dia);\n $this->k04_dtfim_mes = ($this->k04_dtfim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_dtfim_mes\"]:$this->k04_dtfim_mes);\n $this->k04_dtfim_ano = ($this->k04_dtfim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_dtfim_ano\"]:$this->k04_dtfim_ano);\n if($this->k04_dtfim_dia != \"\"){\n $this->k04_dtfim = $this->k04_dtfim_ano.\"-\".$this->k04_dtfim_mes.\"-\".$this->k04_dtfim_dia;\n }\n }\n }else{\n $this->k04_sequencial = ($this->k04_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k04_sequencial\"]:$this->k04_sequencial);\n }\n }", "private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->e80_codage = ($this->e80_codage == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_codage\"]:$this->e80_codage);\n if($this->e80_data == \"\"){\n $this->e80_data_dia = ($this->e80_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_data_dia\"]:$this->e80_data_dia);\n $this->e80_data_mes = ($this->e80_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_data_mes\"]:$this->e80_data_mes);\n $this->e80_data_ano = ($this->e80_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_data_ano\"]:$this->e80_data_ano);\n if($this->e80_data_dia != \"\"){\n $this->e80_data = $this->e80_data_ano.\"-\".$this->e80_data_mes.\"-\".$this->e80_data_dia;\n }\n }\n if($this->e80_cancelado == \"\"){\n $this->e80_cancelado_dia = ($this->e80_cancelado_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_cancelado_dia\"]:$this->e80_cancelado_dia);\n $this->e80_cancelado_mes = ($this->e80_cancelado_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_cancelado_mes\"]:$this->e80_cancelado_mes);\n $this->e80_cancelado_ano = ($this->e80_cancelado_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_cancelado_ano\"]:$this->e80_cancelado_ano);\n if($this->e80_cancelado_dia != \"\"){\n $this->e80_cancelado = $this->e80_cancelado_ano.\"-\".$this->e80_cancelado_mes.\"-\".$this->e80_cancelado_dia;\n }\n }\n $this->e80_instit = ($this->e80_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_instit\"]:$this->e80_instit);\n }else{\n $this->e80_codage = ($this->e80_codage == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e80_codage\"]:$this->e80_codage);\n }\n }", "function perpraktikum($mhsw, $khs, $bipot, $ada, $pmbmhswid=1) {\r\n // Jumlah Matakuliah praktikum/responsi yg diambil mhsw. \r\n $jml = GetaField('krstemp k left outer join jadwal j on k.JadwalID=j.JadwalID', \r\n \"k.TahunID='$khs[TahunID]' and k.MhswID='$mhsw[MhswID]' and j.JenisJadwalID\", \r\n 'R', \"count(*)\") *2;\r\n if (($jml == 0) and (empty($mhsw['MhswID']))) $jml = 2;\r\n $totharga = $bipot['Jumlah'];\r\n if (empty($ada) && ($totharga > 0)) {\r\n $s0 = \"insert into bipotmhsw(PMBID, MhswID, TahunID, BIPOT2ID, BIPOTNamaID,\r\n PMBMhswID, TrxID, Jumlah, Besar, Catatan,\r\n LoginBuat, TanggalBuat)\r\n values('$mhsw[PMBID]', '$mhsw[MhswID]', '$khs[TahunID]', '$bipot[BIPOT2ID]', '$bipot[BIPOTNamaID]',\r\n '$pmbmhswid', '$bipot[TrxID]', $jml, '$totharga', '$mk',\r\n '$_SESSION[_Login]', now())\";\r\n $r0 = _query($s0);\r\n }\r\n else {\r\n $s0 = \"update bipotmhsw set Jumlah=$jml, Besar='$totharga',\r\n PMBMhswID='$pmbmhswid',\r\n Catatan='Total SKS: $totsks',\r\n LoginEdit='$_SESSION[_Login]', TanggalEdit=now()\r\n where BIPOTMhswID='$ada[BIPOTMhswID]' \";\r\n $r0 = _query($s0);\r\n }\r\n}", "function lupe_vagas($idt_periodo,$municipio,$idt_programa,$cod_programa)\r\n\r\n//p($municipio);\r\n// exit();\r\n\r\n\r\n{\r\n\r\n // p($idt_eve_periodo);\r\n if ($idt_periodo=='')\r\n {\r\n // erro de parâmetro\r\n // exit()\r\n }\r\n //\r\n // Montar select\r\n //\r\n $kselectw = 'select sum(qtd_vagas_turma) as qtd_vagas\r\n from periodo_let_prgr_muni_cur_turma as turma\r\n inner join periodo_letivo pelet on turma.idt_periodo=pelet.idt\r\n inner join periodo peins on pelet.idt_periodo=peins.idt\r\n left join programa pr on turma.programa=pr.codigo';\r\n $kwherew=' where peins.idt='.$idt_periodo.' and pr.codigo='.aspa($cod_programa);\r\n\r\n if ($municipio!='')\r\n {\r\n $kwherew=$kwherew.' and cod_municipio='.aspa($municipio);\r\n }\r\n if ($idt_programa!=-1)\r\n {\r\n // tom $kwherew=$kwherew.' and idt_periodo_let_programa='.$idt_programa;\r\n $kwherew=$kwherew.' and turma.programa='.aspa($cod_programa);\r\n }\r\n $korderbyw=' ';\r\n\r\n\r\n $a=$kselectw.$kwherew.$korderbyw;\r\n\r\n//p($kwherew);\r\n\r\n\r\n// p($a);\r\n// exit();\r\n\r\n $qtd_vagas=0;\r\n\r\n $ktabelaw = execsql($a);\r\n ForEach($ktabelaw->data as $row)\r\n {\r\n $qtd_vagas=$qtd_vagas+$row['qtd_vagas'];\r\n\r\n }\r\n\r\n // p($qtd_vagas);\r\n// exit();\r\n\r\n\r\n return $qtd_vagas;\r\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->bo04_codmov = ($this->bo04_codmov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_codmov\"]:$this->bo04_codmov);\n $this->bo04_codbo = ($this->bo04_codbo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_codbo\"]:$this->bo04_codbo);\n if($this->bo04_datamov == \"\"){\n $this->bo04_datamov_dia = ($this->bo04_datamov_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_datamov_dia\"]:$this->bo04_datamov_dia);\n $this->bo04_datamov_mes = ($this->bo04_datamov_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_datamov_mes\"]:$this->bo04_datamov_mes);\n $this->bo04_datamov_ano = ($this->bo04_datamov_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_datamov_ano\"]:$this->bo04_datamov_ano);\n if($this->bo04_datamov_dia != \"\"){\n $this->bo04_datamov = $this->bo04_datamov_ano.\"-\".$this->bo04_datamov_mes.\"-\".$this->bo04_datamov_dia;\n }\n }\n $this->bo04_coddepto_ori = ($this->bo04_coddepto_ori == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_coddepto_ori\"]:$this->bo04_coddepto_ori);\n $this->bo04_coddepto_dest = ($this->bo04_coddepto_dest == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_coddepto_dest\"]:$this->bo04_coddepto_dest);\n $this->bo04_entrada = ($this->bo04_entrada == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_entrada\"]:$this->bo04_entrada);\n $this->bo04_saida = ($this->bo04_saida == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_saida\"]:$this->bo04_saida);\n }else{\n $this->bo04_codmov = ($this->bo04_codmov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"bo04_codmov\"]:$this->bo04_codmov);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->x22_codcalc = ($this->x22_codcalc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_codcalc\"]:$this->x22_codcalc);\n $this->x22_codconsumo = ($this->x22_codconsumo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_codconsumo\"]:$this->x22_codconsumo);\n $this->x22_exerc = ($this->x22_exerc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_exerc\"]:$this->x22_exerc);\n $this->x22_mes = ($this->x22_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_mes\"]:$this->x22_mes);\n $this->x22_matric = ($this->x22_matric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_matric\"]:$this->x22_matric);\n $this->x22_area = ($this->x22_area == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_area\"]:$this->x22_area);\n $this->x22_numpre = ($this->x22_numpre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_numpre\"]:$this->x22_numpre);\n $this->x22_manual = ($this->x22_manual == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_manual\"]:$this->x22_manual);\n $this->x22_tipo = ($this->x22_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_tipo\"]:$this->x22_tipo);\n if($this->x22_data == \"\"){\n $this->x22_data_dia = ($this->x22_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_data_dia\"]:$this->x22_data_dia);\n $this->x22_data_mes = ($this->x22_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_data_mes\"]:$this->x22_data_mes);\n $this->x22_data_ano = ($this->x22_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_data_ano\"]:$this->x22_data_ano);\n if($this->x22_data_dia != \"\"){\n $this->x22_data = $this->x22_data_ano.\"-\".$this->x22_data_mes.\"-\".$this->x22_data_dia;\n }\n }\n $this->x22_hora = ($this->x22_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_hora\"]:$this->x22_hora);\n $this->x22_usuario = ($this->x22_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_usuario\"]:$this->x22_usuario);\n $this->x22_aguacontrato = ($this->x22_aguacontrato == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_aguacontrato\"]:$this->x22_aguacontrato);\n $this->x22_aguacontratoeconomia = ($this->x22_aguacontratoeconomia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_aguacontratoeconomia\"]:$this->x22_aguacontratoeconomia);\n $this->x22_responsavelpagamento = ($this->x22_responsavelpagamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_responsavelpagamento\"]:$this->x22_responsavelpagamento);\n }else{\n $this->x22_codcalc = ($this->x22_codcalc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x22_codcalc\"]:$this->x22_codcalc);\n }\n }", "public function valordelospasajesplus();", "function ToonFormulierAfspraak()\n{\n\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->tf28_i_codigo = ($this->tf28_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_i_codigo\"]:$this->tf28_i_codigo);\n $this->tf28_i_situacao = ($this->tf28_i_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_i_situacao\"]:$this->tf28_i_situacao);\n $this->tf28_i_pedidotfd = ($this->tf28_i_pedidotfd == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_i_pedidotfd\"]:$this->tf28_i_pedidotfd);\n if($this->tf28_d_datasistema == \"\"){\n $this->tf28_d_datasistema_dia = ($this->tf28_d_datasistema_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_d_datasistema_dia\"]:$this->tf28_d_datasistema_dia);\n $this->tf28_d_datasistema_mes = ($this->tf28_d_datasistema_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_d_datasistema_mes\"]:$this->tf28_d_datasistema_mes);\n $this->tf28_d_datasistema_ano = ($this->tf28_d_datasistema_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_d_datasistema_ano\"]:$this->tf28_d_datasistema_ano);\n if($this->tf28_d_datasistema_dia != \"\"){\n $this->tf28_d_datasistema = $this->tf28_d_datasistema_ano.\"-\".$this->tf28_d_datasistema_mes.\"-\".$this->tf28_d_datasistema_dia;\n }\n }\n $this->tf28_c_horasistema = ($this->tf28_c_horasistema == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_c_horasistema\"]:$this->tf28_c_horasistema);\n $this->tf28_c_obs = ($this->tf28_c_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_c_obs\"]:$this->tf28_c_obs);\n $this->tf28_i_login = ($this->tf28_i_login == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_i_login\"]:$this->tf28_i_login);\n }else{\n $this->tf28_i_codigo = ($this->tf28_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf28_i_codigo\"]:$this->tf28_i_codigo);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->tr20_id = ($this->tr20_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_id\"]:$this->tr20_id);\n if($this->tr20_dtalvara == \"\"){\n $this->tr20_dtalvara_dia = ($this->tr20_dtalvara_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_dtalvara_dia\"]:$this->tr20_dtalvara_dia);\n $this->tr20_dtalvara_mes = ($this->tr20_dtalvara_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_dtalvara_mes\"]:$this->tr20_dtalvara_mes);\n $this->tr20_dtalvara_ano = ($this->tr20_dtalvara_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_dtalvara_ano\"]:$this->tr20_dtalvara_ano);\n if($this->tr20_dtalvara_dia != \"\"){\n $this->tr20_dtalvara = $this->tr20_dtalvara_ano.\"-\".$this->tr20_dtalvara_mes.\"-\".$this->tr20_dtalvara_dia;\n }\n }\n $this->tr20_numcgm = ($this->tr20_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_numcgm\"]:$this->tr20_numcgm);\n $this->tr20_ruaid = ($this->tr20_ruaid == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_ruaid\"]:$this->tr20_ruaid);\n $this->tr20_nro = ($this->tr20_nro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_nro\"]:$this->tr20_nro);\n $this->tr20_bairroid = ($this->tr20_bairroid == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_bairroid\"]:$this->tr20_bairroid);\n $this->tr20_complem = ($this->tr20_complem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_complem\"]:$this->tr20_complem);\n $this->tr20_fone = ($this->tr20_fone == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_fone\"]:$this->tr20_fone);\n $this->tr20_prefixo = ($this->tr20_prefixo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_prefixo\"]:$this->tr20_prefixo);\n }else{\n $this->tr20_id = ($this->tr20_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr20_id\"]:$this->tr20_id);\n }\n }", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "public static function Znevalidni_kolize_ucastnika_vsechny($iducast) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and uc_kolize_table.valid\" ;\r\n\r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute(); \r\n while($zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC)) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}", "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->l30_codigo = ($this->l30_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_codigo\"]:$this->l30_codigo);\n if($this->l30_data == \"\"){\n $this->l30_data_dia = ($this->l30_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_data_dia\"]:$this->l30_data_dia);\n $this->l30_data_mes = ($this->l30_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_data_mes\"]:$this->l30_data_mes);\n $this->l30_data_ano = ($this->l30_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_data_ano\"]:$this->l30_data_ano);\n if($this->l30_data_dia != \"\"){\n $this->l30_data = $this->l30_data_ano.\"-\".$this->l30_data_mes.\"-\".$this->l30_data_dia;\n }\n }\n $this->l30_portaria = ($this->l30_portaria == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_portaria\"]:$this->l30_portaria);\n if($this->l30_datavalid == \"\"){\n $this->l30_datavalid_dia = ($this->l30_datavalid_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_datavalid_dia\"]:$this->l30_datavalid_dia);\n $this->l30_datavalid_mes = ($this->l30_datavalid_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_datavalid_mes\"]:$this->l30_datavalid_mes);\n $this->l30_datavalid_ano = ($this->l30_datavalid_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_datavalid_ano\"]:$this->l30_datavalid_ano);\n if($this->l30_datavalid_dia != \"\"){\n $this->l30_datavalid = $this->l30_datavalid_ano.\"-\".$this->l30_datavalid_mes.\"-\".$this->l30_datavalid_dia;\n }\n }\n $this->l30_tipo = ($this->l30_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_tipo\"]:$this->l30_tipo);\n $this->l30_nomearquivo = ($this->l30_nomearquivo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_nomearquivo\"]:$this->l30_nomearquivo);\n }else{\n $this->l30_codigo = ($this->l30_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l30_codigo\"]:$this->l30_codigo);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed07_i_codigo = ($this->ed07_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_i_codigo\"]:$this->ed07_i_codigo);\n $this->ed07_c_senha = ($this->ed07_c_senha == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_c_senha\"]:$this->ed07_c_senha);\n $this->ed07_c_necessidades = ($this->ed07_c_necessidades == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_c_necessidades\"]:$this->ed07_c_necessidades);\n $this->ed07_c_foto = ($this->ed07_c_foto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_c_foto\"]:$this->ed07_c_foto);\n $this->ed07_t_descr = ($this->ed07_t_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_t_descr\"]:$this->ed07_t_descr);\n $this->ed07_i_responsavel = ($this->ed07_i_responsavel == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_i_responsavel\"]:$this->ed07_i_responsavel);\n $this->ed07_c_certidao = ($this->ed07_c_certidao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_c_certidao\"]:$this->ed07_c_certidao);\n $this->ed07_c_cartorio = ($this->ed07_c_cartorio == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_c_cartorio\"]:$this->ed07_c_cartorio);\n $this->ed07_c_livro = ($this->ed07_c_livro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_c_livro\"]:$this->ed07_c_livro);\n $this->ed07_c_folha = ($this->ed07_c_folha == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_c_folha\"]:$this->ed07_c_folha);\n if($this->ed07_d_datacert == \"\"){\n $this->ed07_d_datacert_dia = ($this->ed07_d_datacert_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_d_datacert_dia\"]:$this->ed07_d_datacert_dia);\n $this->ed07_d_datacert_mes = ($this->ed07_d_datacert_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_d_datacert_mes\"]:$this->ed07_d_datacert_mes);\n $this->ed07_d_datacert_ano = ($this->ed07_d_datacert_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_d_datacert_ano\"]:$this->ed07_d_datacert_ano);\n if($this->ed07_d_datacert_dia != \"\"){\n $this->ed07_d_datacert = $this->ed07_d_datacert_ano.\"-\".$this->ed07_d_datacert_mes.\"-\".$this->ed07_d_datacert_dia;\n }\n }\n $this->ed07_t_pendentes = ($this->ed07_t_pendentes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_t_pendentes\"]:$this->ed07_t_pendentes);\n }else{\n $this->ed07_i_codigo = ($this->ed07_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed07_i_codigo\"]:$this->ed07_i_codigo);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->cm06_i_codigo = ($this->cm06_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm06_i_codigo\"]:$this->cm06_i_codigo);\n $this->cm06_i_sepultamento = ($this->cm06_i_sepultamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm06_i_sepultamento\"]:$this->cm06_i_sepultamento);\n $this->cm06_i_ossoario = ($this->cm06_i_ossoario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm06_i_ossoario\"]:$this->cm06_i_ossoario);\n if($this->cm06_d_entrada == \"\"){\n $this->cm06_d_entrada_dia = ($this->cm06_d_entrada_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm06_d_entrada_dia\"]:$this->cm06_d_entrada_dia);\n $this->cm06_d_entrada_mes = ($this->cm06_d_entrada_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm06_d_entrada_mes\"]:$this->cm06_d_entrada_mes);\n $this->cm06_d_entrada_ano = ($this->cm06_d_entrada_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm06_d_entrada_ano\"]:$this->cm06_d_entrada_ano);\n if($this->cm06_d_entrada_dia != \"\"){\n $this->cm06_d_entrada = $this->cm06_d_entrada_ano.\"-\".$this->cm06_d_entrada_mes.\"-\".$this->cm06_d_entrada_dia;\n }\n }\n $this->cm06_t_obs = ($this->cm06_t_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm06_t_obs\"]:$this->cm06_t_obs);\n }else{\n $this->cm06_i_codigo = ($this->cm06_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm06_i_codigo\"]:$this->cm06_i_codigo);\n }\n }", "function HitungUlangBIPOTPMB($PMBID) {\r\n $pmb = GetFields('pmb', \"KodeID='\".KodeID.\"' and PMBID\", $PMBID, '*');\r\n // Hitung Total BIPOT & Pembayaran\r\n $TotalBiaya = GetaField(\"bipotmhsw bm\r\n left outer join bipot2 b2 on bm.BIPOT2ID = b2.BIPOT2ID\",\r\n \"bm.PMBMhswID = 0 and bm.KodeID = '\".KodeID.\"'\r\n and bm.NA = 'N'\r\n and bm.TahunID = '$pmb[PMBPeriodID]' and bm.PMBID\", $PMBID,\r\n \"sum(bm.TrxID * bm.Jumlah * bm.Besar)\")+0;\r\n $TotalBayar = GetaField('bayarmhsw',\r\n \"PMBMhswID = 0 and KodeID = '\".KodeID.\"'\r\n and NA = 'N'\r\n and TahunID = '$pmb[PMBPeriodID]' and PMBID\", $PMBID,\r\n \"sum(Jumlah)\")+0;\r\n // Update data PMB\r\n $s = \"update pmb\r\n set TotalBiaya = $TotalBiaya,\r\n TotalBayar = $TotalBayar\r\n where KodeID = '\".KodeID.\"'\r\n and PMBID = '$PMBID' \r\n limit 1\";\r\n $r = _query($s);\r\n //echo \"<pre>$s</pre>\";\r\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->d02_contri = ($this->d02_contri == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_contri\"]:$this->d02_contri);\n $this->d02_codedi = ($this->d02_codedi == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_codedi\"]:$this->d02_codedi);\n $this->d02_codigo = ($this->d02_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_codigo\"]:$this->d02_codigo);\n if($this->d02_dtauto == \"\"){\n $this->d02_dtauto_dia = ($this->d02_dtauto_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_dtauto_dia\"]:$this->d02_dtauto_dia);\n $this->d02_dtauto_mes = ($this->d02_dtauto_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_dtauto_mes\"]:$this->d02_dtauto_mes);\n $this->d02_dtauto_ano = ($this->d02_dtauto_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_dtauto_ano\"]:$this->d02_dtauto_ano);\n if($this->d02_dtauto_dia != \"\"){\n $this->d02_dtauto = $this->d02_dtauto_ano.\"-\".$this->d02_dtauto_mes.\"-\".$this->d02_dtauto_dia;\n }\n }\n $this->d02_autori = ($this->d02_autori == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_autori\"]:$this->d02_autori);\n $this->d02_idlog = ($this->d02_idlog == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_idlog\"]:$this->d02_idlog);\n if($this->d02_data == \"\"){\n $this->d02_data_dia = ($this->d02_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_data_dia\"]:$this->d02_data_dia);\n $this->d02_data_mes = ($this->d02_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_data_mes\"]:$this->d02_data_mes);\n $this->d02_data_ano = ($this->d02_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_data_ano\"]:$this->d02_data_ano);\n if($this->d02_data_dia != \"\"){\n $this->d02_data = $this->d02_data_ano.\"-\".$this->d02_data_mes.\"-\".$this->d02_data_dia;\n }\n }\n $this->d02_profun = ($this->d02_profun == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_profun\"]:$this->d02_profun);\n $this->d02_valorizacao = ($this->d02_valorizacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_valorizacao\"]:$this->d02_valorizacao);\n }else{\n $this->d02_contri = ($this->d02_contri == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"d02_contri\"]:$this->d02_contri);\n }\n }", "function cariPosisi($batas){\nif(empty($_GET['halhasillulusadministrasi'])){\n\t$posisi=0;\n\t$_GET['halhasillulusadministrasi']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasillulusadministrasi']-1) * $batas;\n}\nreturn $posisi;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed10_i_codigo = ($this->ed10_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_i_codigo\"]:$this->ed10_i_codigo);\n $this->ed10_i_tipoensino = ($this->ed10_i_tipoensino == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_i_tipoensino\"]:$this->ed10_i_tipoensino);\n $this->ed10_i_grauensino = ($this->ed10_i_grauensino == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_i_grauensino\"]:$this->ed10_i_grauensino);\n $this->ed10_c_descr = ($this->ed10_c_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_c_descr\"]:$this->ed10_c_descr);\n $this->ed10_c_abrev = ($this->ed10_c_abrev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_c_abrev\"]:$this->ed10_c_abrev);\n $this->ed10_mediacaodidaticopedagogica = ($this->ed10_mediacaodidaticopedagogica == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_mediacaodidaticopedagogica\"]:$this->ed10_mediacaodidaticopedagogica);\n $this->ed10_ordem = ($this->ed10_ordem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_ordem\"]:$this->ed10_ordem);\n $this->ed10_censocursoprofiss = ($this->ed10_censocursoprofiss == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_censocursoprofiss\"]:$this->ed10_censocursoprofiss);\n }else{\n $this->ed10_i_codigo = ($this->ed10_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed10_i_codigo\"]:$this->ed10_i_codigo);\n }\n }", "function anular_PM_MM($id_mov)\r\n{\r\n global $db,$_ses_user;\r\n\r\n $db->StartTrans();\r\n $query=\"update movimiento_material set estado=3 where id_movimiento_material=$id_mov\";\r\n sql($query) or fin_pagina();\r\n $usuario=$_ses_user['name'];\r\n $fecha_hoy=date(\"Y-m-d H:i:s\",mktime());\r\n //agregamos el log de anulacion del movimiento\r\n $query=\"insert into log_movimiento(fecha,usuario,tipo,id_movimiento_material)\r\n values('$fecha_hoy','$usuario','anulado',$id_mov)\";\r\n sql($query) or fin_pagina();\r\n\r\n //traemos el deposito de origen del MM o PM\r\n $query=\"select movimiento_material.deposito_origen\r\n \t\t from mov_material.movimiento_material\r\n \t\t where id_movimiento_material=$id_mov\";\r\n $orig=sql($query,\"<br>Error al traer el deposito origen del PM o MM<br>\") or fin_pagina();\r\n\r\n $deposito_origen=$orig->fields['deposito_origen'];\r\n descontar_reservados_mov($id_mov,$deposito_origen,1);\r\n\r\n $db->CompleteTrans();\r\n\r\n return \"El $titulo_pagina Nº $id_mov fue anulado con éxito\";\r\n}", "function absender_bestimmen($absender,$db){\n$query1=\"select * from user\";\n\t$antwort1=$db->query($query1);\n\t$antwort1=array_bildung($antwort1);\n\t\n\t$i=0;\n\tforeach($absender[Absender] as $name => $inhalt){\n\tif($inhalt==0){\n\t\t$absender[Absender][$i]=\"Information an Alle !\";\n\t}\n\t\n\t\t$k=0;\n\t\tforeach($antwort1[id] as $name1 => $inhalt1){\n\t\t\tif($inhalt==$inhalt1){\n\t\t\t\t$absender[Absender][$i]=$antwort1[Name][$k].\"&nbsp;&nbsp;\".$antwort1[Vorname][$k].\"&nbsp;&nbsp;- \".$antwort1[Bemerkung][$k].\" -\";\n\t\t\t}\n\t\t$k++;\n\t\t}\n\t$i++;\n\t}\n\treturn $absender;\n}", "static public function mdlCierreForzoso($tabla, $id_caja, $id_corte, $id_fecha){\t\n\ttry{ \n\t\t $item=\"fecha_salida\";\n\t\t $valor=$id_caja;\n\t\t $campo=\"id_caja\";\n\t\t $cerrado=0;\n \n\t\t $ventas=self::mdlSumaTotalVentas($tabla, $item, $valor, $cerrado, $id_fecha);\n\t\t $ventasgral=$ventas[\"sinpromo\"]>0?$ventas[\"sinpromo\"]:0;\n\t\t $ventaspromo=$ventas[\"promo\"]>0?$ventas[\"promo\"]:0;\n\n\t\t $vtaEnv = self::mdlSumTotVtasEnv($tabla, $item, $valor, $cerrado, $id_fecha);\n\t\t $ventasenvases=$vtaEnv[\"total\"]>0?$vtaEnv[\"total\"]:0;\n\n\t\t $vtaServ = self::mdlSumTotVtasServ($tabla, $item, $valor, $cerrado, $id_fecha);\n\t\t $ventasservicios=$vtaServ[\"total\"]>0?$vtaServ[\"total\"]:0;\n\n\t\t $ventasaba=self::mdlSumTotVtasOtros($tabla, $item, $valor, $cerrado, $id_fecha);\n\t\t $ventasgralaba=$ventasaba[\"sinpromo\"]>0?$ventasaba[\"sinpromo\"]:0;\n\t\t $ventaspromoaba=$ventasaba[\"promo\"]>0?$ventasaba[\"promo\"]:0;\n \n\t\t $vtaCred = self::mdlSumTotVtasCred($tabla, $item, $valor, $cerrado, $id_fecha);\n\t\t $ventascredito=$vtaCred[\"sinpromo\"]+$vtaCred[\"promo\"]>0?$vtaCred[\"sinpromo\"]+$vtaCred[\"promo\"]:0;\n\n\t\t $totingyegr=self::mdlTotalingresoegreso($campo, $valor,$cerrado, $id_fecha);\n\t\t $ingresodia=$totingyegr[\"monto_ingreso\"]>0?$totingyegr[\"monto_ingreso\"]:0;\n\t\t $egresodia=$totingyegr[\"monto_egreso\"]>0?$totingyegr[\"monto_egreso\"]:0;\n\n\t\t $totVentaDia=$ventasgral+$ventaspromo+$ventasenvases+$ventasservicios+$ventasgralaba+$ventaspromoaba+$ventascredito;\n \n\t\t\t //CERRAR REGISTRO Y COLOCAR EL ID DE CORTE DE VENTA EN EL HIST_SALIDAS\n\t\t\t $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET cerrado=1, id_corte=$id_corte WHERE fecha_salida='\".$id_fecha.\"' AND id_caja=$id_caja AND cerrado=0\");\n\t\t\t if($stmt->execute()){\n\t\t\t \n\t\t\t\t //ACTUALIZAR TABLA CORTES CON LAS VENTAS, INGRESO Y EGRESOS\n\t\t\t\t $stmt2 = Conexion::conectar()->prepare(\"UPDATE cortes SET ventasgral=$ventasgral, ventaspromo=$ventaspromo, ventasenvases=$ventasenvases, ventasservicios=$ventasservicios, ventasabarrotes=($ventasgralaba+$ventaspromoaba), ventascredito=$ventascredito, monto_ingreso=$ingresodia, monto_egreso=$egresodia, total_venta=$totVentaDia, estatus=1 WHERE fecha_venta='\".$id_fecha.\"' AND id=$id_corte AND id_caja=$id_caja AND estatus=0\");\n\t\t\t\t \n\t\t\t\t //COLOCAR EL ID DE CORTE DE VENTA EN INGRESOS E EGRESOS\n\t\t\t\t if ($stmt2->execute()){\n\t\t\t\t\t $query = Conexion::conectar()->prepare(\"UPDATE ingresos SET id_corte=$id_corte WHERE fecha_ingreso='\".$id_fecha.\"' AND id_caja=$id_caja AND id_corte=0\");\n\t\t\t\t\t if($query->execute()){\n\t\t\t\t\t\t $query = Conexion::conectar()->prepare(\"UPDATE egresos SET id_corte=$id_corte WHERE fecha_egreso='\".$id_fecha.\"' AND id_caja=$id_caja AND id_corte=0\");\n\t\t\t\t\t\t $query->execute();\n\t\t\t\t\t }\n\t\t\t\t\t //UPDATE `hist_salidas` SET `cerrado`=0,`id_corte`=0 WHERE `fecha_salida`=2019-12-24\"\n\t\t\t\t\t //unset($_SESSION[\"abierta\"]);\n\t\t\t\t }\n\t\t\t\treturn true;\t \n\t\t\t }else{\n\t\t\t\t return false;\n\t\t\t }\n\t\t\t $query->close();\n\t\t\t $query = null;\n\t\t\t $stmt -> close();\n\t\t\t $stmt = null;\n\t\t\t $stmt2 -> close();\n\t\t\t $stmt2 = null;\n\t\t\t \n\t } catch (Exception $e) {\n\t\t echo \"Failed: \" . $e->getMessage();\n\t }\n \n }", "function cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->at75_sequen = ($this->at75_sequen == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at75_sequen\"]:$this->at75_sequen);\n $this->at75_seqclimod = ($this->at75_seqclimod == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at75_seqclimod\"]:$this->at75_seqclimod);\n $this->at75_codproced = ($this->at75_codproced == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at75_codproced\"]:$this->at75_codproced);\n if($this->at75_data == \"\"){\n $this->at75_data_dia = ($this->at75_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at75_data_dia\"]:$this->at75_data_dia);\n $this->at75_data_mes = ($this->at75_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at75_data_mes\"]:$this->at75_data_mes);\n $this->at75_data_ano = ($this->at75_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at75_data_ano\"]:$this->at75_data_ano);\n if($this->at75_data_dia != \"\"){\n $this->at75_data = $this->at75_data_ano.\"-\".$this->at75_data_mes.\"-\".$this->at75_data_dia;\n }\n }\n $this->at75_obs = ($this->at75_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at75_obs\"]:$this->at75_obs);\n }else{\n $this->at75_sequen = ($this->at75_sequen == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at75_sequen\"]:$this->at75_sequen);\n }\n }", "final function velcom(){\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->k107_sequencial = ($this->k107_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_sequencial\"]:$this->k107_sequencial);\n $this->k107_empagemov = ($this->k107_empagemov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_empagemov\"]:$this->k107_empagemov);\n if($this->k107_data == \"\"){\n $this->k107_data_dia = ($this->k107_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_data_dia\"]:$this->k107_data_dia);\n $this->k107_data_mes = ($this->k107_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_data_mes\"]:$this->k107_data_mes);\n $this->k107_data_ano = ($this->k107_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_data_ano\"]:$this->k107_data_ano);\n if($this->k107_data_dia != \"\"){\n $this->k107_data = $this->k107_data_ano.\"-\".$this->k107_data_mes.\"-\".$this->k107_data_dia;\n }\n }\n $this->k107_valor = ($this->k107_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_valor\"]:$this->k107_valor);\n $this->k107_ctacredito = ($this->k107_ctacredito == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_ctacredito\"]:$this->k107_ctacredito);\n $this->k107_ctadebito = ($this->k107_ctadebito == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_ctadebito\"]:$this->k107_ctadebito);\n }else{\n $this->k107_sequencial = ($this->k107_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k107_sequencial\"]:$this->k107_sequencial);\n }\n }", "function baja_de_interinos($id_desig,$fec){\n $bandera=false;\n $sql=\"select id_designacion from reserva_ocupada_por\"\n . \" where id_reserva=\".$id_desig;\n $res= toba::db('designa')->consultar($sql);\n if(count($res)>0){\n $cadena_desig=implode(\",\",$res[0]);\n $fecha = date($fec);\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $fecha ) ) ;\n $nuevafecha = date ( 'Y-m-j' , $nuevafecha );\n $sql=\"update designacion set nro_540=null, hasta='\".$nuevafecha.\"' where id_designacion in(\".$cadena_desig.\")\";\n toba::db('designa')->consultar($sql);\n $bandera=true;\n }\n return $bandera;\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->s113_i_codigo = ($this->s113_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_codigo\"]:$this->s113_i_codigo);\n $this->s113_i_prestadorhorarios = ($this->s113_i_prestadorhorarios == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_prestadorhorarios\"]:$this->s113_i_prestadorhorarios);\n $this->s113_i_numcgs = ($this->s113_i_numcgs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_numcgs\"]:$this->s113_i_numcgs);\n if($this->s113_d_agendamento == \"\"){\n $this->s113_d_agendamento_dia = ($this->s113_d_agendamento_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_agendamento_dia\"]:$this->s113_d_agendamento_dia);\n $this->s113_d_agendamento_mes = ($this->s113_d_agendamento_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_agendamento_mes\"]:$this->s113_d_agendamento_mes);\n $this->s113_d_agendamento_ano = ($this->s113_d_agendamento_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_agendamento_ano\"]:$this->s113_d_agendamento_ano);\n if($this->s113_d_agendamento_dia != \"\"){\n $this->s113_d_agendamento = $this->s113_d_agendamento_ano.\"-\".$this->s113_d_agendamento_mes.\"-\".$this->s113_d_agendamento_dia;\n }\n }\n if($this->s113_d_exame == \"\"){\n $this->s113_d_exame_dia = ($this->s113_d_exame_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_exame_dia\"]:$this->s113_d_exame_dia);\n $this->s113_d_exame_mes = ($this->s113_d_exame_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_exame_mes\"]:$this->s113_d_exame_mes);\n $this->s113_d_exame_ano = ($this->s113_d_exame_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_exame_ano\"]:$this->s113_d_exame_ano);\n if($this->s113_d_exame_dia != \"\"){\n $this->s113_d_exame = $this->s113_d_exame_ano.\"-\".$this->s113_d_exame_mes.\"-\".$this->s113_d_exame_dia;\n }\n }\n $this->s113_i_ficha = ($this->s113_i_ficha == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_ficha\"]:$this->s113_i_ficha);\n $this->s113_c_hora = ($this->s113_c_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_c_hora\"]:$this->s113_c_hora);\n $this->s113_i_situacao = ($this->s113_i_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_situacao\"]:$this->s113_i_situacao);\n if($this->s113_d_cadastro == \"\"){\n $this->s113_d_cadastro_dia = ($this->s113_d_cadastro_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_cadastro_dia\"]:$this->s113_d_cadastro_dia);\n $this->s113_d_cadastro_mes = ($this->s113_d_cadastro_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_cadastro_mes\"]:$this->s113_d_cadastro_mes);\n $this->s113_d_cadastro_ano = ($this->s113_d_cadastro_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_cadastro_ano\"]:$this->s113_d_cadastro_ano);\n if($this->s113_d_cadastro_dia != \"\"){\n $this->s113_d_cadastro = $this->s113_d_cadastro_ano.\"-\".$this->s113_d_cadastro_mes.\"-\".$this->s113_d_cadastro_dia;\n }\n }\n $this->s113_c_cadastro = ($this->s113_c_cadastro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_c_cadastro\"]:$this->s113_c_cadastro);\n $this->s113_i_login = ($this->s113_i_login == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_login\"]:$this->s113_i_login);\n $this->s113_c_encaminhamento = ($this->s113_c_encaminhamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_c_encaminhamento\"]:$this->s113_c_encaminhamento);\n }else{\n $this->s113_i_codigo = ($this->s113_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_codigo\"]:$this->s113_i_codigo);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->s113_i_codigo = ($this->s113_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_codigo\"]:$this->s113_i_codigo);\n $this->s113_i_prestadorhorarios = ($this->s113_i_prestadorhorarios == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_prestadorhorarios\"]:$this->s113_i_prestadorhorarios);\n $this->s113_i_numcgs = ($this->s113_i_numcgs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_numcgs\"]:$this->s113_i_numcgs);\n if($this->s113_d_agendamento == \"\"){\n $this->s113_d_agendamento_dia = ($this->s113_d_agendamento_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_agendamento_dia\"]:$this->s113_d_agendamento_dia);\n $this->s113_d_agendamento_mes = ($this->s113_d_agendamento_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_agendamento_mes\"]:$this->s113_d_agendamento_mes);\n $this->s113_d_agendamento_ano = ($this->s113_d_agendamento_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_agendamento_ano\"]:$this->s113_d_agendamento_ano);\n if($this->s113_d_agendamento_dia != \"\"){\n $this->s113_d_agendamento = $this->s113_d_agendamento_ano.\"-\".$this->s113_d_agendamento_mes.\"-\".$this->s113_d_agendamento_dia;\n }\n }\n if($this->s113_d_exame == \"\"){\n $this->s113_d_exame_dia = ($this->s113_d_exame_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_exame_dia\"]:$this->s113_d_exame_dia);\n $this->s113_d_exame_mes = ($this->s113_d_exame_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_exame_mes\"]:$this->s113_d_exame_mes);\n $this->s113_d_exame_ano = ($this->s113_d_exame_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_exame_ano\"]:$this->s113_d_exame_ano);\n if($this->s113_d_exame_dia != \"\"){\n $this->s113_d_exame = $this->s113_d_exame_ano.\"-\".$this->s113_d_exame_mes.\"-\".$this->s113_d_exame_dia;\n }\n }\n $this->s113_i_ficha = ($this->s113_i_ficha == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_ficha\"]:$this->s113_i_ficha);\n $this->s113_c_hora = ($this->s113_c_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_c_hora\"]:$this->s113_c_hora);\n $this->s113_i_situacao = ($this->s113_i_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_situacao\"]:$this->s113_i_situacao);\n if($this->s113_d_cadastro == \"\"){\n $this->s113_d_cadastro_dia = ($this->s113_d_cadastro_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_cadastro_dia\"]:$this->s113_d_cadastro_dia);\n $this->s113_d_cadastro_mes = ($this->s113_d_cadastro_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_cadastro_mes\"]:$this->s113_d_cadastro_mes);\n $this->s113_d_cadastro_ano = ($this->s113_d_cadastro_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_d_cadastro_ano\"]:$this->s113_d_cadastro_ano);\n if($this->s113_d_cadastro_dia != \"\"){\n $this->s113_d_cadastro = $this->s113_d_cadastro_ano.\"-\".$this->s113_d_cadastro_mes.\"-\".$this->s113_d_cadastro_dia;\n }\n }\n $this->s113_c_cadastro = ($this->s113_c_cadastro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_c_cadastro\"]:$this->s113_c_cadastro);\n $this->s113_i_login = ($this->s113_i_login == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_login\"]:$this->s113_i_login);\n $this->s113_c_encaminhamento = ($this->s113_c_encaminhamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_c_encaminhamento\"]:$this->s113_c_encaminhamento);\n }else{\n $this->s113_i_codigo = ($this->s113_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s113_i_codigo\"]:$this->s113_i_codigo);\n }\n }", "function penjumlahan(){\r\n $b = 2;\r\n $c = 3;\r\n $a = $b + $c;\r\n\r\n //return adalah hasil dari fungsi\r\n return $a;\r\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->q23_sequencial = ($this->q23_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_sequencial\"]:$this->q23_sequencial);\n $this->q23_issarqsimples = ($this->q23_issarqsimples == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_issarqsimples\"]:$this->q23_issarqsimples);\n $this->q23_seqreg = ($this->q23_seqreg == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_seqreg\"]:$this->q23_seqreg);\n if($this->q23_dtarrec == \"\"){\n $this->q23_dtarrec_dia = ($this->q23_dtarrec_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_dtarrec_dia\"]:$this->q23_dtarrec_dia);\n $this->q23_dtarrec_mes = ($this->q23_dtarrec_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_dtarrec_mes\"]:$this->q23_dtarrec_mes);\n $this->q23_dtarrec_ano = ($this->q23_dtarrec_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_dtarrec_ano\"]:$this->q23_dtarrec_ano);\n if($this->q23_dtarrec_dia != \"\"){\n $this->q23_dtarrec = $this->q23_dtarrec_ano.\"-\".$this->q23_dtarrec_mes.\"-\".$this->q23_dtarrec_dia;\n }\n }\n if($this->q23_dtvenc == \"\"){\n $this->q23_dtvenc_dia = ($this->q23_dtvenc_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_dtvenc_dia\"]:$this->q23_dtvenc_dia);\n $this->q23_dtvenc_mes = ($this->q23_dtvenc_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_dtvenc_mes\"]:$this->q23_dtvenc_mes);\n $this->q23_dtvenc_ano = ($this->q23_dtvenc_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_dtvenc_ano\"]:$this->q23_dtvenc_ano);\n if($this->q23_dtvenc_dia != \"\"){\n $this->q23_dtvenc = $this->q23_dtvenc_ano.\"-\".$this->q23_dtvenc_mes.\"-\".$this->q23_dtvenc_dia;\n }\n }\n $this->q23_cnpj = ($this->q23_cnpj == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_cnpj\"]:$this->q23_cnpj);\n $this->q23_tiporec = ($this->q23_tiporec == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_tiporec\"]:$this->q23_tiporec);\n $this->q23_vlrprinc = ($this->q23_vlrprinc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_vlrprinc\"]:$this->q23_vlrprinc);\n $this->q23_vlrmul = ($this->q23_vlrmul == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_vlrmul\"]:$this->q23_vlrmul);\n $this->q23_vlrjur = ($this->q23_vlrjur == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_vlrjur\"]:$this->q23_vlrjur);\n if($this->q23_data == \"\"){\n $this->q23_data_dia = ($this->q23_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_data_dia\"]:$this->q23_data_dia);\n $this->q23_data_mes = ($this->q23_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_data_mes\"]:$this->q23_data_mes);\n $this->q23_data_ano = ($this->q23_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_data_ano\"]:$this->q23_data_ano);\n if($this->q23_data_dia != \"\"){\n $this->q23_data = $this->q23_data_ano.\"-\".$this->q23_data_mes.\"-\".$this->q23_data_dia;\n }\n }\n $this->q23_vlraut = ($this->q23_vlraut == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_vlraut\"]:$this->q23_vlraut);\n $this->q23_nroaut = ($this->q23_nroaut == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_nroaut\"]:$this->q23_nroaut);\n $this->q23_codbco = ($this->q23_codbco == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_codbco\"]:$this->q23_codbco);\n $this->q23_codage = ($this->q23_codage == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_codage\"]:$this->q23_codage);\n $this->q23_codsiafi = ($this->q23_codsiafi == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_codsiafi\"]:$this->q23_codsiafi);\n $this->q23_codserpro = ($this->q23_codserpro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_codserpro\"]:$this->q23_codserpro);\n $this->q23_anousu = ($this->q23_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_anousu\"]:$this->q23_anousu);\n $this->q23_mesusu = ($this->q23_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_mesusu\"]:$this->q23_mesusu);\n $this->q23_acao = ($this->q23_acao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_acao\"]:$this->q23_acao);\n }else{\n $this->q23_sequencial = ($this->q23_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q23_sequencial\"]:$this->q23_sequencial);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh85_sequencial = ($this->rh85_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_sequencial\"]:$this->rh85_sequencial);\n $this->rh85_regist = ($this->rh85_regist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_regist\"]:$this->rh85_regist);\n $this->rh85_anousu = ($this->rh85_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_anousu\"]:$this->rh85_anousu);\n $this->rh85_mesusu = ($this->rh85_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_mesusu\"]:$this->rh85_mesusu);\n if($this->rh85_dataemissao == \"\"){\n $this->rh85_dataemissao_dia = ($this->rh85_dataemissao_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_dataemissao_dia\"]:$this->rh85_dataemissao_dia);\n $this->rh85_dataemissao_mes = ($this->rh85_dataemissao_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_dataemissao_mes\"]:$this->rh85_dataemissao_mes);\n $this->rh85_dataemissao_ano = ($this->rh85_dataemissao_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_dataemissao_ano\"]:$this->rh85_dataemissao_ano);\n if($this->rh85_dataemissao_dia != \"\"){\n $this->rh85_dataemissao = $this->rh85_dataemissao_ano.\"-\".$this->rh85_dataemissao_mes.\"-\".$this->rh85_dataemissao_dia;\n }\n }\n $this->rh85_horaemissao = ($this->rh85_horaemissao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_horaemissao\"]:$this->rh85_horaemissao);\n $this->rh85_sigla = ($this->rh85_sigla == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_sigla\"]:$this->rh85_sigla);\n $this->rh85_codautent = ($this->rh85_codautent == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_codautent\"]:$this->rh85_codautent);\n $this->rh85_ip = ($this->rh85_ip == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_ip\"]:$this->rh85_ip);\n $this->rh85_externo = ($this->rh85_externo == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_externo\"]:$this->rh85_externo);\n }else{\n $this->rh85_sequencial = ($this->rh85_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh85_sequencial\"]:$this->rh85_sequencial);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->db55_sequencial = ($this->db55_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_sequencial\"]:$this->db55_sequencial);\n $this->db55_layouttxt = ($this->db55_layouttxt == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_layouttxt\"]:$this->db55_layouttxt);\n $this->db55_seqlayout = ($this->db55_seqlayout == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_seqlayout\"]:$this->db55_seqlayout);\n if($this->db55_data == \"\"){\n $this->db55_data_dia = ($this->db55_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_data_dia\"]:$this->db55_data_dia);\n $this->db55_data_mes = ($this->db55_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_data_mes\"]:$this->db55_data_mes);\n $this->db55_data_ano = ($this->db55_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_data_ano\"]:$this->db55_data_ano);\n if($this->db55_data_dia != \"\"){\n $this->db55_data = $this->db55_data_ano.\"-\".$this->db55_data_mes.\"-\".$this->db55_data_dia;\n }\n }\n $this->db55_hora = ($this->db55_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_hora\"]:$this->db55_hora);\n $this->db55_usuario = ($this->db55_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_usuario\"]:$this->db55_usuario);\n $this->db55_nomearq = ($this->db55_nomearq == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_nomearq\"]:$this->db55_nomearq);\n $this->db55_obs = ($this->db55_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_obs\"]:$this->db55_obs);\n $this->db55_conteudo = ($this->db55_conteudo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_conteudo\"]:$this->db55_conteudo);\n }else{\n $this->db55_sequencial = ($this->db55_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db55_sequencial\"]:$this->db55_sequencial);\n }\n }", "function cariPosisi($batas){\nif(empty($_GET['halhasilkelulusansiswa'])){\n\t$posisi=0;\n\t$_GET['halhasilkelulusansiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['halhasilkelulusansiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->at60_codproj = ($this->at60_codproj == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_codproj\"]:$this->at60_codproj);\n $this->at60_codcli = ($this->at60_codcli == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_codcli\"]:$this->at60_codcli);\n $this->at60_codproced = ($this->at60_codproced == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_codproced\"]:$this->at60_codproced);\n if($this->at60_inicio == \"\"){\n $this->at60_inicio_dia = ($this->at60_inicio_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_inicio_dia\"]:$this->at60_inicio_dia);\n $this->at60_inicio_mes = ($this->at60_inicio_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_inicio_mes\"]:$this->at60_inicio_mes);\n $this->at60_inicio_ano = ($this->at60_inicio_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_inicio_ano\"]:$this->at60_inicio_ano);\n if($this->at60_inicio_dia != \"\"){\n $this->at60_inicio = $this->at60_inicio_ano.\"-\".$this->at60_inicio_mes.\"-\".$this->at60_inicio_dia;\n }\n }\n if($this->at60_fim == \"\"){\n $this->at60_fim_dia = ($this->at60_fim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_fim_dia\"]:$this->at60_fim_dia);\n $this->at60_fim_mes = ($this->at60_fim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_fim_mes\"]:$this->at60_fim_mes);\n $this->at60_fim_ano = ($this->at60_fim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_fim_ano\"]:$this->at60_fim_ano);\n if($this->at60_fim_dia != \"\"){\n $this->at60_fim = $this->at60_fim_ano.\"-\".$this->at60_fim_mes.\"-\".$this->at60_fim_dia;\n }\n }\n $this->at60_descricao = ($this->at60_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_descricao\"]:$this->at60_descricao);\n }else{\n $this->at60_codproj = ($this->at60_codproj == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at60_codproj\"]:$this->at60_codproj);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->q10_sequencial = ($this->q10_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_sequencial\"]:$this->q10_sequencial);\n $this->q10_inscr = ($this->q10_inscr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_inscr\"]:$this->q10_inscr);\n $this->q10_numcgm = ($this->q10_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_numcgm\"]:$this->q10_numcgm);\n if($this->q10_dtini == \"\"){\n $this->q10_dtini_dia = ($this->q10_dtini_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_dtini_dia\"]:$this->q10_dtini_dia);\n $this->q10_dtini_mes = ($this->q10_dtini_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_dtini_mes\"]:$this->q10_dtini_mes);\n $this->q10_dtini_ano = ($this->q10_dtini_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_dtini_ano\"]:$this->q10_dtini_ano);\n if($this->q10_dtini_dia != \"\"){\n $this->q10_dtini = $this->q10_dtini_ano.\"-\".$this->q10_dtini_mes.\"-\".$this->q10_dtini_dia;\n }\n }\n if($this->q10_dtfim == \"\"){\n $this->q10_dtfim_dia = ($this->q10_dtfim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_dtfim_dia\"]:$this->q10_dtfim_dia);\n $this->q10_dtfim_mes = ($this->q10_dtfim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_dtfim_mes\"]:$this->q10_dtfim_mes);\n $this->q10_dtfim_ano = ($this->q10_dtfim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_dtfim_ano\"]:$this->q10_dtfim_ano);\n if($this->q10_dtfim_dia != \"\"){\n $this->q10_dtfim = $this->q10_dtfim_ano.\"-\".$this->q10_dtfim_mes.\"-\".$this->q10_dtfim_dia;\n }\n }\n }else{\n $this->q10_sequencial = ($this->q10_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q10_sequencial\"]:$this->q10_sequencial);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->x40_codcorte = ($this->x40_codcorte == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_codcorte\"]:$this->x40_codcorte);\n if($this->x40_dtinc == \"\"){\n $this->x40_dtinc_dia = ($this->x40_dtinc_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_dtinc_dia\"]:$this->x40_dtinc_dia);\n $this->x40_dtinc_mes = ($this->x40_dtinc_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_dtinc_mes\"]:$this->x40_dtinc_mes);\n $this->x40_dtinc_ano = ($this->x40_dtinc_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_dtinc_ano\"]:$this->x40_dtinc_ano);\n if($this->x40_dtinc_dia != \"\"){\n $this->x40_dtinc = $this->x40_dtinc_ano.\"-\".$this->x40_dtinc_mes.\"-\".$this->x40_dtinc_dia;\n }\n }\n $this->x40_usuario = ($this->x40_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_usuario\"]:$this->x40_usuario);\n $this->x40_anoini = ($this->x40_anoini == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_anoini\"]:$this->x40_anoini);\n $this->x40_anofim = ($this->x40_anofim == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_anofim\"]:$this->x40_anofim);\n $this->x40_entrega = ($this->x40_entrega == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_entrega\"]:$this->x40_entrega);\n $this->x40_rua = ($this->x40_rua == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_rua\"]:$this->x40_rua);\n $this->x40_vlrminimo = ($this->x40_vlrminimo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_vlrminimo\"]:$this->x40_vlrminimo);\n $this->x40_sql = ($this->x40_sql == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_sql\"]:$this->x40_sql);\n $this->x40_codsituacao = ($this->x40_codsituacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_codsituacao\"]:$this->x40_codsituacao);\n $this->x40_zona = ($this->x40_zona == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_zona\"]:$this->x40_zona);\n $this->x40_tipomatricula = ($this->x40_tipomatricula == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_tipomatricula\"]:$this->x40_tipomatricula);\n }else{\n $this->x40_codcorte = ($this->x40_codcorte == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x40_codcorte\"]:$this->x40_codcorte);\n }\n }", "function DanhMuc_Them(&$loi){\t\n\t\n\t\t$thanhcong=true;\n\t\t\n\t\t$quocgia = $_POST[quocgia];settype($quocgia,\"int\");\n\t\t$idMien = $_POST[idMien];settype($idMien,\"int\");\n\t\t$TenDM_KS = $this->processData($_POST[TenDM_KS]);\n\t\t$TenDM_KS_KD = $this->processData($_POST[TenDM_KS_KD]);\n\t\t$Title = $this->processData($_POST[Title]);\n\t\t$MetaD = $this->processData($_POST[MetaD]);\n\t\t$MetaK = $this->processData($_POST[MetaK]);\n\t\t\n\t\t$ThuTu = $this->ThuTuMax('dvt_ks_danhmuc') + 1;\n\t\t\n\t\t$AnHien = $_POST[AnHien];settype($AnHien,\"int\");\n\t\t\n\t\tif($Title==\"\") $Title=$TenDM_KS;\n\t\tif($MetaD==\"\") $MetaD=$TenDM_KS;\n\t\tif($MetaK==\"\") $MetaK=$TenDM_KS;\n\t\tif($TenDM_KS_KD==\"\") $TenDM_KS_KD = $this->changeTitle($TenDM_KS);\n\t\t\n\t\tif($idMien==0 && $quocgia==0)\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[idMien]= \"Chọn miền\";\n\t\t}\n\t\tif($TenDM_KS==\"\")\n\t\t{\n\t\t\t$thanhcong= false;\n\t\t\t$loi[TenDM_KS]= \"Chưa nhập tên danh mục\";\n\t\t}\n\t\n\t\tif($thanhcong==false){\n\t\t\treturn $thanhcong;\n\t\t}else{\n\t\t\t$sql = \"INSERT INTO dvt_ks_danhmuc \n\t\t\t\t\tVALUES(NULL,$quocgia,$idMien,'$TenDM_KS','$TenDM_KS_KD','$Title','$MetaD','$MetaK',$ThuTu,$AnHien)\";\n\t\t\tmysql_query($sql) or die(mysql_error().$sql);\t\t\n\t\t}\n\t\treturn $thanhcong;\n\t}", "function ajustecambiario($periodo,$ejer,$moneda){\n\t\t\t// le kite el periodo and p.idperiodo=\".$periodo.\"\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto,c.manual_code,p.idperiodo\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and p.idejercicio=\".$ejer.\" and c.`main_father`!=conf.CuentaBancos\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 and p.relacionExt!=0 and p.idperiodo<=\".$periodo.\"\n\t\t\tgroup by p.relacionExt,m.TipoMovto\n\t\t\t\");\n\t\t\tif($sql->num_rows>0){\n\t\t\t\treturn $sql;\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}", "function emprunt_dm()\n{\n\tglobal $mat;\n\tglobal $date;\n\tglobal $mont;\n\tglobal $iv1;\n\tglobal $exe;\n\tglobal $mois;\n\t\nif ($exe != NULL) {\n\t$iv1=($mont*0.05);\n\t\n\t$in= \"INSERT INTO `afdc1`.`compte` (`emprunt_dm`, `interet_a_verser`, `type`, `mois`, `date`, `matricule`) VALUES ('$mont', '$iv1', 'emprunt', '$mois', '$date', '$mat')\";\n}\n\telse\n\t{\n\t\t\n\t\t$in=\"INSERT INTO `afdc1`.`compte` (`emprunt_dm`, `interet_a_verser`, `type`, `mois`, `date`, `matricule`) VALUES ('$efm', '$iv1', 'emprunt', '$mois', '$date', '$mat')\";\n\t}\n\t$exe= mysql_query($in);\n\t\n}", "function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed100_i_codigo = ($this->ed100_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_codigo\"]:$this->ed100_i_codigo);\n $this->ed100_i_historicompsfora = ($this->ed100_i_historicompsfora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_historicompsfora\"]:$this->ed100_i_historicompsfora);\n $this->ed100_i_disciplina = ($this->ed100_i_disciplina == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_disciplina\"]:$this->ed100_i_disciplina);\n $this->ed100_i_justificativa = ($this->ed100_i_justificativa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_justificativa\"]:$this->ed100_i_justificativa);\n $this->ed100_i_qtdch = ($this->ed100_i_qtdch == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_qtdch\"]:$this->ed100_i_qtdch);\n $this->ed100_c_resultadofinal = ($this->ed100_c_resultadofinal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_c_resultadofinal\"]:$this->ed100_c_resultadofinal);\n $this->ed100_t_resultobtido = ($this->ed100_t_resultobtido == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_t_resultobtido\"]:$this->ed100_t_resultobtido);\n $this->ed100_c_situacao = ($this->ed100_c_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_c_situacao\"]:$this->ed100_c_situacao);\n $this->ed100_c_tiporesultado = ($this->ed100_c_tiporesultado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_c_tiporesultado\"]:$this->ed100_c_tiporesultado);\n $this->ed100_i_ordenacao = ($this->ed100_i_ordenacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_ordenacao\"]:$this->ed100_i_ordenacao);\n $this->ed100_c_termofinal = ($this->ed100_c_termofinal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_c_termofinal\"]:$this->ed100_c_termofinal);\n $this->ed100_opcional = ($this->ed100_opcional == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_opcional\"]:$this->ed100_opcional);\n $this->ed100_basecomum = ($this->ed100_basecomum == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_basecomum\"]:$this->ed100_basecomum);\n }else{\n $this->ed100_i_codigo = ($this->ed100_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_codigo\"]:$this->ed100_i_codigo);\n }\n }", "function hitungUmur($thn_lahir, $thn_sekarang){\n $umur = $thn_sekarang - $thn_lahir;\n return $umur;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->r60_anousu = ($this->r60_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_anousu\"]:$this->r60_anousu);\n $this->r60_mesusu = ($this->r60_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_mesusu\"]:$this->r60_mesusu);\n $this->r60_numcgm = ($this->r60_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_numcgm\"]:$this->r60_numcgm);\n $this->r60_tbprev = ($this->r60_tbprev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_tbprev\"]:$this->r60_tbprev);\n $this->r60_rubric = ($this->r60_rubric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_rubric\"]:$this->r60_rubric);\n $this->r60_regist = ($this->r60_regist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_regist\"]:$this->r60_regist);\n $this->r60_folha = ($this->r60_folha == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_folha\"]:$this->r60_folha);\n $this->r60_base = ($this->r60_base == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_base\"]:$this->r60_base);\n $this->r60_dprev = ($this->r60_dprev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_dprev\"]:$this->r60_dprev);\n $this->r60_pdesc = ($this->r60_pdesc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_pdesc\"]:$this->r60_pdesc);\n $this->r60_novod = ($this->r60_novod == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_novod\"]:$this->r60_novod);\n $this->r60_novop = ($this->r60_novop == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_novop\"]:$this->r60_novop);\n $this->r60_altera = ($this->r60_altera == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_altera\"]:$this->r60_altera);\n $this->r60_ajuste = ($this->r60_ajuste == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_ajuste\"]:$this->r60_ajuste);\n $this->r60_basef = ($this->r60_basef == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_basef\"]:$this->r60_basef);\n }else{\n $this->r60_anousu = ($this->r60_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_anousu\"]:$this->r60_anousu);\n $this->r60_mesusu = ($this->r60_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_mesusu\"]:$this->r60_mesusu);\n $this->r60_numcgm = ($this->r60_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_numcgm\"]:$this->r60_numcgm);\n $this->r60_tbprev = ($this->r60_tbprev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_tbprev\"]:$this->r60_tbprev);\n $this->r60_rubric = ($this->r60_rubric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_rubric\"]:$this->r60_rubric);\n }\n }", "public function f02()\n {\n }", "function actualizarsoloparesin($idkardex,$talla,$cantidad1,$iddetalleingreso,$idmodelodetalle,$precionuevo,$lineanuevo,$colornuevo,$materialnuevo,$return = false ){\n\n // $sqlA[] = \"UPDATE adicionkardextienda SET saldocantidad='$cantidad1',cantidad='$cantidad1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND talla='$talla';\";\n $sqlA[] = \"UPDATE historialkardextienda SET saldocantidad='$cantidad1',cantidad='$cantidad1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND talla='$talla' and idperiodo='3';\";\n $sqlmarca = \" SELECT tabla,mesrango,idperiodo,fechainicio,fechafin FROM administrakardex WHERE idkardex = '$idkardex' \";\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"tabla\");\n $tabla = $opcionkardex['resultado'];\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"mesrango\");\n $mesrango = $opcionkardex['resultado'];\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"idperiodo\");\n $idperiodo = $opcionkardex['resultado'];\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"fechainicio\");\n $fechain = $opcionkardex['resultado'];\n $opcionkardex = findBySqlReturnCampoUnique($sqlmarca, true, true, \"fechafin\");\n $fechafin = $opcionkardex['resultado'];\n if($fechafin==null ||$fechafin == \"\"){\n $fechaf = Date(\"Y-m-d\");}\n\n$select1 = \"SUM(i.cantidad) AS Pares\";\n $from1 = \"itemventa i,adicionkardextienda k, ventasdetalle vent\";\n $where1 = \"k.idcalzado = '$iddetalleingreso' AND i.idventa=vent.idventadetalle AND i.idkardextienda=k.idkardextienda AND\nk.talla='$talla' AND vent.fecha >= '$fechain'AND vent.fecha <= '$fechaf' and i.estado!='cambiado' \";\n $sql21 = \"SELECT \".$select1.\" FROM \".$from1. \" WHERE \".$where1;\n $almacenA1 = findBySqlReturnCampoUnique($sql21, true, true, 'Pares');\n $pares1 = $almacenA1['resultado'];\n if($pares1==NULL || $pares1 =='' || $pares1 == \"\"){ $pares1=\"0\"; }\n if($pares1=='0' ||$pares1==0){\n\n $sqlA[] = \"UPDATE adicionkardextienda SET saldocantidad='$cantidad1',cantidad='$cantidad1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND talla='$talla';\";\n\n } else{\n\n $cantidad1=$cantidad1-$pares1;\n $sqlA[] = \"UPDATE adicionkardextienda SET saldocantidad='$cantidad1',cantidad='$cantidad1' WHERE idmodelodetalle='$idmodelodetalle' AND idcalzado='$iddetalleingreso' AND talla='$talla';\";\n}\n//MostrarConsulta($sqlA);\nejecutarConsultaSQLBeginCommit($sqlA);\n\n}", "function trabajo(){\nglobal $fechac;\nglobal $fechaf;\nglobal $data;\nglobal $plano;\n if(isset($_POST['fechai']))\n $fecha=$_POST['fechai'];\n if(isset($_SESSION['fechai']))\n $fecha=$_SESSION['fechai'];\n $dia=substr($fecha,0,2);\n $mes=substr($fecha,3,2);\n $ano=substr($fecha,6,4);\n $fechac=$ano.\"-\".$mes.\"-\".$dia;\n\n if(isset($_POST['fechat']))\n $fecha=$_POST['fechat'];\n if(isset($_SESSION['fechat']))\n $fecha=$_SESSION['fechat'];\n $dia=substr($fecha,0,2);\n $mes=substr($fecha,3,2);\n $ano=substr($fecha,6,4);\n $fechaf=$ano.\"-\".$mes.\"-\".$dia;\n\n//echo \"trabajo fechac:\".$fechac.\"<br>\";\n//echo \"trabajo fechaf:\".$fechaf.\"<br>\";\n\n/*\nif (!isset($_SESSION['fechai']))\n $_SESSION['fechai']=$_POST['fechai'];\nif (!isset($_SESSION['fechat']))\n $_SESSION['fechat']=$_POST['fechat'];\n\n$fecha=$_POST['fechai'];\n$dia=substr($fecha,0,2);\n$mes=substr($fecha,3,2);\n$ano=substr($fecha,6,4);\n$fechai=$ano.\"-\".$mes.\"-\".$dia;\n$fecha=$_POST['fechat'];\n$dia=substr($fecha,0,2);\n$mes=substr($fecha,3,2);\n$ano=substr($fecha,6,4);\n$fechat=$ano.\"-\".$mes.\"-\".$dia;\n*/\n$query_rsh = \"select sum(pbm1+pb1_9+pb10_14+pb15_64+pb65ym+pbotras +\n pom1+po1_9+po10_14+po15_64+po65ym+pootras) as pediatria,\n sum(hbm1+hb1_9+hb10_14+hb15_64+hb65ym+hbotras +\n hom1+ho1_9+ho10_14+ho15_64+ho65ym+hootras +\n mbm1+mb1_9+mb10_14+mb15_64+mb65ym+mbotras +\n mom1+mo1_9+mo10_14+mo15_64+mo65ym+mootras ) as medicina,\n sum(utitm1+utit1_9+utit10_14+utit15_64+utit65ym+utitotras +\n utibm1+utib1_9+utib10_14+utib15_64+utib65ym+utibotras +\n ucibm1+ucib1_9+ucib10_14+ucib15_64+ucib65ym+ucibotras +\n ucitm1+ucit1_9+ucit10_14+ucit15_64+ucit65ym+ucitotras ) as upc\n FROM hospitaliza\n where id_estab=\".$_SESSION['id_estab'].\n \" and fecha between '\".$fechac.\"' and '\".$fechaf.\"'\";\n\n$query_rsf = \"select sum(falli0a14 + falle0a14 + falleh0a14) as f0a14,\n sum(falli15a64 + falle15a64 + falleh15a64) as f15a64,\n sum(falli65a74 + falle65a74 + falleh65a74) as f65a74,\n sum(falli75ym + falle75ym + falleh75ym) as f75ym,\n\t\t\t\t\t sum(falli0a14ira + falle0a14ira + falleh0a14ira) as f0a14ira,\n sum(falli15a64ira + falle15a64ira + falleh15a64ira) as f15a64ira,\n sum(falli65a74ira + falle65a74ira + falleh65a74ira) as f65a74ira,\n sum(falli75ymira + falle75ymira + falleh75ymira) as f75ymira,\n\t\t\t\t\t sum(ifi0a14) as ifi0a14,\n\t\t\t\t\t sum(ifi15a64) as ifi15a64,\n\t\t\t\t\t sum(ifi65a74) as ifi65a74,\n\t\t\t\t\t sum(ifi75ym) as ifi75ym\n FROM fallecidoh\n where id_estab=\".$_SESSION['id_estab'].\n \" and fecha between '\".$fechac.\"' and '\".$fechaf.\"'\";\n\n$query_rs = \"SELECT \n sum(bronq_m1+ bronq_1a9 + bronq_10a14 + bronq_15a64 + bronq_65ym + \n asma_m1 + asma_1a9 + asma_10a14 + asma_15a64 + asma_65ym + \n neumo_m1 + neumo_1a9 + neumo_10a14 + neumo_15a64+ neumo_65ym + \n influ_m1 + influ_1a9 + influ_10a14 + influ_15a64+ influ_65ym + \n larin_m1 + larin_1a9 + larin_10a14 + larin_15a64+ larin_65ym + \n\t\t\tiraltas_m1 + iraltas_1a9 + iraltas_10a14 + iraltas_15a64+ iraltas_65ym + \n resto_m1 + resto_1a9 + resto_10a14 + resto_15a64 + resto_65ym +\n totsinm1 + totsin1a9 + totsin10a14 + totsin15a64 + totsin65ym +\n totm1 + tot1a9 + tot10a14 + tot15a64 + tot65ym) as toturg,\n\n sum(totm1 + tot1a9 + tot10a14 + tot15a64 + tot65ym) as totmed,\n\n sum(bronq_m1+ bronq_1a9 + bronq_10a14 + bronq_15a64 + bronq_65ym) as totsbo,\n\n sum(neumo_m1 + neumo_1a9 + neumo_10a14 + neumo_15a64+ neumo_65ym) as totneumo, \n\n sum(bronq_m1 + asma_m1 + neumo_m1 + influ_m1 + larin_m1 + iraltas_m1 + resto_m1) as iram1,\n\n sum(bronq_65ym + asma_65ym + neumo_65ym + influ_65ym + larin_65ym + iraltas_65ym + resto_65ym) as ira65ym,\n\n sum(bronq_m1+ bronq_1a9 + bronq_10a14 + bronq_15a64 + bronq_65ym + \n asma_m1 + asma_1a9 + asma_10a14 + asma_15a64 + asma_65ym + \n neumo_m1 + neumo_1a9 + neumo_10a14 + neumo_15a64+ neumo_65ym + \n influ_m1 + influ_1a9 + influ_10a14 + influ_15a64+ influ_65ym + \n larin_m1 + larin_1a9 + larin_10a14 + larin_15a64+ larin_65ym + \n\t\t\t iraltas_m1 + iraltas_1a9 + iraltas_10a14 + iraltas_15a64+ iraltas_65ym + \n resto_m1 + resto_1a9 + resto_10a14 + resto_15a64 + resto_65ym) as totira \n\n FROM aturg_urbana\n where id_estab=\".$_SESSION['id_estab'].\n \" and fecha between '\".$fechac.\"' and '\".$fechaf.\"'\";\n$rs = safe_query($query_rs);\n$row_rs = mysql_fetch_assoc($rs);\n$totalRows_rs = mysql_num_rows($rs);\n$toturg=$row_rs['toturg'];\n$totira=$row_rs['totira'];\n$totmed=$row_rs['totmed'];\n$totsbo=$row_rs['totsbo'];\n$totneumo=$row_rs['totneumo'];\n$iram1=$row_rs['iram1'];\n$ira65ym=$row_rs['ira65ym'];\n\n$rsf = safe_query($query_rsf);\n$row_rsf = mysql_fetch_assoc($rsf);\n$totalRows_rsf = mysql_num_rows($rsf);\n$f0a14=$row_rsf['f0a14'];\n$f15a64=$row_rsf['f15a64'];\n$f65a74=$row_rsf['f65a74'];\n$f75ym=$row_rsf['f75ym'];\n$f0a14ira=$row_rsf['f0a14ira'];\n$f15a64ira=$row_rsf['f15a64ira'];\n$f65a74ira=$row_rsf['f65a74ira'];\n$f75ymira=$row_rsf['f75ymira'];\n$ifi0a14=$row_rsf['ifi0a14'];\n$ifi15a64=$row_rsf['ifi15a64'];\n$ifi65a74=$row_rsf['ifi65a74'];\n$ifi75ym=$row_rsf['ifi75ym'];\n\n$rsh = safe_query($query_rsh);\n$row_rsh = mysql_fetch_assoc($rsh);\n$totalRows_rsh = mysql_num_rows($rsh);\n$pediatria=$row_rsh['pediatria'];\n$medicina=$row_rsh['medicina'];\n$upc=$row_rsh['upc'];\n\nif ($toturg>0){\n $ind1=($totira/$toturg)*100;\n $val1=number_format($ind1,2,\",\",\".\"); }\nelse\n $val1=\"-\";\n\nif ($totmed>0){\n $ind2=($totira/($totmed + $totira))*100;\n $val2=number_format($ind2,2,\",\",\".\"); }\nelse\n $val2=\"-\";\n\nif ($totira>0){\n $ind3=($totsbo/$totira)*100;\n $val3=number_format($ind3,2,\",\",\".\"); }\nelse\n $val3=\"-\";\n\nif ($totneumo>0){\n $ind4=($totneumo/$totira)*100;\n $val4=number_format($ind4,2,\",\",\".\"); }\nelse\n $val4=\"-\";\n\nif ($totira>0){\n $ind5=($iram1/$totira)*100;\n $val5=number_format($ind5,2,\",\",\".\"); }\nelse\n $val5=\"-\";\n\nif ($totira>0){\n $ind6=($ira65ym/$totira)*100;\n $val6=number_format($ind6,2,\",\",\".\"); }\nelse\n $val6=\"-\";\n\n// crea archivo para enviar por correo\n$fileExcel=$_SESSION['nombre'].\".htm\";\n$fileExcel=str_replace(\" \",\"_\",$fileExcel);\n$fp=fopen($fileExcel,\"w\");\n\n$imp= <<<EOQ\n<table width=\"600\" border=\"0\" align=\"center\">\n <caption>\n <font color=\"#0000CC\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>\n Gestión IRA<br>\nEOQ;\necho $imp;\n$data=$imp;\n\n$plano=\"Establecimiento: \".$_SESSION['nombre'].\"\\n\";\n$plano.=\"Semana: \".$_SESSION['fechai'].\" al \".$_SESSION['fechat'].\"\\n\";\n\n$imp= \"<br><font size=\\\"1\\\">Establecimiento:</font> <i>\".$_SESSION['nombre'].\"</i> \"\n .\"&nbsp;&nbsp;Fecha: &nbsp;<font size=\\\"1\\\">\".$_SESSION['fechai'].\"&nbsp;&nbsp; al &nbsp;&nbsp;\" .$_SESSION['fechat'].\"</font>\";\necho $imp;\n$data.=$imp;\n\n$plano.=\"Indicador \\t \\t \\t \\t \\t \\t \\t \\t \\tValor \\t Composición\\n\";\n$plano.=\"% consultas IRA / total consultas urgencia \\t\\t\\t $val1% \\t ($totira / $toturg )\\n\";\n$plano.=\"% consultas IRA / total consultas médicas \\t \\t\\t $val2% \\t (($totira /( $totmed + $totira))\\n\";\n$plano.=\"% consultas Sind.Bron.Obs. / total consultas respirat.\\t $val3% \\t ($totsbo / $totira)\\n\";\n$plano.=\"% consultas neumonía / total consultas respiratorias \\t\\t $val4% \\t ($totneumo / $totira)\\n\";\n$plano.=\"Consultas respiratorias por grupo etario:\\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t\\t < 1 año: \\t\\t $val5% \\t ( $iram1 / $totira )\\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t\\t > 65 años: \\t $val6% \\t ( $ira65ym / $totira )\\n\";\n\n$imp= <<<EOQ\n </strong></font> \n </caption>\n <tr bgcolor=\"#DDDDDD\"> \n <td width=\"320\"><font color=\"#0000CC\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>\n Indicador</strong></font></td>\n <td width=\"80\"> \n <div align=\"right\"><font color=\"#0000CC\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>\n Valor</strong></font></div></td>\n <td width=\"100\">\n <div align=\"right\"><font color=\"#0000CC\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>\n Composición\n </strong></font></div>\n <td> \n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n consultas IRA / total consultas urgencia</font></strong></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>$val1</strong>%</font></font></font></div>\n </td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong> ($totira / $toturg) </strong></font></font></font></div>\n </td>\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n consultas IRA / total consultas m&eacute;dicas</font></strong></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>$val2</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong> ($totira /( $totmed + $totira) ) </strong>\n </font></font></font></div>\n </td>\n\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n consultas Sind.Bron.Obs. / total consultas respirat.</font></strong></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>$val3</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>($totsbo / $totira)</strong>\n </font></font></font></div>\n </td>\n\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n consultas neumon&iacute;a / total consultas respiratorias</font></strong></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>$val4</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong> ($totneumo / $totira)</strong> </font></font></font></div>\n </td>\n\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">% \n Consultas respiratorias por grupo etario:</font></strong></td>\n <td><div align=\"right\"></div></td>\n <td>&nbsp;</td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">&lt; \n 1 a&ntilde;o:</font></div></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$val5</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>( $iram1 / $totira )</strong> </font></font></font></div>\n </td>\n\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">&gt; \n 65 a&ntilde;os:</font></div></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$val6</strong>%</font></font></font></div></td>\n <td>\n <div align=\"right\"><font color=\"#0000CC\"><font size=\"1\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"> \n <strong>( $ira65ym / $totira )</strong></font></font></font></div>\n </td>\n\n </tr>\nEOQ;\necho $imp;\n$data.=$imp;\n\n if(strcmp($_SESSION['tipo'],'sapu')!=0){\n\n$plano.=\"Hospitalizaciones:\\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t Pediatría:\\t\\t\\t $pediatria \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t Medicina:\\t\\t\\t $medicina \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t U.P.C.:\\t\\t\\t $upc \\n\";\n\n$imp= <<<EOQ\n <tr> \n <td><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>Hospitalizaciones</strong></font></td>\n <td><div align=\"right\"><font color=\"#0000CC\"><font size=\"2\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"></font></font></font></div></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Pediatría:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$pediatria</strong></font></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Medicina:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$medicina</strong></font></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">U.P.C.:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$upc</strong></font></td>\n </tr>\nEOQ;\necho $imp;\n$data.=$imp;\n\n}\n$plano.=\"Fallecidos según edad:\\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t 0-14 años: \\t\\t $f0a14 \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t 15-64 años: \\t\\t $f15a64 \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t 65-74 años: \\t\\t $f65a74 \\n\";\n$plano.=\"\\t\\t\\t\\t\\t\\t 75 y más años: \\t\\t $f75ym \\n\";\n\n$imp= <<<EOQ\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Fallecidos \n seg&uacute;n edad X IRA:</font></strong></td>\n <td><div align=\"right\"></div></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">0-14 años:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f0a14ira</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 15-64años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f15a64ira</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 65-74 años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f65a74ira</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 75 años y más:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f75ymira</strong></font></td>\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Fallecidos \n seg&uacute;n edad x otras causas:</font></strong></td>\n <td><div align=\"right\"></div></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">0-14 años:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f0a14</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 15-64años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f15a64</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 65-74 años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f65a74</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 75 años y más:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$f75ym</strong></font></td>\n </tr>\n <tr> \n <td><strong><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">IFI:</font></strong></td>\n <td><div align=\"right\"></div></td>\n </tr>\n <tr> \n <td><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">0-14 años:\n </font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$ifi0a14</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 15-64años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$ifi15a64</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 65-74 años:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$ifi65a74</strong></font></td>\n </tr>\n <tr> \n <td height=\"26\"><div align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n 75 años y más:</font></div></td>\n <td align=\"right\"><font color=\"#0000CC\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">\n <strong>$ifi75ym</strong></font></td>\n </tr>\n \n</table>\nEOQ;\necho $imp;\n$data.=$imp;\nfwrite($fp,$data); // graba archivo\nfclose($fp); // cierra\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->as19_sequencial = ($this->as19_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_sequencial\"]:$this->as19_sequencial);\n $this->as19_nome = ($this->as19_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_nome\"]:$this->as19_nome);\n $this->as19_detalhamento = ($this->as19_detalhamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_detalhamento\"]:$this->as19_detalhamento);\n $this->as19_tabcurritipo = ($this->as19_tabcurritipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_tabcurritipo\"]:$this->as19_tabcurritipo);\n if($this->as19_inicio == \"\"){\n $this->as19_inicio_dia = ($this->as19_inicio_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_inicio_dia\"]:$this->as19_inicio_dia);\n $this->as19_inicio_mes = ($this->as19_inicio_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_inicio_mes\"]:$this->as19_inicio_mes);\n $this->as19_inicio_ano = ($this->as19_inicio_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_inicio_ano\"]:$this->as19_inicio_ano);\n if($this->as19_inicio_dia != \"\"){\n $this->as19_inicio = $this->as19_inicio_ano.\"-\".$this->as19_inicio_mes.\"-\".$this->as19_inicio_dia;\n }\n }\n if($this->as19_fim == \"\"){\n $this->as19_fim_dia = ($this->as19_fim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_fim_dia\"]:$this->as19_fim_dia);\n $this->as19_fim_mes = ($this->as19_fim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_fim_mes\"]:$this->as19_fim_mes);\n $this->as19_fim_ano = ($this->as19_fim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_fim_ano\"]:$this->as19_fim_ano);\n if($this->as19_fim_dia != \"\"){\n $this->as19_fim = $this->as19_fim_ano.\"-\".$this->as19_fim_mes.\"-\".$this->as19_fim_dia;\n }\n }\n $this->as19_horaaulasdia = ($this->as19_horaaulasdia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_horaaulasdia\"]:$this->as19_horaaulasdia);\n $this->as19_ministrante = ($this->as19_ministrante == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_ministrante\"]:$this->as19_ministrante);\n $this->as19_responsavel = ($this->as19_responsavel == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_responsavel\"]:$this->as19_responsavel);\n }else{\n $this->as19_sequencial = ($this->as19_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as19_sequencial\"]:$this->as19_sequencial);\n }\n }", "function terlambat($tgl_dateline, $tgl_kembali) {\n$tgl_dateline_pcs = explode (\"-\", $tgl_dateline);\n$tgl_dateline_pcs = $tgl_dateline_pcs[2].\"-\".$tgl_dateline_pcs[1].\"-\".$tgl_dateline_pcs[0];\n$tgl_kembali_pcs = explode (\"-\", $tgl_kembali);\n$tgl_kembali_pcs = $tgl_kembali_pcs[2].\"-\".$tgl_kembali_pcs[1].\"-\".$tgl_kembali_pcs[0];\n$selisih = strtotime ($tgl_kembali_pcs) - strtotime ($tgl_dateline_pcs);\n$selisih = $selisih / 86400;\nif ($selisih>=1) {\n\t$hasil_tgl = floor($selisih);\n}\nelse {\n\t$hasil_tgl = 0;\n}\nreturn $hasil_tgl;\n}", "function fncValidaDI_26($IdEstado, $GestorErr, $NumReg, $Campo)\n{\n\t \n\t$Bandera = CERO;\n\n\t$DI_26 = \"(26)Municipio\";\n\t$DI_26_ErrTam = \"Tamaño de campo Municipio debe ser a 3 Dígitos\";\n\t$DI_26_Mpio \t = \"El Municipio no es parte del catalogo de DGRH\";\n\t\n\t// agregar catalogo de Municpios\n\nif($IdEstado == \"01\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\");\n} //fin de if($IdEstado == \"01\")\n\nif($IdEstado == \"02\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\");\n} //fin de if($IdEstado == \"02\")\n\nif($IdEstado == \"03\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"008\",\"009\");\n} //fin de if($IdEstado == \"03\")\n\nif($IdEstado == \"04\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\");\n} //fin de if($IdEstado == \"04\")\n\nif($IdEstado == \"05\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\");\n} //fin de if($IdEstado == \"05\")\n\nif($IdEstado == \"06\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\");\n} //fin de if($IdEstado == \"06\")\n\nif($IdEstado == \"07\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\",\"085\",\"086\",\"087\",\"088\",\"089\",\"090\",\"091\",\"092\",\"093\",\"094\",\"096\",\"097\",\"098\",\"099\",\"100\",\"101\",\"102\",\"103\",\"104\",\"105\",\"106\",\"107\",\"108\",\"109\",\"110\",\"111\",\"112\",\"113\",\"114\",\"115\",\"116\",\"117\",\"118\",\"119\");\n} //fin de if($IdEstado == \"07\")\n\nif($IdEstado == \"08\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\");\n} //fin de if($IdEstado == \"08\")\n\nif($IdEstado == \"09\"){\n\t$Mpio = array(\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\");\n} //fin de if($IdEstado == \"09\")\n\nif($IdEstado == \"10\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\");\n} //fin de if($IdEstado == \"10\")\n\nif($IdEstado == \"11\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\");\n} //fin de if($IdEstado == \"11\")\n\nif($IdEstado == \"12\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\");\n} //fin de if($IdEstado == \"12\")\n\nif($IdEstado == \"13\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\");\n} //fin de if($IdEstado == \"13\")\n\nif($IdEstado == \"14\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\",\"085\",\"086\",\"087\",\"088\",\"089\",\"090\",\"091\",\"092\",\"093\",\"094\",\"095\",\"096\",\"097\",\"098\",\"099\",\"100\",\"101\",\"102\",\"103\",\"104\",\"105\",\"106\",\"107\",\"108\",\"109\",\"110\",\"111\",\"112\",\"113\",\"114\",\"115\",\"116\",\"117\",\"118\",\"119\",\"120\",\"121\",\"122\",\"123\",\"124\",\"125\");\n} //fin de if($IdEstado == \"14\")\n\nif($IdEstado == \"15\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\",\"085\",\"086\",\"087\",\"088\",\"089\",\"090\",\"091\",\"092\",\"093\",\"094\",\"095\",\"096\",\"097\",\"098\",\"099\",\"100\",\"101\",\"102\",\"103\",\"104\",\"105\",\"106\",\"107\",\"108\",\"109\",\"110\",\"111\",\"112\",\"113\",\"114\",\"115\",\"116\",\"117\",\"118\",\"119\",\"120\",\"121\",\"122\",\"123\",\"124\",\"125\");\n} //fin de if($IdEstado == \"15\")\n\nif($IdEstado == \"16\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\",\"085\",\"086\",\"087\",\"088\",\"089\",\"090\",\"091\",\"092\",\"093\",\"094\",\"095\",\"096\",\"097\",\"098\",\"099\",\"100\",\"101\",\"102\",\"103\",\"104\",\"105\",\"106\",\"107\",\"108\",\"108\",\"109\",\"110\",\"111\",\"112\",\"113\");\n} //fin de if($IdEstado == \"16\")\n\nif($IdEstado == \"17\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\");\n} //fin de if($IdEstado == \"17\")\n\nif($IdEstado == \"18\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\");\n} //fin de if($IdEstado == \"18\")\n\nif($IdEstado == \"19\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\");\n} //fin de if($IdEstado == \"19\")\n\nif($IdEstado == \"20\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\",\"085\",\"086\",\"087\",\"088\",\"089\",\"090\",\"091\",\"092\",\"093\",\"094\",\"095\",\"096\",\"097\",\"098\",\"099\",\"100\",\"101\",\"102\",\"103\",\"104\",\"105\",\"106\",\"107\",\"108\",\"109\",\"110\",\"111\",\"112\",\"113\",\"114\",\"115\",\"116\",\"117\",\"118\",\"119\",\"120\",\"121\",\"122\",\"123\",\"124\",\"125\",\"126\",\"127\",\"128\",\"129\",\"130\",\"131\",\"132\",\"133\",\"134\",\"135\",\"136\",\"137\",\"138\",\"139\",\"140\",\"141\",\"142\",\"143\",\"144\",\"145\",\"146\",\"147\",\"148\",\"149\",\"150\",\"151\",\"152\",\"153\",\"154\",\"155\",\"156\",\"157\",\"158\",\"159\",\"160\",\"161\",\"162\",\"163\",\"164\",\"165\",\"166\",\"167\",\"168\",\"169\",\"170\",\"171\",\"172\",\"173\",\"174\",\"175\",\"176\",\"177\",\"178\",\"179\",\"180\",\"181\",\"182\",\"183\",\"184\",\"185\",\"186\",\"187\",\"188\",\"189\",\"190\",\"191\",\"192\",\"193\",\"194\",\"195\",\"196\",\"197\",\"198\",\"199\",\"200\",\"201\",\"202\",\"203\",\"204\",\"205\",\"206\",\"207\",\"208\",\"209\",\"210\",\"211\",\"212\",\"213\",\"214\",\"215\",\"216\",\"217\",\"218\",\"219\",\"220\",\"221\",\"222\",\"223\",\"224\",\"225\",\"226\",\"227\",\"228\",\"229\",\"230\",\"231\",\"232\",\"233\",\"234\",\"235\",\"236\",\"237\",\"238\",\"239\",\"240\",\"241\",\"242\",\"243\",\"244\",\"245\",\"246\",\"247\",\"248\",\"249\",\"250\",\"251\",\"252\",\"253\",\"254\",\"255\",\"256\",\"257\",\"258\",\"259\",\"260\",\"261\",\"262\",\"263\",\"264\",\"265\",\"266\",\"267\",\"268\",\"269\",\"270\",\"271\",\"272\",\"273\",\"274\",\"275\",\"276\",\"277\",\"278\",\"279\",\"280\",\"281\",\"282\",\"283\",\"284\",\"285\",\"286\",\"287\",\"288\",\"289\",\"290\",\"291\",\"292\",\"293\",\"294\",\"295\",\"296\",\"297\",\"298\",\"299\",\"300\",\"301\",\"302\",\"303\",\"304\",\"305\",\"306\",\"307\",\"308\",\"309\",\"310\",\"311\",\"312\",\"313\",\"314\",\"315\",\"316\",\"317\",\"318\",\"319\",\"320\",\"321\",\"322\",\"323\",\"324\",\"325\",\"326\",\"327\",\"328\",\"329\",\"330\",\"331\",\"332\",\"333\",\"334\",\"335\",\"336\",\"337\",\"338\",\"339\",\"340\",\"341\",\"342\",\"343\",\"344\",\"345\",\"346\",\"347\",\"348\",\"349\",\"350\",\"351\",\"352\",\"353\",\"354\",\"355\",\"356\",\"357\",\"358\",\"359\",\"360\",\"361\",\"362\",\"363\",\"364\",\"365\",\"366\",\"367\",\"368\",\"369\",\"370\",\"371\",\"372\",\"373\",\"374\",\"375\",\"376\",\"377\",\"378\",\"379\",\"380\",\"381\",\"382\",\"383\",\"384\",\"385\",\"386\",\"387\",\"388\",\"389\",\"390\",\"391\",\"392\",\"393\",\"394\",\"395\",\"396\",\"397\",\"398\",\"399\",\"400\",\"401\",\"402\",\"403\",\"404\",\"405\",\"406\",\"407\",\"408\",\"409\",\"410\",\"411\",\"412\",\"413\",\"414\",\"415\",\"416\",\"417\",\"418\",\"419\",\"420\",\"421\",\"422\",\"423\",\"424\",\"425\",\"426\",\"427\",\"428\",\"429\",\"430\",\"431\",\"432\",\"433\",\"434\",\"435\",\"436\",\"437\",\"438\",\"439\",\"440\",\"441\",\"442\",\"443\",\"444\",\"445\",\"446\",\"447\",\"448\",\"449\",\"450\",\"451\",\"452\",\"453\",\"454\",\"455\",\"456\",\"457\",\"458\",\"459\",\"460\",\"461\",\"462\",\"463\",\"464\",\"465\",\"466\",\"467\",\"468\",\"469\",\"470\",\"471\",\"472\",\"473\",\"474\",\"475\",\"476\",\"477\",\"478\",\"479\",\"480\",\"481\",\"482\",\"483\",\"484\",\"485\",\"486\",\"487\",\"488\",\"489\",\"490\",\"491\",\"492\",\"493\",\"494\",\"495\",\"496\",\"497\",\"498\",\"499\",\"500\",\"501\",\"502\",\"503\",\"504\",\"505\",\"506\",\"507\",\"508\",\"509\",\"510\",\"511\",\"512\",\"513\",\"514\",\"515\",\"516\",\"517\",\"518\",\"519\",\"520\",\"521\",\"522\",\"523\",\"524\",\"525\",\"526\",\"527\",\"528\",\"529\",\"530\",\"531\",\"532\",\"533\",\"534\",\"535\",\"536\",\"537\",\"538\",\"539\",\"540\",\"541\",\"542\",\"543\",\"544\",\"545\",\"546\",\"547\",\"548\",\"549\",\"550\",\"551\",\"552\",\"553\",\"554\",\"555\",\"556\",\"557\",\"558\",\"559\",\"560\",\"561\",\"562\",\"563\",\"564\",\"565\",\"566\",\"567\",\"568\",\"569\",\"570\");\n} //fin de if($IdEstado == \"20\")\n\nif($IdEstado == \"21\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\",\"085\",\"086\",\"087\",\"088\",\"089\",\"090\",\"091\",\"092\",\"093\",\"094\",\"095\",\"096\",\"097\",\"098\",\"099\",\"100\",\"101\",\"102\",\"103\",\"104\",\"105\",\"106\",\"107\",\"108\",\"109\",\"110\",\"111\",\"112\",\"113\",\"114\",\"115\",\"116\",\"117\",\"118\",\"119\",\"120\",\"121\",\"122\",\"123\",\"124\",\"125\",\"126\",\"127\",\"128\",\"129\",\"130\",\"131\",\"132\",\"133\",\"134\",\"135\",\"136\",\"137\",\"138\",\"139\",\"140\",\"141\",\"142\",\"143\",\"144\",\"145\",\"146\",\"147\",\"148\",\"149\",\"150\",\"151\",\"152\",\"153\",\"154\",\"155\",\"156\",\"157\",\"158\",\"159\",\"160\",\"161\",\"162\",\"163\",\"164\",\"165\",\"166\",\"167\",\"168\",\"169\",\"170\",\"171\",\"172\",\"173\",\"174\",\"175\",\"176\",\"177\",\"178\",\"179\",\"180\",\"181\",\"182\",\"183\",\"184\",\"185\",\"186\",\"187\",\"188\",\"189\",\"190\",\"191\",\"192\",\"193\",\"194\",\"195\",\"196\",\"197\",\"198\",\"199\",\"200\",\"201\",\"202\",\"203\",\"204\",\"205\",\"206\",\"207\",\"208\",\"209\",\"210\",\"211\",\"212\",\"213\",\"214\",\"215\",\"216\",\"217\");\n} //fin de if($IdEstado == \"21\")\n\nif($IdEstado == \"22\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\");\n} //fin de if($IdEstado == \"22\")\n\nif($IdEstado == \"23\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\");\n} //fin de if($IdEstado == \"23\")\n\nif($IdEstado == \"24\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\");\n} //fin de if($IdEstado == \"24\")\n\nif($IdEstado == \"25\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\");\n} //fin de if($IdEstado == \"25\")\n\nif($IdEstado == \"26\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\");\n} //fin de if($IdEstado == \"26\")\n\nif($IdEstado == \"27\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\");\n} //fin de if($IdEstado == \"27\")\n\nif($IdEstado == \"28\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\");\n} //fin de if($IdEstado == \"28\")\n\nif($IdEstado == \"29\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\");\n} //fin de if($IdEstado == \"29\")\n\nif($IdEstado == \"30\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\",\"085\",\"086\",\"087\",\"088\",\"089\",\"090\",\"091\",\"092\",\"093\",\"094\",\"095\",\"096\",\"097\",\"098\",\"099\",\"100\",\"101\",\"102\",\"103\",\"104\",\"105\",\"106\",\"107\",\"108\",\"109\",\"110\",\"111\",\"112\",\"113\",\"114\",\"115\",\"116\",\"117\",\"118\",\"119\",\"120\",\"121\",\"122\",\"123\",\"124\",\"125\",\"126\",\"127\",\"128\",\"129\",\"130\",\"131\",\"132\",\"133\",\"134\",\"135\",\"136\",\"137\",\"138\",\"139\",\"140\",\"141\",\"142\",\"143\",\"144\",\"145\",\"146\",\"147\",\"148\",\"149\",\"150\",\"151\",\"152\",\"153\",\"154\",\"155\",\"156\",\"157\",\"158\",\"159\",\"160\",\"161\",\"162\",\"163\",\"164\",\"165\",\"166\",\"167\",\"168\",\"169\",\"170\",\"171\",\"172\",\"173\",\"174\",\"175\",\"176\",\"177\",\"178\",\"179\",\"180\",\"181\",\"182\",\"183\",\"184\",\"185\",\"186\",\"187\",\"188\",\"189\",\"190\",\"191\",\"192\",\"193\",\"194\",\"195\",\"196\",\"197\",\"198\",\"199\",\"200\",\"201\",\"202\",\"203\",\"204\",\"205\",\"206\",\"207\",\"208\",\"209\",\"210\",\"211\",\"212\");\n} //fin de if($IdEstado == \"30\")\n\nif($IdEstado == \"31\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\",\"059\",\"060\",\"061\",\"062\",\"063\",\"064\",\"065\",\"066\",\"067\",\"068\",\"069\",\"070\",\"071\",\"072\",\"073\",\"074\",\"075\",\"076\",\"077\",\"078\",\"079\",\"080\",\"081\",\"082\",\"083\",\"084\",\"085\",\"086\",\"087\",\"088\",\"089\",\"090\",\"091\",\"092\",\"093\",\"094\",\"095\",\"096\",\"097\",\"098\",\"099\",\"100\",\"101\",\"102\",\"103\",\"104\",\"105\",\"106\");\n} //fin de if($IdEstado == \"31\")\n\nif($IdEstado == \"32\"){\n\t$Mpio = array(\"001\",\"002\",\"003\",\"004\",\"005\",\"006\",\"007\",\"008\",\"009\",\"010\",\"011\",\"012\",\"013\",\"014\",\"015\",\"016\",\"017\",\"018\",\"019\",\"020\",\"021\",\"022\",\"023\",\"024\",\"025\",\"026\",\"027\",\"028\",\"029\",\"030\",\"031\",\"032\",\"033\",\"034\",\"035\",\"036\",\"037\",\"038\",\"039\",\"040\",\"041\",\"042\",\"043\",\"044\",\"045\",\"046\",\"047\",\"048\",\"049\",\"050\",\"051\",\"052\",\"053\",\"054\",\"055\",\"056\",\"057\",\"058\");\n} //fin de if($IdEstado == \"32\")\n\n\n\n\n\t$LocCampo =$Campo;\n\tif (strlen($LocCampo) == TRES)\n\t{\n\t\tif(!in_array($LocCampo,$Mpio))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_26.\"|\".$LocCampo.\"|\" . $DI_26_Mpio.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = UNO;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_26.\"|\".$LocCampo.\"|\" . $DI_26_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = UNO;\n\t}\n\treturn $Bandera;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->tf33_i_codigo = ($this->tf33_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_i_codigo\"]:$this->tf33_i_codigo);\n $this->tf33_i_login = ($this->tf33_i_login == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_i_login\"]:$this->tf33_i_login);\n $this->tf33_i_fechamento = ($this->tf33_i_fechamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_i_fechamento\"]:$this->tf33_i_fechamento);\n $this->tf33_c_nomearquivo = ($this->tf33_c_nomearquivo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_c_nomearquivo\"]:$this->tf33_c_nomearquivo);\n if($this->tf33_d_datasistema == \"\"){\n $this->tf33_d_datasistema_dia = ($this->tf33_d_datasistema_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_d_datasistema_dia\"]:$this->tf33_d_datasistema_dia);\n $this->tf33_d_datasistema_mes = ($this->tf33_d_datasistema_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_d_datasistema_mes\"]:$this->tf33_d_datasistema_mes);\n $this->tf33_d_datasistema_ano = ($this->tf33_d_datasistema_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_d_datasistema_ano\"]:$this->tf33_d_datasistema_ano);\n if($this->tf33_d_datasistema_dia != \"\"){\n $this->tf33_d_datasistema = $this->tf33_d_datasistema_ano.\"-\".$this->tf33_d_datasistema_mes.\"-\".$this->tf33_d_datasistema_dia;\n }\n }\n $this->tf33_c_horasistema = ($this->tf33_c_horasistema == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_c_horasistema\"]:$this->tf33_c_horasistema);\n $this->tf33_o_arquivo = ($this->tf33_o_arquivo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_o_arquivo\"]:$this->tf33_o_arquivo);\n }else{\n $this->tf33_i_codigo = ($this->tf33_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tf33_i_codigo\"]:$this->tf33_i_codigo);\n }\n }", "function agrega_emergencia_ctraslado (\n $_fecha,$_telefono,\n $_plan,$_horallam,\n $_socio,$_nombre,\n $_tiposocio,$_edad,$_sexo,\n $_identificacion,$_documento,\n $_calle,$_numero,\n $_piso,$_depto,\n $_casa,$_monoblok,\n $_barrio,$_entre1,\n $_entre2,$_localidad,\n $_referencia,$_zona,\n $_motivo1,\n $_color,\n $_observa1,$_observa2,\n $_opedesp ,\n\t\t\t\t\t\t\t$_nosocio1 , $_noedad1 , $_nosexo1, $_noiden1 , $_nodocum1 ,\n\t\t\t\t\t\t\t$_nosocio2 , $_noedad2 , $_nosexo2, $_noiden2 , $_nodocum2 ,\n\t\t\t\t\t\t\t$_nosocio3 , $_noedad3 , $_nosexo3, $_noiden3 , $_nodocum3 ,\n\t\t\t\t\t\t\t$_nosocio4 , $_noedad4 , $_nosexo4, $_noiden4 , $_nodocum4 ,\n\t\t\t\t\t\t\t$_nosocio5 , $_noedad5 , $_nosexo5, $_noiden5 , $_nodocum5 ,\n $_bandera_nosocio1 ,$_bandera_nosocio2 ,$_bandera_nosocio3 ,$_bandera_nosocio4 ,\n\t\t\t\t\t\t\t$_bandera_nosocio5 \n )\n{\n $moti_explode ['0'] = substr($_motivo1, 0, 1);\n $moti_explode ['1'] = substr($_motivo1, 1, 2);\n\n // CALCULO DE FECHA Y DIA EN QUE SE MUESTRA EL TRASLADO EN PANTALLA\n $fecha_aux = explode (\".\" ,$_fecha );\n $hora_aux = explode (\":\" ,$_horallam);\n\n $_dia_tr =$fecha_aux[2];\n $_mes_tr =$fecha_aux[1];\n $_anio_tr =$fecha_aux[0];\n $_hora_tr =$hora_aux[0];\n $_min_tr =$hora_aux[1];\n $_param_tr =12; // parametro para mostrar en pantalla\n \n $traslado_aux = restaTimestamp ($_dia_tr , $_mes_tr, $_anio_tr , $_hora_tr , $_min_tr , $_param_tr);\n //***********************************************************\n $_plan = $_plan + 0;\n $insert_atencion = '\n insert into atenciones_temp\n (fecha,telefono,plan,\n horallam,socio,\n nombre,tiposocio,\n edad,sexo,\n identificacion,documento,\n calle,numero,\n piso,depto,casa,\n monoblok,barrio,\n entre1,entre2,\n localidad,referencia,\n zona,motivo1,\n motivo2,\n color,observa1,\n observa2,operec,traslado_aux ,fechallam)\n\n values\n\n (\n \"'.$_fecha.'\" , \"'.$_telefono.'\" , \"'.$_plan.'\" ,\n \"'.$_horallam.'\",\"'.$_socio.'\",\n \"'.utf8_decode($_nombre).'\",\"'.$_tiposocio.'\",\n \"'.$_edad.'\",\"'.$_sexo.'\",\n \"'.utf8_decode($_identificacion).'\",\"'.$_documento.'\",\n \"'.utf8_decode($_calle).'\",\"'.utf8_decode($_numero).'\",\n \"'.utf8_decode($_piso).'\",\"'.utf8_decode($_depto).'\",\n \"'.utf8_decode($_casa).'\",\"'.utf8_decode($_monoblok).'\",\n \"'.utf8_decode($_barrio).'\",\"'.utf8_decode($_entre1).'\",\n \"'.utf8_decode($_entre2).'\",\"'.utf8_decode($_localidad).'\",\n \"'.utf8_decode($_referencia).'\",\"'.$_zona.'\",\n '.$moti_explode[0].',\n '.$moti_explode[1].','.$_color.',\n \"'.utf8_decode($_observa1).'\",\"'.utf8_decode($_observa2).'\",\n \"'.utf8_decode($_opedesp).'\", \"'.$traslado_aux.'\" , \"'.$_fecha.'\"\n )\n ';\n\n // insert de la emergencia en atenciones temp\n global $G_legajo , $parametros_js;\n $result = mysql_query($insert_atencion);\n if (!$result) {\n $boton = '<input type=\"button\" value=\"Error! modificar y presionar nuevamente\"\n\t\t\t onclick=\" check_emergencia(\n\t\t\t document.formulario.muestra_fecha.value,document.formulario.telefono.value,\n\t\t\t document.formulario.i_busca_plan.value,document.formulario.hora.value,\n\t\t\t document.formulario.td_padron_idpadron.value,document.formulario.td_padron_nombre.value,\n\t\t\t document.formulario.td_padron_tiposocio.value,document.formulario.td_padron_edad.value,\n\t\t\t document.formulario.td_padron_sexo.value,document.formulario.td_padron_identi.value,\n\t\t\t document.formulario.td_padron_docum.value,document.formulario.td_padron_calle.value,\n\t\t\t document.formulario.td_padron_nro.value,document.formulario.td_padron_piso.value,\n\t\t\t document.formulario.td_padron_depto.value,document.formulario.td_padron_casa.value,\n\t\t\t document.formulario.td_padron_mon.value,document.formulario.td_padron_barrio.value,\n\t\t\t document.formulario.td_padron_entre1.value,document.formulario.td_padron_entre2.value,\n\t\t\t document.formulario.td_padron_localidad.value,document.formulario.referencia.value,\n\t\t\t document.formulario.s_lista_zonas.value,document.formulario.i_busca_motivos.value,\n\t\t\t document.formulario.s_lista_colores.value,document.formulario.obs1.value,\n\t\t\t document.formulario.obs2.value,'.$G_legajo.' ,\n\t\t\t document.formulario.check_traslado.value , document.formulario.dia_traslado.value ,\n\t\t\t document.formulario.mes_traslado.value , document.formulario.anio_traslado.value ,\n\t\t\t document.formulario.hora_traslado.value , document.formulario.minuto_traslado.value ,\n\t\t\t\t\t '.$parametros_js.' \n \t );\"/> ';\n \n }else \n {\n $boton = '<input type=\"button\" value=\"CERRAR CON EXITO\" onclick=\"window.close();\"/>';\n \n\n\n\t // recupero id para hacer altas de clientes no apadronados\n\t $consulta_id = mysql_query ('select id from atenciones_temp\n\t where fecha = \"'.$_fecha.'\" and plan = \"'.$_plan.'\"\n\t and horallam = \"'.$_horallam.'\" and nombre = \"'.$_nombre.'\"\n\t and tiposocio = \"'.$_tiposocio.'\" and motivo1 = '.$moti_explode[0].'\n\t and motivo2 = '.$moti_explode[1]);\n\n\n\t $fetch_idatencion=mysql_fetch_array($consulta_id);\n\n\n\t\tif ($_bandera_nosocio1 == 1) { $insert_nosocio1 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio1.'\" , \"'.$_noedad1.'\" , \"'.$_nosexo1.'\" , \"'.$_noiden1.'\" , \"'.$_nodocum1.'\" ) '); }\n\t\tif ($_bandera_nosocio2 == 1) { $insert_nosocio2 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio2.'\" , \"'.$_noedad2.'\" , \"'.$_nosexo2.'\" , \"'.$_noiden2.'\" , \"'.$_nodocum2.'\" ) '); }\n\t\tif ($_bandera_nosocio3 == 1) { $insert_nosocio3 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio3.'\" , \"'.$_noedad3.'\" , \"'.$_nosexo3.'\" , \"'.$_noiden3.'\" , \"'.$_nodocum3.'\" ) '); }\n\t\tif ($_bandera_nosocio4 == 1) { $insert_nosocio4 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio4.'\" , \"'.$_noedad4.'\" , \"'.$_nosexo4.'\" , \"'.$_noiden4.'\" , \"'.$_nodocum4.'\" ) '); }\n\t\tif ($_bandera_nosocio5 == 1) { $insert_nosocio5 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio5.'\" , \"'.$_noedad5.'\" , \"'.$_nosexo5.'\" , \"'.$_noiden5.'\" , \"'.$_nodocum5.'\" ) '); }\n }\n // mysql_query($insert_atencion);\n $insert_atencion='';\n //$insert_atencion='';\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n //escribimos en la capa con id=\"respuesta\" el texto que aparece en $salida\n $respuesta->addAssign(\"mensaje_agrega\",\"innerHTML\",$boton);\n\n //tenemos que devolver la instanciaci�n del objeto xajaxResponse\n return $respuesta;\n}", "function absen_tgl($id,$tgl,$bln,$thn)\n{\n\t$data = strtotime(date(\"Y-m-d\"));\n\t$date = date(\"$thn-$bln-$tgl\");\n\tif($data == strtotime($date))\n\t\t$minus = \"\";\n\telse \n\t\t$minus = \"and (jam_keluar is not null and jam_masuk is not null) \";\n\t$t=mysql_query(\"SELECT count(id_absen) as total, keterangan_hadir as hadir FROM absen WHERE id_karyawan='$id' and tanggal_absen='$thn-$bln-$tgl' $minus \") or die(alert_error(mysql_error()));\n\t\n\t$q=mysql_fetch_array($t);\n\tif(mysql_num_rows($t)>0)\n\t{\n\t\tif(@$q['hadir']=='')\n\t\t\t$status=$q['total'];\n\t\telse if(@$q['hadir']=='sakit')\n\t\t\t$status=\"S\";\n\t\telse if(@$q['hadir']=='alfa')\n\t\t\t$status=-1;\n\t\telse if(@$q['hadir']=='izin')\n\t\t\t$status=\"I\";\n\t\telse if(@$q['hadir']=='skd')\n\t\t\t$status=\"skd\";\n\t\telse if(@$q['hadir']=='spd')\n\t\t\t$status=\"spd\";\n\t\telse if(@$q['hadir']=='pulang' || @$q['hadir']=='pulang_libur' || @$q['hadir']=='masuk_setengah_hari')\n\t\t\t$status=\"0.5\";\n\t\telse if(@$q['hadir']=='libur')\n\t\t\t$status=\"lbr\";\n\t\telse if(@$q['hadir']=='out')\n\t\t\t$status=\"out\";\n\t\telse if(@$q['hadir']=='off')\n\t\t\t$status=\"off\";\n\t\telse\n\t\t\t$status=0;\n\n\t}\n\telse\n\t\t$status=0;\n\t\n\treturn $status;\n\t\n\t\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->pc31_orcamforne = ($this->pc31_orcamforne == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_orcamforne\"]:$this->pc31_orcamforne);\n $this->pc31_nomeretira = ($this->pc31_nomeretira == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_nomeretira\"]:$this->pc31_nomeretira);\n if($this->pc31_dtretira == \"\"){\n $this->pc31_dtretira_dia = ($this->pc31_dtretira_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_dtretira_dia\"]:$this->pc31_dtretira_dia);\n $this->pc31_dtretira_mes = ($this->pc31_dtretira_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_dtretira_mes\"]:$this->pc31_dtretira_mes);\n $this->pc31_dtretira_ano = ($this->pc31_dtretira_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_dtretira_ano\"]:$this->pc31_dtretira_ano);\n if($this->pc31_dtretira_dia != \"\"){\n $this->pc31_dtretira = $this->pc31_dtretira_ano.\"-\".$this->pc31_dtretira_mes.\"-\".$this->pc31_dtretira_dia;\n }\n }\n $this->pc31_horaretira = ($this->pc31_horaretira == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_horaretira\"]:$this->pc31_horaretira);\n $this->pc31_liclicitatipoempresa = ($this->pc31_liclicitatipoempresa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_liclicitatipoempresa\"]:$this->pc31_liclicitatipoempresa);\n $this->pc31_tipocondicao = ($this->pc31_tipocondicao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_tipocondicao\"]:$this->pc31_tipocondicao);\n }else{\n $this->pc31_orcamforne = ($this->pc31_orcamforne == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"pc31_orcamforne\"]:$this->pc31_orcamforne);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->at36_sequencia = ($this->at36_sequencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_sequencia\"]:$this->at36_sequencia);\n $this->at36_tarefa = ($this->at36_tarefa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_tarefa\"]:$this->at36_tarefa);\n $this->at36_usuario = ($this->at36_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_usuario\"]:$this->at36_usuario);\n if($this->at36_data == \"\"){\n $this->at36_data_dia = ($this->at36_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_data_dia\"]:$this->at36_data_dia);\n $this->at36_data_mes = ($this->at36_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_data_mes\"]:$this->at36_data_mes);\n $this->at36_data_ano = ($this->at36_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_data_ano\"]:$this->at36_data_ano);\n if($this->at36_data_dia != \"\"){\n $this->at36_data = $this->at36_data_ano.\"-\".$this->at36_data_mes.\"-\".$this->at36_data_dia;\n }\n }\n $this->at36_hora = ($this->at36_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_hora\"]:$this->at36_hora);\n $this->at36_ip = ($this->at36_ip == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_ip\"]:$this->at36_ip);\n $this->at36_tipo = ($this->at36_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_tipo\"]:$this->at36_tipo);\n }else{\n $this->at36_sequencia = ($this->at36_sequencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at36_sequencia\"]:$this->at36_sequencia);\n }\n }", "function analisisK($perangkaan, $jadual, $key, $data)\n{\n\t$sv = $perangkaan['sv'];\n\t$hasil = $perangkaan['hasil'];\n\t$belanja = $perangkaan['belanja'];\n\t$aset = $perangkaan['aset'];\n\t$sewa = $perangkaan['asetsewa'];\n\t$noKey = substr($key, 0, 3);\n\t//echo \"<hr>$key : $sewaHarta \";\n\t\n\tif (in_array($key, array('thn','batch','Estab') ) )\n\t{\n\t\t$value = $data;\n\t\t\n\t}\n\telseif ($sv=='205') \n\t{//untuk survey 205 sahaja\n\t\tif ($jadual == 'q04_2010' && $noKey == 'F09') \n\t\t\t$nilai = ($sewa==0) ? 0 : (($data / $sewa) * 100);\n\t\telseif ($jadual == 'q04_2010' && $noKey != 'F09') \n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100);\n\t\telseif ($jadual == 'q08_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 'q09_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $sv . '_' . $jadual . '[' . $key . ']\"';\n\t}\n\telse\n\t{\n\t\tif ($jadual == 's'.$sv.'_q02_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q03_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q04_2010')\n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $jadual . '[' . $key . ']\"';\n\n\t}\n\t// istihar pembolehubah \n\t$input = '<input type=\"text\" ' . $name . ' value=\"' \n\t\t . $data . '\" class=\"input-large\">' . $value;\n\treturn '<td>' . $input . '</td>' . \"\\r\";\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh105_sequencial = ($this->rh105_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_sequencial\"]:$this->rh105_sequencial);\n if($this->rh105_dtgeracao == \"\"){\n $this->rh105_dtgeracao_dia = @$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_dtgeracao_dia\"];\n $this->rh105_dtgeracao_mes = @$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_dtgeracao_mes\"];\n $this->rh105_dtgeracao_ano = @$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_dtgeracao_ano\"];\n if($this->rh105_dtgeracao_dia != \"\"){\n $this->rh105_dtgeracao = $this->rh105_dtgeracao_ano.\"-\".$this->rh105_dtgeracao_mes.\"-\".$this->rh105_dtgeracao_dia;\n }\n }\n if($this->rh105_dtdeposito == \"\"){\n $this->rh105_dtdeposito_dia = @$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_dtdeposito_dia\"];\n $this->rh105_dtdeposito_mes = @$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_dtdeposito_mes\"];\n $this->rh105_dtdeposito_ano = @$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_dtdeposito_ano\"];\n if($this->rh105_dtdeposito_dia != \"\"){\n $this->rh105_dtdeposito = $this->rh105_dtdeposito_ano.\"-\".$this->rh105_dtdeposito_mes.\"-\".$this->rh105_dtdeposito_dia;\n }\n }\n $this->rh105_codarq = ($this->rh105_codarq == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_codarq\"]:$this->rh105_codarq);\n $this->rh105_codbcofebraban = ($this->rh105_codbcofebraban == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_codbcofebraban\"]:$this->rh105_codbcofebraban);\n $this->rh105_tipoarq = ($this->rh105_tipoarq == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_tipoarq\"]:$this->rh105_tipoarq);\n $this->rh105_folha = ($this->rh105_folha == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_folha\"]:$this->rh105_folha);\n $this->rh105_arquivotxt = ($this->rh105_arquivotxt == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_arquivotxt\"]:$this->rh105_arquivotxt);\n $this->rh105_instit = ($this->rh105_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_instit\"]:$this->rh105_instit);\n }else{\n $this->rh105_sequencial = ($this->rh105_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh105_sequencial\"]:$this->rh105_sequencial);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->c60_codcon = ($this->c60_codcon == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_codcon\"]:$this->c60_codcon);\n $this->c60_anousu = ($this->c60_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_anousu\"]:$this->c60_anousu);\n $this->c60_estrut = ($this->c60_estrut == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_estrut\"]:$this->c60_estrut);\n $this->c60_descr = ($this->c60_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_descr\"]:$this->c60_descr);\n $this->c60_finali = ($this->c60_finali == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_finali\"]:$this->c60_finali);\n $this->c60_codsis = ($this->c60_codsis == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_codsis\"]:$this->c60_codsis);\n $this->c60_codcla = ($this->c60_codcla == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_codcla\"]:$this->c60_codcla);\n $this->c60_consistemaconta = ($this->c60_consistemaconta == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_consistemaconta\"]:$this->c60_consistemaconta);\n $this->c60_identificadorfinanceiro = ($this->c60_identificadorfinanceiro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_identificadorfinanceiro\"]:$this->c60_identificadorfinanceiro);\n $this->c60_naturezasaldo = ($this->c60_naturezasaldo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_naturezasaldo\"]:$this->c60_naturezasaldo);\n $this->c60_funcao = ($this->c60_funcao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_funcao\"]:$this->c60_funcao);\n }else{\n $this->c60_codcon = ($this->c60_codcon == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_codcon\"]:$this->c60_codcon);\n $this->c60_anousu = ($this->c60_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c60_anousu\"]:$this->c60_anousu);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->s158_i_codigo = ($this->s158_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_i_codigo\"]:$this->s158_i_codigo);\n $this->s158_i_profissional = ($this->s158_i_profissional == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_i_profissional\"]:$this->s158_i_profissional);\n $this->s158_i_tiporeceita = ($this->s158_i_tiporeceita == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_i_tiporeceita\"]:$this->s158_i_tiporeceita);\n $this->s158_t_prescricao = ($this->s158_t_prescricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_t_prescricao\"]:$this->s158_t_prescricao);\n $this->s158_i_situacao = ($this->s158_i_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_i_situacao\"]:$this->s158_i_situacao);\n if($this->s158_d_validade == \"\"){\n $this->s158_d_validade_dia = ($this->s158_d_validade_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_d_validade_dia\"]:$this->s158_d_validade_dia);\n $this->s158_d_validade_mes = ($this->s158_d_validade_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_d_validade_mes\"]:$this->s158_d_validade_mes);\n $this->s158_d_validade_ano = ($this->s158_d_validade_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_d_validade_ano\"]:$this->s158_d_validade_ano);\n if($this->s158_d_validade_dia != \"\"){\n $this->s158_d_validade = $this->s158_d_validade_ano.\"-\".$this->s158_d_validade_mes.\"-\".$this->s158_d_validade_dia;\n }\n }\n $this->s158_i_login = ($this->s158_i_login == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_i_login\"]:$this->s158_i_login);\n if($this->s158_d_data == \"\"){\n $this->s158_d_data_dia = ($this->s158_d_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_d_data_dia\"]:$this->s158_d_data_dia);\n $this->s158_d_data_mes = ($this->s158_d_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_d_data_mes\"]:$this->s158_d_data_mes);\n $this->s158_d_data_ano = ($this->s158_d_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_d_data_ano\"]:$this->s158_d_data_ano);\n if($this->s158_d_data_dia != \"\"){\n $this->s158_d_data = $this->s158_d_data_ano.\"-\".$this->s158_d_data_mes.\"-\".$this->s158_d_data_dia;\n }\n }\n $this->s158_c_hora = ($this->s158_c_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_c_hora\"]:$this->s158_c_hora);\n }else{\n $this->s158_i_codigo = ($this->s158_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"s158_i_codigo\"]:$this->s158_i_codigo);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh95_sequencial = ($this->rh95_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_sequencial\"]:$this->rh95_sequencial);\n $this->rh95_id_usuario = ($this->rh95_id_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_id_usuario\"]:$this->rh95_id_usuario);\n $this->rh95_ano = ($this->rh95_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_ano\"]:$this->rh95_ano);\n if($this->rh95_datageracao == \"\"){\n $this->rh95_datageracao_dia = ($this->rh95_datageracao_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_datageracao_dia\"]:$this->rh95_datageracao_dia);\n $this->rh95_datageracao_mes = ($this->rh95_datageracao_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_datageracao_mes\"]:$this->rh95_datageracao_mes);\n $this->rh95_datageracao_ano = ($this->rh95_datageracao_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_datageracao_ano\"]:$this->rh95_datageracao_ano);\n if($this->rh95_datageracao_dia != \"\"){\n $this->rh95_datageracao = $this->rh95_datageracao_ano.\"-\".$this->rh95_datageracao_mes.\"-\".$this->rh95_datageracao_dia;\n }\n }\n $this->rh95_fontepagadora = ($this->rh95_fontepagadora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_fontepagadora\"]:$this->rh95_fontepagadora);\n }else{\n $this->rh95_sequencial = ($this->rh95_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_sequencial\"]:$this->rh95_sequencial);\n }\n }", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "function Recalcular_Monto_Compra($idcompra){\n//echo \"idcompra=\".$idcompra;\n\t$datoscompra\t\t=\tregistro( runsql(\"select fecha from compras where id_compra='$idcompra'\") );\n\t$datoscompradet\t\t=\trunsql(\"select total,moneda from compras_det where id_compra='$idcompra';\");\n\t$tcUSD\t=\tTipoCambio('USD',$datoscompra[fecha]);\n\t$tcEUR\t=\tTipoCambio('EUR',$datoscompra[fecha]);\n\t$tcQUE\t=\t1;\n\t$Monto_Compra=0;$SubMonto=0;\n\twhile($i=registro($datoscompradet)){\n\t\tswitch($i[moneda]){\n\t\t\tcase \"USD\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcUSD;\n\t\t\tbreak;\n\t\t\tcase \"EUR\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcEUR;\n\t\t\tbreak;\t\n\t\t\tcase \"QUE\":\n\t\t\t\t$SubMonto\t=\t$i[total]*$tcQUE;\n\t\t\tbreak;\t\t\t\t\t\n\t\t}\n\t\t$Monto_Compra\t=\t$Monto_Compra + $SubMonto;\n\t\t$SubMonto\t\t=\t0;\n\t}\n\t$campos3=Array();\n $campos3[monto]\t=\t$Monto_Compra;\n\t$ins=actualizar(\"compras\",$campos3,\"id_compra = '$idcompra'\");\n}", "function f_obj($individu){\n\t\t$cluster = count($individu); //menghitung jumlah cluster berdasarkan individu\n\t\t$target = 10;\n\t\t$hasil = 0;\n\t\tfor ($i=0; $i < $cluster; $i++) { \n\t\t\t$hasil += $individu[$i];\n\t\t}\n\n\t\t$evaluasi = abs($hasil - $target);\n\t\treturn $evaluasi; //nilai fitness masih 0-10\n\t}", "function history_aset($kodesatker, $aset_id, $tglakhirperolehan, $tglawalperolehan, $tglpembukuan, $kodeKelompok)\n{\n $query_riwayat = \"select * from ref_riwayat order by kd_riwayat asc\";\n $RIWAYAT = array();\n $sql_riwayat = mysql_query ($query_riwayat);\n while ($row = mysql_fetch_array ($sql_riwayat)) {\n $RIWAYAT[ $row[ Kd_Riwayat ] ] = $row[ Nm_Riwayat ];\n }\n\n if($aset_id != \"\") {\n $ex = explode ('.', $kodeKelompok);\n $param = $ex[ '0' ];\n\n $getdataRwyt = getdataRwyt ($kodesatker, $aset_id, $tglakhirperolehan, $tglawalperolehan, $param, $tglpembukuan);\n //pr($getdataRwyt);\n\n $status_masuk_penyusutan = 0;\n $flag_penyusutan = 0;\n\n $BEBAN_PENYUSUTAN = 0;\n $MUTASI_ASET_PENAMBAHAN = 0;\n $MUTASI_ASET_KURANG = 0;\n $MUTASI_AKM_PENAMBAHAN = 0;\n $MUTASI_AKM_PENGURANG = 0;\n\n foreach ($getdataRwyt as $valRwyt) {\n $tglFormat = $new_date = date ('d-m-Y ', strtotime ($valRwyt->TglPerubahan));\n $tahun_penyusutan = $valRwyt->TahunPenyusutan;\n\n $tgl_perubahan_sistem = $valRwyt->TglPerubahan;\n $tmp_tahun = explode (\"-\", $tgl_perubahan_sistem);\n $tahun_penyusutan_log = $tmp_tahun[ 0 ];\n if($tahun_penyusutan_log == $tahun_penyusutan)\n $tahun_penyusutan_log = $tahun_penyusutan_log - 1;\n\n $tahun_perolehan = $valRwyt->Tahun;\n $rentang_penyusutan = $tahun_penyusutan_log - $tahun_perolehan + 1;\n $tmp_kode = explode (\".\", $kodeKelompok);\n $masa_manfaat = $valRwyt->MasaManfaat;//$this->cek_masamanfaat($tmp_kode[0], $tmp_kode[1], $tmp_kode[2]);\n\n //akhir rentang waktu\n $newtglFormat = str_replace (\"-\", \"/\", $tglFormat);\n // pr($newtglFormat);\n // exit;\n $Riwayat = get_NamaRiwayat ($valRwyt->Kd_Riwayat);\n $paramKd_Rwyt = $valRwyt->Kd_Riwayat;\n $kodeKelompok = $valRwyt->kodeKelompok;\n\n //cek tgl u/info\n /*$ex_tgl_filter = explode('-',$valRwyt->TglPerubahan);\n $tahun = $ex_tgl_filter[0];\n $tahun_pnystn = $valRwyt->TahunPenyusutan;\n if($tahun_pnystn == 0){\n $Info = '';\n }elseif($tahun_pnystn < $tahun){\n if($paramKd_Rwyt == 0 || $paramKd_Rwyt == 2 || $paramKd_Rwyt == 7 || $paramKd_Rwyt == 21 || $paramKd_Rwyt == 28){\n $Info = \"Belum Dilakukan Koreksi Penyusutan\";\n }else{\n $Info = \"\";\n }\n }else{\n $Info = \"\";\n }*/\n //echo \"--$aset_id--$paramKd_Rwyt <br/>\";\n\n if($paramKd_Rwyt == 0 ||$paramKd_Rwyt == 30|| $paramKd_Rwyt == 2||$paramKd_Rwyt == 281 ||$paramKd_Rwyt == 291 || $paramKd_Rwyt == 7 || $paramKd_Rwyt == 21 || $paramKd_Rwyt == 29) {\n /*\n Kode Riwayat\n 0 = Data baru\n 2 = Ubah Kapitalisasi\n 7 = Penghapusan Sebagian\n 21 = Koreksi Nilai\n 26 = Penghapusan Pemindahtanganan\n 27 = Penghapusan Pemusnahan\n */\n //$status_masuk_penyusutan=1;\n if($paramKd_Rwyt != 0 && $paramKd_Rwyt!=30 )\n $cekSelisih = ($valRwyt->NilaiPerolehan - $valRwyt->NilaiPerolehan_Awal);\n else\n {\n $Status_Validasi_barang=$valRwyt->Status_Validasi_barang;\n if($paramKd_Rwyt==30&&$Status_Validasi_barang==0)\n { $cekSelisih = $valRwyt->NilaiPerolehan ;\n }else if($paramKd_Rwyt==30&&$Status_Validasi_barang==1){\n $cekSelisih = -1*$valRwyt->NilaiPerolehan ;\n }else{\n $cekSelisih = $valRwyt->NilaiPerolehan ;\n }\n }\n if($cekSelisih >= 0) {\n //mutasi tambah\n if($cekSelisih == 0) {\n $valAdd = 0;\n $valSubstAp = 0;\n //SALDO AWAL\n $nilaiAwalPrlhn = 0;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan_Awal;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n } else {\n $valAdd = $cekSelisih;\n $valSubstAp = $valRwyt->AkumulasiPenyusutan - $valRwyt->AkumulasiPenyusutan_Awal;\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan_Awal;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan_Awal;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n }\n //echo \"<br/>tambah $aset_id ==$valAdd {$valRwyt->NilaiPerolehan} - {$valRwyt->NilaiPerolehan_Awal}<br/>\";\n //MUTASI ASET (Bertambah)\n $flag = \"(+)\";\n if($paramKd_Rwyt == 0 && $valRwyt->kodeSatker!=$kodesatker)\n { $nilaiPrlhnMutasiTambah = 0;\n }\n else{\n $nilaiPrlhnMutasiTambah = $valAdd;\n }\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $valSubst = 0;\n $nilaiPrlhnMutasiKurang = $valSubst;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = 0;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n /* if($valSubstAp!=0 && $paramKd_Rwyt==21)//artinya ada penyusutan\n {\n $valSubstAp=(abs($cekSelisih)/$masa_manfaat)*$rentang_penyusutan;\n }else $valSubstAp=0;*/\n $valSubstAp = $valRwyt->AkumulasiPenyusutan - $valRwyt->AkumulasiPenyusutan_Awal;\n $penyusutanBertambah = $valSubstAp;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n // menghilangkan nilai akumulasi penyusutan bertambah\n if($paramKd_Rwyt == 2 ||$paramKd_Rwyt == 0)\n $penyusutanBertambahFix=0;\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $valRwyt->NilaiPerolehan;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan + $penyusutanBertambah;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $nilaiPerolehanHasilMutasi - $AkumulasiPenyusutanHasilMutasi;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n } else {\n $flag = \"(-)\";\n $valSubstAp = $valRwyt->AkumulasiPenyusutan_Awal - $valRwyt->AkumulasiPenyusutan;\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan_Awal;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan_Awal;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n\n //MUTASI ASET (Bertambah)\n $valAdd = 0;\n $nilaiPrlhnMutasiTambah = $valAdd;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $valSubst = abs ($cekSelisih);\n $nilaiPrlhnMutasiKurang = $valSubst;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang )\n //revisi mutasi penyusutan berkurang\n\n $valSubstAp = abs ($valRwyt->AkumulasiPenyusutan - $valRwyt->AkumulasiPenyusutan_Awal);\n $penyusutanBerkurang = $valSubstAp;\n\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $penyusutanBertambah = 0;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $valRwyt->NilaiPerolehan;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $valRwyt->AkumulasiPenyusutan;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $valRwyt->NilaiBuku;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n\n }\n } elseif($paramKd_Rwyt == 1) {\n // $LastSatker = $valRwyt->kodeSatker;\n // $FirstSatker = $skpd_id;\n if($valRwyt->kondisi == 1 || $valRwyt->kondisi == 2) {\n $flag = \"\";\n\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n //MUTASI ASET (Bertambah)\n $nilaiPrlhnMutasiTambah = 0;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = 0;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = 0;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $penyusutanBertambah = 0;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $nilaiAwalPrlhn + $nilaiPrlhnMutasiTambah;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan + $penyusutanBertambah;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $nilaiPerolehanHasilMutasi - $AkumulasiPenyusutanHasilMutasi;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n } else {\n $flag = \"(-)\";\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n\n //MUTASI ASET (Bertambah)\n $nilaiPrlhnMutasiTambah = 0;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = $valRwyt->NilaiPerolehan;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = $AkumulasiPenyusutan;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $penyusutanBertambah = 0;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $nilaiAwalPrlhn - $nilaiPrlhnMutasiKurang;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan - $penyusutanBerkurang;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $nilaiPerolehanHasilMutasi - $AkumulasiPenyusutanHasilMutasi;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n\n }\n } elseif($paramKd_Rwyt == 3) {\n $LastSatker = $valRwyt->kodeSatker;\n $FirstSatker = $kodesatker;\n if($LastSatker == $FirstSatker) {\n $flag = \"(+)\";\n\n //SALDO AWAL\n $nilaiAwalPrlhn = 0;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = 0;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n $NilaiBuku = 0;\n $NilaiBukuFix = ($NilaiBuku);\n\n //MUTASI ASET (Bertambah)\n // echo \"{$valRwyt->Aset_ID}==={$valRwyt->NilaiPerolehan}<br/>\";\n $nilaiPrlhnMutasiTambah = $valRwyt->NilaiPerolehan;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n //echo \"nilaiPrlhnMutasiTambahFix==$nilaiPrlhnMutasiTambahFix<br/>\";\n $status_mutasi_masuk=1;\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = 0;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = 0;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n if($valRwyt->Tahun!=$valRwyt->TahunPenyusutan) {\n $penyusutanBertambah = $valRwyt->AkumulasiPenyusutan;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n }else{\n $penyusutanBertambah = 0;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n }\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $nilaiAwalPrlhn + $nilaiPrlhnMutasiTambah;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan + $penyusutanBertambah;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $nilaiPerolehanHasilMutasi - $AkumulasiPenyusutanHasilMutasi;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n } else {\n $flag = \"(-)\";\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n\n //MUTASI ASET (Bertambah)\n $nilaiPrlhnMutasiTambah = 0;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = $valRwyt->NilaiPerolehan;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = $AkumulasiPenyusutan;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $penyusutanBertambah = 0;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $nilaiAwalPrlhn - $nilaiPrlhnMutasiKurang;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan - $penyusutanBerkurang;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $nilaiPerolehanHasilMutasi - $AkumulasiPenyusutanHasilMutasi;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n\n }\n } elseif($paramKd_Rwyt == 28 && $valRwyt->Aset_ID_Penambahan == '0') {\n $flag = \"(+)\";\n\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan_Awal;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan_Awal;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n //MUTASI ASET (Bertambah)\n $addValueKptls = $valRwyt->NilaiPerolehan - $valRwyt->NilaiPerolehan_Awal;\n $nilaiPrlhnMutasiTambah = $addValueKptls;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = 0;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = 0;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $valSubstAp = $valRwyt->AkumulasiPenyusutan - $valRwyt->AkumulasiPenyusutan_Awal;\n $penyusutanBertambah = $valSubstAp;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $nilaiAwalPrlhn + $nilaiPrlhnMutasiTambah;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan + $penyusutanBertambah;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $nilaiPerolehanHasilMutasi - $AkumulasiPenyusutanHasilMutasi;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n } elseif($paramKd_Rwyt == 28 && $valRwyt->Aset_ID_Penambahan != '0') {\n $flag = \"(-)\";\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n\n //MUTASI ASET (Bertambah)\n $nilaiPrlhnMutasiTambah = 0;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = $valRwyt->NilaiPerolehan;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = $AkumulasiPenyusutan;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $penyusutanBertambah = 0;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $nilaiAwalPrlhn - $nilaiPrlhnMutasiKurang;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan - $penyusutanBerkurang;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $nilaiPerolehanHasilMutasi - $AkumulasiPenyusutanHasilMutasi;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n } elseif($paramKd_Rwyt == 26 || $paramKd_Rwyt == 27) {\n $flag = \"(-)\";\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = $valRwyt->AkumulasiPenyusutan;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n if($AkumulasiPenyusutan != 0 && $AkumulasiPenyusutan != '') {\n $NilaiBuku = $valRwyt->NilaiBuku;\n $NilaiBukuFix = ($NilaiBuku);\n } else {\n $NilaiBuku = $valRwyt->NilaiPerolehan_Awal;\n $NilaiBukuFix = ($NilaiBuku);\n }\n\n\n //MUTASI ASET (Bertambah)\n $nilaiPrlhnMutasiTambah = 0;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = $valRwyt->NilaiPerolehan;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = $AkumulasiPenyusutan;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $penyusutanBertambah = 0;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $nilaiAwalPrlhn - $nilaiPrlhnMutasiKurang;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan - $penyusutanBerkurang;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $nilaiPerolehanHasilMutasi - $AkumulasiPenyusutanHasilMutasi;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n } //tambahan\n elseif($paramKd_Rwyt == 36 ) {\n $flag = \"(-)\";\n //SALDO AWAL\n $nilaiAwalPrlhn = 0;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n\n $AkumulasiPenyusutan = 0;\n $AkumulasiPenyusutanFix = ($AkumulasiPenyusutan);\n\n $NilaiBuku = 0;\n $NilaiBukuFix = ($NilaiBuku);\n\n\n //MUTASI ASET (Bertambah)\n $nilaiPrlhnMutasiTambah = $valRwyt->NilaiPerolehan;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = $valRwyt->NilaiPerolehan;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = 0;\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $penyusutanBertambah = 0;\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = 0;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutanHasilMutasi =0;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = 0;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n //PENYUSUTAN\n $PenyusutanPerTahun = 0;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = 0;\n }\n elseif(($paramKd_Rwyt == 50 || $paramKd_Rwyt == 51) && $status_masuk_penyusutan != 1) {\n $flag = \"\";\n\n /*(if($flag_penyusutan==0)\n {\n $akumulasi_penyusutan_awal=0;\n $nilai_buku_awal=$valRwyt->NilaiPerolehan;\n $penyusutan_pertahun_awal=0;\n }else{\n $akumulasi_penyusutan_awal=$akumulasi_penyusutan_awal;\n $nilai_buku_awal=$nilai_buku_awal;\n $penyusutan_pertahun_awal=$penyusutan_pertahun_awal;\n }*/\n $akumulasi_penyusutan_awal = $valRwyt->AkumulasiPenyusutan_Awal;\n if($akumulasi_penyusutan_awal != 0)\n $nilai_buku_awal = $valRwyt->NilaiBuku_Awal;\n else\n $nilai_buku_awal = $valRwyt->NilaiPerolehan;\n $penyusutan_pertahun_awal = $valRwyt->PenyusutanPerTahun_Awal;;\n\n //SALDO AWAL\n $nilaiAwalPrlhn = $valRwyt->NilaiPerolehan;\n $nilaiAwalPerolehanFix = ($nilaiAwalPrlhn);\n $AkumulasiPenyusutanFix = ($akumulasi_penyusutan_awal);\n $NilaiBukuFix = ($nilai_buku_awal);\n\n\n //MUTASI ASET (Bertambah)\n $nilaiPrlhnMutasiTambah = 0;\n $nilaiPrlhnMutasiTambahFix = ($nilaiPrlhnMutasiTambah);\n\n //MUTASI ASET (Berkurang)\n $nilaiPrlhnMutasiKurang = 0;\n $nilaiPrlhnMutasiKurangFix = ($nilaiPrlhnMutasiKurang);\n\n //MUTASI PENYUSUTAN (Berkurang)\n $penyusutanBerkurang = 0; //$valRwyt->mutasi_ak_kurang\n $penyusutanBerkurangFix = ($penyusutanBerkurang);\n\n //MUTASI PENYUSUTAN (Bertambah)\n $penyusutanBertambah = 0; //$valRwyt->mutasi_ak_tambah\n $penyusutanBertambahFix = ($penyusutanBertambah);\n\n\n //SALDO AKHIR\n $nilaiPerolehanHasilMutasi = $valRwyt->NilaiPerolehan;\n $nilaiPerolehanHasilMutasiFix = ($nilaiPerolehanHasilMutasi);\n\n $AkumulasiPenyusutan_Akhir = $valRwyt->AkumulasiPenyusutan;\n\n //meghitung beban penyusutan\n if($akumulasi_penyusutan_awal!=$AkumulasiPenyusutan_Akhir)\n $beban_penyusutan = abs($AkumulasiPenyusutan_Akhir)-abs($akumulasi_penyusutan_awal);\n else\n $beban_penyusutan=0;\n $beban_penyusutanFix = ($beban_penyusutan);\n\n\n $AkumulasiPenyusutanHasilMutasi = $AkumulasiPenyusutan_Akhir;\n $AkumulasiPenyusutanHasilMutasiFix = ($AkumulasiPenyusutanHasilMutasi);\n\n $nilaibukuHasilMutasi = $valRwyt->NilaiBuku;\n $nilaibukuHasilMutasiFix = ($nilaibukuHasilMutasi);\n\n $nilai_buku_awal = $valRwyt->NilaiBuku;\n $akumulasi_penyusutan_awal = $valRwyt->AkumulasiPenyusutan;\n $penyusutan_pertahun_awal = $valRwyt->PenyusutanPerTahun;\n //PENYUSUTAN\n $PenyusutanPerTahun = $valRwyt->PenyusutanPerTahun;\n $PenyusutanPerTahunFix = ($PenyusutanPerTahun);\n\n $umurEkonomis = $valRwyt->UmurEkonomis;\n $flag_penyusutan++;\n }\n\n \n //echo \"{$valRwyt->Aset_ID}Riwayat $paramKd_Rwyt=$MUTASI_ASET_PENAMBAHAN==$nilaiPrlhnMutasiTambahFix<br/>\";\n \n if(($paramKd_Rwyt == 50 || $paramKd_Rwyt == 51) && $status_masuk_penyusutan != 1) {\n $BEBAN_PENYUSUTAN += $beban_penyusutanFix;\n $MUTASI_ASET_PENAMBAHAN += $nilaiPrlhnMutasiTambahFix;\n $MUTASI_ASET_KURANG += $nilaiPrlhnMutasiKurangFix;\n $MUTASI_AKM_PENAMBAHAN += $penyusutanBertambahFix;\n $MUTASI_AKM_PENGURANG += $penyusutanBerkurangFix;\n\n } else {\n $BEBAN_PENYUSUTAN += 0;\n $MUTASI_ASET_PENAMBAHAN += $nilaiPrlhnMutasiTambahFix;\n $MUTASI_ASET_KURANG += $nilaiPrlhnMutasiKurangFix;\n $MUTASI_AKM_PENAMBAHAN += $penyusutanBertambahFix;\n $MUTASI_AKM_PENGURANG += $penyusutanBerkurangFix;\n\n }\n\n $nilaiPrlhnMutasiTambahFix=0;\n $nilaiPrlhnMutasiKurangFix=0;\n $penyusutanBertambahFix=0;\n $penyusutanBerkurangFix=0;\n\n }\n\n }\n return array( $BEBAN_PENYUSUTAN, $MUTASI_ASET_PENAMBAHAN, $MUTASI_ASET_KURANG, $MUTASI_AKM_PENAMBAHAN, $MUTASI_AKM_PENGURANG );\n}", "public function f01()\n {\n }", "function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}", "abstract public function getPasiekimai();", "public function tampilDataGalang(){\n\t\t\n\t}", "function estadoTransicao($estadoAtual,$topoDaPilha, $i,$funcaoTransicao ,$quantidadeT){\n for($j=0;$j<$quantidadeT;$j++){\n if(($funcaoTransicao[$j][0]==$estadoAtual)&&($funcaoTransicao[$j][1]==$i)&&($funcaoTransicao[$j][2]==$topoDaPilha)){ \n $aux[0]=$funcaoTransicao[$j][3]; \n $aux[1]=$funcaoTransicao[$j][4];\n return $aux; \n } \n } \n }", "function fncValidaDI_3($IdEstado, $GestorErr, $NumReg, $Campo,$CampoAux)\n{\n\t \n\t$Bandera = 0;\n\t$CatEdo = array(\"AS\" , \"BC\",\"BS\", \"CC\", \"CL\", \"CM\",\"CS\", \"CH\", \"DF\", \n\t\t\t\t\"DG\", \"GT\", \"GR\", \"HG\", \"JC\", \"MC\",\"MN\", \"MS\", \"NT\", \"NL\", \"OC\",\n\t\t\t\t\"PL\", \"QT\", \"QR\", \"SP\",\"SL\", \"SR\", \"TC\", \"TS\", \"TL\",\"VZ\", \"YN\", \"ZS\", \"NE\");\n\n\t$DI_3 = \"(3)Clave Única de Registro de Población (CURP)\";\n\t$DI_3_ErrTam = \"Tamaño de registro debe ser 18 Caracteres\";\n\t$DI_3_ErrIdEdo = \"Identificador de estado Invalido\";\n\t$DI_3_ErrRFC = \"CURP Incorrecto en Sección I AAAA\";\n\t$DI_3_ErrFecNac = \"CURP Incorrecto en Sección II Fecha Nacimiento\";\n\t$DI_3_ErrGenero = \"CURP Incorrecto en Sección III Genero\";\n\t$DI_3_ErrEntFecNac= \"CURP Incorrecto en Sección IV Entidad Federativa Nacimeinto\";\n\n\n\t//echo \"Datos Entrada: IdEstado >\".$IdEstado. \"< \\nGestorErr >\". $GestorErr .\"< \\nNumReg >\".$NumReg. \"< \\nCampo >\". $Campo .\"<\\n\";\n\t$MtrxStrAux = explode(\"/\", $CampoAux);\n\t$MtrxStrAuxApp = explode(\",\", $MtrxStrAux[CERO]);\n\t$AppPat\t\t= (isset($MtrxStrAuxApp[CERO]))?$MtrxStrAuxApp[CERO]:\"\" ;\n\t$AppMat = (isset($MtrxStrAuxApp[UNO]))?$MtrxStrAuxApp[UNO]:\"\";\n\t$NomEmpl = (isset($MtrxStrAux[UNO]))?$MtrxStrAux[UNO]:\"\";\n/**\t\n\techo \"AppPat >$AppPat< <br>\";\n\techo \"AppMat >$AppMat< <br>\";\n\techo \"Nombre >$NomEmpl< <br>\";\n**/\t\n /** Quita caracteres especiales **/\n\t$LocCampo =preg_replace('/[^A-Za-z0-9\\-]/', '', $Campo);\n\n\tif (strlen($LocCampo) == 18)\n\t{\n\n\t\tif(!preg_match (\"/[A-Z,a-z]{4}/\" ,substr($LocCampo,0,4)))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_3.\"|\".$LocCampo.\"|\" . $DI_3_ErrRFC.\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = 1;\n\t\t}\t\n\t\t$CampoAux = substr($LocCampo,4,6);\n\t\tif(!preg_match (\"/\\d{6}/\" ,$CampoAux))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_3.\"|\".$LocCampo.\"|\" . $DI_3_ErrFecNac .\"|$CampoAux\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = 1;\n\t\t}\t\n\n\t\tif(!preg_match (\"/[M|H|m|h]{1}/\" ,substr($LocCampo,10,1)))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_3.\"|\".$LocCampo.\"|\" . $DI_3_ErrGenero .\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = 1;\n\t\t}\t\n\t\tif(!in_array(substr($LocCampo,11,2), $CatEdo))\n\t\t{\n\t\t\t$Error = $NumReg .\"|\".$DI_3.\"|\".$LocCampo.\"|\" . $DI_3_ErrEntFecNac .\"|\\n\";\n\t\t\tfwrite($GestorErr, $Error);\n\t\t\t$Bandera = 1;\n\t\t}\t\n\t}\n\telse\n\t{\n\t\t$Error = $NumReg .\"|\".$DI_3.\"|\".$LocCampo.\"|\" . $DI_3_ErrTam.\"|\\n\";\n\t\tfwrite($GestorErr, $Error);\n\t\t$Bandera = 1;\n\t}\n\treturn $Bandera;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->r07_anousu = ($this->r07_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_anousu\"]:$this->r07_anousu);\n $this->r07_mesusu = ($this->r07_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_mesusu\"]:$this->r07_mesusu);\n $this->r07_codigo = ($this->r07_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_codigo\"]:$this->r07_codigo);\n $this->r07_descr = ($this->r07_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_descr\"]:$this->r07_descr);\n $this->r07_valor = ($this->r07_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_valor\"]:$this->r07_valor);\n $this->r07_instit = ($this->r07_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_instit\"]:$this->r07_instit);\n }else{\n $this->r07_anousu = ($this->r07_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_anousu\"]:$this->r07_anousu);\n $this->r07_mesusu = ($this->r07_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_mesusu\"]:$this->r07_mesusu);\n $this->r07_codigo = ($this->r07_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_codigo\"]:$this->r07_codigo);\n $this->r07_instit = ($this->r07_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r07_instit\"]:$this->r07_instit);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed95_i_codigo = ($this->ed95_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed95_i_codigo\"]:$this->ed95_i_codigo);\n $this->ed95_i_escola = ($this->ed95_i_escola == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed95_i_escola\"]:$this->ed95_i_escola);\n $this->ed95_i_calendario = ($this->ed95_i_calendario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed95_i_calendario\"]:$this->ed95_i_calendario);\n $this->ed95_i_aluno = ($this->ed95_i_aluno == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed95_i_aluno\"]:$this->ed95_i_aluno);\n $this->ed95_i_serie = ($this->ed95_i_serie == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed95_i_serie\"]:$this->ed95_i_serie);\n $this->ed95_i_regencia = ($this->ed95_i_regencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed95_i_regencia\"]:$this->ed95_i_regencia);\n $this->ed95_c_encerrado = ($this->ed95_c_encerrado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed95_c_encerrado\"]:$this->ed95_c_encerrado);\n }else{\n $this->ed95_i_codigo = ($this->ed95_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed95_i_codigo\"]:$this->ed95_i_codigo);\n }\n }", "function compara_valores($id_restauro)\n{\n global $db,$msg_dest;\n \n $sql_fixo=\"SELECT a.material_tecnica as mat,a.altura_interna as alt,largura_interna as larg,altura_externa as imp_alt,largura_externa as imp_larg\n\t\t\tFROM moldura AS a, restauro AS b WHERE a.moldura=b.moldura AND b.restauro='$id_restauro'\";\n $db->query($sql_fixo);\n $res=$db->dados();\n $conteudo1=array($res['mat'],$res['alt'],$res['larg'],$res['imp_alt'],$res['imp_larg']);\n $conteudo2=array($_REQUEST['tecnica'],formata_valor(trim($_REQUEST['altura_obra'])),formata_valor(trim($_REQUEST['largura_obra'])),formata_valor(trim($_REQUEST['altura_imagem'])),formata_valor(trim($_REQUEST['largura_imagem'])));\n ///\n $sql_usu=\"SELECT responsavel, tecnico from colecao where nome = '$_REQUEST[colecao]'\";\n $db->query($sql_usu);\n $usu_destino=$db->dados(); \n $usu_responsavel=$usu_destino['responsavel'];\n $usu_tecnico=$usu_destino['tecnico'];\n ///\n reset($conteudo1);\n reset($conteudo2);\n $msg=array();\n reset($msg);\n $msg_dest='';\n if($conteudo1[0]!=$conteudo2[0]){\n $msg[]='Técnica original:'.$conteudo1[0].' - Técnica atual:'.$conteudo2[0]. '\\n';}\n if($conteudo1[1]!=$conteudo2[1]){\n $msg[]='Altura original:'.$conteudo1[1].'cm - Altura atual:'.$conteudo2[1].' cm \\n';}\n if($conteudo1[2]!=$conteudo2[2]){\n $msg[]='Largura original:'.$conteudo1[2].' cm - Largura atual:'.$conteudo2[2].' cm \\n';}\n if($conteudo1[3]!=$conteudo2[3]){\n $msg[]='Altura da Imagem original:'.$conteudo1[3].' cm - Altura da Imagem atual:'.$conteudo2[3].' cm \\n';}\n if($conteudo1[4]!=$conteudo2[4]){\n $msg[]='Largura da Imagem original:'.$conteudo1[4].' cm - Largura da Imagem atual:'.$conteudo2[4].' cm \\n ';}\n\nif(count($msg)>0) // Se houver mudanças......\n{\n for($i=0;$i<count($msg);$i++){ \n $msg_dest.=$msg[$i];}\n}\n\nif ($usu_responsavel!='') {\n\n\tif($msg_dest!='')\n\t{\n \t\t$texto.='Modificações de catalogação na Ficha de Restauro\\n';\n \t\t$texto.='Nº DE REGISTRO:'.$_REQUEST['pNum_registro']. '- Objeto: '.$_REQUEST['nome_objeto']. '- Sequencial:'.$_REQUEST['seq_restauro'].'\\n';\n \t\t$texto.='TÍTULO:'.$_REQUEST['titulo'].'\\n';\n \t\t$texto.='ALTERAÇÕES:\\n';\n \t\t$texto.=$msg_dest;\n \t\t$dataInc= date(\"Y-m-d\");\n \t\t$assunto='Ficha de Restauro-Nº de registro:'.$_REQUEST['pNum_registro'].'';\n \t\t$sql= \"INSERT INTO agenda(assunto,texto,data_aviso,eh_lida,data_inclusao,usuario_origem,usuario) \n \t\tvalues('$assunto','$texto',now(),'0','$dataInc','$_SESSION[susuario]','$usu_responsavel')\";\n \t\t$db->query($sql);\n\t\tif ($usu_responsavel <> $usu_tecnico) {\n\t \t\t$sql= \"INSERT INTO agenda(assunto,texto,data_aviso,eh_lida,data_inclusao,usuario_origem,usuario) \n \t\tvalues('$assunto','$texto',now(),'0','$dataInc','$_SESSION[susuario]','$usu_tecnico')\";\n\t \t\t$db->query($sql);\n\t\t}\n \t}\n} \n}", "function evt__form_integrante_i__modificacion($datos)\r\n {\r\n $perfil = toba::usuario()->get_perfil_datos();\r\n if ($perfil == null) {//es usuario de SCyT\r\n if($this->chequeo_formato_norma($datos['rescd_bm'])){ \r\n $datos2['rescd_bm']=$datos['rescd_bm'];\r\n $datos2['resaval']=$datos['resaval'];\r\n $datos2['cat_investigador']=$datos['cat_investigador'];\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos2);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar('Guardado. Solo modifica ResCD baja/modif, Res Aval, Cat Investigador', 'info');\r\n }\r\n }else{//es usuario de la UA\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n $int=$this->dep('datos')->tabla('integrante_interno_pi')->get(); \r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){//no puede ir fuera del periodo del proyecto\r\n //toba::notificacion()->agregar('Revise las fechas. Fuera del periodo del proyecto!', 'error'); \r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{ \r\n //Pendiente verificar que la modificacion no haga que se superpongan las fechas\r\n $haysuperposicion=false;//no es igual al del alta porque no tengo que considerar el registro vigente$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->superposicion_modif($pi['id_pinv'],$datos['id_docente'],$datos['desde'],$datos['hasta'],$registro['id_designacion'],$registro['desde']);\r\n if(!$haysuperposicion){\r\n $band=false;\r\n if($pi['estado']=='A'){\r\n $band=$this->dep('datos')->tabla('logs_integrante_interno_pi')->fue_chequeado($int['id_designacion'],$int['pinvest'],$int['desde']);\r\n } \r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if (isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD Baja/Modif invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if($band){//si alguna vez fue chequeado por SCyT entonces solo puede modificar fecha_hasta y nada mas (se supone que lo demas ya es correcto) \r\n //fecha_hasta porque puede ocurrir que haya una baja del participante o la modificacion de funcion o carga horaria\r\n unset($datos['funcion_p']);\r\n unset($datos['cat_investigador']);\r\n unset($datos['identificador_personal']);\r\n unset($datos['carga_horaria']);\r\n unset($datos['desde']);\r\n unset($datos['rescd']);\r\n unset($datos['cat_invest_conicet']);\r\n unset($datos['resaval']);\r\n unset($datos['hs_finan_otrafuente']);\r\n //Solo si cambia hasta y resol bm pierde el check\r\n if( $int['hasta']<>$datos['hasta'] or $int['rescd_bm']<>$datos['rescd_bm'] ){\r\n $datos['check_inv']=0;//pierde el check si es que lo tuviera. Solo cuando cambia algo\r\n }\r\n $mensaje='Ha sido chequeado por SCyT, solo puede modificar fecha hasta y resCD baja/modif';\r\n }else{//band false significa que puede modificar cualquier cosa\r\n //esto lo hago porque el set de toba no modifica la fecha desde por ser parte de la clave \r\n $this->dep('datos')->tabla('integrante_interno_pi')->modificar_fecha_desde($int['id_designacion'],$int['pinvest'],$int['desde'],$datos['desde']);\r\n $mensaje=\"Los datos se han guardado correctamente\";\r\n }\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar($mensaje, 'info'); \r\n }\r\n }\r\n }else{\r\n //toba::notificacion()->agregar('Hay superposicion de fechas', 'error'); \r\n throw new toba_error(\"Hay superposicion de fechas\");\r\n }\r\n }\r\n }\r\n //nuevo Lo coloco para que el formulario se oculte al finalizar\r\n $this->dep('datos')->tabla('integrante_interno_pi')->resetear();\r\n $this->s__mostrar_i=0;\r\n }", "function fct_liste_fleurs ($mescriteres) {\nglobal $connexion, $poids_criteres, $gamme;\n\t$sql = \"SELECT * FROM fiche_\".$gamme.\" WHERE visible_index = 1 \";\n $result = mysql_query($sql, $connexion);\n\tif (!$result) {\n\t\t$liste_fleurs = \"<p><strong>La liste des fleurs n'est pas disponible pour le moment ; veuillez rÚessayer ultÚrieurement.</strong></p>\";\n\t} else {\n\t\t$nbTrouve = mysql_num_rows($result);\n\t\tif ($nbTrouve <= 0) {\n\t\t\t$liste_fleurs = \"<p><strong>La liste des fleurs n'est pas disponible pour le moment ; veuillez rÚessayer ultÚrieurement.</strong></p>\";\n\t\t} else {\n\t\t\t$poids_toutes_fleurs = array();\n\t\t\t$infos_toutes_fleurs = array();\n\t\t\twhile ($unefleur = mysql_fetch_assoc($result)) {\n\t\t\t\t$poids_fleur = 0;\n\t\t\t\t$unefleur['debbug_poids'] = \"\";\n\t\t\t\t// calcul poids de chaque critere\n\t\t\t\tforeach ($poids_criteres as $libelle => $poids) {\n\t\t\t\t\t$refcritere = substr($libelle, 0, 3);\n\t\t\t\t\t$codecritere = $mescriteres[$refcritere]['code'];\n\t\t\t\t\tif ($codecritere >= 0) {\n\t\t\t\t\t\tswitch ($libelle) {\n\t\t\t\t\t\t\tcase \"fleur\":\n\t\t\t\t\t\t\t\t$valcritere = ($poids[$codecritere][$unefleur['kod_coul_fleurs']]) * 1.3;\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] = \"fle=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"feuille\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_feuille']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", feu=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"milieu\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_milieu']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", mil=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"altitude\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_alt']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", alt=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"port\":\n\t\t\t\t\t\t\t\t$valcritere = $poids[$codecritere][$unefleur['kod_port']];\n\t\t\t\t\t\t\t\t$poids_fleur = $poids_fleur + $valcritere;\n\t\t\t\t\t\t\t\t$unefleur['debbug_poids'] .= \", por=\".$valcritere;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// poids critere taille\n\t\t\t\t$codecritere = $mescriteres['tai']['code'];\n\t\t\t\t$poids_taille = fct_calcul_proximite_taille($unefleur['taillemin'], $unefleur['taillelmax'], $codecritere );\n\t\t\t\t$poids_fleur = $poids_fleur + $poids_taille;\n\t\t\t\t$unefleur['debbug_poids'] .= \", tai=\".floor($poids_taille);\n\t\t\t\t// poids critere invisible mois floraison\n\t\t\t\t$mois_observation = date(\"n\");\n\t\t\t\t$intervalle = $unefleur['kod_mois_flore2'] - $unefleur['kod_moisfolre1'];\n\t\t\t\t$poids_mois = 0;\n\t\t\t\tif ($intervalle > 0) {\n\t\t\t\t\t// mois observation comprise entre debut et fin de floraison\n\t\t\t\t\tif (($mois_observation >= $unefleur['kod_moisfolre1']) && ($mois_observation <= $unefleur['kod_mois_flore2'])) {\n\t\t\t\t\t\t$poids_mois = 3;\n\t\t\t\t\t} else { // mois observation = 1 mois precedent ou 1 mois suivant pÚriode de floraison\n\t\t\t\t\t\t$mois_suivant = fmod(($unefleur['kod_mois_flore2']+1), 12);\n\t\t\t\t\t\t$mois_precedent = fmod((12+$unefleur['kod_moisfolre1']-1), 12);\n\t\t\t\t\t\tif ($mois_precedent == 0) $mois_precedent = 12;\n\t\t\t\t\t\tif (($mois_observation == $mois_precedent) || ($mois_observation == $mois_suivant)) {\n\t\t\t\t\t\t\t$poids_mois = 2;\n\t\t\t\t\t\t} else { // mois observation = 2 mois precedent ou 2 mois suivant pÚriode de floraison\n\t\t\t\t\t\t\t$mois_suivant = fmod(($unefleur['kod_mois_flore2']+2), 12);\n\t\t\t\t\t\t\t$mois_precedent = fmod((12+$unefleur['kod_moisfolre1']-2), 12);\n\t\t\t\t\t\t\tif ($mois_precedent == 0) $mois_precedent = 12;\n\t\t\t\t\t\t\tif (($mois_observation == $mois_precedent) || ($mois_observation == $mois_suivant)) $poids_mois = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$poids_fleur = $poids_fleur + $poids_mois;\n\t\t\t\t$unefleur['debbug_poids'] .= \", mois=\".floor($poids_mois);\n\t\t\t\t// enregistre\n\t\t\t\t$poids_toutes_fleurs[$unefleur['numId']] = $poids_fleur;\n\t\t\t\t$infos_toutes_fleurs[$unefleur['numId']] = $unefleur;\n\t\t\t} // fin while\n\t\t\t// trie selon le poids le plus lourd\n\t\t\tarsort($poids_toutes_fleurs);\n\t\t\tif (count($poids_toutes_fleurs) > 30) $nbaffichage = 30;\n\t\t\telse $nbaffichage = count($poids_toutes_fleurs);\n\t\t\t$liste_fleurs = \"\";\n\t\t\t$liste_encours = \"\";\n\t\t\t$cpt = 0;\n\t\t\tforeach ($poids_toutes_fleurs as $ref => $poids) {\nif($poids==0)break;//on affiche pas les arbres sans rapport\n\t\t\t\t$infos_fleur_encours = $infos_toutes_fleurs[$ref];\n\t\t\t\t// recupere photo\n\t\t\t\t$sqlphoto = 'SELECT * FROM diapo_'.$gamme.' WHERE nomFic LIKE \"'.$infos_fleur_encours['racinenomfic'].'%\" and auteur ='.\"'feuille'\";\n\t\t\t\t$result = mysql_query($sqlphoto, $connexion);\n\t\t\t\t$photofleur = mysql_fetch_assoc($result);\n\t\t\t\t$lien_fiche = '<a href=\"fiche_'.$infos_fleur_encours['racinenomfic'].'.html\">';\n\t\t\t\t$liste_encours .= '<div class=\"unefleur\">'.\"\\n\";\n\t\t\t\t$liste_encours .= '<a href=\"fiche_'.$infos_fleur_encours['racinenomfic'].'.html\">';\n\t\t\t\t$liste_encours .= '<img src=\"phototheque/vignette_'.$gamme.'/'.$photofleur['nomFic'].'.jpg\" border=\"0\"><br />'.\"\\n\";\n\t\t\t\t$liste_encours .= $infos_fleur_encours['nc'].\"<br /> (\".$infos_fleur_encours['ns'].\")\".\"\\n\";\n\t\t\t\t$liste_encours .= '</a>';\n\t\t\t\t// pour activer le systeme de debbug des poids des criteres\n\t\t\t\t// if ($infos_fleur_encours['debbug_poids'] != \"\") $liste_encours .= '<br />----------<br />'.$infos_fleur_encours['debbug_poids'];\n\t\t\t\t$liste_encours .= '</div>'.\"\\n\";\n\t\t\t\t$cpt ++;\n\t\t\t\tif (fmod($cpt, 3) == 0) {\n\t\t\t\t\t$liste_fleurs .= '<div class=\"lignefleurs\">'.\"\\n\";\n\t\t\t\t\t$liste_fleurs .= $liste_encours;\n\t\t\t\t\t$liste_fleurs .= '</div>'.\"\\n\";\n\t\t\t\t\t$liste_encours = \"\";\n\t\t\t\t}\n\t\t\t\tif ($cpt >= $nbaffichage) break;\n\t\t\t}\n\t\t}\n\t}\nif( $liste_fleurs==\"\") $liste_fleurs = \"<div class='lignefleurs'> $liste_encours </div> \";\n \treturn $liste_fleurs;\n}", "function minfas($idkost, $tipe_kost)\r\n{\r\n global $koneksi;\r\n $cost = mysqli_query($koneksi, \"SELECT min(biaya_fasilitas) FROM kamar WHERE id_kost=$idkost\");\r\n $p = mysqli_fetch_array($cost);\r\n if ($tipe_kost == \"Bulan\") {\r\n return $p['min(biaya_fasilitas)'];\r\n } else if ($tipe_kost == \"Tahun\") {\r\n return $p['min(biaya_fasilitas)'] * 12;\r\n }\r\n}", "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->h50_sequencial = ($this->h50_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_sequencial\"]:$this->h50_sequencial);\n $this->h50_lei = ($this->h50_lei == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_lei\"]:$this->h50_lei);\n $this->h50_descr = ($this->h50_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_descr\"]:$this->h50_descr);\n $this->h50_obs = ($this->h50_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_obs\"]:$this->h50_obs);\n $this->h50_confobs = ($this->h50_confobs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_confobs\"]:$this->h50_confobs);\n $this->h50_minimopontos = ($this->h50_minimopontos == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_minimopontos\"]:$this->h50_minimopontos);\n $this->h50_assentaaprova = ($this->h50_assentaaprova == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_assentaaprova\"]:$this->h50_assentaaprova);\n $this->h50_assentareprova = ($this->h50_assentareprova == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_assentareprova\"]:$this->h50_assentareprova);\n $this->h50_duracaoestagio = ($this->h50_duracaoestagio == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_duracaoestagio\"]:$this->h50_duracaoestagio);\n $this->h50_instit = ($this->h50_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_instit\"]:$this->h50_instit);\n }else{\n $this->h50_sequencial = ($this->h50_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_sequencial\"]:$this->h50_sequencial);\n }\n }", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halgalerifoto'])){\n\t$posisi=0;\n\t$_GET['halgalerifoto']=1;\n}\nelse{\n\t$posisi = ($_GET['halgalerifoto']-1) * $batas;\n}\nreturn $posisi;\n}", "function evt__form_cargo__modificacion($datos)\r\n\t{\r\n $res=0;\r\n if($this->controlador()->dep('datos')->tabla('cargo')->esta_cargada()){//es una modificacion\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n \r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con($car['id_cargo'],$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']);\r\n }\r\n if($res==1){//hay otro puesto \r\n toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar(); \r\n }\r\n }else{//es un alta\r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con(0,$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']); \r\n }\r\n if($res==1){//hay otro puesto \r\n throw new toba_error('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos');\r\n // toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $pers=$this->controlador()->dep('datos')->tabla('persona')->get(); \r\n $datos['generado_x_pase']=0;\r\n $datos['id_persona']=$pers['id_persona'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar();\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $cargo['id_cargo']=$car['id_cargo'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->cargar($cargo);\r\n } \r\n }\r\n\t}", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed112_sequencial = ($this->ed112_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed112_sequencial\"]:$this->ed112_sequencial);\n $this->ed112_formacontrole = ($this->ed112_formacontrole == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed112_formacontrole\"]:$this->ed112_formacontrole);\n $this->ed112_quantidadedisciplinas = ($this->ed112_quantidadedisciplinas == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed112_quantidadedisciplinas\"]:$this->ed112_quantidadedisciplinas);\n $this->ed112_habilitado = ($this->ed112_habilitado == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed112_habilitado\"]:$this->ed112_habilitado);\n $this->ed112_escola = ($this->ed112_escola == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed112_escola\"]:$this->ed112_escola);\n $this->ed112_controlefrequencia = ($this->ed112_controlefrequencia == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed112_controlefrequencia\"]:$this->ed112_controlefrequencia);\n $this->ed112_disciplinaeliminadependencia = ($this->ed112_disciplinaeliminadependencia == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed112_disciplinaeliminadependencia\"]:$this->ed112_disciplinaeliminadependencia);\n $this->ed112_justificativa = ($this->ed112_justificativa == \"\" ? \"\" : $this->ed112_justificativa);\n }else{\n $this->ed112_sequencial = ($this->ed112_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed112_sequencial\"]:$this->ed112_sequencial);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->j97_sequen = ($this->j97_sequen == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_sequen\"]:$this->j97_sequen);\n $this->j97_codimporta = ($this->j97_codimporta == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_codimporta\"]:$this->j97_codimporta);\n $this->j97_matric = ($this->j97_matric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_matric\"]:$this->j97_matric);\n $this->j97_endcor = ($this->j97_endcor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_endcor\"]:$this->j97_endcor);\n $this->j97_cidade = ($this->j97_cidade == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_cidade\"]:$this->j97_cidade);\n $this->j97_profun = ($this->j97_profun == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_profun\"]:$this->j97_profun);\n $this->j97_sitterreno = ($this->j97_sitterreno == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_sitterreno\"]:$this->j97_sitterreno);\n $this->j97_pedol = ($this->j97_pedol == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_pedol\"]:$this->j97_pedol);\n $this->j97_topog = ($this->j97_topog == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_topog\"]:$this->j97_topog);\n $this->j97_vistoria = ($this->j97_vistoria == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_vistoria\"]:$this->j97_vistoria);\n $this->j97_muro = ($this->j97_muro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_muro\"]:$this->j97_muro);\n $this->j97_calcada = ($this->j97_calcada == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_calcada\"]:$this->j97_calcada);\n }else{\n $this->j97_sequen = ($this->j97_sequen == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j97_sequen\"]:$this->j97_sequen);\n }\n }", "public function falar(){\n\t\treturn \"Som\";\n\t}", "public function plus_abonados();", "function gesuchtes_feld($angabe,$tabelle,$gegebene_spalte,$gesuchte_spalte) {\n\t$mysqli=MyDatabase();\n\t$abfrage=\"SELECT `$gesuchte_spalte` FROM `$tabelle` WHERE `$gegebene_spalte`='$angabe'\";\n\tif ($result=$mysqli->query($abfrage)) {\n\t\twhile ($row=$result->fetch_object()) {\n\t\t\t$gesuchter_wert=$row->$gesuchte_spalte;\n\t\t\t}\n\t\t}\t\n\tif (!isset($gesuchter_wert)) {$gesuchter_wert=0;}\n\treturn $gesuchter_wert;\n}", "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}" ]
[ "0.6410931", "0.63967806", "0.62682915", "0.6247548", "0.62225175", "0.6212206", "0.61912274", "0.61790836", "0.6177313", "0.61661553", "0.61415726", "0.6129267", "0.60976166", "0.60922754", "0.608096", "0.6071616", "0.6051011", "0.6036798", "0.6030382", "0.60079885", "0.59879845", "0.5970486", "0.5969169", "0.5947332", "0.59272015", "0.59226304", "0.59076405", "0.5906236", "0.59044063", "0.5900728", "0.59007156", "0.58918524", "0.58830386", "0.5881229", "0.58736324", "0.5871373", "0.58624315", "0.58584446", "0.5853108", "0.5852844", "0.5852844", "0.5848272", "0.58480054", "0.584746", "0.584499", "0.58437836", "0.5829512", "0.58157265", "0.58147717", "0.58116865", "0.5806828", "0.580615", "0.5804195", "0.5800123", "0.57946", "0.5792437", "0.5785973", "0.57748866", "0.5771782", "0.5764535", "0.57624793", "0.5761536", "0.5760434", "0.5754749", "0.5753234", "0.5749105", "0.5748344", "0.57481563", "0.57478976", "0.5743011", "0.5738547", "0.57378817", "0.57349646", "0.57318103", "0.57300806", "0.5726814", "0.5720061", "0.57142603", "0.57142603", "0.57123077", "0.5706439", "0.57060146", "0.5694084", "0.5694047", "0.56898034", "0.56897545", "0.5688709", "0.56873685", "0.56864774", "0.56835294", "0.5681152", "0.56773996", "0.56773996", "0.56680954", "0.5665144", "0.56588465", "0.565866", "0.5658606", "0.5652813", "0.5651808", "0.56468624" ]
0.0
-1
/ Load all of the config files in $dir in ascending alphabetical order. The config files must return an associative array of config values. This function returns the final config data after all of the individual files have been processed.
function load_config_array(string $dir) { $tmp = []; $files = scandir($dir, SCANDIR_SORT_ASCENDING); if ($files !== FALSE) { foreach (array_diff($files, ['.', '..']) as $f) { $inc = include($dir.'/'.$f); if (gettype($inc) === 'array') { $tmp = array_merge($tmp, $inc); } else { throw new Exception( "Invalid configuration file. An array wasn't returned." ); } } } return $tmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }", "public function loadConfigs($confdir = null) {\n if (!is_object($this->shared)) {\n $this->shared = \\Ease\\Shared::instanced();\n }\n\n foreach (glob($confdir . '/*.json') as $configFile) {\n $this->shared->loadConfig($configFile, true);\n }\n\n $this->debug = \\Ease\\Functions::cfg('debug');\n $this->apiurl = \\Ease\\Functions::cfg('FLEXIBEE_URL');\n }", "public static function parse($dir = null)\n {\n self::$dir = ($dir != null ? rtrim($dir,'/').'/': dirname(dirname(dirname(__FILE__))).'/config/');\n\n $config = (object) array();\n // No configuration needed!\n if(!is_dir(self::$dir)){ return $config; }\n\n if(!is_readable(self::$dir.self::$default_config.'.php')){ return $config; }\n\n $cfg_arr = (array) require_once self::$dir.self::$default_config.'.php';\n\n if(self::$check_keys){\n\n if(!empty($_SERVER[self::$environment_key]) && is_readable(self::$dir.$_SERVER[self::$environment_key].'.php')){\n $env_arr = (array) require_once self::$dir.$_SERVER[self::$environment_key].'.php';\n $cfg_arr = array_replace($cfg_arr,$env_arr);\n }\n\n if(!empty($_SERVER[self::$developer_key]) && is_readable(self::$dir.$_SERVER[self::$developer_key].'.php')){\n $dev_arr = (array) require_once self::$dir.$_SERVER[self::$developer_key].'.php';\n $cfg_arr = array_replace($cfg_arr,$dev_arr);\n }\n\n $config = (object) $cfg_arr;\n }\n return $config;\n }", "function getConfigFiles($config_dir) {\n $files = array();\n foreach (glob($config_dir . '/*.yaml') as $file) {\n $files[] = $file;\n }\n return $files;\n }", "private function loadFilesFromDir($dir) {\r\n global $db;\r\n $this->files = array();\r\n\r\n if (is_dir($dir)) {\r\n if ($dh = opendir($dir)) {\r\n while (($file = readdir($dh)) !== false) {\r\n if($file != '.' && $file != '..') {\r\n $size = $this->Size($dir . '/' . $file);\r\n $sql = \"SELECT `description` FROM `forms_tracking_files` WHERE `trackingId` = \" . $this->trackingFormId . \" AND `name` = '\" . $file . \"'\";\r\n $description = $db->getRow($sql);\r\n $description = $description['description'];\r\n array_push($this->files, array('name'=>$file, 'size'=>$size, 'description'=>$description));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n }", "function getFiles($dir)\r\n{\r\n\tglobal $types, $debug, $globalGetFiles;\r\n\tif ( !isset($globalGetFiles[$dir]) )\r\n\t{\r\n\t\t$dir = cleanPath($dir);\r\n\t\t$files = array();\r\n\t\t$list = array();\r\n\t\t\r\n\t\t// Loop through each of the files in this directory\r\n\t\t$files = glob($dir.'/*');\r\n\t\tforeach ( $files as $file )\r\n\t\t{\r\n\t\t\tif ( !empty($debug) && empty($log) )\r\n\t\t\t{\r\n\t\t\t\t$log = \"getFiles(\".$dir.\")\\n----------\\n\";\r\n\t\t\t}\r\n\t\t\t// Check each file against the list of types in config.php\r\n\t\t\tforeach ( $types as $type )\r\n\t\t\t{\r\n\t\t\t\t// Lower case the file extension to be sure\r\n\t\t\t\tif ( substr(strtolower($file),-3) == $type )\r\n\t\t\t\t{\r\n\t\t\t\t\t$list[] = $file;\r\n\t\t\t\t\tif ( !empty($debug) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$log .= \"list[] = \".$file.\"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tunset($files);\r\n\t\t// Alphabetize files in case insensitive order\r\n\t\tnatcasesort($list);\r\n\t\tif ( !empty($debug) )\r\n\t\t{\r\n\t\t\t$log .= \"\\n\";\r\n\t\t\tdebugLog($log);\r\n\t\t}\r\n\t\t$globalGetFiles[$dir] = $list;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$list = $globalGetFiles[$dir];\r\n\t}\r\n\treturn $list;\r\n}", "public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }", "function load_results($dir) {\n\n\t\t$data = array();\n\n\t\t$fs_dir = opendir($dir);\n\t\twhile ($fs = readdir($fs_dir)) {\n\n\t\t\tif ((! is_dir(\"$dir/$fs\")) || (in_array($fs,array('.','..')))) { continue; }\n\n\t\t\techo \"$dir/$fs\\n\";\n\n\t\t\t$data[$fs] = array();\n\n\t\t\t$pgbs_dir = opendir(\"$dir/$fs\");\n\t\t\twhile ($pgbs = readdir($pgbs_dir)) {\n\n\t\t\t\tif ($pgbs == '.' || $pgbs == '..') { continue; }\n\n\t\t\t\techo \"\\t$pgbs:\";\n\n\t\t\t\t$data[$fs][$pgbs] = array();\n\n\t\t\t\t$fsbs_dir = opendir(\"$dir/$fs/$pgbs\");\n\t\t\t\twhile ($fsbs = readdir($fsbs_dir)) {\n\n\t\t\t\t\tif ($fsbs == '.' || $fsbs == '..') { continue; }\n\n\t\t\t\t\techo \" $fsbs\";\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs] = array();\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['hash'] = md5(\"$fs/$pgbs/$fsbs\" . microtime(true));\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench'] = array();\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench']['ro'] = load_pgbench(\"$dir/$fs/$pgbs/$fsbs/pgbench/ro\", 1);\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['pgbench']['rw'] = load_pgbench(\"$dir/$fs/$pgbs/$fsbs/pgbench/rw\", 9);\n\n\t\t\t\t\t$data[$fs][$pgbs][$fsbs]['tpch'] = load_tpch(\"$dir/$fs/$pgbs/$fsbs/tpch\");\n\n\t\t\t\t}\n\t\t\t\tclosedir($fsbs_dir);\n\t\t\t\techo \"\\n\";\n\n\t\t\t}\n\t\t\tclosedir($pgbs_dir);\n\n\t\t}\n\t\tclosedir($fs_dir);\n\n\t\treturn $data;\n\t}", "public function load_files($dir = '') {\n $dir = trailingslashit($dir);\n if (!empty($dir) && is_dir($dir)) {\n if ($dh = opendir($dir)) {\n while (( $file = readdir($dh) ) !== false) {\n if (!in_array($file, array('.', '..')) && is_file($dir . $file) && 'php' == pathinfo($dir . $file, PATHINFO_EXTENSION)) {\n include_once( $dir . $file );\n }\n }\n closedir($dh);\n }\n }\n }", "public static function loadConfigs( $path )\n {\n $path = Sanitize::toPath( $path );\n $output = [];\n\n if( !empty( $path ) && is_dir( $path ) )\n {\n foreach( glob( $path.\"/*.php\" ) as $file )\n {\n $key = Sanitize::toKey( basename( $file, \".php\" ) );\n $value = include_once( $file );\n $output[ $key ] = $value;\n }\n }\n return $output;\n }", "public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }", "protected function _Recusive_Load_Dir($dir) {\r\n if (!is_dir($dir)) { return; }\r\n // Load each of the field shortcodes\r\n foreach (new DirectoryIterator($dir) as $FileInfo) {\r\n // If this is a directory dot\r\n if ($FileInfo->isDot()) { continue; }\r\n // If this is a directory\r\n if ($FileInfo->isDir()) { \r\n // Load the directory\r\n $this->_Recusive_Load_Dir($FileInfo->getPathname());\r\n } // Otherwise load the file\r\n else {\r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.tpl') !== false) { continue; } \r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.php') === false) { continue; } \r\n // Include the file\r\n require_once($FileInfo->getPathname());\r\n }\r\n }\r\n }", "public function getFromDir($dir){\n $files = scandir($dir);\n\n $cfdis = [];\n foreach ($files as $file){\n if(file_exists($dir.$file) && mime_content_type($dir.$file) == self::FILE_TYPE_XML){\n dump($dir.$file);\n $cfdi = new CfdiParser\\Parser($dir.$file);\n $cfdis[] = $cfdi->getCfdiArray();\n }\n \n /*if(is_file($dir.$file)){\n rename($dir.$file, $this->getBackupDir().$file);\n }*/\n \n //TODO: if is folder\n }\n \n return $cfdis;\n }", "function load_tpch($dir) {\n\t\t$out = array();\n\t\t$out['stats'] = load_stats($dir);\n\t\t$out['queries'] = load_queries($dir);\n\t\treturn $out;\n\t}", "function dirList ($dir) \n{\n $results = array();\n\n\tif(file_exists($dir)){\n\t\t// create a handler for the directory\n\t\t$handler = opendir($dir);\n\n\t\t// keep going until all files in directory have been read\n\t\twhile ($file = readdir($handler)) {\n\n\t\t\t// if $file isn't this directory or its parent, \n\t\t\t// add it to the results array\n\t\t\tif ($file != '.' && $file != '..')\n\t\t\t\t$results[] = $file;\n\t\t}\n\n\t\t// tidy up: close the handler\n\t\tclosedir($handler);\n\n\t\trsort($results);\n\t}\n\n // done!\n return $results;\n}", "protected function loadConfigurations(): array\n {\n $config = [];\n\n foreach ($this->getConfigurationFiles() as $key => $file) {\n $config[$key] = require $file;\n }\n\n return $config;\n }", "protected function _findConfigs()\n {\n foreach (new DirectoryIterator($this->_configPath) as $fileInfo) {\n if ($fileInfo->isDot()) {\n continue;\n }\n if ($fileInfo->isDir()) {\n continue;\n }\n if ($fileInfo->getExtension() !== 'xml') {\n continue;\n }\n\n $name = str_replace('.' . $fileInfo->getExtension(), '', $fileInfo->getFilename());\n $this->_configFiles[$name] = [\n 'name' => $name,\n 'basename' => $fileInfo->getBasename(),\n 'pathname' => $fileInfo->getPathname(),\n ];\n }\n }", "private function loadCss($dir)\n {\n $css = [];\n if(file_exists($dir.'objavi.css')){\n $css[] = file_get_contents($dir.'objavi.css');\n }\n if(file_exists($dir.'css/extra.css')){\n $css[] = file_get_contents($dir.'css/extra.css');\n }\n\n return $css;\n }", "private function loadLanguageFile($dir)\n {\n if (is_file($f = \"{$dir}{$this->coreI18N->language}_{$this->charSet}.php\")\n ||\n is_file($f = \"{$dir}{$this->coreI18N->language}.php\")\n ||\n is_file($f = \"{$dir}en.php\")\n ) {\n @include $f;\n } else {\n $lan = array();\n }\n\n return $lan;\n }", "public function loadAll()\n {\n $this->setAll(array());\n $d = dir($this->getPath());\n $this->load($d);\n $d->close();\n }", "private function loadArray(){\n if(file_exists($this->fullPath.$this->arrayFile)){\n include_once($this->fullPath.$this->arrayFile);\n if(!empty($arCfg)){\n $this->loadConfigs($arCfg);\n }\n }\n }", "protected function loadVersion($dir)\n {\n if (!defined('sugarEntry')) {\n define('sugarEntry', true);\n }\n\n $sugar_version = $sugar_flavor = null;\n include \"$dir/sugar_version.php\";\n $sugar_flavor = strtolower($sugar_flavor);\n return array($sugar_version, $sugar_flavor);\n }", "private function _parse( $dir )\n {\n foreach ( scandir( $dir ) as $file )\n {\n if ( '.' === $file || '..' === $file )\n {\n continue;\n }\n\n if ( is_dir( $dir . DS . $file ) )\n {\n $this->_dirs[ ] = $dir . DS . $file;\n\n $this->dirHandles[ ] = $dir . DS . $file;\n }\n elseif ( 'file' === filetype( $dir . DS . $file ) )\n {\n $this->fileHandles[ ] = $dir . DS . $file;\n }\n elseif ( 'link' === filetype( $dir . DS . $file ) )\n {\n $this->linkHandles[ ] = $dir . DS . $file;\n }\n }\n }", "protected function loadConfigsForRegister(): void\n {\n $shipConfigs = $this->getConfigsFromShip();\n $containersConfigs = $this->getConfigsFromContainers();\n\n $configs = array_merge($shipConfigs, $containersConfigs);\n\n foreach ($configs as $file){\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $this->mergeConfigFrom($file, $filename);\n }\n }", "public function readConfigFiles()\n {\n $sugar_config = array();\n if (is_readable('config.php')) {\n include 'config.php';\n }\n $oldConfig = $sugar_config;\n if (is_readable('config_override.php')) {\n include 'config_override.php';\n }\n return array($oldConfig, deepArrayDiff($sugar_config, $oldConfig));\n }", "function &loadModules($dirName) {\n\t\t// Ensure modules/ is on include_path\n\t\tset_include_path(implode(PATH_SEPARATOR, array(\n\t\t\trealpath($dirName),\n\t\t\tget_include_path(),\n\t\t)));\n\n\t\t$modules = array();\n\t\t$modulesDir = dir($dirName);\n\n\t\twhile (false !== ( $directory = $modulesDir->read() )) {\n\t\t\tif ($directory == \".\" || $directory == \"..\" || $directory == \".svn\" || !is_dir($modulesDir->path . \"/\" . $directory) || !is_file ($modulesDir->path . \"/\" . $directory . \"/config.json\") )\n\t\t\t\tcontinue;\n\n\t\t\t$directory = realpath($modulesDir->path . \"/\" . $directory);\n\t\t\t/** basename of this module * */\n\t\t\t$bn = basename($directory);\n\t\t\t/** namespace of this module * */\n\t\t\t$ns = $bn;\n\n\t\t\t$modules[$ns] = array(\n\t\t\t\t\"namespace\" => $ns,\n\t\t\t\t\"basePath\" => $directory,\n\t\t\t\t\"config\" => new Zend_Config_Json($directory . '/config.json', 'production', true)\n\t\t\t);\n\t\t}\n\n\t\treturn $modules;\n\t}", "public function getConfigFiles()\n {\n $configs = [];\n\n foreach ($this->getSearchPaths() as $alias) {\n $path = Yii::getAlias($alias);\n $files = FileHelper::findFiles($path, ['only' => ['*/' . self::CONFIG_FILE]]);\n\n foreach ($files as $file) {\n try {\n $config = require($file);\n $config['basePath'] = dirname($file);\n $configs[] = $config;\n } catch (Exception $e) {\n Yii::trace(\"Failed loading module config.php file for {$file}: {$e->getMessage()}\", __METHOD__);\n }\n }\n\n usort($configs, function ($configA, $configB) {\n if (isset($configA['weight'], $configB['weight'])) {\n return (int)$configA['weight'] > (int)$configB['weight'];\n }\n\n return 0;\n });\n }\n\n return $configs;\n }", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function gatherJSON($dir=NULL) {\n\n\t\t$dir = $dir !== NULL ? rtrim($dir, '/') : '';\n\n\t\t// TODO: check if glob(...) returns an array first\n\t\t$menuFiles = glob($dir . '/*/menu.json');\n\t\tif(is_array($menuFiles)) {\n\n\t\t\tforeach($menuFiles AS $item) {\n\n\t\t\t\tif(is_file($item)) {\n\n\t\t\t\t\t$content = json_decode(file_get_contents($item), true);\n\t\t\t\t\tif($content != NULL) {\n\t\t\t\t\t\t$content['controller'] = $content['controller'] ? $content['controller'] : basename(dirname($item));\n\t\t\t\t\t\t$this->JSON[] = $content;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$dirs = glob($dir . '/*', GLOB_ONLYDIR);\n\t\tif(is_array($dirs)) {\n\t\t\tforeach(glob($dir . '/*', GLOB_ONLYDIR) AS $subdirs) {\n\t\t\t\t$this->gatherJSON($subdirs);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\n\t}", "static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "public static function init() {\n foreach (static::$dirs as $dir) {\n if($phpFiles = glob($dir . DIRECTORY_SEPARATOR . '*.php')) {\n foreach ($phpFiles as $phpFile) {\n $namespace = basename($phpFile, '.php');\n static::$config[$namespace] = require_once $phpFile;\n }\n }\n }\n }", "public static function getDirContents($dir, &$results = array())\n {\n $files = scandir($dir);\n\n foreach($files as $key => $value){\n $path = realpath($dir.DIRECTORY_SEPARATOR.$value);\n if(!is_dir($path)) {\n $results[] = $path;\n } else if($value != \".\" && $value != \"..\") {\n self::getDirContents($path, $results);\n $results[] = $path;\n }\n }\n\n return $results;\n }", "protected static function get_configs() : array\n\t{\n\t\t$inc_paths = Kohana::include_paths();\n\n\t\t// Remove default configurations (SYSPATH)\n\t\tarray_pop($inc_paths);\n\n\t\t$configs = [];\n\n\t\t// Loop through paths\n\t\tforeach ($inc_paths as $inc_path)\n\t\t{\n\t\t\tforeach ((array)glob($inc_path.'/config/*.php') as $filename)\n\t\t\t{\n\t\t\t\t$filename = pathinfo($filename, PATHINFO_FILENAME);\n\n\t\t\t\tif (in_array($filename, (array)Kohana::$config->load('debug_toolbar.skip_configs'), TRUE))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( ! isset($configs[$filename]))\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$configs[$filename] = Kohana::$config->load($filename)->as_array();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$configs[$filename] = NULL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tksort($configs);\n\n\t\treturn $configs;\n\t}", "function getList($dir, $arr = []){\n $d = dir($dir);\n while (false !== ($entry = $d->read())) {\n if($entry === \".\" || $entry === \"..\"){\n continue;\n }\n if(is_dir($dir.\"/\".$entry)){\n $arr = getList($dir.\"/\".$entry,$arr);\n }else{\n $arr[] = [$dir,explode(\".\",$entry)[0]];\n }\n }\n $d->close();\n\n return $arr;\n}", "function get_dir_contents($dir)\n\t{\n\t\t$contents = Array();\n\t\t\n\t\tif ($handle = opendir($dir))\n\t\t{\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\t$contents[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"directory opening fails\";\n\t\t}\n\t\treturn $contents;\n\t}", "public function getLoadedConfigFiles() {\n return $this->_files;\n }", "static public function dirToArray($dir)\n {\n $result = array();\n $cdir = scandir($dir);\n foreach ($cdir as $key => $value) {\n if (!in_array($value, array('.', '..', '.git', 'nbproject', 'DocDevel'))) {\n if (is_dir($dir . DIRECTORY_SEPARATOR . $value)) {\n $result[$value] = self::dirToArray($dir . DIRECTORY_SEPARATOR . $value);\n } else {\n $result[] = $value;\n }\n }\n }\n return $result;\n }", "static public function import($dir)\n\t{\n\t\t$dh = opendir($dir);\n\t\twhile (false !== ($file = readdir($dh)))\n\t\t{\n\t\t\t$tmp = explode('.', $file);\n\t\t\tif (end($tmp) == 'php')\n\t\t\t{\n\t\t\t\trequire_once $dir . '/' . $file;\n\t\t\t}\n\t\t}\n\t\treturn closedir($dh); \n\t}", "private function getItems($dir)\n {\n $items = [];\n $this->collectItems($dir, $items);\n usort($items, function ($a, $b) {\n return ($a[1] > $b[1]);\n });\n\n if (count($items) > 0) {\n return $items;\n }\n return false;\n }", "private function loadConfigFiles()\n { if (!$this->configFiles) {\n $this->configFiles[] = 'config.neon';\n }\n\n foreach ($this->configFiles as $file) {\n $this->configurator->addConfig($this->paths->getConfigDir().'/'.$file);\n }\n }", "function getDirContents(string $dir, array $excludeFiles=array()): array\n {\n $results = array();\n $files = scandir($dir);\n\n foreach($files as $value){\n\n if(!is_dir($dir. DIRECTORY_SEPARATOR .$value)){\n if (strstr($value, 'Test.php') !== false) {\n array_push($results,array(\"file\"=>$value,\"dir\"=>$dir. DIRECTORY_SEPARATOR));\n }\n } else if(is_dir($dir. DIRECTORY_SEPARATOR .$value) && !in_array($value,$excludeFiles)) {\n $rr=$this->getDirContents($dir. DIRECTORY_SEPARATOR .$value,$excludeFiles);\n $results=array_merge($results, $rr);\n }\n }\n return $results;\n }", "public function getHCConfig(string $directory): array\n {\n return json_decode(file_get_contents($directory . '/hc-config.json'), true);\n }", "function index($dir = '.') {\n\t\t$index = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (isAllowedFile($dir.'/'.$file)) $index[preg_replace(\"/^\\.\\//i\",\"\",$dir.'/'.$file)] = filemtime($dir.'/'.$file);\n\t\t\t\t\telseif (is_dir($dir.'/'.$file)) $index = array_merge($index, index($dir.'/'.$file));\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $index;\n\t}", "private function resources($dir) {\n\t\treturn array_map(function($file) {\n\t\t\t$parts=explode(DS,$file);\n\t\t\treturn str_replace('.md','',end($parts));\n\t\t},@glob(str_replace('/',DS,$dir).'*.md'));\n\t}", "function load_files_from_dir($dir) {\n\n\t$catalog = opendir($dir);\n\n\twhile ($filename = readdir($catalog )) // перебираем наш каталог \n\t{\n\t\t\tif (getEndFile($filename) === 'functions.php') {\n\t\t\t\t$filename = $dir.'/'.$filename;\n\t\t\t\tinclude($filename); // один раз подрубаем, чтоб не повторяться \n\t\t\t}\n\t}\n\n\tclosedir($catalog);\n\n}", "function get_config_filenames()\n{\n global $config;\n $configs = array();\n $dh = opendir($config['paths']['config'] . \"/\");\n while (false !== ($filename = readdir($dh))) {\n if (substr($filename, -4) == '.php' && substr($filename, -9) != '.conf.php' && $filename != 'dbs_manual.php') {\n $configs[] = substr($filename, 0, -4);\n }\n }\n\n return $configs;\n}", "function getFilesFromDir($dir) {\r\n $filesArray = scandir($dir);\r\n array_shift($filesArray);\r\n array_shift($filesArray);\r\n return $filesArray;\r\n}", "function loadTests($dirPath)\n{\n global $recursive;\n global $src;\n global $in;\n global $out;\n global $rc;\n\n # get content of directory\n $files = scandir($dirPath);\n\n foreach ($files as $file) {\n if ($file === \".\" || $file === \"..\") {\n continue;\n }\n if ($recursive === 1 && is_dir($dirPath.'/'.$file) ) {\n loadTests($dirPath.'/'.$file);\n }\n if (preg_match('/^[\\p{L}*[0-9]*]*\\.src$/u',$file) == 1) {\n $src[] = $dirPath.'/'.$file;\n }\n if (preg_match('/^[\\p{L}*[0-9]*]*\\.in$/u',$file) == 1) {\n $in[] = $dirPath.'/'.$file;\n }\n if (preg_match('/^[\\p{L}*[0-9]*]*\\.out$/u',$file) == 1) {\n $out[] = $dirPath.'/'.$file;\n }\n if (preg_match('/^[\\p{L}*[0-9]*]*\\.rc$/u',$file) == 1) {\n $rc[] = $dirPath.'/'.$file;\n }\n }\n}", "private function loadFiles()\n {\n $finder = new Finder();\n\n foreach (Config::get('routing_dirs') as $directory) {\n $finder\n ->files()\n ->name('*.yml')\n ->in($directory)\n ;\n\n foreach ($finder as $file) {\n $resource = $file->getRealPath();\n $this->routes = array_merge($this->routes, Yaml::parse(file_get_contents($resource)));\n }\n }\n }", "public function getFiles($dir)\n {\n return Filesystem::getAll(path($dir), 'php');\n }", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "private function searchFiles($dir)\n {\n $this->searchedFiles = array();\n\n $this->recSearchFiles($this->basePath . $dir);\n\n return $this->searchedFiles;\n }", "function getDirContents($dir)\n{\n $handle = opendir($dir);\n if (!$handle)\n return array();\n $contents = array();\n while ($entry = readdir($handle)) {\n if ($entry == '.' || $entry == '..')\n continue;\n \n $entry = $dir . DIRECTORY_SEPARATOR . $entry;\n if (is_file($entry)) {\n $contents[] = $entry;\n } else if (is_dir($entry)) {\n $contents = array_merge($contents, getDirContents($entry));\n }\n }\n closedir($handle);\n return $contents;\n}", "private function getFileList($dir) {\n\t\t// When we require PHP5.4, use RecursiveDirectoryIterator.\n\t\t// Until then..\n\n\t\t$retarr = array();\n\t\t$this->recurseDirectory($dir, $retarr, strlen($dir)+1);\n\t\treturn $retarr;\n\t}", "public function getDirectoryConfig();", "public function testDir_EagerLoad()\n {\n $config = new Config_Dir($this->dir, array('transformer'=>'from-mock', 'ext'=>'mock','loadall'=>true));\n\n $this->assertType('Q\\Config_Dir', $config);\n\n $this->assertArrayHasKey('dir1', (array)$config);\n $this->assertArrayHasKey('dir2', (array)$config);\n $this->assertArrayHasKey('file1', (array)$config);\n\n $this->assertArrayHasKey('file3', (array)$config['dir1']);\n $this->assertArrayHasKey('file4', (array)$config['dir1']); \n }", "public function getDirContent(){\n $files = [\n 'errors' => '',\n 'path' => $this->path,\n 'value' => []\n ];\n\n //if it's not a dir then return error\n if(!$this->isDir) {\n $files['errors'] = 'Only dir may include files';\n return $files;\n }\n\n $dir = opendir($this->path);\n\n //read content of dir\n while($file = readdir($dir)){\n if(in_array($file, $this->exclude))\n continue;\n\n $files['value'][] = $this->getFileInfo($file, ($this->path).$file);\n }\n\n return $files;\n }", "function get_config_filelist()\n{\n global $config;\n $default = $config['config_file'];\n clearstatcache();\n $dh = opendir($config['paths']['config']);\n $r = \"\";\n while (false !== ($filename = readdir($dh))) {\n if ($filename != \".\" && $filename != \"..\" && !is_dir($config['paths']['config'] . $filename)\n && substr(\n $filename,\n -9\n ) == \".conf.php\"\n ) {\n $f = substr($filename, 0, strlen($filename) - 9);\n $r .= '<option value=\"' . $f . '\" ';\n if ($f == $default) {\n $r .= ' selected';\n }\n $r .= '>&nbsp;&nbsp;' . $f . '&nbsp;&nbsp;</option>' . \"\\n\";\n }\n }\n\n return $r;\n}", "protected function loadConfig($rootDir)\n {\n // Require the config */\n require_once $this->normalizePath($rootDir) . '/config.php';\n }", "public function getIniFiles()\n {\n // initialize array of ini files\n $iniFiles = array();\n \n // loop over directories\n foreach ($this->configDirs as $dir) {\n \n if (is_dir($dir)) {\n\n // open directory ...\n if ($dirHandle = opendir($dir)) {\n \n // ... and iterate of the file therein\n while (($file = readdir($dirHandle)) !== FALSE) {\n \n // check file extension\n $pathParts = pathinfo($dir . DIRECTORY_SEPARATOR . $file);\n if ($pathParts['extension'] == 'ini') {\n \n // we found a .ini file\n $iniFiles[] = $dir . DIRECTORY_SEPARATOR . $file;\n }\n }\n closedir($dirHandle);\n }\n }\n }\n\n return $iniFiles;\n }", "public function testDir_LazyLoad()\n {\n $config = new Config_Dir($this->dir, array('transformer'=>'from-mock', 'ext'=>'mock'));\n\n $this->assertType('Q\\Config_Dir', $config);\n $this->assertEquals(array(), (array)$config);\n \n $cfg_file1 = $config['file1'];\n $this->assertType('Q\\Config_File', $cfg_file1);\n $this->assertEquals(array(\"db\"=>array(\"host\"=>\"localhost\", \"dbname\"=>\"test\",\"user\"=>\"myuser\",\"pwd\"=>\"mypwd\"),\"output\"=>\"xml\",\"input\"=>\"json\"), (array)$cfg_file1);\n $this->assertArrayHasKey('file1', (array)$config);\n $this->assertArrayNotHasKey('dir1', (array)$config);\n\n $cfg_dir1 = $config['dir1'];\n $this->assertType('Q\\Config_Dir', $cfg_dir1);\n $this->assertEquals(array(), (array)$cfg_dir1);\n $this->assertArrayHasKey('file1', (array)$config);\n $this->assertArrayHasKey('dir1', (array)$config); \n }", "public static function load($dir) {\n $dir = dirname($dir) . DS;\n \n foreach (glob(\"{$dir}*/\") as $plugin) {\n if (is_dir($plugin)) {\n $name = end(preg_split('/\\//', $plugin, -1, PREG_SPLIT_NO_EMPTY));\n $filename = \"{$plugin}{$name}.php\";\n\n if (file_exists($filename)) {\n include $filename;\n $class = '\\\\plugins\\\\frontend\\\\' . ucfirst($name);\n \n if (class_exists($class)) {\n $o = new $class();\n $o instanceof Plugin and static::$plugins[] = $o;\n }\n }\n }\n }\n }", "public function loadConfig($file) {\n $config = array();\n if (file_exists(PATH_CONFIGS . $file))\n include(PATH_CONFIGS . $file);\n if (!empty($config)) {\n foreach ($config as $name => $array) {\n $this->configs[$name] = $array;\n }\n }\n }", "protected function getConfigurationFiles(): array\n {\n $configPath = $this->rootPath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR;\n\n $files = [];\n foreach (scandir($configPath) as $file) {\n if (fnmatch('*.php', $file)) {\n $files[basename($file, '.php')] = $configPath . $file;\n }\n }\n\n return $files;\n }", "function _getFilesInDir($dir)\n {\n $files = array();\n if (!is_dir($dir)) {\n return $files;\n }\n \n $dh = dir( $dir );\n while ($entry = $dh->read()) {\n if ($entry == \".\" || $entry == \"..\") {\n continue;\n }\n if (is_readable($dir.\"/\".$entry)) {\n array_push($files,$entry);\n }\n }\n return $files;\n }", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "public function collectYamlFiles()\r\n {\r\n $folder = array($this->app_root.'/config');\r\n $files_found = $this->findFiles(\r\n $folder,\r\n array(\"yml\"),\r\n array(\"parameters.yml\")\r\n );\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "private function populateCategory($catdir)\n {\n $this->category_dir = $catdir;\n $catfiles = [];\n if ($handle = opendir($this->category_dir)) {\n while (false !== ($htmlfile = readdir($handle))) {\n if ($htmlfile != \".\" && $htmlfile != \"..\" && !is_dir($this->category_dir.'/'.$htmlfile)) {\n $catfiles[] = $this->getCategoryContent($htmlfile);\n }\n }\n closedir($handle);\n return $catfiles;\n } else {\n return [];\n }\n }", "private function loadJsonTranslations(string $dirPath): LocaleCollection\n {\n $locales = new LocaleCollection;\n\n foreach ($this->filesystem->directories($dirPath) as $path) {\n if ($this->isExcluded($path))\n continue;\n\n foreach ($this->filesystem->files($path) as $file) {\n if ($file->getExtension() === 'json') {\n $locales->addOne(\n new Locale($file->getBasename('.json'), $file->getRealPath())\n );\n break;\n }\n }\n }\n\n return $locales;\n }", "protected static function getClassesFromDir($dir)\n\t{\n\t\t$classes = array();\n\n\t\t$path = Manager::getDocRoot() . $dir;\n\t\tif (($handle = opendir($path)))\n\t\t{\n\t\t\twhile ((($entry = readdir($handle)) !== false))\n\t\t\t{\n\t\t\t\tif ($entry != '.' && $entry != '..')\n\t\t\t\t{\n\t\t\t\t\t$classes[] = mb_strtoupper(pathinfo($entry, PATHINFO_FILENAME));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $classes;\n\t}", "function getSortFileList($config) {\n\t$handle = opendir($config['path']);\n\t// holder array for the files that will be found\n\t$arr_file = array();\n\t// check if the handle was opened correctly\n\tif($handle) {\n\t\t// iterate through the directory\n\t\twhile(false !== ($file = readdir($handle))) {\n\t\t\t// make sure we have a file and not . or ..\n\t\t\tif(!is_dir($file) && $file != '.' && $file != '..') {\n\t\t\t\t// get the stat info on the file, this is an array\n\t\t\t\t$stat = stat($config['path'] . $file);\n\t\t\t\t// add the current file to the array\n\t\t\t\t// key is the last modified time\n\t\t\t\t// value is the file name\n\t\t\t\t$arr_file[$stat[$config['time']]] = $file;\n\t\t\t}\n\t\t}\n\t\t// close the resource\n\t\tclosedir($handle);\n\t}\n\t// check that the arry isn't empty\n\tif(!empty($arr_file)) {\n\t\t// determine the way to sort\n\t\tswitch($config['sort']) {\n\t\t\tcase 'ksort':\n\t\t\t\t// sort the array by key - this will leave\n\t\t\t\t// an array sorted from oldest file to newest\n\t\t\t\tksort($arr_file);\n\t\t\t\t// done\n\t\t\t\tbreak;\n\t\t\tcase 'krsort':\n\t\t\t\t// sort the array by key - this will leave\n\t\t\t\t// an array sorted from newest file to oldest\n\t\t\t\tkrsort($arr_file);\n\t\t\t\t// done\n\t\t\t\tbreak;\n\t\t}\t\n\t}\n\t// return the sorted file\n\treturn $arr_file;\n}", "function updateConfigCache() {\n\t$config_path = 'config';\n\t$cache_path = 'cache';\n\t\n\t$cache_file_name = 'config.php';\n\t\n\t$config_files = scandir($config_path);\n\t\n\t$output = [];\n\t\n\tforeach($config_files as $config_file) {\n\t\tif($config_file == '.' or $config_file == '..') {\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\tif(is_file($config_path.'/'.$config_file)) {\t\n\t\t\t$config_file_name = explode('.', $config_file);\n\t\t\tif($config_file_name[count($config_file_name)-1] == 'json') {\n\t\t\t\t$config_file_namepart = '';\n\t\t\t\tforeach($config_file_name as $id => $namepart) {\n\t\t\t\t\tif($id != count($config_file_name)-1) {\n\t\t\t\t\t\tif($config_file_namepart != '') {\n\t\t\t\t\t\t\t$config_file_namepart .= '.'.$namepart;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$config_file_namepart = $namepart;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$config_file_name = $config_file_namepart;\n\t\t\t\t\n\t\t\t\t$output[$config_file_name] = getConfig($config_file);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfile_put_contents($cache_path.'/'.$cache_file_name, sprintf('<?php return %s; ?>', var_export($output, true)));\n}", "private function config_file_listing($includenull = false) {\n\n\t\t$this->EE->load->helper('directory');\n\t\t$map = $map = directory_map(PATH_THIRD.'dm_eeck/config/',1);\n\n\t\t$out = array();\n\n\t\tif($includenull) {\n\t\t\t$out[] = $this->EE->lang->line('dm_eeck_global_default');\n\t\t}\n\n\t\t$name = '';\n\n\t\tforeach($map as $file) {\n\t\t\tunset($name);\n\t\t\tinclude(PATH_THIRD.'dm_eeck/config/'.$file);\n\t\t\tif(!isset($name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$out[$file] = $name;\n\t\t}\n\n\t\treturn $out;\n\t}", "public static function loadConfigs($files) {\n self::load_files_from_dir($files, APP_CONF_DIR);\n }", "private function dirToArray(string $dir): array\n {\n $result = array();\n $cdir = scandir($dir);\n\n foreach ($cdir as $value) {\n if (!in_array($value, array(\".\", \"..\"))) {\n if (is_dir($dir . DIRECTORY_SEPARATOR . $value)) {\n $result[$value] = $this->dirToArray($dir . DIRECTORY_SEPARATOR . $value);\n } else {\n $result[] = $value;\n }\n }\n }\n return $result;\n }", "private function getFileStruct($dir){\n $command = \"find \". $dir . \" -name '*.md'\";\n $list = array();\n\n exec ( $command, $list );\n\n $output = new \\StdClass;\n $list = array_reverse($list);\n\n\n $pages = array();\n\n\n\n foreach ($list as $path) {\n $relpath = str_replace($dir, '', $path);\n $info = $this->getFileInfo($path);\n $info['fullpath'] = $path;\n\n $part = explode('/', $relpath);\n $relfile = str_replace('.md', '', $part[count($part)-1]);\n\n\n $slug = $relpath;\n if (substr($slug, -9) == '/index.md'){\n $slug = str_replace('index.md','', $slug);\n } else {\n $slug = str_replace('.md','/', $slug);\n }\n $pages[$slug] = (object) $info;\n\n }\n\n\n $this->flatStruct = $pages;\n }", "public function getAllConfigs()\r\n\t{\r\n\t\treturn $this->arrConfig;\r\n\t}", "abstract public function loadConfig(array $config);", "private function parseConfig($configDir) {\n $localConfig = $configDir . Config::$CONFIG_DIR_PREFIX . 'messages.ini';\n if (file_exists($localConfig)) {\n if (count($this->messages) > 0) {\n $this->messages = array_merge($this->messages, Ini::parse($localConfig));\n } else {\n $this->messages = Ini::parse($localConfig);\n }\n }\n }", "public function allConfig() {\n return $this->getConfigAugment()->all();\n }", "private function getFolderContent($dir)\n {\n $finder = Finder::create()\n ->ignoreVCS(false)\n ->ignoreDotFiles(false)\n ->depth(0)\n ->in($dir);\n\n return iterator_to_array($finder);\n }", "public function loadAll()\n {\n $result = [];\n $paths = $this->discovery()->findAllGroupAliasFiles();\n foreach ($paths as $path) {\n $result = array_merge($result, $this->loadAllRecordsFromGroupAliasPath($path));\n }\n $paths = $this->discovery()->findAllSingleAliasFiles();\n foreach ($paths as $path) {\n $aliasRecords = $this->loadSingleSiteAliasFileAtPath($path);\n foreach ($aliasRecords as $aliasRecord) {\n $this->storeAliasRecordInResut($result, $aliasRecord);\n }\n }\n ksort($result);\n return $result;\n }", "private function _get_categories($dir)\n\t{\n\t\t$categories = array();\n\n\t\tee()->load->model(array('file_upload_preferences_model', 'category_model'));\n\n\t\t$category_group_ids = ee()->file_upload_preferences_model->get_file_upload_preferences(NULL, $dir['id']);\n\t\t$category_group_ids = explode('|', $category_group_ids['cat_group']);\n\n\t\tif (count($category_group_ids) > 0 AND $category_group_ids[0] != '')\n\t\t{\n\t\t\tforeach ($category_group_ids as $category_group_id)\n\t\t\t{\n\t\t\t\t$category_group_info = ee()->category_model->get_category_groups($category_group_id);\n\t\t\t\t$categories[$category_group_id] = $category_group_info->row_array();\n\t\t\t\t$categories_for_group = ee()->category_model->get_channel_categories($category_group_id);\n\t\t\t\t$categories[$category_group_id]['categories'] = $categories_for_group->result_array();\n\t\t\t}\n\t\t}\n\n\t\treturn $categories;\n\t}", "private function get_filelist_as_array($dir = 'images/', $recursive = true, $basedir = '')\n {\n if ($dir == '') {return array();} else {$results = array(); $subresults = array();}\n if (!is_dir($dir)) {$dir = dirname($dir);} // so a files path can be sent\n if ($basedir == '') {$basedir = realpath($dir).DIRECTORY_SEPARATOR;}\n\n $files = scandir($dir);\n foreach ($files as $key => $value){\n if ( ($value != '.') && ($value != '..') ) {\n $path = realpath($dir.DIRECTORY_SEPARATOR.$value);\n if (is_dir($path)) { // do not combine with the next line or..\n if ($recursive) { // ..non-recursive list will include subdirs\n $subdirresults = self::get_filelist_as_array($path,$recursive,$basedir);\n $results = array_merge($results,$subdirresults);\n }\n } else { // strip basedir and add to subarray to separate file list\n $subresults[] = str_replace($basedir,'',$path);\n }\n }\n }\n // merge the subarray to give the list of files then subdirectory files\n if (count($subresults) > 0) {$results = array_merge($subresults,$results);}\n return $results;\n }", "abstract protected function loadConfig(array $config);", "public static function includeArray($file, $dir=null) {\n\t\t$res = array();\n\t\t\n\t\t//find and include main file from application root\n\t\t$mainFile = self::findCommonFile($file, $dir);\n\t\tif ($mainFile)\n\t\t\t$res = include($mainFile);\n\t\t\n\t\t//find and include local file\n\t\t$localFile = self::findLocalFile($file, $dir);\n\t\tif ($localFile)\n\t\t\t$res = CMap::mergeArray($res, include($localFile));\n\t\t\n\t\treturn $res;\n\t}", "public static function load()\n {\n $configFile = self::getConfigFilePath();\n\n if (!is_file($configFile)) {\n self::save([]);\n }\n\n $config = require($configFile);\n\n if (!is_array($config))\n return array();\n\n return $config;\n }", "protected function _generateContentMap($content_dir) {\n\t\t$files = $this->_readDirectoryRecursive($content_dir);\n\t\t\n\t\t//var_dump($files);exit;\n\t\t\n\t\t$content_map = array();\n\n\t\t$category = '';\n\t\t\n\t\tfor($i = 0; $i < count($files); $i++) {\n\n\t\t\t/*\n\t\t\t * The first directly level specifies the menu categories\n\t \t\t */\n\n\t\t\tif( ! is_array($files[$i]) && is_dir($files[$i]) ) {\n\t\t\t\t\n\t\t\t\t$category = trim(\n\t\t\t\t\tstr_replace($content_dir, '', $files[$i]), '/');\n\t\t\t\t\n\t\t\t\t$content_map[$category] = array();\n\t\t\t\t\t\t\t\t\n\t\t\t} else if( is_array($files[$i]) ) {\n\t\t\t\t\n\t\t\t\t /*\n\t\t\t\t * The second level specifies the actual content\n\t\t\t\t */\t\t\n\t\t\t\t\n\t\t\t\tfor($j = 0; $j < count($files[$i]); $j++) {\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * We construct an array of data to be used in the render process\n\t\t\t\t\t */ \n\t\t\t\t\t\n\t\t\t\t\t//var_dump( $files[$i][$j] );\n\t\t\t\t\tif( is_array($files[$i][$j]) ) {\n\t\t\t\t\t\n\t\t\t\t\t\t$content_map[$category][] = $this->_generateProjectData(\n\t\t\t\t\t\t\t$content_dir,\n\t\t\t\t\t\t\t$files[$i][$j]\n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\t * The last step is to sort the content_map by date\n\t\t */ \n\t\tforeach($content_map as $key => $value) {\n\t\t\n\t\t\tusort($content_map[$key], function($a, $b) {\n\t\t\t\t// var_dump($a);\n\t\t\t\t// var_dump($b);\n\t\t\t\t// exit;\n \t\treturn @strtotime($a['date']) < @strtotime($b['date']);\n \t\t});\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t//var_dump($content_map);exit;\n\t\t\t\t\n\t\treturn $content_map;\n\t\n\t}", "protected function findTestCasesInDir($dir) {\r\n\t\tif (!is_dir($dir)) {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\r\n\t\t$pathLength = strlen($dir);\r\n\t\t$fileNames = t3lib_div::getAllFilesAndFoldersInPath(\r\n\t\t\t\tarray(), $dir, 'php'\r\n\t\t);\r\n\t\r\n\t\t$testCaseFileNames = array ();\r\n\t\tforeach ($fileNames as $fileName) {\r\n\t\t\tif ((substr($fileName, -12) === 'testcase.php')\r\n\t\t\t\t\t|| (substr($fileName, -8) === 'Test.php')\r\n\t\t\t) {\r\n\t\t\t\t$testCaseFileNames[] = substr($fileName, $pathLength);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$extensionsArr = array();\r\n\t\tif (!empty($testCaseFileNames)) {\r\n\t\t\tsort($testCaseFileNames);\r\n\t\t\t$extensionsArr[$dir] = $testCaseFileNames;\r\n\t\t}\r\n\t\r\n\t\treturn $extensionsArr;\r\n\t}", "function _require_all( $dir ) {\n\t$scan = glob( \"$dir/*\" );\n\tforeach ( $scan as $path ) {\n\t\tif ( preg_match( '/\\.php$/', $path ) ) {\n\t\t\trequire_once $path;\n\t\t} elseif ( is_dir( $path ) ) {\n\t\t\t_require_all( $path );\n\t\t}\n\t}\n}", "public static function scanForVersions($dir) {\n $versions = [];\n $iterator = new DirectoryIterator($dir);\n\n foreach ($iterator as $fileinfo) {\n $filename = $fileinfo->getFilename();\n if (\n !$fileinfo->isDir() || $fileinfo->isDot() || !VersionCollection::isCorrectVersion($filename)\n ) {\n continue;\n }\n\n $versions[] = VersionCollection::createItem($filename);\n }\n\n return $versions;\n }", "private function getAllConfig() {\n $this->user_panel->checkAuth();\n $this->config->findAll();\n }", "private function _loadConfig($filename)\n\t{\t\n\t\tif (!isset($config[$filename]))\n\t\t{\n\t\t\t$path = $this->pathToConfig . $filename . '.php';\n\t\t\tif (file_exists($path))\n\t\t\t{\n\t\t\t\trequire($this->pathToConfig . $filename . '.php');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Config file {$path} does not exist!\");\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * $config is the array found in ALL config files stored in $this->pathToConfig/\n\t\t */\n\t\treturn $config;\n\t}", "private function _directory_info($dir)\n\t{\n\t\tee()->load->model('file_model');\n\n\t\treturn array(\n\t\t\t'url' \t\t\t=> $dir['url'],\n\t\t\t'file_count'\t=> ee()->file_model->count_files($dir['id']),\n\t\t\t'image_count'\t=> ee()->file_model->count_images($dir['id'])\n\t\t);\n\t}", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "function get_config(){\n\t\t\t$arr = array();\n\t\t\n\t\t// Try to get the configuration data \n\t\t// from a cached config file\n\t\t// \n\t\t// Added a disable option in 1.2.1 - dpd\n\t\t\t$disable_cache = ($this->config->item('br_disable_system_cache') === TRUE) ? 1 : 0;\n\t\t\tif($disable_cache == 0){\n\t\t\t\tif($str=read_from_cache('config')){\n\t\t\t\t\t$arr = unserialize($str);\n\t\t\t\t\treturn $arr;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t// Get the store config \n\t\t\t$this->EE->db->select('\ts.*, \n\t\t\t\t\t\t\t\tc.code as currency,\n\t\t\t\t\t\t\t\tc.currency_id,\n\t\t\t\t\t\t\t\tc.marker as currency_marker')\n\t\t\t\t\t\n\t\t\t\t\t->from('br_store s')\n\t\t\t\t\t->join('br_currencies c','c.currency_id = s.currency_id');\t\n\t\t\t$query = $this->EE->db->get();\n\t\t\tforeach ($query->result_array() as $row){\n\t\t\t\t$arr[\"store\"][$row[\"site_id\"]] = $row;\n\t\t\t}\n\n\t\t// Get the config data for each item\n\n\t\t\t$this->EE->db->select('*')->from('br_config_data')->order_by('sort');\n\t\t\t$query = $this->EE->db->get();\n\t\t\tforeach ($query->result_array() as $row){\n\t\t\t\t$data[$row['config_id']][] = $row;\n\t\t\t}\n\t\t\t\n\t\t// Get the items\n\n\t\t\t$this->EE->db->select('*')->from('br_config')->order_by('sort');\n\t\t\t$query = $this->EE->db->get();\n\t\t\tforeach ($query->result_array() as $row){\n\t\t\t\t$arr[$row[\"type\"]][$row[\"site_id\"]][$row[\"code\"]] = $row;\n\t\t\t\tif(isset($data[$row[\"config_id\"]])){\n\t\t\t\t\t$arr[$row[\"type\"]][$row[\"site_id\"]][$row[\"code\"]][\"config_data\"] = $data[$row[\"config_id\"]];\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Save the new array to cache\n\t\t\tsave_to_cache('config',serialize($arr));\n\t\t\treturn $arr;\n\t}", "private function _discover() {\n\n $dir = new DirectoryIterator($this->dirname);\n\n foreach ($dir as $file) {\n\n if ($file->isFile() && !$file->isDot()) {\n\n $filename = $file->getFilename();\n $pathname = $file->getPathname();\n\n if (preg_match('/^(\\d+\\W*)?(\\w+)\\.php$/', $filename, $matches)) {\n require_once($pathname);\n $class = \"{$matches[2]}_{$this->suffix}\";\n $files[$filename] = new $class();\n }\n\n }\n\n }\n\n ksort($files);\n $plugins = array_values($files);\n\n return $plugins;\n\n }", "function GetContents($dir,$files=array()) \n{\n if(!($res=opendir($dir))) exit(\"$dir doesn't exist!\");\n while(($file=readdir($res))==TRUE) \n if($file!=\".\" && $file!=\"..\")\n if(is_dir(\"$dir/$file\")) $files=GetContents(\"$dir/$file\",$files);\n else array_push($files,\"$dir/$file\");\n \n closedir($res);\n return $files;\n}", "protected static function getRouteFiles(string $dir, array &$results = []): array\n {\n $files = scandir($dir);\n foreach ($files as $key => $value) {\n $path = realpath($dir . DIRECTORY_SEPARATOR . $value);\n if (!is_dir($path)) {\n $results[] = $path;\n } else if ($value !== \".\" && $value !== \"..\") {\n self::getRouteFiles($path, $results);\n }\n }\n return $results;\n }" ]
[ "0.6625902", "0.64870507", "0.6368991", "0.6287424", "0.62823313", "0.62162024", "0.6165398", "0.6092302", "0.58190835", "0.58100176", "0.58020794", "0.5790474", "0.5781771", "0.57182914", "0.5700125", "0.5699668", "0.563929", "0.5620406", "0.559804", "0.55779284", "0.5550268", "0.5540746", "0.55358297", "0.5506896", "0.54953027", "0.54851174", "0.5477649", "0.5430612", "0.5429487", "0.54265034", "0.5420023", "0.5407588", "0.53899276", "0.5375141", "0.5367807", "0.53396666", "0.5335621", "0.5330087", "0.5329466", "0.5318417", "0.5305716", "0.53027606", "0.52992135", "0.5292377", "0.5280625", "0.52802044", "0.52669364", "0.52650946", "0.5257259", "0.5248253", "0.52460545", "0.52401155", "0.5238795", "0.5229664", "0.5225482", "0.5219275", "0.52069837", "0.5179252", "0.5176441", "0.5174852", "0.51721156", "0.5171316", "0.51596266", "0.5147788", "0.51436585", "0.51410353", "0.51361024", "0.5127911", "0.51274407", "0.5123177", "0.5121073", "0.51152503", "0.5113293", "0.5095004", "0.50925857", "0.5078218", "0.5069956", "0.50600415", "0.5058558", "0.5058479", "0.50578284", "0.50568426", "0.50531155", "0.50530577", "0.5051352", "0.50439775", "0.50216264", "0.50206804", "0.5012388", "0.50116545", "0.50000435", "0.4999395", "0.4997098", "0.49960446", "0.4984736", "0.49703276", "0.49661896", "0.49386448", "0.49270052", "0.49256018" ]
0.74778056
0
Get the value of a limit.
function gtlim(string $lim) { return LS_LIMITS[$lim]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_limit();", "public function get_limit(){\r\n return $this->limit;\r\n }", "public function Limit()\n {\n return $this->limit;\n }", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit() {}", "protected function getLimit()\n {\n return (int)$this->getSettingsValue('limit');\n }", "public function getLimit() {\n\t\treturn $this->limit;\n\t}", "public function getLimit()\n {\n return isset($this->limit) ? $this->limit : 0.0;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit() {\n return $this->limit;\n }", "public function getLimit ()\r\n\t{\r\n\t\treturn $this->limit;\r\n\t}", "function getLimit() ;", "public function getLimit()\n {\n return $this->_limit;\n }", "function getLimit(){\n\t\t\treturn $this->limite;\n\t\t}", "public function getLimit() : int\n {\n return $this->limit;\n }", "public function limit() : float;", "public function limit(): int\n {\n return $this->limit;\n }", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "protected function getLimit()\n\t{\n\t\t$option_limit = $this->io->getOption('limit');\n\n\t\tif ( $option_limit !== null ) {\n\t\t\treturn $option_limit;\n\t\t}\n\n\t\treturn $this->getSetting(self::SETTING_LOG_LIMIT);\n\t}", "public function getMaxValue()\n {\n return $this->get('MaxValue');\n }", "public function getLimit()\n {\n return self::LIMIT;\n }", "function getMaxValue() { return $this->readMaxValue(); }", "public function getLimit(): ?int\n {\n if (count($this->limit) == 0) {\n return null;\n }\n return $this->limit['value'];\n }", "public function getLimit()\n {\n return $this->getParameter('limit');\n }", "public function getLimit()\n {\n return null;\n }", "public function getLimit(): ?int\n {\n return $this->limit;\n }", "public function getLimit(): ?int\n {\n return $this->limit;\n }", "public function getLimit(): ?int\n {\n return $this->limit;\n }", "function getMaxValue() { return $this->readMaxValue(); }", "public function getLimit()\n {\n return null;\n }", "public function getLimit()\n {\n if (is_null($this->limit)) {\n /** @psalm-var ?int $data */\n $data = $this->raw(self::FIELD_LIMIT);\n if (is_null($data)) {\n return null;\n }\n $this->limit = (int) $data;\n }\n\n return $this->limit;\n }", "public function getLimit(): ?int\n {\n return $this->_limit;\n }", "public function getMaxValue();", "public function getMaxValue();", "function getMax() { return $this->readMaxValue(); }", "public function getUsagelimit()\n {\n return $this->usagelimit;\n }", "public function getLimit()\n {\n return $this->getRequest()->get('limit');\n }", "public function ads_get_value($limit, $offset) {\n $sql = \"select * from advertisement LIMIT \" . $limit . \" OFFSET \" . $offset . \" \";\n $data = $this->db->query($sql, $limit, $offset);\n return $data->result();\n }", "public function limit($limit)\n {\n return $this->set_limit($limit);\n }", "public function limit(?int $limit = null) : int;", "public function get_limit() {\n\t\t$job_listing_limit = $this->get_job_listing_limit();\n\t\tif ( $job_listing_limit ) {\n\t\t\treturn $job_listing_limit;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function limit($limit = null)\n {\n if(null === $limit)\n {\n return $this->property('limit');\n }\n return $this->property('limit', (int) $limit);\n }", "public function limit($limit = null)\n {\n if(null === $limit)\n {\n return $this->property('limit');\n }\n return $this->property('limit', (int) $limit);\n }", "public function getTimeLimit(): int;", "public function getTimeLimit(): int;", "public function getLimits()\n {\n return $this->limits;\n }", "private function Limit($num) {\n $this->limit = $num;\n return $limit;\n }", "public function limit($limit)\n {\n return $this->query->limit($limit);\n }", "public function getMax()\n {\n return $this->_maxValue;\n }", "public static function limit($limit);", "public function getMaximum() {\r\n return $this->maximumvalue;\r\n }", "public function getLimitOffset()\n\t\t{\n\t\t\tif($this->hasLimit())\n\t\t\t{\n\t\t\t\treturn $this->limit[0];\n\t\t\t}\n\t\t\tthrow new \\Exception('Retrieving non-existant limit offset');\n\t\t}", "public function getMessageLimit() {\n if (isset($this->_quotausage['MESSAGE']['limit'])) {\n return $this->_quotausage['MESSAGE']['limit'];\n }\n return 0;\n }", "public function get_limit( $element_role, $limit_key = self::MAX ) {\n\t\tself::validate_limit_name( $limit_key );\n\t\t$role_name = Toolset_Relationship_Role::name_from_role( $element_role );\n\n\t\treturn $this->limits[ $role_name ][ $limit_key ];\n\t}", "public function getMax()\n {\n return $this->_fields['Max']['FieldValue'];\n }", "public function getRateLimitLimit(): int\n {\n return $this->httpClient->getRateLimitLimit();\n }", "public function limit($limit = null) {\n\t\tif ($limit) {\n\t\t\t$this->_config['limit'] = (integer) $limit;\n\t\t\treturn $this;\n\t\t}\n\t\tif ($limit === false) {\n\t\t\t$this->_config['limit'] = null;\n\t\t\treturn $this;\n\t\t}\n\t\treturn $this->_config['limit'];\n\t}", "public function get( $limit = 10 );", "protected function _updateLimit()\n {\n return $this->_updateLimit;\n }", "public function getLimitationInt()\n {\n return $this->limitationInt;\n }", "public function limit($limit);", "public function limit($limit);", "public function getMax() {\n return $this->max;\n }", "public function getDefaultLimit()\n {\n return $this->default_limit;\n }", "public static function get_max_value() {\n return self::MAX_VALUE;\n }", "public function limit()\n {\n if ($response = $this->request('limit')) {\n if (isset($response->limit) && $response->limit == true) {\n return $response->limit;\n }\n }\n return false;\n }", "public function getDefaultLimit()\n {\n return $this->defaultLimit;\n }", "private function sql_limit()\n {\n // Get LIMIT statement\n $limit = null;\n\n // RETURN LIMIT statement\n return $limit;\n }", "public function getLimit()\n {\n //a little different than normal gets...\n return array (\n $this->_count, $this->_offset,\n );\n }", "function maxValLimit ($arr, $limit) {\n /* if no such value, or $arr is not an array, return -1 */\n if (is_array ($arr)) {\n sort ($arr); \n for ($i = count ($arr) - 1; $i >= 0; $i--) {\n if ($arr[$i] <= $limit) {\n return ($arr[$i]);\n break;\n }\n }\n }\n return (-1);\n}", "public function limit($value) {\r\n $this->limit = (int)$value;\r\n return $this;\r\n }", "function maxLoan(){\n\tglobal $driver;\n\t$sql\t=\t\"SELECT maxloan FROM settings\"; //Retrieve maximum loan amount to be given\n\tif($maxloan\t\t=\t$driver->perform_request($sql)):\n\t\t$row\t\t=\t$driver->load_data($maxloan);\n\t\t$maxloanamt\t=\t(($row['maxloan'])>0)?($row['maxloan']):500000;\n\telse:\n\t\tdie('<p class=\"error\">ERROR Retrieving Maximum Loan Amount.<br/>'.mysql_error().'</p>');\n\tendif;\n\treturn $maxloanamt; //The maximum amount to loan\n}", "protected function get_limit()\n {\n $bytes = ini_get('memory_limit');\n\n return $this->formatBytes($bytes);\n }", "public function getLimitLength()\n\t\t{\n\t\t\tif($this->hasLimit())\n\t\t\t{\n\t\t\t\treturn $this->limit[1];\n\t\t\t}\n\t\t\tthrow new \\Exception('Retrieving non-existant limit length');\n\t\t}", "public function value(): Number\n {\n return $this->value;\n }", "public function getMaximum()\n {\n return $this->max;\n }", "protected function getLimit() {\n if (isset($this->data['page'])) { // ...in the main table while pagination is used\n $l1 = ($this->data['page'] - 1) * $this->posts_per_page;\n $l2 = $this->posts_per_page;\n $limit = \"$l1, $l2\";\n }\n else $limit = \"0, \".$this->posts_per_page;\n return $limit;\n }", "public function limit($id, $type, $value) {\n\t\t$params = array(\n\t\t\t'id' => $id,\n\t\t\t'type' => $type,\n\t\t\t'value' => $value\n\t\t);\n\t\treturn $this->master->call('subaccounts/limit', $params);\n\t}", "function getApiLimit() {\n\t\tif ( is_null( $this->apiLimits ) ) {\n\t\t\treturn 'max';\n\t\t}\n\t\treturn $this->apiLimits;\n\t}", "protected function getLimit(\\codename\\core\\model\\plugin\\limit $limit) : string {\r\n if ($limit->limit > 0) {\r\n return \" LIMIT \" . $limit->limit . \" \";\r\n }\r\n return '';\r\n }", "public function getMax(): int;", "public function getQueryLimit() {\n\t\treturn $this->queryLimit;\n\t}", "public function getRateLimit(){\n\t\treturn $this->rateLimit;\n\t}", "public function getMaximum()\n {\n return $this->maximum;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }" ]
[ "0.7656031", "0.7416968", "0.7297932", "0.7248518", "0.7248518", "0.7248518", "0.7248518", "0.7248518", "0.72483116", "0.72021854", "0.7200688", "0.71900463", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71858937", "0.71806604", "0.7138409", "0.71240604", "0.71087205", "0.70519155", "0.69701064", "0.6937334", "0.6930043", "0.67817944", "0.6774098", "0.67058575", "0.66616124", "0.6643558", "0.6640042", "0.66273415", "0.6621958", "0.66023964", "0.66023964", "0.66023964", "0.6602121", "0.6580443", "0.65796447", "0.6566739", "0.6532354", "0.6532354", "0.6504352", "0.64241004", "0.642252", "0.63404727", "0.6271881", "0.6262921", "0.6261748", "0.62506616", "0.62506616", "0.62386376", "0.62386376", "0.62333614", "0.6207989", "0.62075853", "0.6183116", "0.6149647", "0.613127", "0.61295444", "0.61236465", "0.6082153", "0.6060415", "0.60541755", "0.6051372", "0.60512525", "0.6044155", "0.6041405", "0.6040423", "0.6040423", "0.6027662", "0.6023062", "0.6015792", "0.6002768", "0.59705573", "0.59631866", "0.59619826", "0.59324545", "0.59232706", "0.5921493", "0.59191096", "0.5916944", "0.58959115", "0.5894383", "0.5884675", "0.58802176", "0.5859223", "0.58389413", "0.58369434", "0.58341444", "0.5822753", "0.58122694", "0.5811314", "0.5811314" ]
0.0
-1
getter CreateUser return string
public function getCreateUser() { return $this->CreateUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser () {\n syslog( LOG_INFO, 'Create a Lineberty User \\n' );\n\n $url = '/users';\n\n return $this->runRequest($url, 'POST', null);\n }", "public function createUser()\n {\n }", "public function createUser()\n {\n return User::factory()->create();\n }", "private function createUser($type='') {\n return $this->ec->createUser($type);\n }", "private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }", "public function create()\n {\n return $this->userService->create();\n }", "public function creer_user() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\t$userdata = $this->creer_definition_user_create_ws ();\n\t\t$this->onDebug ( $userdata, 1 );\n\t\treturn $this->getObjetZabbixWsclient ()\n\t\t\t->userCreate ( $userdata );\n\t}", "function createUser(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\t\t\t\n\t\t\t//Check if username meets minimum requirements\n\t\t\tif($this->username == \"\" || $this->username == null || strlen($this->username) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Username\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t//Check if username already exists\n\t\t\t\tif($db->query('SELECT * FROM user WHERE Username = \"'.$this->username.'\"')->rowCount() > 0){\n\t\t\t\t\t$json->exists(\"Username\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if password meets minimum requirements\n\t\t\tif($this->password == \"\" || $this->password == null || strlen($this->password) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Password\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$passHash = generatePassword($this->password);\n\t\t\t\t$this->password = $passHash;\n\t\t\t\t$apiHash = generateApiKey($this->username.\"\".date('Y-m-d'));\n\t\t\t}\n\t\t\t\n\t\t\t//Check if admin is empty or invalid, if so make user non-admin\n\t\t\tif($this->admin == \"\" || $this->admin == null || $this->admin < 0)\n\t\t\t\t$this->admin = 0;\n\t\t\t\n\t\t\tif($this->subject == \"\" || $this->subject == null || $this->subject < 0)\n\t\t\t\t$this->subject = 0;\n\t\t\t\t\n\t\t\t$insert = $db->prepare('INSERT INTO user VALUES (DEFAULT, :username, :password, :subject, :admin, :api)');\n\t\t\t$insert->bindParam(':username', $this->username);\n\t\t\t$insert->bindParam(':password', $this->password);\n\t\t\t$insert->bindParam(':subject', $this->subject);\n\t\t\t$insert->bindParam(':admin', $this->admin);\n\t\t\t$insert->bindParam(':api', $apiHash);\n\t\t\t\n\t\t\tif($insert->execute()){\n\t\t\t\t$json->created(\"User\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$json->server();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "public function create(): int\n {\n // This function will create a minimal user with a hashed password but is not fully implemented.\n // You will need to augment this function to store all the other values!\n $username = $this->username;\n $password = $this->password;\n\t\t$fname = $this->first_name;\n\t\t$lname = $this->last_name;\n\t\t$address = $this->address;\n\t\t$phone = $this->phone;\n\t\t$user_type = $this->user_type;\n\t\t$image = $this->image;\n \n // Otherwise, create the user with the supplied password\n $hashedPassword = password_hash($password, PASSWORD_DEFAULT);\n return $this->insert(\n 'INSERT INTO user (username, password,first_name,last_name,address,phone,user_type,image,created_by)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?,?);',\n [$username, $hashedPassword,$fname,$lname,$address,$phone,$user_type,$image,$_SESSION['userId']]\n );\n \n }", "function createUser() {\n\t\t$new_member_insert_data = array(\n\t\t\t'User_Mail_address' => $this->input->post('email_address'),\n\t\t\t'User_Name' => $this->input->post('username'),\n\t\t\t'User_Pwd' => md5($this->input->post('password'))\n\t\t);\n\t\t$insert = $this->db->insert('users', $new_member_insert_data);\n\t\treturn $insert;\n\t}", "protected function _createUser() {\n\t\t$user = System_Locator_TableLocator::getInstance()->get('User')->createRow();\n\t\t$user->username = $this->getUsername();\n\t\t$user->setPassword($this->getPassword());\n\t\t$user->email = $this->getEmail();\n\t\t$user->countryCode = $this->getCountryCode();\n\t\t$user->createdAt = date(DATE_ISO8601); \n\t\treturn $user;\n\t}", "public function create(){\n\n $user = User::create($this->_cleaned);\n return $this->respond($user);\n }", "function create_user($username, $password, $email)\n {\n }", "public function createEnterpriseUser($input);", "function new_user($firstName,$lastName,$email,$password){\t\n $salt = generate_salt();\n $encPassword = encrypt_password($password,$salt);\n\n //$user = create_user_object($firstName,$lastName,$email,$encPassword,$salt,$userType);\n save_user_info($firstName,$lastName,$email,$encPassword,$salt);\n \n return true;\n}", "public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }", "function _create_user($user_data){\n \n $person_id=$this->model->insert($user_data);\n return $person_id;\n \n }", "private function createUser()\n {\n $sl = $this->getServiceManager();\n $userService = $sl->get(\"zfcuser_user_service\");\n $randomness = \"mockuser_\".mt_rand();\n $data = array(\n \"username\" => \"{$randomness}\",\n \"password\" => \"password\",\n \"passwordVerify\" => \"password\",\n \"display_name\" => \"MOCKUSER\",\n \"email\" => \"{$randomness}@google.com\"\n );\n $user = $userService->register($data);\n\n return $user;\n }", "public function CreateUser(string $name, \n string $username, \n string $email, \n string $password, \n string $birthdate)\n {\n\n }", "public function createUser()\n {\n $c = $this->getConnectionWithConfig('default');\n\n // First we create the record that we need to update\n $create = 'CREATE (u:User {name: $name, email: $email, username: $username})';\n // The bindings structure is a little weird, I know\n // but this is how they are collected internally\n // so bare with it =)\n $createCypher = $c->getCypherQuery($create, array(\n 'name' => $this->user['name'],\n 'email' => $this->user['email'],\n 'username' => $this->user['username'],\n ));\n\n return $this->client->run($createCypher['statement'], $createCypher['parameters']);\n }", "final static public function CreateUser(){\n\t\t\n\t\t$wr = static::validation();\n\t\t$record = new static::$modelNM();\t//instantiate new object\n\t\t$record->username = $_POST[\"username\"];\n\t\t$record->fname = $_POST[\"fname\"];\n\t\t$record->lname = $_POST[\"lname\"];\n\t\t$record->gender = $_POST[\"gender\"];\n\t\t$record->phone = $_POST[\"phone\"];\n\t\t$record->birthday = $_POST[\"birthday\"];\n\t\t$record->email = $_POST[\"email\"];\n\t\t$record->addhashpassword($_POST[\"password\"]);\n\n\n\t\tif($wr != \"\") {\n\t\t\techo $wr;\n\t\t\t$_SESSION[\"Temprecord\"] = $record;\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\t//$_SESSION[\"Temprecord\"] = NULL;\n\t\t}\n\t\t\n\t\n\t\t$record->GoFunction(\"Insert\");\t//Run Insert() in modol class and echo success or not\n\t\tsetcookie(\"Username\", $_POST[\"username\"], time() + (86400 * 30), \"/\");\n\t\treturn 1;\t//return display html table code from ShowData\n\t}", "public function create()\n {\n return view('sys_user.create');\n }", "public function GetUserName ();", "public function getUserName() {}", "public function getUserName();", "protected function createUser()\n {\n $errors = $this->validate(['username','password','email','group_id']);\n\n if(count($errors) > 0)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => $errors\n ]);\n }\n\n $arrUserData = [\n 'username' => $this->request->variable('username',''),\n 'user_password' => $this->request->variable('password',''), // already hashed by contao\n 'user_email' => $this->request->variable('email',''),\n 'group_id' => $this->request->variable('group_id',''),\n 'user_type' => USER_NORMAL\n ];\n\n // Create the user and get an ID\n $userID = user_add($arrUserData);\n\n // If user wasn't created, send failed response\n if(!$userID)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'phpbb Could not create user',\n 'error' => ['Could not create phpBB user']\n ]);\n }\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user created',\n 'data' => [\n 'user_id' => $userID\n ]\n ]);\n }", "static function doCreateUser()\n {\n global $controller;\n runtime_csfr::Protect();\n $currentuser = ctrl_users::GetUserDetail();\n $formvars = $controller->GetAllControllerRequests('FORM');\n if ($formvars['inAccess'] == 1) {\n $access = \"%\";\n } else {\n $access = $formvars['inAccessIP'];\n }\n if (self::ExecuteCreateUser($currentuser['userid'], $formvars['inUserName'], $formvars['inDatabase'], $access))\n return true;\n return false;\n }", "public function create()\n {\n if (!$this->validate()) {\n return false;\n }\n $user = new User(); $fichier = new Fichier();\n if (($this->_user->role == 'ADMIN' && ($this->role == 'DG' || $this->role == 'ADMIN')) || ($this->_user->role == 'DG' && $this->role == 'DG') || ($this->_user->role != 'DG' && $this->_user->role != 'ADMIN')){\n return false;\n }\n $user->nom = $this->name; $user->prenom = $this->surname;\n $user->username = $this->username; $user->email = $this->email;\n $user->role = $this->role; $user->setPassword($this->password);\n $user->generateAuthKey();\n $bool = $user->save();\n if ($bool == false){\n return false;\n }\n if (isset($this->photo)){\n $namePhoto = 'profile_' . str_replace(' ', '_', $this->name) . '_' . $user->id . '_' . date('Y-m-d') . '.' . $this->photo->extension;\n $this->photo->saveAs('uploads/' . $namePhoto);\n }else{\n $namePhoto = 'user.png';\n }\n $fichier->id_user = $user->id; $fichier->nom = $namePhoto;\n $fichier->type = 'photo';\n return $fichier->save();\n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "public function createUser()\n {\n\n $userCurrent = $this->userValidator->validate();\n $userCurrent['password'] = Hash::make($userCurrent['password']);\n $userCurrent = $this->user::create($userCurrent);\n $userCurrent->roles()->attach(Role::where('name', 'user')->first());\n return $this->successResponse('user', $userCurrent, 201);\n }", "static function create() {\n $numargs = func_num_args();\n if($numargs < 3 || $numargs > 7) return false;\n $args = func_get_args();\n\n $u = new User;\n\n // required values\n $u->id = (integer) $args[0];\n $u->firstName = (string) $args[1];\n $u->lastName = (string) $args[2];\n\n // not required values\n $u->email = isset($args[3]) ? $args[3] : '';\n $u->department = isset($args[4]) ? $args[4] : '';\n $u->contact = isset($args[5]) ? $args[5] : '';\n $u->isAdmin = isset($args[6]) ? $args[6] : false;\n\n return $u;\n }", "public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "public function createUser()\n {\n try\n {\n $data = $_POST;\n $user = array(\"email\"=>$data['email'],\n \"first_name\"=>$data['firstName'],\n \"last_name\"=>$data['lastName'],\n \"password\"=>password_hash($data['password'],PASSWORD_BCRYPT));\n $createdUser = $this->usersController->createUser($user);\n echo json_encode($createdUser);\n if ($createdUser['success'])\n {\n return true;\n } else if ($createdUser['error'])\n {\n return false;\n } \n } catch (Exception $e)\n {\n return false;\n }\n }", "public function create()\n {\n return View::component('CreateUser');\n }", "protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }", "public function create()\n {\n return $this->edit(new User);\n }", "function create($username, $password='', $ID_Entity='', $secureLevel=9){\n\t\t$username = trim(strtolower($username));\n\t\tif(preg_match(PATTERN_EMAIL, $username)){\n\t\t\t$cols = array(\t\t'Username'\t=>\t$username,\n\t\t\t\t\t\t\t\t'Password'\t=>\t$password,\n\t\t\t\t\t\t\t\t'ID_User'\t=>\t$ID_Entity,\n\t\t\t\t\t\t\t\t'SecureLevel'\t=>\t$secureLevel);\n\t\t\t$this->ID_User = dbInsert($cols, 'GBM_SYS_User');\n\t\t\t$this->username = $username;\n\t\t\treturn $this->ID_User;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getUsername(): string;", "public function create()\n {\n $this->validate($this->request, User::createRules());\n\n $user = new User;\n $user->name = $this->request->name;\n $user->phone = $this->request->phone;\n $user->dob = $this->request->dob;\n $user->image = $this->request->image_path;\n $plainPassword = $this->request->password;\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return $this->response(201,\"User\", $user);\n }", "public function create()\n {\n return view('users.sysuser.create');\n }", "public function get_uid() {\n\t\treturn 'create';\n\t}", "public function create(){\n \n $data = array();\n $data['login'] = $_POST['login'];\n $data['password'] = Hash::create('sha256', $_POST['password'], HASH_KEY);\n $data['role'] = $_POST['role'];\n \n //Do the Error checking\n \n $this->model->RunCreate($data);\n /*\n * After we Post the user info to create, the header is refereshed so that the data appears dynamically \n * below in the users list\n */\n header('location: ' . URL . 'users');\n }", "function CreateUser ($username, $password, $email) {\n $path = REST_PATH . '/users.xml';\n\n $username = filter_var($username, FILTER_SANITIZE_STRING);\n $password = filter_var($password, FILTER_SANITIZE_STRING);\n $email = filter_var($email, FILTER_SANITIZE_STRING);\n\n // Setup the POST NAME/VALUE pairs\n $postdata = http_build_query(\n array(\n 'Username' => $username,\n 'Password' => $password,\n 'PrivateEmail' => $email\n )\n );\n\n // Call Rest API\n $result = CallRestApi($path, $postdata, 'POST');\n \n // Read the returned XML\n $xml = simplexml_load_string($result) or die(\"Error: Cannot create object\");\n \n return $xml->User->Id;\n}", "public function create()\n {\n\treturn view('user.createuser');\n }", "public function getCreate()\n\t{\n\n\t\tself::addArgument('teachers', User::getTeachers());\n\n\t\treturn self::make('create');\n\n\t}", "public function create()\n {\n return view(\"backend.user.create\");\n }", "public function create()\n {\n\n if(strtolower(Request::method()) == \"post\"){\n $user_m = Model(\"User\");\n\n $data[\"name\"] = trim(Request::input(\"user\"));\n $data[\"password\"] = bcrypt(trim(md5(Request::input(\"password\"))));\n\n if($user_info = $user_m->userInfo(['name' => $data['name'] ])){\n $rsCode = -1001;\n $msg = $this->showMsg($rsCode);\n \n }\n\n\n $rs = $user_m->insert_user($data); \n\n $rsCode = $rs?1001:-1000;\n\n // dump($rs);\n $msg = $this->showMsg($rsCode); \n }\n\n return view('admin.foundation.user.create', ['title'=>\"CoG | Tell your world\"]);\n }", "public function create()\n\t{\n\t\treturn view('admin.createuser');\n\t}", "public function createUserDetail($userName,$password,$email,$about,$onlineStatus,$maxContacts,$maxFavorites,$birthday,$gender,$avatarFile,$thumbFile,$go_id,$reg_status,$invite_user_id,$create_id,$desired_team_title='',$signup_team_id=null)\r\n {\r\n \r\n $now = time();\r\n \r\n $valueArray = array();\r\n $valueArray['name'] = $userName;\r\n $valueArray['email'] = $email;\r\n $valueArray['password'] = $password;\r\n $valueArray['about'] = $about;\r\n $valueArray['online_status'] =$onlineStatus;\r\n $valueArray['max_contact_count'] = $maxContacts;\r\n $valueArray['max_favorite_count'] = $maxFavorites;\r\n $valueArray['birthday'] = $birthday;\r\n $valueArray['gender'] = $gender;\r\n $valueArray['avatar_file_id'] = $avatarFile;\r\n $valueArray['avatar_thumb_file_id'] = $thumbFile;\r\n $valueArray['created'] = $now;\r\n $valueArray['modified'] = $now;\r\n $valueArray['go_id'] = $go_id; \r\n $valueArray['reg_status'] = $reg_status; \r\n $valueArray['invite_user_id'] = $invite_user_id; \r\n $valueArray['create_id'] = $create_id; \r\n $valueArray['desired_team_title'] = $desired_team_title; \r\n $valueArray['signup_team_id'] = $signup_team_id;\r\n if($this->DB->insert('user',$valueArray)){\r\n return $this->DB->lastInsertId(\"_id\");\r\n }else{\r\n return null;\r\n }\r\n \r\n }", "public function createUser(){\n \n $password = DbrLib::rand_string(8);\n \n /**\n * create username \n */\n $firstName = strtolower(self::translitStringToAscii($this->pprs_first_name));\n $secondName = strtolower(self::translitStringToAscii($this->pprs_second_name));\n $username = $firstName . substr($secondName, 0, 1);\n $i = 1;\n while(User::model()->findByAttributes(['username'=>$username])){\n $i ++;\n if($i> strlen($secondName)){\n $username = $firstName . DbrLib::rand_string(2);\n }\n $username = $firstName . substr($secondName, 0, $i); \n }\n \n /**\n * get email from person contacts\n */\n $contacts = $this->ppcnPersonContacts;\n $email = '';\n foreach($contacts as $contact){\n if($contact->ppcn_pcnt_type == PcntContactType::TYPE_EMAIL ){\n $email = trim($contact->ppcn_value);\n }\n }\n \n /**\n * create user record\n */\n $user = new User();\n $user->username = $username;\n $user->password = $password;\n $user->email = $email;\n $user->status = User::STATUS_ACTIVE;\n \n if(!$user->validate()){\n return CHtml::errorSummary($user);\n }\n \n $user->save();\n \n /**\n * create profile record\n */\n $profile=new Profile;\n $profile->user_id=$user->id;\n $profile->first_name = $this->pprs_first_name;\n $profile->last_name = $this->pprs_second_name;\n $profile->sys_ccmp_id = Yii::app()->sysCompany->getActiveCompany();\n $profile->person_id=$this->primaryKey;\n\t\t$profile->save(); \n \n return true;\n \n \n }", "public function register() {\n\n // If it is not a valid password\n if (!$this->valid_password()) {\n return \"Invalid Password. It must be six characters\";\n }\n\n // If the mobile is valid\n if (!$this->valid_mobile()) {\n return \"Mobile Number is Invalid. It must be 10 numeric digits\";\n }\n\n // If there is a user with that username\n if (User::find($this->username, 'username') !== null) {\n return \"Username already taken\";\n }\n\n // Now we create the user on the database\n if ($this->create_record()) {\n echo \"<br><br>Record Created\";\n // We update the sync the object with the database\n if ($this->update_object('username')) {\n return true;\n echo \"<br><br>Object Updated\";\n }\n }\n\n return \"Sorry, an error has ocurred. Try again later\";\n }", "public function testCreateUser()\n {\n }", "function CreateRandomUser()\n\t{\n\t\t$id = $this -> generateString(15);\n\t\t$pass = $this -> generateString(30);\n\n\t\tif ($this -> sql -> connect_errno) {\n\t\t\tprintf('Connection Failed!');\n\t\t\texit();\n\t\t}\n\n\t\t$q = $this -> sql -> query(\"SELECT * FROM Users WHERE Name = '\".$id.\"'\");\n\t\t$r = mysqli_fetch_array($q);\n\t\t$c = mysqli_num_rows($q);\n\t\t$q -> close();\n\n\t\tif ($c == 0) \n\t\t{\n\t\t\t$this -> sql -> query(\"INSERT INTO Users (Name, Password) VALUES ('\".$id.\"', '\".$pass.\"')\");\t\t\t\n\t\t\treturn printf($id.':'.$pass);\n\t\t}\n\t\treturn printf('FAILED');\n\t}", "public function createUser()\n {\n $result = 1;\n \n $this->registrationDate = date('Y-m-d');\n $this->validation = uniqid();\n \n $transaction = $this->dbConnection->beginTransaction();\n \n try\n { \n if($this->save()){\n //Get the idUser of the new User and specify it in the table verifIdentity\n $idUser = Yii::app()->db->getLastInsertId();\n $verifIdentity = VerifIdentity::model()->findByPk($this->serialNumber);\n $verifIdentity->idUser = $idUser;\n if(!$verifIdentity->save())\n throw new CDbException(null); \n\n //Upload of Profile Picture\n if($this->profilePicture !== \"default\")\n {\n $result = $this->addPicture($this->profilePicture, $this->profilePictureExtension);\n if($result !== 1)\n {\n $this->addError('pictureUploader',$result);\n throw new CException(null); \n }\n }\n\n $transaction->commit();\n }\n else $result = 0;\n }\n catch(Exception $e)\n {\n if($e !== null)\n $this->addError('pictureUploader',\"Problem during create process\");\n $transaction->rollBack();\n $result = 0;\n } \n\n return $result;\n }", "private function createNewUser():User\n {\n $entityManager = $this->getDoctrine()->getManager();\n\n //create user\n $user = new User();\n $user->setEmail($this->request->request->get('email'));\n $user->setPassword('');\n $entityManager->persist($user);\n $entityManager->flush();\n //create user\n\n //encode user password\n $user->setPassword($user->encodePassword($this->request->request->get('password')));\n $entityManager->persist($user);\n $entityManager->flush();\n //encode user password\n return $user;\n }", "public function actionCreateUser()\n {\n $model = new User();\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\n $model->setPassword($model->password);\n $model->generateAuthKey();\n $model->generateEmailConfirmToken();\n if ($model->save()) {\n // нужно добавить следующие три строки:\n // $auth = Yii::$app->authManager;\n // $authorRole = $auth->getRole('superadmin');\n // $auth->assign($authorRole, $user->getId());\n return $this->redirect(['view-user', 'id' => $model->id]);\n }else{\n print_arr($model->errors);\n die('A');\n }\n } else {\n return $this->render('user/create', [\n 'model' => $model,\n ]);\n }\n }", "public function create($data) {\n\t\t$this->assureAllowed('create');\n // Validation\n V::objectType()\n ->attribute('name', V::alnum()->length(1, 255))\n ->attribute('email', V::email())\n ->attribute('password', V::stringType()->length(6, 255))\n ->attribute('role', V::intVal()->between(1, 3))\n ->check($data);\n // Persistence\n\t\t$user = new User();\n\t\t$user->setName($data->name)\n\t\t\t->setEmail($data->email)\n\t\t\t->setPassword(sha1($data->password))\n\t\t\t->setRole($data->role);\n\t\t$em = $this->getEntityManager();\n\t\t$em->persist($user);\n\t\t$em->flush();\n\t\treturn $user;\n\t}", "public function create(){\n \n return new \\Altumo\\Utils\\PersonName();\n \n }", "public function createUser($admin = false);", "public function getUsername() {}", "public function createUserWithPwd()\n {\n $account = new Sinon();\n return $account->createUserWithPassword();\n }", "public function create()\n {\n return \"create\";\n }", "public function createUser(string $name)\n {\n $record = [\n 'name' => preg_replace('/[^a-zA-Z0-9- ]/','', $name)\n ];\n return $this->db->insert($record, 'user');\n }", "public function actionCreate()\n {\n $model = new AppUser();\n $model->user_id = Yii::$app->user->id;\n $model->auth_key = Yii::$app->security->generateRandomString();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $model;\n }\n return $model->errors;\n }", "function CreateUser() {\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USER_TYPE] = $this->reseller->getUserType();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_USERNAME] = $this->reseller->getUserLoginName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_EMAIL_ID] = $this->reseller->getEmailId();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_CONTACT_NO] = $this->reseller->getMobileNo();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_FULL_NAME] = $this->reseller->getFullName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_ADDRESS] = $this->reseller->getAddress();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_CITY] = $this->reseller->getCity();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_REGION] = $this->reseller->getRegion();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_COUNTRY] = $this->reseller->getCountry();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_DOMAIN_NAME] = $this->reseller->getDomainName();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_EXPIRY_DATE] = $this->reseller->getExpiryDate();\n\t\t\t$this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_ENABLE_CMS] = $this->reseller->getEnableCMS();\n $this->data[sgc_reseller_user_api_params::API_RESELLER_USER_PARAM_DLT_ENTITY_ID] = $this->reseller->getDltEntityId();\n\t\t\t$response = new sgc_callapi(sgc_constant::SGC_API, sgc_constant::SGC_ENDPOINT_RESELLER_CREATE_USER, $this->data, $this->header, sgc_common_api_params::API_COMMON_METHOD_POST, $this->useRestApi);\n\t\t\treturn $response->getResponse();\n\t\t}", "function newUser($email, $password){\n\n}", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function create()\n {\n return view('administration::user.create');\n }", "public function create()\n {\n return 'accounts.create';\n }", "public function create () {\n return view('backend.user.create');\n }", "public function getCreate()\n {\n // If we are already authentified, redirect to the profile page.\n if(Auth::user()) return Redirect::action('frontend\\UserController@getIndex');\n\n // Get the data needed for the view.\n $user = API::get('api/v1/user/create');\n $rules = User::$rules;\n $meta = $this->meta;\n $meta['title'] = Lang::get('user/title.create_a_new_user');\n\n return View::make('frontend/user/create', compact('user', 'rules', 'meta'));\n }", "public function createUser(array $config = []);", "function user_create($data){\n if(isset($data['umd_val'])){\n $dval = $data['umd_val'];\n } else if(count($this->domain_seq)){\n $dval = $this->domain_seq[0];\n } else {\n return 2;\n }\n if(!isset($this->domains[$dval])) return 2;\n if(!in_array($dval,$this->quest_provider('d:user','create',TRUE,FALSE)))\n return 3;\n $tmp = $this->domains[$dval]->user_create($data);\n if($tmp>0) return $tmp;\n foreach($this->domains as $cd) $cd->cache_clear();\n return $this->vdn_make($data['uname'],$dval);\n }", "public function actionCreate()\n {\n $model = new BackendUser();\n\n $post = Yii::$app->request->post();\n if($post){\n $post['BackendUser']['password'] = md5($post['BackendUser']['password']);\n }\n\n if ($model->load($post) && $model->save()) {\n return $this->redirect(['/user/']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new User();\n $model->scenario = User::CREATE_SCENARIO;\n\n if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ActiveForm::validate($model);\n }\n\n if ($model->load(Yii::$app->request->post())) {\n $model->generatePasswordHash($model['password']);\n $model->generateAuthKey();\n if ($model->save())\n return $this->redirect(['view', 'id' => $model->id]);\n else \n print_r($model->getErrors());\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function createUser($data) {\n $db = \\Config\\Database::connect();\n\n $builder = $db->table('users');\n $builder->insert($data);\n return $db->insertID();\n }", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "public function create(){\n global $database;\n\n // When we call a method, this will have all the object properties\n $properties = $this->clean_properties();\n\n // Implode - Defaults to an empty string. This is not the preferred usage of implode as glue would be the second parameter and thus, the bad prototype would be used.\n\n // Here, everytime this method runs, it will pull a key value and place a comma after it.Then it is stored in an array so it can be used in the values\n $sql = \"INSERT INTO \" . static::$table_users . \" ( \" . implode(\",\" , array_keys($properties)) .\")\";\n\n $sql .= \"VALUES ('\" . implode(\"','\" , array_values($properties)) .\"')\";\n\n // Break down of the slq statement above - INSERT INTO users (username,password,first_name,last_name) VALUES ('deonte','password',//'Deonte','Horton')\n\n\n if($database->query($sql)){\n $this->id = $database->insert_id();\n return true;\n } else {\n\n return false;\n }\n\n }", "function User_Create($Username,$Password,$Email)\n\t{\n\t\t$IID=j::$Session->CreateUser($Username,$Password);\n\t\tif ($IID===null) return null;\n\t\tj::SQL(\"INSERT INTO jfp_xuser (ID,Email,CreateTimestamp) VALUES (?,?,?)\",$IID,$Email,time());\n\t\treturn $IID;\n\t\t\n\t}", "public function create()\n {\n \t $this->pass_data['page_heading'] = \"Add User\";\n return view('backend.user.create', $this->pass_data);\n }", "private function generateUsername() {\n $name = \"\";\n $name = $this->generator->generateString(4, '2346789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXYZ');\n $table = 'participant_data';\n $conditions = array('passcode' => $name);\n $existing_users = $this->getListFromDB($table, $conditions);\n if (empty($existing_users)) {\n return $name; \n }\n else {\n return $this->generateUsername();\n }\n \n }", "function create_user ( $ID, $first_name, $last_name, $email ) {\n\tglobal $access_token, $canvas_base_url;\n\t\n\t$pass=md5(uniqid($first_name.$last_name, true));\n\t$url=$canvas_base_url.\"/api/v1/accounts/1/users.json\";\n\tsystem(\"curl $url -F 'user[name]=$first_name $last_name' -F 'user[short_name]=$first_name' -F 'pseudonym[unique_id]=$email' -F 'pseudonym[password]=$pass' -F 'pseudonym[sis_user_id]=$ID' -H 'Authorization: Bearer $access_token'\");\n\t\n}", "public function create()\n\t{\n\t\t$user = User::create([\n\t\t\t\t\tInput::all()\n\t\t\t]);\n\n\t\treturn Response::json($user);\n\t}", "public function createUser($name, $pass, $profile, array $extra = []);", "protected function save() {\n $factory = I2CE_FormFactory::instance();\n if ($this->creatingNewUser()) {\n if ( !$this->hasPermission('task(users_can_edit)')) {\n return false;\n }\n if (!$this->userObj instanceof I2CE_User_Form || !($username = $this->userObj->username) ) {\n return false;\n }\n $accessMech = I2CE::getUserAccess();\n if ($accessMech->userExists($username,false)) {\n I2CE::raiseError(\"Trying to recreate existing user : \" .$username);\n return false;\n }\n if (I2CE_User::hasDetail('creator')) {\n $this->userObj->creator = $this->user->username;\n }\n }\n\n $username = $this->userObj->username;\n $password = $this->userObj->password;\n $parent = $this->userMapObj->getField(\"parent\")->getValue();\n $personObj = $factory->createContainer($parent);\n $personObj->populate();\n $emails = LBBoards_Module_Qualify::getPersonEmail($parent);\n $emails = implode(\",\", $emails);\n $fname = $personObj->getField(\"firstname\")->getValue();\n $body = \"Hi $fname<br> We have created your account on the License Board online system, your username is $username and your password is $password. Please change your password after first login\";\n $subject = \"Account For License Board Online System\";\n LBBoards_Module_Qualify::sendEmail($emails, $subject, $body);\n return parent::save();\n }", "public function createAction()\n {\n echo (new View('userCreate'))->render();\n }", "public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }", "static public function createPost(){\n\t\tinclude ($GLOBALS['PATH'] . '/classes/requests/users/CreateRequest.php');\n\n\t\t$requests = new CreateRequest;\n\t\t$errors = $requests->validate();\n\t\t\n\t\t//Criar url de redirecionar\n\t\t$back = explode('?', $_SERVER['HTTP_REFERER'])[0] ?? '/users/create';\n\n\t\tif(count($errors) > 0){\n\t\t\t//seta os params de retorno\n\t\t\t$back .= '?errors=' . json_encode($errors) . '&name='. $_POST['name'] . '&email='. $_POST['email'];\n\n\t\t}else{\n\n\t\t\t$conn = Container::getDB();\n\t\t\t$user = new User;\n\t\t\t\n\t\t\t//Cria criptografia de senha\n\t\t\t$password = crypt($_POST['password'], SALT);\n\n\t\t\t//seta os dados do usuario na instância da class User\n\t\t\t$user->setName($_POST['name'])\n\t\t\t\t->setEmail($_POST['email'])\n\t\t\t\t->setPassword($password);\n\t\t\n\t\t\t$crud = new CrudUser($conn, $user);\n\n\t\t\ttry {\n\t\t\t\t//metodo save(), salva os dados do usuario no banco de dados\n\t\t\t\t$save = $crud->save();\n\n\t\t\t\t//Verificação se o cadastro foi com successo\n\t\t\t\tif($save){\n\t\t\t\t\t$back .= '?success=Usuário cadastrado com sucesso!';\n\t\t\t\t}else{\n\n\t\t\t\t\t//cria message de retorno com erro\n\t\t\t\t\t$messageError = ['Error' => 'Erro ao salvar usuario'];\n\t\t\t\t\t$back .= '?errors=' . json_encode($messageError) . '&name='. $_POST['name'] . '&email='. $_POST['email'];\n\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (\\Throwable $th) {\n\t\t\t\techo '<pre>';\n\t\t\t\t\tprint_r($th);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t//Redireciona para $back\n\t\theader('Location: ' . $back);\n\t}", "function makeUser($firstname, $lastname, $username, $email, $department, $isReadOnly){\n $password = genPassword(7);\n $md5_password = md5($password);\n sqlQuery(\"INSERT INTO users SET user_firstname='$firstname', user_lastname='$lastname', user_username='$username', user_email='$email', user_isreadonly='$isReadOnly', user_department='$department', user_password='$md5_password'\");\n sendSignupEmail(getUserId($username), $password);\n alog(\"Added user $username\");\n}", "public function getUsuarioCreacion( ){\n\t\t\treturn $this->usuarioCreacion;\n\t\t}", "private function generateUser()\n {\n \t$user=new User();\n \t$user->scenario = 'registration';\n \t$user->username=$this->user_name_prefix . '_' . time() . ++$this->userNameCounter;\n \t$user->email=time() . ++$this->emailCounter . $this->faker->unique()->email;\n \t$user->language = Yii::$app->language;\n \t$user->status = User::STATUS_ENABLED;\n \t$this->userId = $user->save(false) ? $user->id:false;\n \t$this->data[] = ['id'=>$user->id,'type'=>'user'];\n \treturn true;\n }", "public function createUser($params)\n {\n $params = array_merge([\n 'email' => null,\n 'fullname' => null,\n 'avatar' => config('constants.image.avatar.name'),\n 'gender' => null,\n 'birthday' => null,\n 'user_type' => config('constants.user.type.member'),\n 'password' => null,\n ], $params);\n\n return $this->mysql->createUser($params);\n }", "public function create()\n {\n return view(\"user.create\");\n }", "public function writeNewUser () {\n if (! $this->Writeable()){\n throw new Exception('User object is not writeable, cannot write to DB');\n }\n\n if ($this->exists($this->loginId)) {\n throw new Exception('User already exists, cannot be created');\n }\n\n $i = new folksoDBinteract($this->dbc);\n if ($i->db_error()) {\n throw new Exception('DB connect error: ' . $i->error_info());\n }\n\n $i->sp_query(\n sprintf(\"call create_user(\"\n .\"'%s', '%s', '%s', '%s', '', %d, '%s', '%s', '%s')\",\n $i->dbescape($this->nick),\n $i->dbescape($this->firstName),\n $i->dbescape($this->lastName),\n $i->dbescape($this->email),\n $i->dbescape($this->loginId),\n $i->dbescape($this->institution),\n $i->dbescape($this->pays),\n $i->dbescape($this->fonction)));\n\n if ($i->result_status == 'DBERR') {\n throw new Exception('DB query error on create FB user: ' . $i->error_info());\n }\n }" ]
[ "0.8061539", "0.8061539", "0.8061539", "0.8061539", "0.7437632", "0.7375623", "0.7195846", "0.7191542", "0.7170123", "0.71594274", "0.7113828", "0.702387", "0.6947556", "0.69367456", "0.68981653", "0.6894015", "0.6883233", "0.6840185", "0.6804434", "0.6794672", "0.67791545", "0.6736201", "0.6688424", "0.6673793", "0.66589385", "0.66403615", "0.6612105", "0.6592631", "0.65924287", "0.65908825", "0.65595853", "0.6547383", "0.6541604", "0.65393007", "0.6535101", "0.65320355", "0.6522597", "0.6520432", "0.6516862", "0.6502593", "0.64925516", "0.647359", "0.6471393", "0.64666843", "0.6462257", "0.6459086", "0.64580387", "0.6457539", "0.64569676", "0.6454641", "0.64528024", "0.6444875", "0.643497", "0.64316773", "0.6414726", "0.6412281", "0.6409198", "0.6402257", "0.638921", "0.63821125", "0.636845", "0.6360719", "0.6349989", "0.63414246", "0.6333005", "0.63241535", "0.6314159", "0.6311659", "0.63116336", "0.6308887", "0.63081706", "0.6306917", "0.6306917", "0.630051", "0.63000965", "0.629799", "0.62962836", "0.6288006", "0.62875175", "0.6283177", "0.627241", "0.6269373", "0.6254433", "0.62520903", "0.62506634", "0.62447596", "0.624311", "0.62430114", "0.62347376", "0.62336606", "0.62292093", "0.62289584", "0.6219799", "0.62187874", "0.62172484", "0.62165654", "0.62160206", "0.62158567", "0.6213068", "0.6212484" ]
0.7682113
4
getter CreateDate return string
public function getCreateDate() { return $this->CreateDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCreateDate(): string\n {\n return $this->create_date;\n }", "public function getFormattedCreateDate();", "public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}", "public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}", "public function getCreateDate()\n {\n return $this->create_date;\n }", "public function getCreate_date(){\n return $this->create_date;\n }", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "public function getDateCreate()\n\t{\n\t\treturn $this->dateCreate;\n\t}", "public function getDateCreate()\n {\n return $this->date_create;\n }", "public function getDateCreate()\n {\n return $this->date_create;\n }", "public function get_date_create()\n\t{\n\t\treturn $this->date_create;\n\t}", "public function get_date_created();", "public function getCreationDate();", "public function getCreatedDate();", "public function getDateCreation()\n {\n return $this->date_creation;\n }", "public function getCreatedDate()\r\n\t\t{\r\n\t\t\treturn date('m/d/Y', strtotime($this->_created_date));\r\n\t\t}", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getCreateDate()\n {\n $this->create_date = null;\n\n return;\n }", "public function getDate_creation()\n {\n return $this->date_creation;\n }", "function get_creation_date()\n\t{\n\t\treturn $this->creation_date;\n\t}", "public function getDateCreated();", "public function getCreateddate()\n {\n return $this->createddate;\n }", "function getFormattedCreatedDate()\r\n {\r\n return $this->created_at->format('d/m/y');\r\n }", "function getCreatedDate() {\n\t\treturn $this->_CreatedDate;\n\t}", "public function getCreatedDate()\n {\n return $this->created_date;\n }", "public function get_creation_date()\n {\n return $this->get_default_property(self::PROPERTY_CREATION_DATE);\n }", "public function getDateCreated() {\r\n return $this->_date_created;\r\n }", "public function getDateCreated()\n {\n return $this->date_created;\n }", "public function getDateCreated()\n {\n return $this->date_created;\n }", "public function getDateCreated()\n\t{\n\t\t$date = new Precurio_Date($this->date_created);\n\t\tif($date->isYesterday()) return 'Yesterday';\n\t\tif($date->isToday()) return 'Today';\n\t\t\n\t\treturn $date->get(Precurio_Date::DATE_SHORT);\n\t}", "public function getCreationDate($asString = true) {}", "public function getCreationDate($asString = true) {}", "public function getCreationDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->creationDate;\r\n\t}", "public function getCreatedDate() {\n return $this->get('created_date', 'user');\n }", "public function getCreateDate(): int;", "public function getCreationDate()\n {\n return $this->created;\n }", "public function getDateCreated() {\n return($this->dateCreated);\n }", "public function getDateCreated()\n {\n return $this->_DateCreated;\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }", "public function getCreationDate()\n {\n return $this->creationDate;\n }", "public function getCreationDate()\n {\n return $this->creationDate;\n }", "public function getCreationDate()\n {\n return $this->creationDate;\n }", "public function getCreationDate()\n {\n return $this->creationDate;\n }", "public function getCreationDate()\n {\n return $this->creationDate;\n }", "public function getDateCreated() {\n return Yii::app()->dateFormatter->format(\"HH:mm\",$this->createTime).\" \".Yii::app()->dateFormatter->format(Yii::app()->locale->dateFormat,$this->createTime);\n }", "public function getDateCreated()\n {\n return $this->dateCreated;\n }", "public function getDateCreated()\n {\n return $this->dateCreated;\n }", "public function getDateCreated() {\n return $this->dateCreated;\n }", "public function getDate()\n\t\t{\n\t\t\t$date = new \\DateTime($this->created_at);\n\t\t\treturn $date->format('jS M Y');\n\t\t}", "public function getDate(): string;", "public function getCreationDate() \r\n { \r\n return $this->_creationDate; \r\n }", "public function getCreated()\n {\n if (is_string($this->created))\n $this->created = new UDate($this->created);\n return $this->created;\n }", "public function getCreationDate() {\n\t\treturn $this->creationDate;\n\t}", "public function getCreationDate() {\n return $this->creationDate;\n }", "public function getCreatedDate()\n {\n return isset($this->CreatedDate) ? $this->CreatedDate : null;\n }", "public function getDatecreation_user()\r\n {\r\n return $this->datecreation_user;\r\n }", "public function getDate() : string\r\n {\r\n return $this->format('Y-m-d');\r\n }", "public function getCreationDate() {\n\n return $this->u_creationdate;\n\n }", "public function getCreated() : string\n {\n return $this->created;\n }", "public function getFechaCreacion( ){\n\t\t\treturn $this->fechaCreacion;\n\t\t}", "public function getDate();", "public function getDate();", "function getFormattedCreatedDateExtended()\r\n {\r\n return $this->created_at->format('d').\" de \".$this->getMes_ptBR((int) $this->created_at->format('m') ).\" de \".$this->created_at->format('Y') ;\r\n }", "public function getDateCreated()\n {\n if (isset($this->data['CreatedDate'])) {\n return $this->data['CreatedDate'];\n } else {\n return false;\n }\n }", "public function getCreate_time()\r\n {\r\n return $this->create_time;\r\n }", "public function getDateCreated()\n {\n $rtn = $this->data['date_created'];\n\n if (!empty($rtn)) {\n $rtn = new \\DateTime($rtn);\n }\n\n return $rtn;\n }", "public function getCreatedAt(): string\n {\n return $this->createdAt;\n }", "public function getCreatedAt(): string\n {\n return $this->createdAt;\n }", "public function forcreated(){\n $created = $this->created_at;\n $newcreated = date('d-m-Y',strtotime(str_replace('/', '-', $created)));\n return $newcreated;\n }", "public function getPurchaseDateCreated() {\n return $this->purchaseDateCreatedDate;\n }", "public function getCreatetime()\n {\n return $this->createtime;\n }", "public function getCreatetime()\n {\n return $this->createTime;\n }", "public function getCreated()\n {\n if (! isset($this->created)) {\n $this->created = new DateTime($this->getXPath($this->getDom())->query($this->getCreatedQuery())->item(0)->value);\n }\n return $this->created;\n }", "public function getDate()\n {\n return $this->getData('created_at');\n }", "public function getDateCreatedAttribute()\n {\n return Carbon::parse($this->created_at)->format('d-m-Y');\n }", "public function getDateCreatedAttribute()\n {\n return Carbon::parse($this->created_at)->format('d-m-Y');\n }", "public function getFechaCreacion()\n {\n return $this->fecha_creacion;\n }", "public function getFechaCreacion()\n {\n return $this->fecha_creacion;\n }", "public function _getCreatedOn() {\n\t\treturn $this->_createdOn;\n\t}", "public function getCreatedThingTransferDate()\n {\n $value = $this->get(self::CREATEDTHINGTRANSFERDATE);\n return $value === null ? (string)$value : $value;\n }", "public function getCreate_at()\n {\n return $this->create_at;\n }", "public function getCreate_at()\n {\n return $this->create_at;\n }", "public function getCreatedAt()\n {\n return $this->sys->getCreatedAt();\n }", "public function getDateCreated()\n {\n return $this->getDateModified();\n }", "public function getCreated() {\n\n $createdDateTime = \\DateTime::createFromFormat('Y-m-d H:i:s', $this->created);\n return $createdDateTime;\n\n }", "function getFormattedCreatedDateTime()\r\n {\r\n return $this->created_at->format('d/m/Y H:i:s');\r\n }", "public function getCreatedDateAttribute($value){\n return date(\"n/d/Y g:i:s A\",strtotime($this->attributes['CreatedDate']));\n }", "public function getDateCreated() : DateTime\n {\n $rtn = $this->data['date_created'];\n\n if (!empty($rtn)) {\n $rtn = new DateTime($rtn);\n }\n\n return $rtn;\n }", "function getDate( )\r\n\t{\r\n\t\treturn $this->date;\r\n\t}", "public function getCreatedAt(){\n return $this->_getData(self::CREATED_AT);\n }", "public function getCreationDatetime()\n {\n return $this->getValue('nb_icontact_prospect_creation_datetime');\n }", "public function getCreatedAt(){\n return $this->createdAt;\n }", "public function getCreatedAt(): string;", "public function getCreatedAt(): string;", "public function getDate() { return $this->date; }", "public function getDate()\r\n {\r\n return $this->date;\r\n }" ]
[ "0.86611164", "0.8269424", "0.8195311", "0.8195311", "0.81687444", "0.8148218", "0.81252027", "0.81252027", "0.8101081", "0.8078374", "0.8078374", "0.8042076", "0.77365196", "0.76338476", "0.76053107", "0.7585533", "0.75786805", "0.75766885", "0.75766885", "0.75766885", "0.75736195", "0.7569672", "0.7554188", "0.75407743", "0.75308126", "0.74590373", "0.7415467", "0.74138796", "0.7406627", "0.7352781", "0.7347765", "0.7347765", "0.7338048", "0.7318506", "0.73184204", "0.73164654", "0.7313939", "0.7305148", "0.72982883", "0.72951615", "0.7293723", "0.7270463", "0.7270463", "0.7252424", "0.7252424", "0.7252424", "0.7252424", "0.7252424", "0.7250543", "0.7239359", "0.7239359", "0.723477", "0.723284", "0.7227239", "0.7216124", "0.7210028", "0.72009903", "0.71964854", "0.71948594", "0.71288633", "0.71096945", "0.70667946", "0.7058043", "0.70243955", "0.7023328", "0.7023328", "0.69993687", "0.6982784", "0.6966852", "0.695903", "0.69556445", "0.69556445", "0.69458526", "0.693959", "0.6896923", "0.68599796", "0.68371093", "0.68294674", "0.68244785", "0.68244785", "0.681401", "0.681401", "0.6807493", "0.6801998", "0.67879564", "0.67879564", "0.6786103", "0.6762179", "0.6761035", "0.6745433", "0.6743464", "0.672593", "0.6712501", "0.6701322", "0.66882396", "0.6680968", "0.66803956", "0.66803956", "0.66569376", "0.6640465" ]
0.8178689
4
getter Name return string
public function getContent($Parsed=true) { if($Parsed) { return $this->parseAll($this->Content); } return $this->Content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_name();", "public function get_name();", "public function get_name();", "public static function get_name() : string ;", "public static function get_name() : string ;", "function get_name () {\n return $this -> name;\n }", "public function get_name(){\n\t\treturn $this->name;\n\t}", "abstract public function get_name();", "abstract public function get_name();", "abstract public function get_name();", "public function get_name(): string\n {\n return $this->name;\n }", "public function getname()\n {\n return $this->name;\n }", "function get_name() {\n return $this->name;\n }", "public function get_name() {\r\n return $this->name;\r\n }", "public\tfunction\tgetName() { return\t$this->_name; }", "public\tfunction\tgetName() { return\t$this->_name; }", "protected function GetName() {\n\t\treturn $this->name;\n\t}", "function\tgetName() {\n\t\treturn $this->name ;\n\t}", "function get_name()\n\t{\n\t\treturn $this->name;\n\t}", "public function GetName () {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n return $this->name;\n }", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function get_name() {\n\t\treturn $this->name;\n\t}", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName(): string;", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();", "public function getName();" ]
[ "0.85613745", "0.85613745", "0.85613745", "0.8452412", "0.8452412", "0.83556056", "0.8305417", "0.826446", "0.826446", "0.826446", "0.82434535", "0.8239511", "0.82392853", "0.82352793", "0.823188", "0.823188", "0.82278085", "0.82210135", "0.8218475", "0.8214605", "0.82115823", "0.8207896", "0.8207896", "0.8207896", "0.8207896", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.82078135", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442", "0.8205442" ]
0.0
-1
getter Id return string
public function getid() { return $this->Id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId(): string;", "public function getId(): string;", "public function getId(): string;", "public function getId(): string;", "public function getID(): string;", "public function getId() : string;", "public function getId(): String;", "public function getId() : string{\n return $this->id;\n }", "public function getId() : string{\n return $this->id;\n }", "public function getID() : string;", "public function getId():string {\n return $this->id;\n }", "public function getId() : string {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function id(): string;", "public function id(): string;", "public function getId(): string\n {\n return (string) $this->id;\n }", "public function getId() : string\n {\n return $this->id;\n }", "public function getId() : string\n {\n return $this->id;\n }", "public function id(): string\n {\n return $this->id;\n }", "public function id(): string\n {\n return $this->id;\n }", "public function id(): string\n {\n return $this->id;\n }", "function get_idstring() {\n return $this->id;\n }", "public function getStrId();", "public function getId() {}", "public function getId() {}", "public function getId() : string\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "public function get_id();", "public function get_id();", "function get() {\n if (!empty($this->_id)) {\n return $this->_id;\n }\n return '';\n }", "public function getId() ;", "function getId(){ return $this->toString(); }", "public function getID();", "public function getID();", "public function getID();", "public function GetId () ;", "public function getId(): string\n {\n return $this->name;\n }", "public function getId ();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();" ]
[ "0.8715661", "0.8715661", "0.8715661", "0.8715661", "0.8683094", "0.8646048", "0.8638346", "0.8634006", "0.8634006", "0.85954624", "0.8534424", "0.8492601", "0.846114", "0.846114", "0.846114", "0.846114", "0.846114", "0.846114", "0.846114", "0.846114", "0.846114", "0.846114", "0.846114", "0.8445931", "0.8445931", "0.84408617", "0.84357697", "0.84357697", "0.84010226", "0.84010226", "0.84010226", "0.8396661", "0.8258283", "0.81988853", "0.81988853", "0.81929517", "0.81777024", "0.81777024", "0.8176216", "0.8157574", "0.8154694", "0.8144301", "0.8144301", "0.8144301", "0.81061643", "0.8100042", "0.80779904", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119", "0.8062119" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules(Request $request) { if(!empty($request->input('password'))){ return [ 'name' => 'required|min:2', 'password' => 'min:6|max:255|required', 'password_confirmation' => 'min:6|max:255|same:password' ]; } else { return [ 'name' => 'required|min:2', ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
configure in a private field setting the values in the private fields //
public function construct( $P_customer_Id = "",//setting the values of customerid in the private field $P_first_Name = "",//setting the values of first name in the private field $P_last_Name = "",//setting the values of lastname in the private field $P_City = "",//setting the values of city in the private field $P_Province = "",//setting the values of province in the private field $P_postal_Code = "",//setting the values of postal codein the private field $P_user_Name = "",//setting the values of username in the private field $P_Password = ""//setting the values of password in the private field ) { // ####################################### setting the values of constructor in the parameters ###################################### // if ($P_customer_Id != "") { $this->customer_Id = $P_customer_Id;//setting the values of constructor in the parameters $this->first_Name = $P_first_Name;//setting the values of constructor in the parameters $this->last_Name = $P_last_Name; $this->City = $P_City; $this->Province = $P_Province; $this->postal_Code = $P_postal_Code; $this->user_Name = $P_user_Name; $this->user_Password = $P_Password;//setting the values of constructor in the parameters } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function setFields();", "protected function setupFields()\n {\n }", "function set_values() {\n\t\tparent::set_values();\n\t\t$currency = new currency($this->_currency_id);\n\t\t\n\t\t$this->order_id->value = $this->_order_id;\n\t\t$this->timestamp->value = date(\"j M Y\");\n\t\t$this->total_amount->value = $currency->format_money($this->_total_amount);\n\t}", "public static function setters();", "function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }", "abstract public function set();", "protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }", "function set_fields($fields) {\n\t\t$this->fields = $fields;\n\t}", "private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }", "public function __SET($att, $valor){\r\n $this->$att = $valor;\r\n}", "private function setValues($values)\n {\n //echo \"<pre>\";\n //print_r($values);\n //echo \"</pre>\";\n foreach ($values as $field => $value) {\n $this->$field = $value;\n }\n\n //echo \"<pre>\";\n //print_r($this);\n //echo \"</pre>\";\n //die();\n\n }", "private function _set_fields()\n {\n @$this->form_data->survey_id = 0;\n $this->form_data->survey_title = '';\n $this->form_data->survey_description = '';\n $this->form_data->survey_status = 'open';\n $this->form_data->survey_anms = 'yes';\n $this->form_data->survey_expiry_date = '';\n $this->form_data->question_ids = array();\n\n $this->form_data->filter_survey_title = '';\n $this->form_data->filter_status = '';\n }", "public function setPrivate()\n {\n $this->private = true;\n }", "protected function _updatefields() {}", "function _init_fields()\n\t{\n\t\tif($this->table_name)\n\t\t{\n\t\t\t$this->db_fields = $this->db->list_fields($this->table_name);\n\t\t\t\n\t\t\tforeach($this->db_fields as $field)\n\t\t\t{\n\t\t\t\t$this->{$field} = NULL;\n\t\t\t}\n\t\t}\n\t}", "protected function populate_value()\n {\n }", "function __construct() {\n\t\t$this->parameter_check=False;\n\t}", "public function setProperties() {\n\t\t$this->public_prop = 'public';\n\t\t$this->protected_prop = 100;\n\t\t$this->private_prop = true;\n\n\t\t// Set a non-predefined property.\n\t\t$this->dynamic = new self();\n\t}", "protected function prepare_fields()\n {\n }", "public function __construct() {\n\t\tforeach ($this as $key => $value) \n\t\t\t$this->$key = '';\n\t\t$this->log_date = $this->seller_PP_ProfileStartDate = $this->timestmp = '0000-00-00 00:00:00';\n\t\t$this->vendor_id = 0;\n\t}", "function setData($data){\n\t\tif(!is_array($data)){\n\t\t\tvar_dump($data);\n\t\t\texit;\n\t\t}\n\t\tforeach($data as $key => $value){\n\t\t\tif(isset(static::$fields[$key]) && static::$fields[$key]['type']=='enum'){\n\t\t\t\tif($value){\n\t\t\t\t\tif(!in_array(strtoupper($value), static::$fields[$key]['values'])){\n\t\t\t\t\t\treturn RetErrorWithMessage('INCORRECT_VALUE', preg_replace('/.+\\\\\\/si', '', get_called_class()).': Wrong field value('.$value.'), field \"'.$key.'\" can be one of: '.print_r(static::$fields[$key]['values'], true));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$value = strtoupper($value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->{$key} = $value;\n\t\t}\n\t\tforeach(static::$fields as $field_name => $option){\n\t\t\tif(!isset($this->{$field_name})){\n\t\t\t\tif($option['default']){\n\t\t\t\t\t$this->{$field_name} = $option['default'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $this->instance_generated = true;\n\t\treturn null;\n\t}", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}", "public function set_fields() {\n\n\t\t$this->fields = Pngx__Meta__Fields::get_fields();\n\t}", "function setCommonInfo()\n\t{\n\t\t$this->configobj = new configclass();\t\t\n\t\t\n\t}", "public function __construct() {\n\t\t$this->overrideDefaults( $this->loadDefaults() );\n\t}", "protected function _init()\n {\n $this->_fields += array(\n 'id' => new Sprig_Field_Auto,\n 'name' => new Sprig_Field_Char,\n 'brief' => new Sprig_Field_Char,\n 'content' => new Sprig_Field_Char,\n 'module_id' => new Sprig_Field_Integer,\n 'url' => new Sprig_Field_Char,\n 'meta_title' => new Sprig_Field_Char,\n 'meta_keywords' => new Sprig_Field_Char,\n 'meta_description' => new Sprig_Field_Char,\n 'ord' => new Sprig_Field_Integer(array(\n 'default' => 10,\n )),\n 'status' => new Sprig_Field_Integer(array(\n 'default' => 0,\n )),\n );\n }", "private function _getSettings()\n {\n $properties = $this->_class->getProperties();\n foreach ($properties as $property) {\n $prop = new Property($property);\n $prop->fillSettings($this->_reflect);\n }\n if (empty($this->_reflect->listField)) {\n $keys = array_keys($this->_reflect->fields);\n $this->_reflect->listField = array_shift($keys);\n }\n $this->_reflect->fieldNames = array_keys($this->_reflect->fields);\n }", "function __construct() {\n //added for code coverage.\n //$this->testValue = $testValue;\n }", "function __construct() {\n if($this->Fields) {\n foreach($this->Fields as $key => $value) {\n $this->$key = null;\n if($value['extra'] === \"auto_increment\") $this->Id = $key;\n if($value['extra'] === \"ref\") $this->Ref = $key;\n }\n }\n }", "public function __set($_name, $_value);", "protected function __init__() { }", "function callbackSetValue($object,$field) {\n \n\n //echo get_class($object);\n switch ($field) {\n case 'name':\n // name does not set dirty flag - its a simple rename..\n $value = $object->get_text();\n if (@$this->$field == $value) {\n return;\n }\n $this->$field = $value;\n //print_r($this->data['TABLES'][$table]['FIELDS']);\n $this->table->database->dirty=true;\n break;\n case 'length':\n case 'default':\n $value = $object->get_text();\n if (@$this->$field == $value) {\n return;\n }\n // echo \"CHANGE?\";\n $this->$field = $value;\n //print_r($this->data['TABLES'][$table]['FIELDS']);\n $this->table->database->dirty=true;\n $this->dirty = true;\n break;\n case 'notnull':\n case 'isIndex':\n case 'sequence':\n case 'unique': \n $value = (int) $object->get_active();\n if (@$this->$field == $value) {\n return;\n }\n //echo \"CHANGE?\";\n $this->$field = $value;\n //print_r($this->data['TABLES'][$table]['FIELDS']);\n $this->table->database->dirty=true;\n $this->table->database->save();\n $this->setVisable();\n $this->dirty = true;\n break;\n default: \n echo \"opps forgot :$field\\n\";\n \n \n }\n //print_r(func_get_args());\n }", "function setField($field) {\r\r\n\t\t$this->field = $field;\r\r\n\t}", "public function prepare():void\n {\n\n // Get IP address\n if ($this->reg_ip == '') { \n $this->reg_ip = IpAddress::get();\n }\n\n // Get user-agent\n if ($this->reg_user_agent == '') { \n $this->reg_user_agent = UserAgent::get();\n }\n\n // Lookup ip address\n if ($this->reg_country == '' && $this->reg_ip != '') { \n $res = LookupIP::query($this->reg_ip);\n foreach ($res as $key => $value) {\n $key = 'reg_' . $key; \n $this->$key = $value;\n }\n }\n\n }", "private function __construct() { \n\t\t\n\n\t}", "public function __construct()\n {\n $this->set(array());\n }", "private function __construct() {\r\n\t\t// proc will grab a different column of settings values.\r\n\t\t$testing = (int) $this->config()->testing;\r\n\t\t\r\n\t\t$sql = \"CALL settings_get($testing)\";\r\n $rs = $this->query($sql);\r\n \r\n if ($this->hasError()) {\r\n error_log($this->getError());\r\n $this->error = \"Unable to load settings\";\r\n }\r\n \r\n if ($rs->hasRecords()) {\r\n\t\t\twhile ($row = $rs->fetchArray()) {\r\n\t\t\t\t$this->{$row['label']} = $row['value'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Handle secure cookies\r\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {\r\n\t\t\t\t$this->cookiesecure = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "abstract protected function relayFields();", "function __set ( $name , $value )\n {\n $this->$name=$value;\n }", "private function __construct() {\r\n\t\t\r\n\t}", "public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }", "function setPrivateParams($privateParams) {\n\t\t$this->privateParams = $privateParams;\n\t}", "public function __construct($field){\n $this->field = $field;\n }", "function __set($name, $value) {\r\n if ($name == 'mr') {\r\n $this->max_rating = intval($value);\r\n } else if ($name == 'st') {\r\n $this->step = intval($value);\r\n } else if ($name == 'vis') {\r\n $this->visible = $value == '1';\r\n } else if ($name == 'seq') {\r\n $this->sequence = intval($value);\r\n } else if ($name == 'cr') {\r\n $this->created = DateTime::createFromFormat('Y-m-d H:i:s', $value);\r\n } else if ($name == 'upd') {\r\n $this->updated = DateTime::createFromFormat('Y-m-d H:i:s', $value);\r\n } else if ($name == 'num') {\r\n $this->num_ratings = intval($value);\r\n } else if ($name == 'total') {\r\n $this->tot_ratings = floatval($value);\r\n }\r\n\r\n }", "public function __construct()\n {\n $this->fillable = array_keys(alterLangArrayElements('countries', ['fields' => array_combine($this->fillable,$this->fillable)], $key = 'fields')['fields']);\n $this->casts = alterLangArrayElements('countries', ['fields' => $this->casts], $key = 'fields')['fields'];\n self::$rules = alterLangArrayElements('countries', ['fields' => self::$rules], $key = 'fields')['fields'];\n }", "public function setValues(){\n if($this->getType() == \"var\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"int\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"bool\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"string\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"nil\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"label\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"type\"){\n $this->setValue($this->getArg());\n }else{\n $this->setValue(\"CHYBA\");\n }\n }", "public function __set($field, $value){\n\t\tif(array_key_exists($field, $this->fields)){\n\t\t\t$this->fields[$field]=$value;\n\t\t}\n\t}", "function _prepare(){\t\r\r\n\t\t// init array\r\r\n\t\t$this->options = array();\t\r\r\n\t\t// to be saved vars\r\r\n\t\t$vars = array('active_modules','active_plugins','setting');\r\r\n\t\t// set\r\r\n\t\tforeach($vars as $var){\r\r\n\t\t\t// var\r\r\n\t\t\t$this->options[$var] = $this->{$var};\r\r\n\t\t}\t\r\r\n\t}", "private function __construct(){\n \t\n }", "private function __construct() {\r\n\t\r\n\t}", "public function __construct()\n {\n $this->setRequiredFields($this->_aDefaultRequiredFields);\n\n $aRequiredFields = oxRegistry::getConfig()->getConfigParam('aMustFillFields');\n if (is_array($aRequiredFields)) {\n $this->setRequiredFields($aRequiredFields);\n }\n }", "abstract protected function setRequiredGetters();", "public function __init(){}", "public function __construct() \n {\n //$this->_val = new Val();\n }", "function build() {\n $this->to_usd = new view_field(\"To USD\");\n $this->to_local = new view_field(\"To local\");\n $this->timestamp = new view_field(\"Created\");\n $this->expire_date_time = new view_field(\"Expired\");\n parent::build();\n }", "public function __construct() {\r\n\t\t$this->_val = new \\tinyPHP\\Classes\\Core\\Val();\r\n\t}", "function __construct(){\n\t\tif (func_num_args() > 0){\n\t\t\t$args = func_get_args(0);\n\t\t\tforeach($args[0] as $key => $value){ //value set from argument array\n\t\t\t\t$this->$key = $value; \n\t\t\t}\n\t\t\tif (isset($this->con)){ //if database connection and key given, set from db\n\t\t\t\tif (isset($this->article_id) || isset($this->perooz_article_id)){\n\t\t\t\t\t$properly_set = $this->set_from_db($this->con);\n\t\t\t\t\tif (!$properly_set){\n\t\t\t\t\t\techo 'This has not worked.';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->date = time(); \n\t}", "function __construct()\r\n {\r\n $this->field_names = func_get_args();\r\n }", "private function setFields(): void\n {\n $fields = acf_get_block_fields(array('name' => 'acf/' . strtolower(str_replace('-', '', $this->getId()))));\n if (!empty($fields)) {\n if ('data' === $fields[0]['name']) {\n $parsedFields = $this->parseField($fields[0]);\n if (!empty($parsedFields['data'])) {\n $this->fields = $parsedFields['data'];\n }\n }\n }\n }", "function __construct($value){\n $this->value = $value;\n //\n parent::__construct();\n }", "protected function _construct()\n\t{\n\t\tparent::_construct();\n\n\t\t$data = array();\n\t\t\n\t\tforeach($this->_optionFields as $key) {\n\t\t\tif ($key !== '') {\n\t\t\t\t$key = '_' . $key;\n\t\t\t}\n\n\t\t\t$options = Mage::helper('wordpress')->getWpOption('wpseo' . $key);\n\t\t\t\n\t\t\tif ($options && ($options = unserialize($options))) {\n\t\t\t\tforeach($options as $key => $value) {\n\t\t\t\t\tif (strpos($key, '-') !== false) {\n\t\t\t\t\t\tunset($options[$key]);\n\t\t\t\t\t\t$options[str_replace('-', '_', $key)] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (is_array($options)) {\n \t\t\t\t$data = array_merge($data, $options);\n }\n\t\t\t}\n\t\t}\n\n\t\t$this->setData($data);\n\t}", "private function PREPARE_OBJECT_VARIABLE_METHOD()\r\r {\r\r if($this->_type === 'POST')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_POST[$key])?$_POST[$key]:false;\r\r } \r\r } \r\r else if($this->_type === 'GET')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_GET[$key])?$_GET[$key]:false;\r\r } \r\r } \r\r }", "function __set($var, $val){\n\t\tif($var == 'primary_key'){\n\t\t\t$this->primary_key = $val;\n\t\t}\n\n\t\tif($this->check_fields){\n\t\t\tif(in_array($var, $this->fields)){\n\t\t\t\t$this->data[$var] = $val;\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\t$this->data[$var] = $val;\n\t\t\treturn true;\n\t\t}\n\t}", "public function init()\r\n {\r\n $this->visible=true;\r\n $this->descriptionashint=true;\r\n $this->locked=false;\r\n $this->maxdepth=3;\r\n $this->sortposition=0;\r\n }", "protected function init()\n {\n $this->setValueIfExistsAndNotNothing('bookmarkPid');\n $this->setValueIfExistsAndNotNothing('groupIdsToShowBookmarksFor');\n \n $this->setBooleanIfExistsAndNotNothing('showPrivateBookmarks');\n $this->setBooleanIfExistsAndNotNothing('showGroupBookmarks');\n $this->setBooleanIfExistsAndNotNothing('showPublicBookmarks');\n $this->setBooleanIfExistsAndNotNothing('createPublicBookmarks');\n $this->setBooleanIfExistsAndNotNothing('createPrivateBookmarks');\n $this->setBooleanIfExistsAndNotNothing('createGroupBookmarks');\n $this->setBooleanIfExistsAndNotNothing('userCanDeleteAll');\n }", "function __construct($value) {\n\t\t$this->_value = $value;\n\t}", "public function testSetValues()\n {\n $this->todo('stub');\n }", "public function __construct()\n {\n // since this class extends Mage_Core_Model_Config we have access to that classes protected properties\n $this->_xml = \\Mage::getConfig()->_xml;\n }", "public function __construct()\n {\n $this->_val=new Val();\n }", "public function __construct()\n {\n parent::__construct();\n// $this->upper_limit = self::getConfig('kandianbao', 'upper_limit')->config_value ?: 600;\n// $this->designArea = self::getConfig('kandianbao', 'area')->config_value;\n list($this->keywords, $this->keyword_num) = self::get_keyword_num();\n $this->keyword_catch_num = self::getConfig('kandianbao', 'keyword_catch_num')->config_value;\n }", "private function __construct(){\n\t\t }", "function setRefFields($val) {\n $this->_refFields = $val;\n }", "function __construct() \n\t\t{\n\t\t \n\t\t \t$this->bi_config(); \t\t\t\n\t\t\t// setup all variables \n\t\t\t$this->clear();\n\t\t\t\n\t\t}", "private function __construct()\t{}", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "protected function setupObject()\n {\n try {\n $dom = $this->getAttribute(\"domain\");\n if ($dom) {\n $this->getDomain()->copy($this->getTable()->getDatabase()->getDomain($dom));\n } else {\n $type = strtoupper($this->getAttribute(\"type\"));\n if ($type) {\n if ($platform = $this->getPlatform()) {\n $this->getDomain()->copy($this->getPlatform()->getDomainForType($type));\n } else {\n // no platform - probably during tests\n $this->setDomain(new Domain($type));\n }\n } else {\n if ($platform = $this->getPlatform()) {\n $this->getDomain()->copy($this->getPlatform()->getDomainForType(self::DEFAULT_TYPE));\n } else {\n // no platform - probably during tests\n $this->setDomain(new Domain(self::DEFAULT_TYPE));\n }\n }\n }\n\n $this->name = $this->getAttribute(\"name\");\n $this->phpName = $this->getAttribute(\"phpName\");\n $this->phpType = $this->getAttribute(\"phpType\");\n\n if ($this->getAttribute(\"prefix\", null) !== null) {\n $this->namePrefix = $this->getAttribute(\"prefix\");\n } elseif ($this->getTable()->getAttribute('columnPrefix', null) !== null) {\n $this->namePrefix = $this->getTable()->getAttribute('columnPrefix');\n } else {\n $this->namePrefix = '';\n }\n\n // Accessor visibility\n if ($this->getAttribute('accessorVisibility', null) !== null) {\n $this->setAccessorVisibility($this->getAttribute('accessorVisibility'));\n } elseif ($this->getTable()->getAttribute('defaultAccessorVisibility', null) !== null) {\n $this->setAccessorVisibility($this->getTable()->getAttribute('defaultAccessorVisibility'));\n } elseif ($this->getTable()->getDatabase()->getAttribute('defaultAccessorVisibility', null) !== null) {\n $this->setAccessorVisibility($this->getTable()->getDatabase()->getAttribute('defaultAccessorVisibility'));\n } else {\n $this->setAccessorVisibility(self::DEFAULT_VISIBILITY);\n }\n\n // Mutator visibility\n if ($this->getAttribute('mutatorVisibility', null) !== null) {\n $this->setMutatorVisibility($this->getAttribute('mutatorVisibility'));\n } elseif ($this->getTable()->getAttribute('defaultMutatorVisibility', null) !== null) {\n $this->setMutatorVisibility($this->getTable()->getAttribute('defaultMutatorVisibility'));\n } elseif ($this->getTable()->getDatabase()->getAttribute('defaultMutatorVisibility', null) !== null) {\n $this->setMutatorVisibility($this->getTable()->getDatabase()->getAttribute('defaultMutatorVisibility'));\n } else {\n $this->setMutatorVisibility(self::DEFAULT_VISIBILITY);\n }\n\n $this->peerName = $this->getAttribute(\"peerName\");\n\n // retrieves the method for converting from specified name to a PHP name, defaulting to parent tables default method\n $this->phpNamingMethod = $this->getAttribute(\"phpNamingMethod\", $this->parentTable->getDatabase()->getDefaultPhpNamingMethod());\n\n $this->isPrimaryString = $this->booleanValue($this->getAttribute(\"primaryString\"));\n\n $this->isPrimaryKey = $this->booleanValue($this->getAttribute(\"primaryKey\"));\n\n $this->isNodeKey = $this->booleanValue($this->getAttribute(\"nodeKey\"));\n $this->nodeKeySep = $this->getAttribute(\"nodeKeySep\", \".\");\n\n $this->isNestedSetLeftKey = $this->booleanValue($this->getAttribute(\"nestedSetLeftKey\"));\n $this->isNestedSetRightKey = $this->booleanValue($this->getAttribute(\"nestedSetRightKey\"));\n $this->isTreeScopeKey = $this->booleanValue($this->getAttribute(\"treeScopeKey\"));\n\n $this->isNotNull = ($this->booleanValue($this->getAttribute(\"required\")) || $this->isPrimaryKey); // primary keys are required\n\n //AutoIncrement/Sequences\n $this->isAutoIncrement = $this->booleanValue($this->getAttribute(\"autoIncrement\"));\n $this->isLazyLoad = $this->booleanValue($this->getAttribute(\"lazyLoad\"));\n\n // Add type, size information to associated Domain object\n $this->getDomain()->replaceSqlType($this->getAttribute(\"sqlType\"));\n if (!$this->getAttribute(\"size\") && $this->getDomain()->getType() == 'VARCHAR' && $this->hasPlatform() && !$this->getAttribute(\"sqlType\") && !$this->getPlatform()->supportsVarcharWithoutSize()) {\n $size = 255;\n } else {\n $size = $this->getAttribute(\"size\");\n }\n $this->getDomain()->replaceSize($size);\n $this->getDomain()->replaceScale($this->getAttribute(\"scale\"));\n\n $defval = $this->getAttribute(\"defaultValue\", $this->getAttribute(\"default\"));\n if ($defval !== null && strtolower($defval) !== 'null') {\n $this->getDomain()->setDefaultValue(new ColumnDefaultValue($defval, ColumnDefaultValue::TYPE_VALUE));\n } elseif ($this->getAttribute(\"defaultExpr\") !== null) {\n $this->getDomain()->setDefaultValue(new ColumnDefaultValue($this->getAttribute(\"defaultExpr\"), ColumnDefaultValue::TYPE_EXPR));\n }\n\n if ($this->getAttribute('valueSet', null) !== null) {\n if (version_compare(PHP_VERSION, '5.3.0', '>=')) {\n $valueSet = str_getcsv($this->getAttribute(\"valueSet\"));\n } else {\n // unfortunately, no good fallback for PHP 5.2\n $valueSet = explode(',', $this->getAttribute(\"valueSet\"));\n }\n $valueSet = array_map('trim', $valueSet);\n $this->valueSet = $valueSet;\n } elseif (preg_match('/enum\\((.*?)\\)/i', $this->getAttribute('sqlType', ''), $matches)) {\n if (version_compare(PHP_VERSION, '5.3.0', '>=')) {\n $valueSet = str_getcsv($matches['1'], ',', '\\'');\n } else {\n // unfortunately, no good fallback for PHP 5.2\n $valueSet = array();\n foreach (explode(',', $matches['1']) as $value) {\n $valueSet[] = trim($value, \" '\");\n }\n }\n $this->valueSet = $valueSet;\n }\n\n $this->inheritanceType = $this->getAttribute(\"inheritance\");\n // here we are only checking for 'false', so don't use booleanValue()\n $this->isInheritance = ($this->inheritanceType !== null && $this->inheritanceType !== \"false\");\n\n $this->description = $this->getAttribute(\"description\");\n } catch (Exception $e) {\n throw new EngineException(\"Error setting up column \" . var_export($this->getAttribute(\"name\"), true) . \": \" . $e->getMessage());\n }\n }", "public function __set($field, $value) {\r\n $this->$field = $value;\r\n }", "public function __set($field, $value) {\r\n $this->$field = $value;\r\n }", "function __construct() {\n\t \n\t \t\t$this->bi_config(); \t\t\t\n\t\t\t// setup all variables \n\t\t\t$this->Clear();\n\t}", "function _setDefaults()\n {\n $this->type = $this->rs['type'] = \"unknown\";\n $this->parent = $this->rs['parent'] = 0;\n $this->lecture_id = $this->rs['lecture_id'] = SessionDataBean::getLectureId();\n $this->title = $this->rs['title'] = \"\";\n $this->mtitle = $this->rs['mtitle'] = \"\";\n $this->text = $this->rs['text'] = \"<p></p>\";\n $this->position = $this->rs['position'] = 0;\n $this->redirect = $this->rs['redirect'] = \"\";\n $this->ival1 = $this->rs['ival1'] = 0;\n $this->copy_parent = $this->rs['copy_parent'] = false;\n }", "function __construct() {\r\n $this->config->token = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"token\", '');\r\n $this->config->api = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"api\", '');\r\n $this->config->sender = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"sender\", '');\r\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}" ]
[ "0.7261662", "0.6332225", "0.6202813", "0.6167157", "0.61213464", "0.60737234", "0.60400987", "0.60295856", "0.60248417", "0.5962649", "0.5959441", "0.5948813", "0.5947555", "0.5944998", "0.5926447", "0.5903928", "0.5888553", "0.586996", "0.58501285", "0.584928", "0.58488655", "0.58473647", "0.58473647", "0.58473647", "0.58473647", "0.58473647", "0.5842773", "0.58310324", "0.58251137", "0.5811275", "0.5810737", "0.57947", "0.5794128", "0.57755333", "0.5754", "0.5748152", "0.5742394", "0.57411146", "0.5736887", "0.5730876", "0.57301813", "0.573", "0.57299834", "0.5725098", "0.5715199", "0.57057196", "0.57041353", "0.5684722", "0.5677386", "0.5671482", "0.5670641", "0.5669961", "0.56695926", "0.56676275", "0.56660736", "0.56652004", "0.5660544", "0.5651514", "0.5650682", "0.5649945", "0.5648083", "0.5644456", "0.5643809", "0.5639855", "0.56259257", "0.56220055", "0.5621759", "0.5613134", "0.5606263", "0.5603936", "0.55910367", "0.5590646", "0.55903655", "0.5583756", "0.5582802", "0.55760616", "0.5573356", "0.55730724", "0.55705357", "0.5567594", "0.5567594", "0.5567594", "0.5567594", "0.5567594", "0.5567594", "0.5567594", "0.5567594", "0.5567594", "0.5566588", "0.55664176", "0.55664176", "0.55613697", "0.5559832", "0.5553998", "0.5553488", "0.5553488", "0.5553488", "0.5553488", "0.5553488", "0.5553488", "0.5553488" ]
0.0
-1
this function selects customer according to the variables defined; variables such as: firstname lastname
public function showData($customer_Id) { $connection=new server(); //accessing connection from the server.php file $connection=$connection->serverConnnection();//accessing connection from the server.php file $sql="CALL show_Customer(:customer_Id)"; //command for the sql to show data of the customer for example his name or city $PDOStatement=$connection->prepare($sql); //preapring connection to the sql $PDOStatement->bindParam(":customer_Id",$customer_Id); //binding perimeter $PDOStatement->execute(); // executing data if($row=$PDOStatement->fetch(PDO::FETCH_ASSOC)) // fetching data { $this->customer_Id=$row["customer_Id"]; $this->first_Name=$row["first_Name"]; $this->last_Name=$row["last_Name"]; $this->City=$row["City"]; $this->Province=$row["Province"]; $this->postal_Code=$row["postal_Code"]; $this->user_Name=$row["user_Name"]; $this->user_Password=$row["user_Password"]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function select_customer()\n {\n $data = array();\n $customer_id = $this->input->post(\"term\");\n \n if ($this->Customer->account_number_exists($customer_id))\n {\n $customer_id = $this->Customer->customer_id_from_account_number($customer_id);\n }\n \n if ($this->Customer->exists($customer_id))\n {\n $this->sale_lib->set_customer($customer_id);\n if($this->config->item('automatically_email_receipt'))\n {\n $this->sale_lib->set_email_receipt(1);\n }\n }\n else\n {\n $data['error']=lang('sales_unable_to_add_customer');\n }\n $this->_reload($data);\n }", "function select_customer() {\n $data = array();\n $customer_id = $this->input->post(\"customer\");\n\n if ($this->Customer->account_number_exists($customer_id)) {\n $customer_id = $this->Customer->customer_id_from_account_number($customer_id);\n }\n\n if ($this->Customer->exists($customer_id)) {\n $this->sale_lib->set_customer($customer_id);\n if ($this->config->item('automatically_email_receipt')) {\n $this->sale_lib->set_email_receipt(1);\n }\n } else {\n $data['error'] = lang('sales_unable_to_add_customer');\n }\n $this->_reload($data);\n }", "function getSpecificCustomersFromRequest() {\n\t\t$_customers = array();\n\n\t\tif (isset($_REQUEST['specificCustomersEditControl'])){\n\t\t\t$i = 0;\n\t\t\twhile (true){\n\t\t\t\tif(isset($_REQUEST[$_REQUEST['specificCustomersEditControl'] . '_variant0_' . $_REQUEST['specificCustomersEditControl'] . '_item' . $i])){\n\t\t\t\t\t$_customers[] = $_REQUEST[$_REQUEST['specificCustomersEditControl'] . '_variant0_' . $_REQUEST['specificCustomersEditControl'] . '_item' . $i];\n\t\t\t\t\t$i++;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn weConvertToIds($_customers, CUSTOMER_TABLE);\n\t}", "public function get_customer($user_role,$customer_hint){\n\t\t$sqlString=\"\";\n\t\tif($customer_hint){\n\t\t\t$data=explode(\" \", $customer_hint);\n\t\t\tforeach($data as $k=>$val){\n\t\t\t\t$sqlString.=\" and name like '%\".$val.\"%'\";\n\t\t\t}\n\t\t}\n\t\tif($user_role==3 and !$this->input->post('service',true)){\n\t\t\t$user=$this->session->userdata('userId');\n\t\t\tif($sqlString){\n\t\t\t\t$sqlString=substr($sqlString,5);\n\t\t\t\t$sql=\"select id,name from customers where created_by=\".$user.\" and (\".$sqlString.\") and deleted=0 order by name asc limit 20\";\n\t\t\t\t$result=$this->db->query($sql);\n\t\t\t\treturn $result->result();\n\t\t\t}else{\n\t\t\t\t$sql=\"select id,name from customers where created_by=\".$user.\" and deleted=0 order by name asc limit 20\";\n\t\t\t\t$result=$this->db->query($sql);\n\t\t\t\treturn $result->result();\n\t\t\t\t\n\t\t\t}\n\t\t}else{\n\t\t\tif($sqlString){\n\t\t\t\t$sqlString=substr($sqlString,5);\n\t\t\t\t$sql=\"select id,name from customers where (\".$sqlString.\") and deleted=0 order by name asc limit 20\";\n\t\t\t\t$result=$this->db->query($sql);\n\t\t\t\treturn $result->result();\n\t\t\t}else{\n\t\t\t\t$sql=\"select id,name from customers where deleted=0 order by name asc limit 20\";\n\t\t\t\t$result=$this->db->query($sql);\n\t\t\t\treturn $result->result();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function getCustomer();", "function getcustomername($value)\n\t{\n\t $getnameofcustomer=\"SELECT customer_name FROM `customer_general_detail` WHERE `customer_id`='$value'\";\n\t\t$name_data=$this->get_results( $getnameofcustomer );\n\t\treturn $name_data;\n\t}", "function sql_getCustomers(){\r\n\t\t\r\n\t\tglobal $database;\r\n\t\t$kunden = $database->select ( \"kunden\", [\r\n\t\t\t\t\"id\",\r\n\t\t\t\t\"name\"\r\n\t\t\t\t],[\"ORDER\"=> \"name ASC\"] );\r\n\t\treturn $kunden;\r\n\t}", "function loadCustomer($customer_id)\n\t{\n\t\t$out = '<option value=\\'-1\\' ></option>';\n\t\t$cust_id = (int)$_SESSION[conf::app.'_customer_id'];\n\t\t$qu = \"select `name`,`id` from `customers` where `id`='$cust_id'\";\n\t\tif($_SESSION[conf::app.'_customer_typ']==2)\n\t\t\t$qu = 'select `name`,`id` from `customers` order by `name`';\n\t\tmysql_class::ex_sql($qu,$q);\n\t\twhile($r=mysql_fetch_array($q))\n\t\t{\n\t\t\t$sel = '';\n\t\t\tif($customer_id ==(int)$r['id']) \n\t\t\t\t$sel = 'selected=\\'selected\\'';\n\t\t\t$out.=\"<option value=\".$r['id'].\" $sel >\".$r['name'].\"</option>\\n\";\n\t\t}\n\t\tif($_SESSION[conf::app.'_customer_typ']==2) \n\t\t{\n\t\t\tif($customer_id==-2)\n\t\t\t\t$sel = 'selected=\\'selected\\''; \n\t\t\t$out .= \"<option value='-2' $sel >همه</option>\";\n\t\t}\n\t\treturn $out;\n\t}", "public function getCustomerData() {\n $custData = DB::table('customers')->select('id', 'comp_name')->get();\n $cData = '';\n $cData .=\"<option value='\" . '' . \"' selected='selected' > Select Customer</option>\";\n foreach ($custData as $key => $value) {\n $cData .=\"<option value='\" . $value->id . \"'>\" . $value->comp_name . \"</option>\";\n }\n return $cData;\n }", "public function getCustomerFirstname();", "public function getCustomerName();", "function getCustomerById_customer($id_customer)\n {\n\n\n\n $query = \"SELECT * FROM `customer` WHERE id_customer = '$id_customer'\";\n $hasil = $this->db->query($query);\n\n return $hasil;\n }", "public function getCustomer($customer_id);", "function jpid_get_customer_by( $field, $value ) {\n\t$field = sanitize_key( $field );\n\n\tif ( ! in_array( $field, array( 'customer_id', 'customer_email', 'user_id' ) ) ) {\n\t\treturn null;\n\t}\n\n\tif ( is_numeric( $value ) && $value < 1 ) {\n\t\treturn null;\n\t}\n\n\t$by_user_id = ( $field === 'user_id' ) ? true : false;\n\t$customer = new JPID_Customer( $value, $by_user_id );\n\n\tif ( $customer->get_id() > 0 ) {\n\t\treturn $customer;\n\t} else {\n\t\treturn null;\n\t}\n}", "function getCustomers() {\n $filter = $_POST['filter']; // User's selected filter (default \"Amount Owed\")\n $search = $_POST['clientSearch']; // User's entered search term\n\n if ($search === \"\") {\n $stmt = $GLOBALS['con']->prepare(\"SELECT * FROM customerInfo ORDER BY $filter\");\n // $stmt->bind_param(\"s\", $filter);\n } else {\n $stmt = $GLOBALS['con']->prepare(\"SELECT * FROM customerInfo WHERE first_name LIKE ? OR last_name LIKE ? ORDER BY $filter\");\n $stmt->bind_param(\"ss\", $search, $search);\n }\n\n // $result = mysqli_query($GLOBALS[\"con\"], $sql);\n $stmt->execute();\n $result = $stmt->get_result();\n \n if (mysqli_num_rows($result) > 0) {\n return $result;\n }\n }", "protected function parse_customer() {\n\n\t\tif ( ! empty( $this->args['customer'] ) ) {\n\t\t\t$this->args['customer__in'] = array( $this->args['customer'] );\n\t\t}\n\n\t\treturn $this->parse_in_or_not_in_query( 'customer', $this->args['customer__in'], $this->args['customer__not_in'] );\n\t}", "function getCustomer($db_link, $custID){\n\t\t$sql_cust = \"SELECT * FROM customer LEFT JOIN custsex ON customer.custsex_id = custsex.custsex_id LEFT JOIN custmarried ON customer.custmarried_id = custmarried.custmarried_id LEFT JOIN custsick ON customer.custsick_id = custsick.custsick_id LEFT JOIN user ON customer.user_id = user.user_id WHERE cust_id = '$custID'\";\n\t\t$query_cust = mysqli_query($db_link, $sql_cust);\n\t\tcheckSQL($db_link, $query_cust, $db_link);\n\t\t$result_cust = mysqli_fetch_assoc($query_cust);\n\n\t\treturn $result_cust;\n\t}", "function getAllPerson($sw,$usePre=true) {\n if ($usePre) $Pre=$_SESSION[\"pre\"];\n $rechte=berechtigung(\"cp_\");\n if (!$sw[0]) { $where=\"cp_phone1 like '$Pre\".$sw[1].\"%' or cp_mobile1 like '$Pre\".$sw[1].\"%' \"; }\n else { $where=\"cp_name ilike '$Pre\".$sw[1].\"%' or cp_givenname ilike '$Pre\".$sw[1].\"%' or cp_stichwort1 ilike '$Pre\".$sw[1].\"%'\"; }\n $sql=\"select *,'P' as tab,cp_id as id,cp_name as name from contacts where ($where) and $rechte\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n if($rs) return $rs;\n //Was geschieht wenn nach einer Person mit Vor- und Zuname gesucht wird??\n //Fall 1: Nachname wird zuerst eingeben \"Byron Augusta Ada\"\n $sw_array=explode(\" \",$sw[1],9);\n if (!isset($sw_array[1])) return false;\n $name=array_shift($sw_array);\n $givenname=implode(\" \",$sw_array);\n $where=\"cp_name ilike '$Pre\".$name.\"%' and cp_givenname ilike '$Pre\".$givenname.\"%'\";\n $sql=\"select *,'P' as tab,cp_id as id,cp_name as name from contacts where ($where) and $rechte\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n if ($rs) return $rs;\n //Fall 2: Vorname wird zuerst eingegeben \"Augusta Ada Byron\"\n $sw_array=explode(\" \",$sw[1],9);\n $name=array_pop($sw_array);\n $givenname=implode(\" \", $sw_array);\n $where=\"cp_name ilike '$Pre\".$name.\"%' and cp_givenname ilike '$Pre\".$givenname.\"%'\";\n $sql=\"select *,'P' as tab,cp_id as id,cp_name as name from contacts where ($where) and $rechte\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n if ($rs) return $rs;\n return false;\n}", "public function getCustomers($data = array()) {\n\t\t $sql = \"SELECT c.*, CONCAT(c.lastname, ' ', c.firstname) AS name FROM \" . DB_PREFIX . \"customer c\";\n\n\t\t$implode = array();\n\n\t\tif (!empty($data['filter_name'])) {\n\t\t\t$implode[] = \"CONCAT(c.lastname, ' ', c.firstname) LIKE '%\" . $this->db->escape($data['filter_name']) . \"%'\";\n\t\t}\n\n\t\tif (!empty($data['filter_email'])) {\n\t\t\t$implode[] = \"c.email LIKE '\" . $this->db->escape($data['filter_email']) . \"%'\";\n\t\t}\n\t\t\n\t\tif (!empty($data['filter_username'])) {\n\t\t\t$implode[] = \" c.username LIKE '%\" . $this->db->escape($data['filter_username']) . \"%'\";\n\t\t}\n\t\t\n\t\tif (!empty($data['filter_customer_code'])) {\n\t\t\t$implode[] = \" c.customer_code LIKE '%\" . $this->db->escape($data['filter_customer_code']) . \"%'\";\n\t\t}\n\t\t\n\n\t\tif (!empty($data['filter_phone'])) {\n\t\t\t$implode[] = \"c.telephone LIKE '\" . $this->db->escape($data['filter_phone']) . \"%'\";\n\t\t}\n\n\t\tif (isset($data['filter_newsletter']) && !is_null($data['filter_newsletter'])) {\n\t\t\t$implode[] = \"c.newsletter = '\" . (int)$data['filter_newsletter'] . \"'\";\n\t\t}\n\n\n\n\t\tif (!empty($data['filter_date_added'])) {\n\t\t\t$implode[] = \"DATE(c.date_added) = DATE('\" . $this->db->escape($data['filter_date_added']) . \"')\";\n\t\t}\n\n\t\tif ($implode) {\n\t\t\t$sql .= \" WHERE \" . implode(\" AND \", $implode);\n\t\t}\n\n\t\t$sort_data = array(\n\t\t\t'name',\n\t\t\t'c.customer_id',\n\t\t\t'c.email',\n\t\t\t'c.status',\n\t\t\t'c.approved',\n\t\t\t'c.ip',\n\t\t\t'c.date_added'\n\t\t);\n\n\t\tif (isset($data['sort']) && in_array($data['sort'], $sort_data)) {\n\t\t\t$sql .= \" ORDER BY \" . $data['sort'];\n\t\t} else {\n\t\t\t//$sql .= \" ORDER BY name\";\n\t\t\t$sql .= \" ORDER BY c.customer_id \";\n\t\t}\n\t\tif (isset($data['order']) && ($data['order'] == 'DESC')) {\n\t\t\t$sql .= \" DESC\";\n\t\t} else {\n\t\t\t$sql .= \" ASC\";\n\t\t}\n\n\t\tif (isset($data['start']) || isset($data['limit'])) {\n\t\t\tif ($data['start'] < 0) {\n\t\t\t\t$data['start'] = 0;\n\t\t\t}\n\n\t\t\tif ($data['limit'] < 1) {\n\t\t\t\t$data['limit'] = 20;\n\t\t\t}\n\n\t\t\t$sql .= \" LIMIT \" . (int)$data['start'] . \",\" . (int)$data['limit'];\n\t\t}\n\t\t\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query->rows;\n\t}", "function search_customer($lastName){\n global $db;\n $query = 'SELECT firstName, lastName, email, city\n FROM customers\n WHERE lastName = :lastName';\n $statement = $db->prepare($query);\n $statement->bindValue(\":lastName\", $lastName);\n $statement->execute();\n $customer = $statement->fetchAll();\n return $customer;\n}", "function suchPerson($muster) {\n //$pre = ($_SESSION[\"preon\"])?\"%\":\"\"; //wiederspricht sich mit der Zeile danach\n $pre = isset($muster[\"pre\"])?$_SESSION[\"pre\"]:\"\";\n $fuzzy=$muster[\"fuzzy\"];\n $andor = $muster[\"andor\"];\n $rechte=berechtigung(\"cp_\");\n\n $joinCustomer = \" left join customer K on C.cp_cv_id=K.id\";\n $joinVendor = \" left join vendor V on C.cp_cv_id=V.id\";\n if ($muster[\"cp_name\"]==\"~\") {\n $where=\"and upper(cp_name) ~ '^\\[^A-Z\\].*$'\";\n } else {\n $dbf = array(\"cp_name\", \"cp_givenname\", \"cp_gender\", \"cp_title\" ,\n \"cp_street\", \"cp_zipcode\", \"cp_city\", \"cp_country\", \"country\",\n \"cp_phone1\", \"cp_fax\", \"cp_homepage\", \"cp_email\",\n \"cp_notes\", \"cp_stichwort1\",\"cp_birthday\", \"cp_beziehung\",\n \"cp_abteilung\", \"cp_position\", \"cp_cv_id\", \"cp_owener\");\n $keys=array_keys($muster);\n $anzahl=count($keys);\n $where=\"\";\n if ( isset( $muster[\"customer_name\"] ) ) {\n $whereCustomer = \"K.name ilike '$pre\" . $muster[\"customer_name\"] . \"$fuzzy'\";\n $whereVendor = \"V.name ilike '$pre\" . $muster[\"customer_name\"] . \"$fuzzy'\";\n } else {\n $whereCustomer = '1=1';\n $whereVendor = '1=1';\n }\n\n $daten=false;\n $tbl0=false;\n\n $where = array();\n for ($i=0; $i<$anzahl; $i++) {\n if (in_array($keys[$i],$dbf) && $muster[$keys[$i]]) {\n $suchwort=trim($muster[$keys[$i]]);\n $suchwort=strtr($suchwort,\"*?\",\"%_\");\n if ($keys[$i]==\"cp_birthday\") {$d=explode(\"\\.\",$suchwort); $suchwort=$d[2].\"-\".$d[1].\"-\".$d[0]; };\n if ($keys[$i]==\"cp_phone1\") {\n //Telefonnummer in beliebigen Telefonfeld suchen.\n $tmp =\"(cp_phone1 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_phone2 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_mobile1 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_mobile2 like '\".$pre.$suchwort.\"$fuzzy' \";\n $tmp .=\"or cp_satphone like '\".$pre.$suchwort.\"$fuzzy')\";\n $where[] = $tmp;\n } else {\n $where[].=$keys[$i].\" ilike '\".$pre.$suchwort.\"$fuzzy'\";\n }\n }\n }\n $where = implode (\" $andor \",$where);\n $x=0;\n }\n $felderContact=\"C.cp_id, C.cp_cv_id, C.cp_title, C.cp_name, C.cp_givenname, C.cp_fax, C.cp_email, C.cp_gender as cp_gender\";\n $felderContcatOrCustomerVendor=\"COALESCE (C.cp_country, country) as cp_country,COALESCE (C.cp_zipcode, zipcode) as cp_zipcode,\n COALESCE (C.cp_city, city) as cp_city, COALESCE (C.cp_street, street) as cp_street,\n COALESCE (NULLIF (C.cp_phone1, ''), NULLIF (C.cp_mobile1, ''), phone) as cp_phone1\";\n\n\n $rs0=array(); //leere arrays initialisieren, damit es keinen fehler bei der funktion array_merge gibt\n if ($muster[\"customer\"]){ //auf checkbox customer mit Titel Kunden prüfen\n $sql0=\"select $felderContact, $felderContcatOrCustomerVendor, K.name as name, K.language_id as language_id,\n 'C' as tbl from contacts C$joinCustomer where C.cp_cv_id=K.id and ($whereCustomer $andor $where) and $rechte order by cp_name\";\n $rs0=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs0) $rs0=array();\n }\n $rs1=array(); //s.o.\n if ($muster[\"vendor\"]){ //auf checkbox vendor mit Titel Lieferant prüfen\n $sql0=\"select $felderContact, $felderContcatOrCustomerVendor, V.name as name, V.language_id as language_id, 'V' as tbl\n from contacts C$joinVendor where C.cp_cv_id=V.id and ($whereVendor $andor $where) and $rechte order by cp_name\";\n $rs1=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs1) $rs1=array();\n }\n $rs2=array(); //s.o.\n if ( isset( $muster[\"deleted\"] ) ) { //auf checkbox deleted mit Titel \"gelöschte Ansprechpartner (Kunden und Lieferanten)\" prüfen\n // es gibt nicht nur gelöschte Personen, sonder auch Personen ohne Zuordnung zu Firmen, z.B. private Adressen\n $sql0=\"select $felderContact, C.cp_country, C.cp_zipcode, C.cp_city, C.cp_street, C.cp_phone1,\n '' as name,'P' as tbl from contacts C where $rechte and (\".$where.\") and C.cp_cv_id is null order by cp_name\";\n $rs2=$GLOBALS['dbh']->getAll($sql0);\n if (!$rs2) $rs2=array();\n }\n return array_merge($rs0,$rs1,$rs2); //alle ergebnisse zusammenziehen und zurückgeben\n}", "public function getCustomerMiddlename();", "function getSpecificCustomers() {\n\t\treturn $this->_specificCustomers;\n\t}", "abstract public function getCustomer($ID);", "public function getCustomerById($id){ \n $query = \"SELECT * FROM tbl_customer WHERE id = '$id' \";\n $result = $this->db->select($query);\n return $result;\n }", "function getCustomerData()\n {\n if(isset($_SESSION['user_login']) && $_SESSION['user_login']['roll_id']==6)\n {\n /* @changes: all customer display if all_region=1\n * @author: Sagar Jogi dt: 09/08/2017\n */\n $check=DB::query(\"SELECT all_region FROM \" . CFG::$tblPrefix . \"user WHERE id=%d\",$_SESSION['user_login']['id']);\n if($check[0]['all_region']=='1') {\n return DB::query(\"SELECT id,name FROM \" . CFG::$tblPrefix . \"user where roll_id='7' and active='1' order by id desc\");\n } else {\n $customer_array=array();\n //$query=\"SELECT GROUP_CONCAT(DISTINCT(ID)) as id FROM \" . CFG::$tblPrefix . \"region WHERE find_in_set('\".$_SESSION['user_login']['id'].\"',engineer) <> 0\";\n $query=\"SELECT region as id FROM \" . CFG::$tblPrefix . \"user WHERE id=\".$_SESSION['user_login']['id'];\n \n $result=DB::query($query);\n \n if(count($result) > 0)\n {\n foreach($result as $key=>$value)\n {\n $region=explode(\",\",$value[\"id\"]);\n for($i=0;$i<count($region);$i++)\n {\n $customer_query=\"SELECT u.id, u.name\n FROM \" . CFG::$tblPrefix . \"user AS u\n WHERE active='1' and FIND_IN_SET( u.id, (\n\n SELECT GROUP_CONCAT( DISTINCT (\n ID\n ) ) AS id\n FROM \" . CFG::$tblPrefix . \"user\n WHERE find_in_set( '\".$region[$i].\"', region ) <>0 )\n ) and roll_id=7 \";\n \n $customer_result=DB::query($customer_query);\n if(count($customer_result) > 0)\n {\n foreach($customer_result as $ckey=>$cvalue)\n {\n \n array_push($customer_array,$cvalue);\n }\n } \n }\n }\n $customer_unique_array = array_map(\"unserialize\", array_unique(array_map(\"serialize\", $customer_array)));\n \n return $customer_unique_array;\n }\n }\n \n }\n else \n return DB::query(\"SELECT id,name FROM \" . CFG::$tblPrefix . \"user where roll_id='7' and active='1' order by id desc\");\n }", "function add_customer()\n\t{\n\t\t$table = \"customer\";\n\t\t$where = \"customer_email = '\".$this->input->post('user_email').\"'\";\n\t\t$items = \"customer_id\";\n\t\t$order = \"customer_id\";\n\t\t\n\t\t$result = $this->select_entries_where($table, $where, $items, $order);\n\t\t\n\t\tif(count($result) > 0)\n\t\t{\n\t\t\t$customer_id = $result[0]->customer_id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = array(\n\t\t\t\t'customer_email'=>$this->input->post('user_email'),\n\t\t\t\t'customer_name'=>$this->input->post('seller_name'),\n\t\t\t\t'customer_phone'=>$this->input->post('user_phone')\n\t\t\t);\n\t\t\t\n\t\t\t$table = \"customer\";\n\t\t\t$customer_id = $this->insert($table, $data);\n\t\t}\n\t\t\n\t\treturn $customer_id;\n\t}", "function getCustomer()\n {\n\n $id_profile = $this->session->userdata('sess_id_profile');\n $query = \"SELECT * FROM customer WHERE id_profile = '$id_profile'\";\n $hasil = $this->db->query($query);\n\n return $hasil;\n }", "function get_customer_to_order($customer_id) {\n\t$sql = \"SELECT cust.name, \n\t\t cust.address, \"\n\t\t .TB_PREF.\"credit_status.dissallow_invoices, \n\t\t cust.sales_type AS salestype,\n\t\t cust.dimension_id,\n\t\t cust.dimension2_id,\n\t\t stype.sales_type,\n\t\t stype.tax_included,\n\t\t stype.factor,\n\t\t cust.curr_code,\n\t\t cust.discount,\n\t\t cust.payment_terms,\n\t\t cust.pymt_discount,\n\t\t cust.credit_limit - Sum(IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2,\n\t\t\t-1, 1) * (ov_amount + ov_gst + ov_freight + ov_freight_tax + ov_discount),0)) as cur_credit\n\t\tFROM \".TB_PREF.\"debtors_master cust\n\t\t LEFT JOIN \".TB_PREF.\"debtor_trans trans ON trans.type!=\".ST_CUSTDELIVERY.\" AND trans.debtor_no = cust.debtor_no,\"\n\t\t .TB_PREF.\"credit_status, \"\n\t\t .TB_PREF.\"sales_types stype\n\t\tWHERE cust.sales_type=stype.id\n\t\t\tAND cust.credit_status=\".TB_PREF.\"credit_status.id\n\t\t\tAND cust.debtor_no = \".db_escape($customer_id)\n\t\t.\" GROUP by cust.debtor_no\";\n\n\t$result =db_query($sql,\"Customer Record Retreive\");\n\treturn \tdb_fetch($result);\n}", "public function GetCustomers() {\n \n //set up the query\n $this->sql = \"SELECT *\n FROM customers\";\n \n //execute the query\n $this->RunBasicQuery();\n }", "function searchCustomer($keyword='',$orderby = 'id', $sort = 'ASC',$type ='name')\n {\n //profiling::\n $this->debug_methods_trail[] = __function__;\n\t\t$current_partner_branch = $this->session->userdata['partner_branch'];\n\t\t\n\t\t\n\t\t$additional_sql = '';\n\t\t//declare\n\t\tif($type == 'name'){\n\t\t\t\n\t\t\tif($current_partner_branch != 14 && $current_partner_branch != 1000 && $current_partner_branch != 28){\n\t\t\t\t$conditional_sql = \" AND firstname LIKE '%{$keyword}%' OR lastname LIKE '%{$keyword}%'\" ;\n\t\t\t\t$additional_sql .= \"CONCAT(IFNULL(firstname,''),' ',IFNULL(lastname,''),' (',IFNULL(p.number,''),')') AS name,\";\n\t\t\t\t$tbl = \"a_customer\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$conditional_sql = \" AND name LIKE '%{$keyword}%'\";\n\t\t\t\t$additional_sql .= \" CONCAT(IFNULL(name,''),' (',IFNULL(phone,''),')') AS name, \";\n\t\t\t\t$tbl = \"a_company\";\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse{\n\t $conditional_sql = \" AND p.number LIKE '%{$keyword}%'\" ;\n\t\t}\n\t\n\t\n\t //check if any specifi ordering was passed\n if (! $this->db->field_exists($orderby, 'a_customer')) {\n $orderby = 'name';\n }\n //check if sorting type was passed\n $sort = ($sort == 'asc' || $sort == 'desc') ? $sort : 'ASC';\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start');\n\t\t\n\t\tif($current_partner_branch != 14 && $current_partner_branch != 1000 && $current_partner_branch != 28){\n\n //_____SQL QUERY_______\n $query = $this->db->query(\"SELECT a_customer.id, $additional_sql p.number,e.email\n FROM a_customer\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_phone as p ON p.customer = a_customer.id AND p.main ='1' AND p.status='1'\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_email as e ON e.customer = a_customer.id AND e.main ='1' AND e.status='1'\n\t\t\t\t\t\t\t\t\t\t WHERE 1=1 $conditional_sql \n ORDER BY $orderby $sort\");\n\t\t\t\t\t\t\t\t\t\t \n\t\t}\n\t\telse{\n\t\t\t\n $query = $this->db->query(\"SELECT a_company.id, $additional_sql phone\n FROM a_company\n\t\t\t\t\t\t\t\t\t\t WHERE 1=1 $conditional_sql \n ORDER BY $orderby $sort\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \n $results = $query->result_array(); //multi row array\n //benchmark/debug\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n //return results\n return $results;\n }", "public function getCustomerAction()\n {\n $data = $this->Request()->getParams();\n\n /** @var Shopware_Components_CustomerInformationHandler $customerInformationHandler */\n $customerInformationHandler = Shopware()->CustomerInformationHandler();\n\n //Checks if the user used the live search or selected a customer from the drop down list\n if (isset($data['filter'][0]['value'])) {\n $result = $customerInformationHandler->getCustomerList($data['filter'][0]['value']);\n } else {\n $search = $this->Request()->get('searchParam');\n $result = $customerInformationHandler->getCustomer($search);\n }\n\n foreach ($result as $i => $customer) {\n $result[$i] = $this->extractCustomerData($customer);\n }\n\n $total = count($result);\n\n $this->view->assign(\n [\n 'data' => $result,\n 'total' => $total,\n 'success' => true\n ]\n );\n }", "function get_customer_list()\n {\n $this->company_db->select(\"c.*\");\n $this->company_db->from('tbl_customer c');\n // $this->company_db->where('c.void', 'No');\n $query = $this->company_db->get();\n\n if($query->num_rows() >= 1)\n {\n return $query->result_array();\n }\n else\n {\n return array();\n }\n }", "public function getAllCustomers(){\n\t\t$sql=\"select a.id,a.name,a.cust_type,a.cust_cat,b.name as customer_type_name, c.user_name \n\t\tfrom customers a, customer_type b, users c where b.id=a.cust_type and a.deleted<>1 and c.id=a.created_by order by a.id desc\";\n\t\t$result=$this->db->query($sql);\n\t\treturn $result->result();\n\t}", "function select() {\n return \"\n contact_a.id as contact_id ,\n contact_a.contact_type as contact_type,\n contact_a.sort_name as sort_name,\n contact_a.job_title as job_title,\n contact_a.organization_name as current_employer\n \";\n }", "function custName($custID) {\r\n\tinclude(\"database-login_variables.php\");\r\n\t$dbh = mysqli_connect($host, $user, $password, $dbname);\r\n\tif (!$dbh) {\r\n\t\tprint(mysqli_connect_error() . \"<br />\");\r\n\t\texit();\r\n\t}\r\n\t$result = mysqli_query($dbh, \"SELECT CustFirstName FROM customers WHERE CustomerID='$custID'\");\r\n\t$value = mysqli_fetch_row($result);\r\n\t$custName = $value[0];\r\n\treturn $custName;\r\n}", "function popCustomersList()\n{\n //admin user id\n $sessionuserID = $_SESSION[\"userID\"];\n //connect to the database\n $mysqli = new mysqli(\"mysql.hostinger.co.uk\", \"u700784489_cpv\", \"316118\", \"u700784489_cpvd\");\n // output any connection error\n if ($mysqli->connect_error) {\n die('Error : (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);\n }\n //fetch all data for customer where customer is not logged in\n $query = \"SELECT * FROM Users WHERE userID != $sessionuserID\";\n // mysqli select query\n $results = $mysqli->query($query);\n if ($results) {\n while ($row = $results->fetch_assoc()) {\n $userID = $row[\"userID\"];\n $reg = $row[\"reg\"];\n $firstName = $row[\"fname\"];\n $lastName = $row[\"lname\"];\n $fullName = $firstName . \" \" . $lastName;\n //create a row contain the select button to choose the customer for booking\n print '\n \t\t\t <tr>\n \t\t<td id=\"reg\">' . $reg . '</td>\n \t\t\t\t\t<td>' . $fullName . '</td>\n \t\t\t\t <td>' . $row[\"phone\"] . '</td>\n \t\t\t\t <td><a class=\"btn btn-primary btn-xs customer-select\" data-customer-id=\"' . $row['userID'] . '\" data-customer-name=\"' . $row['fname'] . '\" data-customer-Lname=\"' . $row['lname'] . '\" data-customer-email=\"' . $row['email'] . '\" data-customer-phone=\"' . $row['phone'] . '\" data-customer-reg=\"' . $row['reg'] . '\" data-customer-model=\"' . $row['model'] . '\" data-customer-year=\"' . $row['year'] . '\">Select</a></td>\n \t\t\t </tr>\n \t\t ';\n }\n print '</tr>';\n }\n // Frees the memory associated with a result\n $results->free();\n // close connection\n $mysqli->close();\n}", "public function getCustomerListByCreator($creator){\n\t\t$sql=\"select a.id,a.name,a.cust_type,a.cust_cat,b.name as customer_type_name, c.user_name\n\t\t from customers a, customer_type b, users c where a.created_by=? and b.id=a.cust_type and a.deleted<>1 and c.id=a.created_by order by a.id desc\";\n\t\t$result=$this->db->query($sql,[$creator]);\n\t\treturn $result->result();\n\t}", "function getCustomer($customer_id) {\n \t\n \t$sql = \"SELECT * FROM customer WHERE id=?\";\n \t\n \t$result = $this->db->query($sql, array($customer_id));\n \t\n \tif( !$result )\n \t\treturn FALSE;\n \t\n \t//personal\n \t$personal['id'] = $result['id'];\n \t$personal['name'] = $result['name'];\n \t$personal['address'] = $result['address'];\n \t$personal['identify_no'] = $result['identify_no'];\n \t$personal['birthday'] = $result['birthday'];\n \t$personal['cellphone'] = $result['cellphone'];\n \t$personal['email'] = $result['email'];\n \t$personal['gender'] = $result['gender'];\n \t$personal['marriage'] = $result['marriage'];\n \t$personal['telephone'] = $result['telephone'];\n \t$personal['thumbnail'] = $result['thumbnail'];\n \t$personal['fb_id'] = $result['fb_id'];\n \t$customer['note'] = $data[\"note\"];\n \t$personal['create_time'] = $result['create_time'];\n \t$personal['modify_time'] = $result['modify_time'];\n $personal['personality'] = $result['personality'];\n \t\n \t//children\n \t$child['boy'] = $result['child_boy'];\n \t$child['girl'] = $result['child_girl'];\n \t\n \t//visit_history\n \t$visit_records = $this->getVisitRecords($customer_id);\n \t\n \t//evaluation\n \t$evaluations = $this->getEvaluation($customer_id);\n \t\n \t//tag\n \t$tags = $this->getTags($customer_id);\n \t\n \n \t//company\n \t$company['name'] = $result['company_name'];\n \t$company['address'] = $result['company_address'];\n \t$company['phone'] = $result['company_phone'];\n \t$company['category'] = $result['company_category'];\n \t$company['title'] = $result['company_title'];\n\n \t\n \t//combine the data\n \t$data = $personal;\n \t$data['child'] = $child;\n \t$data['company'] = $company;\n \t\n \tif( $evaluations )\n \t\t$data['evaluation'] = $evaluations;\n \t\n \tif( $visit_records )\n \t\t$data['visit_history'] = $visit_records;\n \t\n \tif( $tags )\n \t\t$data['tags'] = $tags;\n\n //relationship\n $relationship = $this->getRelationship($customer_id);\n if( $relationship )\n $data['relationship'] = $relationship;\n \t\n \treturn $data;\n }", "function getDetailbank_account($statement,$customefield){\n $xstr=\"SELECT $customefield FROM bank_account $statement\";\n $query = $this->db->query($xstr);\n $row = $query->row();\n return $row;\n }", "public function customer(){\n\t\treturn Customers::find($this->customers_id);\n\t}", "function get_customer($db){\n\n /**\n * Chinese Time - UTF+8\n */\n date_default_timezone_set(\"Asia/Hong_Kong\");\n\n /**\n * Display all the errors on the interface to help troubleshooting\n */\n error_reporting(-1);\n ini_set('display_errors', 'On');\n\n /**\n * Construct the object for the Data Request\n */\n $CustomerManager = new Customer03_Manager($db->host,$db->user,$db->password,$db->port,$db->dbname);\n\n if(isset($_GET['tel_dup'])){\n\n $tel_query = \"select count(*) from (select tel_portable, count(*)\nfrom personne\nwhere tel_portable is not null\nand tel_portable <> ''\nand code_pays_tiers_habituel in ('CN')\ngroup by tel_portable\nhaving count(*) >1) as result\";\n\n $response = $CustomerManager->query($tel_query);\n print $response->count;\n }\n\n if(isset($_GET['account_dup'])){\n\n $account_query = \"select sum(result.c) from (select tel_portable, count(*) as c\nfrom personne\nwhere tel_portable is not null\nand tel_portable <> ''\nand code_pays_tiers_habituel in ('CN')\ngroup by tel_portable\nhaving count(*) >1) as result\";;\n\n $response = $CustomerManager->query($account_query);\n print $response->sum;\n }\n\n}", "function getCustomers() {\n\t\t$customers = \"\";\n\t\t$sql = 'SELECT * FROM Customer';\n\n\t\t$customers = queryDB($sql);\n\n\t\treturn $customers;\n\t}", "function get_customer($customer_id)\n {\n return $this->db->get_where('customer',array('customer_id'=>$customer_id))->row_array();\n }", "function get_company_name($userid, $prevent_empty_company = true)\n{\n $_userid = get_client_user_id();\n if ($userid !== '') {\n $_userid = $userid;\n }\n $CI =& get_instance();\n $CI->db->where('userid', $_userid);\n $client = $CI->db->select(($prevent_empty_company == false ? 'CASE company WHEN \"\" THEN (SELECT CONCAT(firstname, \" \", lastname) FROM tblcontacts WHERE userid = tblclients.userid and is_primary = 1) ELSE company END as company' : 'company'))->from('tblclients')->get()->row();\n if ($client) {\n return $client->company;\n } else {\n return '';\n }\n}", "function get_customer_list_search($terms)\n {\n $this->company_db->select(\"c.*, CONCAT(c.tele_country_code, ' ', c.telephone_number) as telephone_number, CONCAT(c.cell_country_code , ' ', c.cellphone_number) as cellphone_number, CONCAT(c.fname, ' ', c.lname) as name\");\n $this->company_db->from('tbl_customer c');\n //$this->company_db->where('c.void', 'No');\n $column_search = array(\"c.address_line1\", \"CONCAT(c.tele_country_code, ' ', c.telephone_number)\", \"CONCAT(c.cell_country_code , ' ', c.cellphone_number)\", \"CONCAT(c.fname, ' ', c.lname)\");\n\n if(isset($terms) && !empty($terms)) // if datatable send POST for search\n {\n $i = 0;\n foreach ($column_search as $item) // loop column \n { \n if($i===0) // first loop\n {\n $this->company_db->group_start(); // open bracket. query Where with OR clause better with bracket. because maybe can combine with other WHERE with AND.\n $this->company_db->like($item, $terms);\n }\n else\n {\n $this->company_db->or_like($item, $terms);\n }\n \n if(count($column_search) - 1 == $i) //last loop\n $this->company_db->group_end(); //close bracket\n \n $i++;\n }\n }\n\n $query = $this->company_db->get();\n\n if($query->num_rows() >= 1)\n {\n return $query->result_array();\n }\n else\n {\n return array();\n }\n }", "public function getCustomerName(){\n return $this->customer_name;\n }", "public function get_customer($id = null) {\n $this->db->select('*');\n if ($id != NULL) {\n $this->db->where('customer_id_pri', $id);\n }\n $this->db->order_by('customer_id_pri');\n return $this->db->get('customer');\n }", "public static function get_customer_name_using_identity_no($identity_number){\n $name=\"\";\n $conn= DBConnect::getConnection();\n if ($conn->connect_error) {\n echo \"Connection failed: \" . $conn->connect_error;\n }else{\n $sql=\" SELECT name FROM customers where identity_number = $identity_number;\";\n $result=$conn->query($sql);\n if ($result->num_rows ==0 ) { echo\" لا يوجد مستخدم يحمل رقم الهوية هذا \\\"$identity_number\\\" \";}\n else{\n while($row = $result->fetch_assoc()) {\n $name=$row[\"name\"];\n }\n return $name;\n }\n }\n\n }", "function get_client_name($id){\n $answer=$GLOBALS['connect']->query(\"SELECT name, firstName FROM USERS WHERE id='$id'\");\n $data=$answer->fetch();\n return $data[\"name\"].\" \".$data[\"firstName\"];\n\n }", "function getCustomerName($customerID) {\n\t\t$data = \"\";\n\t\t$name = \"\";\n\t\t$sql = \"SELECT FirstName, LastName FROM Customer WHERE CustomerID = '$customerID'\";\n\n\t\t$data = queryDB($sql);\n\t\tif((!empty($data)) && ($data != \"\"))\n\t\t{\n\t\t\t$row = mysql_fetch_array($data, MYSQL_ASSOC);\n\t\t\t$name = \"{$row['FirstName']} {$row['LastName']}\";\n\t\t}\n\n\t\treturn $name;\n\t}", "function get_customer_shipto($customer_id)\n {\n $this->company_db->select(\"s.*\");\n $this->company_db->from('tbl_shipto s');\n //$this->company_db->where('s.void', 'No');\n $this->company_db->where('s.customer_id', $customer_id); \n $query = $this->company_db->get();\n //echo $this->company_db->last_query();die;\n if($query->num_rows() >= 1)\n {\n return $query->result_array();\n }\n else\n {\n return array();\n }\n }", "public function listAllCustomers();", "function getSelectedVendor($userid){\n $datarow = NULL;\n try\n {\n $db = new Database();\n $db->connect();\n \n $sql = \"SELECT userid,firstname,lastname,category,categorycode,phonenumber,email,agebracket,country,countrycode,gender,town,location,stallnumber,userstatus,xikilaaccount,bancoaccount,wantbancoaccount,creationdate FROM registration \".\n \"where userid=:userid\";\n $params = array(\":userid\" => $userid);\n $results = $db->runSelect($sql,$params);\n \n if ($results != null){\n $datarow = $results[0];\n } \n }\n catch(PDOException $ex) {\n echo $ex->getMessage();\n }\n return $datarow;\n }", "function customer_search(){\r\n\t\t//POST varibale here\r\n\t\t$cust_id=trim(@$_POST[\"cust_id\"]);\r\n\t\t$cust_no=trim(@$_POST[\"cust_no\"]);\r\n\t\t$cust_no=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_no);\r\n\t\t$cust_no=str_replace(\"'\", '\"',$cust_no);\r\n\t\t$cust_no_awal=trim(@$_POST[\"cust_no_awal\"]);\r\n\t\t$cust_no_awal=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_no_awal);\r\n\t\t$cust_no_awal=str_replace(\"'\", '\"',$cust_no_awal);\r\n\t\t$cust_no_akhir=trim(@$_POST[\"cust_no_akhir\"]);\r\n\t\t$cust_no_akhir=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_no_akhir);\r\n\t\t$cust_no_akhir=str_replace(\"'\", '\"',$cust_no_akhir);\r\n\t\t$cust_nama=trim(@$_POST[\"cust_nama\"]);\r\n\t\t$cust_nama=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_nama);\r\n\t\t$cust_nama=str_replace(\"'\", '\"',$cust_nama);\r\n\t\t$cust_panggilan=trim(@$_POST[\"cust_panggilan\"]);\r\n\t\t$cust_panggilan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_panggilan);\r\n\t\t$cust_panggilan=str_replace(\"'\", '\"',$cust_panggilan);\r\n\t\t$cust_foreigner=trim(@$_POST[\"cust_foreigner\"]);\r\n\t\t$cust_foreigner=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_foreigner);\r\n\t\t$cust_foreigner=str_replace(\"'\", '\"',$cust_foreigner);\r\n\t\t$cust_kelamin=trim(@$_POST[\"cust_kelamin\"]);\r\n\t\t$cust_kelamin=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_kelamin);\r\n\t\t$cust_kelamin=str_replace(\"'\", '\"',$cust_kelamin);\r\n\t\t$cust_alamat=trim(@$_POST[\"cust_alamat\"]);\r\n\t\t$cust_alamat=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_alamat);\r\n\t\t$cust_alamat=str_replace(\"'\", '\"',$cust_alamat);\r\n\t\t$cust_alamat2=trim(@$_POST[\"cust_alamat2\"]);\r\n\t\t$cust_alamat2=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_alamat2);\r\n\t\t$cust_alamat2=str_replace(\"'\", '\"',$cust_alamat2);\r\n\t\t$cust_kota=trim(@$_POST[\"cust_kota\"]);\r\n\t\t$cust_kota=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_kota);\r\n\t\t$cust_kota=str_replace(\"'\", '\"',$cust_kota);\r\n\t\t$cust_kodepos=trim(@$_POST[\"cust_kodepos\"]);\r\n\t\t$cust_kodepos=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_kodepos);\r\n\t\t$cust_kodepos=str_replace(\"'\", '\"',$cust_kodepos);\r\n\t\t$cust_propinsi=trim(@$_POST[\"cust_propinsi\"]);\r\n\t\t$cust_propinsi=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_propinsi);\r\n\t\t$cust_propinsi=str_replace(\"'\", '\"',$cust_propinsi);\r\n\t\t$cust_negara=trim(@$_POST[\"cust_negara\"]);\r\n\t\t$cust_negara=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_negara);\r\n\t\t$cust_negara=str_replace(\"'\", '\"',$cust_negara);\r\n\t\t$cust_telprumah=trim(@$_POST[\"cust_telprumah\"]);\r\n\t\t$cust_telprumah=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_telprumah);\r\n\t\t$cust_telprumah=str_replace(\"'\", '\"',$cust_telprumah);\r\n\t\t$cust_telprumah2=trim(@$_POST[\"cust_telprumah2\"]);\r\n\t\t$cust_telprumah2=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_telprumah2);\r\n\t\t$cust_telprumah2=str_replace(\"'\", '\"',$cust_telprumah2);\r\n\t\t$cust_telpkantor=trim(@$_POST[\"cust_telpkantor\"]);\r\n\t\t$cust_telpkantor=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_telpkantor);\r\n\t\t$cust_telpkantor=str_replace(\"'\", '\"',$cust_telpkantor);\r\n\t\t$cust_hp=trim(@$_POST[\"cust_hp\"]);\r\n\t\t$cust_hp=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_hp);\r\n\t\t$cust_hp=str_replace(\"'\", '\"',$cust_hp);\r\n\t\t$cust_hp2=trim(@$_POST[\"cust_hp2\"]);\r\n\t\t$cust_hp2=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_hp2);\r\n\t\t$cust_hp2=str_replace(\"'\", '\"',$cust_hp2);\r\n\t\t$cust_hp3=trim(@$_POST[\"cust_hp3\"]);\r\n\t\t$cust_hp3=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_hp3);\r\n\t\t$cust_hp3=str_replace(\"'\", '\"',$cust_hp3);\r\n\t\t$cust_email=trim(@$_POST[\"cust_email\"]);\r\n\t\t$cust_email=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_email);\r\n\t\t$cust_email=str_replace(\"'\", '\"',$cust_email);\r\n\t\t$cust_agama=trim(@$_POST[\"cust_agama\"]);\r\n\t\t$cust_agama=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_agama);\r\n\t\t$cust_agama=str_replace(\"'\", '\"',$cust_agama);\r\n\t\t$cust_pendidikan=trim(@$_POST[\"cust_pendidikan\"]);\r\n\t\t$cust_pendidikan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_pendidikan);\r\n\t\t$cust_pendidikan=str_replace(\"'\", '\"',$cust_pendidikan);\r\n\t\t$cust_profesi=trim(@$_POST[\"cust_profesi\"]);\r\n\t\t$cust_profesi=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_profesi);\r\n\t\t$cust_profesi=str_replace(\"'\", '\"',$cust_profesi);\r\n\t\t$cust_tgllahir=trim(@$_POST[\"cust_tgllahir\"]);\r\n\t\t$cust_tgllahirend =(isset($_POST['cust_tgllahirend']) ? @$_POST['cust_tgllahirend'] : @$_GET['cust_tgllahirend']);\r\n\t\t$cust_tgllahirend=trim(@$_POST[\"cust_tgllahirend\"]);\r\n\t\t$cust_umur=trim(@$_POST[\"cust_umur\"]);\r\n\t\t\r\n\t\t$cust_hobi_baca=trim(@$_POST[\"cust_hobi_baca\"]);\r\n\t\t$cust_hobi_olah=trim(@$_POST[\"cust_hobi_olah\"]);\r\n\t\t$cust_hobi_masak=trim(@$_POST[\"cust_hobi_masak\"]);\r\n\t\t$cust_hobi_travel=trim(@$_POST[\"cust_hobi_travel\"]);\r\n\t\t$cust_hobi_foto=trim(@$_POST[\"cust_hobi_foto\"]);\r\n\t\t$cust_hobi_lukis=trim(@$_POST[\"cust_hobi_lukis\"]);\r\n\t\t$cust_hobi_nari=trim(@$_POST[\"cust_hobi_nari\"]);\r\n\t\t$cust_hobi_lain=trim(@$_POST[\"cust_hobi_lain\"]);\r\n\t\t$cust_referensi=trim(@$_POST[\"cust_referensi\"]);\r\n\t\t$cust_referensi=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_referensi);\r\n\t\t$cust_referensi=str_replace(\"'\", '\"',$cust_referensi);\r\n\t\t$cust_referensilain=trim(@$_POST[\"cust_referensilain\"]);\r\n\t\t$cust_referensilain=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_referensilain);\r\n\t\t$cust_referensilain=str_replace(\"'\", '\"',$cust_referensilain);\r\n\t\t$cust_keterangan=trim(@$_POST[\"cust_keterangan\"]);\r\n\t\t$cust_keterangan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_keterangan);\r\n\t\t$cust_keterangan=str_replace(\"'\", '\"',$cust_keterangan);\r\n\t\t$cust_member=trim(@$_POST[\"cust_member\"]);\r\n\t\t$cust_member=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_member);\r\n\t\t$cust_member=str_replace(\"'\", '\"',$cust_member);\r\n\t\t$cust_member2=trim(@$_POST[\"cust_member2\"]);\r\n\t\t$cust_member2=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_member2);\r\n\t\t$cust_member2=str_replace(\"'\", '\"',$cust_member2);\r\n\t\t$cust_statusnikah=trim(@$_POST[\"cust_statusnikah\"]);\r\n\t\t$cust_statusnikah=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_statusnikah);\r\n\t\t$cust_statusnikah=str_replace(\"'\", '\"',$cust_statusnikah);\r\n\t\t$cust_priority=trim(@$_POST[\"cust_priority\"]);\r\n\t\t$cust_priority=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_priority);\r\n\t\t$cust_priority=str_replace(\"'\", '\"',$cust_priority);\r\n\t\t$cust_jmlanak=trim(@$_POST[\"cust_jmlanak\"]);\r\n\t\t$cust_unit=trim(@$_POST[\"cust_unit\"]);\r\n\t\t$cust_unit=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_unit);\r\n\t\t$cust_unit=str_replace(\"'\", '\"',$cust_unit);\r\n\t\t$cust_aktif=trim(@$_POST[\"cust_aktif\"]);\r\n\t\t$cust_aktif=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_aktif);\r\n\t\t$cust_aktif=str_replace(\"'\", '\"',$cust_aktif);\r\n\t\t$sortby=trim(@$_POST[\"sortby\"]);\r\n\t\t$sortby=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$sortby);\r\n\t\t$sortby=str_replace(\"'\", '\"',$sortby);\r\n\t\t$cust_fretfulness=trim(@$_POST[\"cust_fretfulness\"]);\r\n\t\t$cust_fretfulness=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_fretfulness);\r\n\t\t$cust_fretfulness=str_replace(\"'\", '\"',$cust_fretfulness);\r\n\t\t$cust_creator=trim(@$_POST[\"cust_creator\"]);\r\n\t\t$cust_creator=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_creator);\r\n\t\t$cust_creator=str_replace(\"'\", '\"',$cust_creator);\r\n\t\t$cust_date_create=trim(@$_POST[\"cust_date_create\"]);\r\n\t\t$cust_update=trim(@$_POST[\"cust_update\"]);\r\n\t\t$cust_update=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_update);\r\n\t\t$cust_update=str_replace(\"'\", '\"',$cust_update);\r\n\t\t$cust_date_update=trim(@$_POST[\"cust_date_update\"]);\r\n\t\t$cust_revised=trim(@$_POST[\"cust_revised\"]);\r\n\t\t$cust_umurstart=trim(@$_POST[\"cust_umurstart\"]);\r\n\t\t$cust_umurstart=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_umurstart);\r\n\t\t$cust_umurstart=str_replace(\"'\", '\"',$cust_umurstart);\r\n\t\t$cust_umurend=trim(@$_POST[\"cust_umurend\"]);\r\n\t\t$cust_umurend=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_umurend);\r\n\t\t$cust_umurend=str_replace(\"'\", '\"',$cust_umurend);\r\n\t\t$cust_transaksi_start=trim(@$_POST[\"cust_transaksi_start\"]);\r\n\t\t$cust_transaksi_end=trim(@$_POST[\"cust_transaksi_end\"]);\r\n\t\t$cust_tidak_transaksi_start=trim(@$_POST[\"cust_tidak_transaksi_start\"]);\r\n\t\t$cust_tidak_transaksi_end=trim(@$_POST[\"cust_tidak_transaksi_end\"]);\r\n\t\t$cust_terdaftar=trim(@$_POST[\"cust_terdaftar\"]);\r\n\t\t$cust_tgldaftarend =(isset($_POST['cust_tgldaftarend']) ? @$_POST['cust_tgldaftarend'] : @$_GET['cust_tgldaftarend']);\r\n\t\t$cust_tgldaftarend=trim(@$_POST[\"cust_tgldaftarend\"]);\r\n\t\t$member_terdaftarstart=trim(@$_POST[\"member_terdaftarstart\"]);\r\n\t\t$member_terdaftarend=trim(@$_POST[\"member_terdaftarend\"]);\r\n\t\t$cust_tglawaltrans=trim(@$_POST[\"cust_tglawaltrans\"]);\r\n\t\t$cust_tglawaltransend=trim(@$_POST[\"cust_tglawaltrans_end\"]);\r\n\t\t$cust_tgl=trim(@$_POST[\"cust_tgl\"]);\r\n\t\t$cust_tgl=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_tgl);\r\n\t\t$cust_tgl=str_replace(\"'\", '\"',$cust_tgl);\r\n\t\t$cust_bulan=trim(@$_POST[\"cust_bulan\"]);\r\n\t\t$cust_bulan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_bulan);\r\n\t\t$cust_bulan=str_replace(\"'\", '\"',$cust_bulan);\r\n\t\t$cust_tglEnd=trim(@$_POST[\"cust_tglEnd\"]);\r\n\t\t$cust_tglEnd=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_tglEnd);\r\n\t\t$cust_tglEnd=str_replace(\"'\", '\"',$cust_tglEnd);\r\n\t\t$cust_bulanEnd=trim(@$_POST[\"cust_bulanEnd\"]);\r\n\t\t$cust_bulanEnd=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_bulanEnd);\r\n\t\t$cust_bulanEnd=str_replace(\"'\", '\"',$cust_bulanEnd);\r\n\t\t$cust_bb=trim(@$_POST[\"cust_bb\"]);\r\n\t\t$cust_bb=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$cust_bb);\r\n\t\t$cust_bb=str_replace(\"'\", '\"',$cust_bb);\t\t\r\n\t\t\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t$result = $this->m_customer->customer_search($cust_id ,$cust_no ,$cust_no_awal ,$cust_no_akhir ,$cust_nama, $cust_panggilan, $cust_foreigner ,$cust_kelamin ,$cust_alamat ,$cust_kota ,$cust_kodepos ,$cust_propinsi ,$cust_negara ,$cust_telprumah ,$cust_email ,$cust_agama ,$cust_pendidikan ,$cust_profesi ,$cust_tgllahir ,$cust_tgllahirend ,$cust_referensi ,$cust_referensilain ,$cust_keterangan ,$cust_member ,$cust_member2 ,$cust_terdaftar , $cust_tgldaftarend, $member_terdaftarstart, $member_terdaftarend, $cust_tglawaltrans, $cust_tglawaltransend, $cust_statusnikah , $cust_priority , $cust_jmlanak ,$cust_unit ,$cust_aktif , $sortby, $cust_fretfulness, $cust_creator ,$cust_date_create ,$cust_update ,$cust_date_update ,$cust_revised ,$start,$end, $cust_hobi_baca, $cust_hobi_olah, $cust_hobi_masak, $cust_hobi_travel, $cust_hobi_foto, $cust_hobi_lukis, $cust_hobi_nari, $cust_hobi_lain, $cust_umurstart, $cust_umurend, $cust_umur,$cust_tgl, $cust_bulan, $cust_tglEnd, $cust_bulanEnd, $cust_bb, $cust_transaksi_start, $cust_transaksi_end, $cust_tidak_transaksi_start, $cust_tidak_transaksi_end);\r\n\t\techo $result;\r\n\t}", "public function customers( $show='all' ){\n\t\t\tif( $show == 'customers' ) $statusFilter = 'NOT ISNULL(`since`)';\n\t\t\telseif( $show == 'potential' ) $statusFilter = 'ISNULL(`since`)';\n\t\t\telse $statusFilter = '1';\n\t\t\t$sql = \"SELECT\t`id_customer`,\n\t\t\t\t\t\t\t`customer`\n\t\t\t\t\tFROM `customers`\n\t\t\t\t\tWHERE {$statusFilter}\n\t\t\t\t\tORDER BY `customer`\";\n\t\t\treturn $this->asHash( $sql );\n\t\t}", "function getCustomerRegion($customer_id)\n {\n return DB::query(\"SELECT r.id,r.name FROM \" . CFG::$tblPrefix . \"region AS r LEFT JOIN \" . CFG::$tblPrefix . \"user AS u ON FIND_IN_SET( r.id, u.region ) >0\nWHERE u.id =%d and u.active='1' and r.status='1'\",$customer_id);\n }", "function select() {\n // TODO: clb.organization_name should only be selected if a primary relationship exists.\n return \"\n contact_a.id AS contact_id,\n contact_a.last_name,\n contact_a.first_name,\n contact_a.preferred_language,\n ca.street_address as contact_street_address,\n ca.postal_code as contact_postal_code,\n ca.city as contact_city,\n cc.name as contact_country,\n email,\n phone,\n clb.organization_name\n \";\n }", "function GetRequestCustomer(){\n\t\tif(!empty($this->input->post('idrequest')))\n\t\t$this->db->where('a.id_request_sd',$this->input->post('idrequest'));\n\n\t\tif(!empty($this->input->post('idstatus')))\n\t\t$this->db->where_in('a.id_status',$this->input->post('idstatus'));\n\t\t\n\t\t$result = $this->db->select(' b.*,a.*,b.type')\n\t\t\t\t\t\t\t->from('dis_request_sd_detail a ')\n\t\t\t\t\t\t\t->JOIN('access_order b','a.`order` = b.`order`') \n\t\t\t\t\t\t\t->ORDER_BY('a.id_request_sd','asc')\n\t\t\t\t\t\t\t->ORDER_BY('b.client','asc')\n\t\t\t\t\t\t\t->ORDER_BY('b.project','asc')\n\t\t\t\t\t\t\t->ORDER_BY(' b.`order`','asc')\n\t\t\t\t\t\t\t->ORDER_BY(' a.NAME ','asc')\n\t\t\t\t\t\t\t->ORDER_BY(' a.pack','asc')\n\t\t\t\t\t\t\t->get();\n\t\t\t\t\t\t\t//echo $this->db->last_query();\n\t\treturn $result->result();\n\n\t}", "function popCustomersList() {\n $mysqli = new mysqli(SERVER, USER, PASS, DB);\n // output any connection error\n if ($mysqli->connect_error) {\n die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);\n }\n // the query\n $query = \"SELECT * FROM customers ORDER BY firstname ASC\";\n // mysqli select query\n $results = $mysqli->query($query);\n if($results) {\n print '<table class=\"table table-striped table-bordered\" id=\"data-table\"><thead><tr>\n <th><h4>First name</h4></th>\n <th><h4>LastName name</h4></th>\n <th><h4>phone</h4></th>\n <th><h4>Vehicle Registration</h4></th>\n <th><h4>Action</h4></th>\n </tr></thead><tbody>';\n while($row = $results->fetch_assoc()) {\n print '<tr>\n <td>'.$row[\"firstname\"].'</td>\n <td>'.$row[\"lastname\"].'</td>\n <td>'.$row[\"customerphone\"].'</td>\n <td>'.$row[\"vehiclereg\"].'</td>\n <td><a href=\"#\" class=\"btn btn-primary btn-xs customer-select\" setfirstname=\"'.$row['firstname'].'\" setlastname=\"'.$row['lastname'].'\" setcustomerid=\"'.$row['customerid'].'\"\n setphone=\"'.$row['customerphone'].'\" setcity=\"'.$row['city'].'\" setparish=\"'.$row['parish'].'\" setemail=\"'.$row['customeremail'].'\" setvehiclereg=\"'.$row['vehiclereg'].'\">Select</a></td>\n </tr>';\n }\n print '</tr></tbody></table>';\n } else {\n echo \"<p>There are no customers to display.</p>\";\n }\n\n $mysqli->close();\n }", "public function getCustomer($_ID)\n {\n return $this->getUnique(\"customers\", $_ID);\n }", "function obtenerClientes($conexion){\n\n $sql = \"SELECT c.customer_id,\n c.store_id,\n c.first_name,\n c.last_name,\n CONCAT(c.first_name, ' ', c.last_name) AS name,\n LOWER(c.email) AS email,\n c.address_id,\n c.create_date,\n DATE_FORMAT(c.create_date, '%d/%m/%Y %l:%i %p') AS fecha,\n a.address,\n /*CASE c.active WHEN 1 THEN 'Si' ELSE 'No' END AS active*/\n IF(c.active = 1, 'Si', 'No') AS active\n FROM customer AS c\n LEFT JOIN store AS s ON c.store_id = s.store_id\n LEFT JOIN address AS a ON c.address_id = a.address_id\n ORDER BY c.first_name ASC;\";\n\n return $conexion->query($sql)->fetchAll();\n\n}", "public function getCustomer($args)\n {\n return $this->buildQuery('GetCustomer', $args);\n }", "function showCustomers($con) {\n\t\ttry {\n\t\t\t$stm = $con->prepare(\"SELECT * FROM usuarios WHERE rol = 'cliente'\");\n\t\t\t$stm->execute();\n\t\t\treturn $stm->fetchAll();\t\t\t\n\t\t} catch (PDOException $e) {\n\t\t\techo $e->getMessage();\t\n\t\t}\n\t}", "public function getCustomerName(){\n return $this->customer ? $this->customer->name : '- no name provided -';\n }", "public static function loadAllCustomerBySearch() {\n\t}", "public function getCustname()\n {\n return $this->custname;\n }", "function searchCustomer(){\r\n $conn= databaseConnection();\r\n if(isset($_POST['hint']) && ($_POST['hint']!=\"\"))\r\n {\r\n $hint =$_POST['hint'];\r\n $sql = \"SELECT \r\n CustomerId,\r\n CustomerName1,\r\n CustomerName2\r\n\r\n FROM tblCustomers where CustomerName1 LIKE '\".$hint.\"%' ORDER BY CustomerName1;\";\r\n } else {\r\n $sql = \"SELECT \r\n CustomerId,\r\n CustomerName1,\r\n CustomerName2\r\n\r\n FROM tblCustomers ORDER BY CustomerName1;\";\r\n }\r\n $result = mysqli_query($conn, $sql);\r\n //if sql succeed\r\n if (mysqli_num_rows($result) > 0) \r\n {\r\n while($row = mysqli_fetch_assoc($result)) \r\n {\r\n echo\r\n '<input type=\"checkbox\" name=\"Customers[]\" \r\n onchange=\"ChangeStoresList()\" \r\n value=\"'. $row[\"CustomerId\"].'\"> '\r\n . $row[\"CustomerName1\"].' '\r\n . $row[\"CustomerName2\"]\r\n .'<br>';\r\n\r\n }\r\n }\r\n else\r\n {\r\n echo \"0 results\";\r\n }\r\n mysqli_close($conn);\r\n }", "public function SearchCustomer($string) {\n \n //replace troublesome special characters with escaped versions to make them searchable\n $characters = array('/\\\\\\/', '/\\*/', '/\\?/', '/\\^/', '/\\./', '/\\+/', '/\\$/', '/\\|/', '/\\(/', '/\\)/', '/\\[/', '/\\]/', '/\\{/', '/\\}/', '/\\,/');\n $replacements = array('\\\\\\\\\\\\', '\\*', '\\?', '\\^', '\\.', '\\+', '\\$', '\\|', '\\(', '\\)', '\\[', '\\]', '\\{', '\\}', '\\,',);\n $string = preg_replace($characters, $replacements, $string);\n \n //modify the search string for regex (replace all white space with | for use with RLIKE query)\n $search = preg_replace('/\\s+/','|', $string);\n \n //set up the query\n $this->sql = \"SELECT *\n FROM customers\n WHERE CONCAT_WS(' ', firstName, lastName) RLIKE :search\";\n \n //execute the query\n $this->RunAdvancedQuery([\n ':search' => $search,\n ]);\n }", "public function getCustomers($data = array()) {\r\n\t\t$sql = \"SELECT c.*, cu.name AS service FROM \" . DB_PREFIX . \"customer c LEFT JOIN \". DB_PREFIX . \"user cu ON (c.service_id = cu.user_id) \";\r\n\r\n\t\t$implode = array();\r\n\t\t\r\n\t\tif (!empty($data['filter_name'])) {\r\n\t\t\t//$implode[] = \"LCASE(CONCAT(c.lastname, c.firstname)) LIKE '\" . $this->db->escape(utf8_strtolower($data['filter_name'])) . \"%'\";\r\n\t\t\t$implode[] = \"LCASE(c.name) LIKE '%\" . $this->db->escape(utf8_strtolower($data['filter_name'])) . \"%'\";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($data['filter_room_id'])) {\r\n\t\t\t$implode[] = \"c.customer_id IN (SELECT customer_id FROM \" . DB_PREFIX . \"customer WHERE customer_room_id = '\" . $this->db->escape($data['filter_room_id']) . \"')\";\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tif (isset($data['filter_newsletter']) && !is_null($data['filter_newsletter'])) {\r\n\t\t\t$implode[] = \"c.newsletter = '\" . (int)$data['filter_newsletter'] . \"'\";\r\n\t\t}\t\r\n\t\t\t\t\r\n\t\tif (!empty($data['filter_customer_group_id'])) {\r\n\t\t\t$implode[] = \"cg.customer_group_id = '\" . (int)$data['filter_customer_group_id'] . \"'\";\r\n\t\t}\t\r\n\t\t\t\r\n\t\tif (!empty($data['filter_ip'])) {\r\n\t\t\t$implode[] = \"c.customer_id IN (SELECT customer_id FROM \" . DB_PREFIX . \"customer_ip WHERE ip = '\" . $this->db->escape($data['filter_ip']) . \"')\";\r\n\t\t}\r\n\t\t*/\t\t\r\n\t\t\t\t\r\n\t\tif (isset($data['filter_status']) && !is_null($data['filter_status'])) {\r\n\t\t\t$implode[] = \"c.status = '\" . (int)$data['filter_status'] . \"'\";\r\n\t\t}\t\r\n\t\t\r\n\t\tif (isset($data['filter_showathome']) && !is_null($data['filter_showathome'])) {\r\n\t\t\t$implode[] = \"c.showathome = '\" . (int)$data['filter_showathome'] . \"'\";\r\n\t\t}\t\r\n\t\t\t\t\r\n\t\tif (!empty($data['filter_date_added'])) {\r\n\t\t\t$implode[] = \"DATE(c.date_added) = DATE('\" . $this->db->escape($data['filter_date_added']) . \"')\";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($data['filter_date_leave'])) {\r\n\t\t\t$implode[] = \"DATE(c.date_leave) = DATE('\" . $this->db->escape($data['filter_date_leave']) . \"')\";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($data['filter_service_id'])) {\r\n\t\t\t$implode[] = \"cu.user_id = '\" . (int)$data['filter_service_id'] . \"'\";\r\n\t\t}\t\r\n\t\t\r\n\t\tif ($implode) {\r\n\t\t\t$sql .= \" WHERE \" . implode(\" AND \", $implode);\r\n\t\t}\r\n\t\t\r\n\t\t$sort_data = array(\r\n\t\t\t'name',\r\n\t\t\t'room',\r\n\t\t\t'customer_room_id',\r\n\t\t\t//'customer_group',\r\n\t\t\t'c.status',\r\n\t\t\t'c.showathome',\r\n\t\t\t//'c.ip',\r\n\t\t\t'c.date_added',\r\n\t\t\t'c.date_leave',\r\n\t\t\t'service',\r\n\t\t);\t\r\n\t\t\t\r\n\t\tif (isset($data['sort']) && in_array($data['sort'], $sort_data)) {\r\n\t\t\t$sql .= \" ORDER BY \" . $data['sort'];\t\r\n\t\t} else {\r\n\t\t\t$sql .= \" ORDER BY status DESC, name \";\t\r\n\t\t}\r\n\t\t\t\r\n\t\tif (isset($data['order']) && ($data['order'] == 'DESC')) {\r\n\t\t\t$sql .= \" DESC\";\r\n\t\t} else {\r\n\t\t\t$sql .= \" ASC\";\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($data['start']) || isset($data['limit'])) {\r\n\t\t\tif ($data['start'] < 0) {\r\n\t\t\t\t$data['start'] = 0;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\tif ($data['limit'] < 1) {\r\n\t\t\t\t$data['limit'] = 20;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t$sql .= \" LIMIT \" . (int)$data['start'] . \",\" . (int)$data['limit'];\r\n\t\t}\t\t\r\n\t\t\r\n\t\t$query = $this->db->query($sql);\r\n\t\t\r\n\t\treturn $query->rows;\t\r\n\t}", "function getCustomerPartial() {\n \t$data = array();\n \t\n \t$sql = \"SELECT \n \t\t\t\tid, \n \t\t\t\tname, \n \t\t\t\tcellphone, \n \t\t\t\tgender, \n \t\t\t\tpersonality, \n \t\t\t\tbirthday, \n \t\t\t\tcreate_time, \n \t\t\t\tis_paying \n \t\t\tFROM \n \t\t\t\tcustomer \";\n \t\n \t$result = $this->db->queryAll($sql);\n \tif( !$result ) \n \t\treturn FALSE;\n\n \tforeach($result as $customer) {\n \t\t$partial = array();\n \t\t$partial = $customer;\n \t\t\n \t\t//check this month birthdy.\n \t\t$partial[\"is_birthday\"] = $this->is_current_month($customer[\"birthday\"]);\n \t\t\n \t\t//check \n \t\t$partial[\"is_new\"] = $this->is_current_month($customer[\"create_time\"]);\n \t\t\n \t\t//visit_history\n \t\t$last_visit = $this->getLastVisit($customer[\"id\"]);\n \t\tif($last_visit)\n \t\t\t$partial[\"last_visit_time\"] = $last_visit[\"time\"];\n \t\t\n \t\t//evaluation\n \t\t$evaluations = $this->getEvaluation($customer[\"id\"]);\n \t\tif($evaluations) {\n \t\t\t$weight = doubleval($evaluations[\"weight\"]);\n \t\t\t$count_list = array_slice($evaluations, 0, count($evaluations)-1);\n \t\t\t$sum = array_sum($count_list) * $weight;\n \t\t\t$partial[\"evaluation_score\"] = $sum;\n \t\t}\n \t\t\t\n \t\t//tag\n \t\t$tags = $this->getTags($customer[\"id\"]);\n \t\tif($tags)\n \t\t\t$partial[\"tags\"] = $tags;\n \t\t\n \t\tarray_push($data, $partial);\n \t}\n \t\n \tif( count($data) == 0 )\n \t\treturn FALSE;\n \t\n \treturn $data;\n }", "public function getCustomerData($id){\n $query = \"SELECT * FROM tbl_customer WHERE id = '$id' \";\n $result = $this->db->select($query); \n return $result;\n }", "private function customerDropDown($ddName, $defaultCustomerId, $addBlank = false) {\n $dbConnection = dbconn::getConnectionBuild()->getConnection();\n\n $ddHTML = '<select id=\"' . $ddName . '\" name=\"' . $ddName . '\" size=\"1\" >';\n $selected = \"\";\n\n $sqlStmt = \"SELECT id, first_name, last_name FROM customer ORDER BY last_name; \";\n\n $stmtObj = $dbConnection->prepare($sqlStmt);\n $stmtObj->execute();\n $stmtObj->bind_result($customer_id, $first_name, $last_name);\n $rowCount = 1;\n\n if ($addBlank) {\n $ddHTML .= '<option value=\"\" selected=\"selected\">(None)</option>';\n $defaultCustomerId = -1;\n }\n\n while ($stmtObj->fetch()) {\n if (empty($defaultCustomerId)) {\n // No default is selected so put the selected attribute in the first row.\n if ($rowCount == 1) {\n $selected = 'selected=\"selected\"';\n } else {\n $selected = \"\";\n }\n } else {\n // A default value was passed in so put the selected attribute in the appropriate row.\n if ($customer_id == $defaultCustomerId) {\n $selected = 'selected=\"selected\"';\n } else {\n $selected = \"\";\n }\n }\n $rowCount++;\n $ddHTML .= '<option value=\"' . $customer_id . '\" ' . $selected . '>' . $last_name . ', ' . $first_name . '</option>';\n }\n\n\n $ddHTML .= '</select>';\n return $ddHTML;\n }", "function getCustomerNoTCPA($account_id,$DbConnection)\n {\n $default_customer_no=\"\";\n\t$query_default_chillplant = \"SELECT customer_no FROM transporter_chilling_plant_assignment USE INDEX(tcpass_accid_status) WHERE account_id='$account_id' AND status=1\";\n\t//echo $query_default_chillplant.\"<br>\";\n\t$result_default_chillquery = mysql_query($query_default_chillplant,$DbConnection);\n\t$numrows_default_chillquery = mysql_num_rows($result_default_chillquery);\t\n\tif($numrows_default_chillquery!=0)\n\t{\n\t\t$row=mysql_fetch_object($result_default_chillquery);\n\t\t$default_customer_no = $row->customer_no;\n\t\t//echo \"RM=\".$default_customer_no;\n\t}\n\telse{\n\t\t$default_customer_no =\"\";\n\t}\n\treturn $default_customer_no;\n }", "function searchCompanyCustomer($keyword='',$company='1',$type ='name',$sort = 'ASC',$orderby = 'id')\n {\n //profiling::\n $this->debug_methods_trail[] = __function__;\n\t\t$current_partner_branch = $this->session->userdata['partner_branch'];\n\t\t\n\t\t\n\t\t$additional_sql = '';\n\t\t//declare\n\t\tif($type == 'name'){\n\t\t\t\n\t\t\t\t$conditional_sql = \" AND a_customer.firstname LIKE '%{$keyword}%' OR a_customer.lastname LIKE '%{$keyword}%'\" ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$additional_sql .= \" ,CONCAT(IFNULL(a_customer.firstname,''),' ',IFNULL(a_customer.lastname,''),' (',IFNULL(p.number,''),')') AS name\";\n\t\t\t\t$tbl = \"a_customer\";\n\t\t\t\t\n\t\t}\n\t\telse{\n\t $conditional_sql = \" AND p.number LIKE '%{$keyword}%'\" ;\n\t\t}\n\t\t\n\t\tif($company != '')\n\t\t{\n\t\t\t $conditional_sql = \" AND cc.company = '\".$company.\"'\" ;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\n\t\n\t //check if any specifi ordering was passed\n if (! $this->db->field_exists($orderby, 'a_customer')) {\n $orderby = 'firstname';\n }\n //check if sorting type was passed\n $sort = ($sort == 'asc' || $sort == 'desc') ? $sort : 'ASC';\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start');\n\t\t\n\t\t\n\t\t\n //_____SQL QUERY_______\n $query = $this->db->query(\"SELECT a_customer.id $additional_sql,p.number,e.email\n FROM a_company_customer as cc,a_customer\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_phone as p ON p.customer = a_customer.id AND p.main ='1' AND p.status='1'\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_email as e ON e.customer = a_customer.id AND e.main ='1' AND e.status='1'\n\t\t\t\t\t\t\t\t\t\t WHERE 1=1 \n\t\t\t\t\t\t\t\t\t\t AND a_customer.id = cc.customer AND cc.status='1'\n\t\t\t\t\t\t\t\t\t\t $conditional_sql \n ORDER BY $orderby $sort\");\n\t\t\t\t\t\t\t\t\t\t \n\t\t\n\t\t/*echo \"SELECT a_customer.id, $additional_sql ,p.number,e.email\n FROM a_company_customer as cc,a_customer\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_phone as p ON p.customer = a_customer.id AND p.main ='1' AND p.status='1'\n\t\t\t\t\t\t\t\t\t\t LEFT JOIN a_email as e ON e.customer = a_customer.id AND e.main ='1' AND e.status='1'\n\t\t\t\t\t\t\t\t\t\t WHERE 1=1 $conditional_sql\n\t\t\t\t\t\t\t\t\t\t AND cc.company = $company AND a_customer.id = cc.customer AND cc.status='1'\n ORDER BY $orderby $sort\";\t*/\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t \t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t \n $results = $query->result_array(); //multi row array\n //benchmark/debug\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n //return results\n return $results;\n }", "public function get_customer_byid($customer_id = \"\"){\r\n $query = $this->db->get_where('view_customer_info', array('customer_id' => $customer_id));\r\n return $query->row_array();\r\n }", "function trgetcustomerid($productid)\n\t{\n\t\t$customerid=\"SELECT customer_id from mapping_table where product_id = '\".$productid.\"'\";\n\t\t$customeriddata = $this->get_results($customerid);\n\t\treturn $customeriddata;\n\t}", "public function get_customer_data($last_id){\n\t\t$customer_result = $this->usermaster_model->get_customer_details($last_id);\n\t\tif(!empty($customer_result)){\n\t\t\treturn $customer_result;\n\t\t}\n\t}", "public function GetCustomer($customer_id) {\n\n //set up the query\n $this->sql = \"SELECT *\n FROM customers\n WHERE customerID = :customer_id\";\n \n //execute the query\n $this->RunAdvancedQuery([\n ':customer_id' => $customer_id,\n ]);\n }", "public function displayCustomer()\n {\n $customerList = array();\n\n try {\n $stmt = $this->db->prepare(\"SELECT * \n FROM Customer\");\n $stmt->execute();\n\n $row[] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ($stmt->rowCount() > 0) {\n foreach ($row as $customer) {\n array_push($customerList, $customer);\n\n }\n return $customerList;\n\n }\n\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function addCustomerData()\n {\n $customer = Mage::getModel('customer/customer');\n // alias => attribute_code\n $attributes = array(\n 'customer_lastname' => 'lastname',\n 'customer_middlename' => 'middlename',\n 'customer_firstname' => 'firstname',\n 'customer_email' => 'email'\n );\n\n foreach ($attributes as $alias => $attributeCode) {\n $attribute = $customer->getAttribute($attributeCode);\n /* @var $attribute Mage_Eav_Model_Entity_Attribute_Abstract */\n\n if ($attribute->getBackendType() == 'static') {\n $tableAlias = 'customer_' . $attribute->getAttributeCode();\n\n $this->getSelect()->joinLeft(\n array($tableAlias => $attribute->getBackend()->getTable()),\n sprintf('%s.entity_id=main_table.customer_id', $tableAlias),\n array($alias => $attribute->getAttributeCode())\n );\n\n $this->_fields[$alias] = sprintf('%s.%s', $tableAlias, $attribute->getAttributeCode());\n }\n else {\n $tableAlias = 'customer_' . $attribute->getAttributeCode();\n\n $joinConds = array(\n sprintf('%s.entity_id=main_table.customer_id', $tableAlias),\n $this->getConnection()->quoteInto($tableAlias . '.attribute_id=?', $attribute->getAttributeId())\n );\n\n $this->getSelect()->joinLeft(\n array($tableAlias => $attribute->getBackend()->getTable()),\n join(' AND ', $joinConds),\n array($alias => 'value')\n );\n\n $this->_fields[$alias] = sprintf('%s.value', $tableAlias);\n }\n }\n\n $this->setFlag('has_customer_data', true);\n return $this;\n }", "public function getCustomer()\n {\n if (null === $customer && isset($this['CUSTOMER_ID']))\n {\n $this->customer = \\Fastbill\\Customer\\Finder::findOneById($this['CUSTOMER_ID']);\n }\n return $this->customer;\n }", "protected function _customerFromArray($arr)\n\t{\n\t\t$Customer = new QuickBooks_Object_Customer();\n\t\t\n\t\t\t// Array Key => array( Method, QuickBooks Field for Cast ), \n\t\t$map = array(\n\t\t\t'Name' => \t\t\tarray( 'setName', 'Name' ), \n\t\t\t'FirstName' => \t\tarray( 'setFirstName', 'FirstName' ),\n\t\t\t'MiddleName' => \tarray( 'setMiddleName', 'MiddleName' ),\n\t\t\t'LastName' => \t\tarray( 'setLastName', 'LastName' ), \n\t\t\t'CompanyName' => \tarray( 'setCompanyName', 'CompanyName' ), \n\t\t\t'Phone' => \t\t\tarray( 'setPhone', 'Phone' ), \n\t\t\t'AltPhone' => \t\tarray( 'setAltPhone', 'AltPhone' ), \n\t\t\t'Email' => \t\t\tarray( 'setEmail', 'Email' ), \n\t\t\t'Contact' => \t\tarray( 'setContact', 'Contact' ), \n\t\t\t);\n\t\t\n\t\t$this->_applyBaseMap($arr, $map, $Customer, QUICKBOOKS_OBJECT_CUSTOMER);\n\n\t\t$map2 = array( \n\t\t\t'ShipAddress_' => 'setShipAddress', \n\t\t\t'BillAddress_' => 'setBillAddress', \n\t\t\t);\n\t\t\n\t\t$this->_applyAddressMap($arr, $map2, $Customer, QUICKBOOKS_OBJECT_CUSTOMER);\n\t\t\n\t\treturn $Customer;\n\t}", "function get_customer_data($customer_id)\n {\n $this->company_db->select(\"c.*\");\n $this->company_db->from('tbl_customer c');\n $this->company_db->where('c.id', $customer_id); \n $query = $this->company_db->get();\n //echo $this->company_db->last_query();die;\n if($query->num_rows() >= 1)\n {\n return $query->row_array();\n }\n else\n {\n return array();\n }\n }", "public function actionCustomerSearch()\t\r\n {// for autocomplete will do DB search for Customers and Lands\r\n\t\t\r\n\t\tif (isset($_GET['term'])) { // first search that \r\n // if user arabic name \r\n // or english name \r\n // or miobile number match\r\n \r\n \r\n $keyword = $_GET[\"term\"];\r\n\r\n $searchCriteria=new CDbCriteria;\r\n // the new library \r\n if (isset($_GET['term'])) \r\n if ($keyword != '') {\r\n $keyword = @$keyword;\r\n $keyword = str_replace('\\\"', '\"', $keyword);\r\n\r\n $obj = new ArQuery();\r\n $obj->setStrFields('CustomerNameArabic');\r\n $obj->setMode(1);\r\n\r\n $strCondition = $obj->getWhereCondition($keyword);\r\n } \r\n\r\n\r\n//\t\t\t$qtxt = 'SELECT CustomerID, Nationality, CustomerNameArabic from CustomerMaster WHERE ('.$strCondition.' OR CustomerNameEnglish LIKE :name OR MobilePhone Like :name) limit 25';\r\n//\t\t\t$command = Yii::app()->db->createCommand($qtxt);\r\n//\t\t\t$command->bindValue(':name','%'.$_GET['term'].'%',PDO::PARAM_STR);\r\n//\t\t\t$res = $command->queryAll();\r\n// if( count($res)<1){//run if no customer found \r\n //search DB if Land ID matches\r\n\r\n $qtxt = 'SELECT LandID lnd from LandMaster WHERE LandID Like :name';\r\n $command = Yii::app()->db->createCommand($qtxt);\r\n $command->bindValue(':name','%'.$_GET['term'].'%',PDO::PARAM_STR);\r\n $res = $command->queryColumn();\r\n\r\n// }\r\n\t\t}\r\n\t\tprint CJSON::encode($res);\r\n \r\n // die ($strCondition);\r\n\t}", "function select() {\n return \"\n contact_a.id AS contact_id,\n contact_a.contact_sub_type AS contact_sub_type,\n contact_a.sort_name AS sort_name,\n source,\n created_date,\n modified_date\n \";\n }", "public function getCustomerId();", "public function getCustomerId();", "public function getCustomerId();", "public static function getCompanyByCustomerId()\n\t{\n\t\t$userId = Auth::getUser()->ID;\n\t\t$companyName = self::select('company')->where('ID', $userId)->first()->company;\n\t\treturn $companyName;\n\t}", "function gotprodtforcusts1($mobilenum)\n\t{\n\t\t$customerid=\"SELECT customer_id from customer_contact where mobile = '\".$mobilenum.\"'\";\n\t\t$customeriddata = $this->get_results($customerid);\n\t\t$custid = $customeriddata[0][\"customer_id\"];\n\n\t\t$productlist=\"SELECT * from mapping_table where customer_id = '\".$custid.\"'\";\n\t\t$productlistdata = $this->get_results($productlist);\n\t\treturn $productlistdata;\n\t}", "public function getCustomers() {\n $customerList = array();\n $i = 0;\n $sql = \"SELECT email, passwd, customer_name, address, city, state, country, zip, phone From signup_app.customers\";\n $customers = $this->db->query($sql);\n //$customer = $customers->fetch();\n if ($customers->num_rows > 0) {\n while ($customer = $customers->fetch_assoc()) {\n $customerList[$i++] = new Customer(\n $customer['email'], $customer['passwd'], $customer['customer_name'], $customer['address']\n , $customer['city'], $customer['state'], $customer['country'], $customer['zip'], $customer['phone']\n );\n }\n return $customerList;\n }\n }", "public function getOrCreateCustomer();", "public function selectByFilter($customerVo, $orderBy=array(), $startRecord=0, $recordSize=0){\ntry {\nif (empty($customerVo)) $customerVo = new CustomerVo();\n$sql = \"select * from `customer` \";\n$condition = '';\n$params = array();\n$isFirst = true;\nif (!is_null($customerVo->customerId)){ //If isset Vo->element\n$fieldValue=$customerVo->customerId;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `customer_id` $key :customerIdKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `customer_id` $key :customerIdKey\";\n}\nif($type == 'str') {\n $params[] = array(':customerIdKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':customerIdKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `customer_id` = :customerIdKey';\n$isFirst=false;\n}else{\n$condition.=' and `customer_id` = :customerIdKey';\n}\n$params[]=array(':customerIdKey', $fieldValue, PDO::PARAM_INT);\n}}\n\nif (!is_null($customerVo->roleId)){ //If isset Vo->element\n$fieldValue=$customerVo->roleId;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `role_id` $key :roleIdKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `role_id` $key :roleIdKey\";\n}\nif($type == 'str') {\n $params[] = array(':roleIdKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':roleIdKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `role_id` = :roleIdKey';\n$isFirst=false;\n}else{\n$condition.=' and `role_id` = :roleIdKey';\n}\n$params[]=array(':roleIdKey', $fieldValue, PDO::PARAM_INT);\n}}\n\nif (!is_null($customerVo->username)){ //If isset Vo->element\n$fieldValue=$customerVo->username;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `username` $key :usernameKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `username` $key :usernameKey\";\n}\nif($type == 'str') {\n $params[] = array(':usernameKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':usernameKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `username` = :usernameKey';\n$isFirst=false;\n}else{\n$condition.=' and `username` = :usernameKey';\n}\n$params[]=array(':usernameKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->password)){ //If isset Vo->element\n$fieldValue=$customerVo->password;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `password` $key :passwordKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `password` $key :passwordKey\";\n}\nif($type == 'str') {\n $params[] = array(':passwordKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':passwordKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `password` = :passwordKey';\n$isFirst=false;\n}else{\n$condition.=' and `password` = :passwordKey';\n}\n$params[]=array(':passwordKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->email)){ //If isset Vo->element\n$fieldValue=$customerVo->email;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `email` $key :emailKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `email` $key :emailKey\";\n}\nif($type == 'str') {\n $params[] = array(':emailKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':emailKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `email` = :emailKey';\n$isFirst=false;\n}else{\n$condition.=' and `email` = :emailKey';\n}\n$params[]=array(':emailKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->languageCode)){ //If isset Vo->element\n$fieldValue=$customerVo->languageCode;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `language_code` $key :languageCodeKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `language_code` $key :languageCodeKey\";\n}\nif($type == 'str') {\n $params[] = array(':languageCodeKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':languageCodeKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `language_code` = :languageCodeKey';\n$isFirst=false;\n}else{\n$condition.=' and `language_code` = :languageCodeKey';\n}\n$params[]=array(':languageCodeKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->crtDate)){ //If isset Vo->element\n$fieldValue=$customerVo->crtDate;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `crt_date` $key :crtDateKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `crt_date` $key :crtDateKey\";\n}\nif($type == 'str') {\n $params[] = array(':crtDateKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':crtDateKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `crt_date` = :crtDateKey';\n$isFirst=false;\n}else{\n$condition.=' and `crt_date` = :crtDateKey';\n}\n$params[]=array(':crtDateKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->crtBy)){ //If isset Vo->element\n$fieldValue=$customerVo->crtBy;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `crt_by` $key :crtByKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `crt_by` $key :crtByKey\";\n}\nif($type == 'str') {\n $params[] = array(':crtByKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':crtByKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `crt_by` = :crtByKey';\n$isFirst=false;\n}else{\n$condition.=' and `crt_by` = :crtByKey';\n}\n$params[]=array(':crtByKey', $fieldValue, PDO::PARAM_INT);\n}}\n\nif (!is_null($customerVo->modDate)){ //If isset Vo->element\n$fieldValue=$customerVo->modDate;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `mod_date` $key :modDateKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `mod_date` $key :modDateKey\";\n}\nif($type == 'str') {\n $params[] = array(':modDateKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':modDateKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `mod_date` = :modDateKey';\n$isFirst=false;\n}else{\n$condition.=' and `mod_date` = :modDateKey';\n}\n$params[]=array(':modDateKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->modBy)){ //If isset Vo->element\n$fieldValue=$customerVo->modBy;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `mod_by` $key :modByKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `mod_by` $key :modByKey\";\n}\nif($type == 'str') {\n $params[] = array(':modByKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':modByKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `mod_by` = :modByKey';\n$isFirst=false;\n}else{\n$condition.=' and `mod_by` = :modByKey';\n}\n$params[]=array(':modByKey', $fieldValue, PDO::PARAM_INT);\n}}\n\nif (!is_null($customerVo->status)){ //If isset Vo->element\n$fieldValue=$customerVo->status;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `status` $key :statusKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `status` $key :statusKey\";\n}\nif($type == 'str') {\n $params[] = array(':statusKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':statusKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `status` = :statusKey';\n$isFirst=false;\n}else{\n$condition.=' and `status` = :statusKey';\n}\n$params[]=array(':statusKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->activeCode)){ //If isset Vo->element\n$fieldValue=$customerVo->activeCode;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `active_code` $key :activeCodeKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `active_code` $key :activeCodeKey\";\n}\nif($type == 'str') {\n $params[] = array(':activeCodeKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':activeCodeKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `active_code` = :activeCodeKey';\n$isFirst=false;\n}else{\n$condition.=' and `active_code` = :activeCodeKey';\n}\n$params[]=array(':activeCodeKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->resetPasswordCode)){ //If isset Vo->element\n$fieldValue=$customerVo->resetPasswordCode;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `reset_password_code` $key :resetPasswordCodeKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `reset_password_code` $key :resetPasswordCodeKey\";\n}\nif($type == 'str') {\n $params[] = array(':resetPasswordCodeKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':resetPasswordCodeKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `reset_password_code` = :resetPasswordCodeKey';\n$isFirst=false;\n}else{\n$condition.=' and `reset_password_code` = :resetPasswordCodeKey';\n}\n$params[]=array(':resetPasswordCodeKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->oauthProvider)){ //If isset Vo->element\n$fieldValue=$customerVo->oauthProvider;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `oauth_provider` $key :oauthProviderKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `oauth_provider` $key :oauthProviderKey\";\n}\nif($type == 'str') {\n $params[] = array(':oauthProviderKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':oauthProviderKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `oauth_provider` = :oauthProviderKey';\n$isFirst=false;\n}else{\n$condition.=' and `oauth_provider` = :oauthProviderKey';\n}\n$params[]=array(':oauthProviderKey', $fieldValue, PDO::PARAM_STR);\n}}\n\nif (!is_null($customerVo->oauthId)){ //If isset Vo->element\n$fieldValue=$customerVo->oauthId;\nif(is_array($fieldValue)){ //if is array\n$key = $fieldValue[0];\n$value = $fieldValue[1];\n$type = (isset($fieldValue[2])) ? $fieldValue[2] : 'str';\nif ($isFirst) {\n $condition .= \" `oauth_id` $key :oauthIdKey\";\n $isFirst = false;\n} else {\n $condition .= \" and `oauth_id` $key :oauthIdKey\";\n}\nif($type == 'str') {\n $params[] = array(':oauthIdKey', $value, PDO::PARAM_STR);\n}\nelse{\n $params[] = array(':oauthIdKey', $value, PDO::PARAM_INT);\n}}\nelse{ //is not array\nif ($isFirst){\n$condition.=' `oauth_id` = :oauthIdKey';\n$isFirst=false;\n}else{\n$condition.=' and `oauth_id` = :oauthIdKey';\n}\n$params[]=array(':oauthIdKey', $fieldValue, PDO::PARAM_INT);\n}}\n\nif (!empty($condition)){\n$sql.=' where '. $condition;\n}\n\n//order by <field> asc/desc\nif(count($orderBy) != 0){\n $orderBySql = 'ORDER BY ';\n foreach ($orderBy as $k => $v){\n $orderBySql .= \"`$k` $v, \";\n }\n $orderBySql = substr($orderBySql, 0 , strlen($orderBySql)-2);\n $sql.= \" \".trim($orderBySql).\" \";\n}\nif($recordSize != 0) {\n$sql = $sql.' limit '.$startRecord.','.$recordSize;\n}\n\n//debug\nLogUtil::sql('(selectByFilter) '. DataBaseHelper::renderQuery($sql, $params));\n\n$stmt = $this->conn->prepare($sql);\nforeach ($params as $param){\n$stmt->bindParam($param[0], $param[1], $param[2]);\n}\nif ($stmt->execute()) {\n$row= $stmt->fetchAll(PDO::FETCH_NAMED);\nreturn PersistentHelper::mapResult('CustomerVo', $row);\n}\n} catch (PDOException $e) {\nthrow $e;\n}\nreturn null;\n}", "public function customersList($filters=array(), $show='all'){\n\t\t\n\t\t\t# Modifier specifics ($show)\n\t\t\tif( $show == 'customers' ) $statusFilter = 'AND NOT ISNULL(`since`)';\n\t\t\telseif( $show == 'potential' ) $statusFilter = 'AND ISNULL(`since`)';\n\t\t\telse $statusFilter = '';\n\t\t\t# Handle possible name conflicts and composed fields\n\t\t\t$this->fixFilters($filters, array(\n\t\t\t\t'address' => '`c`.`address`',\n\t\t\t\t'phone' => '`c`.`phone`',\n\t\t\t\t'sellerName' => \"CONCAT(`u`.`name`,' ',`u`.`lastName`)\"\n\t\t\t));\n\t\t\t$sql = \"SELECT\t`c`.*,\n\t\t\t\t\t\t\t`u`.`name`\t\tAS 'seller_name',\n\t\t\t\t\t\t\t`u`.`lastName`\tAS 'seller_lastName',\n\t\t\t\t\t\t\tCONCAT(`u`.`name`,' ',`u`.`lastName`) AS 'sellerName',\n\t\t\t\t\t\t\t`lc`.*\n\t\t\t\t\tFROM `customers` `c`\n\t\t\t\t\tLEFT JOIN `_users` `u` ON (`u`.`user` = `c`.`seller`)\n\t\t\t\t\tLEFT JOIN `_locations` `lc` USING (`id_location`)\n\t\t\t\t\tWHERE {$this->array2filter($filters)}\n\t\t\t\t\t{$statusFilter}\n\t\t\t\t\tORDER BY `c`.`customer`\";\n\t\t\treturn $this->asList($sql, 'id_customer');\n\t\t}", "public function findCustomer()\n {\n try {\n return $this->gateway->findCustomer($this->user->paymentProfile)->send()->getData();\n } catch (NotFound $exception) {\n return $this->gateway->findCustomer($this->user->refreshPaymentProfile($this->name))->send()->getData();\n }\n }", "public function actionFindCustomer($q)\r\n {\r\n $out = [];\r\n if ($q) {\r\n $customers = Customer::find()\r\n ->filterWhere(['like', 'firstname', $q])\r\n ->all();\r\n $out = [];\r\n foreach ($customers as $d) {\r\n $out[] = [\r\n 'id' => $d->id,\r\n 'value' => $d->fullname,\r\n 'name' => $d->id . ' - ' . $d->fullname\r\n ];\r\n }\r\n }\r\n echo Json::encode($out);\r\n }", "function createCustomerObject($post){\n\t$country = 'Canada';\n\t$customer = new Customer();\n\t$customer->setFirstName($post['firstName']);\n\t$customer->setLastName($post['lastName']);\n\t$customer->setBusinessPhone($post['businessPhone']);\n\t$customer->setHomePhone($post['homePhone']);\n\t$customer->setAddress($post['address2'] . ' - ' . $post['address1']);\n\t$customer->setCity($post['city']);\n\t$customer->setProvince($post['province']);\n\t$customer->setPostal($post['zip']);\n\t$customer->setCountry($country);\n\t$customer->setEmail($post['email']);\n\treturn $customer;\n}", "public function getCustomerByIdCustomer($id){\n $dbResult = $this->db->query(\"SELECT * FROM customer WHERE id_customer = ?\", array($id));\n return $dbResult->getResult();\n }", "function select_dropdown_options($name)\n{\n $conn = db_connect();\n\n // Generate the salespeople from the database as select options if that is the name passed in to the element\n if ($name == \"salesperson\") {\n\n // Prepared statement for selecting salesperson dropdown options\n $salesperson_dropdown_select_stmt = pg_prepare(\n $conn,\n \"salesperson_dropdown_select_stmt\",\n \"SELECT id, first_name, last_name FROM salespeople;\"\n );\n\n $result = pg_execute($conn, \"salesperson_dropdown_select_stmt\", array());\n\n // Generate the clients from the database as select options if salesperson is logged in \n // by filtering only their clients\n } else if ($name == \"client\" && $_SESSION['type'] == \"a\") {\n\n // Prepared statement for selecting client dropdown options\n $salesperson_id = $_SESSION['id'];\n $clients_dropdown_select_stmt = pg_prepare(\n $conn,\n \"clients_dropdown_select_stmt\",\n \"SELECT id, first_name, last_name FROM clients WHERE salesperson_id = $salesperson_id;\"\n );\n\n $result = pg_execute($conn, \"clients_dropdown_select_stmt\", array());\n }\n\n // Return the data required to populate dropdown menu options\n return $result;\n}", "public function getCustomerName(){\n return $this->_getData(self::CUSTOMER_NAME);\n }" ]
[ "0.7091138", "0.69389004", "0.65620023", "0.6560951", "0.64903986", "0.64528775", "0.6303862", "0.6205176", "0.6177693", "0.61266565", "0.6123761", "0.6104601", "0.6065274", "0.60475606", "0.5986724", "0.59746593", "0.5954534", "0.5950166", "0.5939307", "0.5934336", "0.59001195", "0.58636534", "0.5850984", "0.58454055", "0.5845359", "0.5816188", "0.57938486", "0.57713026", "0.57707524", "0.5768571", "0.5755378", "0.5753051", "0.5743913", "0.57283384", "0.5721866", "0.5721792", "0.5703785", "0.56839705", "0.5666345", "0.56658304", "0.56605566", "0.5649017", "0.5639309", "0.5629272", "0.56291634", "0.56117946", "0.56114113", "0.55898094", "0.55761784", "0.55715185", "0.55635357", "0.5549639", "0.55273294", "0.5525814", "0.5517689", "0.55138767", "0.550709", "0.5505432", "0.55006534", "0.5490173", "0.54659176", "0.5461259", "0.54594153", "0.54583114", "0.5456142", "0.54500026", "0.54493153", "0.5444161", "0.5443234", "0.5426054", "0.5422829", "0.54185516", "0.5417151", "0.5416383", "0.5403995", "0.5403684", "0.5402106", "0.53957295", "0.53864914", "0.5378692", "0.5377104", "0.53724015", "0.53570855", "0.53502136", "0.5345502", "0.53392947", "0.53264594", "0.53264594", "0.53264594", "0.53229624", "0.53229225", "0.53223157", "0.53215045", "0.5321", "0.5316622", "0.53129375", "0.5312172", "0.5310104", "0.5308817", "0.5304626", "0.5297827" ]
0.0
-1
writing or uploading data to the database this is done for accessing connection from the server.php file
public function writeData() // writing or uploading data to the database { $connection=new server();//accessing connection from the server.php file $connection=$connection->serverConnnection();//accessing connection from the server.php file if($this->customer_Id=='') { $sql="CALL insert_Customer(:first_Name,:last_Name,:City,:Province,:postal_Code,:user_Name,:user_Password)"; // depositing data into the database $PDOStatement=$connection->prepare($sql); // preparing connection to the sql $PDOStatement->bindParam(":first_Name",$this->first_Name); $PDOStatement->bindParam(":last_Name",$this->last_Name); $PDOStatement->bindParam(":City",$this->City); $PDOStatement->bindParam(":Province",$this->Province); $PDOStatement->bindParam(":postal_Code",$this->postal_Code); $PDOStatement->bindParam(":user_Name",$this->user_Name); $PDOStatement->bindParam(":user_Password",$this->user_Password); $PDOStatement->execute(); } else { $sql="CALL update_Customer(:City,:Province,:postal_Code,:user_Password,:user_Name,:customer_Id)"; // depositing the data into the database $PDOStatement=$connection->prepare($sql);// preparing the connections $PDOStatement->bindParam(":City",$this->City);// binding the parameters to the connection $PDOStatement->bindParam(":Province",$this->Province);// binding the parameters to the connection $PDOStatement->bindParam(":postal_Code",$this->postal_Code);// binding the parameters to the connection $PDOStatement->bindParam(":user_Password",$this->user_Password);// binding the parameters to the connection $PDOStatement->bindParam(":user_Name",$this->user_Name);// binding the parameters to the connection $PDOStatement->bindParam(":customer_Id",$this->customer_Id);// binding the parameters to the connection $PDOStatement->execute();// executing the data } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function put(){\r\n\t\t//Connect\r\n\t\t$sql = new DataBase;\r\n\t\t$sql->connect();\r\n\t}", "function post(){\r\n\t\t//Connect\r\n\t\t$sql = new DataBase;\r\n\t\t$sql->connect();\r\n\t}", "function write_to_db(){\n global $jewelry_name,$quality,$price,$discounts,$user_id,$location_id,$table,$conn_obj;\n $sql_statement = $conn_obj->stmt_init();\n if($sql_statement = $conn_obj->prepare(\"INSERT INTO $table (jewlery_type,quality,price_paid,discount,user_id,location_id) VALUES (?,?,?,?,?,?)\")){\n $sql_statement->bind_param('ssiiii',$jewelry_name,$quality,$price, $discounts,$user_id,$location_id);\n $sql_statement->execute();\n $sql_statement->close();\n }else{\n echo \"Error on connection point 2 ERROR: \".$sql_statement->error;\n }\n }", "private function __connect() {\n $this->handle = mysql_connect($this->server, $this->user, $this->password) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n mysql_select_db($this->dataBase, $this->handle) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n @mysql_query(\"SET NAMES 'utf8'\");\n }", "static public function save ($data)\r\n {\r\n $con = mysqli_connect(self::$_dbHost, self::$_dbUserName, self::$_dbUserPwd, self::$_dbName);\r\n \r\n // connect to database\r\n if (!$con) {\r\n die('Could not connect: ' . mysql_error());\r\n }\r\n\t\telse{\r\n\t\t\techo \"konek anjing\";\r\n\t\t}\r\n \r\n // mysqli_select_db(self::$_dbName, $con);\r\n \r\n // delete old data\r\n mysqli_query($con, \"DELETE FROM points\");\r\n \r\n // insert data\r\n mysqli_query($con, \"INSERT INTO points (data) VALUES ($data)\");\r\n \r\n // close connection\r\n mysqli_close($con);\r\n }", "public function connToDB(){\n $this->conn=new mysqli(\"localhost\",\"root\",\"SQLroot\",\"Dispensary\");\n if(($this->conn)->connect_error){\n return 0;\n }\n }", "function write()\n {\n\trequire(\"mysql.php\");\n\t$sql = \"INSERT INTO `team2GuestDB`.`GuestBook` (`id`, `name`, `msg`, `timestamp`) VALUES (NULL, :name, :msg, CURRENT_TIMESTAMP)\";\n\t$stm = $dbh->prepare($sql);\n\t$stm->execute(array(':name' => $_POST['name'],':msg' => $_POST['con']));\n }", "public function updateDatabase(){\n $api_response = Http::get(config('urls.api'));\n //Place in database\n $this->postToDatabase($api_response);\n }", "public function addOnDB() {\n\t\t\t$db = mysqli_connect($GLOBALS['host'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\n\t\t\t\n\t\t\t$format = \"INSERT INTO `user` \n\t\t\t\t(`username`, `password`, `fullname`, `birthplace`, `birthdate`, `email`, `avatar`) VALUES \n\t\t\t\t('%s', '%s', '%s', '%s', '%s', '%s', '%s');\";\n\t\t\t$stmt = sprintf($format, $this->username, $this->password, $this->fullname, $this->birthplace, $this->birthdate,\n\t\t\t\t$this->email, $this->avatar_path);\n\t\t\t$result = mysqli_query($db, $stmt);\n\t\t\t\n\t\t\t$db->close();\n\t\t}", "function storePost($user, $date, $content){\n\t$con = mysqli_connect('dbserver.engr.scu.edu', 'holson', '00000755449', 'test');\n\n\tif(!$con){\n\t\tdie(\"servers not available\");\n\t\techo \"servers not available\";\n\t}\n\n\t//Sanatizing Data using prepare/bind/execute\n\t$q = $con->prepare(\"INSERT INTO forum_posts(user_id,date,post) VALUES (?,?,?)\");\n\t$q->bind_param(\"iss\",$user,$date,$content);\n\t$q->execute();\n\n\t//mysqli_query($con, \"INSERT INTO forum_posts(user_id, date, post) VALUES ('$user','$date','$content')\");\n\t\n\tmysqli_close($con);\n}", "function database_saving($file){\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n $dbname = \"demo\";\n\n// Create connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n// Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n $sql = \"INSERT INTO uploaded_files (file_name)VALUES ('$file')\";\n $conn->query($sql);\n $conn->close();\n\n}", "function connectsql(){\n\t$mysqlhost=\"localhost\";\n\t$mysqluser=\"pool_insert\";\n\t$mysqlpwd=\"poolinsert\";\n\t$mysqldb=\"knappe\";\n\t\t// --- Write Data to DB ---\n\t\t$connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or syslog(LOG_WARNING,\"** Keine Verbindung zum Server! **\". mysql_error());\n\t\tmysql_select_db($mysqldb, $connection) or syslog(LOG_WARNING,\"** kein Select zur DB! ** **\". mysql_error());\n\t\n\t\t//mit mysql_close wird die Verbindung geschlossen\n}", "public function saveToDB()\n {\n }", "private function saveData() {\n\n $dbConnection = dbconn::getConnectionBuild()->getConnection();\n date_default_timezone_set (\"America/Chicago\");\n\n if ($this->propertyId == 0) {\n // Insert a new row.\n $sqlStmt = \"INSERT INTO property (customer_id, tenant_first_name, tenant_last_name, address, city, \";\n $sqlStmt .= \"state, zip, phone, email, notes, created_by, last_modified_by, last_modified) \";\n $sqlStmt .= \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\n\n $stmtObj = $dbConnection->prepare($sqlStmt);\n if ($dbConnection->error) {\n echo $dbConnection->error;\n exit();\n }\n\n $currentDate = date('Y-m-d H:i:s');\n $stmtObj->bind_param(\"isssssssssiis\", $this->customerId, $this->firstName, $this->lastName, $this->address, $this->city,\n $this->state, $this->zip, $this->phone, $this->email, $this->notes, $this->employeeId,\n $this->employeeId, $currentDate);\n $stmtObj->execute();\n if ($dbConnection->error) {\n echo $dbConnection->error;\n exit();\n }\n $this->propertyId = $dbConnection->insert_id;\n } else {\n // Update existing row.\n $sqlStmt = \"UPDATE property SET customer_id = ?, tenant_first_name = ?, tenant_last_name = ?, address = ?, city = ?, \";\n $sqlStmt .= \"state = ?, zip = ?, phone = ?, email = ?, notes = ?, last_modified_by = ?, last_modified = ? \";\n $sqlStmt .= \"WHERE id = ? \";\n\n $currentDate = date('Y-m-d H:i:s');\n\n $stmtObj = $dbConnection->prepare($sqlStmt);\n $stmtObj->bind_param(\"isssssssssisi\", $this->customerId, $this->firstName, $this->lastName, $this->address, $this->city,\n $this->state, $this->zip, $this->phone, $this->email, $this->notes, $this->employeeId,\n $currentDate, $this->propertyId);\n $stmtObj->execute();\n }\n\n $this->statusMessage = \"Save successful: \" . date(\"h:i:s a\");\n\n }", "private function conect(){\r\n\t\tglobal $HOST;\r\n\t\tglobal $BASEDEDATOS;\r\n\t\tglobal $USUARIO;\r\n\t\tglobal $PASS;\r\n\t\t$this->myconn = mysql_connect($HOST,$USUARIO,$PASS);\r\n\t\tif (! $this->myconn){\r\n\t\t\techo \"Error al intentar conectarse con el servidor MySQL\";\r\n\t\texit(); \r\n\t\t}\r\n\r\n\t\tif (! @mysql_select_db($BASEDEDATOS,$this->myconn)){\r\n\t\t\techo \"No se pudo conectar correctamente con la Base de datos\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t}", "public function operation(): void\n {\n echo \"Save to database ...\\n\\r\";\n }", "public function save(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Find the columns from the model\n\t\t$columns = static::$columns;\n\n\t\t//because ID is AI we dont want to put a value in it\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//Same with timestamp\n\t\tunset($columns[array_search('timestamp', $columns)]);\n\n\t\t//Create an insert query which gets linked to the database\n\t\t$query = \"INSERT INTO \" . static::$tableName . \" (\". implode(\",\", $columns) . \") VALUES (\";\n\n\t\t//create a variable called insesrtcols. This is where we put the values\n\t\t$insertcols = [];\n\t\t//For each of the columns in the columns array, add that column into the insert cols array, and seperate it with a :\n\t\tforeach ($columns as $column) {\n\t\t\tarray_push($insertcols, \":\" . $column);\n\t\t}\n\t\t//turn the insertcols array into 1 string and put a , between each entry\n\t\t$query .= implode(\",\", $insertcols);\n\t\t//close the query\n\t\t$query .= \")\";\n\n\t\t//Prepare the query\n\t\t$statement = $db->prepare($query);\n\n\t\t//Foreach of the columns run this function\n\t\tforeach ($columns as $column) {\n\t\t\t//Attach the value to each of the columns\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\" . $column , $this->$column);\n\t\t}\n\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Get the id of the query which was just added\n\t\t$this->id = $db->lastInsertID();\n\t}", "public function store()\n {\n $this->link = mysqli_connect(DBSERVER, DBUSER, DBPASS, DBNAME);\n foreach ($this->dataArray as $item)\n {\n //break up X-MRID field and convert array vals to integer\n $msgInfo = array_map('intval', explode('.',$item[23]));\n $deliv = strtotime($item[1]);\n $queued = strtotime($item[2]);\n if(isset($msgInfo[1]))\n {\n mysqli_query($this->link, \"INSERT INTO bounces (delivered, queued, recipient, dsnstatus, bouncereason, acctid, contactid, msgid, seqid) VALUES ('$deliv','$queued','$item[4]','$item[7]','$item[8]','$msgInfo[1]','$msgInfo[2]','$msgInfo[4]','$msgInfo[5]')\");\n }\n }\n }", "function connectsql(){\n\t$mysqlhost=\"localhost\";\n\t$mysqluser=\"pool_insert\";\n\t$mysqlpwd=\"poolinsert\";\n\t$mysqldb=\"knappe\";\n\t// --- Write Data to DB ---\n\t$connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or syslog(LOG_WARNING,\"** Keine Verbindung zum Server! **\". mysql_error());\n\tmysql_select_db($mysqldb, $connection) or syslog(LOG_WARNING,\"** kein Select zur DB! ** **\". mysql_error());\n\t//mit mysql_close wird die Verbindung geschlossen\n}", "function edit(){\n $this->connect(); // open connection\n $this->disconnect(); // close connection\n }", "public abstract function operateDB($data);", "function insertData($INmodel,$INmanu,$INversion,$INprice)\n\t{\n\t\t//Get data for SQL\n\t\t$lines = file('/home/int322_161a19/secret/topsecret');\n\t\t$j=0;\n\t\t$host = trim($lines[$j++]);\n\t\t$user = trim($lines[$j++]);\n\t\t$pass = trim($lines[$j++]);\n\t\t$dbnm = trim($lines[$j++]);\n\n\t\t//Establish connection\n\t\t$conn = mysqli_connect($host,$user,$pass,$dbnm) or die('Error connecting to database: ' . mysqli_error($conn));\n\n\t\t//Execute command and make sure it worked\n\t\t$sqlCmd = 'INSERT INTO phones SET model=\"' . trim($INmodel) . '\",manu=\"' . trim($INmanu) . '\",version=\"' . trim($INversion) . '\",price=' . trim($INprice);\n\t\t//echo $sqlCmd . \"<br>\";\n\t\tmysqli_query($conn,$sqlCmd) or die('Error2: ' . mysqli_error($conn));\n\n\t\t//Close connection\n\t\tmysqli_close($conn);\n\t}", "public function save(){\r\n\t\t\t$query = DB::connection()->prepare(\r\n\t\t\t\t\"INSERT INTO Logs (comp_id, user_id, datum) \r\n\t\t\t\tVALUES (:comp_id, :user_id, :datum)\"\r\n\t\t\t);\r\n\t\t\t$query->execute(array(\r\n\t\t\t\t'comp_id' \t=>\t$this->comp_id,\r\n\t\t\t\t'user_id'\t=>\t$this->user_id,\r\n\t\t\t\t'datum' \t=>\t$this->datum\r\n\t\t\t));\r\n\t\t}", "private function dbConnect(){\n\t\t\t$mysqli = $this->mysqli = new mysqli(self::DB_SERVER, self::DB_USER, self::DB_PASSWORD, self::DB);\n mysqli_set_charset($mysqli, \"utf8\");\n if ($mysqli->connect_errno) {\n $this->response('', 204); // server error \n }\n\t\t}", "public function insertDB(){\n // Query to input into customers table\n $this->qry_insert_customer = \"INSERT INTO customers (company, firstname, lastname, email, phone, description)\n VALUES ('$this->company','$this->firstname', '$this->lastname', '$this->email', '$this->phone', '$this->description')\";\n\n // Query to input into customers table\n $this->qry_insert_address = \"INSERT INTO addresses (address, city, country, postal_code)\n VALUES ('$this->street','$this->place','$this->country','$this->zipcode')\";\n\n //Execute both queries\n mysqli_query($this->db, $this->qry_insert_customer);\n mysqli_query($this->db, $this->qry_insert_address); \n }", "private function open_db() {\n\n\t\t//var_dump($this->connection); exit;\n\n\t\t\n\n\t}", "public function connectToDB() {}", "function UpdateDataBase($userId, $machineId, $successrate, $country,$details) {\r\n\r\n global $DBServer, $DBName, $DBUser, $DBPass;\r\n $conn = new mysqli($DBServer, $DBUser, $DBPass, $DBName);\r\n // check connection\r\n if ($conn->connect_error) {\r\n trigger_error('Database connection failed: ' . $conn->connect_error, E_USER_ERROR);\r\n exit;\r\n }\r\n $date = date('Y-m-d H:i:s');\r\n $sql = \"INSERT INTO test_data (userid, machineid,successrate,country,details,update_date) VALUES ('$userId','$machineId','$successrate','$country','$details','$date')\";\r\n $rs = $conn->query($sql);\r\n\r\n if ($rs === false) {\r\n trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);\r\n exit;\r\n }\r\n\r\n $conn->autocommit(TRUE);\r\n $conn->close();\r\n\r\n echo \"Success\"; \r\n //echo $details;\r\n}", "public function connect(){ //connrct to database\r\t\tif ($this->connected==false){\r\t\t\tif ($this->pers){\r\t\t\t\t$this->handle=sqlite_popen($this->server);\r\t\t\t}else{\r\t\t\t\t$this->handle=sqlite_open($this->server);\r\t\t\t}\r\t\t\t\r\t\t\t//$this->engine = new SQLiteDatabase($this->server);\r\t\t\t$this->connected=true;\r\t\t}//\r\t}", "private function connectDB()\n\t{\n\t\t$this->db = ECash::getMasterDb();\n\t\t\n\t//\t$this->dbconn = $this->db->getConnection();\n\t}", "function mysql () {\n\t/* public: connection parameters */\n\t\t$this->connect();\n\t}", "private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }", "public function write() {\n\t\t$database = Registry::get(\"database\");\n\t\t$v = \"value='\" . $this -> value . \"'\";\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE server.configs SET \" . $v . \" WHERE key_='\" . $this -> key . \"'\");\n\t}", "function db()\n\t{\n\t\tglobal $dbhost, $dbuser, $dbpass, $dbname;\n\t\t$this->db_server_link = @mysql_connect($dbhost, $dbuser, $dbpass);\n\t\tmysql_select_db($dbname, $this->db_server_link) ;\n\t}", "public function insertDatabase();", "function store_data_in_db($params) {\r\n $db = get_db_handle(); ## method in helpers.php\r\n //$name = $params[0] . ' ' . $params[1] . ' ' . $params[2];\r\n $dob = $params[3] . '/' . $params[4] . '/' . $params[5];\r\n $phone = $params[11] .'-' . $params[12] . '-' . $params[13];\r\n##OK, duplicate check passed, now insert\r\n $sql = \"INSERT INTO person(first_name,last_name, dob, address, address2, city, state, zip, phone, email, gender, experience, category, medical, image) \".\r\n \"VALUES('$params[0]','$params[2]','$dob','$params[6]','$params[7]','$params[8]', '$params[9]', '$params[10]', '$phone', '$params[14]', '$params[15]', '$params[16]', '$params[17]', '$params[18]', '$params[19]');\";\r\n##echo \"The SQL statement is \",$sql; \r\n mysqli_query($db,$sql);\r\n $how_many = mysqli_affected_rows($db);\r\n echo(\"There were $how_many rows affected\");\r\n close_connector($db);\r\n }", "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'username' => $this->username,\n 'password_hash' => $this->password_hash,\n 'email' => $this->email,\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'user_type' => $this->user_type,\n 'bio' => $this->bio,\n 'creation_date' => $this->creation_date,\n 'gender' => $this->gender,\n 'color' => $this->color\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public static function connToDB()\n {\n\t if(!defined('DB_SERVER')) define('DB_SERVER', '127.0.0.1');\n\t if(!defined('DB_USERNAME')) define('DB_USERNAME', 'root');\n\t if(!defined('DB_PASSWORD')) define('DB_PASSWORD', 'root');\n\t if(!defined('DB_NAME')) define('DB_NAME', 'NAA');\n\n\t /* Attempt to connect to MySQL database */\n\t $link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD);\n\t /*if(!$link)\n\t {\n\t\t $server_error = 'Server error. Please try again sometime. CON';\n\t\t header( \"Location: /sitedown.php\" );\n\t\t exit ;\n\t }*/\n\n\t $select_db = mysqli_select_db($link,DB_NAME);\n\t /*if(!$select_db)\n\t {\n\t\t $server_error = 'Server error. Please try again sometime. DB';\n\t\t header( \"Location: /sitedown.php\" );\n\t\t exit ;\n\t }*/\n }", "function saveToDatabase($connection){\n $submiting = (isset($_POST[\"submiting\"]))? $_POST[\"submiting\"]:null;\n //prevents from showing errors on first load, errors should only be shown after submitting \n if($submiting == null or $submiting == 'false')return;\n\n $firstName=(isset($_POST[\"firstName\"]))? $_POST[\"firstName\"]:null;\n $firstName = filter_var($firstName, FILTER_SANITIZE_STRING);\n\n $lastName=(isset($_POST[\"lastName\"]))? $_POST[\"lastName\"]:null;\n $lastName = filter_var($lastName, FILTER_SANITIZE_STRING);\n\n $phoneNumber=(isset($_POST[\"phoneNumber\"]))? $_POST[\"phoneNumber\"]:null;\n $phoneNumber = filter_var($phoneNumber, FILTER_SANITIZE_STRING);\n\n $emailAddress=(isset($_POST[\"emailAddress\"]))? $_POST[\"emailAddress\"]:\"[email protected]\";\n $emailAddress = filter_var($emailAddress, FILTER_SANITIZE_STRING);\n\n $address=(isset($_POST[\"address\"]))? $_POST[\"address\"]:null;\n $address = filter_var($address, FILTER_SANITIZE_STRING);\n\n $userName=(isset($_POST[\"userName\"]))? $_POST[\"userName\"]:null;\n $userName = filter_var($userName, FILTER_SANITIZE_STRING);\n\n $password=(isset($_POST[\"password\"]))? $_POST[\"password\"]:null;\n $password = filter_var($password, FILTER_SANITIZE_STRING);\n\n $validateResult = validateForm($firstName, $lastName, $phoneNumber, $emailAddress, $address, $userName, $password);\n if( !$validateResult->valid)return $validateResult;\n\n// $connection = getConnection();\n $salt=randomSalt();\n $encriptedPassword=getEncriptedPassword($password,$salt);\n\n $query = \"INSERT INTO Persons (firstName, lastName, phoneNumber, emailAddress, personAddress, userID, userPassword, salt, personTypeID) VALUES ('\".$firstName.\"','\".$lastName.\"','\".$phoneNumber.\"','\".$emailAddress.\"','\".$address.\"','\".$userName.\"','\".$encriptedPassword.\"','\".$salt.\"','4')\";\n \n $statement = $connection->prepare($query);\n $statement->execute();\n $statement->closeCursor();\n}", "public function saveToDatabase($data)\n {\n }", "public function save() {\n\t\t$sql = \"UPDATE \".$this->tablename.\" SET \";\n\t\t$last = $this->columns[count($this->columns)-1]['db_name'];\n\t\tforeach ($this->columns as $col) {\n\t\t\tswitch($col['type']){\n\t\t\t\tcase 'D':\t//Date, Time, Char, Password, Image all need quotes around the value\n\t\t\t\tcase 'T':\n\t\t\t\tcase 'C':\n\t\t\t\tcase 'I':\n\t\t\t\tcase 'X':\n\t\t\t\tcase 'M':\n\t\t\t\tcase 'E':\n\t\t\t\t\t$sql .= $col['db_name'].\" = '\".$this->data[0][$col['db_name']].\"'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'P':\n\t\t\t\t\t$sql .= $col['db_name'].\" = AES_ENCRYPT('\".$this->data[0][$col['db_name']].\"','\".la_aes_key.\"')\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'N':\t// Number, checkBox, Select, Radio don't need quotes\n\t\t\t\tcase 'B':\n\t\t\t\tcase 'S':\n\t\t\t\tcase 'R':\n\t\t\t\t\t$sql .= $col['db_name'].' = '.$this->data[0][$col['db_name']];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($col['db_name'] != $last) {\n\t\t\t\t$sql .= ',';\n\t\t\t}\n\t\t}\n\t\t$sql .= \" WHERE \".$this->idcol.\"=\".$this->page->ctrl['record'];\n\t\t$this->error->debug($sql);\n\t\t$this->dbc->exec($sql);\n\t\treturn true;\n\t}", "function postmethod($data){\n include \"db.php\";\n $product_name=$data[\"product_name\"];\n $cod_bar=$data[\"cod_bar\"];\n $price_buy=$data[\"price_buy\"];\n\n $sql= \"INSERT INTO produtos(product_name,cod_bar,price_buy) VALUES ('$product_name' , '$cod_bar', '$price_buy')\";\n\n if (mysqli_query($conn , $sql)) {\n echo '{\"result\": \"data inserted\"}';\n } else{\n\n echo '{\"result\": \"data not inserted\"}';\n }\n\n\n\n}", "function db_connect() {\n $result = new mysqli('localhost', 'wieseld', 'hetfield1994', 'wieseld_Your_Average_Joe');\n \n if(!$result) {\n throw new Exception('Could not connect to database server');\n } else {\n //sets autocommit to true\n $result->autocommit(TRUE);\n return $result;\n }\n }", "public function save()\n {\n $db = DatabaseUtil::db_connect($this->database);\n $db->query('update ' . $this->table . 'set ' . $this->column . ' = ' . $this->value . ' where ID=' . $this->ID);\n $db->close();\n }", "private function write($data)\n {\n $this->connection->write($data);\n }", "public function save() {\n $db = Db::instance();\n // omit id \n $db_properties = array(\n 'firstName' => $this->firstName,\n 'lastName' => $this->lastName,\n 'description' => $this->description,\n 'user' => $this->user,\n 'password' => $this->password,\n 'image' => $this->image,\n 'gender' => $this->gender,\n 'topic_id' => $this->topic_id,\n 'topic_id1' => $this->topic_id1,\n 'role_id' => $this->role_id,\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "function saveInformation(){\n\t$servername = \"localhost\";\n\t$username = \"root\";\n\t$password = \"SocO94\";\n\t$dbname = \"soco\";\n\n\t// Create connection\n\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t// Check connection\n\tif (!$conn) {\n\t\tdie(\"Connection failed: \" . mysqli_connect_error());\n\t}\n\n\t$sql = \"INSERT INTO $tableName($updateAttribute)\n\t\t\tVALUES ($updateValue)\";\n\n\tif (mysqli_query($conn, $sql)) {\n\t\techo \"New record created successfully\";\n\t} else {\n\t\techo \"Error: \" . $sql . \"<br>\" . mysqli_error($conn);\n\t}\n\n\tmysqli_close($conn);\n}", "function WritingToDatabase($conn, $motor_1_value, $motor_2_value, $motor_3_value, $motor_4_value, $motor_5_value, $motor_6_value) {\n\n\t//To take the date directly from the device used at its timing and not from the database\n\n\t\n\t//To take the amount in the slider from 1 to 180\n\t$motor_1_value = $_POST[\"motor_1\"];\n\t$motor_2_value = $_POST[\"motor_2\"];\n\t$motor_3_value = $_POST[\"motor_3\"];\n\t$motor_4_value = $_POST[\"motor_4\"];\n\t$motor_5_value = $_POST[\"motor_5\"];\n\t$motor_6_value = $_POST[\"motor_6\"];\n\n\t$sql = \"INSERT INTO `motor_valuess` ( `motor_1`, `motor_2`, `motor_3`, `motor_4`, `motor_5`, `motor_6`) VALUES ('$motor_1_value', '$motor_2_value', '$motor_3_value', '$motor_4_value', '$motor_5_value', '$motor_6_value');\";\n\n\tif ($conn->query($sql) === TRUE) {\n \techo \"تم بنجاح\";\n\t} else {\n \techo \"Error: \" . $sql . \"<br>\" . $conn->error;\n\t}\n\t\n }", "function do_post() \r\n{\r\n\tglobal $db, $utf8_ok;\r\n\r\n\tshow_header();\r\n\t\r\n\trequire_once(PEAR_DIR.'MDB2.php'); \r\n\t\r\n\t// attempt to connect to the requested database\r\n\t$db = MDB2::connect(array(\r\n\t\t'username' => $_POST['user'],\r\n\t\t'password' => $_POST['password'],\r\n\t\t'hostspec' => $_POST['host'],\r\n\t\t'database' => $_POST['name'],\r\n\t\t'phptype' => 'mysql'\r\n\t));\r\n\r\n\t// handle connection errors\r\n\tif (MDB2::isError($db)) \r\n\t{\r\n\t\tif ($db->getCode() == MDB2_ERROR_CONNECT_FAILED) {\r\n\t\t\tshow_form('One of the following is invalid: Database Host, Database User,\r\n\t\t\tor Database Password. Please check these three values for accuracy and try\r\n\t\t\tagain.<br /><br />Remember: the database username and password is usually\r\n\t\t\tNOT the same as your FTP username and password. For most servers, the host\r\n\t\t\tis <tt>localhost</tt>, but you may wish to check with your server\r\n\t\t\tadministrator.');\r\n\t\t} elseif ($db->getCode() == MDB2_ERROR_NOSUCHDB) {\r\n\t\t\t$dbnames = array();\r\n\r\n\t\t\t// try to get a list of databases\r\n\t\t\t$db =& MDB2::Connect(array(\r\n\t\t\t\t'username' => $_POST['user'],\r\n\t\t\t\t'password' => $_POST['password'],\r\n\t\t\t\t'hostspec' => $_POST['host'],\r\n\t\t\t\t'database' => '',\r\n\t\t\t\t'phptype' => 'mysql'\r\n\t\t\t));\r\n\t\t\tif (!MDB2::isError($db)) {\r\n\t\t\t\t$result =& $db->query('CREATE DATABASE `'.$db->escape($_POST['name']).'`');\r\n\t\t\t\tif ($db->isError($result)) {\r\n\t\t\t\t\t$result =& $db->getAll('SHOW DATABASES');\r\n\t\t\t\t\tif (!$db->isError($result)) {\r\n\t\t\t\t\t\tforeach ($result as $k => $row) {\r\n\t\t\t\t\t\t\t$dbnames[] = \"<li style=\\\"cursor:pointer;\\\" onclick=\\\"document['forms']['step2']['name'].value='{$row[0]}'\\\">{$row[0]}</li>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (count($dbnames) > 0) {\r\n\t\t\t\t\t\tshow_form('The specified Database Name does not exist, and could not\r\n\t\t\t\t\t\tbe created. The following databases were found at this connection:\r\n\t\t\t\t\t\t<ul>' .\timplode('', $dbnames) . '</ul>');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tshow_form('The specified Database Name does not exist and could not\r\n\t\t\t\t\t\tbe created. You must create this database separately. Please check\r\n\t\t\t\t\t\tthe name and try again.');\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$db->setDatabase($_POST['name']);\r\n\t\t\t\t\tif ($db->isError($result)) {\r\n\t\t\t\t\t\tshow_form('The specified Database Name did not exist. It was\r\n\t\t\t\t\t\tcreated, but cannot be connected to. Please check the permissions\r\n\t\t\t\t\t\ton this database and try again.');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tshow_form('The database connection could not be established: ' .\r\n\t\t\t$db->getMessage());\r\n\t\t}\r\n\t}\r\n\r\n\t\r\n\t// all communication with database will be in UTF-8\r\n\t// (no error checking; in case pre-4.1 MySQL)\r\n\t$res = $db->query(\"SET NAMES 'utf8'\");\r\n\t$utf8_ok = !MDB2::isError($res);\r\n\r\n\t// disable strict SQL modes for MySQL 5.0.2+\r\n\t$db->query(\"SET sql_mode=''\");\r\n\r\n\t// create or update the tables\r\n\tdefine('MYSQLPREFIX', $_POST['dbPrefix']);\r\n\tif ($_POST['oldDbPrefix'] == '') {\r\n\t\tdefine('OLDMYSQLPREFIX', $_POST['dbPrefix']);\r\n\t} else {\r\n\t\tdefine('OLDMYSQLPREFIX', $_POST['oldDbPrefix']);\r\n\t}\r\n\r\n\r\n\t// check to see if any tables with prefix already exist\r\n\t$mysqlprefix = str_replace('_', '\\_', MYSQLPREFIX);\r\n\t$oldmysqlprefix = str_replace('_', '\\_', OLDMYSQLPREFIX);\r\n\t\t\t\t\r\n\t//there is some bug with some version of mysql/php on $db->quote\t\r\n//\t$res_new_prefix = $db->queryOne('SHOW TABLES LIKE '.$db->quote(\"{$mysqlprefix}%\"));\r\n//\t$res_old_prefix = $db->queryOne('SHOW TABLES LIKE '.$db->quote(\"{$oldmysqlprefix}%\"));\r\n\t$res_new_prefix = $db->queryOne('SHOW TABLES LIKE '.\"'{$mysqlprefix}%'\");\r\n\t$res_old_prefix = $db->queryOne('SHOW TABLES LIKE '.\"'{$oldmysqlprefix}%'\");\r\n\t\r\n\tif (MDB2::isError($res_new_prefix) || MDB2::isError($res_old_prefix)) \r\n\t{\r\n\t\tshow_form('SHOW TABLES command failed: '. $res_new_prefix->getUserInfo());\r\n\t}\r\n\t\r\n\t// make sure table existence corresponds with new/update mode\r\n\tif (isset($res_new_prefix) && $_POST['install_type'] == 'new') \r\n\t{\r\n\t\tshow_form('You requested a new installation, but one or more tables starting with the specified prefix already exist.');\r\n\t} \r\n\telseif (!isset($res_old_prefix) && $_POST['install_type'] == 'upgrade') \r\n\t{\r\n\t\tshow_form('You requested an upgrade installation, but no tables were found to upgrade.');\r\n\t} \r\n\telseif (isset($res_new_prefix) && $_POST['install_type'] == 'upgrade')\r\n\t{\r\n\t\tshow_form('You requested an upgrade installation, but one or more tables starting with the specified prefix already exist.');\r\n\t}\r\n\r\n\tif ($_POST['install_type'] == 'upgrade') {\r\n\t\t// Handle database upgrade\r\n\t\tglobal $tables;\r\n\t\tif (OLDMYSQLPREFIX != MYSQLPREFIX) {\r\n\t\t\t$prefix = OLDMYSQLPREFIX;\r\n\t\t\t$r = $db->query(\"SHOW TABLES LIKE '{$prefix}%'\");\r\n\t\t\twhile ($info = $r->fetchRow()) {\r\n\t\t\t\t$old = array_pop($info);\r\n\t\t\t\t$new = MYSQLPREFIX.substr($old,strlen(OLDMYSQLPREFIX));\r\n\t\t\t\t//we will only worry about upgrading a table if we know about it.\r\n\t\t\t\t//We will still rename in case someone has extended TUFaT, and still\r\n\t\t\t\t//uses the default prefix\r\n\t\t\t\tif (array_search(substr($old,strlen(OLDMYSQLPREFIX)), array_keys($tables)) !== false) {\r\n\t\t\t\t\t$tables_to_upgrade[] = substr($old,strlen(OLDMYSQLPREFIX));\r\n\t\t\t\t}\r\n\t\t\t\t$q = \"RENAME TABLE `{$old}` TO `{$new}`\";\r\n\t\t\t\t$result = $db->query($q);\r\n\t\t\t\tif ($db->isError($result)) {\r\n\t\t\t\t\terror_log(\"Error creating tables: \" . $result->userinfo);\r\n\t\t\t\t\tshow_form(\"An error occurred while renaming the database tables:<br/>{$result->message}<br/><pre>{$result->userinfo}</pre>\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Now we add any tables that we need which did not already exist\r\n\t\t$tables_to_add = array_diff(array_keys($tables), $tables_to_upgrade);\r\n\t\t$added = add_table($tables_to_add, $db, $utf8_ok);\r\n\t\tif ($added !== true) {\r\n\t\t\t$error_message = '';\r\n\t\t\tforeach ($added as $error) {\r\n\t\t\t\terror_log(\"Error creating tables: {$error->userinfo}\");\r\n\t\t\t\t$error_message .= \"<br/>{$error->message}<br/><pre>{$error->userinfo}</pre>\";\r\n\t\t\t}\r\n\t\t\tshow_form(\"An error occurred while creating the database tables:{$error_message}\");\r\n\t\t}\r\n\r\n\t\tforeach ($tables_to_upgrade as $tbl) {\r\n\t\t\t$prefix = MYSQLPREFIX;\r\n\t\t\t$table_info = $tables[$tbl];\r\n\t\t\t$columns_to_add = array_keys($table_info);\r\n\t\t\t$q = \"DESCRIBE `{$prefix}{$tbl}`\";\r\n\t\t\t$r = $db->query($q);\r\n\t\t\twhile ($info = $r->fetchRow(MDB2_FETCHMODE_OBJECT)) {\r\n\t\t\t\t//If the column shouldn't be there, remove it. If it should, remove it\r\n\t\t\t\t//from columns to add\r\n\t\t\t\t$col = array_search($info->field, $columns_to_add);\r\n\t\t\t\tif ($col === false) {\r\n\t\t\t\t\t$remove_col_q = \"ALTER TABLE `{$prefix}{$tbl}` DROP `{$info->field}`\";\r\n\t\t\t\t\t$result = $db->query($remove_col_q);\r\n\t\t\t\t\tif ($db->isError($result)) {\r\n\t\t\t\t\t\terror_log(\"Error removing auto increment: \" . $result->userinfo);\r\n\t\t\t\t\t\tshow_form(\"An error occurred while attemting to remove old columns from your tables:<br/>{$result->message}<br/><pre>{$result->userinfo}</pre>\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tunset($columns_to_add[$col]);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//remove the auto-inc (to add back later)\r\n\t\t\t\tif ($info->extra != '') {\r\n\t\t\t\t\t$remove_auto_inc_q = \"ALTER TABLE `{$prefix}{$tbl}` CHANGE `{$info->field}` `{$info->field}` {$info->type}\";\r\n\t\t\t\t\t$result = $db->query($remove_auto_inc_q);\r\n\t\t\t\t\tif ($db->isError($result)) {\r\n\t\t\t\t\t\terror_log(\"Error removing auto increment: \" . $result->userinfo);\r\n\t\t\t\t\t\tshow_form(\"An error occurred while attemting to remove an auto increment from your tables:<br/>{$result->message}<br/><pre>{$result->userinfo}</pre>\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//remove all keys (we'll add these later)\r\n\t\t\t\tif (strtolower($info->key) == 'pri') {\r\n\t\t\t\t\t$remove_key_q = \"ALTER TABLE `{$prefix}{$tbl}` DROP PRIMARY KEY\";\r\n\t\t\t\t\t$result = $db->query($remove_key_q);\r\n\t\t\t\t\tif ($db->isError($result)) {\r\n\t\t\t\t\t\terror_log(\"Error removing key: \" . $result->userinfo);\r\n\t\t\t\t\t\tshow_form(\"An error occurred while attemting to remove a key from your table:<br/>{$result->message}<br/><pre>{$result->userinfo}</pre>\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} elseif ($info->key != '') {\r\n\t\t\t\t\t$remove_key_q = \"ALTER TABLE `{$prefix}{$tbl}` DROP INDEX `{$info->field}`\";\r\n\t\t\t\t\t$result = $db->query($remove_key_q);\r\n\t\t\t\t\tif ($db->isError($result)) {\r\n\t\t\t\t\t\terror_log(\"Error removing key: \" . $result->userinfo);\r\n\t\t\t\t\t\tshow_form(\"An error occurred while attemting to remove a key from your table:<br/>{$result->message}<br/><pre>{$result->userinfo}</pre>\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tforeach (array_keys($table_info) as $cur_col) {\r\n\t\t\t\t$field_info = field_info($table_info[$cur_col]);\r\n\t\t\t\tif (in_array($cur_col, $columns_to_add)) {\r\n\t\t\t\t\t$q = \"ALTER TABLE `{$prefix}{$tbl}` ADD {$field_info->field}\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$q = \"ALTER TABLE `{$prefix}{$tbl}` CHANGE `{$cur_col}` {$field_info->field}\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($field_info->key !== false) {\r\n\t\t\t\t\t$q .= \", ADD {$field_info->key}\";\r\n\t\t\t\t}\r\n\t\t\t\t$result = $db->query($q);\r\n\t\t\t\tif ($db->isError($result)) {\r\n\t\t\t\t\terror_log(\"Error adding or modifying column: \" . $result->userinfo);\r\n\t\t\t\t\tshow_form(\"An error occurred while attemting to add or modify a column from your table:<br/>{$result->message}<br/><pre>{$result->userinfo}</pre>\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t} \r\n\telse {\r\n\t\t// Handle new installation\r\n\t\t//$error = execute_sql(INSTALL_DIR . 'tables.sql', $db, $utf8_ok);\r\n\t\t$added = add_table(ALL_TABLES, $db, $utf8_ok);\r\n\t\tif ($added !== true) {\r\n\t\t\t$error_message = '';\r\n\t\t\tforeach ($added as $error) {\r\n\t\t\t\terror_log(\"Error creating tables: \" . $error->userinfo);\r\n\t\t\t\t$error_message .= \"<br/>{$error->message}<br/><pre>{$error->userinfo}</pre>\";\r\n\t\t\t}\r\n\t\t\tshow_form(\"An error occurred while creating the database tables:{$error_message}\");\r\n\t\t}\r\n\r\n\t\t$error = execute_sql(INSTALL_DIR . 'initial_data.sql', $db, $utf8_ok);\r\n\t\tif ($error) {\r\n\t\t\terror_log(\"Error creating tables: {$error->userinfo}\");\r\n\t\t\tshow_form(\"An error occurred while creating the database tables:<br/>{$error->message}<br/><pre>{$error->userinfo}</pre>\");\r\n\t\t}\r\n\t}\r\n\r\n\t// set the application config file variables\r\n\tupdate_config_file(array(\r\n\t\t'DBHOST' => $_POST['host'],\r\n\t\t'DBUSERNAME' => $_POST['user'],\r\n\t\t'DBPASSWORD' => $_POST['password'],\r\n\t\t'DBNAME' => $_POST['name'],\r\n\t\t'MYSQLPREFIX' => $_POST['dbPrefix']\r\n\t));\r\n\r\n\t// show confirmation\r\n\tshow_confirmation();\r\n}", "function writedata($conn,$User_Input)\r\n {\r\n\r\n\r\n $sql = \"UPDATE user_input.o2_input SET wert = $User_Input WHERE id ORDER BY id DESC LIMIT 1;\"; //Wert wird aus Tabelle abgelesen \r\n\r\n if ($conn->query($sql) === TRUE) //Wenn Wert erfolgreich gespeichert erfolgt Ausgabe \r\n { \r\n echo \"Success\";\r\n } \r\n else \r\n {\r\n echo \"Error: \" . $sql . \" => \" . $conn->error; //Ausgabe des Fehlercodes \r\n }\r\n }", "function createNewSite($data){\n// var_dump($data); exit;\n if ($this->connection){\n $this->connection->beginTransaction();\n $stmt = $this->connection->prepare(\"INSERT INTO sites(name,url,description,path) VALUES (?,?,?,?)\");\n\n try {\n\n $stmt->execute(array($data['name'],$data['url'],$data['description'],$data['path']));\n $this->connection->commit();\n } catch (PDOException $e) {\n $this->connection->rollBack();\n }\n\n $this->checkError();\n\n }\n }", "public function run()\n {\n //定义数据填充数据\n $path = database_path();\n $data = split_sql($path . '/sql/admin_user_insert.sql');\n //执行数据迁移\n $user = new User();\n execute_sql($user, $data, 'admin_user');\n }", "public function save()\n {\n try {\n global $connection;\n //check if user data exist , if yes then save it into $userDataifExits , it will hold bool(false) if no data found\n $userDataifExits = isUsernameExist($this->getUsername());\n //if it found the data , that means we have it in already , so making sql statement that will call customers update sp\n //if data is not found then we insert the data by making sql that will call customer_insert sp\n if ($userDataifExits !== false) {\n #update\n $sql = \"CALL customers_update(:username , :password, :firstname, :lastname, :address, :city, :province, :postalCode)\";\n } else {\n #insert\n $sql = \"CALL customer_insert(:username , :password, :firstname, :lastname, :address, :city, :province, :postalCode)\";\n }\n\n // adding the current values from fields to local variables..\n $username = $this->getUsername();\n $password = $this->getPassword();\n $firstname = $this->getFirstName();\n $lastname = $this->getLastName();\n $address = $this->getAddress();\n $city = $this->getCity();\n $province = $this->getProvince();\n $postalCode = $this->getPostalcode();\n\n //preparing the statement using prepare function\n $stmt = $connection->prepare($sql);\n\n //binding the parameters into sql using local appropriate fields\n $stmt->bindParam(':username', $username);\n $stmt->bindParam(':password', $password);\n $stmt->bindParam(':firstname', $firstname);\n $stmt->bindParam(':lastname', $lastname);\n $stmt->bindParam(':address', $address);\n $stmt->bindParam(':city', $city);\n $stmt->bindParam(':province', $province);\n $stmt->bindParam(':postalCode', $postalCode);\n\n //if execution is successful it will return true else false.. because execute function will return bool\n return $stmt->execute();\n } catch (Exception $e) {\n echo 'Exception occurred: ' . $e->getMessage();\n }\n\n }", "private function saveDb()\n\t{\n\t\t//format our sql statements w/ the valid fields\n\t\t$fields = array();\n\t\t\n\t\t//loop thru all our dirty fields.\n\t\tforeach ($this->dirtyFields AS $key => $foo)\n\t\t{\n\t\t\t//get our value.\n\t\t\tif (isset($this->data[$key]) && $key != 'id')\n\t\t\t{\n\t\t\t\t$val = $this->data[$key];\n\n\t\t\t\t//slashes replacement..\n\t\t\t\t$val = str_replace(\"\\\\\\\\\", \"\\\\\", $val);\n\t\t\t\t$val = str_replace(\"\\'\", \"'\", $val);\n\t\t\t\t$val = str_replace(\"\\\\\\\"\", \"\\\"\", $val);\n\n\t\t\t\t//add it if we have it...\n\t\t\t\t$fields[] = \"`$key` = '\" . addslashes($val) . \"'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//update if we have an id....\n\t\tif (count($fields))\n\t\t{\n\t\t\t//now make our array\n\t\t\t$sqlFields = implode(\",\\n\", $fields) . \"\\n\";\n\t\t\t\n\t\t\t//update it?\n\t\t\tif ($this->id)\n\t\t\t{\n\t\t\t\t$sql = \"UPDATE $this->tableName SET\\n\";\n\t\t\t\t$sql .= $sqlFields;\n\t\t\t\t$sql .= \"WHERE id = '$this->id'\\n\";\n\t\t\t\t$sql .= \"LIMIT 1\";\n\n\t\t\t\tdb()->execute($sql);\n\t\t\t}\n\t\t\t//otherwise insert it...\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql = \"INSERT INTO $this->tableName SET\\n\";\n\t\t\t\t$sql .= $sqlFields;\n\n\t\t\t\t$this->id = db()->insert($sql);\n\t\t\t}\n\t\t}\n\t}", "public function updateData(){\n try{\n $this->dbConnection->query($this->query);\n $this->message = $this->moduleName.' Successfully Updated';\n $this->data = array();\n $this->data['id'] = $this->dbConnection->lastInsertId();\n $this->sendJSONResponse();\n \n }catch( PDOException $ex ) {\n $this->message = 'Error storing '.$this->moduleName.' :'. $ex->getMessage();\n $this->sendJSONErrorReponse();\n }\n }", "function writedata($conn,$User_Input)\r\n {\r\n\r\n $sql = \"UPDATE user_input.flow_in_input SET wert = $User_Input WHERE id ORDER BY id DESC LIMIT 1;\"; //Wert wird aus Tabelle abgelesen \r\n\r\n if ($conn->query($sql) === TRUE) //Wenn Wert erfolgreich gespeichert erfolgt Ausgabe \r\n { \r\n echo \"Success\";\r\n } \r\n else \r\n {\r\n echo \"Error: \" . $sql . \" => \" . $conn->error; //Ausgabe des Fehlercodes \r\n }\r\n }", "public function saveData()\r\n {\r\n \r\n }", "public function write(){\r\n // Create query\r\n $query= \"INSERT INTO `posts` ( `user_id`, `body`, `create_on`, `privacy`) \r\n VALUES ('4', 'this is third post by ThFourree', CURDATE(), '2');\";\r\n // Prepare statement\r\n $stmt = $this->conn->prepare($query);\r\n // Clean data\r\n $this->user_id = htmlspecialchars(strip_tags($this->user_id));\r\n $this->body = htmlspecialchars(strip_tags($this->body));\r\n $this->create_on = htmlspecialchars(strip_tags($this->create_on));\r\n $this->group_id = htmlspecialchars(strip_tags($this->group_id));\r\n $this->privacy = htmlspecialchars(strip_tags($this->privacy));\r\n // Bind data\r\n $stmt->bindParam(':user_id', $this->user_id);\r\n $stmt->bindParam(':body', $this->body);\r\n $stmt->bindParam(':create_on', $this->create_on);\r\n $stmt->bindParam(':group_id', $this->group_id);\r\n $stmt->bindParam(':privacy', $this->privacy);\r\n // Execute query\r\n if($stmt->execute()) {\r\n return true;\r\n }\r\n\r\n // Print error if something goes wrong\r\n printf(\"Error: %s.\\n\", $stmt->error);\r\n\r\n return false;\r\n }", "function save_client(){\n//include connection.php\ninclude \"connection.php\";\t\n\n//fetch the data from the POST (array)\n$rowdata=$_POST['data'];\n$fullname=$rowdata[0]; //fetch index 0\n$phone=$rowdata[1];//fetch index 1\n$address=$rowdata[2];//fetch index 2\n$email=$rowdata[3];//fetch index 3\n$username=$rowdata[4];//fetch index 4\n$password=password_hash($rowdata[5],PASSWORD_DEFAULT);//fetch index 5\n$date=date(\"Y\").\"-\".date(\"m\").\"-\".date(\"d\");\n//create a query\n$query=\"INSERT INTO tblusers(fullname,phoneno,useraddress,\nuseremail,username,userpass,usertype,registereddate)\n VALUES('$fullname','$phone','$address','$email',\n'$username','$password','client','$date')\";\n//execute the query\t\n if(mysqli_query($db,$query)){\n\techo \"Registration Successful\";\t\n }\n else{\n\techo mysqli_error($db); \n }\n}", "public function save()\n {\n try {\n $name = $this->getName();\n $age = $this->getAge();\n if (!$this->getDriverId()) {\n $this->_pdo->query(\"INSERT INTO driver (name, age) VALUES ('$name', '$age')\");\n } else {\n $this->_pdo->query(\n \"UPDATE drive SET name = '$name', age = '$age'\" .\n \" WHERE driver_id = \" . $this->getDriverId()\n );\n }\n } catch (PDOException $e) {\n echo \"Error: \" . $e;\n }\n }", "private function connect()\n\t{\n\t\t$connectionData = $this->app->file->requireFile('config.php');\n\t\t\n\t\textract($connectionData);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tstatic::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\n\t\t\tstatic::$connection->exec('SET NAMES utf8');\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\t\t\t\t\n\t}", "function addToPortfolioDB($username_input,$purchaseCost,$qty,$symbol)\n{\n \n $mysql_server = '192.168.1.101';\n \n $mysqli = new mysqli($mysql_server, \"badgers\", \"honey\", \"user_info\");\n \n \n $qry = \"Insert into portfolio (username, stockSymbol, qty, price) values('$username_input','$symbol','$qty','$purchaseCost')\";\n $result = $mysqli->query($qry);\n \n//let me turn it on for you\n//thats why its not connecting\n echo \"Added into DB\";\n //$mysqli.close();\n \n}", "public function connectDB() {}", "public function server_connection(){\n\t\t\n\t\tif(!$this->persist_connection){\n\t\t\t\t\n\t\t\t$this->connection = @mysql_connect($this->server, $this->user, $this->password);\n\t\t\t\t\n\t\t\n\t\t}else{\n\t\t\t\t\n\t\t\t$this->connection = @mysql_pconnect($this->server, $this->user, $this->password);\n\t\t\t\t\n\t\t}\n\t\t\n\t\tif (!$this->connection) {\n\t\t\n\t\t\tthrow new Exception(\"Could not connect to server &nbsp;: &nbsp \" . $this->server . \"\");\n\t\t\texit();\n\t\t}\n\t\t\n\t\tif (!@mysql_ping($this->connection)) {\n\t\t\n\t\t\tthrow new Exception(\"Lost connection to Server &nbsp;: &nbsp \" . $this->server . \"\");\n\t\t\texit();\n\t\t}\n\t\t\n\t}", "public function Save(){\r\n\t\t$this->db->save();\r\n\t}", "public function insertIntoDB($_db){\n\n }", "public function connect_db() {\n }", "private function Connect(){\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "static function upload_database($host, $user, $pass, $name, $fname)\n {\n // grab the file\n if (!file_exists($fname) || !($sql = file_get_contents($fname))) {\n return 'Could not load SQL file \"'.$fname.'\".';\n }\n // connect to the database\n if (!($db = @mysqli_connect($host, $user, $pass, $name))) {\n return 'Could not create a connection to the MySQL server.';\n }\n \n // make the query\n mysqli_multi_query($db, $sql);\n // wait for everything to finish\n do {\n if ($r = mysqli_store_result($db)) {\n mysqli_free_result($r);\n }\n } while (mysqli_next_result($db));\n \n // no error\n return false;\n }", "private function dbConnection() {\r\n //if (!is_resource($this->connessione))\r\n // $this->connessione = mysql_connect($this->db_server,$this->db_username,$this->db_pass) or die(\"Error connectin to the DBMS: \" . mysql_error());\r\n if (!is_resource($this->connessione)) {\r\n try {\r\n $this->connessione = new PDO($this->db_type . \":dbname=\" . $this->db_name . \";host=\" . $this->db_server, $this->db_username, $this->db_pass);\r\n //echo \"PDO connection object created\";\r\n $this->setupSQLStatement();\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n }\r\n }", "function connectToDatabase() {\n\n $host = self::servername;\n $databaseName = self::dbname;\n $password = self::password;\n $username = self::username;\n //To create the connection\n $conn = new mysqli($host, $username, $password, $databaseName);\n self::$conn = $conn;\n //Connection Checking, if there is a connection error, print the error\n if ($conn->connect_error) {\n exit(\"Failure\" . $conn->connect_error);\n }\n }", "public function index_post()\n {\n $input = $this->input->post();\n $this->write_db->insert($_table,$input);\n \n $this->response(['Item created successfully.'], REST_Controller::HTTP_OK);\n }", "public function open()\n {\n $this->conexion= mysqli_connect(\"localhost:3306\",\"root\") or die (msql_error());\n mysqli_select_db($this->conexion, 'alsaplane') or die (msql_error());\n }", "public function connectToDatabase(){\n\t\t$dbinfo=$this->getDBinfo();\n\n\t\t$host=$dbinfo[\"host\"];\n\t\t$dbname=$dbinfo[\"dbname\"];\n\t\t$user=$dbinfo[\"user\"];\n\t\t\n $pass=$this->getPassword();//don't share!!\n\n try{\n $DBH = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n $DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }catch(PDOException $e){\n $this->processException($e);\n }\n \n $this->setDBH($DBH);\n }", "public function connect()\n {\n $data = $this->app->file->requireFile('config.php');\n extract($data);\n try {\n static::$DB = new PDO('mysql:host=' . $server . ';dbname=' . $dbname , $dbuser , $dbpass);\n\n static::$DB->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE , PDO::FETCH_OBJ);\n static::$DB->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n static::$DB->exec('SET NAMES utf8');\n\n }\n catch (PDOException $e){\n die($e->getMessage());\n }\n }", "function database_manipulation($server_name='', $db_name='', $db_username='', $db_password='')\n\n\t{\n\n\t\t\n\n\t\tif(strlen($server_name) <= 0)\n\n\t\t $server_name = $GLOBALS['site_config']['database_server'];\n\n\t\t\n\n\t\tif(strlen($db_name) <= 0)\n\n\t\t $db_name = $GLOBALS['site_config']['database_name'];\n\n\t\t\n\n\t\tif(strlen($db_username) <= 0)\n\n\t\t$db_username = $GLOBALS['site_config']['database_username'];\n\n\t\t\n\n\t\tif(strlen($db_password) <= 0)\n\n\t\t$db_password = $GLOBALS['site_config']['database_password'];\n\n\t\t\n\n\t\t$this->serevername = $server_name;\n\n\t\n\n\t\t$this->dbname = $db_name;\n\n\t\n\n\t\t$this->dbusername = $db_username;\n\n\t\n\n\t\t$this->dbpassword = $db_password;\n\n\t\t\n\n\t\t$this->dbresource_id = $this->connect_db();\n\n\t\t\n\n\t}", "function selecnarDB()\n\t{\n\t\tmysql_select_db($this->dataBase) or die(mysql_error());\t\n\t}", "public function setDataConnection(){\n \n \n }", "function dataBaseAccess() \n {\n error_reporting (E_ALL & ~ E_NOTICE & ~ E_DEPRECATED); \n // error_reporting(0);\n date_default_timezone_set('America/Recife');\n // conexão com o servidor \n $this->myCon=mysqli_connect(\"localhost\", \"X\", \"X\");\n $db_selected = mysqli_select_db( $this->myCon , 'D' );\n return ; \n }", "private function connect() {\n $this->load->database();\n }", "function DbConnection() { \n\t\t/*if(file_exists('../lib/dbconfig.xml')){\n\t\t\t\n\t\t $xml = simplexml_load_file('../lib/dbconfig.xml');\n\t\t\t$this->user =$xml->user;\n\t\t\t$this->password =$xml->password;\n\t\t\t$this->host =$xml->host;\n\t\t\t$this->database =$xml->name;\n\t\t \n\t\t} \n\t\telse{\n\t\t\t\n\t\t exit('Failed to open :database_configuration.xml');\n\t\t \n\t\t}*/\n\t\t$this->host='localhost';\n\t\t$this->user='root';\n\t\t$this->database='iims';\n\t\t$this->password='';\n\t\t\n\t\t\n\t\t $this->linkId = @mysql_connect($this->host, $this->user,$this->password)or die(\"Error in connecting to db server: \".mysql_error()); \n\t\t$this->db = @mysql_select_db($this->database,$this->linkId)or die(\"Error in connecting to database: \".mysql_error()); \n\t}", "public function saveToDb()\n\t{\n\t\t$db = \\App\\Db::getInstance('admin');\n\t\t$tablesData = array_intersect_key($this->getData(), $this->changes);\n\t\tforeach ($tablesData as $key => $value) {\n\t\t\t$db->createCommand()->update($this->baseTable, ['value' => $value], ['type' => $this->type, 'name' => $key])->execute();\n\t\t}\n\t}", "private function Connect() {\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "function createConnect()\r\n\t\t{\r\n\t\t$this->conn=mysql_pconnect($this->host,$this->user,$this->password);\r\n\t\tif(!is_resource($this->conn))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to connect to the SQL Server.\";\r\n\t\t\t}\r\n\t\t$d = mysql_select_db($this->dbname, $this->conn);\r\n\t\tif(!is_resource($d))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to Use database \".$this->dbname.\".\";\r\n\t\t\t}\r\n\t\t}", "public function Database(){\n\t\t$dbhost = 'localhost';\n\t\t$dbuser = 'root';\n\t\t$dbpass = '';\n\t\t$dbname = 'voting';\n\n\t\t$this->conn = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die(\"Connection Error\");\n\t}", "protected function write()\n {\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->storage);\n }", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "function saveData(){\r\n require_once('Database.php');\r\n $database = new Database(\"localhost\", \"root\", \"\", \"practica\");\r\n $database->connect();\r\n\r\n //Take input and test it for special characters\r\n $firstname = test_input($_POST['firstname']);\r\n $lastname = test_input($_POST['lastname']);\r\n $email = test_input($_POST['email']);\r\n $number = test_input($_POST['number']);\r\n\r\n $age = test_input($_POST['age']);\r\n $address = test_input($_POST['address']);\r\n $sex = test_input($_POST['sex']);\r\n $sizes = test_input($_POST['size']);\r\n\r\n $image = test_input($_POST['image']);\r\n\r\n //Prepare and execute statement, returning 1 for success and 0 for failure\r\n if($stmt = $database->conn->prepare(\"INSERT INTO form (firstname, lastname, email, phoneNumber, age, address, gender, sizes, image)\r\n VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\")){\r\n $stmt->bind_param('sssiissss', $firstname, $lastname, $email,\r\n $number, $age, $address, $sex, $sizes, $image);\r\n\r\n $stmt->execute();\r\n\r\n $stmt->close();\r\n echo 1;\r\n }\r\n else{\r\n echo 0;\r\n }\r\n\r\n $database->disconnect();\r\n }", "function db_connect() {\n $servername = '127.0.0.1';\n $username = 'root';\n $password = 'password';\n $dbname = 'computer_parts';\n\n $result = new mysqli($servername, $username , $password, $dbname);\n if (!$result) {\n return false;\n }\n $result->autocommit(TRUE);\n return $result;\n}", "public function save()\n {\n\n // generate all column's sql query\n $column_names = '';\n $column_values = '';\n foreach ($this->columns as $field_name => $column_obj)\n {\n if ($column_obj->columnName === null) {\n $column_names .= $field_name.', ';\n } else {\n $column_names .= $column_obj->columnName.', ';\n }\n $column_values .= $column_obj->generateValueForSQL().', ';\n }\n $column_names = substr($column_names, 0, -1);\n $column_values = substr($column_values, 0, -1);\n $this_table_name = $this->table_name;\n $this_id = $this->id;\n\n if ($this->id === 0) {\n // This object is not saved yet.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values);';\n // Execute query\n } else {\n // This object is on the DB.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values) WHERE id=$this_id;';\n // Execute query\n }\n\n mysql_run_query($query);\n\n }", "public function connect() {\r\n\t\t$this->connection = mysql_connect($this->host, $this->username, $this->password);\r\n\t\t$this->selectDB($this->squema);\r\n\t}", "function database() {\n\t\t\n\t\t// Cria conexao com o bando de dados MySql\n\t\t$connect = mysql_connect(\"localhost\", \"root\", \"123\");\n\t\tmysql_select_db(\"rd_promocoes_db\", $connect);\n\n\t\t// Verifica a conexao com o banco\n\t\tif ( mysqli_connect_errno() ) {\n\t\t \techo \"Failed to connect to MySQL: \" . mysqli_connect_error();\n\t\t}\n\t}", "function connectDB(){\n\t\tif(!$this->conId=mysql_connect($this->host,$this->user,$this->password)){\n trigger_error('Error connecting to the server '.mysql_error());\n exit();\n\t\t}\n\t\tif(!mysql_select_db($this->database,$this->conId)){\n\t\t\t trigger_error('Error selecting database '.mysql_error());\n\t\t\t exit();\n\t\t}\n\t}", "function insertConnectionString(){\n define(\"iHOST\", \"iHOST.ie\");\n define(\"iUSER\", \"iUSER\");\n define(\"iPASS\", \"iPASS\");\n define(\"iDB\", \"iDB\");\n $connection = mysqli_connect(iHOST, iUSER, iPASS);\n if (!$connection) {\n trigger_error(\"Could not reach database!<br/>\");\n include(\"logs/logsMail-1dir.php\");\n exit();\n }\n $db_selected = mysqli_select_db($connection, iDB);\n if (!$db_selected) {\n trigger_error(\"Could not reach database!<br/>\");\n include(\"logs/logsMail-1dir.php\");\n exit();\n } \n return $connection;\n }", "function update_DB() {\n $result = mysqli_query($this->connection, $this->query);\n if ($result === false) {\n $error = \"Error retrieving records from database: mysqli_error($this->connection)\";\n header('Location:index.php?message=' . $error);\n } else {\n $successful = 'Data inserted...';\n return $successful;\n }\n }", "private function _set_connection()\n {\n isset($this->_database_connection) ? $this->load->database($this->_database_connection) : $this->load->database();\n $this->_database = $this->db;\n }", "public function saveData(): void\n {\n studentLoader::saveStudent(new student($_POST['lastName'], $_POST['firstName'], $_POST['email'], new group($_POST['className']), $_POST['id']), $this->pdo);\n }", "public function run()\n {\n $sql_file = public_path('4farh_ecom_world.sql');\n\n $db = [\n 'host' => '127.0.0.1',\n 'database' => '4farh_ecom',\n 'username' => 'root',\n 'password' => null,\n ];\n\n exec(\"mysql --user={$db['username']} --password={$db['password']} --host={$db['host']} --database={$db['database']} < $sql_file \");\n }", "public function Database() {\r\n\r\n $this->hostname = \"localhost\";\r\n $this->database = \"skynet\";\r\n $this->user = \"root\";\r\n $this->pass = \"\";\r\n $this->connect();\r\n\r\n }" ]
[ "0.77167296", "0.7478669", "0.6679204", "0.6524693", "0.6462344", "0.6432648", "0.6430459", "0.642411", "0.64206064", "0.63026685", "0.62364393", "0.6201386", "0.6170227", "0.6154438", "0.61422473", "0.6133295", "0.6124398", "0.6119805", "0.61183757", "0.611416", "0.61024565", "0.60921216", "0.606602", "0.606147", "0.6058145", "0.6033238", "0.60258937", "0.6018964", "0.6007962", "0.6005251", "0.59985113", "0.5993801", "0.59806967", "0.597717", "0.5947387", "0.5946457", "0.59461343", "0.594462", "0.5939285", "0.59357834", "0.59231186", "0.5914729", "0.591398", "0.5906939", "0.5906923", "0.58994746", "0.5892723", "0.58722275", "0.5866874", "0.58645606", "0.5861115", "0.58583736", "0.5855125", "0.5843807", "0.5840258", "0.58397484", "0.5838174", "0.5836057", "0.5835056", "0.5834365", "0.582912", "0.58266103", "0.5823754", "0.5818542", "0.58159345", "0.58144677", "0.58050674", "0.57980394", "0.57967836", "0.5794487", "0.5787626", "0.5784097", "0.57803327", "0.576877", "0.5767213", "0.5764875", "0.57625604", "0.5761514", "0.5760113", "0.5754652", "0.5749159", "0.5749123", "0.57436514", "0.57349426", "0.5734561", "0.5731855", "0.57302046", "0.572583", "0.5725066", "0.57183576", "0.57146084", "0.5713921", "0.5713525", "0.5713024", "0.57117754", "0.5710158", "0.57098323", "0.5709599", "0.5708362", "0.57067746" ]
0.7119114
2
remove the Customer details from the database this function is for removing the customer from the database
public function removeCustomer($customer_Id) //this function is for removing the customer from the database { $connection=new server();//accessing connection from the server.php file $connection=$connection->serverConnnection();//accessing connection from the server.php file $sql="CALL removeCustomer(:customer_Id)";// initilizing the command to call the source routine $PDOStatement=$connection->prepare($sql); //preparing the connection to the sql $PDOStatement->bindParam(":customer_Id",$customer_Id); // binding the parameters to the connection $PDOStatement->execute();// executing the data }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_customer()\n\t{\n\t\tglobal $db;\n\n\t\t$sql = \"DELETE FROM preorder_customers WHERE prc_preorderID=$this->preorderID AND prc_customerID=$this->customerID\";\n\t\tmysql_query($sql,$db);\n\t\t$this->error->mysql(__FILE__,__LINE__);\n\t}", "function deleteCustomer() {\n\n // Delete all notes of customer\n $stmt = $GLOBALS['con']->prepare(\"DELETE FROM customerNotes WHERE customer_id = ?\");\n $stmt->bind_param(\"s\", $uid);\n\n $uid = validateInput('delete', 'post');\n\n $stmt->execute();\n $stmt->close();\n\n\n // Delete customer \n $stmt = $GLOBALS['con']->prepare(\"DELETE FROM customerInfo WHERE id = ?\");\n $stmt->bind_param(\"s\", $uid);\n \n $uid = validateInput('delete', 'post');\n\n $stmt->execute();\n $stmt->close(); \n }", "public function delete()\n {\n\t\t$res = $this->getDB()->delete('customers',['customer_ID'=>$this->getId()]);\n \n // Check to see if the query ran properly.\n if(!$res)\n {\n throw new Exception('The customer was not deleted from the database, something went wrong in the SQL statement.');\n }\n }", "public function DeleteCustomerDetails($data) { /* this fun for delete customer details */\n\n extract($data);\n //print_r($data);die();\n $sqldelete = \"UPDATE customer_details SET visible = '0' WHERE cust_id = '$Customer_id'\";\n\n $resultdelete = $this->db->query($sqldelete);\n\n if ($resultdelete) {\n $response = array(\n 'status' => 1,\n 'status_message' => 'Records Deleted Successfully..!');\n } else {\n $response = array(\n 'status' => 0,\n 'status_message' => 'Records Not Deleted Successfully...!');\n }\n\n return $response;\n }", "public function delCustomerById($id){ \n $delquery = \"DELETE FROM tbl_customer WHERE id = '$id'\";\n $delData = $this->db->delete($delquery);\n if ( $delData ) {\n echo \"<script> alert('Customer Deleted successfully.');</script>\";\n echo \"<script> window.location = 'customer-list.php'; </script>\";\n } else {\n echo \"<script> alert('Customer not deleted !');</script>\";\n echo \"<script> window.location = 'customer-list.php'; </script>\";\n }\n }", "function deleteCustomer()\n {\n $idCustomer = $_POST['idCustomer'];\n $nameCustomer = $_POST['nameCustomer'];\n\n //get data from Model\n $model = new CustomerModel();\n $deleteCustomer = $model->deleteCustomer($idCustomer);\n\n //check Exist Customer\n if ($deleteCustomer) {\n echo json_encode([\n 'status' => MESSAGE_DELETE_SUCCESS\n ]);\n } else {\n echo json_encode([\n 'status' => MESSAGE_DELETE_FAIL\n ]);\n }\n }", "function delete_customer($customer_id)\n {\n return $this->db->delete('customer',array('customer_id'=>$customer_id));\n }", "public function del(&$vo){\n\t\tif(mysql_query(\"DELETE FROM customer WHERE cust_id=$vo->cust_id\")) {\n\t\t\t$vo->cust_id=0;\n\t\t}\n\t}", "function delete_record () { //deletes a record\n\t\t\n\t\t//deletes record\n\t\t$pdo = Database::connect();\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$sql = \"DELETE FROM customers WHERE id = ?\";\n\t\t$q = $pdo->prepare($sql);\n\t\t$q->execute(array($_GET['id']));\n\t\tDatabase::disconnect();\n\t\theader(\"Location: customer.php\");\n\t\t\t\n\t}", "public function destroy(Customer $customer)\n { \n dd($customer);\n if($customer->delete()){\n return 'Record Deleted';\n }\n }", "public function destroy(Customers $customers)\n {\n \n }", "public function destroy(Customer $customer)\n {\n //\n }", "function remove_existing(){\n $db = DB::connect(DB_CONNECTION_STRING);\n \n $sql = \"delete from user \n where postcode = \" . $db->quote($this->postcode) . \"\n and email = \" . $db->quote($this->email) .\"\n and user_id <> \" . $db->quote($this->user_id);\n $db->query($sql); \n }", "public function destroy(Customer $customer)\n {\n //\n }", "public function destroy(Customer $customer)\n {\n //\n }", "public function destroy(Customer $customer)\n {\n //\n }", "public function destroy(Customer $customer)\n {\n //\n }", "public function deleteFromDb() {\n\n // calling configuration of database\n include('database/config.php');\n\n // Accessing cookie stored in validate-user-login.php\n $email = $_COOKIE['email'];\n\n // Removing data by using json_remove function\n $result = mysqli_query($connection, \"UPDATE users SET contact=json_remove(contact, '$.{$this->contactToDelete}') WHERE email='$email'\");\n\n // Refreshing page by redirecting\n header(\"Location: main.php#\");\n }", "public function delete()\n {\n $result = \\DB::select(\"call catalog_delete_customer($this->id)\");\n return is_null(object_get($result[0], '-1'));\n }", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "public function deleteCustomer(Customer $customer)\n\t{\n\t\t$this->em->remove($customer);\n\t\t$this->em->flush();\n\t}", "function ec_delete_user($cid) {\n global $customer_id, $customers_default_address_id, $customer_first_name, $customer_country_id, $customer_zone_id, $comments;\n tep_session_unregister('customer_id');\n tep_session_unregister('customer_default_address_id');\n tep_session_unregister('customer_first_name');\n tep_session_unregister('customer_country_id');\n tep_session_unregister('customer_zone_id');\n tep_session_unregister('comments');\n\n tep_db_query(\"delete from \" . TABLE_ADDRESS_BOOK . \" where customers_id = '\" . (int)$cid . \"'\");\n tep_db_query(\"delete from \" . TABLE_CUSTOMERS . \" where customers_id = '\" . (int)$cid . \"'\");\n tep_db_query(\"delete from \" . TABLE_CUSTOMERS_INFO . \" where customers_info_id = '\" . (int)$cid . \"'\");\n tep_db_query(\"delete from \" . TABLE_CUSTOMERS_BASKET . \" where customers_id = '\" . (int)$cid . \"'\");\n tep_db_query(\"delete from \" . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . \" where customers_id = '\" . (int)$cid . \"'\");\n tep_db_query(\"delete from \" . TABLE_WHOS_ONLINE . \" where customer_id = '\" . (int)$cid . \"'\");\n }", "function delete()\n {\n global $connection;\n //echo \"Im on the customers ->delete()\";\n\n //else\n //{\n #set_error_handler\n #set_exception_handler\n #call the stored procedure\n //$SQLQuery = \"DELETE FROM customers \" \n // . \" WHERE customer_username = :customer_username;\";\n $SQLQuery = \"CALL customers_delete(\"\n . \":customer_username);\";\n $PDOStatement = $connection->prepare($SQLQuery);\n $PDOStatement->bindParam(\":customer_username\", $this->customer_username); \n $PDOStatement->execute(); \n }", "public function unsetCustomerId(): void\n {\n $this->customerId = [];\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "public function delete($customerId);", "public function delCustomerCompare($csid){\n\t\t$sql = \"DELETE FROM tbl_compare WHERE csId = '$csid'\";\n\t\t$result = $this->db->delete($sql);\n\t}", "public function destroy($id)\n {\n Customer2::findOrFail($id)->delete();\n }", "public function deleteCustomer($customer)\n {\n Stripe\\Customer::retrieve($customer->token)->delete();\n }", "public function forgetCustomer()\n {\n $this->_customer = null;\n craft()->session->remove(self::SESSION_CUSTOMER);\n }", "public function remove()\n {\n database()->run('DELETE FROM ' . $this->table . ' WHERE ' . $this->primaryKey . ' = ?', [ $this->{$this->primaryKey} ]);\n $this->__destruct();\n }", "public function delete($id){\n $customer = Customer::where('Id',$id)->delete();\n return redirect()->back();\n }", "public function removeCustomer($args)\n {\n return $this->buildQuery('RemoveCustomer', $args);\n }", "public function destroy($id)\n {\n $customer = Customers::where('id',$id)->first();\n $customer->delete();\n $books = Books::all();\n foreach ($books as $book) {\n if($book->customer_id==$id){\n $book->delete();\n }\n }\n $comments = Comments::all();\n foreach ($comments as $comment) {\n if($comment->customer_id==$id){\n $comment->delete();\n }\n }\n $subs = Subs::all();\n foreach ($subs as $sub) {\n if($sub->customer_id==$id){\n $sub->delete();\n }\n }\n return redirect()->route('customers.index')->with('status','Đã xóa thành công!');\n }", "public function destroy($id)\n {\n\n\n try {\n\n $api = new Customer();\n $api = $api->find($id);\n $api->delete();\n return Base::touser('Customer Deleted', true);\n\n } catch (\\Exception $e) {\n\n return Base::touser(\"Can't able to delete Customer its connected to Other Data !\");\n //return Base::throwerror();\n }\n\n\n\n }", "public function destroy(Customer $customer)\n {\n $customer->delete();\n }", "public function customers_delete($param = null)\r\n {\r\n if (isset($_POST[\"cus_id\"]) && !empty($_POST[\"cus_id\"])) {\r\n $action = $_POST[\"cus_id\"];\r\n $delete = Customer::find($action)->delete();\r\n $total = Customer::count();\r\n\r\n echo json_encode([\"total\" => $total, \"isDeleted\" => $delete]);\r\n\r\n } else {\r\n echo json_encode([\"error\" => \"ERROR\"]);\r\n }\r\n }", "public function destroy($id)\n {\n Customer::find($id)->delete();\n }", "public function deleteByID($id){ \n\t\t$sql = \"\n\t\t\tDELETE\n\t\t\tFROM customer\n\t\t\tWHERE id =$id\";\n\n\t\t// Make a PDO statement\n\t\t$statement = DB::prepare($sql);\n\n\t\t// Execute\n\t\tDB::execute($statement);\n\t}", "public function DeleteCustomer($customer_id) {\n \n //set up the query\n $this->sql = \"DELETE FROM customers\n WHERE customerID = :customer_id\";\n \n //execute the query\n $this->RunAdvancedQuery([\n ':customer_id' => $customer_id,\n ], true);\n }", "public function destroy($id)\n {\n $vendor=Vendor::find($id);\n $customers = $vendor->customers()->get();\n\n foreach($customers as $customer){\n\n $data = Customer::find($customer->CDCL);\n $data->CDVEND = \"\";\n $data->save();\n\n }\n\n $vendor->delete();\n return redirect()->route('vendors.index')->with('success', 'Vendedor Deletado Com Sucesso');\n }", "public function typecomingcustomer_delete(){\n \n $param=array();\n $param[\"KD_TYPECOMINGCUSTOMER\"] = $this->delete(\"kd_typecomingcustomer\");\n $param[\"LASTMODIFIED_BY\"] = $this->delete(\"lastmodified_by\");\n $this->resultdata(\"SP_SETUP_TYPECOMINGCUSTOMER_DELETE\",$param,'delete',TRUE);\n }", "public function delete(){\r\n\t\t$this->db->delete();\r\n\t}", "public function remove() {\n\n // Updates DB (data & metadata)\n $this->attributes->removeAll($this->get(\"id\"));\n $this->db->delete(XCMS_Tables::TABLE_USERS, array(\n \"id\" => $this->get(\"id\")\n ));\n\n }", "public function delete($id){\n \n $users = Customer::find($id); //change model name\n \n return view('pages.officer.customer.delete')->with('user', $users);\n=======\n if ($validator->fails()) {\n return response()->json([\n 'error'=> $validator->errors(),\n ]);\n }else{\n $customer= Customer::where('email',$req->email)\n ->first();\n $customer->phone = $req->phone;\n $customer->name = $req->name;\n $customer->save();\n if($customer){\n $newData = Customer::where('email', $req->email)\n ->first();\n return response()->json([\n 'status' => 200,\n 'user_status' => $newData,\n 'message' => \"Profile Updated\",\n ]);\n }\n else{\n return response()->json([\n 'status' => 240,\n 'message' => \"Error\",\n ]);\n\n }\n }\n \n }", "public function deleteByFilter($customerVo){\n\t\ttry {\n\t\t\t$sql = 'DELETE FROM `customer`';\n\t\t\t$isDel = false;\n\t\t\t$condition = array();\n\t\t\t$params = array();\n\t\t\tif (!is_null($customerVo->customerId)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`customer_id` = :customerId';\n\t\t\t\t$params[] = array(':customerId', $customerVo->customerId, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->roleId)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`role_id` = :roleId';\n\t\t\t\t$params[] = array(':roleId', $customerVo->roleId, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->username)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`username` = :username';\n\t\t\t\t$params[] = array(':username', $customerVo->username, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->password)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`password` = :password';\n\t\t\t\t$params[] = array(':password', $customerVo->password, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->email)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`email` = :email';\n\t\t\t\t$params[] = array(':email', $customerVo->email, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->languageCode)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`language_code` = :languageCode';\n\t\t\t\t$params[] = array(':languageCode', $customerVo->languageCode, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->crtDate)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`crt_date` = :crtDate';\n\t\t\t\t$params[] = array(':crtDate', $customerVo->crtDate, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->crtBy)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`crt_by` = :crtBy';\n\t\t\t\t$params[] = array(':crtBy', $customerVo->crtBy, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->modDate)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`mod_date` = :modDate';\n\t\t\t\t$params[] = array(':modDate', $customerVo->modDate, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->modBy)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`mod_by` = :modBy';\n\t\t\t\t$params[] = array(':modBy', $customerVo->modBy, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->status)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`status` = :status';\n\t\t\t\t$params[] = array(':status', $customerVo->status, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->activeCode)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`active_code` = :activeCode';\n\t\t\t\t$params[] = array(':activeCode', $customerVo->activeCode, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->resetPasswordCode)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`reset_password_code` = :resetPasswordCode';\n\t\t\t\t$params[] = array(':resetPasswordCode', $customerVo->resetPasswordCode, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->oauthProvider)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`oauth_provider` = :oauthProvider';\n\t\t\t\t$params[] = array(':oauthProvider', $customerVo->oauthProvider, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerVo->oauthId)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`oauth_id` = :oauthId';\n\t\t\t\t$params[] = array(':oauthId', $customerVo->oauthId, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif(!$isDel){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$sql .= ' WHERE ' . join(' and ', $condition);\n\t\t\t}\n\t\t\n\t\t\t//debug\n\t\t\tLogUtil::sql('(deleteByFilter) '. DataBaseHelper::renderQuery($sql, $params));\n\t\t\n\t\t\t$stmt = $this->conn->prepare($sql);\n\t\t\tforeach ($params as $param){\n\t\t\t\t$stmt->bindParam($param[0], $param[1], $param[2]);\n\t\t\t}\n\t\t\t$stmt->execute();\n\t\t\treturn true;\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\tthrow $e;\n\t\t}\n\t\treturn null;\n\t}", "public function eliminar($data)\n {\n $cliente=$this->db->query('delete from tab_cliente where id_cliente='.$data); \n }", "public function destroy($id)\n {\n $customer = Pelanggan::where('Id',$id)->delete();\n return redirect()->back();\n }", "public function destroy($id)\n {\n $customer = Customer::find($id);\n \n $customer->delete(); \n //Session::flash('message', 'Customer deleted..');\n Alert::success('Deleted.'); \n return Redirect::route('customer.index'); \n\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "public static function delete_customer( $id ) {\n\t\tglobal $wpdb;\n\n\t\t/*$wpdb->delete(\n\t\t\t\"{$wpdb->prefix}investment_transations\",\n\t\t\tarray( 'transaction_id' => $id ),\n\t\t\tarray( '%d' )\n\t\t);*/\n\t}", "public function destroy(Customers $customer)\n {\n // $customer->delete();\n // return redirect()->route('customers.index')->with('success', 'Customer has been deleted');\n }", "function remove_from_db()\n\t{\n\n\t\t// delete Signup\n\t\t$sql = sprintf(\"delete from Signup where SignupId = '%s'\", \n\t\t\tmysql_real_escape_string($this->SignupId));\n\t\t$result = mysql_query($sql);\n\t\tif (!$result)\n\t\t\treturn display_mysql_error ('Cannot execute query', $sql); \t\t\n\t\t\n\t}", "public function destroy($id)\n {\n $customer = Customer::find($id);\n $customer->delete();\n }", "public function deleteSupplier($id){\n DB::table('users')->where('id',$id)->delete();\n }", "public function delete()\n\n {\n Customers::find($this->deleteId)->delete();\n session()->flash('message', 'Post Deleted Successfully.');\n\n }", "private function delete(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toDelete();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to delete!\");\n\t\t\treturn;\n\t\t}\n\t\tif(!$this->objAccessCrud->delete($id)){\n\t\t\t$this->msg->setError (\"There was an issue to delete, because this register has some relation with another one!\");\n\t\t\treturn;\n\t\t}\n\t\t// Cleaner all class values.\n\t\t$this->objAccessCrud->setAccessCrud(null);\n\t\t// Cleaner session primary key.\n\t\t$_SESSION['PK']['ACCESSCRUD'] = null;\n\n\t\t$this->msg->setSuccess (\"Delete the record with success!\");\n\t\treturn;\n\t}", "public function deleteCreditCard()\n\t{\n\t\tif (isset($this->context->cookie->id_customer) && $this->context->cookie->id_customer)\n\t\t\treturn (int)Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'stripepro_customer WHERE id_customer = '.(int)$this->context->cookie->id_customer);\n\n\t\treturn 0;\n\t}", "public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }", "public function destroy($id)\n {\n //\n tbl_customer::findOrFail($id)->delete();\n return redirect( route('customer.index') );\n }", "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "public function delete()\n {\n try {\n global $connection;\n //generate sql\n $sql = \"CALL customers_delete(:username)\";\n // adding the current values from fields to local variables..\n $username = $this->getUsername();\n //preparing the statement using prepare function\n $stmt = $connection->prepare($sql);\n //binding the parameters into sql using local appropriate fields\n $stmt->bindParam(':username', $username);\n //if execution is successful it will return true else false.. because execte function will return bool\n return $stmt->execute();\n } catch (Exception $e) {\n echo 'Exception occurred: ' . $e->getMessage();\n }\n }", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "public function deleteCustomer($id){\n\n if (Customer::where('id',$id)->where('deleted',0)->first()){\n $customer = Customer::find($id);\n $customer->timestamps;\n $customer->deleted = true;\n $customer->save();\n\n $result = [\n \"status\" =>\n [\n \"code\" => 201,\n \"status\" => \"success\",\n \"message\" => \"deleteCustomer succeed, customer deleted\"\n ],\n \"result\" =>\n [\n \"data\" => $customer\n ]\n ];\n\n return response()->json($result, 201);\n } else {\n // print_r($request->all()); exit;\n\n $result = [\n \"status\" =>\n [\n \"code\" => 000,\n \"status\" => \"failed\",\n \"message\" => \"deleteCustomer failed, customer not found\"\n ],\n \"result\" =>\n [\n \"data\" => \"\"\n ]\n ];\n return response()->json($result,404);\n }\n\n }", "public function DeleteCustomerDetails_get() {\n $data = $_GET;\n $response = $this->ManageCustomer_model->DeleteCustomerDetails($data);\n return $this->response($response);\n }", "public function deleteByPrimaryKey($customerId){\n\t\ttry {\n\t\t $sql = \"DELETE FROM `customer` where `customer_id` = :customerId\";\n\t\t $params = array();\n\t\t $params[] = array(':customerId', $customerId, PDO::PARAM_INT);\n\t\t \n\t\t //debug\n\t\t LogUtil::sql('(deleteByPrimaryKey) '. DataBaseHelper::renderQuery($sql, $params));\n\t\t \n\t\t\t$stmt = $this->conn->prepare($sql);\n\t\t\tforeach ($params as $param){\n\t\t\t\t$stmt->bindParam($param[0], $param[1], $param[2]);\n\t\t\t}\n\t\t\t$stmt->execute();\n\t\t\treturn true;\n\t\t} \n\t\tcatch (PDOException $e) {\n\t\t\tthrow $e;\n\t\t}\n\t\treturn null;\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_person_detail\n\t\t\t\tWHERE psd_ps_id=?\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id));\n\t}", "public function deleteRecord()\n { \n $sql = \"DELETE FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n }", "public function customer_delete($id)\n {\n $sales = $this->MSales_master->get_by_customer_id($id);\n if (count($sales) > 0)\n {\n $this->session->set_flashdata('error', 'Customer can\\'t delete, S/He is in Sales List.');\n }\n else\n {\n $this->MCustomers->delete($id);\n }\n\n redirect('inventory/customer-list', 'refresh');\n }", "public function actionDeleteOwner() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n $searchCriteria=new CDbCriteria;\r\n print $query = \"delete from `DeedDetails` where `DeedID`='$deedID' AND CustomerID = '$customerID'\";\r\n $command =Yii::app()->db->createCommand($query);\r\n \r\n if($command->execute()) $res=1;\r\n\r\n \r\n print CJSON::encode($res);\r\n }", "public function destroy($id)\n {\n $customer = Customer::find($id);\n $customer->delete(); //deletion of the selected id\n session()->flash('delete',$customer->customer_fname.' '. $customer->customer_lname.' has been deleted successfully.');//displaying notification for success deletion into the database\n return redirect()->route('clerkcustomers.index');\n \n }", "public function destroy($id)\n {\n $customer = Customer::where('id',$id)->first();\n $photo = $customer->image;\n if($photo){\n unlink($photo);\n $customer->delete();\n }else{\n $customer->delete();\n }\n\n }", "public function destroy(){\n $query = 'delete from Usuario where\n user_id = \"'.$this->getUser_id().'\"';\n $this->driver->exec($query);\n }", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public static function delete_customer( $id ) {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$wpdb->delete(\r\n\t\t\t\"{$wpdb->prefix}customers\",\r\n\t\t\t[ 'id' => $id ],\r\n\t\t\t[ '%d' ]\r\n\t\t);\r\n\t}", "public function destroy($id)\n {\n DB::beginTransaction();\n $customer_details = CustomerDetail::where('customer_id',$id)->first();\n $customer_details->delete();\n\n $delete = Customer::find($id)->delete();\n DB::commit();\n if($delete){\n return response()->json([\n 'status' => 'danger',\n 'message' => 'Customer has been deleted!',\n 'icon' => 'times',\n ]); \n }\n }", "public function delete(){\n global $database;\n \n //$sql = \"DELETE FROM users \";\n $sql = \"DELETE FROM \" .static::$db_table . \" \"; // space is for where // Change self to late static binding\n $sql .=\"WHERE id =\" . $database->escape_string($this->id);\n $sql .= \" LIMIT 1\";\n \n // Send the query to a databse using iternally instead of if\n $database->query($sql);\n return (mysqli_affected_rows($database->connection) ==1) ? true : false;\n }", "function rollBackCustomer()\n {\n $idCustomer = $_POST['idCustomer'];\n $nameCustomer = $_POST['nameCustomer'];\n\n //get data from Model\n $model = new CustomerModel();\n $deleteCustomer = $model->rollBackCustomer($idCustomer);\n\n //check Rollback customers Exist\n if ($deleteCustomer) {\n echo json_encode([\n 'status' => MESSAGE_ROLLBACK_CUSTOMSER_SUCCESS\n ]);\n } else {\n echo json_encode([\n 'status' => MESSAGE_ROLLBACK_CUSTOMER_FAIL\n ]);\n }\n }", "public function delete() {\n\t\t$query = \"DELETE FROM Users WHERE userId = :id\";\n\t\t$query_params = array(':id' => $this->userData['userId']);\n\t\texecuteSQL($query, $query_params);\n\t}", "public function destroy($id)\n {\n $det = erp_customer_contacts::where('id', $id)->first();\n erp_customer_contacts::where('id', $id)->delete();\n tblcontact::where('id', $det->contact_id)->delete();\n tblsocialmedias::where('id', $det->social_id)->delete();\n return 'Customer Detail Delete Permanently';\n }", "public function c_delete($id = null)\n {\n\t\t$this->getC();\n $this->request->allowMethod(['post', 'delete']);\n $customer = $this->Customers->get($id);\n if ($this->Customers->delete($customer)) {\n $this->Flash->success('The customer has been deleted.');\n } else {\n $this->Flash->error('The customer could not be deleted. Please, try again.');\n }\n return $this->redirect(['action' => 'c_index']);\n }", "function erase() {\n //delete * from database\n }", "public function destroy($id)\n {\n //\n $pin = $_POST['pin'];\n $user_update = User::where('pin', $pin)->first();\n $user_update->h_id = NULL;\n $user_update->h_name = NULL;\n $user_update->save();\n $doctor = HospitalDoctors::find($id);\n $doctor->delete();\n return redirect()->back()->with('success', 'Doctor Removed from your hospital.');\n \n }", "public function destroy($id)\n {\n $customer=Customer::find($id);\n $customer->delete();\n return redirect ('/customer');\n }", "public function deleteByFilter($customerDetailVo){\n\t\ttry {\n\t\t\t$sql = 'DELETE FROM `customer_detail`';\n\t\t\t$isDel = false;\n\t\t\t$condition = array();\n\t\t\t$params = array();\n\t\t\tif (!is_null($customerDetailVo->customerDetailId)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`customer_detail_id` = :customerDetailId';\n\t\t\t\t$params[] = array(':customerDetailId', $customerDetailVo->customerDetailId, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif (!is_null($customerDetailVo->customerId)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`customer_id` = :customerId';\n\t\t\t\t$params[] = array(':customerId', $customerDetailVo->customerId, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif (!is_null($customerDetailVo->firstName)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`first_name` = :firstName';\n\t\t\t\t$params[] = array(':firstName', $customerDetailVo->firstName, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerDetailVo->lastName)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`last_name` = :lastName';\n\t\t\t\t$params[] = array(':lastName', $customerDetailVo->lastName, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerDetailVo->phone)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`phone` = :phone';\n\t\t\t\t$params[] = array(':phone', $customerDetailVo->phone, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerDetailVo->image)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`image` = :image';\n\t\t\t\t$params[] = array(':image', $customerDetailVo->image, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerDetailVo->gender)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`gender` = :gender';\n\t\t\t\t$params[] = array(':gender', $customerDetailVo->gender, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif (!is_null($customerDetailVo->birthday)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`birthday` = :birthday';\n\t\t\t\t$params[] = array(':birthday', $customerDetailVo->birthday, PDO::PARAM_STR);\n\t\t\t}\n\t\t\tif (!is_null($customerDetailVo->receiveEmail)){\n\t\t\t\t$isDel = true;\n\t\t\t\t$condition[] = '`receive_email` = :receiveEmail';\n\t\t\t\t$params[] = array(':receiveEmail', $customerDetailVo->receiveEmail, PDO::PARAM_INT);\n\t\t\t}\n\t\t\tif(!$isDel){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$sql .= ' WHERE ' . join(' and ', $condition);\n\t\t\t}\n\t\t\n\t\t\t//debug\n\t\t\tLogUtil::sql('(deleteByFilter) '. DataBaseHelper::renderQuery($sql, $params));\n\t\t\n\t\t\t$stmt = $this->conn->prepare($sql);\n\t\t\tforeach ($params as $param){\n\t\t\t\t$stmt->bindParam($param[0], $param[1], $param[2]);\n\t\t\t}\n\t\t\t$stmt->execute();\n\t\t\treturn true;\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\tthrow $e;\n\t\t}\n\t\treturn null;\n\t}", "public function destroy($id_cliente){}", "public function purchase_unsaved_delete()\n {\n $purchase_no = $this->input->post('purchase_no');\n /** Remove auto created purchase journal */\n $journal = $this->MAc_journal_master->get_by_doc('Purchase', $purchase_no);\n if (count($journal) > 0)\n {\n $this->MAc_journal_details->delete_by_journal_no($journal['journal_no']);\n $this->MAc_journal_master->delete_by_journal_no($journal['journal_no']);\n }\n /** Remove auto created payment receipt for partial or full cash purchase */\n $payment = $this->MAc_payment_receipts->get_by_doc('Purchase', $purchase_no);\n if (count($payment) > 0)\n {\n $this->MAc_payment_receipts->delete($payment['id']);\n }\n /** Remove purchase */\n $this->MPurchase_details->delete_by_purchase_no($purchase_no);\n $this->MPurchase_master->delete_by_purchase_no($purchase_no);\n }", "public function destroy(Customer $customer)\n {\n // This method does not delete the record. \n // The record's status field is updated to 'inactive'\n // and an inactive date is recorded\n \n $customer = Customer::find($id);\n $customer->delete();\n\n return redirect('/customers')->with('message', 'Customer deleted');\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM compra_coletiva';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function delete(): void\n {\n $id = $this->id;\n $this->fetch(\n 'DELETE FROM user WHERE id = ?;',\n [$id]\n );\n }", "public function delete(){\n\t\t$sql = new Sql();\n\t\t$sql->query(\"DELETE FROM TB_USUARIOS WHERE idusuario=:ID\", array(\n\t\t\t':ID'=>$this->getIdusuario()\n\t\t));\n\n\t\t$this->setIdusuario(null);\n\t\t$this->setDeslogin(null);\n\t\t$this->setDessenha(null);\n\t\t$this->setDtcadastro(new DateTime());\n\t}", "public function delete()\n {\n // If deposit is existing, will get database ID removed.\n $this->dbID = $this->db->deleteDeposit($this);\n }", "public function removePurchaseDetail() { \n\n $result = 0;\n $purchaseDelIds = !empty($_GET['purchaseDelIds']) ? $_GET['purchaseDelIds'] : '';\n $totalss = !empty($_GET['totalss']) ? $_GET['totalss'] : '';\n $totalr = !empty($_GET['totalr']) ? $_GET['totalr'] : '';\n $otherChargess = !empty($_GET['otherChargess']) ? $_GET['otherChargess'] : '';\n $purchaseIds = !empty($_GET['purchaseIds']) ? $_GET['purchaseIds'] : '';\n $grandTotals = !empty($_GET['grandTotals']) ? $_GET['grandTotals'] : '';\n \n \n //if (!empty($purchaseDelIds)) {\n $purhaseModel = new PurhaseModel();\n $result = $purhaseModel->deletePurhaseDetails($purchaseDelIds,$purchaseIds,$totalss,$totalr,$otherChargess,$grandTotals);\n //}\n echo $result;\n\n \n }", "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "public function destroy($id)\n {\n $this->customint->destroy($id);\n return redirect('customers');\n }", "public function destroy(Customer $customer)\n {\n $customer->active = ($customer->active==1?-1:1);\n $customer->save();\n return back()->with('danger','Customer Deactivated');\n }", "public function delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }", "public function destroy(Custompost $custompost)\n {\n //\n }", "public function unemploy(){\n unset($this->staffId);\n unset($this->store);\n $connection = new Connection();\n $link = $connection->connect();\n $link->exec(\"DELETE FROM staff WHERE user_id = '$this->id'\");\n $connection = null;\n }", "public function removeOneAction()\n\t{\n\t\t//vérification du statut d'admin\n\t\t$customersManager = new CustomersManager();\n\t\t$customer = $customersManager -> getLoginInfo();\n\t\tif (empty($customer) OR $customer['email'] != ADMIN_EMAIL)\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n\t\t\texit();\n\t\t}\n\n\t\t//sécurisation CSRF\n\t\tif(!array_key_exists('CSRFToken', $customer) OR !array_key_exists('CSRFToken', $_GET) OR $_GET['CSRFToken'] !== $customer['CSRFToken'])\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n exit();\n\t\t}\n\n\t\t//vérification des données reçues\n\t\tif (!isset($_GET) OR !isset($_GET['id']))\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n\t\t\texit();\n\t\t}\n\n\t\t//suppression du produit dans la BDD\n\t\t$id = $_GET['id'];\n\t\t$productsManager = new ProductsManager();\n\t\t$productRemoved = $productsManager -> removeOne($id);\n\t\tif ($productRemoved)\n\t\t{\n\t\t\t$_SESSION['alertMessages']['success'][] = 'Le produit a bien été supprimé.';\n\t\t\theader('Location: manageForm');\n\t\t\texit();\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$_SESSION['alertMessages']['error'][] = 'La suppression du produit a échoué.';\n\t\t\theader('Location: manageForm');\n\t\t\texit();\n\t\t}\n\t}" ]
[ "0.786139", "0.76539934", "0.7140648", "0.70307225", "0.7014123", "0.6989397", "0.69427776", "0.68128586", "0.67163914", "0.66906166", "0.66616917", "0.66133004", "0.65840125", "0.65753514", "0.65753514", "0.65753514", "0.65753514", "0.6567615", "0.65480244", "0.65409005", "0.65000904", "0.6479877", "0.64751554", "0.6454992", "0.64404833", "0.6412575", "0.6395282", "0.63911855", "0.6375717", "0.6363777", "0.63615555", "0.6354416", "0.6350676", "0.6326059", "0.6310966", "0.63040656", "0.62850404", "0.6259773", "0.62502337", "0.6236911", "0.62246764", "0.62221295", "0.62184066", "0.6213542", "0.62123543", "0.6202351", "0.62012744", "0.619377", "0.619038", "0.61822754", "0.61794466", "0.6176878", "0.61709094", "0.61636853", "0.6163291", "0.6145581", "0.6135136", "0.61317515", "0.6130189", "0.6128831", "0.6124285", "0.6120304", "0.6104338", "0.61011624", "0.61000586", "0.60952675", "0.6086748", "0.60807866", "0.6077069", "0.60749257", "0.6074774", "0.6074506", "0.6062365", "0.60592294", "0.60575604", "0.6057378", "0.6052932", "0.60481936", "0.6048024", "0.6024431", "0.6014364", "0.60082215", "0.6005943", "0.6004172", "0.60008913", "0.5998879", "0.5998839", "0.5996603", "0.59921944", "0.59896463", "0.5986699", "0.5985908", "0.598263", "0.5975438", "0.5960248", "0.59601855", "0.59459937", "0.5941178", "0.59368545", "0.5936073" ]
0.71658564
2
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'form_type' => ['required', Rule::in([FormType::CREATE_TYPE, FormType::EDIT_TYPE])], 'name' => ['required', Rule::unique('staff')->ignore(request('staff'))], 'id_card_number' => ['nullable', Rule::unique('staff')->ignore(request('staff'))], 'gender' => 'required', 'date_of_birth' => 'nullable|date', 'first_phone' => 'required', 'branch' => ['nullable', 'integer', Rule::requiredIf(request('form_type') == FormType::CREATE_TYPE)], 'position' => 'required|integer', 'profile_photo' => 'nullable|file|mimes:jpg,jpeg,png', 'id_card_photo' => 'nullable|file|mimes:jpg,jpeg,png', //'role' => ['required', Rule::in(array_keys(userRoles()))], 'username' => [Rule::unique('users')->ignore(request('staff')->user ?? null)], 'password' => ['nullable', Rule::requiredIf(request('form_type') == FormType::CREATE_TYPE), 'min:6', 'max:32'], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.83426684", "0.8012867", "0.79357", "0.7925642", "0.7922824", "0.79036003", "0.785905", "0.77895427", "0.77832615", "0.7762324", "0.77367616", "0.7732319", "0.7709478", "0.7691477", "0.76847756", "0.7682022", "0.7682022", "0.7682022", "0.7682022", "0.7682022", "0.7682022", "0.7675238", "0.76745033", "0.7665319", "0.76570827", "0.764131", "0.7629555", "0.7629431", "0.7617311", "0.7609077", "0.76070553", "0.7602018", "0.759865", "0.7597791", "0.75919396", "0.7590118", "0.75871897", "0.75797164", "0.7555521", "0.755503", "0.75503516", "0.75458753", "0.75403965", "0.75360876", "0.7535538", "0.75300974", "0.7518105", "0.75145686", "0.75076634", "0.7506042", "0.75051844", "0.7498838", "0.7495001", "0.7494829", "0.74931705", "0.7490103", "0.7489394", "0.7489037", "0.7485875", "0.74857", "0.7478841", "0.74781114", "0.74692464", "0.74632394", "0.7461548", "0.74611425", "0.74590236", "0.74544203", "0.7453257", "0.7452147", "0.74498093", "0.7447976", "0.7441319", "0.7440709", "0.7435135", "0.7434774", "0.74325204", "0.74295586", "0.74287397", "0.74233043", "0.7418827", "0.74155605", "0.7413598", "0.7413494", "0.74120796", "0.740962", "0.74052715", "0.74039626", "0.7403312", "0.7400803", "0.7390036", "0.7383104", "0.73728377", "0.73704565", "0.73687065", "0.73608035", "0.7355335", "0.73462147", "0.7344126", "0.73427063", "0.7334932" ]
0.0
-1
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { $images = Cache::pull('saleImage'); if (empty($images)) { \Log::info('从缓存中没有获取到图片', []); exit; } foreach (json_decode($images, true) as $image) { $url = "https://pn-activity.oss-cn-shenzhen.aliyuncs.com/market/" . $image; $dingdingUrl = config('app.dingBrandSale'); $dingdingParam = [ 'msgtype' => 'markdown', 'markdown' => [ 'title' => '品类销售占比', 'text' => "![screenshot]({$url})" ], 'at' => [ 'atMobiles' => [''], 'isAtAll' => false, ] ]; $result3 = Curl::curl($dingdingUrl, json_encode($dingdingParam), true, true, true); \Log::info('测试发送图片' . $image, $result3); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Run the database seeds.
public function run() { //创建用户组 DB::table('shop_categories')->insert( array( array( 'pid' => '28', 'name' => '衣物', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '28', 'name' => '鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '28', 'name' => '帽', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '28', 'name' => '袜', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '28', 'name' => '特殊鞋帽', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '28', 'name' => '婴儿', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '36', 'name' => '含酒精的饮料', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '68', 'name' => '羽绒服装', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '68', 'name' => '裤子', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '68', 'name' => '童装', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '68', 'name' => '内衣', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '68', 'name' => '睡衣', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '68', 'name' => '皮衣', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '68', 'name' => '衬衣', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '69', 'name' => '雨鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '69', 'name' => '运动鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '69', 'name' => '凉鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '69', 'name' => '拖鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '69', 'name' => '运动鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '69', 'name' => '足球鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '69', 'name' => '靴', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '70', 'name' => '帽', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '70', 'name' => '风帽', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '71', 'name' => '短袜', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '71', 'name' => '吊袜带', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '72', 'name' => '滑雪靴', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '72', 'name' => '体操鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '72', 'name' => '爬山鞋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '73', 'name' => '婴儿全套衣', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '73', 'name' => '婴儿睡袋', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '葡萄酒', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '果酒', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '米酒', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '黄酒', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '清酒', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '料酒', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '烧酒', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '鸡尾酒', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '74', 'name' => '白兰地', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), array( 'pid' => '3', 'name' => '其他', 'slug'=> '', 'thumb'=>'', 'description' => '', 'level' => '0', 'sorts' => '100', 'status' => '1', 'created_at' => '2015-01-15 10:10:10', 'updated_at' => '2015-01-15 10:10:10', ), ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className = __CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.7572934", "0.75279754", "0.72702134", "0.72696835", "0.72606635", "0.72133243", "0.72126555", "0.71307015", "0.71276915", "0.71276915", "0.71013916", "0.71013916", "0.7101271", "0.707343", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search($pageSize = false) { $criteria = new \CDbCriteria(); $criteria->compare('t.id', $this->id); $criteria->compare('t.subject', $this->subject, true); $criteria->compare('t.to', $this->to, true); $criteria->compare('t.body', $this->body, true); $criteria->compare('t.type', $this->type); $criteria->compare('t.errors', $this->errors); $criteria->compare('t.last_attempt', $this->last_attempt); $criteria->compare('t.status', $this->status); $criteria->compare('t.last_error', $this->last_error, true); return new \CActiveDataProvider($this, array( 'criteria' => $criteria, 'pagination' => array( 'pageSize' => $pageSize ? $pageSize : 50, ), 'sort' => array( 'defaultOrder' => array( 'id' => \CSort::SORT_DESC, ), ), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }", "public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function searchableBy()\n {\n return [];\n }", "public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}", "function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }", "public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }", "public function filters(Model $model): array\n {\n return [];\n }", "public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function findAll()\n {\n return $this->driver->findAll($this->model);\n }", "public function getAllFilters();", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getModels()\n {\n return $this->_models;\n }", "public function getSearchFields();", "public function all()\n {\n return $this->model->get();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\n }", "public function listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\n\t}", "public function index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getReturnModels(){\r\n return array_values($this->models);\r\n }", "public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }", "public function models();", "public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}", "public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}", "public function all()\n {\n return $this->model->get();\n }", "public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function findBy(array $filters);", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }", "abstract protected function getSearchModelName(): string;", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getFilters();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "public function getSearch();", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }", "public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }", "public function getCriteria();", "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "public function findByModelName($model_name);", "abstract public function getFieldsSearchable();", "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "public function getListQuery();", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }", "public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}", "public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function queryset(){\n return $this->_get_queryset();\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getSearchCriterias()\n {\n return $this->_searchCriterias;\n }", "private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }", "public function findAllAction();", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }", "public function getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}" ]
[ "0.6745192", "0.6745192", "0.6607936", "0.6480248", "0.6380478", "0.6346251", "0.6309924", "0.6302481", "0.62549895", "0.62511677", "0.62511677", "0.6111791", "0.60769993", "0.60728127", "0.60465515", "0.60351735", "0.6033834", "0.601554", "0.5982608", "0.59806865", "0.5979308", "0.5970091", "0.59315383", "0.5928182", "0.59239197", "0.5891605", "0.588925", "0.5849558", "0.58478904", "0.58265656", "0.5818011", "0.5813345", "0.5808009", "0.5790819", "0.57766616", "0.57694167", "0.5765023", "0.57642305", "0.57522315", "0.5740738", "0.5738047", "0.5727545", "0.5724201", "0.5723084", "0.57225823", "0.5721401", "0.5718913", "0.5714439", "0.5712011", "0.5707315", "0.5694636", "0.5680138", "0.56711453", "0.5670484", "0.56703377", "0.56703377", "0.56703377", "0.5669673", "0.56673825", "0.56659126", "0.5656451", "0.5651109", "0.56498116", "0.564325", "0.5635642", "0.5633513", "0.56310356", "0.56235486", "0.56176996", "0.5612909", "0.560956", "0.5595046", "0.5579938", "0.557241", "0.5556209", "0.5550101", "0.55487776", "0.5547998", "0.5547349", "0.5535324", "0.5534813", "0.55342954", "0.55319065", "0.5525128", "0.55199116", "0.5518253", "0.55144674", "0.5509604", "0.55057275", "0.550087", "0.550019", "0.54966915", "0.54966915", "0.54966915", "0.54954666", "0.54937917", "0.5492664", "0.5492298", "0.5490264", "0.5489261", "0.54850507" ]
0.0
-1
Get columns configs to specified page for grid or detail view
public function genColumns($page) { $columns = array(); switch ($page) { case 'index': $columns = array( array( 'name' => 'id', 'htmlOptions' => array('class' => 'span1 center', ), ), 'subject', array( 'name' => 'to', 'type' => 'html', 'value' => function (EmailQueue $data) { return \CHtml::tag('pre', array(), print_r(jd($data->to), true)); }, ), array( 'name' => 'type', 'value' => function (EmailQueue $data) { return $data->getType(); }, 'filter' => self::getTypes(), 'htmlOptions' => array('class' => 'span1 center', ), ), array( 'name' => 'errors', 'htmlOptions' => array('class' => 'span1 center', ), ), array( 'name' => 'status', 'value' => function (EmailQueue $data) { return $data->getStatus(); }, 'filter' => self::getStatuses(), 'htmlOptions' => array('class' => 'span1 center', ), ), array( 'name' => 'last_error', 'htmlOptions' => array('class' => 'span1 center', ), ), array( 'class' => 'bootstrap.widgets.TbButtonColumn', 'template' => '{view}', ), ); break; case 'view': $columns = array( 'id', 'subject', array( 'name' => 'to', 'type' => 'html', 'value' => \CHtml::tag('pre', array(), print_r(jd($this->to), true)), ), 'body:html', array( 'name' => 'type', 'value' => $this->getType(), ), 'errors', array( 'name' => 'last_attempt', 'value' => format()->formatDatetime($this->last_attempt), ), array( 'name' => 'status', 'value' => $this->getStatus(), ), 'last_error', ); break; default: break; } return $columns; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getColumns($page)\n {\n switch ($page) {\n case 'index':\n return [\n ['class' => 'yii\\grid\\SerialColumn'],\n // 'id',\n 'label',\n // 'summary:ntext',\n // 'directions:ntext',\n 'published:boolean',\n 'position',\n ['class' => 'yii\\grid\\ActionColumn'],\n ];\n break;\n case 'view':\n return [\n 'id',\n 'label',\n [\n 'attribute' => 'summary',\n 'format' => 'html',\n ],\n [\n 'attribute' => 'directions',\n 'format' => 'html',\n ],\n 'published:boolean',\n 'position',\n ];\n break;\n }\n\n return [];\n }", "static function get_column_info( $page = '' ) {\n\n\t\t$columns = array(\n\t\t\t'posts' => array(\n\t\t\t\t'author' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-author',\n\t\t\t\t\t\t'title' => _x( 'Author', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'categories' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-categories',\n\t\t\t\t\t\t'title' => _x( 'Categories', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'tags' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-tags',\n\t\t\t\t\t\t'title' => _x( 'Tags', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'comments' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-comments',\n\t\t\t\t\t\t'title' => _x( 'Comments', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-date',\n\t\t\t\t\t\t'title' => _x( 'Date', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\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'pages' => array(\n\t\t\t\t'author' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-pages-author',\n\t\t\t\t\t\t'title' => _x( 'Author', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'comments' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-pages-comments',\n\t\t\t\t\t\t'title' => _x( 'Comments', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-pages-date',\n\t\t\t\t\t\t'title' => _x( 'Date', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0\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'media' => array(\n\t\t\t\t'icon' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-icon',\n\t\t\t\t\t\t'title' => _x( 'File icon / thumbnail preview', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'author' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-author',\n\t\t\t\t\t\t'title' => _x( 'Author', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'parent' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-parent',\n\t\t\t\t\t\t'title' => _x( 'Uploaded to', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'comments' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-comments',\n\t\t\t\t\t\t'title' => _x( 'Comments', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-date',\n\t\t\t\t\t\t'title' => _x( 'Date', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\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'users' => array(\n\t\t\t\t'username' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-username',\n\t\t\t\t\t\t'help' => __( 'The user\\'s username and avatar', 'clientside' ),\n\t\t\t\t\t\t'title' => __( 'Username' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'name' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-name',\n\t\t\t\t\t\t'title' => _x( 'Name', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'help' => __( 'The user\\'s full name', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'email' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-email',\n\t\t\t\t\t\t'title' => _x( 'E-mail', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'role' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-role',\n\t\t\t\t\t\t'title' => _x( 'Role', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'posts' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-posts',\n\t\t\t\t\t\t'title' => _x( 'Posts', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'help' => __( 'The user\\'s post count', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\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// WooCommerce columns\n\t\tif ( class_exists( 'WooCommerce' ) ) {\n\t\t\t$columns['woocommerce-products'] = array(\n\t\t\t\t'thumb' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-thumb',\n\t\t\t\t\t\t'title' => __( 'Product image', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'name' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-name',\n\t\t\t\t\t\t'title' => __( 'Product title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'sku' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-sku',\n\t\t\t\t\t\t'title' => __( 'SKU', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'is_in_stock' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-is_in_stock',\n\t\t\t\t\t\t'title' => __( 'Stock', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'price' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-price',\n\t\t\t\t\t\t'title' => __( 'Price', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'product_cat' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-product_cat',\n\t\t\t\t\t\t'title' => __( 'Categories', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'product_tag' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-product_tag',\n\t\t\t\t\t\t'title' => __( 'Tags', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'featured' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-featured',\n\t\t\t\t\t\t'title' => __( 'Featured product', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'product_type' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-product_type',\n\t\t\t\t\t\t'title' => __( 'Product type', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-date',\n\t\t\t\t\t\t'title' => __( 'Date', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['woocommerce-orders'] = array(\n\t\t\t\t'order_status' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_status',\n\t\t\t\t\t\t'title' => __( 'Order status', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_title' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_title',\n\t\t\t\t\t\t'title' => __( 'Order', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_items' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_items',\n\t\t\t\t\t\t'title' => __( 'Order items', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'billing_address' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-billing_address',\n\t\t\t\t\t\t'title' => __( 'Billing address', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'shipping_address' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-shipping_address',\n\t\t\t\t\t\t'title' => __( 'Shipping address', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'customer_message' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-customer_message',\n\t\t\t\t\t\t'title' => __( 'Customer message', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_notes' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_notes',\n\t\t\t\t\t\t'title' => __( 'Order notes', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_date',\n\t\t\t\t\t\t'title' => __( 'Order date', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_total' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_total',\n\t\t\t\t\t\t'title' => __( 'Order total', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_actions' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_actions',\n\t\t\t\t\t\t'title' => __( 'Order actions', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['woocommerce-coupons'] = array(\n\t\t\t\t'coupon_code' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-coupon_code',\n\t\t\t\t\t\t'title' => __( 'Coupon code', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'type' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-type',\n\t\t\t\t\t\t'title' => __( 'Coupon type', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'amount' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-amount',\n\t\t\t\t\t\t'title' => __( 'Coupon value', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-description',\n\t\t\t\t\t\t'title' => __( 'Description', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'products' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-products',\n\t\t\t\t\t\t'title' => __( 'Product IDs', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'usage' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-usage',\n\t\t\t\t\t\t'title' => __( 'Usage / Limit', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'expiry_date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-expiry_date',\n\t\t\t\t\t\t'title' => __( 'Expiry date', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\t// Yoast columns\n\t\tif ( defined( 'WPSEO_FILE' ) ) {\n\n\t\t\t// Yoast: Posts\n\t\t\t$columns['posts']['wpseo-links'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-links',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Internal links', 'clientside' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-score'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-score',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'SEO score', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-score-readability'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-score-readability',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Readability score', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-title'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-title',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'SEO Title', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-metadesc'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-metadesc',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Meta Desc.', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-focuskw'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-focuskw',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Focus KW', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-links'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-links',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Internal links', 'clientside' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Yoast: Pages\n\t\t\t$columns['pages']['wpseo-links'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-links',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Internal links', 'clientside' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-score'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-score',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'SEO score', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-score-readability'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-score-readability',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Readability score', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-title'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-title',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'SEO Title', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-metadesc'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-metadesc',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Meta Desc.', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-focuskw'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-focuskw',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Focus KW', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-links'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-links',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Internal links', 'clientside' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\n\t\t}\n\n\t\t// Return\n\t\tif ( $page ) {\n\t\t\treturn isset( $columns[ $page ] ) ? $columns[ $page ] : array();\n\t\t}\n\t\treturn $columns;\n\n\t}", "public function genColumns($page)\n\t{\n\t\t$columns = array();\n\t\tswitch ($page) {\n\t\t\tcase 'index':\n\t\t\t\t$columns = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'id',\n\t\t\t\t\t\t'htmlOptions' => array('class' => 'span1 center', ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'category',\n\t\t\t\t\t\t'htmlOptions' => array('class' => 'span2 center', ),\n\t\t\t\t\t),\n\t\t\t\t\t'message',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'class' => 'bootstrap.widgets.TbButtonColumn',\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'view':\n\t\t\t\t$columns = array(\n\t\t\t\t\t'id',\n\t\t\t\t\t'category',\n\t\t\t\t\t'message',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $columns;\n\t}", "public function getColumnConfig();", "function gssettings_settings_layout_columns( $columns, $screen ) {\n global $_gssettings_settings_pagehook;\n if ( $screen == $_gssettings_settings_pagehook ) {\n $columns[$_gssettings_settings_pagehook] = 1;\n }\n return $columns;\n }", "public static function columns() {\n\n $controller = new page();\n \n $columns['id'] = new \\Gino\\IntegerField(array(\n\t\t\t'name'=>'id',\n\t\t\t'primary_key'=>true,\n\t\t\t'auto_increment'=>true,\n \t'max_lenght'=>11,\n\t\t));\n $columns['category_id'] = new \\Gino\\ForeignKeyField(array(\n 'name'=>'category_id',\n 'label'=>_(\"Categoria\"),\n 'required'=>false,\n \t'foreign'=>'\\Gino\\App\\Page\\PageCategory',\n \t'foreign_order'=>'name ASC',\n \t'add_related' => true,\n \t'add_related_url' => $controller->linkAdmin(array(), \"block=ctg&insert=1\"),\n ));\n\t\t$columns['author'] = new \\Gino\\ForeignKeyField(array(\n\t\t\t'name' => 'author',\n\t\t\t'label' => _(\"Autore\"),\n\t\t\t'required' => true,\n\t\t\t'foreign' => '\\Gino\\App\\Auth\\User',\n\t\t\t'foreign_order' => 'lastname ASC, firstname ASC',\n\t\t\t'add_related' => false,\n\t\t));\n\t\t$columns['creation_date'] = new \\Gino\\DatetimeField(array(\n\t\t\t'name' => 'creation_date',\n\t\t\t'label' => _('Inserimento'),\n\t\t\t'required' => true,\n\t\t\t'auto_now' => false,\n\t\t\t'auto_now_add' => true,\n\t\t));\n\t\t$columns['last_edit_date'] = new \\Gino\\DatetimeField(array(\n\t\t\t'name'=>'last_edit_date',\n\t\t\t'label'=>_('Ultima modifica'),\n\t\t\t'required'=>true,\n\t\t\t'auto_now'=>true,\n\t\t\t'auto_now_add'=>true,\n\t\t));\n\t\t$columns['title'] = new \\Gino\\CharField(array(\n\t\t\t'name'=>'title',\n\t\t\t'label'=>_(\"Titolo\"),\n\t\t\t'required'=>true,\n\t\t\t'max_lenght'=>200,\n\t\t));\n $columns['slug'] = new \\Gino\\SlugField(array(\n 'name'=>'slug',\n \t'unique_key'=>true,\n 'label'=>array(_(\"Slug\"), _('utilizzato per creare un permalink alla risorsa')),\n 'required'=>true,\n \t'max_lenght'=>200,\n \t'autofill'=>'title',\n ));\n $columns['image'] = new \\Gino\\ImageField(array(\n \t'name'=>'image',\n \t'label'=>_(\"Immagine\"),\n \t'max_lenght'=>100,\n \t'extensions'=>self::$_extension_img,\n \t'resize'=>false,\n \t'path'=>null,\n \t'add_path'=>null\n ));\n $columns['url_image'] = new \\Gino\\CharField(array(\n \t'name'=>'url_image',\n \t'label'=>array(_(\"Collegamento sull'immagine\"), _(\"indirizzo URL\")),\n \t'required'=>false,\n \t'max_lenght'=>200,\n ));\n $columns['text'] = new \\Gino\\TextField(array(\n \t'name' => 'text',\n \t'label' => _(\"Testo\"),\n \t'required' => true\n ));\n $columns['tags'] = new \\Gino\\TagField(array(\n \t'name' => 'tags',\n \t'label' => array(_('Tag'), _(\"elenco separato da virgola\")),\n \t'required' => false,\n \t'max_lenght' => 255,\n \t'model_controller_class' => 'page',\n \t'model_controller_instance' => 0,\n ));\n $columns['enable_comments'] = new \\Gino\\BooleanField(array(\n \t'name'=>'enable_comments',\n \t'label'=>_('Abilita commenti'),\n \t'required'=>true,\n \t'default' => 0\n ));\n\t\t$columns['published'] = new \\Gino\\BooleanField(array(\n 'name'=>'published',\n 'label'=>_('Pubblicato'),\n 'required'=>true,\n \t'default' => 0\n ));\n\t\t$columns['social'] = new \\Gino\\BooleanField(array(\n 'name'=>'social',\n 'label'=>_('Condivisioni social'),\n 'required'=>true,\n \t'default' => 0\n ));\n $columns['private'] = new \\Gino\\BooleanField(array(\n \t'name'=>'private',\n \t'label'=>array(_(\"Privata\"), _(\"pagina visualizzabile da utenti con il relativo permesso\")),\n \t'required'=>true,\n \t'default' => 0\n ));\n /*\n $ids = \\Gino\\App\\Auth\\User::getUsersWithDefinedPermissions(array('can_view_private'), $controller);\n if(count($ids)) {\n \t$where_mf = \"active='1' AND id IN (\".implode(',', $ids).\")\";\n }\n else {\n \t$where_mf = \"id=NULL\";\n }*/\n \n $columns['users'] = new \\Gino\\MulticheckField(array(\n \t'name' => 'users',\n \t'label' => _(\"Utenti che possono visualizzare la pagina\"),\n \t'max_lenght' => 255,\n \t'refmodel' => '\\Gino\\App\\Auth\\User',\n \t'refmodel_where' => \"active='1'\",\n \t'refmodel_order' => \"lastname ASC, firstname\",\n ));\n $columns['view_last_edit_date'] = new \\Gino\\BooleanField(array(\n \t'name' => 'view_last_edit_date',\n \t'label' => _(\"Visualizzare la data di aggiornamento della pagina\"),\n \t'required' => true,\n \t'default' => 0\n ));\n \n $ids = \\Gino\\App\\Auth\\User::getUsersWithDefinedPermissions(array('can_edit_single_page'), $controller);\n if(count($ids)) {\n \t$where_mf = \"active='1' AND id IN (\".implode(',', $ids).\")\";\n }\n else {\n \t$where_mf = \"id=NULL\";\n }\n \n $columns['users_edit'] = new \\Gino\\MulticheckField(array(\n \t'name' => 'users_edit',\n \t'label' => array(_(\"Utenti che possono editare la pagina\"), _(\"elenco degli utenti associati al permesso di redazione dei contenuti di singole pagine\")),\n \t'max_lenght' => 255,\n \t'refmodel' => '\\Gino\\App\\Auth\\User',\n \t'refmodel_where' => $where_mf,\n \t'refmodel_order' => \"lastname ASC, firstname\",\n ));\n $columns['read'] = new \\Gino\\IntegerField(array(\n \t'name'=>'read',\n \t'label'=>_('Visualizzazioni'),\n \t'required'=>true,\n \t'default'=>0,\n ));\n $columns['tpl_code'] = new \\Gino\\TextField(array(\n \t'name'=>'tpl_code',\n \t'label' => array(_(\"Template pagina intera\"), _(\"richiamato da URL (sovrascrive il template di default)\")),\n \t'required' => false,\n 'footnote' => page::explanationTemplate()\n ));\n $columns['box_tpl_code'] = new \\Gino\\TextField(array(\n \t'name'=>'box_tpl_code',\n \t'label' => array(_(\"Template box\"), _(\"richiamato nel template del layout (sovrascrive il template di default)\")),\n \t'required' => false\n ));\n\n return $columns;\n }", "function plugin_layout_columns($columns, $screen) {\r\n\t\tif ($screen == $this->page) {\r\n\t\t\t$columns[$this->page] = 2;\r\n\t\t}\r\n\t\treturn $columns;\r\n\t}", "private function getGridColumns()\n\t{\n\t\treturn array(\n\t\t\t// presentation_id is hidden so I don't have to provide a label\n\t\t\t'presentation_id' => array('field' => 'presentation_id', 'sortable' => true, 'hidden' => true),\n\t\t\t'session_id' => array('field' => 'session_id', 'sortable' => false, 'hidden' => true),\n\t\t\t'presentation_title' => array('field' => 'presentation_title', 'label' => 'Title', 'sortable' => true),\n\t\t\t'email' => array('field' => 'email', 'label' => 'User', 'sortable' => true, 'resource' => 'session', 'privilege' => 'save'),\n\t\t\t'session_title' => array('field' => 'session_title', 'label' => 'Session', 'sortable' => true)\n\t\t);\n\n\t}", "function getColumns(){\r\n return array(\r\n 'log_id'=>array('label'=>'日志id','class'=>'span-3','readonly'=>true), \r\n 'member_id'=>array('label'=>'用户','class'=>'span-3','type'=>'memberinfo'), \r\n 'mtime'=>array('label'=>'交易时间','class'=>'span-2','type'=>'time'), \r\n 'memo'=>array('label'=>'业务摘要','class'=>'span-3'), \r\n 'import_money'=>array('label'=>'存入金额','class'=>'span-3','type'=>'import_money'), \r\n 'explode_money'=>array('label'=>'支出金额','class'=>'span-3','type'=>'explode_money'), \r\n 'member_advance'=>array('label'=>'当前余额','class'=>'span-3'), \r\n 'paymethod'=>array('label'=>'支付方式','class'=>'span-3'), \r\n 'payment_id'=>array('label'=>'支付单号','class'=>'span-3'), \r\n 'order_id'=>array('label'=>'订单号','class'=>'span-3'), \r\n 'message'=>array('label'=>'管理备注','class'=>'span-3'), \r\n 'money'=>array('label'=>'出入金额','class'=>'span-3','readonly'=>true), \r\n 'shop_advance'=>array('label'=>'商店余额','class'=>'span-3','readonly'=>true), \r\n );\r\n }", "public function getColumns(){\n $url = $this->urlWrapper() . URLResources::COLUMN;\n return $this->makeRequest($url, \"GET\", 2);\n }", "public static function getColsSetting(){\n\t\t$colGrid = array('1', '2', '3', '4', '5', '6');\n\t\tforeach($colGrid as $value){\n\t\t\t$data[$value] = $value;\n\t\t}\n\t\treturn $data;\n\t}", "public static function getColumns()\n {\n return array('title', 'bindingId', 'minYear', 'maxYear',\n 'preciseDate', 'placePublished', 'publisher', 'printVersion',\n 'firstPage', 'lastPage');\n }", "public function getGridColumns()\n {\n return [\n 'id' => [\n 'attribute' => 'id',\n ],\n 'name' => [\n 'attribute' => 'name',\n ],\n 'surname' => [\n 'attribute' => 'surname',\n ],\n [\n 'attribute' => 'image_name',\n ],\n [\n 'attribute' => 'image_md5',\n ],\n [\n 'attribute' => 'image_extension',\n ],\n [\n 'filter' => false,\n 'format' => 'raw',\n 'header' => \\yii::t('execut/books', 'Preview'),\n 'value' => $this->getValueCallback(),\n ],\n [\n 'attribute' => 'image_mime_type',\n ],\n [\n 'attribute' => 'main_book_id',\n 'value' => 'mainBook.name',\n 'filter' => Select2::widget([\n 'model' => $this,\n 'attribute' => 'main_book_id',\n 'bsVersion' => 3,\n 'theme' => 'bootstrap',\n 'language' => 'ru',\n 'initValueText' => $this->mainBook ? $this->mainBook->name : null,\n 'pluginOptions' => [\n 'allowClear' => true,\n 'ajax' => [\n 'dataType' => 'json',\n 'url' => Url::to(['/booksNative/books']),\n 'data' =>\n new \\yii\\web\\JsExpression('function(params) {\n return {\n \"Book[name]\": params.term,\n page: params.page\n };\n }'),\n ],\n ],\n 'options' => [\n 'placeholder' => \\yii::t('execut/books', 'Main Book'),\n ],\n 'showToggleAll' => false,\n ]),\n ],\n 'actions' => [\n 'class' => ActionColumn::class,\n 'buttons' => [\n 'view' => function () {\n return false;\n },\n ],\n ]\n ];\n }", "function get_columns() {\r\n return $columns= array(\r\n 'col_created_on'=>__('Date'),\r\n 'col_type'=>__('Type'),\r\n 'col_ip'=>__('IP'),\r\n 'col_os'=>__('Operating System'),\r\n 'col_browser'=>__('Browser'),\r\n 'col_location'=>__('Location'),\r\n 'col_actions'=>__('Actions')\r\n );\r\n }", "private function getGridColumns()\n\t{\n\t\treturn array(\n\t\t\t'submission_id' => array('field' => 'submission_id', 'sortable' => true, 'hidden' => true),\n\t\t\t'title' => array('field' => 'title', 'label' => 'Title', 'sortable' => true),\n\t\t\t'date' => array('field' => 'date', 'label' => 'Received', 'sortable' => true, 'modifier' => 'formatDate'),\n\t\t\t'organisation' => array('field' => 'organisation', 'label' => 'Organisation', 'sortable' => true),\n\t\t\t'fname' => array('field' => 'fname', 'label' => 'Fname', 'sortable' => true),\n\t\t\t'lname' => array('field' => 'lname', 'label' => 'Lname', 'sortable' => true),\n\t\t\t'email' => array('field' => 'email', 'label' => 'Email', 'sortable' => true),\n\t\t\t'file_id' => array('field' => 'file_id', 'label' => 'File', 'sortable' => true),\n\t\t\t'status' => array('field' => 'status', 'label' => 'Status', 'sortable' => true),\n\t\t\t'session_title' => array('field' => 'session_title', 'label' => 'Session', 'sortable' => true),\n\t\t\t'review_first' => array('field' => 'review_first', 'label' => 'Review first', 'sortable' => true),\n\t\t\t'review_last' => array('field' => 'review_last', 'label' => 'Review last', 'sortable' => true),\n\t\t\t'conference_id' => array('field' => 'conference_id', 'label' => 'Conference id', 'sortable' => true),\n\t\t\t'review_count' => array('field' => 'review_count', 'label' => 'Reviews', 'sortable' => true)\n\t\t);\n\n\t}", "public function get_columns() {\n\n\t\t\t$columns = [];\n\n\t\t\tif ( $this->bulk_actions_enabled ) {\n\t\t\t\tif ( ! empty( $this->wpda_list_columns->get_table_primary_key() ) ) {\n\t\t\t\t\t// Tables has primary key: bulk actions allowed!\n\t\t\t\t\t// Primary key is used to ensure uniqueness.\n\t\t\t\t\t$actions = $this->get_bulk_actions();\n\t\t\t\t\tif ( is_array( $actions ) && 0 < sizeof( $actions ) ) {\n\t\t\t\t\t\t$columns = [ 'cb' => '<input type=\"checkbox\" />' ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$columnlist = $this->wpda_list_columns->get_table_column_headers();\n\t\t\tforeach ( $columnlist as $key => $value ) {\n\t\t\t\t$columns[ $key ] = $value;\n\t\t\t\t// Check for alternative column header.\n\t\t\t\tif ( isset( $this->column_headers[ $key ] ) ) {\n\t\t\t\t\t// Alternative header found: use it.\n\t\t\t\t\t$columns[ $key ] = $this->column_headers[ $key ];\n\t\t\t\t} else {\n\t\t\t\t\t// Default behaviour: get column header from generated label.\n\t\t\t\t\t$columns[ $key ] = $this->wpda_list_columns->get_column_label( $key );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isset( $this->wpda_table_settings->hyperlinks ) ) {\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ( $this->wpda_table_settings->hyperlinks as $hyperlink ) {\n\t\t\t\t\tif ( isset( $hyperlink->hyperlink_list ) && true === $hyperlink->hyperlink_list ) {\n\t\t\t\t\t\t$skip_column = false;\n\n\t\t\t\t\t\tif ( null !== $this->wpda_project_table_settings ) {\n\t\t\t\t\t\t\t$hyperlink_label = $hyperlink->hyperlink_label;\n\n\t\t\t\t\t\t\tif ( ! property_exists( $this, 'is_child') ) {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tisset( $this->wpda_project_table_settings->hyperlinks_parent->$hyperlink_label ) &&\n\t\t\t\t\t\t\t\t\t! $this->wpda_project_table_settings->hyperlinks_parent->$hyperlink_label\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t$skip_column = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tisset( $this->wpda_project_table_settings->hyperlinks_child->$hyperlink_label ) &&\n\t\t\t\t\t\t\t\t\t! $this->wpda_project_table_settings->hyperlinks_child->$hyperlink_label\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t$skip_column = true;\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\tif ( ! $skip_column ) {\n\t\t\t\t\t\t\t$hyperlink_label = isset( $hyperlink->hyperlink_label ) ? $hyperlink->hyperlink_label : '';\n\t\t\t\t\t\t\t$columns[\"wpda_hyperlink_{$i}\"] = $hyperlink_label; // Add hyperlink label\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $columns;\n\n\t\t}", "public function get_columns() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_columns();\n\n }", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function get_columns() {\n \t\t$columns = array(\n \t\t\t'blogname' => __( 'Site Name' ),\n \t\t\t'blog_path' => __( 'Path' ),\n \t\t\t'connected' => __( 'Jetpack Connected' ),\n 'jetpackemail' => __('Jetpack Master User E-mail'),\n 'lastpost' => __( 'Last Post Date' ),\n \t\t);\n\n \t\treturn $columns;\n \t}", "public function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'title' => __( 'Name' ),\n\t\t\t'client_id' => __( 'Client ID' ),\n\t\t\t//'client_secret' => __( 'Redirect URI' )\n\t\t);\n\t}", "function get_columns(){\n $columns = array(\n 'title' => 'Contact Name',\n 'date_created' => 'Date Created',\n 'contact_name' => 'Created By'\n );\n return $columns;\n\t}", "public function getConfigPageFields($type) {\n $result = [];\n if (!empty($type)) {\n // Get custom fields from config page.\n $base_fields = $this->entityFieldManager->getBaseFieldDefinitions('config_pages');;\n $fields = $this->entityFieldManager->getFieldDefinitions('config_pages', $type);\n $custom_fields = array_diff_key($fields, $base_fields);\n\n // Build select options.\n foreach ($custom_fields as $id => $field_config) {\n $field_type = $field_config->getType();\n if (in_array($field_type, $this->allowedFieldTypes)) {\n $result[$type . '|' . $id . '|' . $field_type] = $field_config->getLabel() . ' (' . $id . ')';\n }\n }\n }\n\n return $result;\n }", "public function get_columns() {\n\t\t$columns = [\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'uri' => esc_html__( 'URI', 'rank-math' ),\n\t\t\t'referer' => esc_html__( 'Referer', 'rank-math' ),\n\t\t\t'user_agent' => esc_html__( 'User-Agent', 'rank-math' ),\n\t\t\t'times_accessed' => esc_html__( 'Hits', 'rank-math' ),\n\t\t\t'accessed' => esc_html__( 'Access Time', 'rank-math' ),\n\t\t];\n\n\t\tif ( 'simple' === Helper::get_settings( 'general.404_monitor_mode' ) ) {\n\t\t\tunset( $columns['referer'], $columns['user_agent'] );\n\t\t\treturn $columns;\n\t\t}\n\n\t\tunset( $columns['times_accessed'] );\n\t\treturn $columns;\n\t}", "function get_columns() {\n return $columns= array(\n 'col_what'=>__('What','wpwt'),\n 'col_user'=>__('User Name','wpwt'),\n 'col_groupName'=>__('Group Name','wpwt'),\n 'col_application'=>__('Application','wpwt')\n );\n }", "static function getColumns()\n {\n }", "function get_columns( ) {\r\n\t\treturn self::mla_manage_columns_filter();\r\n\t}", "public function getColumns()\n {\n return array_flip($this->model->getStream()->view_options);\n }", "protected function getColumns()\n {\n $column = 'A';\n $columns = array();\n if ($this->settings['compare_type'] == self::COMPARE_TYPE_BY_BOX) {\n $columns[$column] = array('title' => 'Box number', 'field' => 'boxNumber_1');\n } elseif ($this->settings['compare_type'] == self::COMPARE_TYPE_BY_TIMECODE) {\n $columns[$column] = array('title' => 'Timecode', 'field' => 'startTime_1');\n $columns[++$column] = array('title' => 'Box number (' . $this->settings['column_1'] . ')', 'field' => 'boxNumber_1');\n $columns[++$column] = array('title' => 'Box number (' . $this->settings['column_2'] . ')', 'field' => 'boxNumber_2');\n }\n \n $columns[++$column] = array('title' => 'Differences area', 'field' => 'diffAreaLabel');\n $columns[++$column] = array('title' => $this->settings['column_1'], 'field' => 'column_1');\n $columns[++$column] = array('title' => $this->settings['column_2'], 'field' => 'column_2');\n \n return $columns;\n }", "function extamus_screen_layout_columns($columns) {\n $columns['dashboard'] = 1;\n return $columns;\n }", "function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'cb'\t\t=> '<input type=\"checkbox\" />', //Render a checkbox instead of text\n\t\t\t'title'\t\t=> 'Title',\n\t\t\t'rating'\t=> 'Rating',\n\t\t\t'director'\t=> 'Director'\n\t\t);\n\t}", "function get_display_columns() {\n return $columns = array('id' => __('id', 'kkl-ligatool'), 'name' => __('name', 'kkl-ligatool'), 'club_id' => __('club', 'kkl-ligatool'), 'season_id' => __('season', 'kkl-ligatool'), 'short_name' => __('url_code', 'kkl-ligatool'),);\n }", "public function getPagerSettings();", "public function columnMap()\n {\n return [\n 'imageid' => 'imageid',\n 'galleryid' => 'galleryid',\n 'visible' => 'visible'\n ];\n }", "function bpi_page_columns($columns) {\n\tunset($columns['author']); \n\tunset($columns['date']); \n\tunset($columns['comments']); \t\n\t$columns['template'] = 'Template';\n\t$columns['last_updated'] = 'Last Updated'; \t \n return $columns;\n}", "function get_columns()\n {\n $columns = array(\n\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'id' => __('# ID'),\n 'user' => __('Requested From'),\n //'requested_url' => __('Requested URI'),\n 'Ip' => __('From IP'),\n 'connected_at' => __('Requested At'),\n // 'msg' => __('Message'),\n 'on_status' => __('On'), \n 'action_trig' => __('Details')\n );\n\n return $columns;\n }", "public function getGridColumn($columns=null) {\r\n\t\tif($columns !== null) {\r\n\t\t\tforeach($columns as $val) {\r\n\t\t\t\t/*\r\n\t\t\t\tif(trim($val) == 'enabled') {\r\n\t\t\t\t\t$this->defaultColumns[] = array(\r\n\t\t\t\t\t\t'name' => 'enabled',\r\n\t\t\t\t\t\t'value' => '$data->enabled == 1? \"Ya\": \"Tidak\"',\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\t*/\r\n\t\t\t\t$this->defaultColumns[] = $val;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t//$this->defaultColumns[] = 'book_id';\r\n\t\t\t$this->defaultColumns[] = 'publish';\r\n\t\t\t$this->defaultColumns[] = 'publisher_id';\r\n\t\t\t$this->defaultColumns[] = 'isbn';\r\n\t\t\t$this->defaultColumns[] = 'title';\r\n\t\t\t$this->defaultColumns[] = 'description';\r\n\t\t\t$this->defaultColumns[] = 'cover';\r\n\t\t\t$this->defaultColumns[] = 'edition';\r\n\t\t\t$this->defaultColumns[] = 'publish_city';\r\n\t\t\t$this->defaultColumns[] = 'publish_year';\r\n\t\t\t$this->defaultColumns[] = 'paging';\r\n\t\t\t$this->defaultColumns[] = 'sizes';\r\n\t\t\t$this->defaultColumns[] = 'creation_date';\r\n\t\t\t$this->defaultColumns[] = 'creation_id';\r\n\t\t\t$this->defaultColumns[] = 'modified_date';\r\n\t\t\t$this->defaultColumns[] = 'modified_id';\r\n\t\t}\r\n\r\n\t\treturn $this->defaultColumns;\r\n\t}", "public function getColumns()\n {\n $input = Request::all();\n $validator = Validator::make($input, ['board_id' => 'required']);\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n $pbcolumn = $this->service->getFilteredColumns($input['board_id'], $input);\n $limit = isset($input['limit']) ? $input['limit'] : config('jp.pagination_limit');\n\n if (!$limit) {\n $pbcolumns = $pbcolumn->get();\n\n return ApiResponse::success(\n $this->response->collection($pbcolumns, new ProductionBoardColumnTransformer)\n );\n }\n $pbcolumns = $pbcolumn->paginate($limit);\n\n return ApiResponse::success(\n $this->response->paginatedCollection($pbcolumns, new ProductionBoardColumnTransformer)\n );\n }", "function wp_nav_menu_manage_columns()\n {\n }", "public static function columns()\n {\n return filterColumnByRole([\n 'plot_ref' => trans('system.code'),\n 'plot_name' => trans_title('plots'),\n 'user.name' => trans_title('users'),\n 'city.city_name' => trans_title('cities'),\n 'plot_percent_cultivated_land' => sections('plots.cultivated_land'),\n 'plot_real_area' => sections('plots.real_area'),\n 'plot_start_date' => sections('plots.start_date'),\n 'plot_active' => trans('persona.contact.active'),\n 'plot_green_cover' => sections('plots.green_cover'),\n 'plot_pond' => sections('plots.pond'),\n 'plot_road' => sections('plots.road'),\n ],\n $roleFilter = Credentials::isAdmin(),\n $newColumns = ['client.client_name' => trans_title('clients')],//Admits multiple arrays\n $addInPosition = 3\n );\n }", "public function getColumnsList(){\n return $this->_get(3);\n }", "public function paginate($perPage = null, $columns = ['*']);", "function get_columns()\n {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n// 'type' => 'Type',\n// 'name' => 'Name',\n 'tag' => 'Shortcode Name',\n 'kind' => 'Kind',\n 'description' => 'Description',\n 'example' => 'Example',\n 'code' => 'Code',\n 'created_datetime' => 'Created Datetime'\n );\n return $columns;\n }", "public function saveCustomColumns() {\n // get existing config\n $selectedColumns = $this->loadCustomColumns();\n\n // merge new selection for page type into existing variable\n $ctID = $this->post('ctID');\n $selectedColumns[$ctID] = $_REQUEST['selectedAttributes'];\n\n // save new configuration\n $pkg = Package::getByHandle('remo_composer_list');\n $pkg->saveConfig('SELECTED_COLUMNS', serialize($selectedColumns));\n\n die();\n }", "protected function _prepareColumns()\n {\n/*\n $this->addColumn('version_number', array(\n 'header' => Mage::helper('gri_cms')->__('Version #'),\n 'width' => 100,\n 'index' => 'version_number',\n 'type' => 'options',\n 'options' => Mage::helper('gri_cms')->getVersionsArray($this->getPage())\n ));\n*/\n $this->addColumn('label', array(\n 'header' => Mage::helper('gri_cms')->__('Version Label'),\n 'index' => 'label',\n 'type' => 'options',\n 'options' => $this->getCollection()\n ->getAsArray('label', 'label')\n ));\n\n $this->addColumn('owner', array(\n 'header' => Mage::helper('gri_cms')->__('Owner'),\n 'index' => 'username',\n 'type' => 'options',\n 'options' => $this->getCollection()->getUsersArray(false),\n 'width' => 250\n ));\n\n $this->addColumn('access_level', array(\n 'header' => Mage::helper('gri_cms')->__('Access Level'),\n 'index' => 'access_level',\n 'type' => 'options',\n 'width' => 100,\n 'options' => Mage::helper('gri_cms')->getVersionAccessLevels()\n ));\n\n $this->addColumn('revisions', array(\n 'header' => Mage::helper('gri_cms')->__('Revisions Qty'),\n 'index' => 'revisions_count',\n 'type' => 'number'\n ));\n\n $this->addColumn('created_at', array(\n 'width' => 150,\n 'header' => Mage::helper('gri_cms')->__('Created At'),\n 'index' => 'created_at',\n 'type' => 'datetime',\n ));\n\n return parent::_prepareColumns();\n }", "function woocommerce_edit_loop_shop_per_page( $cols ) {\n\tglobal $sh_option;\n\tif ( $sh_option['number-products-cate'] ) {\n\t\t$cols = $sh_option['number-products-cate'];\n\t} else {\n\t\t$cols = get_option( 'posts_per_page' );\n\t}\n\treturn $cols;\n}", "function get_columns() {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'customer' => __( 'Vendor', 'wp-erp-ac' ),\n 'company' => __( 'Company', 'wp-erp-ac' ),\n 'email' => __( 'Email', 'wp-erp-ac' ),\n 'phone' => __( 'Phone', 'wp-erp-ac' ),\n 'open' => __( 'Balance', 'wp-erp-ac' ),\n );\n\n return $columns;\n }", "abstract protected function columns();", "function on_screen_layout_columns($columns, $screen) { \r\n if ($screen == $this->hook) {\r\n $columns[$this->hook] = 2;\r\n }\r\n return $columns;\r\n }", "function get_columns(){\n\t\treturn array('id' => 'ID', 'orderinfo' => 'Customer Information', 'company' => 'Company', 'transaction_id' => 'Paypal Transaction ID', 'email' => 'Email Address', 'expiration' => 'Access Expiration', 'accesstourlkey' => 'Order Access URLs', 'webinarpass' => 'Webinars Passkey', 'total' => 'Order Total');\n\t}", "abstract public function listColumns();", "function get_columns() {\r\n\t\t$columns = [\r\n\t\t\t'cb' => '<input type=\"checkbox\" />',\r\n\t\t\t'name' => __( 'Name', 'ac' ),\r\n\t\t\t'address' => __( 'Address', 'ac' ),\r\n\t\t\t'city' => __( 'City', 'ac' )\r\n\t\t];\r\n\r\n\t\treturn $columns;\r\n\t}", "function overview_columns($columns) {\r\n\r\n $overview_columns = apply_filters('wpi_overview_columns', array(\r\n 'cb' => '',\r\n 'post_title' => __('Title', WPI),\r\n 'total' => __('Total Collected', WPI),\r\n 'user_email' => __('Recipient', WPI),\r\n 'post_modified' => __('Date', WPI),\r\n 'post_status' => __('Status', WPI),\r\n 'type' => __('Type', WPI),\r\n 'invoice_id' => __('Invoice ID', WPI)\r\n ));\r\n\r\n /* We need to grab the columns from the class itself, so we instantiate a new temp object */\r\n foreach ($overview_columns as $column => $title) {\r\n $columns[$column] = $title;\r\n }\r\n\r\n return $columns;\r\n }", "function get_columns()\n\t{\n\t\t$columns = [\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'name' => __('Name'),\n\t\t\t'address' => __('Address'),\n\t\t\t'email' => __('Email'),\n\t\t\t'mobileNo' => __('Mobile No'),\n\t\t\t'post' => __('Post Name'),\n\t\t\t'cv' => __('CV'),\n\t\t\t'stime' => __('Submission Date'),\n\t\t];\n\n\t\treturn $columns;\n\t}", "public function get_columns()\n\t{\n\t\t$columns = array();\n\t\t$class = $this->activeRecordClass;\n\t\t\n\t\tif ( ! empty( $this->bulkActions ) )\n\t\t{\n\t\t\t$columns[ 'cb' ] = '<input type=\"checkbox\" />';\n\t\t}\n\t\t\n\t\tif ( isset( $this->columns ) )\n\t\t{\n\t\t\t$columns = array_merge( $columns, $this->columns );\n\t\t\treturn $columns;\n\t\t}\n\t\t\n\t\tforeach( $class::$columns as $key => $column )\n\t\t{\n\t\t\t$slug = NULL;\n\t\t\t$title = NULL;\n\t\t\t\n\t\t\tif ( is_array( $column ) )\n\t\t\t{\n\t\t\t\t$slug = $class::$prefix . $key;\n\t\t\t\tif ( isset( $column[ 'title' ] ) and is_string( $column[ 'title' ] ) )\n\t\t\t\t{\n\t\t\t\t\t$title = $column[ 'title' ];\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( is_string( $column ) )\n\t\t\t{\n\t\t\t\t$slug = $class::$prefix . $column;\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! $title )\n\t\t\t{\n\t\t\t\t$title = str_replace( '_', ' ', $slug );\n\t\t\t\t$title = ucwords( $title );\n\t\t\t}\n\t\t\t\n\t\t\t$columns[ $slug ] = $title;\n\t\t}\n\t\t\n\t\treturn $columns;\n\t}", "public function shapeSpace_screen_layout_columns($columns) {\n\t\t$columns['dashboard'] = 1;\n\t\t$columns['dashboard'] = 2;\n\t\treturn $columns;\n\t}", "public function paginate($perPage = 15, $columns = ['*']) {\n }", "function get_columns(){\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'name' => 'Name',\n 'job' => 'Job',\n 'text' => 'Description',\n\t\t\t'job_en' => 'Job in english',\n 'text_en' => 'Description in english',\n\t\t\t'facebook' => 'Facebook Link',\n\t\t\t'linkedin' => 'Linkedin Link',\n\t\t\t'image' => 'Photo'\n\t\t\t\n );\n return $columns;\n }", "static function remove_page_columns( $page = 'posts', $original_columns = array() ) {\n\n\t\t// Skip if this tool is site-disabled (when network-disabled, it should load with network defaults)\n\t\tif ( ! Clientside_Options::get_saved_option( 'enable-admin-column-manager-tool' ) && ! Clientside_Options::get_saved_network_option( 'disable-admin-column-manager-tool' ) ) {\n\t\t\treturn $original_columns;\n\t\t}\n\n\t\t// All applicable columns\n\t\t$columns = self::get_column_info( $page );\n\t\tforeach ( $columns as $column_slug => $column_info ) {\n\n\t\t\t// Skip if this column is not in the current column set\n\t\t\tif ( ! isset( $original_columns[ $column_slug ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Determine wether this column should be enabled/disabled\n\t\t\t// If this tool is network disabled, use the network defaults\n\t\t\tif ( Clientside_Options::get_saved_network_option( 'disable-admin-column-manager-tool' ) ) {\n\t\t\t\t$column_is_enabled = Clientside_Options::get_saved_network_default_option( 'admin-column-manager-' . $page . '-' . $column_slug );\n\t\t\t}\n\t\t\t// Use the regular site options\n\t\t\telse {\n\t\t\t\t$column_is_enabled = Clientside_Options::get_saved_option( 'admin-column-manager-' . $page . '-' . $column_slug );\n\t\t\t}\n\n\t\t\t// Remove column if role-based option is set to false\n\t\t\tif ( ! $column_is_enabled ) {\n\t\t\t\tunset( $original_columns[ $column_slug ] );\n\t\t\t}\n\n\t\t}\n\n\t\t// Return\n\t\treturn $original_columns;\n\n\t}", "private function initColumns(){\n //Initialize our custom post type column management\n $this->cptWPDSCols = new Columns($this->wpdsPostType);\n \n //Remove our title\n $this->cptWPDSCols->removeColumn('title');\n \n //Add our content column\n $this->cptWPDSCols->addColumn('content', 'Content', 2);\n \n //Add our content column content\n $this->cptWPDSCols->addColumnPostContent('content');\n \n //Add our content column content\n $this->cptWPDSCols->addColumnOptionData('content', 'site_url');\n \n //Reposition column\n $this->cptWPDSCols->reorderColumn('content', 1);\n }", "public function paginate($perPage = 15, $columns = ['*'])\n {\n }", "public function getColumns() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"columns\", []);\n\t}", "public function paginate($no = 10, $columns = ['*']);", "public function getDataGridPluginConfig();", "function get_columns() {\n\t\t$columns = array(\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'id' => __( 'ID', 'mylisttable' ),\n\t\t\t'date' => __( 'Date', 'mylisttable' ),\n\t\t\t'uploader' => __( 'Uploader (#ID)', 'mylisttable' ),\n\t\t\t'uploader_group' => __( 'Uploader Group\t (#ID)', 'mylisttable' ),\n\t\t\t'site' => __( 'Site #ID', 'mylisttable' ),\n\t\t\t'assessment' => __( 'Assessment #ID', 'mylisttable' ),\n\t\t\t'assessment_result' => __( 'View', 'mylisttable' ),\n\t\t);\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t$columns['assessment_result_evaluation'] = __( 'Evaluate', 'mylisttable' );\n\t\t}\n\t\treturn $columns;\n\t}", "function get_columns() {\n\n //determine whether to show the enrolment status column\n $preferences = php_report_filtering_get_active_filter_values($this->get_report_shortname(),\n 'columns_status', $this->filter);\n\n //default to false because empty group returns non-empty info, causing issues\n //and we will always hit a parameter screen before running the report\n $show_status = true;\n if (isset($preferences['0']['value'])) {\n $show_status = $preferences['0']['value'];\n }\n\n //determine whether to show the completion element column\n $preferences = php_report_filtering_get_active_filter_values($this->get_report_shortname(),\n 'columns_completion', $this->filter);\n\n //default to false because empty group returns non-empty info, causing issues\n //and we will always hit a parameter screen before running the report\n $show_completion = true;\n if (isset($preferences['0']['value'])) {\n $show_completion = $preferences['0']['value'];\n }\n\n\n //user idnumber\n $idnumber_heading = get_string('column_idnumber', 'rlreport_course_completion_by_cluster');\n $idnumber_column = new table_report_column('user.idnumber AS useridnumber', $idnumber_heading, 'idnumber');\n\n //user fullname\n $name_heading = get_string('column_user_name', 'rlreport_course_completion_by_cluster');\n $name_column = new table_report_column('user.firstname', $name_heading, 'user_name');\n\n //CM course name\n $course_heading = get_string('column_course', 'rlreport_course_completion_by_cluster');\n $course_column = new table_report_column('course.name AS course_name', $course_heading, 'course');\n\n //whether the course is required in the curriculum\n $required_heading = get_string('column_required', 'rlreport_course_completion_by_cluster');\n $required_column = new table_report_column('curriculum_course.required', $required_heading, 'required');\n\n //\n $class_heading = get_string('column_class', 'rlreport_course_completion_by_cluster');\n $class_column = new table_report_column('class.idnumber AS classidnumber', $class_heading, 'class');\n\n //array of all columns\n $result = array(\n $idnumber_column, $name_column, $course_column, $required_column, $class_column);\n\n //add the enrolment status column if applicable, based on the filter\n if ($show_status) {\n $completed_heading = get_string('column_completed', 'rlreport_course_completion_by_cluster');\n $result[] = new table_report_column('enrol.completestatusid', $completed_heading, 'completed');\n }\n\n //always show the grade column\n $grade_heading = get_string('column_grade', 'rlreport_course_completion_by_cluster');\n $result[] = new table_report_column('enrol.grade', $grade_heading, 'grade');\n\n //show number of completion elements completed if applicable, based on the filter\n if ($show_completion) {\n $completionelements_heading = get_string('column_numcomplete', 'rlreport_course_completion_by_cluster');\n $result[] = new table_report_column('COUNT(class_graded.id) AS numcomplete',\n $completionelements_heading, 'numcomplete');\n }\n\n return $result;\n }", "public function getGridColumn($columns=null) {\n\t\tif($columns !== null) {\n\t\t\tforeach($columns as $val) {\n\t\t\t\t/*\n\t\t\t\tif(trim($val) == 'enabled') {\n\t\t\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t\t\t'name' => 'enabled',\n\t\t\t\t\t\t'value' => '$data->enabled == 1? \"Ya\": \"Tidak\"',\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t$this->defaultColumns[] = $val;\n\t\t\t}\n\t\t}else {\n\t\t\t$this->defaultColumns[] = 'id';\n\t\t\t$this->defaultColumns[] = 'title';\n\t\t\t$this->defaultColumns[] = 'alias_url';\n\t\t\t$this->defaultColumns[] = 'description';\n\t\t\t$this->defaultColumns[] = 'image';\n\t\t\t$this->defaultColumns[] = 'image_position';\n\t\t\t$this->defaultColumns[] = 'published';\n\t\t\t$this->defaultColumns[] = 'ordering';\n\t\t\t$this->defaultColumns[] = 'access';\n\t\t\t$this->defaultColumns[] = 'params';\n\t\t}\n\n\t\treturn $this->defaultColumns;\n\t}", "public function get_columns() {\n\t\t$columns = [\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'post_title' => __( 'Estate', 'text_domain' ),\n\t\t\t'action' => __( 'Action', 'text_domain' ),\n\t\t\t'status' => __( 'Status', 'text_domain' ),\n\t\t\t'date' => __( 'Date', 'text_domain' ),\n\t\t];\n\n\t\treturn $columns;\n\t}", "function get_columns() {\n\t\t$columns = array(\n\t\t\t//'cb' \t\t\t\t\t=> '<input type=\"checkbox\" />',\n\t\t\t'transaction_id' \t\t=> __('Transaction ID', 'sp'),\t\n\t\t\t'trade_date' \t\t\t=> __('Trade Date', 'sp'),\t\n\t\t\t'settlement_date' \t\t=> __('Settlement Date', 'sp'),\t\n\t\t\t'transaction_type' \t\t=> __('Transaction Type', 'sp'),\t\n\t\t\t'equity' \t\t\t\t=> __('Equity', 'sp'),\t\n\t\t\t'ticker_symbol' \t\t=> __('Ticker Symbol', 'sp'),\t\n\t\t\t'num_of_shares' \t\t=> __('Num. of Shares', 'sp'),\t\n\t\t\t'price' \t\t\t\t=> __('Price', 'sp'),\t\n\t\t\t'transaction_fees' \t\t=> __('Transaction Fees', 'sp'),\t\n\t\t\t'currency' \t\t\t\t=> __('Currency', 'sp'),\t\n\t\t\t'user_id' \t\t\t\t=> __('User ID', 'sp'),\t\n\t\t\t'stock_id' \t\t\t\t=> __('Stock ID', 'sp'),\t\n\t\t\t'platform' \t\t\t\t=> __('Platform', 'sp'),\t\n\t\t\t'broker' \t\t\t\t=> __('Broker', 'sp'),\t\n\t\t\t'account_id' \t\t\t=> __('Account ID', 'sp'),\t\n\t\t\t'notes' \t\t\t\t=> __('Notes', 'sp'),\n\t\t);\n\n\t\treturn $columns;\n\t}", "function mappingColumns()\n {\n $mapped_columns = array(\n \"id\" => 0,\n \"url\" => 2,\n \"iframe\" => false,\n \"preview\" => false,\n \"thumbs\" => 1,\n \"title\" => 3,\n \"tags\" => 5,\n \"categories\" => 4,\n \"pornstars\" => 6,\n \"duration\" => 7,\n \"views\" => false,\n \"likes\" => false,\n \"unlikes\" => false,\n );\n\n return $mapped_columns;\n }", "public function paginate( $perPage, array $columns = ['*'] );", "public function get_columns() {\n\t\treturn array(\n\t\t\t'payment' => 'Payment',\n\t\t\t'status' => 'Status',\n\t\t\t'category' => 'Category',\n\t\t\t'due' => 'Due',\n\t\t\t'amount' => 'Amount',\n\t\t\t'method' => 'Method',\n\t\t\t// 'vendor' => 'Vendor',\n\t\t\t'attachments' => 'Attachments',\n\t\t\t'event' => 'Event',\n\t\t);\n\t}", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "abstract protected function getColumns(): array;", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function previewColumns();", "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'ID',\n 'item_id' => 'Item_ID',\n 'des' => 'Des',\n 'depts_id' => 'Depts_ID',\n 'application_id' => 'Application_ID',\n 'module_id' => 'Module_ID',\n );\n\n\n }", "function get_hidden_columns($screen)\n {\n }", "protected function _getItemsFetchingQueryColumns($type, $params, $config)\n {\n $columns = array();\n switch ($type) {\n default:\n $columns = array('id', 'can_have_subids', 'can_have_patches', 'raw_keys_allowed');\n if ($config['get_descriptions']) {\n $columns[] = 'description';\n }\n break;\n }\n return ($columns);\n }", "public function columnMap()\n {\n return array(\n 'idconfig' => 'idconfig',\n 'ip' => 'ip',\n 'usuario' => 'usuario',\n 'senha' => 'senha',\n 'dominio' => 'dominio',\n 'criado' => 'criado',\n 'modificado' => 'modificado',\n 'classe_usuario' => 'classe_usuario'\n );\n }", "public function getConfig(string $page): array\n {\n return [\n 'merchantId' => $this->config->getValue('merchant_id'),\n 'environment' => ((int)$this->config->getValue('sandbox_flag') ? 'sandbox' : 'production'),\n 'locale' => $this->localeResolver->getLocale(),\n 'allowedFunding' => $this->getAllowedFunding($page),\n 'disallowedFunding' => $this->getDisallowedFunding(),\n 'styles' => $this->getButtonStyles($page),\n 'isVisibleOnProductPage' => (int)$this->config->getValue('visible_on_product')\n ];\n }", "public function getColumns()\n {\n return [\n 'form' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['form'],\n 'exclude' => true,\n 'inputType' => 'select',\n 'foreignKey' => 'tl_form.title',\n 'eval' => [\n 'includeBlankOption' => true,\n 'style' => 'width:300px',\n 'chosen' => true,\n 'columnPos' => 'checkout',\n ],\n ],\n 'step' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['step'],\n 'inputType' => 'select',\n 'options_callback' => ['Isotope\\Backend\\Module\\OrderConditionFields', 'getSteps'],\n 'eval' => [\n 'decodeEntities' => true,\n 'includeBlankOption' => true,\n 'style' => 'width:300px',\n 'columnPos' => 'checkout',\n ],\n ],\n 'position' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['position'],\n 'default' => 'before',\n 'inputType' => 'select',\n 'options' => ['before', 'after'],\n 'reference' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['position'],\n 'eval' => [\n 'style' => 'width:300px',\n 'columnPos' => 'checkout',\n ],\n ],\n 'product_types' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['product_types'],\n 'inputType' => 'select',\n 'foreignKey' => 'tl_iso_producttype.name',\n 'eval' => [\n 'multiple' => true,\n 'style' => 'width:300px',\n 'columnPos' => 'product_type',\n ],\n ],\n 'product_types_condition' => [\n 'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['product_types_condition'],\n 'inputType' => 'select',\n 'options' => ['oneAvailable', 'allAvailable', 'onlyAvailable'],\n 'reference' => &$GLOBALS['TL_LANG']['tl_module']['iso_order_conditions']['product_types_condition'],\n 'eval' => [\n 'style' => 'width:300px',\n 'columnPos' => 'product_type',\n ],\n ],\n ];\n }", "public function getGridColumn($columns=null) {\n\t\tif($columns !== null) {\n\t\t\tforeach($columns as $val) {\n\t\t\t\t/*\n\t\t\t\tif(trim($val) == 'enabled') {\n\t\t\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t\t\t'name' => 'enabled',\n\t\t\t\t\t\t'value' => '$data->enabled == 1? \"Ya\": \"Tidak\"',\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t$this->defaultColumns[] = $val;\n\t\t\t}\n\t\t}else {\n\t\t\t//$this->defaultColumns[] = 'id';\n\t\t\t$this->defaultColumns[] = 'bank_id';\n\t\t\t$this->defaultColumns[] = 'account_number';\n\t\t\t$this->defaultColumns[] = 'owner_name_alias';\n\t\t}\n\n\t\treturn $this->defaultColumns;\n\t}", "public function columns()\n {\n return array(\n array(\n 'name' => 'name', \n 'title' => 'Attribute name',\n 'attributes' => array(\n \n ),\n ),\n array(\n 'name' => 'active',\n 'type' => 'toggle',\n 'title' => 'Active', \n 'attributes' => array(\n 'id' => \"active\",\n 'value' => \"{field_id}\"\n ), \n ) \n );\n }", "public function get_columns() {\n\t\t$columns = array(\n 'id' => __( 'ID', 'edd-commissions-payouts' ),\n 'txn_id' => __( 'Transaction ID', 'edd-commissions-payouts' ),\n 'date' => __( 'Date', 'edd-commissions-payouts' ),\n 'amount' => __( 'Amount', 'edd-commissions-payouts' ),\n 'fees' => __( 'Fees', 'edd-commissions-payouts' ),\n 'recipients' => __( 'Recipients', 'edd-commissions-payouts' ),\n 'status' => __( 'Status', 'edd-commissions-payouts' ),\n 'notes' => sprintf( '<span><span class=\"vers comment-grey-bubble\" title=\"%1$s\"><span class=\"screen-reader-text\">%1$s</span></span></span>', __( 'Notes', 'edd-commissions-payouts' ) ),\n );\n \n\t\treturn $columns;\n\t}", "protected function _prepareColumns()\n {\n $this->addColumn($this->_productIdField, array(\n 'header' => $this->_getHelper()->__('ID'),\n 'sortable' => true,\n 'index' => $this->_productIdField,\n 'width' => 60,\n ));\n\n $this->addColumn('title', array(\n 'header' => $this->_getHelper()->__('Title'),\n 'index' => 'title'\n ));\n\n $this->addColumn('set_title', array(\n 'header' => $this->_getHelper()->__('Attachments Set'),\n 'index' => 'set_title',\n 'width' => 150,\n 'frame_callback' => array($this, 'prepareSetUrl')\n ));\n\n $this->addColumn('file_url', array(\n 'header' => $this->_getHelper()->__('Download'),\n 'index' => 'download',\n 'sortable' => false,\n 'filter' => false,\n 'width' => 150,\n 'frame_callback' => array($this, 'prepareFileUrl')\n ));\n\n $this->addColumn('type', array(\n 'header' => $this->_getHelper()->__('Type'),\n 'index' => 'type',\n 'filter' => false,\n 'width' => 50,\n 'frame_callback' => array($this, 'prepareType')\n ));\n\n $this->addColumn('updated_at', array(\n 'header' => $this->_getHelper()->__('Updated'),\n 'type' => 'date',\n 'index' => 'updated_at',\n 'width' => 150,\n ));\n\n return Mage_Adminhtml_Block_Widget_Grid::_prepareColumns();\n }", "function columns_data( $column ) {\r\n\r\n\t\tglobal $post, $wp_taxonomies;\r\n\r\n\t\tswitch( $column ) {\r\n\t\t\tcase \"listing_thumbnail\":\r\n\t\t\t\tprintf( '<p>%s</p>', genesis_get_image( array( 'size' => 'thumbnail' ) ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_details\":\r\n\t\t\t\tforeach ( (array) $this->property_details['col1'] as $label => $key ) {\r\n\t\t\t\t\tprintf( '<b>%s</b> %s<br />', esc_html( $label ), esc_html( get_post_meta($post->ID, $key, true) ) );\r\n\t\t\t\t}\r\n\t\t\t\tforeach ( (array) $this->property_details['col2'] as $label => $key ) {\r\n\t\t\t\t\tprintf( '<b>%s</b> %s<br />', esc_html( $label ), esc_html( get_post_meta($post->ID, $key, true) ) );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_features\":\r\n\t\t\t\techo get_the_term_list( $post->ID, 'features', '', ', ', '' );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_categories\":\r\n\t\t\t\tforeach ( (array) get_option( $this->settings_field ) as $key => $data ) {\r\n\t\t\t\t\tprintf( '<b>%s:</b> %s<br />', esc_html( $data['labels']['singular_name'] ), get_the_term_list( $post->ID, $key, '', ', ', '' ) );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "protected function _getConfig()\n {\n return Mage::getSingleton('customgrid/column_renderer_config_collection');\n }", "abstract public function getCols();", "public function get_columns(){\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'ID' => 'ID',\n 'Orderno' => 'Order No',\n 'Mtid' => 'Mtid',\n 'Userid' => 'User ID',\n 'UserName' => 'User Name',\n 'Prodcode' => 'Product Code',\n 'Status' => 'Status',\n 'Comment' => 'Comment',\n 'Editable' => 'Editable',\n 'Expirytime' => 'Expirytime',\n 'Modifydate' => 'Modifydate'\n );\n\n return $columns;\n }", "static function get_columns(): array {\r\n return [\r\n 'title' => 'Title',\r\n self::qcol('link') => 'Link',\r\n self::qcol('date_from') => 'In use from',\r\n self::qcol('date_till') => 'In use till',\r\n self::qcol('main') => 'Main website'\r\n ];\r\n }" ]
[ "0.71503884", "0.6764928", "0.6730456", "0.65779054", "0.62894934", "0.6155866", "0.6063996", "0.6029937", "0.5927109", "0.59175354", "0.59169954", "0.5781238", "0.5747141", "0.5746338", "0.5728248", "0.57201713", "0.57141495", "0.5686432", "0.5686432", "0.5686432", "0.5686432", "0.5686432", "0.5686432", "0.5686432", "0.5682688", "0.56812996", "0.5668676", "0.5645813", "0.5639026", "0.56382227", "0.5621127", "0.56011313", "0.5593521", "0.5585991", "0.557598", "0.5563946", "0.55409783", "0.5536139", "0.5533817", "0.55175066", "0.5512301", "0.5495901", "0.54666644", "0.5463932", "0.5463106", "0.54565203", "0.5456331", "0.54536396", "0.54536027", "0.54458004", "0.5444785", "0.5441766", "0.54399794", "0.54331416", "0.5412808", "0.54036695", "0.5386405", "0.53814334", "0.5370522", "0.5359536", "0.5359294", "0.5358879", "0.5355642", "0.5350896", "0.53489894", "0.53484446", "0.5346392", "0.5345229", "0.5342382", "0.5338947", "0.5337808", "0.5337237", "0.5335325", "0.5335225", "0.533359", "0.5329384", "0.5327525", "0.532239", "0.532239", "0.532239", "0.532239", "0.53205955", "0.53192437", "0.53192437", "0.5298184", "0.5296791", "0.52947897", "0.52915156", "0.5289487", "0.5286636", "0.5286273", "0.5281216", "0.5274655", "0.52741635", "0.52721447", "0.52692133", "0.5260888", "0.5256613", "0.5253741", "0.5250376" ]
0.65101314
4
Returns a list of behaviors that this model should behave as.
public function behaviors() { /* * Warning: every behavior need contains fields: * 'configLanguageAttribute' required * 'configBehaviorAttribute' required * 'configBehaviorKey' optional (default: b_originKey_lang, where originKey is key of the row in array * lang will be added in tail */ $languageBehaviors = array(); $behaviors = $this->prepareBehaviors($languageBehaviors); return \CMap::mergeArray( parent::behaviors(), \CMap::mergeArray( $behaviors, array( ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function behaviors() {\n\t\treturn $this->Behaviors;\n\t}", "public function behaviors()\r\n\t {\r\n\t $behaviors = parent::behaviors();\r\n\r\n\t return $behaviors;\r\n\t }", "public function getBehaviors()\n {\n return $this->getSchema()->behaviors;\n }", "public function behaviors()\n {\n return parent::behaviors();\n }", "public static function behaviors()\n\t{\n\t\treturn array(\n\t\t\t'beforeInsert' => array(\n\n\t\t\t),\n\n\t\t\t'afterInsert' => array(\n\n\t\t\t),\n\n\t\t\t'beforeUpdate' => array(\n\n\t\t\t),\n\n\t\t\t'afterUpdate' => array(\n\n\t\t\t),\n\n\t\t\t'beforeDelete' => array(\n\n\t\t\t),\n\n\t\t\t'afterDelete' => array(\n\n\t\t\t),\n\n\t\t);\n\t}", "public function behaviors() {\n return array(\"application.components.SpecialnessBehavior\");\n }", "public function getBehaviors()\n {\n return array(\n 'log' => array (\n),\n 'adderror' => array (\n),\n 'utils' => array (\n),\n );\n }", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t\t'symfony_timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t\t'symfony_timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'symfony' => array('form' => 'true', 'filter' => 'true', ),\n\t\t\t'symfony_behaviors' => array(),\n\t\t\t'symfony_i18n' => array('i18n_table' => 'gen_paises_i18n', ),\n\t\t);\n\t}", "public function behaviors()\n {\n return $this->belongsToMany(Behavior::class);\n }", "public static function getBehavior()\n {\n return array_keys(self::$BEHAVIOR_TYPE_RELATION);\n }", "public function getBehaviors()\n {\n return array(\n 'symfony' => array('form' => 'true', 'filter' => 'true', ),\n 'symfony_behaviors' => array(),\n 'symfony_timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),\n );\n }", "public function behaviors()\n\t{\n\t\treturn array('CAdvancedArBehavior',array('class' => 'ext.CAdvancedArBehavior'));\n\t}", "public function behaviors()\n\t{\n\t\treturn array_merge(\n\t\t\tparent::behaviors(),\n\t\t\tarray(\n\t\t\t\t//\tTimestamper\n\t\t\t\t'psTimeStamp' => array(\n\t\t\t\t\t'class' => 'pogostick.behaviors.CPSTimeStampBehavior',\n\t\t\t\t\t'createdColumn' => 'create_date',\n\t\t\t\t\t'createdByColumn' => 'create_user_id',\n\t\t\t\t\t'lmodColumn' => 'lmod_date',\n\t\t\t\t\t'lmodByColumn' => 'lmod_user_id',\n\t\t\t\t),\n\n\t\t\t\t//\tSoft Deleting\n\t\t\t\t'psSoftDelete' => array(\n\t\t\t\t\t'class' => 'pogostick.behaviors.CPSSoftDeleteBehavior',\n\t\t\t\t\t'softDeleteColumn' => 'delete_ind',\n\t\t\t\t),\n\n\t\t\t\t//\tDelta Change\n\t\t\t\t'psDeltaChange' => array(\n\t\t\t\t\t'class' => 'pogostick.behaviors.CPSDeltaChangeBehavior',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "public function behaviors()\n {\n return array_merge(parent::behaviors(), array(\n 'audit' => array(\n 'class' => 'app.behaviors.AuditBehavior',\n )\n ));\n }", "public function behaviors()\n {\n return \\app\\models\\Action::getAccess($this->id);\n }", "public function behaviors() {\n return array(\n 'ValidateModelBehavior' => array(\n 'class' => 'application.components.behaviors.ValidateModelBehavior',\n 'model' => $this\n ),\n 'AuditFieldBehavior' => array(\n 'class' => 'audit.components.AuditFieldBehavior'\n )\n );\n }", "public function behaviors()\n\t{\n\t return array(\n\t // Classname => path to Class\n\t 'ActiveRecordLogableBehavior'=>\n\t 'application.behaviors.ActiveRecordLogableBehavior',\n\t );\n\t}", "public function behaviors()\n {\n return [\n [\n 'class' => BlameableBehavior::className(),\n 'createdByAttribute' => 'created_by',\n 'updatedByAttribute' => 'modified_by',\n ],\n [\n 'class' => TimestampBehavior::className(),\n 'createdAtAttribute' => 'created_datetime',\n 'updatedAtAttribute' => 'modified_datetime',\n 'value' => new Expression('NOW()'),\n ],\n ];\n }", "public function getAllBehaviors() {\n\n $user = JWTAuth::parseToken()->toUser();\n\n $behaviors = $user->behaviors()->get();\n \n $response = [\n 'behaviors' => $behaviors\n ];\n\n return response()->json( $response, 200 );\n\n }", "public function behaviors()\n {\n $facade = new DocumentopdfControllerFachada;\n return $facade->behaviors();\n }", "public function behaviors()\n {\n return CMap::mergeArray(parent::behaviors(), array(\n 'points' => array(\n 'class' => 'ext.YiiMongoDbSuite.extra.EEmbeddedArraysBehavior',\n 'arrayPropertyName' => 'points',\n 'arrayDocClassName' => 'Point'\n ),\n 'MongoTypes' => array(\n 'class' => 'CMongoTypeBehavior',\n 'attributes' => array(\n 'authorId' => 'MongoId',\n 'category' => 'MongoId',\n 'style'=>'array',\n ),\n ),\n ));\n }", "public function behaviors()\n {\n return [\n TimestampBehavior::className(),\n // BlameableBehavior::className(),\n ];\n }", "public function getBehaviors()\n {\n return array(\n 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),\n );\n }", "public function getBehaviors()\n {\n return array(\n 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),\n );\n }", "public function behaviors()\n {\n \n $behaviors = parent::behaviors();\n \n $behaviors['verbs'] = [\n 'class' => \\yii\\filters\\VerbFilter::className(),\n 'actions' => [\n 'authorize' => ['POST'],\n 'accesstoken' => ['POST'],\n 'index' => ['GET'],\n 'order' => ['GET'],\n 'order-detail' => ['GET'],\n ]\n ];\n \n return $behaviors;\n }", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'soft_delete' => array('deleted_column' => 'deleted_at', ),\n\t\t);\n\t}", "public function getBehaviors()\n\t{\n\t\treturn array(\n\t\t\t'soft_delete' => array('deleted_column' => 'deleted_at', ),\n\t\t);\n\t}", "public function getBehaviorsEnabled()\n\t{\n\t\treturn $this->_behaviorsenabled;\n\t}", "function behaviors() {\n return CMap::mergeArray(parent::behaviors(), array(\n \n\n \n\n 'files' => array(\n 'class'=>'application.modules.ycm.behaviors.FileBehavior',\n ),\n 'date2time' => array(\n 'class' => 'ycm.behaviors.Date2TimeBehavior',\n 'attributes'=>'',\n 'format'=>'Y-m-d',\n ),\n 'datetime2time' => array(\n 'class' => 'ycm.behaviors.Date2TimeBehavior',\n 'attributes'=>'',\n 'format'=>'Y-m-d H:i:s',\n ),\n 'currency' => array(\n 'class' => 'ycm.behaviors.CurrencyBehavior',\n 'attributes'=>'',\n ),\n ));\n }", "public function behaviors() {\n return array(\n 'TimestampBehavior' => array('class' => 'TimestampBehavior'),\n 'ERememberFiltersBehavior' => array(\n 'class' => 'application.components.behaviors.ERememberFiltersBehavior',\n 'defaults' => array(),\n 'defaultStickOnClear' => false\n ),\n );\n }", "public function getBehaviors()\n {\n return array(\n 'timestampable' => array (\n 'create_column' => 'created_at',\n 'update_column' => 'updated_at',\n 'disable_updated_at' => 'false',\n),\n );\n }", "public function behaviors()\n {\n return [\n 'image' => [\n 'class' => 'rico\\yii2images\\behaviors\\ImageBehave',\n ],\n [\n 'class' => AdjacencyListBehavior::className(),\n ],\n ];\n }", "public function getBehavior()\n\t{\n\t\treturn $this->_behavior;\n\t}", "public function getBehavior()\n\t{\n\t\treturn $this->_behavior;\n\t}", "public function behaviors()\n {\n $behaviors = parent::behaviors();\n $behaviors['authenticator'] = [\n 'class' => HttpBearerAuth::className(),\n 'only' => ['create', 'update', 'delete']\n ];\n $behaviors['authorAccess'] = [\n 'class' => AccessControl::className(),\n 'only' => ['update', 'delete'],\n 'rules' => [\n [\n 'class' => AuthorAccessRule::className(),\n 'actions' => ['update', 'delete']\n ]\n ]\n ];\n return $behaviors;\n }", "public function behaviors()\n {\n return array(\n 'CTimestampBehavior' => array(\n 'class' => 'zii.behaviors.CTimestampBehavior'\n ),\n 'statusMain' => array(\n 'class' => 'application.components.behaviors.StatusBehavior',\n 'list' => array(\n Yii::t('BlogModule.blog', 'Blocked'),\n Yii::t('BlogModule.blog', 'Active')\n )\n ),\n );\n }", "public function behaviors()\n {\n $behaviors['authenticator'] = [\n 'class' => QueryParamAuth::className(),\n 'except' => ['help','setcompras','getcompras'],\n ];\n return $behaviors;\n }", "public function behaviors()\n {\n parent::behaviors();\n return [\n 'verbs' => [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'delete' => ['POST'],\n ],\n ],\n ];\n }", "public function behaviors()\n {\n return array(\n 'ProfileControllerBehavior' => array(\n 'class' => 'application.modules.rooms.behaviors.RoomsControllerBehavior',\n ),\n );\n }", "public function behaviors(){\n return [\n [\n 'class' => TimestampBehavior::className(),\n //'createdAtAttribute' => 'create_time',\n //'updatedAtAttribute' => 'update_time',\n // 'value' => new Expression('NOW()'),\n ],\n [\n 'class' => BlameableBehavior::className(),\n //'createdByAttribute' => 'author_id',\n //'updatedByAttribute' => 'updater_id',\n ]\n ];\n }", "public function behaviors()\n {\n $behaviors = parent::behaviors();\n\t\t$behaviors['authenticator'] =\n\t\t[\n\t\t\t'class' => TokenAuth::className(),\n\t\t];\n $behaviors['verbs'] =\n [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'get-me' => ['get'],\n 'get-active' => ['get'],\n ],\n ];\n return $behaviors;\n }", "public function behaviors()\n {\n return [\n 'status' => [\n 'class' => AttributeBehavior::className(),\n 'attributes' => [\n ActiveRecord::EVENT_BEFORE_INSERT => 'status'\n ],\n 'value' => 1,\n ],\n 'create_update' => [\n 'class' => TimestampBehavior::className(),\n 'createdAtAttribute' => 'created',\n 'updatedAtAttribute' => 'updated',\n ],\n ];\n }", "public function getSearchBehaviors() : ?array\n {\n return $this->searchBehaviors;\n }", "public function getEarlyBehaviors()\n {\n $behaviors = [];\n foreach ($this->behaviors as $name => $behavior) {\n if ($behavior->isEarly()) {\n $behaviors[$name] = $behavior;\n }\n }\n\n return $behaviors;\n }", "public function behaviors()\n {\n\n return [\n 'timestamp' => [\n 'class' => TimestampBehavior::className(),\n 'attributes' => [\n ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'],\n ActiveRecord::EVENT_BEFORE_UPDATE => 'updated',\n ],\n 'value' => function(){ return date('Y-m-d H:i:s'); /* MySql DATETIME */},\n ],\n 'autouserid' => [\n 'class' => BlameableBehavior::className(),\n 'attributes' => [\n ActiveRecord::EVENT_BEFORE_INSERT => ['user_id'],\n ],\n ],\n ];\n }", "public function behaviors()\n {\n return [\n 'verbs' => [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'add' => ['post'],\n 'remove' => ['post'],\n ],\n ],\n ];\n }", "public function behaviors()\n {\n return [\n [\n 'class' => 'app\\nestic\\behaviors\\RelacionesMaestroDetalleBehavior',\n ],\n 'bedezign\\yii2\\audit\\AuditTrailBehavior',\n ];\n }", "public function behaviors()\n {\n return ArrayHelper::merge([\n [\n 'class' => SluggableBehavior::class,\n 'attribute' => 'name'\n ]\n ],\n parent::behaviors()\n );\n }", "public function behaviors() {\n return array(\n 'AttributesBackupBehavior' => 'ext.AttributesBackupBehavior',\n );\n }", "protected function parseBehaviorTraits(){\n\t\t$traits = (new \\ReflectionClass($this))->getTraits();\n\t\tif (!empty($traits)){\n\t\t\t$getName = function(\\ReflectionMethod $image){ return $image->name; };\n\t\t\tforeach($traits as $reflection){\n\t\t\t\t$methods = $reflection->getMethods(\\ReflectionMethod::IS_PUBLIC);\n\t\t\t\t$this->behaviorMethods += array_map($getName, $methods);\n\t\t\t}\n\t\t}\n\t}", "public function behaviors()\n {\n return ArrayHelper::merge(parent::behaviors(), [\n [\n 'class' => 'yii\\filters\\ContentNegotiator',\n //'only' => ['view', 'index'], // in a controller\n // if in a module, use the following IDs for user actions\n // 'only' => ['user/view', 'user/index']\n 'formats' => [\n 'application/json' => Response::FORMAT_JSON,\n ],\n ],\n ]);\n }", "public function behaviors()\n {\n return [\n 'verbs' => [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'delete' => ['post'],\n ],\n ],\n ];\n }", "public function behaviors()\n {\n return [\n 'verbs' => [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'delete' => ['post'],\n ],\n ],\n ];\n }", "public function behaviors()\n {\n $rules = parent::behaviors();\n $rule = [\n 'actions' => ['index'],\n 'allow' => true,\n 'roles' => ['?'],\n ];\n\n array_unshift($rules['access']['rules'], $rule);\n\n return $rules;\n }", "public function behaviors()\n {\n return ArrayHelper::merge(parent::behaviors(), [\n 'access' => [\n 'class' => AccessControl::class,\n 'rules' => [\n [\n 'allow' => true,\n 'roles' => ['@'],\n ],\n [\n 'allow' => true,\n 'actions' => ['login', 'logout'],\n 'roles' => ['?'],\n ],\n ]\n ],\n 'authenticator' => [\n 'except' => ['login', 'logout'] // bypass authentication for /auth/login\n ]\n ]);\n }", "public static function taxRuleBehaviors(): array\n {\n return [\n 'only' => __('Only This Tax'),\n 'combine' => __('Combine Taxes'),\n 'all' => __('One After Another'),\n ];\n }", "public function behaviors()\n {\n return [\n // Only allow logged in users to comment\n 'access' => [\n 'class' => AccessControl::class,\n 'only' => ['create'],\n 'rules' => [\n [\n 'allow' => true,\n 'roles' => ['@'],\n ],\n ],\n ],\n 'content' => [\n 'class' => ContentNegotiator::class,\n 'only' => ['create', 'update', 'delete'],\n 'formats' => [\n 'application/json' => Response::FORMAT_JSON,\n ],\n ],\n // Only allow POST requests\n 'verb' => [\n 'class' => VerbFilter::class,\n 'actions' => [\n 'delete' => ['POST'],\n ],\n ],\n ];\n }", "public function behaviors()\n {\n return [\n 'verbs' => [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'delete' => ['POST'],\n ],\n ],\n ];\n }", "public function getBehaviorCallbacks(Model $model) {\n\t\t$callbacks = array();\n\t\t$behaviors = Configure::read('Admin.behaviorCallbacks');\n\n\t\tforeach ($behaviors as $behavior => $methods) {\n\t\t\tif (!$model->Behaviors->loaded($behavior)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($methods as $method => $options) {\n\t\t\t\tif (is_string($options)) {\n\t\t\t\t\t$options = array('title' => $options, 'access' => 'update');\n\t\t\t\t} else {\n\t\t\t\t\t$options = $options += array('access' => 'update');\n\t\t\t\t}\n\n\t\t\t\tif ($this->hasAccess($model->qualifiedName, $options['access'])) {\n\t\t\t\t\t$callbacks[$method] = array(\n\t\t\t\t\t\t'title' => __d('admin', $options['title'], $model->singularName),\n\t\t\t\t\t\t'behavior' => Inflector::underscore($behavior),\n\t\t\t\t\t\t'method' => $method\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $callbacks;\n\t}", "public function behaviors() {\n return array(\n 'CTimestampBehavior' => array(\n 'class' => 'zii.behaviors.CTimestampBehavior',\n\t\t\t\t'createAttribute' => 'createTime',\n 'updateAttribute' => 'createTime',\n ),\n );\n }", "public function behaviors()\n {\n $behaviors = parent::behaviors();\n $behaviors['contentNegotiator'] = [\n 'class' => 'yii\\filters\\ContentNegotiator',\n 'only' => ['index'], // in a controller\n // if in a module, use the following IDs for user actions\n // 'only' => ['user/view', 'user/index']\n 'formats' => [\n 'application/json' => Response::FORMAT_JSON,\n ],\n 'languages' => [\n 'en',\n 'de',\n ],\n ];\n $behaviors['authenticator'] = [\n 'class' => TwXAuth::className(),\n ];\n $behaviors['corsFilter'] = [\n 'class' => \\yii\\filters\\Cors::className(),\n 'cors' => [\n 'Origin' => ['*'],\n 'Access-Control-Request-Method' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'],\n 'Access-Control-Request-Headers' => ['*'],\n 'Access-Control-Allow-Credentials' => true,\n 'Access-Control-Expose-Headers' => [],\n 'Access-Control-Max-Age' => 86400,\n ],\n\n ];\n\n // Disable the authenticator for OPTION (Cors Preflight)\n if (Yii::$app->request->isOptions) {\n unset($behaviors['authenticator']);\n }\n\n $whitelist = getenv('APP_API_WHITELIST');\n if (!empty($whitelist)) {\n $ips = explode(',', $whitelist);\n if (in_array(Yii::$app->getRequest()->getUserIP(), $ips)) {\n unset($behaviors['authenticator']);\n }\n }\n\n return $behaviors;\n }", "public function getBehaviorValues() {\n $values = $this->getValues();\n unset($values['dm_behavior_enabled']);\n return $values;\n }", "protected function getSupportedDirectiveLocationsByBehavior() : array\n {\n return [FieldDirectiveBehaviors::OPERATION, FieldDirectiveBehaviors::FIELD, FieldDirectiveBehaviors::FIELD_AND_OPERATION];\n }", "public function testBehaviorOrderCallbacks() {\n\t\t$model = ClassRegistry::init ( 'Orangutan' );\n\t\t$model->Behaviors->init ( 'Orangutan', array (\n\t\t\t\t'Second' => array (\n\t\t\t\t\t\t'priority' => 9 \n\t\t\t\t),\n\t\t\t\t'Third',\n\t\t\t\t'First' => array (\n\t\t\t\t\t\t'priority' => 8 \n\t\t\t\t) \n\t\t) );\n\t\t\n\t\t$this->assertEmpty ( $model->called );\n\t\t\n\t\t$model->find ( 'first' );\n\t\t$expected = array (\n\t\t\t\t'FirstBehavior',\n\t\t\t\t'SecondBehavior',\n\t\t\t\t'ThirdBehavior' \n\t\t);\n\t\t$this->assertEquals ( $expected, $model->called );\n\t\t\n\t\t$model->called = array ();\n\t\t$model->Behaviors->load ( 'Third', array (\n\t\t\t\t'priority' => 1 \n\t\t) );\n\t\t\n\t\t$model->find ( 'first' );\n\t\t$expected = array (\n\t\t\t\t'ThirdBehavior',\n\t\t\t\t'FirstBehavior',\n\t\t\t\t'SecondBehavior' \n\t\t);\n\t\t$this->assertEquals ( $expected, $model->called );\n\t\t\n\t\t$model->called = array ();\n\t\t$model->Behaviors->load ( 'First' );\n\t\t\n\t\t$model->find ( 'first' );\n\t\t$expected = array (\n\t\t\t\t'ThirdBehavior',\n\t\t\t\t'SecondBehavior',\n\t\t\t\t'FirstBehavior' \n\t\t);\n\t\t$this->assertEquals ( $expected, $model->called );\n\t\t\n\t\t$model->called = array ();\n\t\t$model->Behaviors->unload ( 'Third' );\n\t\t\n\t\t$model->find ( 'first' );\n\t\t$expected = array (\n\t\t\t\t'SecondBehavior',\n\t\t\t\t'FirstBehavior' \n\t\t);\n\t\t$this->assertEquals ( $expected, $model->called );\n\t\t\n\t\t$model->called = array ();\n\t\t$model->Behaviors->disable ( 'Second' );\n\t\t\n\t\t$model->find ( 'first' );\n\t\t$expected = array (\n\t\t\t\t'FirstBehavior' \n\t\t);\n\t\t$this->assertEquals ( $expected, $model->called );\n\t\t\n\t\t$model->called = array ();\n\t\t$model->Behaviors->enable ( 'Second' );\n\t\t\n\t\t$model->find ( 'first' );\n\t\t$expected = array (\n\t\t\t\t'SecondBehavior',\n\t\t\t\t'FirstBehavior' \n\t\t);\n\t\t$this->assertEquals ( $expected, $model->called );\n\t}", "public function behaviors() \r\n {\r\n return [\r\n TimestampBehavior::className(),\r\n ];\r\n }", "public function behaviors()\n {\n $behaviors = parent::behaviors();\n// print_r($behaviors);exit;\n\n $behaviors['contentNegotiator']['formats'] = '';\n $behaviors['contentNegotiator']['formats']['application/xml'] = Response::FORMAT_XML;\n return $behaviors;\n }", "public function behaviors() {\n return [\n 'access' => [\n 'class' => AccessControl::className(),\n 'rules' => [\n [\n 'actions' => [\n 'ajaxsort',\n 'changemoderator',\n 'createmembergroup',\n 'createspider',\n 'deleteforum',\n 'deletemembergroup',\n 'deletespider',\n 'getforum',\n 'getmembergroup',\n 'getspider',\n 'group',\n 'index',\n 'layout',\n 'moderator',\n 'saveforum',\n 'savemembergroup',\n 'savespider',\n 'spider',\n 'update',\n 'updateforum',\n 'updatemembergroup',\n 'updatespider',\n ],\n 'allow' => true,\n 'matchCallback' => function() {\n if ($this->isModerator() || $this->isAdmin()) {\n return true;\n }\n\n return false;\n },\n ],\n ],\n ],\n ];\n }", "public function behaviors()\n {\n return [\n TimestampBehavior::className(),\n ];\n }", "public function behaviors()\n {\n return [\n TimestampBehavior::className(),\n ];\n }", "public function behaviors()\n {\n return [\n TimestampBehavior::className(),\n ];\n }", "public function behaviors()\n {\n return [\n TimestampBehavior::className(),\n ];\n }", "public function behaviors()\n {\n return [\n 'verbs' => [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'add' => ['POST'],\n ],\n ],\n ];\n }", "public function behaviors() {\n return [\n [\n 'class' => \\app\\components\\AccessFilter::className(),\n ],\n [\n 'class' => \\app\\components\\AuthItemFilter::className(),\n 'only' => [\n 'admin', 'detalle', 'crear', 'actualizar', 'eliminar', 'listar-ofertas'\n ],\n 'authsActions' => [\n 'admin' => 'intranet_ofertas-laborales_admin',\n 'detalle' => 'intranet_ofertas-laborales_admin',\n 'crear' => 'intranet_ofertas-laborales_admin',\n 'actualizar' => 'intranet_ofertas-laborales_admin',\n 'eliminar' => 'intranet_ofertas-laborales_admin',\n 'listar-ofertas' => 'intranet_usuario'\n ]\n ],\n ];\n }", "public function behaviors()\n {\n return array(\n 'CTimestampBehavior' => array(\n 'class' => 'zii.behaviors.CTimestampBehavior',\n 'createAttribute' => 'create_time',\n 'updateAttribute' => 'update_time',\n 'setUpdateOnCreate' => true,\n ),\n );\n }", "public function behaviors()\n {\n return array(\n 'CTimestampBehavior' => array(\n 'class' => 'zii.behaviors.CTimestampBehavior',\n 'createAttribute' => 'create_time',\n 'updateAttribute' => 'update_time',\n 'setUpdateOnCreate' => true,\n ),\n );\n }", "public function behaviors() {\n return [\n 'access' => [\n 'class' => AccessControl::className(),\n 'rules' => [\n [\n 'actions' => ['login', 'reset', 'error', 'coba'],\n 'allow' => true,\n ],\n [\n 'actions' => ['logout', 'index', 'admin'],\n 'allow' => true,\n 'roles' => ['@'],\n ],\n ],\n ],\n 'verbs' => [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'logout' => ['post'],\n ],\n ],\n ];\n }", "public function behaviors()\n {\n return [\n 'bedezign\\yii2\\audit\\AuditTrailBehavior'\n ];\n }", "public function actions()\n {\n return $this->morphMany('App\\Action', 'action_able');\n }", "public function actions()\n {\n return $this->morphMany(Actions::class, 'actionable');\n }", "private function getBehaviorNames(CComponent $obj) {\n $prop = new ReflectionProperty( 'CComponent', '_m' );\n $prop->setAccessible( true );\n $behaviors = $prop->getValue( $obj );\n\n return array_keys( $behaviors );\n }", "public function applyBehaviors()\n {\n foreach ($this->behaviors as $behavior) {\n if (!$behavior->isEntityModified()) {\n $behavior->getEntityModifier()->modifyEntity();\n $behavior->setEntityModified(true);\n }\n }\n }", "public function behaviors() {\n return [\n FilterMessageBehavior::className(),\n ];\n }", "public function behaviors()\n {\n return [\n 'access' => [\n 'class' => AccessControl::className(),\n 'rules' => [\n [\n 'actions' => ['track', 'error','index'],\n 'allow' => true,\n ],\n [\n 'actions' => ['track','logout','index'],\n 'allow' => true,\n 'roles' => ['@'],\n ],\n ],\n ],\n 'verbs' => [\n 'class' => VerbFilter::className(),\n 'actions' => [\n 'logout' => ['post'],\n ],\n ],\n ];\n }", "protected function addContentNegotiatorBehavior($behaviors): array\n {\n $behaviors['contentNegotiator'] = [\n 'class' => ContentNegotiator::class,\n 'formats' => [\n 'application/json' => Response::FORMAT_JSON\n ],\n ];\n return $behaviors;\n }", "public function behaviors()\n\t\t{\n\t\t\treturn [\n\t\t\t\t\t// This set the create_at and updated_at by create, and \n\t\t\t\t\t// update_at by update, with the date time / timestamp\n\t\t\t\t\t[\n\t\t\t\t\t\t'class' => TimestampBehavior::className(),\n\t\t\t\t\t\t'createdAtAttribute' => 'created_at',\n\t\t\t\t\t\t'updatedAtAttribute' => 'updated_at',\n\t\t\t\t\t\t'value' => new Expression('NOW()'),\n\t\t\t\t\t],\n\t\t\t ];\n\t\t}", "public function behaviors()\n {\n return [\n 'access' => [\n 'class' => AccessControl::className(),\n 'rules' =>\n [\n [\n 'actions' => [\n 'index',\n 'index2',\n 'modem',\n 'onemodem',\n 'conveyor',\n 'askanswer',\n 'log'\n\n ],\n 'allow' => true,\n //Admin and prom admin can make actions to addresses\n 'roles' => ['superadmin'],\n ]\n ,\n ]\n ,\n ],\n ];\n }", "public function getBehaviorTagsAttribute()\n {\n return implode(', ', $this->behaviors->pluck('name_key_translated')->toArray());\n }", "public function behaviors()\n\t{\n\t\treturn [\n\t\t\t'access' => [\n\t\t\t\t'class' => AccessControl::className(),\n\t\t\t\t'rules' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'actions' => ['login', 'error'],\n\t\t\t\t\t\t'allow' => true,\n\t\t\t\t\t\t'roles' => ['?']\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t// 'actions' => ['logout'],\n\t\t\t\t\t\t'allow' => true,\n\t\t\t\t\t\t'roles' => ['@'],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t];\n\t}", "public function behaviors()\n {\n return [\n 'timestamp' => [\n 'class' => 'yii\\behaviors\\TimestampBehavior',\n 'attributes' => [\n ActiveRecord::EVENT_BEFORE_INSERT => ['createdAt', 'updatedAt'],\n ActiveRecord::EVENT_BEFORE_UPDATE => ['updatedAt'],\n ]\n ]\n ];\n }" ]
[ "0.8171747", "0.7984829", "0.7958152", "0.7933813", "0.78627586", "0.7752681", "0.7660729", "0.75379986", "0.75379986", "0.75379986", "0.75379986", "0.75379986", "0.75379986", "0.75379986", "0.75379986", "0.75379986", "0.752263", "0.752263", "0.7498457", "0.7485555", "0.7475372", "0.73705757", "0.73169", "0.72807956", "0.7138784", "0.7137394", "0.71280783", "0.6964676", "0.69444036", "0.69319093", "0.6854876", "0.68527585", "0.6848255", "0.6836821", "0.6836821", "0.6829581", "0.6818912", "0.6818912", "0.6772159", "0.6752065", "0.67409813", "0.67323464", "0.6731131", "0.672769", "0.672769", "0.6706006", "0.67034245", "0.6670297", "0.6605516", "0.6601245", "0.65812284", "0.65579844", "0.6544561", "0.65255666", "0.65176624", "0.6510315", "0.6485185", "0.644853", "0.64373446", "0.63730186", "0.6313415", "0.6304105", "0.6283149", "0.6283149", "0.62726426", "0.62721074", "0.62563044", "0.6248289", "0.62271464", "0.62042356", "0.61934364", "0.6184425", "0.6162831", "0.61358875", "0.6127122", "0.6112572", "0.609816", "0.60879076", "0.60642624", "0.60642624", "0.60642624", "0.60642624", "0.6056117", "0.60255206", "0.6004327", "0.6004327", "0.5961737", "0.5929818", "0.5901345", "0.589585", "0.5886522", "0.58565676", "0.5849639", "0.5847404", "0.58298147", "0.58202493", "0.57971394", "0.5794941", "0.57942134", "0.5792325" ]
0.74484295
21
Metodos CRUD Obtener Ocasion
public function getMesa(){ $page = (isset($_GET['page'])) ? $_GET['page'] : 1; $limite = 5; $limite_inicio = ($page - 1)* $limite; $sql = "SELECT * FROM mesas ORDER BY IdMesa LIMIT $limite_inicio , $limite"; $params = array(null); return Database::getRows($sql, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return MonitoreoResource::collection(Monitoreo::all());\n //return MonitoreoResource::collection(Conexione::orderBy('ipe_id', 'asc')->get());\n }", "function tipoAlojamientoInstitucion_get(){\n $id=$this->get('id');\n if (count($this->get())>1) {\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"Demasiados datos enviados\",\n \"validations\" =>array(\n \"id\"=>\"Envia Id (get) para obtener un especifico articulo o vacio para obtener todos los articulos\"\n ),\n \"data\"=>null\n );\n }else{\n if ($id) {\n $data = $this->DAO->selectEntity('Tb_TipoAlojamientoInstitucion',array('idTipoAlojamientoInstitucion'=>$id),true);\n }\n else{\n $data = $this->DAO->selectEntity('Tb_TipoAlojamientoInstitucion',null,false);\n }\n if ($data) {\n $response = array(\n \"status\" => \"success\",\n \"status_code\" => 201,\n \"message\" => \"Articulo Cargado correctamente\",\n \"validations\" =>null,\n \"data\"=>$data\n );\n }else{\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"No se recibio datos\",\n \"validations\" =>null,\n \"data\"=>null\n );\n }\n }\n $this->response($response,200);\n }", "public function indexDiariaAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = new Consulta();\r\n $this->tipo=2;\r\n $form = $this->createCreateForm($entity,$this->tipo,0);\r\n //$entities = $em->getRepository('DGPlusbelleBundle:Consulta')->findAll();\r\n $dql = \"SELECT c FROM DGPlusbelleBundle:Consulta c WHERE c.tipoConsulta= :tipo\";\r\n $entities = $em->createQuery($dql)\r\n ->setParameter('tipo',1)\r\n ->getResult();\r\n //var_dump($entities);\r\n return array(\r\n 'entities' => $entities,\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n 'tipo' => 2,\r\n );\r\n }", "public function listoaAction() \n { \n // valores iniciales formulario (C)\n $id = (int) $this->params()->fromRoute('id', 0); \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n $data = $this->request->getPost();\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new tipdocontrolo($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->actRegistro($data); \n }\n $view = new ViewModel(); \n $this->layout('layout/blancoC'); // Layout del login\n return $view; \n //return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n\n }", "public function index_get() {\n $id = (int) $this->get('id');\n $this->load->model('Equipe_model');\n\n if($id<=0){\n $retorno = $this->Equipe_model/*em*/->getAll();\n } else {\n $retorno = $this->Equipe_model->getOne($id);\n }\n\n $this->set_response($retorno,REST_Controller_Definitions::HTTP_OK);\n }", "public function index_get()\n {\n $config = array(\n 'id' => $this->get('id'),\n 'fields' => $this->get('fields'),\n 'type_id' => $this->get('type_id'),\n 'search' => $this->get('search'),\n 'limit' => $this->get('limit'),\n 'per_page' => $this->get('per_page'),\n 'page' => $this->get('page'),\n 'offset' => $this->get('offset'),\n 'order_type' => $this->get('order_type'),\n 'order_col' => $this->get('order_col')\n );\n\n //Validamos los permisos para crear usuarios\n if (!$this->ion_auth->is_admin()) \n {\n $this->response([\n 'status' => FALSE,\n 'message' => 'No tenés permisos'\n ], REST_Controller::HTTP_UNAUTHORIZED);\n }\n \n //Filtered rows\n $rows = $this->Rest_model->get($config);\n //Obtenemos el total\n $total_rows = $this->Rest_model->total();\n //Obtenemos la cuenta del total\n $count_query = $this->Rest_model->get($config, 1); //El 1 representa obtener el total de la query sin limite\n\n //Validamos que exista\n if($this->get('id') && empty($rows))\n {\n //Devolvemos un error en caso de que no exista\n $this->response([\n 'status' => FALSE,\n 'message' => 'El registro no existe'\n ], REST_Controller::HTTP_BAD_REQUEST);\n }\n\n //Traemos propiedades del objeto\n if(!empty($this->get('id')) && !empty($rows))\n {\n //$rows->assign = $this->Rest_model->get_assigned($config);\n }\n\n //Armamos la respuesta\n $response = array(\n 'data' => $rows,\n 'results' => array(\n 'recordsTotal' => $total_rows,\n 'recordsFiltered' => $count_query,\n )\n );\n \n //Si tenemos una respuesta con datos la devolvemos.\n if ($response)\n {\n $this->response($response, REST_Controller::HTTP_OK);\n }\n else\n {\n //Set the response and exit\n $this->response([\n 'status' => FALSE,\n 'message' => 'No se encontraron registros'\n ],REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n }", "function listarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_sel';\n\t\t$this->transaccion='GEM_GEMETO_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_metodologia','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function read(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function listodAction() \n { \n // valores iniciales formulario (C)\n $id = (int) $this->params()->fromRoute('id', 0); \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n $data = $this->request->getPost();\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new tipdocontrolo($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n $u->delRegistro($data->id); \n }\n $view = new ViewModel(); \n $this->layout('layout/blancoC'); // Layout del login\n return $view; \n\n }", "public function readAction(){\n\n //Pega o id do veiculo\n $veiculo = Application::getParam('id');\n if($veiculo === null){\n return json_encode(array(\n 'success' => false,\n 'message' => 'Veiculo é inválido ou não existe.',\n 'code' => 0\n ));\n }\n\n try {\n //Pega o veiculo solicitado\n $model = Veiculo::findOneBy(array('id' => $veiculo));\n }\n catch (\\Exception $e){\n\n //Caso algo dê errado, retorna uma menssagem de erro\n return json_encode(array(\n 'success' => false,\n 'message' => $e->getMessage(),\n 'code' => $e->getCode()\n ));\n }\n\n //Retorna os dados encontrados\n return json_encode(array(\n 'success' => true,\n 'data' => array($model->toArray()),\n 'total' => 1\n ));\n }", "public function Crud(){\n $pvd = new tutoria();\n\n //Se obtienen los datos del tutoria a editar.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Tutoria/editar-tutorias.php';\n\t}", "public function listoAction()\n {\n $form = new Formulario(\"form\");\n $id = (int) $this->params()->fromRoute('id', 0);\n $form->get(\"id\")->setAttribute(\"value\",\"$id\"); \n \n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new AlbumTable($this->dbAdapter); // ---------------------------------------------------------- 1 FUNCION DENTRO DEL MODELO (C) \n\n $dat = $u->getGeneral1(\"Select * from t_nivel_cargo where id = \".$id); \n\n $valores=array\n (\n \"titulo\" => 'Lista de chequeo asociada a '.$dat['nombre'],\n 'url' => $this->getRequest()->getBaseUrl(),\n \"datos\" => $u->getLcheq($id), \n \"datos2\" => $u->getLcheqTcon($id),\n \"form\" => $form,\n \"lin\" => $this->lin\n ); \n return new ViewModel($valores); \n \n }", "public function index()\n {\n return DB::table('contratos')\n ->join('imovels', 'contratos.id_imovel', '=', 'imovels.id')\n ->select('*','contratos.id as id_contrato')\n ->get();\n }", "public function Crud(){\n $pvd = new alumno();\n\n //Se obtienen los datos del alumno a editar.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Alumno/editar-alumnos.php';\n\t}", "public function index()\n {\n return $this->pedido->with(\n 'categoria',\n 'servico',\n 'envios',\n 'envios.prestador',\n 'interessados',\n 'interessados.prestador',\n 'situacao'\n )->where('ativo',1)->orderBy('id','DESC')->get();\n }", "abstract function get_crud_service();", "public static function getAll2(){\n\t\t$sql = \"select * from prueba\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "public function getEstadodos(){\n $consultaRolDos=\"SELECT id, nombre_rol FROM roles ordeR by id asc\";\n\n $this->getEstadodos=Yii::app()->db->createCommand($consultaRolDos)->queryAll();// consulta base de datos \n \n \n return $this->getEstadodos;// devuelve el valor de la funcion get \n }", "function rellenaDatos(){\n\n $stmt = $this->db->prepare(\"SELECT *\n\t\t\t\t\tFROM centro\n\t\t\t\t\tWHERE centro_id = ?\");\n\n $stmt->execute(array($this->centro_id));\n $centro = $stmt->fetch(PDO::FETCH_ASSOC);\n if($centro != null){\n\n return new CENTRO_Model($centro[\"centro_id\"], $centro[\"nombre_centro\"], $centro[\"edificio_centro\"]);\n\n }else{\n return 'Error inesperado al intentar cumplir su solicitud de consulta';\n }\n }", "public static function medicamentosApi()\n {\n $medicamentos = \\DB::select('SELECT id_medicamento, nombre_comercial, nombre_compuesto, solucion_tableta, tipo_contenido, dosis \n FROM tb_medicamentos');\n\n return $medicamentos;\n }", "public function Listar(){\n\n $motorista = new Motorista();\n\n return $motorista::Select();\n\n }", "public function obtener_colectivo();", "public static function getListado(){\n return Dispositivo::model()->findAll();\n }", "public function action() {\n\n $prod = new Produccion;\n\n $operacion = Input::get('oper');\n\n switch ($operacion) {\n\n case 'add':\n $prod->descripcion = Input::get('descripcion');\n $prod->cantidad = Input::get('cantidad');\n $prod->idanimal = Input::get('animal');\n $prod->estado = 1;\n $prod->save();\n $prod = DB::table('produccions as p')\n ->join('nacimientos as n','p.idanimal','=','n.id')\n ->select('p.id','p.descripcion','p.cantidad','n.nombre as animal')\n ->orderBy('p.id','desc')->take(1)->get();\n return $prod;\n break;\n\n case 'edit':\n $id = Input::get('id');\n $prod = Produccion::find($id);\n $prod->descripcion = Input::get('descripcion');\n $prod->cantidad = Input::get('cantidad');\n $prod->idanimal = Input::get('animal');\n $prod->save();\n $prod = DB::table('produccions as p')\n ->join('nacimientos as n','p.idanimal','=','n.id')\n ->select('p.id','p.descripcion','p.cantidad','n.nombre as animal')\n ->where('p.id',$id)->get();\n return $prod;\n break;\n\n case 'del':\n $id = Input::get('id');\n $prod = Produccion::find($id);\n $prod->estado = 0;\n $prod->save();\n break;\n }\n }", "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = new Consulta();\r\n $this->tipo=1;\r\n $form = $this->createCreateForm($entity,$this->tipo,0);\r\n $entities = $em->getRepository('DGPlusbelleBundle:Consulta')->findAll();\r\n\r\n return array(\r\n 'entities' => $entities,\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n 'tipo' => 1,\r\n );\r\n }", "public function List_client_Physique(){\n $req = self::list(\"SELECT * FROM client_physique\");\n return $req;\n }", "public function index()\n {\n return DB::table('generos')->get();\n }", "public function getById()\n {\n }", "public function getAction(){\n \t$user=Doctrine_Query::create()\n\t\t ->select(\"u.ID, u.nome,u.cognome,u.user,u.active,u.data_iscrizione,u.ID_role\")\n\t\t ->from(\"Users u\")\n\t\t ->addWhere(\"u.ID=?\",$this->getRequest()->getParam('id'))\n\t\t ->fetchOne(null,Doctrine::HYDRATE_ARRAY);\n $this->emitLoadData($user);\n }", "public function CreditoDao(){\n }", "public function getById() {}", "function index_get() {\n $id = $this->get('id_formk');\n if ($id == '') {\n $admintaxi = $this->db->get('t_form_kotamobagu')->result();\n } else {\n $this->db->where('id_formk', $id);\n $admintaxi = $this->db->get('t_form_kotamobagu')->result();\n }\n $this->response($admintaxi, 200);\n }", "public function listar(){\n\t\t$lista = Contato::select('id','nome','email','telefone')->get();\n\t\treturn $lista;\n\t}", "public function getOrm()\n {\n $user= User::first();\n dd($user->NombresCompletos,$user->profile->edad,$user->profile->Biografia);\n }", "function get($id) {\r\n //devuelve el objeto entero\r\n $parametros = array();\r\n $parametros[\"id\"] = $id;\r\n $this->bd->select($this->tabla, \"*\", \"id =:id\", $parametros);\r\n $fila = $this->bd->getRow();\r\n $mecanico = new Mecanico();\r\n $mecanico->set($fila);\r\n return $mecanico;\r\n }", "public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function listoAction() \n { \n $form = new Formulario(\"form\");\n // valores iniciales formulario (C)\n $id = $this->params()->fromRoute('id', 0);\n \n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter'); \n $d = new AlbumTable($this->dbAdapter);\n $pos = strpos($id, \".\"); \n $idIasp = substr($id, 0 , $pos ); // Id item aspectos \n $idCar = substr($id, $pos+1 , 100 ); // id Cargo\n $form->get(\"id\")->setAttribute(\"value\",$idIasp); \n $form->get(\"id2\")->setAttribute(\"value\",$idCar); \n \n if ($id==0)\n { \n $data = $this->request->getPost();\n $idIasp = $data->id; \n } \n $datos = $d->getGeneral(\"select a.*, b.nombre as nomAsp,c.texto, c.a, c.b, c.c, c.d, c.e, a.tipo \n from t_asp_cargo_i a \n inner join t_asp_cargo b on b.id=a.idAsp \n left join t_cargos_a c on c.idIasp=a.id \n where a.idAsp=\".$idIasp); \n \n // ------------------------ Fin valores del formulario \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n if ($request->isPost()) { \n \n $u = new CargosA($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n $d->modGeneral(\"Delete from t_cargos_a where idAsp=\".$data->id);\n //print_r($data);\n foreach ($datos as $dato){\n $idLc = $dato['id'];\n $nombre = '';\n if ($dato['tipo'] == 1)// Texto \n {\n $texto = '$data->text'.$idLc;\n eval(\"\\$nombre = $texto;\"); \n } \n $a = 0;$b = 0;$c = 0;$d = 0;$e = 0;\n if ($dato['tipo'] == 2)// Lista de opciones \n {\n $texto = '$data->comenNa'.$idLc;\n eval(\"\\$a = $texto;\"); \n $texto = '$data->comenNb'.$idLc;\n eval(\"\\$b = $texto;\"); \n $texto = '$data->comenNc'.$idLc;\n eval(\"\\$c = $texto;\"); \n $texto = '$data->comenNd'.$idLc;\n eval(\"\\$d = $texto;\"); \n $texto = '$data->comenNe'.$idLc;\n eval(\"\\$e = $texto;\"); \n }\n $u->actRegistro( $data->id2, $data->id, $dato['id'],$nombre, $a, $b, $c, $d, $e);\n }\n $this->flashMessenger()->addMessage('');\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'o/'.$data->id.\".\".$data->id2);\n } \n }else{ \n if ($id > 0) // Cuando ya hay un registro asociado\n {\n $u=new CargosA($this->dbAdapter); // ---------------------------------------------------------- 4 FUNCION DENTRO DEL MODELO (C) \n //$datos = $u->getRegistroId($id);\n } \n } \n $valores=array\n (\n \"titulo\" => $this->tfor,\n \"form\" => $form,\n \"datos\" => $datos, \n 'url' => $this->getRequest()->getBaseUrl(),\n 'id' => $id,\n 'idCar' => $idCar,\n \"ttablas\" => 'Aspecto, Item, Opciones',\n \"lin\" => $this->lin\n ); \n return new ViewModel($valores); \n }", "private function crear_get()\n {\n $item = $this->ObtenNewModel();\n\t\t$lModel = new CicloModel(); \n \n //Pasamos a la vista toda la información que se desea representar\n\t\t$data['TituloPagina'] = \"Añadir un grupo\";\n\t\t$data[\"Model\"] = $item;\n\t\t$data[\"ComboCiclos\"] = $lModel->ObtenerTodos();\n\n //Finalmente presentamos nuestra plantilla\n\t\theader (\"content-type: application/json; charset=utf-8\");\n $this->view->show($this->_Nombre.\"/crear.php\", $data);\n\t}", "public function crud() {\n\t\t\n\t\t$this->load->model('Produttori_model','produttori');\n\t\t$data=array(\"produttore\" => \"franco\");\n\t\t$this->produttori->create($data);\n\t\t$this->produttori->update(array(),1);\n\t\t$this->produttori->delete(3);\n\t\tvar_dump ($this->produttori->read());\n\t\t$this->load->view('welcome_message');\n\t}", "public function Crud(){\r\n \r\n // if(isset($_REQUEST['Seq_Registro'])){\r\n // $alm = $this->model->Obtener($_REQUEST['Seq_Registro']);\r\n // }\r\n \r\n // require_once 'view/header.php';\r\n // require_once 'view/Registro/Nuevo_registro.php';\r\n // require_once 'view/footer.php';\r\n require_once 'view/medics/create.php';\r\n }", "public function ormObject();", "public function index()\n {\n return $this->operadoras->all();\n }", "public function get($where = array()){\n // yapmak için kullanacagimiz kodlar gelecek\n\n }", "public function index()\n {\n //\n return $articulo = Articulo::all(); \n \n }", "function mostrar_operador(){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM operador WHERE id_op='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_op'];\n\t\t\t$this->apellido=$resultado['apellido_op'];\n\t\t\t$this->cedula=$resultado['cedula_op'];\n\t\t\t$this->correo=$resultado['correo_op'];\n\t\t\t$this->cantidad=$resultado['cantidad_op'];\n\t\t\t$this->fecha=$resultado['fecha_op'];\t\t\n}", "public function index()\n {\n return $this->tipoServico->with('categorias','categorias.servicos')->orderBy('id','DESC')->get();\n }", "function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }", "public function consultarAction()\n {\n $source = new Entity('CapacitacionBundle:Capacitador','grupo_capacitador');\n \n $grid = $this->get('grid');\n \n \n $grid->setId('grid_capacitador');\n $grid->setSource($source); \n \n // Crear\n $rowAction1 = new RowAction('Consultar', 'capacitador_show');\n $rowAction1->manipulateRender(\n function ($action, $row)\n {\n $action->setRouteParameters(array('id','pag'=> 1));\n return $action;\n }\n );\n $grid->addRowAction($rowAction1);\n\n //$grid->setDefaultOrder('fechaexpediente', 'desc');\n $grid->setLimits(array(5 => '5', 10 => '10', 15 => '15'));\n \n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Facilitadores\", $this->get(\"router\")->generate(\"pantalla_facilitadores\"));\n $breadcrumbs->addItem(\"Consultar facilitador\", $this->get(\"router\")->generate(\"hello_page\"));\n\n return $grid->getGridResponse('CapacitacionBundle:Capacitador:index.html.twig');\n }", "public function index()\n {\n return Procliente::all();\n }", "function listar2()\n\t{\n\t\t\n\t\t\t$permiso_sede = $this->session->userdata('sede');\n\t\t\t//GROCERY CRUD SETUP\n\t\t\t$crud = new grocery_CRUD();\n\t\t\t$crud->set_table('entregas');\n\t\t\t$crud->where('entregas.id_sede',$permiso_sede);\n\t\t\t$crud->set_language('spanish');\n\t\t\t$crud->set_relation('id_equipo','equipos','codigo_equipo');\n\t\t\t\t\t\n\t\t\t$crud->unset_delete();\n\t\t\t$crud->columns('id_insumo','id_equipo','id_sector','fecha_entrega','estado','observaciones','usuario_entrega');\n\t\t\t$crud->add_fields('id_sede','id_sector','estado','id_insumo','id_equipo','fecha_entrega','observaciones','nro_ticket','usuario_entrega', 'cantidad');\n\t\t\t\n\t\t\t$crud->display_as('id_insumo','Insumo')\n\t\t\t\t ->display_as('id_equipo','Equipo')\n\t\t\t\t ->display_as('id_sector','Sector');\n\t\t\t$crud->set_subject('Entrega');\n\t\t\t\n\t\t\t$crud->set_relation('id_insumo','Insumos','codigo_insumo');\n\t\t\t\n\t\t\t//anulo todas las acciones salvo agregar para usar solo el crud definido en listar\n\t\t\t $crud->unset_list(); \n\t\t\t $crud->unset_delete();\n \t $crud->unset_read();\n $crud->unset_edit();\n $crud->unset_export();\n $crud->unset_print();\n\t\t\t\n\t\t\t//por algun no olcutaba el campo preguntando si el estado era add y era a causa del relation... y como la necestio en list y edit lo deje asi\n\t\t\tif ($crud->getState() != 'add') \n{\n\t $crud->set_relation('estado','parametros','valor','nombre_parametro=\"estado_entrega\"');\n\t \n\t\n}\n// idem estado pero con sector\n\t\t\tif (($crud->getState() != 'add') and ($crud->getState() != 'edit'))\n{\n\t \n\t $crud->set_relation('id_sector','sectores','nombre_sector');\n\t\n}\n\n\t\t\tif ($crud->getState() == 'add') \n{\n\n$crud->change_field_type('id_sector','invisible');\n$crud->change_field_type('estado','invisible');\n $crud->change_field_type('id_sede','invisible');\n $crud->change_field_type('usuario_entrega','invisible');\n $crud->change_field_type('fecha_entrega','invisible');\n $crud->change_field_type('cantidad','invisible');\n \n}\n\t\t\tif ($this->grocery_crud->getState() == 'edit') \n{\n\t$uri = $this->uri->segment(3);\n $this->session->set_userdata('insumo_actual', $uri);\n $crud->change_field_type('id_sede','invisible');\n $crud->change_field_type('usuario_entrega','invisible');\n $crud->change_field_type('fecha_entrega','invisible');\n $crud->change_field_type('id_sector','invisible');\n $crud->change_field_type('cantidad','invisible');\n \t\n \n}\n\t\t\t\n\t\t\t//IF YOU HAVE A LARGE AMOUNT OF DATA, ENABLE THE CALLBACKS BELOW - FOR EXAMPLE ONE USER HAD 36000 CITIES AND SLOWERD UP THE LOADING PROCESS. THESE CALLBACKS WILL LOAD EMPTY SELECT FIELDS THEN POPULATE THEM AFTERWARDS\n\t\t\n\t\t $crud->callback_add_field('id_equipo', array($this, 'empty_state_dropdown_select1'));\n\t\t //si no viene del abm insumos la variable de arriba trae el valor \"add\" caso contrario trae id de insumo y ahi llamo al callback\n\t\t if ($this->uri->segment(3) != \"add\")\n\t\t {$crud->callback_add_field('id_insumo', array($this, 'carga_insumo1'));}\n\t\t\t\n\t\t\t$crud->callback_edit_field('id_equipo', array($this, 'empty_state_dropdown_select1'));\n\t\t\t$crud->callback_after_insert(array($this, 'after_insert1'));\n\t\t\t$crud->callback_before_update(array($this,'before_update1'));\n\t\t\t$crud->callback_before_insert(array($this,'before_insert1')); \t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\ttry {\n \n $output = $crud->render(); //this will raise an exception when the action is list\n\n //$this->template->load('template', 'default_view', $output);\n \n } catch (Exception $e) {\n\n if ($e->getCode() == 14) { //The 14 is the code of the error on grocery CRUD (don't have permission).\n //redirect using your user id\n redirect(strtolower(__CLASS__) . '/listar');\n \n } else {\n show_error($e->getMessage());\n return false;\n }\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\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t//DEPENDENT DROPDOWN SETUP\n\t\t\t$dd_data = array(\n\t\t\t\t//GET THE STATE OF THE CURRENT PAGE - E.G LIST | ADD\n\t\t\t\t'dd_state' => $crud->getState(),\n\t\t\t\t//SETUP YOUR DROPDOWNS\n\t\t\t\t//Parent field item always listed first in array, in this case countryID\n\t\t\t\t//Child field items need to follow in order, e.g stateID then cityID\n\t\t\t\t'dd_dropdowns' => array('id_insumo','id_equipo'),\n\t\t\t\t//SETUP URL POST FOR EACH CHILD\n\t\t\t\t//List in order as per above\n\t\t\t\t'dd_url' => array('', site_url().'/entregas/get_states1/'),\n\t\t\t\t//LOADER THAT GETS DISPLAYED NEXT TO THE PARENT DROPDOWN WHILE THE CHILD LOADS\n\t\t\t\t'dd_ajax_loader' => base_url().'ajax-loader.gif'\n\t\t\t);\n\t\t\t$output->dropdown_setup = $dd_data;\n\t\t\t$output->content_view='crud_content_view';\n\t\t\t$this->_example_output($output);\n\t}", "public function index()\n {\n return OrdenTrabajo::all();\n\n }", "public function obat_get()\n\t{\n\t\t$data = $this->Obat->getAllObat();\n\t\tif ($data) {\n\t\t\t$this->response($data,200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->response([\n\t\t\t\t'error'=>false,\n\t\t\t\t'message'=>'Obat kosong'\n\t\t\t],200);\n\t\t}\n\t}", "function TipoImagenDAO()\r\n {\r\n parent::DAO();\r\n return;\r\n }", "public function index()\n {\n $marcas = Modelo::with(['marca'])->orderBy('descripcion', 'asc')->get();\n return $marcas;\n }", "public function mi_orden()\n {\n //\n $id_user = \\Auth::user()->id;\n $orden = DB::table('ordens')\n ->join('users', 'users.id','ordens.id_usuario')\n ->join('servicios', 'servicios.id','ordens.id_servicio')\n ->select('ordens.id','ordens.estado','users.name','servicios.titulo')\n ->Where('users.id',$id_user)\n ->Orderby('servicios.id','desc')->paginate(2);\n //dd($orden);\n return view('orden.mi_orden')->with('orden',$orden);\n\n //return response()->json($servicios);\n\n //return view('servicio.edit')->with('servicios',$servicios);\n }", "public function index()\n {\n Log::info(\"Produtos listados\");\n $produtos = Produto::paginate(10);\n return ProdutoResource::collection($produtos);\n\n }", "public function getAll()\n {\n\n }", "public function getAll()\n {\n\n }", "public function index()\n {\n return ParamedicResource::collection(Paramedic::all());\n }", "public function run()\n {\n\t\tif(isset($_GET['id'])){\n\t\t\t$id = $_GET['id'];\n\t\t}\n\t\telse{\n\t\t\t$id = '';\n\t\t}\n\t\t\n\t\tif($id != \"\"){\n\t\t\t$catalogo = Catalogos::model()->findByPk($id);\n\t\t}\n\t\telse{\n\t\t\t$catalogo = new Catalogos;\n\t\t}\n\t\t\n\t\tif(isset($_POST['Catalogos'])){\n\t\t\t$catalogo->attributes = $_POST['Catalogos'];\n\t\t\t$catalogo->save();\n\t\t\t$id = $catalogo->id;\n\t\t\t$this->controller->redirect(Yii::app()->createUrl('/administracion/default/formCatalogo/', array('id' => $id)));\n\t\t}\n\t\t\n\t\tif(isset($_GET['producto'])){\n\t\t\t$producto = $_GET['producto'];\n\t\t}\n\t\telse{\n\t\t\t$producto = '';\n\t\t}\n\t\t\n\t\tif(isset($_GET['accion'])){\n\t\t\t$accion = $_GET['accion'];\n\t\t}\n\t\telse{\n\t\t\t$accion = '';\n\t\t}\n\t\t\n\t\tif(isset($_GET['despues'])){\n\t\t\t$despues = $_GET['despues'];\n\t\t}\n\t\telse{\n\t\t\t$despues = '';\n\t\t}\n\t\n if(isset($_GET['nombre'])){\n\t\t\t$nombre = $_GET['nombre'];\n\t\t}\n\t\telse{\n\t\t\t$nombre = '';\n\t\t}\n\t\t\n\t\tif(isset($_GET['minimo'])){\n\t\t\t$minimo = str_replace(\".\", \"\", $_GET['minimo']);\n\t\t\t$minimo_ingresado = $_GET['minimo'];\n\t\t}\n\t\telse{\n\t\t\t$minimo = '';\n\t\t\t$minimo_ingresado = '';\n\t\t}\n\t\t\n\t\tif(isset($_GET['maximo'])){\n\t\t\t$maximo = str_replace(\".\", \"\", $_GET['maximo']);\n\t\t\t$maximo_ingresado = $_GET['maximo'];\n\t\t}\n\t\telse{\n\t\t\t$maximo = '';\n\t\t\t$maximo_ingresado = '';\n\t\t}\n\t\t\n\t\tif(isset($_GET['estado'])){\n\t\t\t$estado = $_GET['estado'];\n\t\t}\n\t\telse{\n\t\t\t$estado = 1;\n\t\t}\n\t\t\n\t\tif(isset($_GET['tipo'])){\n\t\t\t$tipo = $_GET['tipo'];\n\t\t}\n\t\telse{\n\t\t\t$tipo = '';\n\t\t}\n\t\t\n\t\tif(isset($_GET['linea'])){\n\t\t\t$linea = $_GET['linea'];\n\t\t}\n\t\telse{\n\t\t\t$linea = '';\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$errores = '';\n\t\t//Calculo de errores\n\t\tif($minimo != '' && !is_numeric($minimo)){\n\t\t\t$minimo = '';\n\t\t\t$errores = $errores . \"- Desde debe ser un valor numerico<br>\";\n\t\t}\n\t\tif($maximo != '' && !is_numeric($maximo)){\n\t\t\t$maximo = '';\n\t\t\t$errores = $errores . \"- Hasta debe ser un valor numerico<br>\";\n\t\t}\n\t\t//Fin del calculo de errores\n\t\tif($errores != ''){\n\t\t\t$errores = '<div class=\"alert alert-warning\" role=\"alert\">' . $errores . '</div>';\n\t\t}\n\t\t\n\t\tif($minimo == ''){\n\t\t\t$min = -1;\n\t\t}\n\t\telse{\n\t\t\t$min = $minimo;\n\t\t}\n\t\t\n\t\tif($maximo == ''){\n\t\t\t$max = 1000000000;\n\t\t}\n\t\telse{\n\t\t\t$max = $maximo;\n\t\t}\n\t\t\n\t\tif($producto != ''){\n\t\t\t$this->aplicar($id, $producto, $accion, $despues);\n\t\t\tunset($_GET['producto']);\n\t\t}\n\t\t\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->compare('id_catalogo', $id);\n\t\t$criteria->order = 'posicion ASC';\n\t\t$productos_catalogo_ids = ProductosCatalogo::model()->findAll($criteria); \n\t\t$productos_catalogo = new CActiveDataProvider(new ProductosCatalogo, array('criteria' => $criteria));\n\t\t\n\t\t$ids = array();\n\t\tforeach($productos_catalogo_ids as $i){\n\t\t\t$ids[] = $i['id_producto'];\n\t\t}\n\t\t\n\t\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->addCondition('precio_producto >= ' . $min . ' AND precio_producto <= ' . $max);\n\t\t$criteria->addCondition('nombre_producto LIKE \"%'. $nombre . '%\"');\n\t\t$criteria->addNotInCondition('id', $ids);\n\t\t$criteria->compare('estado_producto', $estado);\n\t\t$criteria->compare('id_tipo_producto', $tipo);\n\t\t$criteria->compare('id_linea_producto', $linea);\n\t\t\n\t\t$reporte = new CActiveDataProvider(new Productos, array('criteria' => $criteria));\n\t\t\n\t\t$tipos = CHtml::listData(TiposProducto::model()->findAll(), 'id', 'nombre_tipo_producto');\n\t\t$tipos[\"\"] = 'Todas los tipos';\n\t\tksort($tipos);\n\t\t\n\t\t$lineas = CHtml::listData(LineasProducto::model()->findAll(), 'id', 'nombre_linea_producto');\n\t\t$lineas[\"\"] = 'Todas las lineas';\n\t\tksort($lineas);\n\t\t\n\t\t\n\n $this->controller->render('formulario_catalogos',array(\n\t\t\t'nombre' => $nombre,\n\t\t\t'minimo' => $minimo,\n\t\t\t'maximo' => $maximo,\n\t\t\t'estado' => $estado,\n\t\t\t'tipo' => $tipo,\n\t\t\t'linea' => $linea,\n\t\t\t'errores' => $errores,\n\t\t\t'id' => $id,\n\t\t\t'producto' => $producto,\n\t\t\t'catalogo' => $catalogo,\n\t\t\t'dataProvider' => $reporte,\n\t\t\t'productos_catalogo' => $productos_catalogo,\n\t\t\t'tipos' => $tipos,\n\t\t\t'lineas' => $lineas,\n ));\n }", "public function preparatoriaOrdenByInstitucion_get()\n {\n if (count($this->get())>1) {\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"Too many data was sent\",\n \"validations\" =>array(\n \"id\"=>\"send Id (get) to get specific item or empty to get all items \"\n ),\n \"data\"=>null\n );\n }else{\n \n $query = $this->db->query(\"select * from Vw_Prep group by idInstitucion\")->result();\n \n\n if ($query) {\n $response = array(\n \"status\" => \"success\",\n \"status_code\" => 201,\n \"message\" => \"Articulo cargado correctamente\",\n \"validations\" =>null,\n \"data\"=>$query\n );\n }else{\n $response = array(\n \"status\" => \"error\",\n \"status_code\" => 409,\n \"message\" => \"No datos proveidos\",\n \"validations\" =>null,\n \"data\"=>null\n );\n }\n \n \n }\n $this->response($response,200);\n }", "public function index(){\n\n\t\t$model = new CursoModel();\n \n \n\t\t$data['cursos'] = $model->orderBy('id', 'DESC')->findAll();\n\n\t\treturn $this->respond($data);\n }", "public function index()\n {\n $trabajos = Trabajo::orderBy('id','desc')->get();\n return TrabajoResource::collection($trabajos);\n }", "public function index()\n {\n $tipocambios = TipoCambio::with('monedade','monedaa')->orderBy('fecha_registro','DESC')->where('activo',true)->get();\n return $tipocambios; \n }", "public function index()\n {\n //\n return Paciente::all();\n }", "public function getModelo(){ return $this->modelo;}", "public function index()\n {\n return Operation::all();\n }", "public function opini()\n {\n \n $this->db->select('*');\n $this->db->from('opini');\n \n $query = $this->db->get();\n return $query;\n }", "function insertarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function query()\n {\n $insumo_query = Insumo::query();\n # OBRA\n $obra = Obra::find($this->request()->get('obra_id'));\n $insumos = $insumo_query->join('orcamentos', 'orcamentos.insumo_id', '=', 'insumos.id')\n ->where('orcamentos.obra_id', $this->request()->get('obra_id'))\n ->where('orcamentos.ativo', 1);\n\n // Verificar se existe OC aberta deste usuário ou se ele está editando alguma OC (SESSÃO)\n\n #dando prioridade a sessão\n $ordem = null;\n// \\Session::forget('ordemCompra');\n// \\Session::flush('ordemCompra');\n// dd(\\Session::get('ordemCompra'));\n if(\\Session::get('ordemCompra')){\n $ordem = OrdemDeCompra::where('id', \\Session::get('ordemCompra'))\n ->where('oc_status_id', 1)\n ->where('user_id', Auth::user()->id)\n ->where('obra_id', $obra->id)->first();\n }else {\n $ordem = OrdemDeCompra::where('oc_status_id', 1)\n ->where('user_id', Auth::user()->id)\n ->where('obra_id', $obra->id)->first();\n }\n\n $insumos->select(\n [\n 'insumos.id',\n 'insumos.codigo',\n 'insumos.nome',\n DB::raw(\"format(orcamentos.qtd_total,2,'de_DE') as qtd_total\"),\n DB::raw(\"CONCAT(insumos_sub.codigo,' - ' ,insumos_sub.nome) as substitui\"),\n 'orcamentos.id as orcamento_id',\n 'insumos.unidade_sigla',\n 'insumos.insumo_grupo_id',\n 'orcamentos.obra_id',\n 'orcamentos.grupo_id',\n 'orcamentos.subgrupo1_id',\n 'orcamentos.subgrupo2_id',\n 'orcamentos.subgrupo3_id',\n 'orcamentos.servico_id',\n 'orcamentos.preco_total',\n 'orcamentos.preco_unitario',\n 'orcamentos.insumo_incluido',\n 'orcamentos.orcamento_que_substitui',\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.grupo_id = grupos.id) AS tooltip_grupo'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo1_id = grupos.id) AS tooltip_subgrupo1'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo2_id = grupos.id) AS tooltip_subgrupo2'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo3_id = grupos.id) AS tooltip_subgrupo3'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n servicos\n WHERE\n orcamentos.servico_id = servicos.id) AS tooltip_servico'),\n DB::raw('format((\n orcamentos.qtd_total \n -\n (\n IFNULL(\n (\n SELECT sum(ordem_de_compra_itens.qtd) FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = orcamentos.insumo_id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 1\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compra_itens.data_dispensa IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n ),0\n )\n )\n -\n (\n IFNULL(\n IFNULL(\n (\n SELECT sum(ordem_de_compra_itens.valor_total) FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE \n ordem_de_compra_itens.insumo_id in\n (\n SELECT \n insumo_id\n FROM\n orcamentos as OrcSub\n WHERE\n OrcSub.orcamento_que_substitui = orcamentos.id\n )\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 1\n )\n AND ordem_de_compra_itens.data_dispensa IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n ),0\n ),0\n \n / orcamentos.preco_unitario\n \n )\n )\n ),2,\\'de_DE\\') as saldo'),\n // Colocar a OC se existir em aberto ou em sessão\n DB::raw('format((\n SELECT ordem_de_compra_itens.qtd FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n ),2,\\'de_DE\\') as quantidade_compra'),\n DB::raw('format((\n SELECT ordem_de_compra_itens.qtd FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n ),2,\\'de_DE\\') as quantidade_comprada'),\n DB::raw('(SELECT total FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.aprovado IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n AND ordem_de_compra_itens.obra_id ='. $obra->id .' ) as total'),\n DB::raw('(SELECT motivo_nao_finaliza_obra FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.aprovado IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n AND ordem_de_compra_itens.obra_id ='. $obra->id .' ) as motivo_nao_finaliza_obra'),\n ]\n )\n ->whereNotNull('orcamentos.qtd_total')\n ->where(DB::raw('IFNULL(\n (SELECT\n ordem_de_compras.oc_status_id\n FROM\n ordem_de_compra_itens\n JOIN\n ordem_de_compras ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE\n ordem_de_compra_itens.insumo_id = orcamentos.insumo_id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (ordem_de_compra_itens.aprovado IS NULL\n OR ordem_de_compra_itens.aprovado = 1)\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id = '. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n AND orcamentos.orcamento_que_substitui IS NOT NULL\n LIMIT 1\n )\n , 1)'), 1)\n ->where('orcamentos.ativo', 1);\n\n $insumo_query->leftJoin(DB::raw('orcamentos orcamentos_sub'), 'orcamentos_sub.id', 'orcamentos.orcamento_que_substitui');\n //ex: left join insumos insumos_sub on `insumos_sub`.`id` = `orcamentos_sub`.`insumo_id` \n\t\t$insumo_query->leftJoin(DB::raw('insumos insumos_sub'), 'insumos_sub.id', 'orcamentos_sub.insumo_id');\n\t\t$insumo_query->leftJoin(DB::raw('carteira_insumos'), 'insumos.id', 'carteira_insumos.insumo_id');\n\t\t$insumo_query->leftJoin(DB::raw('carteiras'), 'carteiras.id', 'carteira_insumos.carteira_id');\n\n if ($this->request()->get('grupo_id')) {\n if (count($this->request()->get('grupo_id')) && $this->request()->get('grupo_id')[0] != \"\") {\n $insumo_query->where('orcamentos.grupo_id', $this->request()->get('grupo_id'));\n }\n }\n\n if($this->request()->get('subgrupo1_id')){\n if(count($this->request()->get('subgrupo1_id')) && $this->request()->get('subgrupo1_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo1_id', $this->request()->get('subgrupo1_id'));\n }\n }\n if($this->request()->get('subgrupo2_id')){\n if(count($this->request()->get('subgrupo2_id')) && $this->request()->get('subgrupo2_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo2_id', $this->request()->get('subgrupo2_id'));\n }\n }\n if($this->request()->get('subgrupo3_id')){\n if(count($this->request()->get('subgrupo3_id')) && $this->request()->get('subgrupo3_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo3_id', $this->request()->get('subgrupo3_id'));\n }\n }\n if($this->request()->get('servico_id')){\n if(count($this->request()->get('servico_id')) && $this->request()->get('servico_id')[0] != \"\") {\n $insumo_query->where('orcamentos.servico_id', $this->request()->get('servico_id'));\n }\n }\n if($this->request()->get('planejamento_id')){\n if(count($this->request()->get('planejamento_id')) && $this->request()->get('planejamento_id')[0] != \"\") {\n $insumo_query->join('planejamento_compras', function ($join) {\n $join->on('planejamento_compras.grupo_id', 'orcamentos.grupo_id');\n $join->on('planejamento_compras.subgrupo1_id', 'orcamentos.subgrupo1_id');\n $join->on('planejamento_compras.subgrupo2_id', 'orcamentos.subgrupo2_id');\n $join->on('planejamento_compras.subgrupo3_id', 'orcamentos.subgrupo3_id');\n $join->on('planejamento_compras.servico_id', 'orcamentos.servico_id');\n $join->on('planejamento_compras.insumo_id', 'orcamentos.insumo_id');\n })\n ->where('planejamento_compras.planejamento_id', $this->request()->get('planejamento_id'))\n ->whereNull('planejamento_compras.deleted_at');\n }\n }\n\t\t\n if($this->request()->get('insumo_grupos_id')){\n if(count($this->request()->get('insumo_grupos_id')) && $this->request()->get('insumo_grupos_id')[0] != \"\") {\n $insumo_query->where('insumos.insumo_grupo_id', $this->request()->get('insumo_grupos_id'));\n }\n }\n\t\t\n\t\tif($this->request()->get('carteira_id')){\n if(count($this->request()->get('carteira_id')) && $this->request()->get('carteira_id')[0] != \"\") {\n $insumo_query->where('carteiras.id', $this->request()->get('carteira_id'));\n }\n }\n\n//\t\tif($this->request()->get('exibir_por_carteira')){\n// if(count($this->request()->get('exibir_por_carteira')) && $this->request()->get('exibir_por_carteira')[0] != \"\") {\n// $insumo_query->groupBy('carteiras.nome');\n// }\n// }\n\n Session::put(['query['.$this->request()->get('random').']' => $insumo_query->toSql(), 'bindings['.$this->request()->get('random').']' => $insumo_query->getBindings()]);\n\n return $this->applyScopes($insumo_query);\n }", "public function modelFetchAll(){\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van, tra ket qua ve mot object\n\t\t\t$query = $conn->query(\"select * from phongban\");\n\t\t\t//tra ve tat ca cac ban ghi\n\t\t\treturn $query->fetchAll();\n\t\t}", "public function listar(){\n\t\t$sql = \"SELECT * FROM cargo\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function indexAction() {\n//\n// $db = Zend_Db_Table::getDefaultAdapter();\n// \n// $select = $db->select()->from('autenticacao');\n//\n// print_r($select->query()->fetchAll());\n //$sql = 'select * from autenticacao';\n // action body\n //$gerador = new Numenor_Gerador();\n //$this->view->dadosBanco = Zend_Json::encode($gerador->getEstruturaBanco());\n }", "public function listarTodos_get(){\n $data = $this->Aluno->getAlunos();\n $this->response($data, REST_Controller::HTTP_OK);\n \n }", "public function index()\n {\n return response()->json(Receta::with('ingredientes','comedor')->get());\n }", "public function index()\n {\n return ObatMasuk::with('jenisObat','stokObat')->get();\n }", "public function index()\n {\n return Contatos::orderBy('id', 'DESC')->get();\n }", "public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function query() {\n\n }", "public function listdAction() \n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if ($id > 0)\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new Novedades($this->dbAdapter); // ---------------------------------------------------------- 5 FUNCION DENTRO DEL MODELO (C) \n // Buscar id del tipo del tipo de novedad\n $d=new AlbumTable($this->dbAdapter);\n $datos = $d->getGeneral1(\"select c.id from n_novedades a \n inner join n_tip_matriz c on c.id = a.idMatz \n where a.id = \".$id); \n // INICIO DE TRANSACCIONES\n $connection = null;\n try \n {\n $connection = $this->dbAdapter->getDriver()->getConnection();\n $connection->beginTransaction(); \n\n $d->modGeneral(\"delete from n_novedades_cuotas where idInov=\".$id);\n $u->delRegistro($id);\n \n $connection->commit();\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin.'a/'.$datos['id']);\n }// Fin try casth \n catch (\\Exception $e) \n {\n if ($connection instanceof \\Zend\\Db\\Adapter\\Driver\\ConnectionInterface) {\n $connection->rollback();\n echo $e;\n } \n /* Other error handling */\n }// FIN TRANSACCION \n \n } \n }", "function getById($dato=null){\n $id=$dato[0];\n $alumno=$this->model->getById($id);\n\n session_start();\n $_SESSION['id_Alumno']=$alumno->id;\n\n //renderizando la vista de detalles\n $this->view->alumno=$alumno;\n $this->view->render('alumno/detalle');\n }", "public function getFromDB() {}", "public function find(){\n $this->resultado = Load::model('menu')->find();\n }", "public function readTask(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore \n INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine \n WHERE stato = 1\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function mojeObjave(){\n $korisnik = $this->session->get('korisnik');\n $objavaModel = new ObjavaModel();\n \n $data = [\n 'prikaz' => 'moje_objave',\n 'objave' => $objavaModel->where('idKor',$korisnik->idKor)->paginate(10),\n 'pager' => $objavaModel->pager,\n ];\n \n $this->prikaz('prikazPoStranicama', $data);\n \n }", "public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}", "public function index()\n {\n \n //$etudiants = Etudiant::paginate(1);\n $etudiants = Etudiant::All();\n return EtudiantResource::collection($etudiants); \n\n }", "public function unico(){\n $this->execute();\n return $this->statemet->fetch(PDO::FETCH_OBJ);\n }", "public function model()\n {\n return Pedidos::class;\n }", "public function readTaskc(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore \n INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine WHERE stato = 2\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "public function getOne(){\n //hacemos la consulta y lo guardamos en una variable\n $producto=$this->db->query(\"SELECT * FROM pedidos where id={$this->getId()};\");\n //devolvemos un valor en especifico y lo comvertimos a un objeto completamente usable.\n return $producto->fetch_object();\n }", "function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}", "public function listarProductos()\n {\n $crudProducto = new crudProducto(); //metodo para hacer la peticion de modelo producto\n return $crudProducto->listarProductos(); //retornar los valores del metodo listar productos\n }", "public function modelFetch(){\n\t\t\t$maphongban = isset($_GET[\"maphongban\"])&&is_numeric($_GET[\"maphongban\"])?$_GET[\"maphongban\"]:0;\n\t\t\t//lay bien ket noi de thao tac csdl\n\t\t\t$conn = Connection::getInstance();\n\t\t\t//thuc hien truy van, tra ket qua ve mot object\n\t\t\t$query = $conn->query(\"select * from phongban where maphongban=$maphongban\");\n\t\t\t//tra ve mot ban ghi\n\t\t\treturn $query->fetch();\n\t\t}", "public function getEntity();", "public function getEntity();", "public function getEntity();", "public function consultar()\r\n {\r\n $id = $_GET['id'];\r\n\r\n //criando conexão com o banco\r\n $q = new QueryBuilder();\r\n\r\n //selecionando dados\r\n $dados = $q->selectinner2($id);\r\n\r\n \r\n\r\n //devolvendo a pagina \r\n require './app/views/consultar.php';\r\n\r\n \r\n\r\n \r\n }", "public function readById($id){\n $sql = 'SELECT * FROM wp_operatore_museale WHERE id_operatore_museale='.$id;\n $result = $this->conn->query($sql);\n if($result->num_rows > 0){\n while($row = $result->fetch_assoc()){\n $operatore = new OperatoreMuseale($row['id_operatore_museale'], $row['nome'], $row['username'], $row['password'], $row['email'], $row['museo']);\n }\n }\n return $operatore;\n }", "public function index()\n {\n //\n return DetalleProporcionPaciente::all();\n }", "public function listarc()\n {\n $sql = \"SELECT * FROM miembros \n \";\n\n return ejecutarConsulta($sql);\n }" ]
[ "0.65438277", "0.6286162", "0.6203246", "0.6136779", "0.6130141", "0.61199343", "0.61191875", "0.61059785", "0.60917425", "0.60915697", "0.6035511", "0.60186267", "0.6012171", "0.5983874", "0.59832597", "0.5963041", "0.5961838", "0.5955806", "0.59425634", "0.5934134", "0.5932308", "0.5920174", "0.59186524", "0.5906545", "0.5869683", "0.5869625", "0.5868738", "0.5864168", "0.5859943", "0.5834989", "0.5832537", "0.5831924", "0.5815499", "0.58088833", "0.57980347", "0.577866", "0.57765543", "0.5774801", "0.5773444", "0.57729304", "0.5765999", "0.5764547", "0.5744332", "0.5738347", "0.57375133", "0.5731509", "0.57266104", "0.5721711", "0.57192713", "0.5718556", "0.57173926", "0.5715361", "0.5714112", "0.57013994", "0.56859106", "0.56826025", "0.56787306", "0.56787306", "0.56780314", "0.56656253", "0.56649786", "0.5664446", "0.56554514", "0.5654575", "0.565377", "0.5650748", "0.5649895", "0.5646701", "0.5643312", "0.5642817", "0.5641752", "0.5640302", "0.56399715", "0.5635308", "0.5627128", "0.5627038", "0.562678", "0.5623125", "0.5623014", "0.56225944", "0.56169426", "0.56146777", "0.56112283", "0.56094915", "0.5595507", "0.5594444", "0.55914533", "0.55905724", "0.558348", "0.55777484", "0.5576183", "0.55754", "0.5574451", "0.55701315", "0.5569031", "0.5569031", "0.5569031", "0.55690086", "0.55687696", "0.55677", "0.5567603" ]
0.0
-1
In order to provide lazy loading initializing on the configuration values (initialization will happen only on requests that the extension is required) each public method of the resolver must call this method first to verify that configuration values are set correctly.
protected function initialize() { if(!$this->initialized) { $configuration = $this->merge($this->raw,$this->defaultRawConfiguration()); foreach($configuration['types'] as $type) { $this->parsed['type'][$type['name']] = $type['values']; $this->priorities['type'] = array_merge($this->priorities['type'],$type['values']); if(!isset($this->defaults['type'])) { $this->defaults['type'] = new NegotiationResult($type['name'],$type['values'][0]); } } $this->parsed['headers'] = $configuration['headers']; $this->initialized = true; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function ensureConfiguration(): void {\n if (!$this->_isInitialized) {\n $this->configure();\n $this->_isInitialized = true;\n }\n }", "protected function initializeConfiguration() {}", "private function initConfig() {\n\t\t$configLoader = new ConfigLoader($this->_env);\n\n /** set config to Di container */\n $this->_di->set('config', $configLoader, TRUE);\n $this->_config = $configLoader;\n\t}", "public function initialize()\n {\n if (!$this->checked) {\n $this->config->checkConfig();\n $this->checked = true;\n $this->data = $this->config->get($this->path, $this->default);\n }\n }", "public function init(): void\n {\n $resolver = new OptionsResolver();\n $extensions = [];\n $config = [];\n\n if (empty($this->extensionClasses) && empty($this->config)) {\n return;\n }\n\n foreach ($this->extensionClasses as $extensionClass) {\n if (!class_exists($extensionClass)) {\n throw new \\InvalidArgumentException(sprintf(\n 'Extension class \"%s\" does not exist',\n $extensionClass\n ));\n }\n\n $extension = new $extensionClass();\n\n if (!$extension instanceof ExtensionInterface) {\n throw new \\InvalidArgumentException(sprintf(\n // add any manually specified extensions\n 'Extension \"%s\" must implement the PhpBench\\\\Extension interface',\n get_class($extension)\n ));\n }\n\n $extensions[] = $extension;\n $extension->configure($resolver);\n }\n\n $diff = array_diff(array_keys($this->config), array_keys($this->config));\n\n if ($diff) {\n throw new \\InvalidArgumentException(sprintf(\n 'Unknown configuration keys: \"%s\". Permitted keys: \"%s\"',\n implode('\", \"', $diff),\n implode('\", \"', array_keys($this->config))\n ));\n }\n\n try {\n $this->config = $resolver->resolve($this->config);\n } catch (ExceptionInterface $resolverException) {\n throw new InvalidConfigurationException(sprintf(\n 'Invalid user configuration: %s',\n $resolverException->getMessage()\n ), 0, $resolverException);\n }\n\n foreach ($extensions as $extension) {\n $extension->load($this);\n }\n }", "public function _initConfig() {\r\n $this->config = Yaf\\Application::app()->getConfig();\r\n Yaf\\Registry::set(\"config\", $this->config);\r\n\r\n //申明, 凡是以Foo和Local开头的类, 都是本地类\r\n $this->loader = Yaf\\Loader::getInstance();\r\n $this->loader->registerLocalNamespace([\"fly\"]);\r\n }", "protected function setUpConfigurationData() {}", "private function init() {\n\n\t\tif ( ! $this->should_load() ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->setup_admin();\n\t\t$this->setup_api();\n\t}", "public function init() {\n //TODO override and put config intialization code here\n }", "abstract protected function loadConfig();", "public function initializeConfiguration(){\n //initial Configured autoload\n if(count($GLOBALS['config']['autoload']))\n self::autoload($GLOBALS['config']['autoload']);\n\n\n }", "abstract protected function preConfigure();", "function initialize() {\n $this->_configure = $this->config->item('biz_listing_configure');\n $this->_pagination = $this->config->item('pagination');\n $this->_validation = $this->config->item('biz_listing_validation');\n }", "protected function setUp()\n {\n $this->configure(new Loaded(), 'Loaded', true, false);\n }", "protected function _initPhpConfig()\n {\n }", "protected function _extensionLoaded() {}", "protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }", "public function setupConfig()\n {\n registry::getInstance()->set('config', $this->parseConfig());\n }", "public function populateLocalConfiguration() {}", "public function _before_init(){}", "public function init()\n {\n $this->rootPageUid = $this->filterConfig->getSettings('rootPageUid');\n $this->respectEnableFields = $this->filterConfig->getSettings('respectEnableFields');\n $this->respectDeletedField = $this->filterConfig->getSettings('respectDeletedField');\n }", "public function initialize() {\r\n\t\tparent::initialize();\r\n\t\t$this->settings = $this->pluginSettingsDemandService->getSettings();\r\n\t}", "private function initOptions()\n {\n $this->optionsResolver->setDefaults([\n 'collection' => [],\n ]);\n\n $this->optionsResolver->setAllowedTypes('collection', 'array');\n }", "protected function getConfiguration() {}", "function __construct() {\n //invoke the init method of the config object in context\n $this->init();\n }", "public static function init() {\n Cin::checkConfigVo();\n Cin::$manager->init();\n }", "protected function init()\n { \n // get remote config\n $this->_remoteConfig = Mage::helper('shoptimally_core/remoteConfig');\n \n // calculate enabled status\n $this->_isEnabled = ($this->getGeneralSetting('ShoptimallyEnabled')) &&\n (strlen($this->getApiKey()) > 0) &&\n $this->_remoteConfig->get(\"enabled\");\n \n // init shoptimally domain\n $this->_shoptimallyDomain = $this->_remoteConfig->get('shoptimally_domain');\n if (is_null($this->_shoptimallyDomain) || \n strlen($this->_shoptimallyDomain) == 0)\n {\n $this->_shoptimallyDomain = \"api1.shoptimally.com\"; \n }\n }", "protected function init()\n {\n $this->urlParams = array();\n $this->methodArguments = array();\n $this->lang = self::LANG_POLISH;\n $this->basePath = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.self::BASE_FOLDER.DIRECTORY_SEPARATOR;\n $this->loadConfig();\n }", "protected function init()\n {\n if (null !== $this->config) {\n return;\n }\n\n $cache = $this->getCache();\n $cacheKey = $this->getCacheKey();\n\n if ($cache->isValid($cacheKey, $this->getTimestamp())) {\n $config = $cache->read($cacheKey);\n } else {\n $config = $this->parse();\n $cache->write($cacheKey, $config, $this->getPaths());\n }\n\n $this->config = new Config($config);\n }", "public function __construct() {\n\n $this->loadConfig();\n\n }", "public static function __classLoaded()\n {\n if (!self::$issuer) {\n self::$issuer = Site::getConfig('primary_hostname');\n }\n }", "public static function init() {\n static::registerSettings();\n }", "public static function provideOnResourceLoaderGetConfigVars() {\n\t}", "private function loadConfiguration()\n {\n if (!Configuration::configurationIsLoaded()) {\n Configuration::loadConfiguration();\n }\n }", "public static function _init()\n\t{\n\t\tLang::load('pagination', true);\n\t\tConfig::load('hybrid', 'hybrid');\n\t}", "private function initialiseConfig()\n {\n $this->mergeConfigFrom(__DIR__ . '/..' . Settings::LARAVEL_REAL_CONFIG, Settings::LARAVEL_CONFIG_NAME);\n }", "public function __construct()\n {\n // get global configuration\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['roadworks']);\n if (is_array($extConf) && count($extConf)) {\n // call setter method foreach configuration entry\n foreach($extConf as $key => $value) {\n $methodName = 'set' . ucfirst($key);\n if (method_exists($this, $methodName)) {\n $this->$methodName($value);\n }\n }\n }\n }", "protected static function getConfigurationManager() {}", "public function isInitialized() {}", "public function isInitialized() {}", "abstract protected function configure();", "abstract protected function configure();", "protected function getExtbaseConfiguration() {}", "protected function _beforeInit() {\n\t}", "protected function loadSettings() {}", "protected function init()\n {\n $this->registerExtensions();\n }", "protected function loadSettings() {}", "protected function loadSettings() {}", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }" ]
[ "0.6536456", "0.6534109", "0.65053105", "0.6185725", "0.61296546", "0.59902954", "0.5978078", "0.5977943", "0.59682727", "0.5943293", "0.592263", "0.5905164", "0.5899797", "0.5882632", "0.5868527", "0.5867208", "0.5856459", "0.5836755", "0.58293176", "0.5818244", "0.57902795", "0.5789723", "0.575906", "0.575052", "0.5742612", "0.572459", "0.5713593", "0.5712265", "0.5710563", "0.57077587", "0.5697985", "0.5695091", "0.56871754", "0.56758004", "0.5659448", "0.56530654", "0.56525964", "0.5649074", "0.5648977", "0.5648977", "0.5646449", "0.5646449", "0.5643973", "0.56315964", "0.56257373", "0.56256735", "0.5625445", "0.5625445", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884", "0.56181884" ]
0.0
-1
Merges the defined extension configuration with the default values.
protected function merge(array $rawConfiguration, array $defaultConfiguration) { foreach($defaultConfiguration as $section=>$configuration) { if($this->isNegotiationConfiguration($section)) { if(isset($rawConfiguration[$section])) { if(count($rawConfiguration[$section]) > 0) { $defaultConfiguration[$section] = $rawConfiguration[$section]; } } $appendSection = 'append_'.$section; if(isset($rawConfiguration[$appendSection])) { if(count($rawConfiguration[$appendSection]) > 0) { $defaultConfiguration[$section] = $this->mergeSection($rawConfiguration[$appendSection],$defaultConfiguration[$section]); } } } else { if(isset($rawConfiguration[$section])) { if(is_array($rawConfiguration[$section])) { foreach($configuration as $index=>$item) { if(isset($rawConfiguration[$section][$index])) { $defaultConfiguration[$section][$index] = $rawConfiguration[$section][$index]; } } } else { $defaultConfiguration[$section] = $rawConfiguration[$section]; } } } } $this->negotiationEnabled = $defaultConfiguration['negotiation']['enabled']; $this->serializerEnabled = $defaultConfiguration['serializer']['enabled']; $this->normalizerEnabled = $defaultConfiguration['normalizer']['enabled']; $this->validatorEnabled = $defaultConfiguration['validator']['enabled']; return $defaultConfiguration; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function mergeDefaultSettings(){\n\t\t//Get a copy of the default configuration.\n\t\t$defaultConfig = $this->getDefaultConfig();\n\t\t//Check for a 'general' section\n\t\tif(array_key_exists('general', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingGeneral = array_diff_key($defaultConfig['general'], $this->configuration['general']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missingGeneral) > 0){\n\t\t\t\tforeach($missingGeneral as $key=>$parameter){\n\t\t\t\t\t$this->configuration['general'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['general'] = $defaultConfig['general'];\n\t\t}\n\t\t//Check for a 'options' section\n\t\tif(array_key_exists('options', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingOptions = array_diff_key($defaultConfig['options'], $this->configuration['options']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missionOptions) > 0){\n\t\t\t\tforeach($missingOptions as $key=>$parameter){\n\t\t\t\t\t$this->configuration['options'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['options'] = $defaultConfig['options'];\n\t\t}\n\t}", "public static function returnExtConfDefaults() {}", "protected function mergeWithExistingConfiguration(array $defaultConfiguration, $extensionKey)\n {\n try {\n $currentExtensionConfig = unserialize(\n $this->objectManager->get(\\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager::class)\n ->getConfigurationValueByPath('EXT/extConf/' . $extensionKey)\n );\n if (!is_array($currentExtensionConfig)) {\n $currentExtensionConfig = [];\n }\n } catch (\\RuntimeException $e) {\n $currentExtensionConfig = [];\n }\n $flatExtensionConfig = ArrayUtility::flatten($currentExtensionConfig);\n $valuedCurrentExtensionConfig = [];\n foreach ($flatExtensionConfig as $key => $value) {\n $valuedCurrentExtensionConfig[$key]['value'] = $value;\n }\n ArrayUtility::mergeRecursiveWithOverrule($defaultConfiguration, $valuedCurrentExtensionConfig);\n return $defaultConfiguration;\n }", "private function mergeConfig() {\n\t\t$this->mergeConfigFrom(\n\t\t\t__DIR__ . '/../config/config.php', 'sl-upload'\n\t\t);\n\t}", "static protected function mergeConfig($config)\r\n {\r\n $config['all']['stylesheets'] = array_merge(isset($config['default']['stylesheets']) && is_array($config['default']['stylesheets']) ? $config['default']['stylesheets'] : array(), isset($config['all']['stylesheets']) && is_array($config['all']['stylesheets']) ? $config['all']['stylesheets'] : array());\r\n unset($config['default']['stylesheets']);\r\n\r\n $config['all']['javascripts'] = array_merge(isset($config['default']['javascripts']) && is_array($config['default']['javascripts']) ? $config['default']['javascripts'] : array(), isset($config['all']['javascripts']) && is_array($config['all']['javascripts']) ? $config['all']['javascripts'] : array());\r\n unset($config['default']['javascripts']);\r\n\r\n $config['all']['metas']['title'] = array_merge(\r\n isset($config['default']['metas']['title']) && is_array($config['default']['metas']['title']) ? $config['default']['metas']['title'] \r\n : (isset($config['default']['metas']['title']) ? array($config['default']['metas']['title']) : array()), \r\n isset($config['all']['metas']['title']) && is_array($config['all']['metas']['title']) ? $config['all']['metas']['title'] \r\n : (isset($config['all']['metas']['title']) ? array($config['all']['metas']['title']) : array())\r\n );\r\n unset($config['default']['metas']['title']);\r\n \r\n // merge default and all\r\n $config['all'] = sfToolkit::arrayDeepMerge(\r\n isset($config['default']) && is_array($config['default']) ? $config['default'] : array(),\r\n isset($config['all']) && is_array($config['all']) ? $config['all'] : array()\r\n );\r\n unset($config['default']);\r\n return self::replaceConstants($config);\r\n }", "protected function assignExtensionSettings() {}", "private function mergeConfig()\n {\n $countries = $this->countryIso();\n $this->app->configure('priongeography');\n\n $this->mergeConfigFrom(\n __DIR__ . '/config/priongeography.php',\n 'priongeography'\n );\n }", "private function mergeConfig()\n\t{\n\t\t$this->mergeConfigFrom(\n\t\t\t__DIR__ . '/../config/config.php', 'l5-sms'\n\t\t);\n\t}", "public function defaultConfig();", "protected function mergeConfig()\n {\n $this->mergeConfigFrom(__DIR__.\"/../config/{$this->name}.php\", $this->name);\n }", "public function addDefaultEntriesAndValues() {}", "private function loadConfigXml($parent) {\n\t\t$file = $parent->getParent()->getPath('extension_administrator') .\n\t\t\t\t'/config.xml';\n\t\t$defaults = $this->parseConfigFile($file);\n\t\tif ($defaults === '{}') {\n\t\t\treturn;\n\t\t}\n\n\t\t$manifest = $parent->getParent()->getManifest();\n\t\t$type = $manifest->attributes()->type;\n\n\t\ttry {\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$query = $db->getQuery(true)->select($db->quoteName(array (\n\t\t\t\t\t'extension_id', 'params' )))->from($db->quoteName('#__extensions'))->where($db->quoteName('type') .\n\t\t\t\t\t' = ' . $db->quote($type))->where($db->quoteName('element') .\n\t\t\t\t\t' = ' . $db->quote($parent->getElement()))->where($db->quoteName('name') .\n\t\t\t\t\t' = ' . $db->quote($parent->getName()));\n\t\t\t$db->setQuery($query);\n\t\t\t$row = $db->loadObject();\n\t\t\tif (! isset($row)) {\n\t\t\t\t$this->enqueueMessage(JText::_('COM_CLM_TURNIER_ERROR_CONFIG_LOAD'), 'warning');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$params = json_decode($row->params, true);\n\t\t\tif (json_last_error() == JSON_ERROR_NONE && is_array($params)) {\n\t\t\t\t$result = array_merge(json_decode($defaults, true), $params);\n\t\t\t\t$defaults = json_encode($result);\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$this->enqueueMessage($e->getMessage(), 'warning');\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->update($db->quoteName('#__extensions'));\n\t\t\t$query->set($db->quoteName('params') . ' = ' . $db->quote($defaults));\n\t\t\t$query->where($db->quoteName('extension_id') . ' = ' .\n\t\t\t\t\t$db->quote($row->extension_id));\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\t\t} catch (Exception $e) {\n\t\t\t$this->enqueueMessage($e->getMessage(), 'warning');\n\t\t}\n\t}", "public function getDefaultConfiguration();", "private function getDefaultConfig(){\n\t\t//Pretty simple. Multidimensional array of configuration values gets returned\n\t $defaultConfig = array();\n\t\t$defaultConfig['general'] = array('start_path'=>'.', 'disallowed'=>'php, php4, php5, phps',\n\t\t\t\t\t\t\t\t\t\t 'page_title'=>'OMFG!', 'files_label'=>'', 'folders_label'=>'');\n\t\t$defaultConfig['options'] = array('thumb_height'=>75, 'files_per_page'=>25, 'max_columns'=>3, \n\t\t\t\t\t\t\t\t\t\t 'enable_ajax'=>false, 'memory_limit'=>'256M', 'cache_thumbs'=>false, \n\t\t\t\t\t\t\t\t\t\t\t'thumbs_dir'=>'/.thumbs', 'icons_dir'=>'/.icons');\n\t\treturn $defaultConfig;\n\t}", "protected function registerConfigs()\n {\n // Append or overwrite configs\n #config(['test' => 'hi']);\n\n // Merge configs\n #$this->mergeConfigFrom(__DIR__.'/../Config/parser.php', 'mrcore.parser');\n }", "static function merge($config, $newConfigName) \n {\n if (empty($config)) {\n $config = array(); \n }\n\n if ($newConfigName != self::CONFIG_DEFAULT) {\n $newConfig = self::load($newConfigName);\n\n foreach (self::$available_setting as $key => $type) {\n if (isset($newConfig[$key]) && !isset($config[$key])) {\n $config[$key] = $newConfig[$key];\n } else if (isset($newConfig[$key]) && isset($config[$key])) {\n switch ($type) {\n case self::SETTING_TYPE_ARRAY:\n $config[$key] = array_merge($config[$key], $newConfig[$key]);\n break;\n default:\n $config[$key] = $newConfig[$key];\n break;\n } \n }\n } \n\n // Override default setting for some websites that using bad class name\n foreach ($config[self::IGNORED_CLASSES] as $key => $class) {\n if (isset($newConfig[self::OVERRIDE_CLASSES]) && in_array($class, $newConfig[self::OVERRIDE_CLASSES])) {\n unset($config[self::IGNORED_CLASSES][$key]);\n }\n }\n }\n\n return $config;\n }", "public function testOverwritingDefaultBackendsConfig(): void\n {\n $this->container->loadFromExtension($this->extensionAlias, [\n 'connector' => [\n 'backends' => [\n 'default' => [\n 'root' => '/foo/bar',\n 'baseUrl' => 'http://example.com/foo/bar'\n ]\n ]\n ]\n ]);\n\n $this->container->compile();\n\n $config = $this->getConfig();\n $config['backends']['default']['root'] = '/foo/bar';\n $config['backends']['default']['baseUrl'] = 'http://example.com/foo/bar';\n\n $this->assertEquals($config, $this->container->getParameter('ckfinder.connector.config'));\n }", "protected function mergeConfiguration()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/firefly.php', 'firefly'\n );\n }", "private function mergeConfig()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/config.php', 'routecache'\n );\n }", "protected function baseConfigurationDefaults() {\n return array(\n 'id' => $this->getPluginId(),\n 'label' => '',\n 'cache' => DRUPAL_CACHE_PER_ROLE,\n );\n }", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "public function getConfig(array $defaults = []);", "protected function defaults() {\n\t\t\t$config = array(\n\t\t\t\t'version' => $this->version,\n\t\t\t\t'autoshowpt' => array(\n\t\t\t\t\t//'post'=> true\n\t\t\t\t),\n\t\t\t\t'usept' => array(\n\t\t\t\t\t'post' => true\n\t\t\t\t),\n\t\t\t\t'usetax' => array(),\n\t\t\t\t'autoshowrss' => false,\n\t\t\t\t'do_c2c' => 1,\n\t\t\t\t'do_t2t' => 0,\n\t\t\t\t'do_t2c' => 0,\n\t\t\t\t'do_k2c' => 0,\n\t\t\t\t'do_k2t' => 0,\n\t\t\t\t'do_x2x' => 1,\n\t\t\t\t'minscore' => 50,\n\t\t\t\t'maxresults' => 5,\n\t\t\t\t'cachetime' => 60,\n\t\t\t\t'filterpriority' => 10,\n\t\t\t\t'log' => false,\n\t\t\t\t'loglevel' => false,\n\t\t\t\t'storage' => 'postmeta',\n\t\t\t\t'storage_id' => 'better-related-',\n\t\t\t\t'querylimit' => 1000,\n\t\t\t\t't_querylimit' => 10000,\n\t\t\t\t'mtime' => time(),\n\t\t\t\t'relatedtitle' => sprintf(\n\t\t\t\t\t\"<strong>%s</strong>\",\n\t\t\t\t\t__( 'Related content:', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'relatednone' => sprintf(\n\t\t\t\t\t\"<p>%s</p>\",\n\t\t\t\t\t__( 'No related content found.', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'thanks' => 'below',\n\t\t\t\t'stylesheet' => true,\n\t\t\t\t'showdetails' => false\n\t\t\t);\n\t\t\treturn $config;\n\t\t}", "function load_default_options() {\n foreach ($this->modules as $name => $data) {\n $this->modules->$name->options = new stdClass();\n $saved_options = get_option($this->clientele_prefix . $name . '_options');\n if ($saved_options) {\n $this->modules->$name->options = (object) array_merge((array) $this->modules->$name->options, (array) $saved_options);\n }\n foreach ($data->default_options as $default_key => $default_value) {\n if (!isset($this->modules->$name->options->$default_key)) {\n $this->modules->$name->options->$default_key = $default_value;\n }\n }\n $this->$name->module = $this->modules->$name;\n }\n do_action('clientele_default_options_loaded');\n // Initialise modules if enabled.\n foreach ($this->modules as $name => $data) {\n if ($data->options->enabled == 'on') {\n if (method_exists($this->$name, 'init')) {\n $this->$name->init();\n }\n }\n }\n do_action('clientele_initialised');\n }", "public function merge(array $config)\n {\n // override defaults with given config\n if (!empty($config['config']) && is_array($config['config'])) {\n $this->config = array_replace_recursive($this->config, $config['config']);\n }\n }", "protected function defaultConfig()\n\t{\n\t\t$this->config=array(\n\t\t\t'code'=>'1',\n\t\t\t'scanning'=>\"\",\n\t\t\t'scanCodes'=>array()\n\t\t);\n\t}", "function wmfLabsOverrideSettings() {\n\tglobal $wmfConfigDir, $wgConf;\n\n\t// Override (or add) settings that we need within the labs environment,\n\t// but not in production.\n\t$betaSettings = wmfLabsSettings();\n\n\t// Set configuration string placeholder 'variant' to 'beta-hhvm'\n\t// or 'beta' depending on the the runtime executing the code.\n\t// This is to ensure that *.beta-hhvm.wmflabs.org wikis use\n\t// loginwiki.wikimedia.beta-hhvm.wmflabs.org as their loginwiki.\n\t$wgConf->siteParamsCallback = function( $conf, $wiki ) {\n\t\t$variant = 'beta';\n\t\treturn array( 'params' => array( 'variant' => $variant ) );\n\t};\n\n\tforeach ( $betaSettings as $key => $value ) {\n\t\tif ( substr( $key, 0, 1 ) == '-' ) {\n\t\t\t// Settings prefixed with - are completely overriden\n\t\t\t$wgConf->settings[substr( $key, 1 )] = $value;\n\t\t} elseif ( isset( $wgConf->settings[$key] ) ) {\n\t\t\t$wgConf->settings[$key] = array_merge( $wgConf->settings[$key], $value );\n\t\t} else {\n\t\t\t$wgConf->settings[$key] = $value;\n\t\t}\n\t}\n}", "protected function addDefaultConfigurationForConfigGeneration() {\n if (!isset($this->configuration['disabled_field_types'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_field_type_list_builder */\n $solr_field_type_list_builder = $this->entityTypeManager->getListBuilder('solr_field_type');\n $this->configuration['disabled_field_types'] = array_keys($solr_field_type_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_caches'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_cache_list_builder */\n $solr_cache_list_builder = $this->entityTypeManager->getListBuilder('solr_cache');\n $this->configuration['disabled_caches'] = array_keys($solr_cache_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_request_handlers'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_request_handler_list_builder */\n $solr_request_handler_list_builder = $this->entityTypeManager->getListBuilder('solr_request_handler');\n $this->configuration['disabled_request_handlers'] = array_keys($solr_request_handler_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_request_dispatchers'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_request_dispatcher_list_builder */\n $solr_request_dispatcher_list_builder = $this->entityTypeManager->getListBuilder('solr_request_dispatcher');\n $this->configuration['disabled_request_dispatchers'] = array_keys($solr_request_dispatcher_list_builder->getAllNotRecommendedEntities());\n }\n }", "public function merge(array $config): self;", "function default_configuration()\r\n {\r\n return array();\r\n }", "protected function mergeConfig()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/Config/teamrole.php', 'teamrole'\n );\n }", "public function merge(Config $other) {\n\t\t/* merge variables */\n\t\tforeach($other->getVars() as $key => $value) {\n\t\t\t$this->vars[ $key ] = $value;\n\t\t}\n\t\t/* merge templates */\n\t\tforeach($other->getTemplates() as $one) {\n\t\t\t$this->templates[] = $one;\n\t\t}\n\t}", "protected function getExtbaseConfiguration() {}", "function _default($defaults, $options)\n\t{\n\t\treturn array_merge($defaults, $options);\n\t}", "protected function loadConfigsForRegister(): void\n {\n $shipConfigs = $this->getConfigsFromShip();\n $containersConfigs = $this->getConfigsFromContainers();\n\n $configs = array_merge($shipConfigs, $containersConfigs);\n\n foreach ($configs as $file){\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $this->mergeConfigFrom($file, $filename);\n }\n }", "private function getExtensionConfigXml() \n\t{\n\n\t\t// path to the extensions config.xml\n\t\t$extension_config_xml_path = parent::$extension_base_dir . '/etc/config.xml';\n\n\t\tif (!file_exists($extension_config_xml_path)) {\n\t\t\t$this->displayError('Cant find path to extension config xml.');\n\t\t}\n\n\t\t$extension_config_xml = simplexml_load_file($extension_config_xml_path);\n\n\t\tparent::$extension_config_xml = $extension_config_xml;\n\n\t}", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "public function getDefaultConfiguration() {}", "public function getConfigDefaults()\n {\n // $file = realpath(__DIR__ . '/../../data/distribution/config.dist.php');\n $file = __DIR__ . '/../../data/distribution/config.dist.php';\n\n return $this->getConfigFromFile($file);\n }", "function defaultValues(&$conf)\t{\n\t\t// Addition of default values\n\t\tif (is_array($conf[$conf['cmdKey'].'.']['defaultValues.']))\t{\n\t\t\treset($conf[$conf['cmdKey'].'.']['defaultValues.']);\n\t\t\twhile(list($theField,$theValue)=each($conf[$conf['cmdKey'].'.']['defaultValues.']))\t{\n\t\t\t\tif (strpos($theValue,\":\")) {\n\t\t\t\t\t$data=tx_metafeedit_lib::getData($theValue,0,$this->cObj);\n\t\t\t\t\tif (!$data) $data=$this->dataArr[$theField];\n\t\t\t\t} else {\n\t\t\t\t\t$data=$theValue;\n\t\t\t\t}\n\t\t\t\t$this->dataArr[$theField] = $data;\n\t\t\t}\n\t\t}\n\t}", "public function testAppendingDefaultBackendsConfig(): void\n {\n $newBackendConfig = [\n 'name' => 'my_ftp',\n 'adapter' => 'ftp',\n 'root' => '/foo/bar',\n 'baseUrl' => 'http://example.com/foo/bar',\n 'host' => 'localhost',\n 'username' => 'user',\n 'password' => 'pass',\n ];\n\n $this->container->loadFromExtension($this->extensionAlias, [\n 'connector' => [\n 'backends' => [\n 'my_ftp' => $newBackendConfig\n ]\n ]\n ]);\n\n $this->container->compile();\n\n $config = $this->getConfig();\n\n $config['backends']['my_ftp'] = $newBackendConfig;\n\n $this->assertEquals($config, $this->container->getParameter('ckfinder.connector.config'));\n }", "public function applyConfigDefaults(array $config)\n {\n $defaults = array(\n 'arch' => 'all',\n 'buildId' => gmdate(self::DEFAULT_BUILDTIME_FORMAT),\n 'description' => '',\n 'depends' => array(),\n 'exclude' => array(),\n 'maintainer' => '',\n 'postinst' => '',\n 'priority' => 'optional',\n 'sources' => array(),\n 'workspaceBasedir' => self::DEFAULT_WORKSPACE_BASEDIR\n );\n $config = array_merge($defaults, $config);\n\n if ($config['postinst']) {\n $config['postinst'] = rtrim($config['postinst']) . \"\\n\";\n }\n $config['sources'] = array();\n\n $config['fullName'] = sprintf(\n '%s_%s_%s',\n $config['shortName'], $config['version'], $config['arch']\n );\n $config['versionDir'] = sprintf(\n '%s/%s/%s',\n $config['workspaceBasedir'], $config['shortName'], $config['version']\n );\n $config['buildDir'] = \"{$config['versionDir']}/\" . $config['buildId'];\n $config['pkgDir'] = \"{$config['buildDir']}/{$config['fullName']}\";\n\n return $config;\n }", "public function getDefaultSettings();", "function apsa_merge_config() {\n global $apsa_uninstall;\n global $apsa_child_uninstall;\n if (!empty($apsa_child_uninstall)) {\n $apsa_uninstall = array_merge_recursive($apsa_uninstall, $apsa_child_uninstall);\n }\n}", "public function extend()\n\t{\n\t\t$extensions = func_get_args();\n\n\t\tforeach ( $extensions as $extension )\n\t\t{\n\t\t\tif ( $extension instanceof self )\n\t\t\t\t$this->data = array_merge_recursive( $this->data, $extension->data );\n\t\t\telse\n\t\t\t\t$this->data = array_merge_recursive( $this->data, _A($extension)->data );\n\t\t}\n\n\t\treturn $this;\n\t}", "private function reconfigure() {\n\t\t$global = JConfig::getInstance();\n\t\tforeach ($global as $key => $value) {\n\t\t\tif (array_key_exists($key, $this->config)) {\n\t\t\t\t$this->config[$key] = $value;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tif (class_exists('JPConfig')) {\n\t\t\t\t$this->config = array_merge($this->config, JPConfig::getData());\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t// class JPConfig doesn't exist\n\t\t}\n\t}", "protected function getConfigDefaults() {\n\t\treturn [\n\t\t\t// @todo add description strings\n\t\t\t'expose' => 1,\n\t\t\t'auto-read-body-file' => 1,\n\t\t\t'listen' => '127.0.0.1,unix:/tmp/phpdaemon.fcgi.sock',\n\t\t\t'port' => 9000,\n\t\t\t'allowed-clients' => '127.0.0.1',\n\t\t\t'send-file' => 0,\n\t\t\t'send-file-dir' => '/dev/shm',\n\t\t\t'send-file-prefix' => 'fcgi-',\n\t\t\t'send-file-onlybycommand' => 0,\n\t\t\t'keepalive' => new Time('0s'),\n\t\t\t'chunksize' => new Size('8k'),\n\t\t\t'defaultcharset' => 'utf-8',\n\t\t\t'upload-max-size' => new Size(ini_get('upload_max_filesize')),\n\t\t];\n\t}", "public function getDefaultConfig($fileName = null)\n {\n $configHelper = \\Fci_Helper_Config::getInstance();\n if (!$fileName) {\n $configHelper->load('default.xml.dist');\n } else {\n try {\n $configHelper->load($fileName . '.xml');\n } catch (ParserException $e) {\n $configHelper->load('default.xml.dist');\n }\n }\n\n $default = [\n 'file' => [\n 'path' => $configHelper->getFilePath(),\n 'delimiter' => $configHelper->getFileDelimiter(),\n 'enclosure' => $configHelper->getFileEnclosure(),\n 'archive_with_datetime' => (int)$configHelper->getArchiveWithDateTime(),\n ],\n 'general' => [\n 'reload_cache' => (int)$configHelper->getReloadCache(),\n 'disable_products' => (int)$configHelper->getDisableProducts(),\n 'delete_disabled_products' => (int)$configHelper->getDeleteDisabledProducts(),\n 'disable_conditions' => $configHelper->getDisableConditions(),\n 'delete_products_not_in_csv' => (int)$configHelper->getDeleteProductsNotInCsv(),\n 'unset_special_price' => (int)$configHelper->getUnsetSpecialPrice(),\n 'delete_all_special_prices' => (int)$configHelper->getDeleteAllSpecialPrices(),\n 'scripts' => $configHelper->getScripts(),\n ],\n 'dataprocessing' => [\n 'general' => [\n 'mode' => $configHelper->getMode(),\n 'import' => $configHelper->getImportType(),\n 'cache_lines' => $configHelper->getLinesToCache(),\n 'mappings' => $configHelper->getMappingsValue(),\n 'strip_html_tags' => (int)$configHelper->getStripHtmlTags(),\n 'import_globally' => (int)$configHelper->getImportGallery(),\n 'date_time_format' => $configHelper->getDateTimeFormat(),\n ],\n 'images' => [\n 'image_prefix' => $configHelper->getImagePrefix(),\n 'image_split' => $configHelper->getImageSeparator(),\n 'sku_fallback' => (int)$configHelper->getUseSkuImageFallback(),\n 'import_gallery' => (int)$configHelper->getImportGallery(),\n ],\n 'mandatory' => $configHelper->getMandatoryFields(),\n 'products' => [\n 'identifier' => $configHelper->getProductIdentifier(),\n 'clear_existing_websites' => (int)$configHelper->getClearExistingWebsites(),\n ],\n ],\n 'general_defaults' => [\n 'websites' => $configHelper->getWebsitesValue(),\n 'store' => $configHelper->getStoreValue(),\n ],\n 'product_defaults' => $configHelper->getProductDefaults(),\n 'category_defaults' => $configHelper->getCategoryDefaults(),\n 'category_settings' => [\n 'root_category' => $configHelper->getRootCategory(),\n 'category_separate' => $configHelper->getCategorySeparate(),\n 'sub_category_separate' => $configHelper->getSubCategorySeparate(),\n 'create_categories' => (int)$configHelper->createCategories(),\n 'default_product_position' => $configHelper->getDefaultProductPosition(),\n ],\n ];\n\n return $default;\n }", "private function setDefaultValues()\n {\n return LengowConfiguration::resetAll();\n }", "protected function defaultRawConfiguration()\n {\n return [\n 'negotiation' => [\n 'enabled' => false,\n ],\n 'serializer' => [\n 'enabled' => true\n ],\n 'normalizer' => [\n 'enabled' => false\n ],\n 'validator' => [\n 'enabled' => false\n ],\n 'types' =>\n [\n [\n 'name' => 'json',\n 'values'=> [\n 'application/json','text/json'\n ],\n 'restrict' => null\n ],\n [\n 'name' => 'xml',\n 'values' => [\n 'application/xml','text/xml'\n ],\n 'restrict' => null\n ]\n ],\n 'headers' =>\n [\n 'content_type' => 'content-type',\n 'accept_type' => 'accept'\n ]\n ];\n }", "function setDefaultOverrideOptions() {\n\tglobal $fm_module_options;\n\t\n\t$config = null;\n\t$server_os_distro = isDebianSystem($_POST['server_os_distro']) ? 'debian' : strtolower($_POST['server_os_distro']);\n\t\n\tswitch ($server_os_distro) {\n\t\tcase 'debian':\n\t\t\t$config = array(\n\t\t\t\t\t\t\tarray('cfg_type' => 'global', 'server_serial_no' => $_POST['SERIALNO'], 'cfg_name' => 'pid-file', 'cfg_data' => '/var/run/named/named.pid')\n\t\t\t\t\t\t);\n\t}\n\t\n\tif (is_array($config)) {\n\t\tif (!isset($fm_module_options)) include(ABSPATH . 'fm-modules/' . $_SESSION['module'] . '/classes/class_options.php');\n\t\t\n\t\tforeach ($config as $config_data) {\n\t\t\t$fm_module_options->add($config_data);\n\t\t}\n\t}\n}", "function initDefaultOptions(){\n\n\t\t\t$defaults = $this->defaultOptions();\n\t\t\treturn update_option( $this->optionsKey, $defaults );\n\t\t}", "abstract protected function loadDefaults();", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "public function loadExtensions(): void\n {\n /**\n * @var ConfigStorageInterface $configStorage\n */\n $configStorage = $this->di->get(ConfigStorageInterface::class);\n $modules = $this->config->__toArray();\n\n if (empty($modules)) {\n return;\n }\n\n $autoLoadPaths = [];\n $autoLoadPathsPsr4 = [];\n $configPaths = [];\n\n $dependencyPaths = [];\n\n $extensionsDir = $this->extensionsConfig['path'];\n\n foreach ($modules as $index => $config) {\n if (!$config['enabled'] || isset($this->loadedExtensions[$index]['loaded'])) {\n continue;\n }\n\n $path = $extensionsDir . File::fillEndSep($config['dir']);\n\n if (!empty($config['paths']['src'])) {\n $autoLoadPaths[] = $path . $config['paths']['src'];\n }\n\n if (!empty($config['paths']['configs'])) {\n $configPaths[] = $path . $config['paths']['configs'] . '/';\n }\n\n if (!empty($config['paths']['dependency'])) {\n $dependencyPaths[] = $path . $config['paths']['dependency'];\n }\n\n /*\n * @todo implement extension locales and templates\n\n if (!empty($modCfg['autoloader-psr-4'])) {\n foreach ($modCfg['autoloader-psr-4'] as $ns =>$classPath) {\n $autoLoadPathsPsr4[$ns] = str_replace('./', $path, $classPath);\n }\n }\n\n */\n $this->loadedExtensions[$index]['load'] = true;\n }\n\n // Add autoloader paths\n if (!empty($autoLoadPaths)) {\n $autoloaderConfig = $configStorage->get('autoloader.php');\n $autoloaderCfg = $autoloaderConfig->__toArray();\n $newChain = $autoloaderCfg['priority'];\n\n foreach ($autoLoadPaths as $path) {\n $newChain[] = $path;\n }\n $currentAutoloadPaths = $this->autoloader->getRegisteredPaths();\n foreach ($currentAutoloadPaths as $path) {\n if (!in_array($path, $newChain, true)) {\n $newChain[] = $path;\n }\n }\n\n $autoloaderCfg['psr-4'] = array_merge($autoLoadPathsPsr4, $autoloaderCfg['psr-4']);\n $autoloaderCfg['paths'] = $newChain;\n\n // update autoloader paths\n $this->autoloader->setConfig(['paths' => $autoloaderCfg['paths'], 'psr-4' => $autoloaderCfg['psr-4']]);\n // update main configuration\n $autoloaderConfig->setData($autoloaderCfg);\n }\n // Add Config paths\n if (!empty($configPaths)) {\n $writePath = $configStorage->getWrite();\n $applyPath = $configStorage->getApplyTo();\n\n $paths = $configStorage->getPaths();\n $resultPaths = [];\n\n foreach ($paths as $path) {\n if ($path !== $writePath && $path !== $applyPath) {\n $resultPaths[] = $path;\n }\n }\n foreach ($configPaths as $path) {\n \\array_unshift($resultPaths, $path);\n }\n\n \\array_unshift($resultPaths, $applyPath);\n $resultPaths[] = $writePath;\n $configStorage->replacePaths($resultPaths);\n }\n // register dependencies\n if (!empty($dependencyPaths)) {\n foreach ($dependencyPaths as $file) {\n if ($this->di instanceof DependencyContainer || method_exists($this->di, 'bindArray')) {\n $this->di->bindArray(include $file);\n }\n }\n }\n }", "function bdpp_default_settings() {\n\t\n\tglobal $bdpp_options;\n\t\n\t$bdpp_options = array(\n\t\t\t\t\t'post_types'\t\t\t=> array(0 => 'post'),\n\t\t\t\t\t'trend_post_types'\t\t=> array(),\n\t\t\t\t\t'sharing_enable'\t\t=> 0,\n\t\t\t\t\t'sharing'\t\t\t\t=> array(),\n\t\t\t\t\t'sharing_lbl'\t\t\t=> esc_html__('Share this', 'blog-designer-pack'),\n\t\t\t\t\t'sharing_design'\t\t=> 'design-1',\n\t\t\t\t\t'sharing_post_types'\t=> array(),\n\t\t\t\t\t'disable_font_awsm_css'\t=> 0,\n\t\t\t\t\t'disable_owl_css'\t\t=> 0,\n\t\t\t\t\t'custom_css'\t\t\t=> '',\n\t\t\t\t);\n\n\t$default_options = apply_filters('bdpp_default_options_values', $bdpp_options );\n\n\t// Update default options\n\tupdate_option( 'bdpp_opts', $default_options );\n\t\n\t// Overwrite global variable when option is update\n\t$bdpp_options = bdpp_get_settings();\n}", "protected function defineConfig()\n {\n // Get config paths\n $configs = $this->config->getDirectly(__DIR__ . '/../Config/path.php')['default_config'] ?? [];\n\n // Add all of them to config collector if $configs is an array\n if (is_array($configs)) {\n foreach ($configs as $alias => $path) {\n $this->config->set($alias, $path);\n }\n }\n }", "public static function getShortcodeDefaults()\n\t{\n\t\treturn array_merge( static::$JETPACK_SHORTCODE_EXTRAS, static::$SHORTCODE_DEFAULTS );\n\t}", "protected function setDefaultValueExtra()\n {\n $this->default_data['address'] = 'xxx.atlassian.net';\n $this->default_data['rest_api_resource'] = '/rest/api/latest/';\n $this->default_data['timeout'] = 60;\n\n $this->default_data['clones']['mappingTicket'] = array(\n array(\n 'Arg' => self::ARG_SUMMARY,\n 'Value' => 'Issue {include file=\"file:$centreon_open_tickets_path/providers/' .\n 'Abstract/templates/display_title.ihtml\"}'\n ),\n array('Arg' => self::ARG_DESCRIPTION, 'Value' => '{$body}'),\n array('Arg' => self::ARG_PROJECT, 'Value' => '{$select.jira_project.id}'),\n array('Arg' => self::ARG_ASSIGNEE, 'Value' => '{$select.jira_assignee.id}'),\n array('Arg' => self::ARG_PRIORITY, 'Value' => '{$select.jira_priority.id}'),\n array('Arg' => self::ARG_ISSUETYPE, 'Value' => '{$select.jira_issuetype.id}'),\n );\n }", "protected function loadDefaultOptions()\r\n {\r\n $this->options = [\r\n 'offsettop' => 0,\r\n 'offsetleft' => 0,\r\n 'merge' => false,\r\n 'backcolor' => 0xffffff,\r\n ];\r\n }", "function data_preprocessing(&$default_values){\n parent::data_preprocessing($default_values);\n if (!empty($default_values['config'])) {\n $values = json_decode($default_values['config'], true);\n foreach ($values as $key => $value) {\n $default_values['config_' . $key] = $value;\n }\n unset($default_values['config']);\n }\n }", "protected function mergeWithCurrentConfig($config)\n {\n $currentConfigFilePath = $this->getCurrentConfigFilePath();\n if (File::isFile($currentConfigFilePath)) {\n $currentConfig = include $currentConfigFilePath;\n if (is_array($currentConfig)) {\n foreach ($currentConfig as $key => $value) {\n if (isset($config[$key])) {\n $config[$key]['value'] = $value;\n }\n }\n }\n };\n\n return $config;\n }", "public function loadDefaults()\n {\n $this->addSe('*.google.*', 'q');\n $this->addSe('*.yahoo.*', 'p');\n $this->addSe('*.live.*', 'q');\n $this->addSe('*.bing.*', 'q');\n $this->addSe('*.aolsvc.*', 'q');\n $this->addSe('suche.webfan.de', 'q');\n }", "private function mergeExtra()\n {\n if (method_exists($this, 'extra')) {\n $this->extra = $this->extra();\n }\n }", "public function initExtensions(): void\n {\n $modules = $this->config->__toArray();\n\n if (empty($modules)) {\n return;\n }\n\n $templatesPaths = [];\n $langPaths = [];\n\n $extensionsDir = $this->extensionsConfig['path'];\n\n foreach ($modules as $index => $config) {\n if (!$config['enabled'] || isset($this->loadedExtensions[$index]['init'])) {\n continue;\n }\n\n $path = $extensionsDir . File::fillEndSep($config['dir']);\n\n\n if (!empty($config['paths']['locales'])) {\n $langPaths[] = $path . $config['paths']['locales'] . '/';\n }\n\n if (!empty($config['paths']['templates'])) {\n $templatesPaths[] = $path . $config['paths']['templates'] . '/';\n }\n\n $this->loadedExtensions[$index]['init'] = true;\n }\n\n // Add localization paths\n if (!empty($langPaths)) {\n /**\n * @var StorageInterface $langStorage\n */\n $langStorage = $this->di->get(Lang::class)->getStorage();\n foreach ($langPaths as $path) {\n $langStorage->addPath($path);\n }\n }\n\n // Add Templates paths\n if (!empty($templatesPaths)) {\n $templateStorage = $this->di->get(Storage::class);\n $paths = $templateStorage->getPaths();\n $mainPath = array_shift($paths);\n // main path\n $pathsResult = [];\n $pathsResult[] = $mainPath;\n $pathsResult = array_merge($pathsResult, $templatesPaths, $paths);\n $templateStorage->setPaths($pathsResult);\n }\n }", "protected function loadExtensionConfiguration()\n {\n $this->bootstrap->loadExtensionTables(true);\n }", "function reset_to_defaults () {\n\n global $CFG;\n include_once($CFG->dirroot .'/lib/defaults.php');\n\n $updatedata = array();\n\n $updatedata['editorbackgroundcolor'] = $defaults['editorbackgroundcolor'];\n $updatedata['editorfontfamily'] = $defaults['editorfontfamily'];\n $updatedata['editorfontsize'] = $defaults['editorfontsize'];\n $updatedata['editorkillword'] = $defaults['editorkillword'];\n $updatedata['editorspelling'] = $defaults['editorspelling'];\n $updatedata['editorfontlist'] = $defaults['editorfontlist'];\n $updatedata['editorhidebuttons'] = $defaults['editorhidebuttons'];\n $updatedata['editordictionary'] = '';\n\n foreach ($updatedata as $name => $value) {\n if (!(set_config($name, $value))) {\n return false;\n }\n }\n return true;\n}", "function dynamik_theme_settings_defaults( $defaults = true, $import = false )\r\n{\t\r\n\t$defaults = array(\r\n\t\t'remove_all_page_titles' => ( !$defaults && !empty( $import['remove_all_page_titles'] ) ) ? 1 : 0,\r\n\t\t'remove_page_titles_ids' => '',\r\n\t\t'include_inpost_cpt_all' => ( !$defaults && !empty( $import['include_inpost_cpt_all'] ) ) ? 1 : 0,\r\n\t\t'include_inpost_cpt_names' => '',\r\n\t\t'post_formats_active' => ( !$defaults && !empty( $import['post_formats_active'] ) ) ? 1 : 0,\r\n\t\t'protected_folders' => '',\r\n\t\t'responsive_enabled' => ( $defaults || !empty( $import['responsive_enabled'] ) ) ? 1 : 0,\r\n\t\t'protocol_relative_urls' => ( !$defaults && !empty( $import['protocol_relative_urls'] ) ) ? 1 : 0,\r\n\t\t'enable_ace_editor_syntax_validation' => ( $defaults || !empty( $import['enable_ace_editor_syntax_validation'] ) ) ? 1 : 0,\r\n\t\t'design_options_control' => 'kitchen_sink',\r\n\t\t'custom_image_size_one_mode' => '',\r\n\t\t'custom_image_size_one_width' => '0',\r\n\t\t'custom_image_size_one_height' => '0',\r\n\t\t'custom_image_size_two_mode' => '',\r\n\t\t'custom_image_size_two_width' => '0',\r\n\t\t'custom_image_size_two_height' => '0',\r\n\t\t'custom_image_size_three_mode' => '',\r\n\t\t'custom_image_size_three_width' => '0',\r\n\t\t'custom_image_size_three_height' => '0',\r\n\t\t'custom_image_size_four_mode' => '',\r\n\t\t'custom_image_size_four_width' => '0',\r\n\t\t'custom_image_size_four_height' => '0',\r\n\t\t'custom_image_size_five_mode' => '',\r\n\t\t'custom_image_size_five_width' => '0',\r\n\t\t'custom_image_size_five_height' => '0',\r\n\t\t'bootstrap_column_classes_active' => ( $defaults || !empty( $import['bootstrap_column_classes_active'] ) ) ? 1 : 0,\r\n\t\t'html_five_active' => ( $defaults || !empty( $import['html_five_active'] ) ) ? 1 : 0,\r\n\t\t'accessibility_active' => ( $defaults || !empty( $import['accessibility_active'] ) ) ? 1 : 0,\r\n\t\t'fancy_dropdowns_active' => ( $defaults || !empty( $import['fancy_dropdowns_active'] ) ) ? 1 : 0,\r\n\t\t'affiliate_link' => ''\r\n\t);\r\n\t\r\n\treturn apply_filters( 'dynamik_theme_settings_defaults', $defaults );\r\n}", "private static function defaultConfig(): array\n {\n return [\n 'base_uri' => self::$baseUri,\n 'http_errors' => false,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'User-Agent' => 'evoliz-php/' . Config::VERSION,\n ],\n 'verify' => true,\n ];\n }", "public function overrideConfiguration($config) {\n if (is_array($config)) \n $this->config = array_replace_recursive($this->config, $config);\n }", "function load_defaults(){\n\t\t\n\t\t$this->choices = array(\n\t\t\t'yes' => __('Enable', 'wa_wcc_txt'),\n\t\t\t'no' => __('Disable', 'wa_wcc_txt')\n\t\t);\n\n\t\t$this->loading_places = array(\n\t\t\t'header' => __('Header', 'wa_wcc_txt'),\n\t\t\t'footer' => __('Footer', 'wa_wcc_txt')\n\t\t);\n\n\t\t$this->tabs = array(\n\t\t\t'general-settings' => array(\n\t\t\t\t'name' => __('General', 'wa_wcc_txt'),\n\t\t\t\t'key' => 'wa_wcc_settings',\n\t\t\t\t'submit' => 'save_wa_wcc_settings',\n\t\t\t\t'reset' => 'reset_wa_wcc_settings',\n\t\t\t),\n 'configuration' => array(\n 'name' => __('Advanced', 'wa_wcc_txt'),\n 'key' => 'wa_wcc_configuration',\n 'submit' => 'save_wa_wcc_configuration',\n 'reset' => 'reset_wa_wcc_configuration'\n )\n\t\t);\n\t}", "public function init(): void\n {\n $resolver = new OptionsResolver();\n $extensions = [];\n $config = [];\n\n if (empty($this->extensionClasses) && empty($this->config)) {\n return;\n }\n\n foreach ($this->extensionClasses as $extensionClass) {\n if (!class_exists($extensionClass)) {\n throw new \\InvalidArgumentException(sprintf(\n 'Extension class \"%s\" does not exist',\n $extensionClass\n ));\n }\n\n $extension = new $extensionClass();\n\n if (!$extension instanceof ExtensionInterface) {\n throw new \\InvalidArgumentException(sprintf(\n // add any manually specified extensions\n 'Extension \"%s\" must implement the PhpBench\\\\Extension interface',\n get_class($extension)\n ));\n }\n\n $extensions[] = $extension;\n $extension->configure($resolver);\n }\n\n $diff = array_diff(array_keys($this->config), array_keys($this->config));\n\n if ($diff) {\n throw new \\InvalidArgumentException(sprintf(\n 'Unknown configuration keys: \"%s\". Permitted keys: \"%s\"',\n implode('\", \"', $diff),\n implode('\", \"', array_keys($this->config))\n ));\n }\n\n try {\n $this->config = $resolver->resolve($this->config);\n } catch (ExceptionInterface $resolverException) {\n throw new InvalidConfigurationException(sprintf(\n 'Invalid user configuration: %s',\n $resolverException->getMessage()\n ), 0, $resolverException);\n }\n\n foreach ($extensions as $extension) {\n $extension->load($this);\n }\n }", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "private function syncronize() {\n\t\t$existingsOptions = get_option( $this->getMaillistKey() );\n\t\t\n\t\t// Get the saved options in the object\n\t\t$options = $this->getSettings();\n\t\t\n\t\t// If options exists we need to merge them with the default ones\n\t\tif ( $existingsOptions ){\n\t\t\tforeach ( $existingsOptions as $option ){\n\t\t\t\t$options[ $option->getName() ]->setValue( $option->getValue() );\n\t\t\t}\n\t\t}\n\t\t\t\n\t}", "protected function getConfigDefaults() {\n\t\treturn array(\n\t\t\t// listen to\n\t\t\t'mastersocket' => 'unix:/tmp/phpDaemon-master-%x.sock',\n\t\t);\n\t}", "public function loadDefaults(): void;", "protected function setConfigurations()\n {\n if ($files = $this->getFiles('config'))\n {\n foreach ($files as $key => $filename)\n {\n $this->config->set(basename($filename, '.php'), require path('config').DIRECTORY_SEPARATOR.($filename));\n }\n }\n }", "public function load_with_defaults ()\n {\n parent::load_with_defaults ();\n $this->set_value ('email_type', 'single_mail');\n }", "public function merge(array $config)\n {\n $this->data = array_replace_recursive($this->get(), $config);\n }", "public function merge(Zend_Config $merge)\n {\n foreach($merge as $key => $item) {\n if(array_key_exists($key, $this->_data)) {\n if($item instanceof Zend_Config && $this->$key instanceof Zend_Config) {\n $this->$key = $this->$key->merge(new Zend_Config($item->toArray(), !$this->readOnly()));\n } else {\n $this->$key = $item;\n }\n } else {\n if($item instanceof Zend_Config) {\n $this->$key = new Zend_Config($item->toArray(), !$this->readOnly());\n } else {\n $this->$key = $item;\n }\n }\n }\n\n return $this;\n }", "protected function _initConfig()\n {\n parent::_initConfig();\n $this->_mergeConfig(array(\n 'get_descriptions' => false, // true to get descriptions for text sections\n ));\n }", "public function loadBase()\n {\n $etcDir = $this->getOptions()->getEtcDir();\n $files = glob($etcDir.DS.'*.xml');\n $this->loadFile(current($files));\n\n while ($file = next($files)) {\n $merge = clone $this->_prototype;\n $merge->loadFile($file);\n $this->extend($merge);\n }\n\n if (in_array($etcDir.DS.'local.xml', $files)) {\n $this->_isLocalConfigLoaded = true;\n }\n\n return $this;\n }", "function builder_theme_settings_set_defaults( $defaults ) {\n\tglobal $builder_theme_feature_options;\n\t\n\t$new_defaults = array(\n\t\t'include_pages' => array( 'home' ),\n\t\t'include_cats' => array(),\n\t\t'javascript_code_header' => '',\n\t\t'javascript_code_footer' => '',\n\t\t'identify_widget_areas' => 'admin',\n\t\t'identify_widget_areas_method' => 'empty',\n\t\t'enable_comments_page' => '',\n\t\t'enable_comments_post' => '1',\n\t\t'comments_disabled_message' => 'none',\n\t\t'tag_as_keyword' => 'yes',\n\t\t'cat_index' => 'no',\n\t\t'google_analytics_enable' => '',\n\t\t'woopra_enable' => '',\n\t\t'gosquared_enable' => '',\n\t\t'gallery_default_render_method' => 'columns',\n\t\t'activation_child_theme_setup' => 'ask',\n\t\t'activation_default_layouts' => 'ask',\n\t);\n\t\n\tforeach ( (array) $builder_theme_feature_options as $features ) {\n\t\tforeach ( (array) $features as $feature => $details )\n\t\t\t$new_defaults[\"theme_supports_$feature\"] = $details['default_enabled'];\n\t}\n\t\n\t$defaults = ITUtility::merge_defaults( $defaults, $new_defaults );\n\t$defaults = apply_filters( 'builder_filter_theme_settings_defaults', $defaults );\n\t\n\t// Legacy\n\t$defaults = apply_filters( 'builder_filter_default_settings', $defaults );\n\t\n\treturn $defaults;\n}", "protected function mergeDefaults(array $opts) {\n // Merges with defaults.\n $opts = parent::mergeDefaults($opts);\n\n // Converts types.\n $opts['active'] = $this->convertToBoolean($opts['active']);\n $opts['voided'] = $this->convertToBoolean($opts['voided']);\n $opts['related_agents'] = $this->convertToBoolean($opts['related_agents']);\n $opts['related_activities'] = $this->convertToBoolean($opts['related_activities']);\n $opts['attachments'] = $this->convertToBoolean($opts['attachments']);\n $opts['ascending'] = $this->convertToBoolean($opts['ascending']);\n $opts['limit'] = $this->convertToInt($opts['limit']);\n $opts['offset'] = $this->convertToInt($opts['offset']);\n\n if ($opts['limit'] === 0) $opts['limit'] = 100;\n return $opts;\n }", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "function stage_config($key = null, $default = null)\n{\n // Requested config file\n $config = explode('.', $key)[0];\n $file = get_template_directory() . '/config' . '/' . $config . '.php';\n\n if (file_exists($file)) {\n // Get Stage defaults config\n $stage['config'] = include $file;\n\n // Set as new config \"Stage\"\n \\Roots\\config(array( \"stage.{$config}\" => $stage['config'] ));\n\n // Return the config\n return \\Roots\\config(\"stage.{$key}\", $default);\n }\n\n return \\Roots\\config($key, $default);\n}", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "private function syncronize() {\n\t\t$existingsOptions = get_option( $this->getGatewayKey() );\n\n\t\t// Get the saved options in the object\n\t\t$options = $this->getSettings();\n\n\t\t// If options exists we need to merge them with the default ones\n\t\tif ( $existingsOptions ) {\n\t\t\tforeach ( $existingsOptions as $option ) {\n\t\t\t\tif ( isset( $options[ $option->getName() ] ) )\n\t\t\t\t\t$options[ $option->getName() ]->setValue( $option->getValue() );\n\t\t\t}\n\t\t}\n\n\t\t//$this->addSettings( $options );\n\t}", "protected function addConfiguration()\n {\n $this['config'] = $this->share(\n function () {\n $user_config_file = (file_exists('phpdoc.xml'))\n ? 'phpdoc.xml'\n : 'phpdoc.dist.xml';\n\n return \\Zend\\Config\\Factory::fromFiles(\n array(\n __DIR__.'/../../data/phpdoc.tpl.xml',\n $user_config_file\n ), true\n );\n }\n );\n }", "public function defaults()\n {\n $defaults = $this->config;\n if (!isset($defaults['width'])) {\n $defaults['width'] = $defaults['default_width'];\n }\n if (!isset($defaults['height'])) {\n $defaults['height'] = $defaults['default_height'];\n }\n return $defaults;\n }", "protected function load_addon_config() {\n\t\t$config = [\n\t\t\t'gist' => [\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Git Updater - Gist', 'git-updater' ),\n\t\t\t\t\t'author' => __( 'Andy Fragen' ),\n\t\t\t\t\t'description' => __( 'Add GitHub Gist hosted repositories to the Git Updater plugin.', 'git-updater' ),\n\t\t\t\t\t'host' => 'github',\n\t\t\t\t\t'slug' => 'git-updater-gist/git-updater-gist.php',\n\t\t\t\t\t'uri' => 'afragen/git-updater-gist',\n\t\t\t\t\t'branch' => 'main',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'api' => 'gist',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'bitbucket' => [\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Git Updater - Bitbucket', 'git-updater' ),\n\t\t\t\t\t'author' => __( 'Andy Fragen' ),\n\t\t\t\t\t'description' => __( 'Add Bitbucket and Bitbucket Server hosted repositories to the Git Updater plugin.', 'git-updater' ),\n\t\t\t\t\t'host' => 'github',\n\t\t\t\t\t'slug' => 'git-updater-bitbucket/git-updater-bitbucket.php',\n\t\t\t\t\t'uri' => 'afragen/git-updater-bitbucket',\n\t\t\t\t\t'branch' => 'main',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'api' => 'bitbucket',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'gitlab' => [\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Git Updater - GitLab', 'git-updater' ),\n\t\t\t\t\t'author' => __( 'Andy Fragen' ),\n\t\t\t\t\t'description' => __( 'Add GitLab hosted repositories to the Git Updater plugin.', 'git-updater' ),\n\t\t\t\t\t'host' => 'github',\n\t\t\t\t\t'slug' => 'git-updater-gitlab/git-updater-gitlab.php',\n\t\t\t\t\t'uri' => 'afragen/git-updater-gitlab',\n\t\t\t\t\t'branch' => 'main',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'api' => 'gitlab',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'gitea' => [\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Git Updater - Gitea', 'git-updater' ),\n\t\t\t\t\t'author' => __( 'Andy Fragen' ),\n\t\t\t\t\t'description' => __( 'Add Gitea hosted repositories to the Git Updater plugin.', 'git-updater' ),\n\t\t\t\t\t'host' => 'github',\n\t\t\t\t\t'slug' => 'git-updater-gitea/git-updater-gitea.php',\n\t\t\t\t\t'uri' => 'afragen/git-updater-gitea',\n\t\t\t\t\t'branch' => 'main',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'api' => 'gitea',\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\n\t\treturn $config;\n\t}", "public function mergeDefaultDefinition(PluginDefinitionInterface $other_definition);", "function beaver_extender_custom_js_options_defaults() {\n\t\n\t$defaults = array(\n\t\t'custom_js_in_head' => 0,\n\t\t'custom_js' => ''\n\t);\n\t\n\treturn apply_filters( 'beaver_extender_custom_js_options_defaults', $defaults );\n\t\n}", "public static function applyDefaultConfig()\r\n\t{\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_mainCache', array( 'enabled' => 'off', 'lifetime' => 3600 ) );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sectionCache', array( 'enabled' => 'off', 'lifetime' => 7000 ) );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_maxEntryCountByFile', 49999 );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_maxFileSize', 10485760 );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_rootCacheDir', sfConfig::get('sf_cache_dir').'/prestaSitemapPlugin' );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sitemapGeneratorClassName', 'prestaSitemapGenerator' );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sitemapUrlClassName', 'prestaSitemapUrl' );\r\n\t}", "public function setDefaultExtension($defaultExtension)\n {\n $this->defaultExtension = $defaultExtension;\n\n return $this;\n }", "public function setExtendables()\n {\n $this->extend('foo', function() {\n return [$this->getUserAgent(), $this->getRemoteAddr()];\n });\n }", "protected function _defaults($arr)\n\t{\n\t\t$defaults = array(\n\t\t\t'enable_realtime' => false, \n\t\t\t'check_callbacks' => true, \n\t\t\t'qbxml_version' => '4.0',\n\t\t\t'qbxml_onerror' => 'stopOnError', \n\t\t\t'map_create_handler' => null, \n\t\t\t'map_to_quickbooks_handler' => null,\n\t\t\t'map_to_application_handler' => null,\n\t\t\t'map_to_editsequence_handler' => null, \n\t\t\t);\n\t\t\t\n\t\treturn array_merge($defaults, $arr);\n\t}", "public function loadConfigs()\n {\n self::$country_configs = self::getCountryConfigs();\n $configs = new parent();\n self::$categories = $configs->getCategories();\n self::$site_data = self::get_site_data();\n self::$payments_name = self::setPaymentGateway();\n }", "protected function mergeConfig(array $original, array $merging)\n\t{\n\t\t$array = array_merge($original, $merging);\n\t\tforeach ($original as $key => $value) {\n\t\t\tif (! is_array($value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (! Arr::exists($merging, $key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (is_numeric($key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$array[$key] = $this->mergeConfig($value, $merging[$key]);\n\t\t}\n\t\treturn $array;\n\t}", "public function overrideDefaults( array $options ) {\n\t\tstatic::$options = \n\t\t\\array_merge( static::$options, $options );\n\t\t\n\t\tforeach ( static::$options as $k => $v ) {\n\t\t\tstatic::$options[$k] = \n\t\t\t\t$this->placeholders( $v );\n\t\t}\n\t}" ]
[ "0.7424907", "0.70438117", "0.6783168", "0.66781783", "0.66365457", "0.6515195", "0.62886626", "0.6164226", "0.6102843", "0.59403396", "0.5934853", "0.589574", "0.58764935", "0.5843044", "0.5841047", "0.58130175", "0.5797986", "0.5794138", "0.57897735", "0.5788802", "0.57759", "0.5773178", "0.57516336", "0.5727922", "0.5721925", "0.57027984", "0.5701473", "0.57013357", "0.5697203", "0.56899506", "0.5677194", "0.56691307", "0.56584805", "0.55997044", "0.55907243", "0.55875784", "0.5570646", "0.5570176", "0.5555887", "0.5538963", "0.55103683", "0.55056596", "0.5491125", "0.5482388", "0.5480365", "0.547554", "0.547129", "0.54654664", "0.5454432", "0.54430073", "0.54194623", "0.54125494", "0.54051507", "0.5401337", "0.53909355", "0.538121", "0.53738725", "0.5372951", "0.53468156", "0.53379637", "0.53335357", "0.5331561", "0.5325009", "0.5321698", "0.53142744", "0.5310506", "0.5307168", "0.5297319", "0.52952385", "0.529393", "0.52926874", "0.5284216", "0.5278392", "0.5277399", "0.5275521", "0.5262787", "0.5262138", "0.5259296", "0.52487284", "0.52471215", "0.52450466", "0.52397996", "0.5238699", "0.5237259", "0.5228629", "0.5228375", "0.5225327", "0.5224441", "0.52172345", "0.52162075", "0.52150434", "0.5214947", "0.52076143", "0.5197987", "0.519529", "0.51936704", "0.51918143", "0.5168888", "0.5168779", "0.5153062" ]
0.59103894
11
Merges a raw configuration section with the default values.
protected function mergeSection(array $raw, array $default) { foreach($raw as $rawItem) { if($this->isValidNegotiationNode($rawItem)) { $append = true; foreach($default as $defaultIndex=>$defaultItem) { if($defaultItem['name'] == $rawItem['name']) { $default[$defaultIndex] = $rawItem; $append = false; break; } } if($append) { $default[] = $rawItem; } } } return $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function mergeDefaultSettings(){\n\t\t//Get a copy of the default configuration.\n\t\t$defaultConfig = $this->getDefaultConfig();\n\t\t//Check for a 'general' section\n\t\tif(array_key_exists('general', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingGeneral = array_diff_key($defaultConfig['general'], $this->configuration['general']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missingGeneral) > 0){\n\t\t\t\tforeach($missingGeneral as $key=>$parameter){\n\t\t\t\t\t$this->configuration['general'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['general'] = $defaultConfig['general'];\n\t\t}\n\t\t//Check for a 'options' section\n\t\tif(array_key_exists('options', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingOptions = array_diff_key($defaultConfig['options'], $this->configuration['options']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missionOptions) > 0){\n\t\t\t\tforeach($missingOptions as $key=>$parameter){\n\t\t\t\t\t$this->configuration['options'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['options'] = $defaultConfig['options'];\n\t\t}\n\t}", "protected function merge(array $rawConfiguration, array $defaultConfiguration)\n {\n foreach($defaultConfiguration as $section=>$configuration)\n {\n if($this->isNegotiationConfiguration($section))\n {\n if(isset($rawConfiguration[$section]))\n {\n if(count($rawConfiguration[$section]) > 0)\n {\n $defaultConfiguration[$section] = $rawConfiguration[$section];\n }\n }\n $appendSection = 'append_'.$section;\n if(isset($rawConfiguration[$appendSection]))\n {\n if(count($rawConfiguration[$appendSection]) > 0)\n {\n $defaultConfiguration[$section] = $this->mergeSection($rawConfiguration[$appendSection],$defaultConfiguration[$section]);\n }\n }\n }\n else\n {\n if(isset($rawConfiguration[$section]))\n {\n if(is_array($rawConfiguration[$section]))\n {\n foreach($configuration as $index=>$item)\n {\n if(isset($rawConfiguration[$section][$index]))\n {\n $defaultConfiguration[$section][$index] = $rawConfiguration[$section][$index];\n }\n }\n }\n else\n {\n $defaultConfiguration[$section] = $rawConfiguration[$section];\n }\n }\n }\n }\n $this->negotiationEnabled = $defaultConfiguration['negotiation']['enabled'];\n $this->serializerEnabled = $defaultConfiguration['serializer']['enabled'];\n $this->normalizerEnabled = $defaultConfiguration['normalizer']['enabled'];\n $this->validatorEnabled = $defaultConfiguration['validator']['enabled'];\n return $defaultConfiguration;\n }", "public function defaultConfig();", "private function handleKeyBaseMerge(&$config, ConfigDefinition $definition, $section)\n {\n // ass missing section key\n if (!array_key_exists($section, $config)) {\n $config[$section] = [];\n }\n\n // array key from definition in order to merge with existing values\n $key = $definition->getKey();\n\n // if key exists, merge otherwise create key\n if (isset($config[$section][$key])) {\n $config[$section][$key] = ArrayHelper::merge($config[$section][$key], $definition->getConfig());\n } else {\n $config[$section][$key] = $definition->getConfig();\n }\n }", "static protected function mergeConfig($config)\r\n {\r\n $config['all']['stylesheets'] = array_merge(isset($config['default']['stylesheets']) && is_array($config['default']['stylesheets']) ? $config['default']['stylesheets'] : array(), isset($config['all']['stylesheets']) && is_array($config['all']['stylesheets']) ? $config['all']['stylesheets'] : array());\r\n unset($config['default']['stylesheets']);\r\n\r\n $config['all']['javascripts'] = array_merge(isset($config['default']['javascripts']) && is_array($config['default']['javascripts']) ? $config['default']['javascripts'] : array(), isset($config['all']['javascripts']) && is_array($config['all']['javascripts']) ? $config['all']['javascripts'] : array());\r\n unset($config['default']['javascripts']);\r\n\r\n $config['all']['metas']['title'] = array_merge(\r\n isset($config['default']['metas']['title']) && is_array($config['default']['metas']['title']) ? $config['default']['metas']['title'] \r\n : (isset($config['default']['metas']['title']) ? array($config['default']['metas']['title']) : array()), \r\n isset($config['all']['metas']['title']) && is_array($config['all']['metas']['title']) ? $config['all']['metas']['title'] \r\n : (isset($config['all']['metas']['title']) ? array($config['all']['metas']['title']) : array())\r\n );\r\n unset($config['default']['metas']['title']);\r\n \r\n // merge default and all\r\n $config['all'] = sfToolkit::arrayDeepMerge(\r\n isset($config['default']) && is_array($config['default']) ? $config['default'] : array(),\r\n isset($config['all']) && is_array($config['all']) ? $config['all'] : array()\r\n );\r\n unset($config['default']);\r\n return self::replaceConstants($config);\r\n }", "private function mergeConfig() {\n\t\t$this->mergeConfigFrom(\n\t\t\t__DIR__ . '/../config/config.php', 'sl-upload'\n\t\t);\n\t}", "function merge_config_section($section_name, $new_contents) {\n\t$fname = get_tmp_file();\n\t$fout = fopen($fname, \"w\");\n\tfwrite($fout, $new_contents);\n\tfclose($fout);\n\t$section_xml = parse_xml_config($fname, $section_name);\n\tconfig_set_path($section_name, $section_xml);\n\tunlink($fname);\n\twrite_config(sprintf(gettext(\"Restored %s of config file (maybe from CARP partner)\"), $section_name));\n\tdisable_security_checks();\n\treturn;\n}", "protected function defaultRawConfiguration()\n {\n return [\n 'negotiation' => [\n 'enabled' => false,\n ],\n 'serializer' => [\n 'enabled' => true\n ],\n 'normalizer' => [\n 'enabled' => false\n ],\n 'validator' => [\n 'enabled' => false\n ],\n 'types' =>\n [\n [\n 'name' => 'json',\n 'values'=> [\n 'application/json','text/json'\n ],\n 'restrict' => null\n ],\n [\n 'name' => 'xml',\n 'values' => [\n 'application/xml','text/xml'\n ],\n 'restrict' => null\n ]\n ],\n 'headers' =>\n [\n 'content_type' => 'content-type',\n 'accept_type' => 'accept'\n ]\n ];\n }", "public function getDefaultConfiguration();", "private function mergeConfig()\n {\n $countries = $this->countryIso();\n $this->app->configure('priongeography');\n\n $this->mergeConfigFrom(\n __DIR__ . '/config/priongeography.php',\n 'priongeography'\n );\n }", "function defaultValues(&$conf)\t{\n\t\t// Addition of default values\n\t\tif (is_array($conf[$conf['cmdKey'].'.']['defaultValues.']))\t{\n\t\t\treset($conf[$conf['cmdKey'].'.']['defaultValues.']);\n\t\t\twhile(list($theField,$theValue)=each($conf[$conf['cmdKey'].'.']['defaultValues.']))\t{\n\t\t\t\tif (strpos($theValue,\":\")) {\n\t\t\t\t\t$data=tx_metafeedit_lib::getData($theValue,0,$this->cObj);\n\t\t\t\t\tif (!$data) $data=$this->dataArr[$theField];\n\t\t\t\t} else {\n\t\t\t\t\t$data=$theValue;\n\t\t\t\t}\n\t\t\t\t$this->dataArr[$theField] = $data;\n\t\t\t}\n\t\t}\n\t}", "protected function defaultConfig()\n\t{\n\t\t$this->config=array(\n\t\t\t'code'=>'1',\n\t\t\t'scanning'=>\"\",\n\t\t\t'scanCodes'=>array()\n\t\t);\n\t}", "protected function mergeConfig()\n {\n $this->mergeConfigFrom(__DIR__.\"/../config/{$this->name}.php\", $this->name);\n }", "private function mergeConfig()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/config.php', 'routecache'\n );\n }", "private function mergeConfig()\n\t{\n\t\t$this->mergeConfigFrom(\n\t\t\t__DIR__ . '/../config/config.php', 'l5-sms'\n\t\t);\n\t}", "public function mergeRaw(array $raw)\n {\n return $this->setRaw(Arrays::merge($this->config, $raw, 'allowRemoval'));\n }", "protected function _initConfig()\n {\n parent::_initConfig();\n $this->_mergeConfig(array(\n 'get_descriptions' => false, // true to get descriptions for text sections\n ));\n }", "public function merge(Config $other) {\n\t\t/* merge variables */\n\t\tforeach($other->getVars() as $key => $value) {\n\t\t\t$this->vars[ $key ] = $value;\n\t\t}\n\t\t/* merge templates */\n\t\tforeach($other->getTemplates() as $one) {\n\t\t\t$this->templates[] = $one;\n\t\t}\n\t}", "protected function mergeWithExistingConfiguration(array $defaultConfiguration, $extensionKey)\n {\n try {\n $currentExtensionConfig = unserialize(\n $this->objectManager->get(\\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager::class)\n ->getConfigurationValueByPath('EXT/extConf/' . $extensionKey)\n );\n if (!is_array($currentExtensionConfig)) {\n $currentExtensionConfig = [];\n }\n } catch (\\RuntimeException $e) {\n $currentExtensionConfig = [];\n }\n $flatExtensionConfig = ArrayUtility::flatten($currentExtensionConfig);\n $valuedCurrentExtensionConfig = [];\n foreach ($flatExtensionConfig as $key => $value) {\n $valuedCurrentExtensionConfig[$key]['value'] = $value;\n }\n ArrayUtility::mergeRecursiveWithOverrule($defaultConfiguration, $valuedCurrentExtensionConfig);\n return $defaultConfiguration;\n }", "function data_preprocessing(&$default_values){\n parent::data_preprocessing($default_values);\n if (!empty($default_values['config'])) {\n $values = json_decode($default_values['config'], true);\n foreach ($values as $key => $value) {\n $default_values['config_' . $key] = $value;\n }\n unset($default_values['config']);\n }\n }", "public function getDefaultConfiguration() {}", "protected function mergeConfiguration()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/firefly.php', 'firefly'\n );\n }", "public function getConfigDefaults()\n {\n // $file = realpath(__DIR__ . '/../../data/distribution/config.dist.php');\n $file = __DIR__ . '/../../data/distribution/config.dist.php';\n\n return $this->getConfigFromFile($file);\n }", "public function addSectionVars($sectionVars, $merge=true) {\n $first = true;\n \n foreach ($sectionVars as $var=>$value) {\n \n if (!is_array($value)) {\n throw new KurogoConfigurationException(\"Found value $var = $value that wasn't in a section. Config needs to be updated\");\n }\n \n if ($merge) {\n if (isset($this->sectionVars[$var]) && is_array($this->sectionVars[$var])) {\n $this->sectionVars[$var] = array_merge($this->sectionVars[$var], $value);\n } else {\n $this->sectionVars[$var] = $value;\n }\n } else {\n $this->sectionVars[$var] = $value;\n }\n \n $first = false;\n }\n }", "public function defaultableSections(&$sections, $section = NULL) { }", "public function merge(array $config)\n {\n // override defaults with given config\n if (!empty($config['config']) && is_array($config['config'])) {\n $this->config = array_replace_recursive($this->config, $config['config']);\n }\n }", "protected function mergeConfig(array $original, array $merging)\n\t{\n\t\t$array = array_merge($original, $merging);\n\t\tforeach ($original as $key => $value) {\n\t\t\tif (! is_array($value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (! Arr::exists($merging, $key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (is_numeric($key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$array[$key] = $this->mergeConfig($value, $merging[$key]);\n\t\t}\n\t\treturn $array;\n\t}", "static function merge($config, $newConfigName) \n {\n if (empty($config)) {\n $config = array(); \n }\n\n if ($newConfigName != self::CONFIG_DEFAULT) {\n $newConfig = self::load($newConfigName);\n\n foreach (self::$available_setting as $key => $type) {\n if (isset($newConfig[$key]) && !isset($config[$key])) {\n $config[$key] = $newConfig[$key];\n } else if (isset($newConfig[$key]) && isset($config[$key])) {\n switch ($type) {\n case self::SETTING_TYPE_ARRAY:\n $config[$key] = array_merge($config[$key], $newConfig[$key]);\n break;\n default:\n $config[$key] = $newConfig[$key];\n break;\n } \n }\n } \n\n // Override default setting for some websites that using bad class name\n foreach ($config[self::IGNORED_CLASSES] as $key => $class) {\n if (isset($newConfig[self::OVERRIDE_CLASSES]) && in_array($class, $newConfig[self::OVERRIDE_CLASSES])) {\n unset($config[self::IGNORED_CLASSES][$key]);\n }\n }\n }\n\n return $config;\n }", "public static function config($group, $default = NULL)\n {\n $retval = parent::config($group);\n \n return $retval === NULL\n ? $default\n : $retval;\n }", "public function addDefaultEntriesAndValues() {}", "public function section($name, $default = null);", "public function getConfig(array $defaults = []);", "protected function defineConfig()\n {\n // Get config paths\n $configs = $this->config->getDirectly(__DIR__ . '/../Config/path.php')['default_config'] ?? [];\n\n // Add all of them to config collector if $configs is an array\n if (is_array($configs)) {\n foreach ($configs as $alias => $path) {\n $this->config->set($alias, $path);\n }\n }\n }", "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "public function merge(array $config): self;", "protected function mergeWithCurrentConfig($config)\n {\n $currentConfigFilePath = $this->getCurrentConfigFilePath();\n if (File::isFile($currentConfigFilePath)) {\n $currentConfig = include $currentConfigFilePath;\n if (is_array($currentConfig)) {\n foreach ($currentConfig as $key => $value) {\n if (isset($config[$key])) {\n $config[$key]['value'] = $value;\n }\n }\n }\n };\n\n return $config;\n }", "public function overrideConfiguration($config) {\n if (is_array($config)) \n $this->config = array_replace_recursive($this->config, $config);\n }", "public function merge(array $config)\r\n {\r\n $this->ensureLoaded();\r\n $this->mergeSectionRecursive($this->config, $config, null);\r\n }", "private function getDefaultConfig(){\n\t\t//Pretty simple. Multidimensional array of configuration values gets returned\n\t $defaultConfig = array();\n\t\t$defaultConfig['general'] = array('start_path'=>'.', 'disallowed'=>'php, php4, php5, phps',\n\t\t\t\t\t\t\t\t\t\t 'page_title'=>'OMFG!', 'files_label'=>'', 'folders_label'=>'');\n\t\t$defaultConfig['options'] = array('thumb_height'=>75, 'files_per_page'=>25, 'max_columns'=>3, \n\t\t\t\t\t\t\t\t\t\t 'enable_ajax'=>false, 'memory_limit'=>'256M', 'cache_thumbs'=>false, \n\t\t\t\t\t\t\t\t\t\t\t'thumbs_dir'=>'/.thumbs', 'icons_dir'=>'/.icons');\n\t\treturn $defaultConfig;\n\t}", "abstract protected function loadConfig();", "protected function mergeConfig(array $original, array $merging)\n {\n $array = array_merge($original, $merging);\n foreach ($original as $key => $value) {\n if (!is_array($value)) {\n continue;\n }\n if (!Arr::exists($merging, $key)) {\n continue;\n }\n if (is_numeric($key)) {\n continue;\n }\n $array[$key] = $this->mergeConfig($value, $merging[$key]);\n }\n\n return $array;\n }", "abstract protected function defineConfiguration();", "public function merge(Zend_Config $merge)\n {\n foreach($merge as $key => $item) {\n if(array_key_exists($key, $this->_data)) {\n if($item instanceof Zend_Config && $this->$key instanceof Zend_Config) {\n $this->$key = $this->$key->merge(new Zend_Config($item->toArray(), !$this->readOnly()));\n } else {\n $this->$key = $item;\n }\n } else {\n if($item instanceof Zend_Config) {\n $this->$key = new Zend_Config($item->toArray(), !$this->readOnly());\n } else {\n $this->$key = $item;\n }\n }\n }\n\n return $this;\n }", "public function applyConfigDefaults(array $config)\n {\n $defaults = array(\n 'arch' => 'all',\n 'buildId' => gmdate(self::DEFAULT_BUILDTIME_FORMAT),\n 'description' => '',\n 'depends' => array(),\n 'exclude' => array(),\n 'maintainer' => '',\n 'postinst' => '',\n 'priority' => 'optional',\n 'sources' => array(),\n 'workspaceBasedir' => self::DEFAULT_WORKSPACE_BASEDIR\n );\n $config = array_merge($defaults, $config);\n\n if ($config['postinst']) {\n $config['postinst'] = rtrim($config['postinst']) . \"\\n\";\n }\n $config['sources'] = array();\n\n $config['fullName'] = sprintf(\n '%s_%s_%s',\n $config['shortName'], $config['version'], $config['arch']\n );\n $config['versionDir'] = sprintf(\n '%s/%s/%s',\n $config['workspaceBasedir'], $config['shortName'], $config['version']\n );\n $config['buildDir'] = \"{$config['versionDir']}/\" . $config['buildId'];\n $config['pkgDir'] = \"{$config['buildDir']}/{$config['fullName']}\";\n\n return $config;\n }", "static function overwrite_configuration( $conf ) {\n\t\tif ( $conf !== null ) {\n\t\t\t$current_config = self::config();\n\t\t\tself::$configuration = array_merge( $current_config, $conf );\n\t\t} else { // null passed; delete configuration\n\t\t\tself::$configuration = null;\n\t\t}\n\t}", "abstract protected function _updateConfiguration();", "public function readConfigurationValues();", "public function mergeDefaultDefinition(PluginDefinitionInterface $other_definition);", "protected function mergeConfig()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/Config/teamrole.php', 'teamrole'\n );\n }", "public static function returnExtConfDefaults() {}", "protected function baseConfigurationDefaults() {\n return array(\n 'id' => $this->getPluginId(),\n 'label' => '',\n 'cache' => DRUPAL_CACHE_PER_ROLE,\n );\n }", "protected function registerConfigs()\n {\n // Append or overwrite configs\n #config(['test' => 'hi']);\n\n // Merge configs\n #$this->mergeConfigFrom(__DIR__.'/../Config/parser.php', 'mrcore.parser');\n }", "private function calculateRawDefaults()\n\t{\n\t\tforeach ($this->form_def['field_groups'] as $gi => $g) {\n\t\t\tif (!empty($g['wild'])) {\n\t\t\t\t// Wild group has no default data, but group still exists\n\t\t\t\t$this->raw_defaults[$gi] = array();\n\t\t\t} else if (isset($this->field_defaults[$gi])) {\n\t\t\t\t// Values for the group are set, use them.\n\t\t\t\t$this->preProcessGroup($gi, $g, $this->field_defaults[$gi], $this->raw_defaults[$gi]);\n\t\t\t} else {\n\t\t\t\tif (empty($g['collection_dimensions'])) {\n\t\t\t\t\t// Values for the group are missing, use defaults from the form definition.\n\t\t\t\t\t$group_defaults = array();\n\t\t\t\t\tforeach ($g['fields'] as $fi => $f) {\n\t\t\t\t\t\tif (isset($f['default'])) {\n\t\t\t\t\t\t\t$group_defaults[$fi] = $f['default'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->preProcessGroup($gi, $g, $group_defaults, $this->raw_defaults[$gi]);\n\t\t\t\t} else {\n\t\t\t\t\t// Empty collection by default.\n\t\t\t\t\t$this->raw_defaults[$gi] = array();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function reset_to_defaults () {\n\n global $CFG;\n include_once($CFG->dirroot .'/lib/defaults.php');\n\n $updatedata = array();\n\n $updatedata['editorbackgroundcolor'] = $defaults['editorbackgroundcolor'];\n $updatedata['editorfontfamily'] = $defaults['editorfontfamily'];\n $updatedata['editorfontsize'] = $defaults['editorfontsize'];\n $updatedata['editorkillword'] = $defaults['editorkillword'];\n $updatedata['editorspelling'] = $defaults['editorspelling'];\n $updatedata['editorfontlist'] = $defaults['editorfontlist'];\n $updatedata['editorhidebuttons'] = $defaults['editorhidebuttons'];\n $updatedata['editordictionary'] = '';\n\n foreach ($updatedata as $name => $value) {\n if (!(set_config($name, $value))) {\n return false;\n }\n }\n return true;\n}", "protected function loadDefaultOptions()\r\n {\r\n $this->options = [\r\n 'offsettop' => 0,\r\n 'offsetleft' => 0,\r\n 'merge' => false,\r\n 'backcolor' => 0xffffff,\r\n ];\r\n }", "protected function defaults() {\n\t\t\t$config = array(\n\t\t\t\t'version' => $this->version,\n\t\t\t\t'autoshowpt' => array(\n\t\t\t\t\t//'post'=> true\n\t\t\t\t),\n\t\t\t\t'usept' => array(\n\t\t\t\t\t'post' => true\n\t\t\t\t),\n\t\t\t\t'usetax' => array(),\n\t\t\t\t'autoshowrss' => false,\n\t\t\t\t'do_c2c' => 1,\n\t\t\t\t'do_t2t' => 0,\n\t\t\t\t'do_t2c' => 0,\n\t\t\t\t'do_k2c' => 0,\n\t\t\t\t'do_k2t' => 0,\n\t\t\t\t'do_x2x' => 1,\n\t\t\t\t'minscore' => 50,\n\t\t\t\t'maxresults' => 5,\n\t\t\t\t'cachetime' => 60,\n\t\t\t\t'filterpriority' => 10,\n\t\t\t\t'log' => false,\n\t\t\t\t'loglevel' => false,\n\t\t\t\t'storage' => 'postmeta',\n\t\t\t\t'storage_id' => 'better-related-',\n\t\t\t\t'querylimit' => 1000,\n\t\t\t\t't_querylimit' => 10000,\n\t\t\t\t'mtime' => time(),\n\t\t\t\t'relatedtitle' => sprintf(\n\t\t\t\t\t\"<strong>%s</strong>\",\n\t\t\t\t\t__( 'Related content:', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'relatednone' => sprintf(\n\t\t\t\t\t\"<p>%s</p>\",\n\t\t\t\t\t__( 'No related content found.', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'thanks' => 'below',\n\t\t\t\t'stylesheet' => true,\n\t\t\t\t'showdetails' => false\n\t\t\t);\n\t\t\treturn $config;\n\t\t}", "private function addConfigSection(ArrayNodeDefinition $node)\r\n {\r\n $node\r\n ->children()\r\n ->arrayNode('config')\r\n ->children()\r\n ->scalarNode('merchant_id')->isRequired()->cannotBeEmpty()->end()\r\n ->scalarNode('merchant_country')->isRequired()->cannotBeEmpty()->end()\r\n ->scalarNode('pathfile')->isRequired()->cannotBeEmpty()->end()\r\n ->scalarNode('templatefile')->defaultValue(null)->end()\r\n ->scalarNode('default_language')->isRequired()->cannotBeEmpty()->end()\r\n ->scalarNode('default_teplate_file')->defaultValue(null)->end()\r\n ->scalarNode('default_currency')->cannotBeEmpty()->defaultValue(978)->end()\r\n ->end()\r\n ->end()\r\n ->end();\r\n }", "public function setConfigValues(string $location, $default = null)\n {\n $value = $default ?? $this->settings[$location] ?? config($location);\n config([$location => $value]);\n }", "public function testOverridesWithoutDefaultsAccess() {\n $assert_session = $this->assertSession();\n $page = $this->getSession()->getPage();\n\n $this->drupalLogin($this->drupalCreateUser(['configure any layout']));\n\n LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default')\n ->enableLayoutBuilder()\n ->setOverridable()\n ->save();\n\n $this->drupalGet('node/1');\n $page->clickLink('Layout');\n $assert_session->elementTextContains('css', '.layout-builder__message.layout-builder__message--overrides', 'You are editing the layout for this Bundle with section field content item.');\n $assert_session->linkNotExists('Edit the template for all Bundle with section field content items instead.');\n }", "public function GetRaw($section, $key, $default = null)\n {\n $result = null;\n if (array_key_exists($section, $this->vars)) {\n if (array_key_exists($key, $this->vars[ $section ])) {\n $result = $this->vars[ $section ][ $key ];\n }\n }\n return Util::Get($result, $default) ;\n }", "protected function mergeflexFormValuesIntoConf() {}", "public static function applyDefaultConfig()\r\n\t{\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_mainCache', array( 'enabled' => 'off', 'lifetime' => 3600 ) );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sectionCache', array( 'enabled' => 'off', 'lifetime' => 7000 ) );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_maxEntryCountByFile', 49999 );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_maxFileSize', 10485760 );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_rootCacheDir', sfConfig::get('sf_cache_dir').'/prestaSitemapPlugin' );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sitemapGeneratorClassName', 'prestaSitemapGenerator' );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sitemapUrlClassName', 'prestaSitemapUrl' );\r\n\t}", "function default_configuration()\r\n {\r\n return array();\r\n }", "abstract protected function loadDefaults();", "public function getDefaultConfig($fileName = null)\n {\n $configHelper = \\Fci_Helper_Config::getInstance();\n if (!$fileName) {\n $configHelper->load('default.xml.dist');\n } else {\n try {\n $configHelper->load($fileName . '.xml');\n } catch (ParserException $e) {\n $configHelper->load('default.xml.dist');\n }\n }\n\n $default = [\n 'file' => [\n 'path' => $configHelper->getFilePath(),\n 'delimiter' => $configHelper->getFileDelimiter(),\n 'enclosure' => $configHelper->getFileEnclosure(),\n 'archive_with_datetime' => (int)$configHelper->getArchiveWithDateTime(),\n ],\n 'general' => [\n 'reload_cache' => (int)$configHelper->getReloadCache(),\n 'disable_products' => (int)$configHelper->getDisableProducts(),\n 'delete_disabled_products' => (int)$configHelper->getDeleteDisabledProducts(),\n 'disable_conditions' => $configHelper->getDisableConditions(),\n 'delete_products_not_in_csv' => (int)$configHelper->getDeleteProductsNotInCsv(),\n 'unset_special_price' => (int)$configHelper->getUnsetSpecialPrice(),\n 'delete_all_special_prices' => (int)$configHelper->getDeleteAllSpecialPrices(),\n 'scripts' => $configHelper->getScripts(),\n ],\n 'dataprocessing' => [\n 'general' => [\n 'mode' => $configHelper->getMode(),\n 'import' => $configHelper->getImportType(),\n 'cache_lines' => $configHelper->getLinesToCache(),\n 'mappings' => $configHelper->getMappingsValue(),\n 'strip_html_tags' => (int)$configHelper->getStripHtmlTags(),\n 'import_globally' => (int)$configHelper->getImportGallery(),\n 'date_time_format' => $configHelper->getDateTimeFormat(),\n ],\n 'images' => [\n 'image_prefix' => $configHelper->getImagePrefix(),\n 'image_split' => $configHelper->getImageSeparator(),\n 'sku_fallback' => (int)$configHelper->getUseSkuImageFallback(),\n 'import_gallery' => (int)$configHelper->getImportGallery(),\n ],\n 'mandatory' => $configHelper->getMandatoryFields(),\n 'products' => [\n 'identifier' => $configHelper->getProductIdentifier(),\n 'clear_existing_websites' => (int)$configHelper->getClearExistingWebsites(),\n ],\n ],\n 'general_defaults' => [\n 'websites' => $configHelper->getWebsitesValue(),\n 'store' => $configHelper->getStoreValue(),\n ],\n 'product_defaults' => $configHelper->getProductDefaults(),\n 'category_defaults' => $configHelper->getCategoryDefaults(),\n 'category_settings' => [\n 'root_category' => $configHelper->getRootCategory(),\n 'category_separate' => $configHelper->getCategorySeparate(),\n 'sub_category_separate' => $configHelper->getSubCategorySeparate(),\n 'create_categories' => (int)$configHelper->createCategories(),\n 'default_product_position' => $configHelper->getDefaultProductPosition(),\n ],\n ];\n\n return $default;\n }", "public function setRaw(array $raw)\n {\n $this->config = $raw;\n \n return $this;\n }", "public function stdWrap_override($content = '', $conf = [])\n {\n if (trim($conf['override'])) {\n $content = $conf['override'];\n }\n return $content;\n }", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "public function getMergedConfig()\n {\n return $this->mergedConfig;\n }", "private function load($location)\n {\n\n $query = DB::select('variable', 'value_dev', 'value_test', 'value_stage', 'value_live', 'config_overwrite')\n ->from('engine_settings');\n\n // For the site only load the necessary settings\n if ($location === 'site') {\n $query->where('location', '=', 'site')->or_where('location', '=', 'both');\n }\n\n $results = $query->execute();\n\n $environment = Kohana::$environment;\n\n\t\t// Load the correct values based on the environment\n\t\tswitch ($environment)\n\t\t{\n\t\t\tcase Kohana::PRODUCTION: $value_label = 'value_live'; break;\n\t\t\tcase Kohana::STAGING: $value_label = 'value_stage'; break;\n\t\t\tcase Kohana::TESTING: $value_label = 'value_test'; break;\n\t\t\tdefault: $value_label = 'value_dev'; break;\n\t\t}\n\n $config_overwrite = array();\n foreach ($results as $result)\n\t\t{\n if ($result['config_overwrite'] == 1) {\n $config_overwrite[$result['variable']] = true;\n }\n\t\t\tif (@unserialize($result[$value_label]) !== FALSE)\n\t\t\t{\n\t\t\t\t$this->_settings[$result['variable']] = unserialize($result[$value_label]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_settings[$result['variable']] = $result[$value_label];\n\t\t\t}\n }\n\n if (isset($this->_settings['use_config_file']) && $this->_settings['use_config_file'] == 1) {\n $config = Kohana::$config->load('config')->as_array();\n\n foreach ($config as $variable => $value) {\n if (isset($this->_settings[$variable]) && !@$config_overwrite[$variable]) {\n $this->_settings[$variable] = $value;\n }\n }\n }\n\n return $this;\n }", "protected function loadConfigurationOptions()\n {\n if ( ! empty($this->options)) return;\n\n $this->options = $this->app->make('config')->get('html');\n\n $this->options['theme_values'] = Arr::get($this->options['themes'], $this->options['theme']);\n\n unset ($this->options['themes']);\n }", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "function _default($defaults, $options)\n\t{\n\t\treturn array_merge($defaults, $options);\n\t}", "protected function setDefaultValueExtra()\n {\n $this->default_data['address'] = 'xxx.atlassian.net';\n $this->default_data['rest_api_resource'] = '/rest/api/latest/';\n $this->default_data['timeout'] = 60;\n\n $this->default_data['clones']['mappingTicket'] = array(\n array(\n 'Arg' => self::ARG_SUMMARY,\n 'Value' => 'Issue {include file=\"file:$centreon_open_tickets_path/providers/' .\n 'Abstract/templates/display_title.ihtml\"}'\n ),\n array('Arg' => self::ARG_DESCRIPTION, 'Value' => '{$body}'),\n array('Arg' => self::ARG_PROJECT, 'Value' => '{$select.jira_project.id}'),\n array('Arg' => self::ARG_ASSIGNEE, 'Value' => '{$select.jira_assignee.id}'),\n array('Arg' => self::ARG_PRIORITY, 'Value' => '{$select.jira_priority.id}'),\n array('Arg' => self::ARG_ISSUETYPE, 'Value' => '{$select.jira_issuetype.id}'),\n );\n }", "protected function useDefaultValuesForNotConfiguredOptions() {}", "function restore_config_section($section_name, $new_contents) {\n\tglobal $g;\n\t$fout = fopen(\"{$g['tmp_path']}/tmpxml\", \"w\");\n\tfwrite($fout, $new_contents);\n\tfclose($fout);\n\n\t$xml = parse_xml_config(g_get('tmp_path') . \"/tmpxml\", null);\n\tif ($xml['pfsense']) {\n\t\t$xml = $xml['pfsense'];\n\t}\n\tif ($xml[$section_name]) {\n\t\t$section_xml = $xml[$section_name];\n\t} else {\n\t\t$section_xml = -1;\n\t}\n\n\t@unlink(g_get('tmp_path') . \"/tmpxml\");\n\tif ($section_xml === -1) {\n\t\treturn false;\n\t}\n\n\t/* Save current pkg repo to re-add on new config */\n\tunset($pkg_repo_conf_path);\n\tif ($section_name == \"system\" &&\n\t config_get_path('system/pkg_repo_conf_path')) {\n\t\t$pkg_repo_conf_path = config_get_path('system/pkg_repo_conf_path');\n\t}\n\n\tconfig_set_path($section_name, $section_xml);\n\tif (file_exists(\"{$g['tmp_path']}/config.cache\")) {\n\t\tunlink(\"{$g['tmp_path']}/config.cache\");\n\t}\n\n\t/* Restore previously pkg repo configured */\n\tif ($section_name == \"system\") {\n\t\tif (isset($pkg_repo_conf_path)) {\n\t\t\tconfig_set_path('system/pkg_repo_conf_path', $pkg_repo_conf_path);\n\t\t} elseif (config_get_path('system/pkg_repo_conf_path')) {\n\t\t\tconfig_del_path(('system/pkg_repo_conf_path'));\n\t\t}\n\t}\n\n\twrite_config(sprintf(gettext(\"Restored %s of config file (maybe from CARP partner)\"), $section_name));\n\tdisable_security_checks();\n\treturn true;\n}", "public function read($section) {\n $values = parent::read($section);\n\n switch ($section) {\n case 'smarty':\n if (!array_key_exists('compile', $values)) {\n $values['compile'] = array();\n }\n\n $values['compile']['directory'] = Module::getTempDirectory('smarty')->getPath();\n\n break;\n case 'system':\n if (!array_key_exists('session', $values)) {\n $values['session'] = array();\n }\n\n $values['session']['path'] = Module::getTempDirectory('session')->getPath();\n\n break;\n }\n\n return $values;\n }", "function stage_config($key = null, $default = null)\n{\n // Requested config file\n $config = explode('.', $key)[0];\n $file = get_template_directory() . '/config' . '/' . $config . '.php';\n\n if (file_exists($file)) {\n // Get Stage defaults config\n $stage['config'] = include $file;\n\n // Set as new config \"Stage\"\n \\Roots\\config(array( \"stage.{$config}\" => $stage['config'] ));\n\n // Return the config\n return \\Roots\\config(\"stage.{$key}\", $default);\n }\n\n return \\Roots\\config($key, $default);\n}", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::FILE_CONFIG);\n $rawdata = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal, set defaults below\n } catch (Engine_Exception $e) {\n throw new Engine_Exception($e->get_message(), CLEAROS_WARNING);\n }\n\n if (isset($rawdata['allow_shell']) && preg_match(\"/(true|1)/i\", $rawdata['allow_shell']))\n $this->config['allow_shell'] = TRUE;\n else\n $this->config['allow_shell'] = FALSE;\n\n if (isset($rawdata['theme_mode']) && !empty($rawdata['theme_mode']))\n $this->config['theme_mode'] = $rawdata['theme_mode'];\n else\n $this->config['theme_mode'] = 'normal';\n\n if (isset($rawdata['theme']) && !empty($rawdata['theme']))\n $this->config['theme'] = $rawdata['theme'];\n else\n $this->config['theme'] = 'default';\n\n $this->is_loaded = TRUE;\n }", "function config($key = null, $default = null)\n {\n $data = null;\n\n $base_directory = base_directory() . '/config/';\n\n $keys = explode('.', $key);\n $keyLength = count($keys);\n\n if ($keyLength > 1) {\n $file = $base_directory . $keys[0] . '.php';\n if (file_exists($file)) {\n $data = include $file;\n\n //Parse into the array structure of file\n for ($i = 1; $i < $keyLength; $i++) {\n $data = $data[$keys[$i]];\n }\n } else {\n //throw new \\App\\Exceptions\\GeneralException('asdasdasdasdsa');\n throw new Exception('Config : ' . $file . ' file does not exists.');\n }\n } else {\n return;\n }\n return $data;\n }", "public function defaults()\n {\n $defaults = $this->config;\n if (!isset($defaults['width'])) {\n $defaults['width'] = $defaults['default_width'];\n }\n if (!isset($defaults['height'])) {\n $defaults['height'] = $defaults['default_height'];\n }\n return $defaults;\n }", "protected function setDefaultSettings()\r\n {\r\n $this->addFilter(STRINGPARSER_FILTER_PRE, array(&$this, 'convertlinebreaks')); //unify all linebreak variants from different systems\r\n $this->addFilter(STRINGPARSER_FILTER_PRE, array(&$this, 'convertlinks'));\r\n // $this->addFilter(STRINGPARSER_FILTER_POST, array(&$this, 'stripBBtags'));\r\n $this->addFilter(STRINGPARSER_FILTER_POST, array(&$this, 'removeDoubleEscapes'));\r\n $this->addParser(array('block', 'inline', 'link', 'listitem'), 'htmlspecialchars');\r\n $this->addParser(array('block', 'inline', 'link', 'listitem'), 'nl2br');\r\n $this->addParser('list', array(&$this, 'bbcode_stripcontents'));\r\n $this->addCode('b', 'simple_replace', null, array('start_tag' => '<b>', 'end_tag' => '</b>'), 'inline', array('block', 'inline'), array());\r\n $this->addCode('i', 'simple_replace', null, array('start_tag' => '<i>', 'end_tag' => '</i>'), 'inline', array('block', 'inline'), array());\r\n $this->addCode('u', 'simple_replace', null, array('start_tag' => '<u>', 'end_tag' => '</u>'), 'inline', array('block', 'inline'), array());\r\n $this->addCode('s', 'simple_replace', null, array('start_tag' => '<strike>', 'end_tag' => '</strike>'), 'inline', array('block', 'inline'), array());\r\n $this->addCode('url', 'usecontent?', array(&$this, 'do_bbcode_url'), array('usecontent_param' => 'default'), 'inline', array('listitem', 'block', 'inline'), array('link'));\r\n $this->addCode('img', 'usecontent', array(&$this, 'do_bbcode_img'), array('usecontent_param' => array('w', 'h')), 'image', array('listitem', 'block', 'inline', 'link'), array());\r\n $this->addCode('quote', 'callback_replace', array(&$this, 'do_bbcode_quote'), array('usecontent_param' => 'default'), 'block', array('block', 'inline'), array());\r\n// $this->addCode('quote', 'usecontent?', array(&$this, 'do_bbcode_quote'), array('usecontent_param' => 'default'), 'link', array ('block', 'inline'), array ('link'));\r\n $this->addCode('code', 'usecontent', array(&$this, 'do_bbcode_code'), array('usecontent_param' => 'default'), 'block', array('block', 'inline'), array('list', 'listitem'));\r\n $this->addCode('list', 'simple_replace', null, array('start_tag' => '<ul>', 'end_tag' => '</ul>'), 'list', array('block', 'listitem'), array());\r\n $this->addCode('*', 'simple_replace', null, array('start_tag' => '<li>', 'end_tag' => '</li>'), 'listitem', array('list'), array());\r\n $this->setCodeFlag('*', 'closetag', BBCODE_CLOSETAG_OPTIONAL);\r\n $this->setCodeFlag('*', 'paragraphs', true);\r\n $this->setCodeFlag('list', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);\r\n $this->setCodeFlag('list', 'opentag.before.newline', BBCODE_NEWLINE_DROP);\r\n $this->setCodeFlag('list', 'closetag.before.newline', BBCODE_NEWLINE_DROP);\r\n\r\n $this->setOccurrenceType('img', 'image');\r\n $this->setMaxOccurrences('image', 5);\r\n\r\n // do not convert new lines to paragraphs, see stringparser_bbcode::setParagraphHandlingParameters();\r\n $this->setRootParagraphHandling(false);\r\n }", "private function injectDefaultValues(XMLElement &$form, Event $event, Section $section) {\n\t\t\t$fieldset = new XMLElement('fieldset', null, array('class' => 'settings'));\n\t\t\t$fieldset->appendChild(\n\t\t\t\tnew XMLElement('legend', __('Default Values'))\n\t\t\t);\n\t\t\t$fieldset->appendChild(\n\t\t\t\tnew XMLElement('p', __('Use Default Values to set field values without having them in your Frontend markup. Use <code>{$param}</code> syntax to use page parameters.'), array(\n\t\t\t\t\t'class' => 'help'\n\t\t\t\t))\n\t\t\t);\n\n\t\t\t$div = new XMLElement('div', null);\n\t\t\t$div->appendChild(\n\t\t\t\tnew XMLElement('p', __('Add Default Value'), array('class' => 'label'))\n\t\t\t);\n\n\t\t\t// Create Duplicators\n\t\t\t$ol = new XMLElement('ol');\n\t\t\t$ol->setAttribute('class', 'filters-duplicator');\n\n\t\t\t$custom_default_values = $event->eDefaultValues;\n\n\t\t\t// Loop over this event's section's fields\n\t\t\tforeach($section->fetchFields() as $field) {\n\t\t\t\t// Remove this from the `custom_default_values` array\n\t\t\t\tunset($custom_default_values[$field->get('element_name')]);\n\n\t\t\t\t// Add template\n\t\t\t\t$this->createDuplicatorTemplate($ol, $field->get('label'), $field->get('element_name'));\n\n\t\t\t\t// Create real instance with real data\n\t\t\t\tif(isset($event->eDefaultValues[$field->get('element_name')])) {\n\t\t\t\t\t$filter = $event->eDefaultValues[$field->get('element_name')];\n\t\t\t\t\t$this->createDuplicatorTemplate($ol, $field->get('label'), $field->get('element_name'), $filter);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->createCustomValueDuplicatorTemplate($ol);\n\n\t\t\t$custom_default_values = array_filter($custom_default_values);\n\t\t\tif(!empty($custom_default_values)) {\n\t\t\t\tforeach($custom_default_values as $name => $values) {\n\t\t\t\t\t$this->createCustomValueDuplicatorTemplate($ol, $name, $values);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$div->appendChild($ol);\n\t\t\t$fieldset->appendChild($div);\n\t\t\t$form->prependChild($fieldset);\n\t\t}", "public static function getDefaultConfig()\n {\n $config = apply_filters('quform_default_config_group', array(\n 'label' => __tr('Untitled group', 'quform'),\n 'title' => '',\n 'titleTag' => 'h4',\n 'description' => '',\n 'descriptionAbove' => '',\n 'fieldSize' => 'inherit',\n 'fieldWidth' => 'inherit',\n 'fieldWidthCustom' => '',\n 'groupStyle' => 'plain',\n 'borderColor' => '',\n 'backgroundColor' => '',\n 'labelPosition' => 'inherit',\n 'labelWidth' => '',\n 'showLabelInEmail' => false,\n 'showLabelInEntry' => false,\n 'tooltipType' => 'inherit',\n 'tooltipEvent' => 'inherit',\n 'logicEnabled' => false,\n 'logicAction' => true,\n 'logicMatch' => 'all',\n 'logicRules' => array(),\n 'styles' => array(),\n 'elements' => array()\n ));\n\n $config['type'] = 'group';\n\n return $config;\n }", "public function overrideDefaults( array $options ) {\n\t\tstatic::$options = \n\t\t\\array_merge( static::$options, $options );\n\t\t\n\t\tforeach ( static::$options as $k => $v ) {\n\t\t\tstatic::$options[$k] = \n\t\t\t\t$this->placeholders( $v );\n\t\t}\n\t}", "private function initialiseConfig()\n {\n $this->mergeConfigFrom(__DIR__ . '/..' . Settings::LARAVEL_REAL_CONFIG, Settings::LARAVEL_CONFIG_NAME);\n }", "private function appendConfig(&$config, ConfigDefinition $definition)\n {\n switch ($definition->getGroup()) {\n case ConfigDefinition::GROUP_APPLICATIONS:\n foreach ($definition->getConfig() as $k => $v) {\n $config[$k] = $v;\n }\n break;\n\n case ConfigDefinition::GROUP_COMPONENTS:\n $this->handleKeyBaseMerge($config, $definition, 'components');\n break;\n\n case ConfigDefinition::GROUP_MODULES:\n $this->handleKeyBaseMerge($config, $definition, 'modules');\n break;\n\n case ConfigDefinition::GROUP_BOOTSTRAPS:\n if (!array_key_exists('bootstrap', $config)) {\n $config['bootstrap'] = [];\n }\n foreach ($definition->getConfig() as $v) {\n $config['bootstrap'][] = $v;\n }\n break;\n\n case ConfigDefinition::GROUP_CALLABLE:\n call_user_func($definition->getConfig(), $this);\n break;\n }\n }", "protected function mergeDefaults(array $opts) {\n // Merges with defaults.\n $opts = parent::mergeDefaults($opts);\n\n // Converts types.\n $opts['active'] = $this->convertToBoolean($opts['active']);\n $opts['voided'] = $this->convertToBoolean($opts['voided']);\n $opts['related_agents'] = $this->convertToBoolean($opts['related_agents']);\n $opts['related_activities'] = $this->convertToBoolean($opts['related_activities']);\n $opts['attachments'] = $this->convertToBoolean($opts['attachments']);\n $opts['ascending'] = $this->convertToBoolean($opts['ascending']);\n $opts['limit'] = $this->convertToInt($opts['limit']);\n $opts['offset'] = $this->convertToInt($opts['offset']);\n\n if ($opts['limit'] === 0) $opts['limit'] = 100;\n return $opts;\n }", "private function reconfigure() {\n\t\t$global = JConfig::getInstance();\n\t\tforeach ($global as $key => $value) {\n\t\t\tif (array_key_exists($key, $this->config)) {\n\t\t\t\t$this->config[$key] = $value;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tif (class_exists('JPConfig')) {\n\t\t\t\t$this->config = array_merge($this->config, JPConfig::getData());\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t// class JPConfig doesn't exist\n\t\t}\n\t}", "public static function mergeConfig(array $parentConfig, array $childConfig)\r\n {\r\n $outConfig = $parentConfig;\r\n\r\n $foundStringKey = false;\r\n foreach ($childConfig as $key => $value) {\r\n if (is_string($key)) {\r\n $foundStringKey = true;\r\n\r\n if (array_key_exists($key, $parentConfig)) {\r\n\r\n if (is_array($value) && is_array($parentConfig[$key])) {\r\n /*\r\n * Apply a recursive step if the array key is a string\r\n * and thus this is an associative array\r\n */\r\n $outConfig[$key] = self::mergeConfig($parentConfig[$key], $value);\r\n } else {\r\n /*\r\n * When there is a mismatch between the types\r\n * of the values, just use the value in the child\r\n */\r\n $outConfig[$key] = $value;\r\n }\r\n\r\n } else {\r\n /*\r\n * Just override what's in the parent with what\r\n * is in the child\r\n */\r\n $outConfig[$key] = $value;\r\n }\r\n }\r\n }\r\n\r\n /*\r\n * When all the keys are integers, then we aren't really mapping keys to each\r\n * other and should just use the values in the child\r\n */\r\n if (! $foundStringKey && (count($childConfig) > 0)) {\r\n $outConfig = $childConfig;\r\n }\r\n\r\n return $outConfig;\r\n }", "public function replaceSectionContent()\n\t{\n\t\tif (empty($this->master) || empty($this->subFile)) {\n\t\t\treturn;\n\t\t}\n\n\t\tpreg_match_all(\"/@section\\('([a-zA-Z0-9]{0,30})'\\)([\\s\\S]*?)@endsection/im\", $this->subFile, $sectionMatches);\n\t\tpreg_match_all(\"/@yield\\('([a-zA-Z0-9]{1,30})'\\)/im\", $this->master, $yieldMatches);\n\n\t\tif (empty($sectionMatches) || empty($yieldMatches)) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($sectionMatches[1] as $index => $sectionName) {\n\t\t\t$content[$sectionName] = $sectionMatches[2][$index];\n\t\t}\n\n\t\tforeach ($yieldMatches[1] as $index => $matchName) {\n\t\t\tif (isset($content[$matchName])) {\n\t\t\t\t$this->master = str_replace($yieldMatches[0][$index], $content[$matchName], $this->master);\n\t\t\t} else {\n\t\t\t\t$this->master = str_replace($yieldMatches[0][$index], '', $this->master);\n\t\t\t}\n\t\t}\n\t}", "protected function _setConfig()\n {\n if ($this->_system) {\n $config = $this->_system . DIRECTORY_SEPARATOR . 'config.php';\n } else {\n $config = false;\n }\n\n // manually look for a --config argument that overrides the default\n $found = false;\n foreach ($this->_argv as $val) {\n if ($val == '--config') {\n // found the argument\n $found = true;\n // reset the default in preparation for the next argument\n $config = false;\n continue;\n }\n \n if ($found && substr($val, 0, 1) != '-') {\n $config = $val;\n break;\n }\n \n if (substr($val, 0, 9) == '--config=') {\n $found = true;\n $config = substr($val, 9);\n break;\n }\n }\n \n // if there was a --config but no param, that's a failure\n if ($found && ! $config) {\n echo \"Please specify a config file path after the --config option.\" . PHP_EOL;\n exit(1);\n }\n \n // was there a config file at all?\n if ($config) {\n $realpath = realpath($config);\n if ($realpath) {\n $this->_config = $realpath;\n $text = \"Using config file '$realpath'.\" . PHP_EOL;\n } else {\n echo \"Could not resolve real path to config file '$config'.\" . PHP_EOL;\n exit(1);\n }\n } else {\n $text = \"Not using a config file.\" . PHP_EOL;\n }\n \n if ($this->_verbose) {\n echo $text;\n }\n }", "public static function get_config($section) {\n global $CFG, $SITE;\n\n // Get the standard mobile settings.\n $settings = \\tool_mobile\\api::get_config($section);\n\n // Add custom settings.\n $settings->tool_mobilecgs_disabledblocks = get_config('tool_mobilecgs', 'disabledblocks');\n $settings->tool_mobilecgs_hidepastcourses = get_config('tool_mobilecgs', 'hidepastcourses');\n\n return $settings;\n }", "public function refreshConfig()\n {\n $this->_data = $this->_reader->read();\n $this->merge($this->_dbReader->get());\n }", "function config_merge(array $array1) {\n\t$result = array();\n\tforeach (func_get_args() as $param) {\n\t\tforeach ($param as $key=>$value) {\n\t\t\tif (is_array($value) && array_key_exists($key, $result) && is_array($result[$key])) {\n\t\t\t\t$result[$key] = config_merge($result[$key], $value);\n\t\t\t} else {\n\t\t\t\t$result[$key] = $value;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "public function testMerge() {\n $config1 = new Config(array(\n 'foo' => 123,\n 'bar' => 456,\n 'baz' => array(\n 1,2,3\n )\n ));\n \n $config2 = new Config(array(\n 'foo' => false,\n 'baz' => array(\n 4,5,6\n ),\n 'quz' => true\n ));\n \n $config1->merge($config2);\n \n $this->assertFalse($config1->foo);\n $this->assertEquals(456, $config1->bar);\n $this->assertSame(array(4,5,6), $config1->baz->getArrayCopy());\n $this->assertTrue($config1->quz);\n \n $this->setExpectedException('Nimbles\\App\\Config\\Exception\\InvalidConfig');\n $config1->merge(123);\n }", "public static function getConfig($class = 'default'){\n\t\tif(!$class){\n\t\t\t$class = 'default';\n\t\t}\n\t\t$default_config = sfConfig::get('app_history_default', array());\n\t\t$config = sfConfig::get('app_history_'.$class, array());\n\t\t//$final = array_merge_recursive($default_config, $config); //Not exactly what we want\n\t\t//$final = array_replace($default_config, $config);//Nope, but almost\n\t\t$final = array_merge_array($default_config, $config);//This one is worse but looks like array_merge_recursive()\n\t\t//var_dump($final);\n\t\treturn $final;\n\t}", "public function getDefaultSettings();", "public function config($key=null, $default=null)\n\t{\n\t\t$config = \\Component::params('com_answers');\n\n\t\tif ($key)\n\t\t{\n\t\t\tif ($key == 'banking' && $config->get('banking', -1) == -1)\n\t\t\t{\n\t\t\t\t$config->set('banking', \\Component::params('com_members')->get('bankAccounts'));\n\t\t\t}\n\t\t\treturn $config->get($key, $default);\n\t\t}\n\t\treturn $config;\n\t}" ]
[ "0.749983", "0.7245167", "0.5840686", "0.58113533", "0.5810566", "0.57497084", "0.5726198", "0.57044166", "0.5636673", "0.5592329", "0.5437934", "0.54314816", "0.5426732", "0.54224604", "0.5414891", "0.541312", "0.5390988", "0.5377829", "0.53415066", "0.5312665", "0.5303121", "0.52684695", "0.5223695", "0.5188341", "0.51446724", "0.51262116", "0.51256096", "0.5123712", "0.51010615", "0.50967395", "0.50861514", "0.5083752", "0.5082715", "0.5073343", "0.5067154", "0.5038271", "0.5031365", "0.5017688", "0.50083816", "0.5001321", "0.49787483", "0.49741927", "0.4969152", "0.4968365", "0.49391222", "0.49338797", "0.4933731", "0.49329454", "0.4929233", "0.49252242", "0.49231705", "0.49216485", "0.4919614", "0.4909964", "0.48729715", "0.48604825", "0.48513925", "0.483365", "0.48328063", "0.482082", "0.48146173", "0.48125362", "0.4809461", "0.48073056", "0.48066658", "0.48003098", "0.47887722", "0.47851524", "0.47834522", "0.47784737", "0.4777662", "0.47610804", "0.47494343", "0.47493374", "0.47421262", "0.47295332", "0.47237483", "0.47233063", "0.47210103", "0.47196537", "0.47007787", "0.4690713", "0.46827158", "0.468258", "0.4681971", "0.4672087", "0.46715435", "0.46702427", "0.46669304", "0.46648797", "0.46647054", "0.46584022", "0.46538103", "0.46514082", "0.4650667", "0.46501672", "0.464753", "0.46451026", "0.46446252", "0.4644552" ]
0.6437299
2
Checks if a negotiation configuration node is valid.
protected function isValidNegotiationNode($node) { return isset($node['name']) && isset($node['values']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkConfig();", "public function checkIfEssentialConfigurationExists() {}", "public function validate() {\n\n if (empty($this->config['default_pool_read'])) {\n throw new neoform\\config\\exception('\"default_pool_read\" must be set');\n }\n\n if (empty($this->config['default_pool_write'])) {\n throw new neoform\\config\\exception('\"default_pool_write\" must be set');\n }\n\n if (empty($this->config['pools']) || ! is_array($this->config['pools']) || ! $this->config['pools']) {\n throw new neoform\\config\\exception('\"pools\" must contain at least one server');\n }\n }", "protected function validate()\r\n {\r\n return ( is_array( $this->bot ) && !empty( $this->channel ) );\r\n }", "public function _checkConfig(){\n return true;\n if(count($this->moduleConfig) > 0) return true;\n return false;\n }", "public function validateConfig() {\n\t\t\t$two_step_id = $this->config['l_id'];\n\t\t\tif ( empty( $two_step_id ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$two_step = tve_leads_get_form_type( $two_step_id, array( 'get_variations' => false ) );\n\t\t\tif ( empty( $two_step ) || $two_step->post_status === 'trash' || $two_step->post_type != TVE_LEADS_POST_TWO_STEP_LIGHTBOX ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "abstract public function isConfigurationValid(array $configuration): bool;", "public function isValidNode();", "public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if (strlen($this->container['name']) > 100) {\n return false;\n }\n if ($this->container['nit'] === null) {\n return false;\n }\n if (strlen($this->container['nit']) > 15) {\n return false;\n }\n if ($this->container['inbound_configuration_username'] === null) {\n return false;\n }\n if ($this->container['outbound_configuration_contingency_email'] === null) {\n return false;\n }\n return true;\n }", "public function isValid()\n {\n $params = array_filter(\n [\n $this->host,\n $this->name,\n $this->user,\n $this->password,\n $this->port\n ],\n function($item) {\n return ! empty($item);\n }\n );\n\n return count($params) === 5;\n }", "public function isValid () {\n\tif ($this->doConnect()) return true;\n\treturn false;\n }", "public abstract function validateConfig($config);", "protected function isValidIntegration()\n {\n $this->write($_ENV['app_frontend_url'] . 'rest/V1/modules', [], CurlInterface::GET);\n $response = json_decode($this->read(), true);\n\n return (null !== $response) && !isset($response['message']);\n }", "private function configurationChecks()\n {\n\n // Debug Check: If debug enabled, check that debug email is set\n if ($this->salesforceDebug && is_string($this->salesforceDebugEmail) && $this->salesforceDebugEmail != '') {\n throw new \\InvalidArgumentException('With debug mode enabled, you must set the debug email address.');\n }\n\n\n // OID Check: Make sure the unique Salesforce account identifier is set and is a string\n if (!$this->defaultFields['oid'] && is_string($this->defaultFields['oid']) && $this->defaultFields['oid'] != '') {\n throw new \\InvalidArgumentException('The unique Salesforce account ID (oid) must be set as a string.');\n }\n\n return true;\n }", "protected function isValidConfiguration(/**\n * Checks to perform:\n * - width and/or height given, integer values?\n */\narray $configuration) {}", "public function isValid()\n\t{\n\t\tglobal $modSettings;\n\n\t\treturn !empty($modSettings['sphinx_searchd_server']) && !empty($modSettings['sphinxql_searchd_port']);\n\t}", "private function check_conf() {\n ConfigChecker::check();\n }", "static function areHandlerOptionsValid ()\n {\n // There is no option yet\n return true;\n }", "protected function isNegotiationConfiguration($tag)\n {\n return $tag === 'types';\n }", "private function valid() {\n\t\tforeach($this->config['checks'] as $key) {\n\t\t\tif(!array_key_exists($key, $this->config)) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "public static function checkConfig() {\n\t\tlog::add('surveillanceStation', 'debug', ' ┌──── Verification des configurations du plugin');\n\t\t// Checking snapLocation\n\t\tif (config::byKey('snapLocation', 'surveillanceStation') == 'synology') {\n\t\t\tconfig::save('snapRetention', '', 'surveillanceStation');\n\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::snapRetention Nettoyage des valeurs');\n\t\t}\n\t\t// Checking Integer fields\n\t\tforeach (array('port', 'snapRetention') as $field) {\n\t\t\tif ( ! empty(config::byKey($field, 'surveillanceStation'))) {\n\t\t\t\tswitch($field) {\n\t\t\t\t\tcase 'port':\n\t\t\t\t\t\t$min_range = 1;\n\t\t\t\t\t\t$max_range = 65535;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$min_range = 0;\n\t\t\t\t\t\t$max_range = 9999;\n\t\t\t\t}\n\t\t\t\tif(!filter_var(config::byKey($field, 'surveillanceStation'), FILTER_VALIDATE_INT, array('options' => array('min_range' => $min_range, 'max_range' => $max_range)))){\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ ERROR : checkConfig::'.$field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range);\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n\t\t\t\t\tthrow new Exception(__($field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range, __FILE__));\n\t\t\t\t} else {\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::'.$field.' OK with value ' . config::byKey($field, 'surveillanceStation'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n }", "public function hasConfig();", "private function _validate_settings()\n\t{\n\n\t\treturn TRUE;\n\t}", "public function isValid()\n {\n if (!file_exists($this->filename)) {\n $this->error = 'File does not exist';\n\n return false;\n }\n\n if (!is_readable($this->filename)) {\n $this->error = 'File is not readable';\n\n return false;\n }\n\n if (!$this->parseConfig()) {\n return false;\n }\n\n foreach ($this->connectionConfigRequired as $configKeyRequired) {\n if (!array_key_exists($configKeyRequired, $this->config->get('connection')) || is_null($this->config->get('connection.'.$configKeyRequired))) {\n $this->error = sprintf('Connection config key missing or null: %s', $configKeyRequired);\n }\n }\n\n $numberOfDatabases = count($this->get('databases', []));\n\n if ($numberOfDatabases === 0) {\n $this->error = 'No database configuration provided. Cannot continue.';\n\n return false;\n }\n\n if (!empty($this->error)) {\n return false;\n }\n\n return true;\n }", "public function isValid()\n {\n if ($this->host) {\n if (strlen($this->path) > 0 && 0 !== strpos($this->path, '/')) {\n return false;\n }\n return true;\n }\n\n if ($this->userInfo || $this->port) {\n return false;\n }\n\n if ($this->path) {\n // Check path-only (no host) URI\n if (0 === strpos($this->path, '//')) {\n return false;\n }\n return true;\n }\n\n if (! ($this->query || $this->fragment)) {\n // No host, path, query or fragment - this is not a valid URI\n return false;\n }\n\n return true;\n }", "public function isValid() {\n\t\t$isValid = true;\n\t\tif(ResponseValidator::isStringValid($this->contextCode) == false) {\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if(ResponseValidator::isStringValid($this->ns) == false) {\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if(ResponseValidator::isStringValid($this->pubContent) == false) {\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}", "public function valid()\n {\n\n if ($this->container['channel_catalog_id'] === null) {\n return false;\n }\n if ($this->container['channel_id'] === null) {\n return false;\n }\n if ($this->container['store_id'] === null) {\n return false;\n }\n return true;\n }", "public function valid()\n {\n if (!parent::valid()) {\n return false;\n }\n\n if ($this->container['brightness'] === null) {\n return false;\n }\n if ($this->container['contrast'] === null) {\n return false;\n }\n if ($this->container['gammaCorrection'] === null) {\n return false;\n }\n if ($this->container['grayscale'] === null) {\n return false;\n }\n return true;\n }", "public function checkConfiguration() {\n\t\tif(empty($this->configuration['appKey'])) {\n\t\t\t$this->error = '<div>You have to set App key first and save the record.</div>';\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->configuration['appSecret'])) {\n\t\t\t$this->error = '<div>You have to set App key first and save the record.</div>';\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->configuration['accessType'])) {\n\t\t\t$this->error = '<div>You have to save this record first.</div>';\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function checkConfig()\n\t{\n\t\t$confDefault = array(\n\t\t\t'effects',\n\t\t\t'effectsCoin',\n\t\t\t'nivoThemeFolder',\n\t\t\t'effectsNivo',\n\t\t\t'useSelectInsteadCheckbox',\n\t\t\t'allowedDbTypesForCaption',\n\t\t);\n\t\t$confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['imagecycle']);\n\t\tforeach ($confDefault as $val) {\n\t\t\tif (! isset($confArr[$val]) && ! isset($_POST['data'][$val])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function isValid()\n {\n return !empty($this->_data[OAuth::PARAM_TOKEN])\n && !empty($this->_data[OAuth::PARAM_VERIFIER]);\n }", "public function valid()\n {\n\n if ($this->container['correlation_id'] === null) {\n return false;\n }\n if ($this->container['provider_id'] === null) {\n return false;\n }\n if ($this->container['response_code'] === null) {\n return false;\n }\n if ($this->container['response_detail'] === null) {\n return false;\n }\n return true;\n }", "protected function isValid()\n {\n $jsonMessage = json_decode($this->payload);\n $isValidKtbotsJson = (\n is_object($jsonMessage) &&\n isset($jsonMessage->handler, $jsonMessage->value) &&\n !empty($jsonMessage->handler) &&\n strpos($jsonMessage->handler, '@') !== false\n );\n return $isValidKtbotsJson;\n }", "private function validateCheckout() {\n\n if (!filter_var($this->checkoutUrl, FILTER_VALIDATE_URL))\n $this->errors[] = 'The configuration URL in configuration file is malformed or missing: \"' . $this->checkoutUrl . '\"';\n\n if (empty($this->merchantId) ||\n strlen($this->merchantId) < 36)\n $this->errors[] = 'The configured Merchant ID in configuration file is incorrect or missing: \"'. $this->merchantId .'\"';\n\n //TODO: validate required fields\n\n\n if (count($this->errors) > 0) return false;\n\n return true;\n }", "public function validate() {\n parent::validate();\n\n // Check that the partner opt-ins also have a partner code\n if (isset($this['action.opt-ins.partner']) && !isset($this['partner.code'])) {\n\t throw new SignupValidationException(array('partner opt-in requires a partner code'));\n }\n }", "public function validate() {\r\n\t\tif( $this->_debug ) Mage::log('validate()', null, 'authnetcim.log');\r\n\t\t\r\n\t\t$post = Mage::app()->getRequest()->getParam('payment');\r\n\t\t\r\n\t\tif( empty($post['payment_id']) || !empty($post['cc_number']) ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn parent::validate();\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e) {\r\n\t\t\t\treturn $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function isValid()\n {\n return !empty($this->path) && !empty($this->name) && !empty($this->extension);\n }", "public function valid()\n {\n\n if (strlen($this->container['virtual_operator']) > 60) {\n return false;\n }\n if (strlen($this->container['event_type']) > 100) {\n return false;\n }\n if (strlen($this->container['result_status']) > 100) {\n return false;\n }\n if (strlen($this->container['username']) > 100) {\n return false;\n }\n if (strlen($this->container['property_value']) > 450) {\n return false;\n }\n return true;\n }", "public function validate($configData);", "protected function isValidModuleRequest() {}", "public function isValid()\n {\n // check scheme, user/password & host syntax (in general)\n if (parent::isValid() === false) {\n return false;\n }\n\n // check scheme\n if ($this->url['scheme'] !== 'ldap' && $this->url['scheme'] !== 'ldaps') {\n return false;\n }\n\n // check dn\n if (isset($this->url['base_dn']) === false || preg_match('/^([A-Za-z0-9]+=[A-Za-z0-9 ]+,?)*$/', $this->url['base_dn']) === 0) {\n return false;\n }\n\n // (optional) attributes & (optional) filters are passed through only scope is checked\n if ($this->getParam('scope') !== null\n && (self::SCOPE_ONE !== $this->getParam('scope')\n && self::SCOPE_BASE !== $this->getParam('scope')\n && self::SCOPE_SUB !== $this->getParam('scope'))) {\n return false;\n }\n\n return true;\n }", "public function valid()\n {\n\n $allowed_values = $this->getBootOrderAllowableValues();\n if (!in_array($this->container['boot_order'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getFirewallAllowableValues();\n if (!in_array($this->container['firewall'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getVideoModelAllowableValues();\n if (!in_array($this->container['video_model'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getVncAllowableValues();\n if (!in_array($this->container['vnc'], $allowed_values)) {\n return false;\n }\n return true;\n }", "public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['has_thumbnail'] === null) {\n return false;\n }\n $allowed_values = [\"stl\", \"step\", \"iges\", \"obj\", \"svf2\",\"svf\", \"thumbnail\", \"ifc\"];\n if (!in_array($this->container['output_type'], $allowed_values)) {\n return false;\n }\n if ($this->container['progress'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n $allowed_values = [\"pending\", \"inprogress\", \"success\", \"failed\", \"timeout\", \"partialsuccess\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n return false;\n }\n if ($this->container['children'] === null) {\n return false;\n }\n return true;\n }", "public function isConfigured(&$error_message = 'msg_invalid_request')\n\t{\n\t\tif(!isset($this->sid)) return FALSE;\n\t\tif(!isset($this->secret_word)) return FALSE;\n\t\treturn TRUE;\n\t}", "private function _check() {\n $cfgStrKey = array('nkVersion', 'nkMinimumVersion', 'minimalPhpVersion', 'partnersKey');\n $cfgArrayKey = array('phpExtension', 'uploadDir', 'changelog', 'infoList', 'deprecatedFiles');\n $i18n = i18n::getInstance();\n\n foreach (array_merge($cfgStrKey, $cfgArrayKey) as $cfgKey) {\n if (! array_key_exists($cfgKey, $this->_configuration))\n throw new Exception(sprintf($i18n['MISSING_CONFIG_KEY'], $cfgKey));\n\n if (in_array($cfgKey, $cfgStrKey) && (! is_string($this->_configuration[$cfgKey]) || empty($this->_configuration[$cfgKey])))\n throw new Exception(sprintf($i18n['CONFIG_KEY_MUST_BE_STRING'], $cfgKey));\n elseif (in_array($cfgKey, $cfgArrayKey) && (! is_array($this->_configuration[$cfgKey]) || empty($this->_configuration[$cfgKey])))\n throw new Exception(sprintf($i18n['CONFIG_KEY_MUST_BE_ARRAY'], $cfgKey));\n }\n }", "private function _passed_config_test() {\n\t\tif ( ! is_subclass_of( $this, 'SN_Type_Base' ) )\n\t\t\treturn false;\n\n\t\t$errors = array();\n\t\t$required_properties = array(\n\t\t\t'post_type' => $this->post_type,\n\t\t\t'post_type_title' => $this->post_type_title,\n\t\t\t'post_type_single' => $this->post_type_single,\n\t\t);\n\n\t\tforeach ( $required_properties as $property_name => $property ) {\n\t\t\tif ( is_null( $property ) )\n\t\t\t\t$errors[] = \"Property {$property_name} has not been set in your sub-class.\\n\";\n\t\t} // foreach()\n\n\t\tif ( empty( $errors ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tforeach ( $errors as $error )\n\t\t\t\techo esc_html( $error );\n\t\t} // if/each()\n\n\t\treturn false;\n\t}", "public function validate()\n\t{\n\t\t$this->errors = [];\n\n\t\t$this->validateConfig();\n\n\t\t// there is no point to continue if config is not valid against the schema\n\t\tif($this->isValid()) {\n\t\t\t$this->validateRepetitions();\n\t\t\t$this->validateMode();\n\t\t\t$this->validateClasses();\n\t\t\t$this->validateTestData();\n\t\t}\n\t}", "public function isValid() {\n\t\treturn $this->isMessageNamespace() && $this->getGroupIds();\n\t}", "public function valid()\n {\n\n if (strlen($this->container['addressType']) > 255) {\n return false;\n }\n if (strlen($this->container['applicableRegion']) > 255) {\n return false;\n }\n if (strlen($this->container['errorCode']) > 255) {\n return false;\n }\n if (strlen($this->container['statusCode']) > 255) {\n return false;\n }\n if (strlen($this->container['careOf']) > 255) {\n return false;\n }\n return true;\n }", "public function validate(string $token): bool\n {\n try {\n $parsedToken = $this->config->parser()->parse($token);\n } catch (InvalidArgumentException $e) {\n return false;\n }\n\n return $this->config->validator()->validate($parsedToken, ...$this->config->validationConstraints());\n }", "public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n $allowedValues = $this->getStatusAllowableValues();\n if (!in_array($this->container['status'], $allowedValues)) {\n return false;\n }\n if ($this->container['poolname'] === null) {\n return false;\n }\n if ($this->container['template_name'] === null) {\n return false;\n }\n if ($this->container['utm'] === null) {\n return false;\n }\n if ($this->container['body'] === null) {\n return false;\n }\n if ($this->container['sender'] === null) {\n return false;\n }\n if ($this->container['attachments'] === null) {\n return false;\n }\n return true;\n }", "public function isValid($data)\n {\n if (!parent::isValid($data)) {\n return false;\n }\n\n $sourceKey = 'source' . $data['config']['sourceType'];\n if (empty($data['config'][$sourceKey])) {\n $this->getElement($sourceKey)->addError(\n \"You must enter a \" . $this->getElement($sourceKey)->getLabel() . \".\"\n );\n return false;\n }\n return true;\n }", "public function isValid() {\n return $this->isAccepted();\n }", "public function validateSettings()\n {\n if (empty($this->validator)) {\n return true;\n }\n \n return $this->validator->validate($this, $this->context);\n }", "function plugin_satisfactionsmiley_check_config() {\n return true;\n}", "public function isValid()\n\t{\n\t\treturn $this->response\n\t\t\t&& $this->response->isValid();\n\t}", "public function valid()\n {\n\n if ($this->container['rule_id'] === null) {\n return false;\n }\n if ($this->container['rule_name'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n if ($this->container['execution_source'] === null) {\n return false;\n }\n return true;\n }", "public function validateConfig()\n\t{\n\t\t$schemaContent = @file_get_contents(Config::$schemaFile);\n\t\tif($schemaContent === FALSE) {\n\t\t\t$this->errors['File not found'][] = [\n\t\t\t\t'property' => Config::$schemaFile,\n\t\t\t\t'message' => 'Schema file not found.'\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\t$schema = Json::decode($schemaContent);\n\n\t\t$this->schemaValidator->check($this->config, $schema);\n\n\t\tif (!$this->schemaValidator->isValid()) {\n\t\t\t$this->errors['schema'] = $this->schemaValidator->getErrors();\n\t\t}\n\t}", "public function valid()\n {\n return $this->validateUsername()\n and $this->validatePassword()\n and $this->validateHost()\n and $this->validatePort()\n and $this->validatePath()\n and $this->validateQuery()\n and $this->validateFragment();\n }", "public function validate()\n {\n $this->validateNode($this->tree);\n }", "public function valid()\n {\n\n if ($this->container['height'] === null) {\n return false;\n }\n if ($this->container['width'] === null) {\n return false;\n }\n if ($this->container['bits_per_pixel'] === null) {\n return false;\n }\n if ($this->container['horizontal_resolution'] === null) {\n return false;\n }\n if ($this->container['vertical_resolution'] === null) {\n return false;\n }\n if ($this->container['is_cached'] === null) {\n return false;\n }\n return true;\n }", "public function canConfigure()\n {\n $options = $this->getOptions();\n return !empty($options) || $this->getTypeInstance(true)->canConfigure($this);\n }", "function wg_validate_post($pconfig) {\n\t$input_errors = array();\n\n\t// Assigned tunnels don't need these validation checks\n\tif (!is_wg_tunnel_assigned($pconfig)) {\n\n\t\t// Check the addresses\n\t\t$addrs = explode(\",\", $pconfig['interface']['address']);\n\n\t\tforeach ($addrs as $addr) {\n\t\t\t$addr = trim($addr);\n\n\t\t\t// Interface address is not technically required anymore\n\t\t\tif (!empty($addr) && !is_subnet($addr)) {\n\t\t\t\t$input_errors[] = sprintf(gettext(\n\t\t\t\t\t'%1$s is not a valid CIDR address'), $addr);\n\t\t\t}\n\n\t\t\t$a = explode(\"/\", $addr);\n\t\t\t$conflicts = where_is_ipaddr_configured($a[0], $skip, true,\n\t\t\t\ttrue, $a[1]);\n\n\t\t\tif (!empty($conflicts)) {\n\t\t\t\tforeach ($conflicts as $conflict) {\n\t\t\t\t\t$input_errors[] = sprintf(gettext(\n\t\t\t\t\t\t'%1$s is already configured on this ' .\n\t\t\t\t\t\t'firewall: %2$s (%3$s)'), $addr,\n\t\t\t\t\t\tstrtoupper($conflict['if']),\n\t\t\t\t\t\t$conflict['ip_or_subnet']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\tif (is_wg_tunnel_assigned($pconfig) && (!isset($pconfig['enabled']) || ($pconfig['enabled'] != 'yes'))) {\n\n\t\t$input_errors[] = gettext('Cannot disable a WireGuard tunnel while it is assigned as an interface.');\n\n\t}\n\n\t// Check listen port\n\t$lport = $pconfig['interface']['listenport'];\n\tif (!empty($lport) && (!ctype_digit($lport) || !is_port($lport))) {\n\t\t$input_errors[] = gettext(\"Invalid interface listen port.\");\n\t}\n\n\t// Check keys\n\tif (empty($pconfig['interface']['privatekey'])) {\n\t\t$input_errors[] = gettext(\"Private key must be specified.\");\n\t}\n\n\t// Now the peers\n\tif (isset($pconfig['peers']['wgpeer'])) {\n\t\t$idx = 0;\n\t\tforeach ($pconfig['peers']['wgpeer'] as $peer) {\n\t\t\t$input_errors = array_merge($input_errors,\n\t\t\t wg_validate_peer($idx, $peer));\n\t\t\t$idx++;\n\t\t}\n\t}\n\n\treturn $input_errors;\n}", "public function isValid($data)\n {\n // populate root options according to selected menu.\n $menu = isset($data['config']['menu'])\n ? $data['config']['menu']\n : '';\n $this->_loadRootOptions($menu);\n\n return parent::isValid($data);\n }", "private function _checkConfig() {\n // Ftp configuration can be namespaced with the 'ftp' keyword\n if (isset($this->_config['ftp']))\n $this->_config = $this->_config['ftp'];\n\n // Check each configuration entry\n if (empty($this->_config) || !is_array($this->_config))\n throw new \\InvalidArgumentException(\"Configuration should be an array\");\n else if (empty($this->_config['host']))\n throw new \\InvalidArgumentException(\"Ftp server host not specified in configuration\");\n else if (empty($this->_config['port']))\n throw new \\InvalidArgumentException(\"Ftp server port not specified in configuration\");\n else if (empty($this->_config['user']))\n throw new \\InvalidArgumentException(\"Ftp user not specified in configuration\");\n else if (empty($this->_config['private_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh private key not specified in configuration\");\n else if (!is_readable($this->_baseDir.'/'.$this->_config['private_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh private key not found or not readable at: \".$this->_baseDir.'/'.$this->_config['private_key']);\n else if (empty($this->_config['public_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh public key not specified in configuration\");\n else if (!is_readable($this->_baseDir.'/'.$this->_config['public_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh public key not found or not readable at: \".$this->_baseDir.'/'.$this->_config['public_key']);\n }", "function is_valid() {\n return is_resource($this->connection);\n }", "public function isVerificationRequest(): bool\n {\n return $this->request->getParameter('hub_mode') === 'subscribe' && $this->request->getParameter('hub_verify_token');\n }", "protected function checkSettings()\n {\n if (empty($this->settings)\n || empty($this->settings['column_1']) || empty($this->settings['column_2']) \n || empty($this->settings['compare_type']) || !isset($this->settings['configuration']))\n return false;\n \n return $this->checkCompareType();\n }", "private function validate () {\n $payload = $this->payload;\n // Unset fields that don't match the spec\n foreach (array_keys($payload) as $field) {\n if (!in_array($field, $this->fields)) {\n unset($payload[$field]);\n }\n }\n\n // If the user is signing up manually (I.e. not via a social network), then\n // we also need a password\n if ($this->method === 'manual' && empty($payload['password'])) {\n return false;\n }\n\n $this->payload = $payload;\n return true;\n }", "public function valid()\n {\n\n if ($this->container['days_of_validity'] === null) {\n return false;\n }\n if ($this->container['certificate'] === null) {\n return false;\n }\n if ($this->container['show_in_catalog'] === null) {\n return false;\n }\n if ($this->container['enable_catchup'] === null) {\n return false;\n }\n return true;\n }", "public function valid()\n {\n\n if ($this->container['warehouse_id'] === null) {\n return false;\n }\n if ($this->container['fulfillment_plan_id'] === null) {\n return false;\n }\n if ($this->container['pick_scan_scheme_id'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n if ($this->container['create_packing_slip'] === null) {\n return false;\n }\n if ($this->container['create_order_invoice'] === null) {\n return false;\n }\n if ($this->container['send_to_external_shipping_system'] === null) {\n return false;\n }\n return true;\n }", "public function valid()\n {\n\n $allowed_values = [\"FBA\", \"MFN\", \"MFN_PRIME\", \"PRIME\"];\n if (!in_array($this->container['seller_fulfillment_type'], $allowed_values)) {\n return false;\n }\n return true;\n }", "public function valid(): bool\n {\n return !empty($this->clientId) || !empty($this->clientSecret);\n }", "function self_check()\n\t{\n\t\tif ($gpg = $this->call('--list-config'))\n\t\t{\n\t\t\t$gpg = explode(\"\\n\", $gpg);\n\n\t\t\t// no gpg version string in the wrapper output\n\t\t\tif (is_array($gpg) === false || false === is_array($sub = explode(':', $gpg[0])))\n\t\t\t{\n\t\t\t\t return 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($sub[0] == 'cfg' && $sub[1] == 'version')\n\t\t\t\t{\n\t\t\t\t\t// version number requirement is not met\n\t\t\t\t\tif ($sub[2] < GPG_VERSION_MIN)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 3;\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\treturn 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// no output from the backend wrapper\n\t\t\treturn 1;\n\t\t}\n\t\t// everything's okay\n\t\treturn 0;\n\t}", "public function isValid() \n\t{\n\t\t$valid = true;\n\t\t$previousHandler = set_error_handler(function($number, $message) use ($valid) {\n\t\t\t$valid = false;\n\t\t});\n\t\ttry {\n\t\t\t$instance = $this->instance();\n\t\t\t$instance->getVersion();\n\t\t} catch (\\Exception $ex) {\n\t\t\t$valid = false;\n\t\t}\n\t\t\n\t\tset_error_handler($previousHandler);\n\t\t\n\t\treturn $valid;\n\t}", "private function requestIsValid() : bool\n {\n $queryParams = $this->request->getQueryParams();\n\n return array_has($queryParams,self::OPENID_ASSOC_HANDLE)\n && array_has($queryParams,self::OPENID_SIGNED)\n && array_has($queryParams,self::OPENID_SIG);\n }", "public function has_config() {\n return true;\n }", "public function has_config() {\n return true;\n }", "public function validate( )\n {\n return count( array_diff( $this->extractTokens( ), $this->getAvailableTokens( ) ) ) == 0;\n }", "public function valid()\n {\n if (!parent::valid()) {\n return false;\n }\n\n $allowedValues = $this->getRelativeHorizontalPositionAllowableValues();\n if (!in_array($this->container['relative_horizontal_position'], $allowedValues)) {\n return false;\n }\n\n $allowedValues = $this->getRelativeVerticalPositionAllowableValues();\n if (!in_array($this->container['relative_vertical_position'], $allowedValues)) {\n return false;\n }\n\n $allowedValues = $this->getWrapTypeAllowableValues();\n if (!in_array($this->container['wrap_type'], $allowedValues)) {\n return false;\n }\n\n\n return true;\n }", "protected function isValid()\n {\n foreach (static::$requiredFields as $field) {\n if (! isset($this->attributes[$field]) || ! $this->attributes[$field] ) {\n return false;\n }\n }\n\n if (! $this->volumes) {\n return false;\n }\n\n return true;\n }", "function has_config() {\n return true;\n }", "public function isValid() {\n $this->_valid = true;\n if (isset($this->_formName) && isset($this->_domainId) && isset($this->_contragentId) && isset($this->_userId) && isset($this->_nodeId) && isset($this->_items) && isset($this->_expgroup)) {\n $this->_valid = true;\n } else {\n $this->_valid = false;\n }\n\n return $this->_valid;\n }", "public function isValidationRequired()\n {\n return $this->getRemote() && $this->getRemote()->getIdentityKeyLink();\n }", "public function is_valid_xml( $xml ) {\n libxml_use_internal_errors( true );\n $doc = new \\DOMDocument( '1.0', 'utf-8' );\n $doc->loadXML( $xml );\n $errors = libxml_get_errors();\n return empty( $errors );\n }", "public function validate()\n {\n return $this->ensureExtensionLoaded() &&\n $this->validateSourceLocation() &&\n $this->validateCondition() &&\n $this->validateExpressions();\n }", "public function isValid()\n {\n // checking allergy code\n if (\n isset($this->code['code']) &&\n isset($this->code['codeSystem']) &&\n ($this->code['code'] == self::FIRST_RESOURCE_CODE && $this->code['codeSystem'] == self::FIRST_RESOURCE_CODE_SYSTEM) ||\n ($this->code['code'] == self::SECOND_RESOURCE_CODE && $this->code['codeSystem'] == self::SECOND_RESOURCE_CODE_SYSTEM) ||\n ($this->code['code'] == self::THIRD_RESOURCE_CODE && $this->code['codeSystem'] == self::THIRD_RESOURCE_CODE_SYSTEM)\n ) {\n // checking invalid params\n if (\n (!isset($this->entryRelationship->observation['negationInd']) || $this->entryRelationship->observation['negationInd'] != 'true') &&\n (!isset($this->code['nullFlavor']) || $this->code['nullFlavor'] != self::INVALID_ALLERGY_CODE_NULL_FLAVOR) &&\n (!isset($this->containerElement['nullFlavor']) || $this->containerElement['nullFlavor'] != self::INVALID_ALLERGY_ACT_NULL_FLAVOR)\n ) {\n return true;\n }\n }\n\n\n\n return false;\n }", "public function hasVerification()\n {\n if ($this->getMethod()) {\n $configData = $this->getMethod()->getConfigData('useccv');\n if(is_null($configData)){\n return true;\n }\n return (bool) $configData;\n }\n return true;\n }", "function checkNginxServer()\n {\n // check nginx is installed\n if (!isNginxInstalled()) {\n return false;\n }\n\n $config = $this->inst()->webServer->getConfig();\n\n return $config && in_array($this->inst()->domain, $config->domains);\n }", "public function hasConfig(string $key): bool;", "public function validate_request() {\r\n\t\tif ($this->request != null && sizeof($this->request) != 1)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "function has_configuration() {\n\t\treturn true;\n\t}", "public function isVconnetEnabled() {\n\t\n\t\t$installed = Mage::helper('core')->isModuleEnabled('Vconnect_Postnord');\n\t\t\n\t\tif($installed == true) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "public function isValid() {\n return ($this->_parent !== null && $this->_parent instanceof Scenario_Experiment\n && is_string($this->_treatment_name) && !empty($this->_treatment_name));\n }", "protected function isValidConfiguration(array $configuration)\n {\n /**\n * Checks to perform:\n * - width and/or height given, integer values?\n */\n }", "public function valid()\n {\n\n if ($this->container['code'] === null) {\n return false;\n }\n if ($this->container['settings'] === null) {\n return false;\n }\n if ($this->container['deeplink'] === null) {\n return false;\n }\n if ($this->container['enrollment'] === null) {\n return false;\n }\n if ($this->container['courses'] === null) {\n return false;\n }\n if ($this->container['id'] === null) {\n return false;\n }\n if ($this->container['create_date'] === null) {\n return false;\n }\n if ($this->container['subscription'] === null) {\n return false;\n }\n if ($this->container['ecommerce'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n $allowed_values = [\"not_subscribed\", \"subscribed\", \"in_progress\", \"completed\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n return false;\n }\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['complete_percent'] === null) {\n return false;\n }\n return true;\n }", "public function valid()\n {\n\n if ($this->container['use_async_pattern'] === null) {\n return false;\n }\n if ($this->container['source_file_name'] === null) {\n return false;\n }\n if ($this->container['source_file_content'] === null) {\n return false;\n }\n if ($this->container['copy_metadata'] === null) {\n return false;\n }\n $allowed_values = [\"English\", \"Arabic\", \"Danish\", \"German\", \"Dutch\", \"Finnish\", \"French\", \"Hebrew\", \"Hungarian\", \"Italian\", \"Norwegian\", \"Portuguese\", \"Spanish\", \"Swedish\", \"Russian\"];\n if (!in_array($this->container['language'], $allowed_values)) {\n return false;\n }\n $allowed_values = [\"Slow but accurate\", \"Faster and less accurate\", \"Fastest and least accurate\"];\n if (!in_array($this->container['performance'], $allowed_values)) {\n return false;\n }\n $allowed_values = [\"None\", \"Whitelist\", \"Blacklist\"];\n if (!in_array($this->container['characters_option'], $allowed_values)) {\n return false;\n }\n return true;\n }", "public function isValidRequest() {\n }", "public function hasConfig($key);", "public function testValidation()\n {\n $req = new Request\\Ban('', []);\n self::assertFalse($req->isValid());\n\n $req = new Request\\Ban('', 'value');\n self::assertTrue($req->isValid());\n\n $req = new Request\\Ban('', ['value']);\n self::assertTrue($req->isValid());\n\n $req = new Request\\Ban('host', []);\n self::assertFalse($req->isValid());\n\n $req = new Request\\Ban('host', ['value']);\n self::assertTrue($req->isValid());\n }" ]
[ "0.5878896", "0.5770419", "0.57083994", "0.56578624", "0.56207883", "0.56018627", "0.55906296", "0.5585302", "0.5505117", "0.5476201", "0.54346174", "0.5431089", "0.540532", "0.5344221", "0.5335364", "0.5329896", "0.53082013", "0.5284131", "0.5270382", "0.5237624", "0.5231939", "0.5219296", "0.52121055", "0.51970184", "0.51964444", "0.5195824", "0.5194857", "0.5194088", "0.5164305", "0.516047", "0.51455736", "0.5140996", "0.51250786", "0.51162446", "0.5078357", "0.5057416", "0.502881", "0.5019978", "0.50181943", "0.49996588", "0.49881804", "0.4984853", "0.4976576", "0.49726656", "0.49695238", "0.49668103", "0.4955829", "0.49483383", "0.4945936", "0.49357295", "0.4934779", "0.4926593", "0.49207667", "0.49202836", "0.49081922", "0.4907716", "0.4901319", "0.49000853", "0.48872915", "0.48806724", "0.48706278", "0.48671916", "0.4860616", "0.48545587", "0.4846775", "0.48453853", "0.48423153", "0.4831466", "0.48213723", "0.48032808", "0.47996402", "0.4797383", "0.47917584", "0.4790422", "0.47785038", "0.47707382", "0.4761447", "0.4761447", "0.47594646", "0.4758016", "0.47576135", "0.47500724", "0.47424814", "0.47388256", "0.47376335", "0.47365317", "0.47339725", "0.4733327", "0.47328097", "0.4732384", "0.47304273", "0.47279698", "0.47248116", "0.47240433", "0.4721997", "0.4721832", "0.47210073", "0.47209683", "0.4719992", "0.4718847" ]
0.7306595
0
Checks if the tag refers to a negotiation label inside the configuration.
protected function isNegotiationConfiguration($tag) { return $tag === 'types'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasLabel($label)\n {\n }", "public function hasLabel()\n {\n return !empty($this->getLabel());\n }", "protected function isValidNegotiationNode($node)\n {\n return isset($node['name']) && isset($node['values']);\n }", "public function isLabel(){\n return $this->label;\n }", "public function hasTag($name);", "protected function hasLabels()\n {\n $showLabels = $this->getConfigParam('showLabels'); // plus abfrage $this-showLabels kombinieren.\n if ($this->autoPlaceholder && $showLabels !== ActiveForm::SCREEN_READER) {\n $showLabels = false;\n }\n\n return $showLabels;\n }", "public function hasLabels(){\n return $this->_has(2);\n }", "public function hasTag(): bool;", "public function hasTag(){\n return $this->_has(1);\n }", "public function hasLabel($fieldName) {\n\t\t$field = $this->getField($fieldName);\n\t\treturn empty($field['label']) ? FALSE : TRUE;\n\t}", "public function hasLabels(){\n return $this->_has(6);\n }", "public function exists($tag) { //+\n\t\treturn array_key_exists($tag, $this->arShortcodes);\n\t}", "protected function check_label()\n {\n $regex = \"/^[a-zA-Z_\\-$&%*!?]{1}[a-zA-Z0-9_\\-$&%*!?]*$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <label> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }", "public function is_tag($tag = '')\n {\n }", "public function checkNeti()\n {\n $foundation = Shopware()->Models()->getRepository('Shopware\\Models\\Plugin\\Plugin')\n ->findOneBy(array('name' => 'NetiFoundation', 'active' => true));\n\n return $foundation && version_compare($foundation->getVersion(), self::getRequiredFoundation(), '>=');\n }", "public function isValidTag(string $tag): bool;", "public function hasTag($tag)\n {\n return in_array($tag, $this->getTags());\n }", "public function has($label) {\n return array_key_exists($label, $this->_register);\n }", "public function isValidTagName($tag) {\n $pattern = '/^[a-z_]+[a-z0-9\\:\\-\\.\\_]*[^:]*$/i';\n return preg_match($pattern, $tag, $matches) && $matches[0] == $tag;\n }", "private static function isValidTagName($tag)\n {\n $pattern = '/^[a-z_]+[a-z0-9\\:\\-\\.\\_]*[^:]*$/i';\n return preg_match($pattern, $tag, $matches) && $matches[0] == $tag;\n }", "public function is_tag_closer()\n {\n }", "public function hasTagClass($name);", "public static function isValidTagName($tag)\n {\n $pattern = '/^[a-z_]+[a-z0-9\\:\\-\\.\\_]*[^:]*$/i';\n return preg_match($pattern, $tag, $matches) and $matches[0] == $tag;\n }", "public function hasTagList()\n {\n return $this->tag !== null;\n }", "protected function is_network_plugin($extension)\n {\n }", "public function hasOptionalAutoLabel();", "protected function isVersionTag($tag) {\n\t\t\t$property = $this->tagNameProperty;\n\t\t\treturn isset($tag->$property) && $this->looksLikeVersion($tag->$property);\n\t\t}", "public function hasVariableLabel() {\n return $this->_has(8);\n }", "function unilabel_supports($feature) {\n switch ($feature) {\n case FEATURE_IDNUMBER:\n return false;\n case FEATURE_GROUPS:\n return false;\n case FEATURE_GROUPINGS:\n return false;\n case FEATURE_MOD_INTRO:\n return true;\n case FEATURE_COMPLETION_TRACKS_VIEWS:\n return false;\n case FEATURE_GRADE_HAS_GRADE:\n return false;\n case FEATURE_GRADE_OUTCOMES:\n return false;\n case FEATURE_MOD_ARCHETYPE:\n return MOD_ARCHETYPE_RESOURCE;\n case FEATURE_BACKUP_MOODLE2:\n return true;\n case FEATURE_NO_VIEW_LINK:\n return true;\n\n default:\n return null;\n }\n}", "function isTagExists($tag)\n {\n /*\n If creating an object the incorrect id was passed in to the category, then\n this method will return false of any tag.\n */\n if ($this->_fProductIDIsIncorrect == true)\n {\n return ($this->debugmode ? 'Product ID is incorrect' : false);\n }\n\n if ($this->_fProductAttributesInfo == null)\n {\n $this->_loadProductAttributesInfo();\n }\n\n # Check additional tag list\n if ( array_key_exists( $tag, $this->_fAdditionalTagList ) )\n {\n return true;\n }\n\n # Check artificial tag list\n if ( array_key_exists( strtolower($tag), $this->_fArtificialTagList ) )\n {\n return true;\n }\n\n # Check database attributes\n if ( strtolower($this->_findEntityValueInAtributeList('a_view_tag',$tag,'a_view_tag')) == strtolower($tag))\n {\n return true;\n }\n\n return false;\n }", "function is_tag($decks,$tag) {\n\t// verfifies that a tag is defined \n\tforeach ($decks as $key => $value) {\n\t\tif ($value['tag'] == $tag) return true;\n\t}\t\n\treturn false;\n}", "public function alternativeExists()\n {\n return !empty($this->AltBody);\n }", "public function hasTag($tagName)\n\t{\n\t\treturn $tagName != '' and isset( $this->tags[$tagName] );\n\t}", "public function hasTag($tag)\n {\n $tags = $this->manager->getTags();\n\n if (! isset($tags[$tag])) {\n return false;\n }\n\n // Check if any of the tags references this message\n foreach ($tags[$tag] as $message) {\n list($refType, $refKey) = $message;\n\n if ($refType == $this->type && $refKey == $this->key) {\n return true;\n }\n }\n\n return false;\n }", "public function isTaggedWith($tagName)\n {\n return (isset($this->tags[$tagName]));\n }", "public function IsDetected () {\n\t\treturn $this->name !== NULL;\n\t}", "static function checkFQDNLabel($label) {\n\n if (strlen($label) == 1) {\n if (!preg_match(\"/^[0-9A-Za-z]$/\", $label, $regs)) {\n return false;\n }\n } else {\n $fqdn_regex = \"/^(?!-)[A-Za-z0-9-]{1,63}(?<!-)$/\";\n if (!preg_match($fqdn_regex, $label, $regs)) {\n //check also Internationalized domain name\n $punycode = new TrueBV\\Punycode();\n $idn = $punycode->encode($label);\n if (!preg_match($fqdn_regex, $idn, $regs)) {\n return false;\n }\n }\n }\n\n return true;\n }", "private function isLabel($argument, $opcode){\n \n if($argument->Type != \"Unknown\"){\n $this->Error(ERROR_LEX_SYN_ERR, \"Wrong label name\\n\");\n }\n \n $argument->Type = \"label\";\n\n //Check if value start with letter,number, or some of special chars: _, -, $, &, %, *, !, ?\n $pattern = '/^[a-zA-Z\\_\\-\\$\\&\\%\\*\\!\\?][\\w\\_\\-\\$\\&\\%\\*\\!\\?]*$/';\n if(!preg_match($pattern,$argument->Value)){\n $this->Error(ERROR_LEX_SYN_ERR,\"Instruction \".$opcode.\" with wrong argument, invalid name \".$argument->Value.\"\\n\");\n }\n }", "public function testGetTagByTagLabel() {\n\t\t// Count the number of rows and save this for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// Create a new tag and insert it into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// Grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getTagByTagLabel($this->getPDO(), $tag->getTagLabel());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\BrewCrew\\\\Tag\", $results);\n\n\t\t// Grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t$this->assertEquals($pdoTag->getTagLabel(), $this->VALID_TAG_LABEL);\n\t}", "public function __isset($label) {\n return $this->has($label);\n }", "public function isSetLabelPrepType()\n {\n return !is_null($this->_fields['LabelPrepType']['FieldValue']);\n }", "public function getIsLabelHidden(): bool;", "function checkCaption(& $message) {\r\n //Checks if image caption is empty.\r\n if(!empty($message -> caption)) {\r\n $caption = $message -> caption;\r\n if(strpos($caption, $imageFlag) !== FALSE) {\r\n //Caption contains flag, image is rejected.\r\n return FALSE;\r\n } else {\r\n //Caption does not contain flag, image is accepted.\r\n return TRUE;\r\n }\r\n } else {\r\n //Caption is empty, therefore image is accepted.\r\n return TRUE;\r\n }\r\n }", "function isTranslation($branch)\n{\n return strpos($branch, \"translation\") !== false && strpos($branch, \"origin/integration\") !== false;\n}", "function plugin_itilcategorygroups_check_config() {\n return true;\n}", "protected function isDefaultEanLabelEnabled() {\r\n $label = $this->getLabel();\r\n $font = $this->font;\r\n return $label !== null && $label !== '' && $font !== null && $this->defaultLabel !== null;\r\n }", "public function isLabelPrivate()\n {\n return ($this->label == 'private');\n }", "protected function shortcodeExists($tag)\n\t{\n\t\treturn shortcode_exists($tag);\n\t}", "public function isAllowedTag($tag)\n {\n return in_array($tag, array_merge(\n $this->tag_whitelist,\n array_keys($this->config->getFilterWhitelistedTags(array()))\n ));\n }", "function is_competency_node($key) {\n\tif (strpos($key,\"http://asn.desire2learn.com/resources/\") !== false && strpos($key, \".xml\") === false)\n\t\treturn true;\n\telse return false;\t\n}", "public function hasTag($tag_name) {\n if ($tag_name) {\n return array_key_exists($tag_name, $this->tag_values);\n }\n return false;\n }", "function is_video_tag( $term = '' ) {\n return is_tax( 'video_tag', $term );\n }", "function shortcode_exists($tag)\n {\n }", "public function contains($label);", "function is_product_tag( $term = '' ) {\n\t\treturn is_tax( 'product_tag', $term );\n\t}", "public function hasAutoLabel();", "public\n\tfunction getTagLabel(): string {\n\t\treturn $this->tagLabel;\n\t}", "public function isLabelSizeDefault() : bool\n\t{\n\t\tif(is_null($this->labelSize)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif($this->getUseDestinationConfirmMail()) {\n\t\t\treturn LabelSize::SIZE_7X3 == $this->labelSize;\n\t\t} else {\n\t\t\treturn LabelSize::SIZE_4X6 == $this->labelSize;\n\t\t}\n\t}", "function website_tag_exists( $tag = '' ) {\n\n\tif ( $tag ) {\n\t\t$websites = get_website_data();\n\n\t\tforeach ( $websites as $w ) {\n\t\t\tif ( in_array( $tag, $w[ 'tags' ] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "public function isSelfClosingTag($tag)\n {\n return $tag === 'br' || $tag === 'img';\n }", "function has_shortcode($content, $tag)\n {\n }", "public function hasCaption()\n {\n return $this->caption !== null;\n }", "public function getLabel(): bool|string\n {\n if ($this->label) {\n return $this->labelName;\n }\n\n return false;\n }", "public function hasRules($tagname) {\n return isset(static::$tags[$tagname]);\n }", "public function isVconnetEnabled() {\n\t\n\t\t$installed = Mage::helper('core')->isModuleEnabled('Vconnect_Postnord');\n\t\t\n\t\tif($installed == true) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "public function isVerificationRequest(): bool\n {\n return $this->request->getParameter('hub_mode') === 'subscribe' && $this->request->getParameter('hub_verify_token');\n }", "function _mongo_node_bundle_exists($bundle) {\n $entity_type = arg(3);\n\n $set = mongo_node_settings();\n if (isset($set[$entity_type]['bundles'][$bundle])) {\n return TRUE;\n }\n return FALSE;\n}", "public function has($tag)\n {\n foreach($this->iterator as $node) {\n if ($node instanceof Node && $node->tag === $tag) {\n return true;\n }\n }\n return false;\n }", "private function altMessageExist()\n { \n return !empty($this->altMessage);\n }", "public function isTaggable()\n {\n return in_array(\n 'App\\Modules\\Tag\\TaggableTrait', \n $this->getReflection()->getTraitNames()\n );\n }", "public function testGetTagName() : void\r\n {\r\n $this->assertEquals(\r\n 'label',\r\n (new Label)->getTagName()\r\n );\r\n }", "public function isShowing($in_tag)\n {\n $container = $this->show_area;\n $containee = $in_tag;\n $ret = false;\n $match = \"/^\" . $containee . \"/\";\n if (preg_match($match, $container)) {\n $ret = true;\n }\n\n $match = \"/qcol....form$/\";\n if (!$ret && preg_match($match, $containee)) {\n $ret = true;\n }\n\n $match = \"/pghd....form$/\";\n if (!$ret && preg_match($match, $containee)) {\n $ret = true;\n }\n\n $match = \"/pgft....form$/\";\n if (!$ret && preg_match($match, $containee)) {\n $ret = true;\n }\n\n $match = \"/grph...._/\";\n if (!$ret && preg_match($match, $containee)) {\n $ret = true;\n }\n\n return $ret;\n }", "function is_hook_handled($namespace, $hook)\n\t{\n\t global $CONFIG;\n\n\t // Turn highchair/elgg style wildcards into correct ones.\n\t $namespace = str_replace('*','.*',$namespace);\n\t $namespace = str_replace('/','\\/',$namespace);\n\t $namespace = '/^'.str_replace('all','.*',$namespace).'$/';\n\n\t $hook = str_replace('*','.*',$hook);\n\t $hook = str_replace('/','\\/',$hook);\n\t $hook = '/^'.str_replace('all','.*',$hook).'$/';\n\n\t return isset($CONFIG->_HOOKS[$namespace][$hook]);\n\t}", "public function tagHasRenderer($tagName)\n {\n return array_key_exists($tagName, $this->getRenderers());\n }", "public function equals($tag) {\n return $tag->getName() === $this->getName();\n }", "public static function idnSupported()\n {\n }", "protected function has_tags(){\n\t\tif( ! empty( $this->tags ) ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function isTag($text)\n {\n $text = trim($text, \" \\t*\");\n return (boolean)preg_match('!@[\\w\\s]*!', $text);\n }", "function is_video_taxonomy() {\n return is_tax( get_object_taxonomies( 'video' ) );\n }", "protected static function edgeMethodExists(\n array $pack,\n string $name,\n Direction $direction \n ): bool\n {\n return in_array($name, $pack[(string) $direction]->labels);\n }", "public function isValid($tag)\n {\n if (strlen($this->tagPrefix) > 0 && strpos($tag,$this->tagPrefix) !== 0){\n return false;\n }\n return preg_match('/^'.$this->regex.'$/', substr($tag,strlen($this->tagPrefix))) == 1;\n }", "public function isMessageNamespace() {\n\t\tglobal $wgTranslateMessageNamespaces;\n\t\t$namespace = $this->getTitle()->getNamespace();\n\t\treturn in_array( $namespace, $wgTranslateMessageNamespaces );\n\t}", "public static function isEnabledNamespace() {\n\t\tglobal $wgAdConfig;\n\n\t\t$title = RequestContext::getMain()->getTitle(); // @todo FIXME filthy hack\n\t\tif ( !$title ) {\n\t\t\treturn false;\n\t\t}\n\t\t$namespace = $title->getNamespace();\n\n\t\tif ( in_array( $namespace, $wgAdConfig['namespaces'] ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function has_language() {\r\n\t\treturn (is_lang($this->language));\r\n\t}", "public static function CHECK_TAG_TYPE($tag) {\n\t$char = substr($tag,0,1);\n\tif( $char == '/'){\n\t return self::$TAG_TYPE_LIST['close'];\n\t}\n\telse if( $char == '!'){\n\t return self::$TAG_TYPE_LIST['comment'];\n\t}\n\telse{\n\t return self::$TAG_TYPE_LIST['open'];\n\t}\n }", "public function hasMetaTag(): bool\n {\n return $this->hasMeta($this->meta_id);\n }", "private function check_label_break($node)\n {\n $lid = ident_to_str($node->id);\n \n if (!isset ($this->labels[$lid]))\n Logger::error_at($node->loc, 'can not break/continue undefined label `%s`', $lid);\n else {\n $label = $this->labels[$lid];\n \n if (!$label->breakable) {\n Logger::error_at($node->loc, 'can not break/continue label `%s` from this position', $lid);\n Logger::info_at($label->loc, 'label was defined here');\n }\n }\n }", "public function isAccepted_as_talk() {\n\t\t$this->getAccepted_as_talk();\n\t}", "public function is_network_detected()\n {\n /* Plugin is loaded via mu-plugins. */\n\n if (strpos(Utility::normalize_path($this->root_path), Utility::normalize_path(WPMU_PLUGIN_DIR)) !== false) {\n return true;\n }\n\n if (is_multisite()) {\n /* Looks through network enabled plugins to see if our one is there. */\n foreach (wp_get_active_network_plugins() as $path) {\n if ($this->boot_file == $path) {\n return true;\n }\n }\n }\n return false;\n }", "public function tagExistAction($tag=null)\n {\n $tag = strtolower($tag);\n\n $sql = \"SELECT * FROM mvc_tag WHERE name='\" . $tag . \"'\";\n $all = $this->db->executeFetchAll($sql);\n \n if($all){\n $res = true;\n }\n else {\n $res = false;\n }\n\n\n return $res;\n }", "public function supports($network)\n {\n return isset($this->definitions[$network]);\n }", "public function hasTags()\n {\n return 0 < count($this->tags);\n }", "public function validTag($data) {\n\t\t$values = array_values($data);\n\t\tif (!isset($values)) {\n\t\t\treturn false;\n\t\t}\n\t\t$value = $values[0];\n\n\t\t/* Load the Tag model */\n\t\tApp::import(\"Webzash.Model\", \"Tag\");\n\t\t$Tag = new Tag();\n\n\t\tif ($Tag->exists($value)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected static function edgeMethodExistsSingular(\n array $pack,\n string $name,\n Direction $direction \n ): bool\n {\n return in_array($name, $pack[(string) $direction]->singularLabels);\n }", "function checktags() {\n\t\t\n\t\tglobal $post;\n\t\t$tag_ids = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) );\n\t\t\n\t\tif ( !empty($tag_ids) ) {\n\t\t\t\n\t\t\treturn true;\n\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t}", "public function isRespond()\n {\n return null !== $this->accepted;\n }", "public function isSubProtocolSupported($name)\n {\n if ($this->isSpGenerated === false) {\n foreach ($this->applications as $application) {\n foreach ($application->getManager(HandlerContextInterface::IDENTIFIER)->getHandlers() as $handler) {\n if ($this->_decorating instanceof WsServerInterface) {\n $this->acceptedSubProtocols = array_merge($this->acceptedSubProtocols, array_flip($handler->getSubProtocols()));\n }\n }\n }\n $this->isSpGenerated = true;\n }\n return array_key_exists($name, $this->acceptedSubProtocols);\n }", "public function hasTag($tagId){\n\n return in_array($tagId, $this->tags->pluck('id')->toArray());\n\n }", "public function hasTags()\n {\n return 0 < count($this->getTags());\n }", "protected function isBotRequest() {\n return (\n isset($_SERVER['HTTP_USER_AGENT'])\n && preg_match('/bot|crawl|slurp|spider|mediapartners/i', $_SERVER['HTTP_USER_AGENT'])\n );\n }" ]
[ "0.5808836", "0.5628761", "0.5506165", "0.5444188", "0.54050064", "0.5356012", "0.53442526", "0.5320642", "0.5267324", "0.52647257", "0.51848006", "0.51029366", "0.5055671", "0.50329393", "0.50117046", "0.5006299", "0.49748126", "0.4946779", "0.4939217", "0.49230802", "0.49106127", "0.4910285", "0.48919937", "0.48832455", "0.48690003", "0.4855618", "0.48484", "0.48225278", "0.48223197", "0.4796819", "0.47947425", "0.47474736", "0.47378117", "0.4728693", "0.47234532", "0.47020498", "0.467477", "0.4670159", "0.46531785", "0.46500137", "0.46468568", "0.46410602", "0.46291697", "0.46282274", "0.46242806", "0.46182528", "0.46156624", "0.4604986", "0.46005785", "0.4589942", "0.45840505", "0.4568564", "0.4555929", "0.4538625", "0.4534999", "0.45295918", "0.45285082", "0.45015532", "0.44945467", "0.44924325", "0.4488252", "0.44855073", "0.44739556", "0.44726276", "0.4471283", "0.44683355", "0.44679913", "0.44635105", "0.4458967", "0.4455243", "0.4454996", "0.44542742", "0.4435966", "0.44311807", "0.44275215", "0.44265687", "0.44154745", "0.4414013", "0.43939182", "0.43869662", "0.43789423", "0.4373779", "0.43714148", "0.43645477", "0.43541712", "0.43432343", "0.43414506", "0.43360686", "0.43301833", "0.43281782", "0.4327436", "0.43270352", "0.43209025", "0.43168598", "0.43136194", "0.4312059", "0.42959055", "0.42927253", "0.4291432", "0.42841357" ]
0.69135344
0
Creates an empty negotiation structure.
protected static function emptyNegotiationContext() { return [ 'type' => [] ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initialize()\n {\n if(!$this->initialized)\n {\n $configuration = $this->merge($this->raw,$this->defaultRawConfiguration());\n foreach($configuration['types'] as $type)\n {\n $this->parsed['type'][$type['name']] = $type['values'];\n $this->priorities['type'] = array_merge($this->priorities['type'],$type['values']);\n if(!isset($this->defaults['type']))\n {\n $this->defaults['type'] = new NegotiationResult($type['name'],$type['values'][0]);\n }\n }\n $this->parsed['headers'] = $configuration['headers'];\n $this->initialized = true;\n }\n return $this;\n }", "public function createProtocol()\n {\n }", "protected function constructEmpty()\r\n\t{\r\n\t\t$this->transitionCount = 0;\r\n\t\t$this->transitions = array();\r\n\t\t// TODO: this should probably contain at least one item\r\n\t\t$this->types = array();\r\n\t}", "protected function _init() {\n\t\t$this->_render['negotiate'] = true; \n\t\tparent::_init(); \n\t}", "public static function emptyResponse()\n {\n return new ServerResponse(['ok' => true, 'result' => true], null);\n }", "public function createNone()\n {\n $o = new NoneSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "function createEmpty()\n\t{\n\t\t$data = array();\n\t\t$data['MexcGallery']['publishing_status'] = 'draft';\n\t\t\n\t\t$this->create();\n\t\treturn $this->save($data, false);\n\t}", "public function newTunnel(){\n\t\t$this->buffer = '';\n\t\t$this->tunnel_type = null;\n\t\t$this->cipher = null;\n\t\t$this->server = null;\n\t\t$this->port = null;\n\t}", "public static function createEmpty(): ResponseItem\n {\n return new static(new \\stdClass());\n }", "protected function _getNewEmptyResponse()\n\t{\n\t\treturn $this->_getNewSdkInstance('Radial_RiskService_Sdk_Response');\n\t}", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.iosVpnConfiguration');\n }", "private function doContentNegotiation(){\n\tif(!isset($_SERVER['HTTP_ACCEPT']) && $this->default !== \"\"){\n $this->log->addInfo(\"server and default not set\");\n $this->stack = array(strtolower($this->default));\n\t}else if(!isset($_SERVER['HTTP_ACCEPT'])){\n $this->log->addInfo(\"accept not set, taking default\");\n $this->stack = array(\"html\");\n }else{\n $this->log->addInfo(\"accept is set, doing content negotiation\");\n $accept = $_SERVER['HTTP_ACCEPT'];\n $types = explode(',', $accept);\n //this removes whitespace from each type\n $types = array_map('trim', $types);\n foreach($types as $type){\n $q = 1.0;\n $qa = explode(\";q=\",$type);\n if(isset($qa[1])){\n $q = (float)$qa[1];\n }\n $type = $qa[0];\n //throw away the first part of the media type\n $typea = explode(\"/\", $type);\n if(isset($typea[1])){\n $type = $typea[1];\n }\n $type = strtolower($type);\n \n //default formatter for when it just doesn't care. Probably this is when a developer is just performing tests.\n if($type == \"*\" && $this->default !== \"\"){\n $type = strtolower($this->default);\n }else if($type == \"*\"){\n $type = \"html\";\n }\n //now add the format type to the array, if it hasn't been added yet\n if(!isset($stack[$type])){\n $stack[$type] = $q;\n }\n }\n //all that is left for us to do is sorting the array according to their q\n arsort($stack);\n $this->stack = array_keys($stack);\n }\n }", "function __construct(ProtocolParser $parser, HandshakeMessage $handshake) {\n $this->parser = $parser;\n $this->handshake = $handshake;\n }", "abstract protected function createDefaultBody();", "public function Create()\n {\n parent::Create();\n \n //These lines are parsed on Symcon Startup or Instance creation\n //You cannot use variables here. Just static values.\n $this->RegisterPropertyString(\"IPAddress\", \"\");\n $this->RegisterPropertyInteger(\"DefaultVolume\", 15);\n $this->RegisterPropertyBoolean(\"GroupCoordinator\", false);\n $this->RegisterPropertyBoolean(\"GroupForcing\", false);\n $this->RegisterPropertyBoolean(\"MuteControl\", false);\n $this->RegisterPropertyBoolean(\"LoudnessControl\", false);\n $this->RegisterPropertyBoolean(\"BassControl\", false);\n $this->RegisterPropertyBoolean(\"TrebleControl\", false);\n $this->RegisterPropertyString(\"FavoriteStation\", \"\");\n $this->RegisterPropertyString(\"WebFrontStations\", \"<all>\");\n $this->RegisterPropertyString(\"RINCON\", \"\");\n \n }", "public static function createEmpty(): self\n {\n return new self(null);\n }", "protected static function createDefaultPacker(): PackerInterface\n {\n return new NopPacker();\n }", "private function useGraphLibraryToCreateASimpleMixedGraph(): Graph\n {\n $graph = new Graph();\n\n $graph->createVertex(self::SAMPLE_VERTICES_IDS[0]);\n $graph->createVertex(self::SAMPLE_VERTICES_IDS[1]);\n $graph->createVertex(self::SAMPLE_VERTICES_IDS[2]);\n\n $v1Vertex = $graph->getVertex(self::SAMPLE_VERTICES_IDS[0]);\n $v2Vertex = $graph->getVertex(self::SAMPLE_VERTICES_IDS[1]);\n $v3Vertex = $graph->getVertex(self::SAMPLE_VERTICES_IDS[2]);\n\n $v1Vertex->createEdge($v2Vertex);\n $v2Vertex->createEdgeTo($v3Vertex);\n\n return $graph;\n }", "public function testCreateClientWithEmptyFields() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create')\n ->seeJson(['success' => false]);\n\n }", "public function createEmptyMetadata();", "protected function getDefaultStructureDefinition() {}", "public function create(): ResponseInterface\n\t{\n\t\t$this->content = [];\n\t}", "public function testCreateNoContent()\n {\n // Do Request\n $this->_request('POST', '/api/1.5.0/news-create',['token' => '123','title'=>'news'])\n ->_result(['error' => 'no-content']);\n }", "private function __construct() {\n\t\t// set default values\n\t\t$this->allowedContentTypes = [ContentType::JSON];\n\t\t$this->httpsOnly = false;\n\t\t$this->whiteIPList = [];\n\t\t$this->blackIPList = [];\n\t}", "public function create()\n {\n return \\Response::json('Not Implemented', 501);\n }", "public function testInvalidConstructorParams1()\n {\n new AcceptMediaType(1, null, 'subtype');\n }", "public static function createEmpty(): self\n {\n return new static([]);\n }", "protected function getProtocol ()\n\t{\n\t\treturn new AenoaServerProtocol () ;\n\t}", "public function testCloningCapabilities()\n {\n $protocol = $this->getCryptographicProtocolForTesting();\n\n $tmp = clone $protocol;\n\n $this->assertEquals($protocol, $tmp);\n $this->assertNotEmpty($tmp->generateExchangeRequestInformation());\n\n unset($tmp);\n $this->assertNotNull($protocol);\n }", "public function create()\n {\n return $this->makeJSONResponse(true, 'This endpoint is not implemented', [], []);\n }", "public function __construct() {\n // they are a list of arrays each with two values, type and content\n // type may be either \"text\" or \"file\" depending on whether the header information\n // is provided literally (the \"text\" option) or within a file (the \"file\" option)\n // initialize each with blank text\n \n echo \".....constructing site<br />\";\n\n $this->clear_headers();\n $this->clear_footers();\n $this->clear_page();\n }", "public function create()\n {\n // handled by client\n }", "public function Create()\n {\n parent::Create();\n\n // 1. Verfügbarer HarmonySplitter wird verbunden oder neu erzeugt, wenn nicht vorhanden.\n $this->ConnectParent(\"{03B162DB-7A3A-41AE-A676-2444F16EBEDF}\");\n\t\t\n\t\t$this->RegisterPropertyString(\"Name\", \"\");\n\t\t$this->RegisterPropertyInteger(\"DeviceID\", 0);\n\t\t$this->RegisterPropertyBoolean(\"BluetoothDevice\", false);\t\t\n }", "public function Create() {\n parent::Create();\n\n\t\t\t$this->RegisterPropertyString(\"Password\", \"\");\n\n\t\t\t$this->RegisterPropertyString(\n\t\t\t\t'RadioStations', '[{\"position\":1,\"station\":\"NDR2 Niedersachsen\",\"station_url\":\"http://172.27.2.205:9981/stream/channel/800c150e9a6b16078a4a3b3b5aee0672\"},\n\t\t\t\t{\"position\":2,\"station\":\"MDR Jump\",\"station_url\":\"http://172.27.2.205:9981/stream/channel/0888328132708be0905731457bba8ae0\"},\n\t\t\t\t{\"position\":3,\"station\":\"Inselradio Mallorca\",\"station_url\":\"http://172.27.2.205:9981/stream/channel/14f799071150331b9a7994ca8c61f8c7\"}]'\n );\n\n $this->RegisterPropertyBoolean(\"HideVolume\",false);\n $this->RegisterPropertyBoolean(\"HideTitle\",false);\n $this->RegisterPropertyBoolean(\"HideTimeElapsed\",false);\n\n\t\t\t$this->RegisterTimer(\"KeepAliveTimer\", 1000, 'MPDP_KeepAlive($_IPS[\\'TARGET\\']);');\n\t\t}", "protected function not_yet_response() {\n\t\t$error = new error( 'not-implemented-yet', __( 'Route Not Yet Implemented :(', 'your-domain' ) );\n\t\treturn new response( $error, 501, [] );\n\t}", "public static function NoError():self {\n\t\treturn new Response('ok', 0, true);\n\t}", "public function testInvalidConstructorParams4()\n {\n new AcceptMediaType(1, 'type', 'subtype', null, 5);\n }", "protected static function _genNoneResult($contentType = Result::TYPE_HTML) {\n return new Result(Result::TYPE_NONE, NULL, NULL, $contentType, NULL);\n }", "public static function createWithNoNames()\n {\n return new self();\n }", "public function newEmptyEntity(): EntityInterface;", "public function testEmptyPropertiesObjectInJSONMode() {\n\t\t$input = '<div class=\"h-feed\"><div class=\"h-entry\"></div></div>';\n\t\t// Try in JSON-mode: expect the raw PHP to be an stdClass instance that serializes to an empty object.\n\t\t$parser = new Parser($input, null, true);\n\t\t$output = $parser->parse();\n\t\t$this->assertInstanceOf('\\stdClass', $output['items'][0]['properties']);\n\t\t$this->assertSame('{}', json_encode($output['items'][0]['properties']));\n\t\t// Repeat in non-JSON-mode: expect the raw PHP to be an array. Check that its serialization is not what we need for mf2 JSON.\n\t\t$parser = new Parser($input, null, false);\n\t\t$output = $parser->parse();\n\t\t$this->assertIsArray($output['items'][0]['properties']);\n\t\t$this->assertSame('[]', json_encode($output['items'][0]['properties']));\n\t}", "private function createRootNode()\n {\n $this->_rootNode = $this->_dom->createElement($this->_rootElement, '');\n $this->_dom->appendChild($this->_rootNode);\n }", "public function create()\n {\n return view('/interface.page.housing_communal.create');\n }", "public function __construct(){\n $this->validPairing = false;\n $this->hasJapNat = false;\n $this->hasEngNat = false;\n }", "public function makeBlankItem() {\n\t\treturn $this->wire(new Fieldgroup());\n\t}", "protected function build()\n {\n $this->getResponse()->setVersion($this->getConf()->getVersion());\n $this->getResponse()->setCreate(json_decode($this->getConf()->getCreate()));\n }", "public function __invoke(): Response\n {\n return new Response('', Response::HTTP_NO_CONTENT);\n }", "public static function negotiate(ServerRequestInterface $request): Formats\\Format\n {\n $acceptTypes = $request->getHeader('accept');\n\n if (count($acceptTypes) > 0) {\n $acceptType = $acceptTypes[0];\n\n // As many formats may match for a given Accept header, let's try to find the one that fits the best\n // We do this by storing the best (i.e. earliest) match for each type.\n $memo = [];\n foreach (self::$formats as $format) {\n foreach ($format::MIMES as $value) {\n if (! isset($memo[$format])) {\n $memo[$format] = PHP_INT_MAX;\n }\n\n $match = strpos($acceptType, $value);\n if ($match !== false) {\n $memo[$format] = min($match, $memo[$format]);\n }\n }\n }\n\n // Sort the array to retrieve the format that best matches the Accept header\n asort($memo);\n reset($memo);\n\n if (current($memo) == PHP_INT_MAX) {\n return new Formats\\PlainText;\n } else {\n $class = key($memo);\n return new $class;\n }\n }\n\n return new Formats\\Html;\n }", "protected function doHandshake ( ) {\n\n $buffer = $this->_server->read(2048);\n $x = explode(\"\\r\\n\", $buffer);\n $h = array();\n\n for($i = 1, $m = count($x) - 3; $i <= $m; ++$i)\n $h[strtolower(trim(substr($x[$i], 0, $p = strpos($x[$i], ':'))))] =\n trim(substr($x[$i], $p + 1));\n\n if(0 !== preg_match('#^GET (.*) HTTP/1\\.[01]#', $buffer, $match))\n $h['resource'] = trim($match[1], '/');\n\n $h['__Body'] = $x[count($x) - 1];\n\n // Hybi07.\n try {\n\n $hybi07 = new Protocol\\Hybi07($this->_server);\n $hybi07->doHandshake($h);\n $this->_server->getCurrentNode()->setProtocolImplementation(\n $hybi07\n );\n }\n catch ( Exception\\BadProtocol $e ) {\n\n unset($hybi07);\n\n // Hybi00.\n try {\n\n $hybi00 = new Protocol\\Hybi00($this->_server);\n $hybi00->doHandshake($h);\n $this->_server->getCurrentNode()->setProtocolImplementation(\n $hybi00\n );\n }\n catch ( Exception\\BadProtocol $e ) {\n\n unset($hybi00);\n $this->_server->disconnect();\n\n throw new Exception\\BadProtocol(\n 'All protocol failed.', 1, null);\n }\n }\n\n return;\n }", "protected function defaultRawConfiguration()\n {\n return [\n 'negotiation' => [\n 'enabled' => false,\n ],\n 'serializer' => [\n 'enabled' => true\n ],\n 'normalizer' => [\n 'enabled' => false\n ],\n 'validator' => [\n 'enabled' => false\n ],\n 'types' =>\n [\n [\n 'name' => 'json',\n 'values'=> [\n 'application/json','text/json'\n ],\n 'restrict' => null\n ],\n [\n 'name' => 'xml',\n 'values' => [\n 'application/xml','text/xml'\n ],\n 'restrict' => null\n ]\n ],\n 'headers' =>\n [\n 'content_type' => 'content-type',\n 'accept_type' => 'accept'\n ]\n ];\n }", "public function testInvalidConstructorParams6()\n {\n new AcceptMediaType(1, 'type', 'subtype', null, 0.4, 1234);\n }", "public function testEmpty()\n {\n $fpsInboundNotification = new FpsInboundNotification();\n\n $this->assertTrue($fpsInboundNotification instanceof FpsInboundNotification);\n }", "public function __construct() {\n $this->server = new nusoap_server();\n // Define the method as a PHP function\n }", "public function testInvalidConstructorParams7()\n {\n new AcceptMediaType(-1, 'type', 'subtype', null, 0.4, null);\n }", "public function create()\n {}", "public function __construct() {\n\t\t$this->boundary = $this->createBoundary();\n\t\t$this->partboundary = $this->createBoundary();\n\t\t$this->partboundary2 = $this->createBoundary();\n\t}", "public function withNoContent()\n {\n return $this->setStatusCode(\n HttpStatus::HTTP_NO_CONTENT\n )->json();\n }", "public function create_default_folders() {\n $rcube = rcube::get_instance();\n\n // create default folders if they do not exist\n foreach (self::$folder_types as $type) {\n if ($folder = $rcube->config->get($type . '_mbox')) {\n if (!$this->folder_exists($folder)) {\n $this->create_folder($folder, true, $type);\n } else if (!$this->folder_exists($folder, true)) {\n $this->subscribe($folder);\n }\n }\n }\n }", "public function emptyOptions()\n\t{\n\t\t$this->options = array();\n\n\t\treturn $this;\n\t}", "protected function __construct(array $hConfig = [])\n {\n $oServer = \\Limbonia\\Input::singleton('server');\n $this->sCliName = preg_replace(\"/^limbonia_/\", '', basename($oServer['argv'][0]));\n\n $hOptions = getopt('', ['mode::']);\n $this->sMode = empty($hOptions) ? $this->sCliName : $hOptions['mode'];\n\n $this->oRouter = \\Limbonia\\Router::fromUri(strtolower(preg_replace(\"#_#\", '/', $this->sMode)));\n parent::__construct($hConfig);\n }", "public function create() {\n $this->createPersonHeader();\n $this->createRecipientHeader();\n $this->createBody();\n $this->createText();\n $this->createFooter();\n }", "function http_negotiate_content_type(array $supported, ?array &$result = null) {}", "protected function defaultEmptyChoice()\n {\n return [\n 'value' => '',\n 'label' => $this->translator()->translation('— None —')\n ];\n }", "public function init()\n {\n // init default response properties\n $this->headers = array();\n $this->params = array();\n $this->uri = null;\n $this->method = null;\n $this->version = null;\n $this->cookies = array();\n $this->parts = array();\n\n // Query string is always present, even if it is empty\n $this->queryString = '';\n $this->body = '';\n\n return $this;\n }", "public function testCreateNoToken()\n {\n // Do Request\n $this->_request('POST', '/api/1.5.0/news-create')\n ->_result(['error' => 'no-token']);\n }", "protected function _parseStructure($data)\n {\n $ob = new Horde_Mime_Part();\n\n $ob->setType(strtolower($data->type) . '/' . strtolower($data->subType));\n\n // Optional for multipart-parts, required for all others\n if (isset($data->parameters)) {\n $params = array();\n foreach ($data->parameters as $key => $value) {\n $params[strtolower($key)] = $value;\n }\n\n $params = Horde_Mime::decodeParam('content-type', $params, 'UTF-8');\n foreach ($params['params'] as $key => $value) {\n $ob->setContentTypeParameter($key, $value);\n }\n }\n\n // Optional entries. 'location' and 'language' not supported\n if (isset($data->disposition)) {\n $ob->setDisposition($data->disposition);\n if (isset($data->dparameters)) {\n $dparams = array();\n foreach ($data->dparameters as $key => $value) {\n $dparams[strtolower($key)] = $value;\n }\n\n $dparams = Horde_Mime::decodeParam('content-disposition', $dparams, 'UTF-8');\n foreach ($dparams['params'] as $key => $value) {\n $ob->setDispositionParameter($key, $value);\n }\n }\n }\n\n if ($ob->getPrimaryType() == 'multipart') {\n // multipart/* specific entries\n foreach ($data->subParts as $val) {\n $ob->addPart($this->_parseStructure($val));\n }\n } else {\n // Required options\n if (isset($data->partID)) {\n $ob->setContentId($data->partID);\n }\n\n $ob->setTransferEncoding(strtolower($data->encoding));\n $ob->setBytes($data->bytes);\n\n if ($ob->getType() == 'message/rfc822') {\n $ob->addPart($this->_parseStructure(reset($data->subParts)));\n }\n }\n\n return $ob;\n }", "private function assignDefaultResponses(): void\n {\n if ($this->operation->hasSuccessResponseCode()) {\n return;\n }\n\n if (strtolower($this->route->getAction()) == 'delete') {\n $this->operation->pushResponse(\n (new Response())\n ->setCode('204')\n ->setDescription('Resource deleted')\n );\n\n return;\n }\n\n $response = (new Response())->setCode('200');\n\n if (in_array($this->operation->getHttpMethod(), ['OPTIONS','HEAD'])) {\n $this->operation->pushResponse($response);\n\n return;\n }\n\n foreach ($this->config->getResponseContentTypes() as $mimeType) {\n $schema = (new Schema())->setDescription('');\n\n if ($mimeType == 'application/xml') {\n $schema->setXml((new Xml())->setName('response'));\n }\n\n $response->pushContent(\n (new Content())->setMimeType($mimeType)->setSchema($schema)\n );\n }\n\n $this->operation->pushResponse($response);\n }", "private function setupDefaults() {\n $defaults = array(\n // Indicates to the system the set of fields that will be included in the response: 3.0 is the default version. 3.1 \n // allows the merchant to utilize the Card Code feature, and is the current standard version.\n 'x_version'=>'3.1', \n \n // In order to receive a delimited response from the payment gateway, this field must be submitted with a value\n // of TRUE or the merchant has to configure a delimited response through the Merchant Interface. \n 'x_delim_data'=>'TRUE',\n \n // The character that is used to separate fields in the transaction response. The payment gateway will use the\n // character passed in this field or the value stored in the Merchant Interface if no value is passed. If this field is passed,\n // and the value is null, it will override the value stored in the Merchant Interface and there is no delimiting character in the transaction response.\n // A single symbol Ex. , (comma) | (pipe) \" (double quotes) ' (single quote) : (colon) ; (semicolon) / (forward slash) \\ (back slash) - (dash) * (star)\n 'x_delim_char'=>$this->responseDelimeter,\n \n // SIM applications use relay response. Set this to false if you are using AIM.\n 'x_relay_response'=>'FALSE',\n \n // IP address of the customer initiating the transaction. If this value is not passed, it will default to 255.255.255.255.\n 'x_customer_ip'=>$_SERVER['REMOTE_ADDR'],\n );\n $this->NVP = array_merge($this->NVP, $defaults); \n }", "public function __construct()\n\t{\n\t\t# ILO's are not present by default\n parent::__construct(\"discussion\");\n\t\t$this->ilosIntact = false;\n\t}", "public function build(): SetResponseOverrideBitsRequest\n\t{\n\t\t$instance = new SetResponseOverrideBitsRequest();\n\t\tif ($this->authenticatorId === null) {\n\t\t\tthrow new BuilderException('Property [authenticatorId] is required.');\n\t\t}\n\t\t$instance->authenticatorId = $this->authenticatorId;\n\t\t$instance->isBogusSignature = $this->isBogusSignature;\n\t\t$instance->isBadUV = $this->isBadUV;\n\t\t$instance->isBadUP = $this->isBadUP;\n\t\treturn $instance;\n\t}", "function __construct(array $data) {\n global $slim;\n $slim->response->headers->set('Content-Type', 'application/json');\n parent::__construct($data);\n }", "public function negotiateResponseContent(string $type, IRequest $request): ContentNegotiationResult;", "public function testCreateSurveyResponse0()\n {\n }", "public function testCreateSurveyResponse0()\n {\n }", "public function negotiateRequestContent(string $type, IRequest $request): ContentNegotiationResult;", "public function __construct() {\n\t\t$this->requester = new Gumroad_Requester();\n\t\t$this->sessions = new Gumroad_Sessions_Endpoint($this->requester);\n\t\t$this->products = new Gumroad_Products_Endpoint($this->requester);\n\t}", "public function create()\n {\n return $this->sendSuccessResponse([]);\n }", "public function __construct()\n {\n $this->protocolList = array(\n 'imap' => __NAMESPACE__ . '\\IMAP',\n 'pop3' => __NAMESPACE__ . '\\POP',\n 'nntp' => __NAMESPACE__ . '\\NNTP',\n );\n }", "protected function getApiEmptyResponse()\n {\n return new Response(\n '',\n 204\n );\n }", "public function noContent() {\n return $this->simpleResponse(null, Codes::HTTP_NO_CONTENT);\n }", "public function __construct() {\n\t\n parent::__construct();\n\t\t\n self::_initTags(); //extend ipp server tags\t\t\t\n\t\t\n\t\t$this->server_version = '1.0'; //IPP server version\n\t\t$this->ipp_version = '1.0'; //1.1 or 1.0\n\t\t$this->ipp_version_auto = true; //auto change ipp version depending on ipp client\n\t\t\n\t\tswitch ($this->ipp_version) {\n\t\t case '1.1' : $this->ipp_version_x8 = chr(0x01) . chr(0x01); \n\t\t break;\n\t\t case '1.0' :\n\t\t default :\n\t\t $this->ipp_version_x8 = chr(0x01) . chr(0x00);//'1.0';//NOT 1.1 ..WILL NOT WORK IN WINDOWS\n\t\t}\n\t\t\n\t\t$this->clientoutput = new stdClass();\t\t\n }", "public function initResponse()\n {\n switch ( Config::$mobile_mode )\n {\n case 'send':\n return $this->sendMobile();\n break;\n\n default:\n return $this->viewDefault();\n break;\n }\n }", "public function new()\n\t{\n\t\treturn $this->fail(lang('RESTful.notImplemented', ['new']), 501);\n\t}", "public function setNoHeader(): self\n {\n $this->hasHeader = false;\n\n return $this;\n }", "public function __construct() {\r\n header(\"Access-Control-Allow-Orgin: *\");\r\n header(\"Access-Control-Allow-Methods: *\");\r\n header(\"Content-Type: application/json\");\r\n\r\n $this->args = [0,1];\r\n $this->endpoint = array_shift($this->args);\r\n if (array_key_exists(0, $this->args) && !is_numeric($this->args[0])) {\r\n $this->verb = array_shift($this->args);\r\n }\r\n }", "function __construct()\n\t{\n\t\tglobal $ninespot_dir, $nines_layout_default;\n\t\t\n\t\t$this->dir = $ninespot_dir;\n\n\t\t// @TODO: get the defaults based on the default layout\n\t\tif( isset( $nines_layout_default ) && is_array( $nines_layout_default ))\n\t\t{\n\t\t\t$this->default_structure = \n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'New Layout', 'nines' ),\n\t\t\t\t\t'slug' => $this->layout_new,\n\t\t\t\t\t'spots' => &$nines_layout_default['spots'],\n\t\t\t\t\t'copy_spots' => &$nines_layout_default['copy_spots'],\n\t\t\t\t\t'widgets' => &$nines_layout_default['widgets'],\n\t\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->default_structure = array(\n\t\t\t\t'name' => 'New Layout',\n\t\t\t\t'slug' => $this->layout_new,\n\t\t\t\t'spots' => array(\n\t\t\t\t\t'head' => array(\n\t\t\t\t\t\t1 => 16,\n\t\t\t\t\t),\n\t\t\t\t\t'nav' => array(\n\t\t\t\t\t\t1 => 16,\n\t\t\t\t\t),\n\t\t\t\t\t'avant-body' => array(\n\t\t\t\t\t),\n\t\t\t\t\t'body' => array(\n\t\t\t\t\t\t1 => 12,\n\t\t\t\t\t\t2 => 4,\n\t\t\t\t\t),\n\t\t\t\t\t'apres-body' => array(\n\t\t\t\t\t),\n\t\t\t\t\t'foot' => array(\n\t\t\t\t\t\t1 => 16,\n\t\t\t\t\t),\n\t\t\t\t\t'apres-foot' => array(\n\t\t\t\t\t\t1 => 16,\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\t'copy_spots' => array(\n\t\t\t\t\t'head' =>$this->layout_new,\n\t\t\t\t\t'nav' => $this->layout_new,\n\t\t\t\t\t'avant-body' => 0,\n\t\t\t\t\t'body' => 0,\n\t\t\t\t\t'apres-body' => 0,\n\t\t\t\t\t'foot' => $this->layout_new,\n\t\t\t\t\t'apres-foot' => $this->layout_new,\n\t\t\t\t),\n\n\t\t\t\t'widgets' => array(\n\t\t\t\t\t'head' => array(\n\t\t\t\t\t\t'text' => array(\n\t\t\t\t\t\t\t'title' => '',\n\t\t\t\t\t\t\t'text' => 'Put a widget header here, or modify this text widget as your header.',\n\t\t\t\t\t\t\t'filter' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'body-1' => array(\n\t\t\t\t\t\t'text' => array(\n\t\t\t\t\t\t\t'title' => '',\n\t\t\t\t\t\t\t'text' => 'This is one of the four available vertical widget sections in 9spot. You can make this a sidebar, or move things around and put a post loop here.',\n\t\t\t\t\t\t\t'filter' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'body-2' => array(\n\t\t\t\t\t\t'text' => array(\n\t\t\t\t\t\t\t'title' => '',\n\t\t\t\t\t\t\t'text' => 'This is one of the four available vertical widget sections in 9spot. You can make this a sidebar, or move things around and put a post loop here.',\n\t\t\t\t\t\t\t'filter' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'foot' => array(\n\t\t\t\t\t\t'text' => array(\n\t\t\t\t\t\t\t'title' => '',\n\t\t\t\t\t\t\t'text' => 'This is your footer. Put a widget header here, or modify this text widget.',\n\t\t\t\t\t\t\t'filter' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->structure_sections = array('head','nav','avant-body','body','apres-body','foot','apres-foot');\n\t\t$this->widget_sections = array('head','nav','avant-body','body-1','body-2','body-3','body-4','apres-body','foot','apres-foot');\n\n\t\t$this->layouts = get_option( $this->option_layouts );\n\n\t\t// initialize layouts\n\t\tif( is_array( $this->layouts ))\n\t\t{\n\t\t\tforeach( $this->layouts as $layout )\n\t\t\t{\n\t\t\t\t// only register widget areas for layouts if show_layout \n\t\t\t\t// is unset OR if show_layout matches the layout slug\n\t\t\t\t\n\t\t\t\t// @todo Get widget areast to NOT purge other widget areas\n\t\t\t\t$register_widget_areas = true;\n\n\t\t\t\t$this->$layout = new NineSpotLayout( $layout , $register_widget_areas);\n\t\t\t}//end foreach\n\t\t}//end if\n\t\t\t\t\n\t\tadd_action('admin_menu', array(&$this, 'admin_menu_add'));\n\t}", "public function testNewEntityTypeWithEmpty(): void {\n\n $res = FormFactory::newEntityType(NavigationNode::class, $this->entities, [\"empty\" => true]);\n $this->assertCount(3, $res);\n $this->assertArrayHasKey(\"class\", $res);\n $this->assertArrayHasKey(\"choice_label\", $res);\n $this->assertArrayHasKey(\"choices\", $res);\n\n $this->assertEquals(NavigationNode::class, $res[\"class\"]);\n\n $this->assertCount(4, $res[\"choices\"]);\n $this->assertNull($res[\"choices\"][0]);\n $this->assertSame($this->entities[0], $res[\"choices\"][1]);\n $this->assertSame($this->entities[1], $res[\"choices\"][2]);\n $this->assertSame($this->entities[2], $res[\"choices\"][3]);\n\n $this->assertIsCallable($res[\"choice_label\"]);\n }", "static function emptyFeatureCollection(string $message) {\n header('Access-Control-Allow-Origin: *');\n header('Content-type: application/json');\n echo '{\"type\":\"FeatureCollection\",\"features\": [],\"nbfeatures\": 0 }',\"\\n\";\n if (self::$log) {\n file_put_contents(self::$log, YamlDoc::syaml(['message'=> $message,]), FILE_APPEND);\n }\n die();\n }", "public function fromArray($options)\n {\n if (isset($options['Id'])) {\n Validate::isString($options['Id'], 'options[Id]');\n $this->_id = $options['Id'];\n }\n\n if (isset($options['Name'])) {\n Validate::isString($options['Name'], 'options[Name]');\n $this->_name = $options['Name'];\n }\n\n if (isset($options['Created'])) {\n Validate::isDateString($options['Created'], 'options[Created]');\n $this->_created = new \\DateTime($options['Created']);\n }\n\n if (isset($options['Description'])) {\n Validate::isString($options['Description'], 'options[Description]');\n $this->_description = $options['Description'];\n }\n\n if (isset($options['LastModified'])) {\n Validate::isDateString($options['LastModified'], 'options[LastModified]');\n $this->_lastModified = new \\DateTime($options['LastModified']);\n }\n\n if (isset($options['State'])) {\n Validate::isString($options['State'], 'options[State]');\n $this->_state = $options['State'];\n }\n\n if (!empty($options['Input'])) {\n Validate::isArray($options['Input'], 'options[Input]');\n $this->_input = ChannelInput::createFromOptions($options['Input']);\n }\n\n if (!empty($options['Output'])) {\n Validate::isArray($options['Output'], 'options[Output]');\n $this->_output = ChannelOutput::createFromOptions($options['Output']);\n }\n\n if (!empty($options['Preview'])) {\n Validate::isArray($options['Preview'], 'options[Preview]');\n $this->_preview = ChannelPreview::createFromOptions($options['Preview']);\n }\n\n if (!empty($options['CrossSiteAccessPolicies'])) {\n Validate::isArray($options['CrossSiteAccessPolicies'], 'options[CrossSiteAccessPolicies]');\n $this->_crossSiteAccessPolicies = CrossSiteAccessPolicies::createFromOptions(\n $options['CrossSiteAccessPolicies']\n );\n }\n\n if (isset($options['EncodingType'])) {\n Validate::isString($options['EncodingType'], 'options[EncodingType]');\n $this->_encodingType = $options['EncodingType'];\n }\n\n if (!empty($options['Encoding'])) {\n Validate::isArray($options['Encoding'], 'options[Encoding]');\n $this->_encoding = ChannelEncoding::createFromOptions($options['Encoding']);\n }\n\n if (!empty($options['Slate'])) {\n Validate::isArray($options['Slate'], 'options[Slate]');\n $this->_slate = ChannelSlate::createFromOptions($options['Slate']);\n }\n }", "public function create()\n {\n return $this->header->srvCreate();\n }", "protected function createRegularPaymentXML()\n {\n $security_data = $this->makeSecurityData();\n $hash_data = $this->makeHashData($security_data);\n\n $nodes = [\n 'GVPSRequest' => [\n 'Mode' => $this->mode,\n 'Version' => 'v0.01',\n 'Terminal' => [\n 'ProvUserID' => $this->account->username,\n 'UserID' => $this->account->username,\n 'HashData' => $hash_data,\n 'ID' => $this->account->terminal_id,\n 'MerchantID' => $this->account->client_id,\n ],\n 'Customer' => [\n 'IPAddress' => $this->order->ip,\n 'EmailAddress' => $this->order->email,\n ],\n 'Card' => [\n 'Number' => $this->card->number,\n 'ExpireDate' => $this->card->month . $this->card->year,\n 'CVV2' => $this->card->cvv,\n ],\n 'Order' => [\n 'OrderID' => $this->order->id,\n 'GroupID' => '',\n 'AddressList' => [\n 'Address' => [\n 'Type' => 'S',\n 'Name' => $this->order->name,\n 'LastName' => '',\n 'Company' => '',\n 'Text' => '',\n 'District' => '',\n 'City' => '',\n 'PostalCode' => '',\n 'Country' => '',\n 'PhoneNumber' => '',\n ],\n ],\n ],\n 'Transaction' => [\n 'Type' => $this->type,\n 'InstallmentCnt' => $this->order->installment > 1 ? $this->order->installment : '',\n 'Amount' => $this->amountFormat($this->order->amount),\n 'CurrencyCode' => $this->order->currency,\n 'CardholderPresentCode' => '0',\n 'MotoInd' => 'N',\n 'Description' => '',\n 'OriginalRetrefNum' => '',\n ],\n ]\n ];\n\n return $this->createXML($nodes);\n }", "public function testInit()\n {\n $response = new \\UrbanIndo\\Yii2\\Thrift\\Response();\n $this->assertNotNull($response->format);\n $this->assertEquals('thrift', $response->format);\n }", "public function __construct(\\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {\n parent::__construct('Plugin/LanguageNegotiation', $namespaces, $module_handler, 'Drupal\\language\\LanguageNegotiationMethodInterface', 'Drupal\\language\\Annotation\\LanguageNegotiation');\n $this->cacheBackend = $cache_backend;\n $this->cacheKeyPrefix = 'language_negotiation_plugins';\n $this->cacheKey = 'language_negotiation_plugins';\n $this->alterInfo('language_negotiation_info');\n }", "public function negotiate(ClientSession $session)\n {\n $credentials = $session->getCredentials();\n $flags = $session->getNegotiationFlags();\n\n return new NegotiateMessage($credentials, $flags);\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->createSocket(self::SOCKET_OUTPUT);\n $this->createSocket(self::SOCKET_ARRAY);\n $this->createSocket(self::SOCKET_INDEX);\n $this->createSocket(self::SOCKET_DATA);\n }", "public function constructWithInvalidView()\n {\n $server = new OAuth2\\Server(new Storage\\Memory([]), [], []);\n new ReceiveCode($server, new \\StdClass());\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): IosVpnConfiguration {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.iosikEv2VpnConfiguration': return new IosikEv2VpnConfiguration();\n }\n }\n return new IosVpnConfiguration();\n }", "function __construct($parserType = null){\n $this->ch = curl_init();\n curl_setopt($this->ch, CURLOPT_USERAGENT, \"PGBrowser/0.0.1 (http://github.com/monkeysuffrage/pgbrowser/)\");\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($this->ch, CURLOPT_AUTOREFERER, true);\n curl_setopt($this->ch, CURLOPT_MAXREDIRS, 10);\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($this->ch, CURLOPT_ENCODING, 'gzip,deflate,identity');\n curl_setopt($this->ch, CURLOPT_HTTPHEADER, array(\n \"Accept-Charset:\tISO-8859-1,utf-8;q=0.7,*;q=0.7\",\n \"Accept-Language:\ten-us,en;q=0.5\",\n \"Connection: keep-alive\",\n \"Keep-Alive: 300\",\n \"Expect:\"\n ));\n curl_setopt($this->ch, CURLOPT_COOKIEJAR, '');\n curl_setopt($this->ch, CURLOPT_HEADER, true);\n $this->parserType = $parserType;\n if(function_exists('gc_enable')) gc_enable();\n }", "protected function populateStructure()\n {\n $this->treeStructure = \\Genesis\\Utils\\Common::createArrayObject(\n $this->getRequestStructure()\n );\n }", "public function create()\n {\n $this->createApply();\n $this->createNginx();\n }" ]
[ "0.54322267", "0.54147947", "0.5130342", "0.50612366", "0.4748651", "0.47238803", "0.47021398", "0.45461985", "0.45281282", "0.44854885", "0.44424853", "0.4429355", "0.4380007", "0.43118957", "0.43019816", "0.42960608", "0.4271581", "0.42355886", "0.42336273", "0.4231805", "0.42256194", "0.42156953", "0.4199102", "0.41698408", "0.41697887", "0.41543597", "0.4151825", "0.41243628", "0.4103209", "0.41005516", "0.4073529", "0.40670314", "0.40573046", "0.40536463", "0.4040869", "0.40383148", "0.40282154", "0.4009169", "0.40064114", "0.39968804", "0.39911494", "0.39860442", "0.3985529", "0.39790657", "0.39789754", "0.39633998", "0.3963224", "0.396047", "0.3958893", "0.3938233", "0.3929795", "0.39293203", "0.39281762", "0.39179686", "0.3917925", "0.39134106", "0.390827", "0.3904471", "0.39037296", "0.39026213", "0.39013356", "0.3897474", "0.3896607", "0.38915533", "0.38896647", "0.38830072", "0.38792172", "0.38744363", "0.38744068", "0.38722998", "0.38671422", "0.38651365", "0.38629368", "0.38629368", "0.3858313", "0.38580397", "0.38579354", "0.38501644", "0.3847184", "0.38438535", "0.38429448", "0.3842759", "0.3842642", "0.3838912", "0.38289464", "0.38254294", "0.3819813", "0.38170195", "0.38160142", "0.3814511", "0.38113824", "0.3806157", "0.38058692", "0.38051102", "0.38037506", "0.38023555", "0.37986258", "0.37982687", "0.37980756", "0.3796809" ]
0.64437264
0
Provides a default configuration to merge with the extension configuration.
protected function defaultRawConfiguration() { return [ 'negotiation' => [ 'enabled' => false, ], 'serializer' => [ 'enabled' => true ], 'normalizer' => [ 'enabled' => false ], 'validator' => [ 'enabled' => false ], 'types' => [ [ 'name' => 'json', 'values'=> [ 'application/json','text/json' ], 'restrict' => null ], [ 'name' => 'xml', 'values' => [ 'application/xml','text/xml' ], 'restrict' => null ] ], 'headers' => [ 'content_type' => 'content-type', 'accept_type' => 'accept' ] ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function defaultConfig();", "public function getDefaultConfiguration();", "private function mergeDefaultSettings(){\n\t\t//Get a copy of the default configuration.\n\t\t$defaultConfig = $this->getDefaultConfig();\n\t\t//Check for a 'general' section\n\t\tif(array_key_exists('general', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingGeneral = array_diff_key($defaultConfig['general'], $this->configuration['general']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missingGeneral) > 0){\n\t\t\t\tforeach($missingGeneral as $key=>$parameter){\n\t\t\t\t\t$this->configuration['general'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['general'] = $defaultConfig['general'];\n\t\t}\n\t\t//Check for a 'options' section\n\t\tif(array_key_exists('options', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingOptions = array_diff_key($defaultConfig['options'], $this->configuration['options']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missionOptions) > 0){\n\t\t\t\tforeach($missingOptions as $key=>$parameter){\n\t\t\t\t\t$this->configuration['options'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['options'] = $defaultConfig['options'];\n\t\t}\n\t}", "public function getDefaultConfiguration() {}", "public static function returnExtConfDefaults() {}", "function default_configuration()\r\n {\r\n return array();\r\n }", "private function getDefaultConfig(){\n\t\t//Pretty simple. Multidimensional array of configuration values gets returned\n\t $defaultConfig = array();\n\t\t$defaultConfig['general'] = array('start_path'=>'.', 'disallowed'=>'php, php4, php5, phps',\n\t\t\t\t\t\t\t\t\t\t 'page_title'=>'OMFG!', 'files_label'=>'', 'folders_label'=>'');\n\t\t$defaultConfig['options'] = array('thumb_height'=>75, 'files_per_page'=>25, 'max_columns'=>3, \n\t\t\t\t\t\t\t\t\t\t 'enable_ajax'=>false, 'memory_limit'=>'256M', 'cache_thumbs'=>false, \n\t\t\t\t\t\t\t\t\t\t\t'thumbs_dir'=>'/.thumbs', 'icons_dir'=>'/.icons');\n\t\treturn $defaultConfig;\n\t}", "public static function getDefaultConfig() {\n return static::$defaultConfig;\n }", "protected function baseConfigurationDefaults() {\n return array(\n 'id' => $this->getPluginId(),\n 'label' => '',\n 'cache' => DRUPAL_CACHE_PER_ROLE,\n );\n }", "protected function getExtbaseConfiguration() {}", "public function getConfigDefaults()\n {\n // $file = realpath(__DIR__ . '/../../data/distribution/config.dist.php');\n $file = __DIR__ . '/../../data/distribution/config.dist.php';\n\n return $this->getConfigFromFile($file);\n }", "protected function defaultConfig()\n\t{\n\t\t$this->config=array(\n\t\t\t'code'=>'1',\n\t\t\t'scanning'=>\"\",\n\t\t\t'scanCodes'=>array()\n\t\t);\n\t}", "static protected function mergeConfig($config)\r\n {\r\n $config['all']['stylesheets'] = array_merge(isset($config['default']['stylesheets']) && is_array($config['default']['stylesheets']) ? $config['default']['stylesheets'] : array(), isset($config['all']['stylesheets']) && is_array($config['all']['stylesheets']) ? $config['all']['stylesheets'] : array());\r\n unset($config['default']['stylesheets']);\r\n\r\n $config['all']['javascripts'] = array_merge(isset($config['default']['javascripts']) && is_array($config['default']['javascripts']) ? $config['default']['javascripts'] : array(), isset($config['all']['javascripts']) && is_array($config['all']['javascripts']) ? $config['all']['javascripts'] : array());\r\n unset($config['default']['javascripts']);\r\n\r\n $config['all']['metas']['title'] = array_merge(\r\n isset($config['default']['metas']['title']) && is_array($config['default']['metas']['title']) ? $config['default']['metas']['title'] \r\n : (isset($config['default']['metas']['title']) ? array($config['default']['metas']['title']) : array()), \r\n isset($config['all']['metas']['title']) && is_array($config['all']['metas']['title']) ? $config['all']['metas']['title'] \r\n : (isset($config['all']['metas']['title']) ? array($config['all']['metas']['title']) : array())\r\n );\r\n unset($config['default']['metas']['title']);\r\n \r\n // merge default and all\r\n $config['all'] = sfToolkit::arrayDeepMerge(\r\n isset($config['default']) && is_array($config['default']) ? $config['default'] : array(),\r\n isset($config['all']) && is_array($config['all']) ? $config['all'] : array()\r\n );\r\n unset($config['default']);\r\n return self::replaceConstants($config);\r\n }", "private function getDefaultConfiguration() \n {\n return array(\n\n // the default cache directory is inside the tattoo library\n 'cache' => __DIR__ . '/../cache/',\n\n // the development mode forces tattoo to always \n // rebuild the files.\n 'development' => false,\n\n // compiler options\n 'compiler' => array(\n\n // automatically escape all outputet variables\n 'autoEscapeVariables' => true,\n\n // define the escaping function. This configuration\n // should always be a string, but calm your horses\n // the string will be directly used in the compiling\n // proccess so use this with attention.\n 'defaultEscapeFunction' => 'htmlentities',\n ),\n );\n }", "private function mergeConfig() {\n\t\t$this->mergeConfigFrom(\n\t\t\t__DIR__ . '/../config/config.php', 'sl-upload'\n\t\t);\n\t}", "protected function mergeWithExistingConfiguration(array $defaultConfiguration, $extensionKey)\n {\n try {\n $currentExtensionConfig = unserialize(\n $this->objectManager->get(\\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager::class)\n ->getConfigurationValueByPath('EXT/extConf/' . $extensionKey)\n );\n if (!is_array($currentExtensionConfig)) {\n $currentExtensionConfig = [];\n }\n } catch (\\RuntimeException $e) {\n $currentExtensionConfig = [];\n }\n $flatExtensionConfig = ArrayUtility::flatten($currentExtensionConfig);\n $valuedCurrentExtensionConfig = [];\n foreach ($flatExtensionConfig as $key => $value) {\n $valuedCurrentExtensionConfig[$key]['value'] = $value;\n }\n ArrayUtility::mergeRecursiveWithOverrule($defaultConfiguration, $valuedCurrentExtensionConfig);\n return $defaultConfiguration;\n }", "protected function getConfigDefaults() {\n\t\treturn [\n\t\t\t// @todo add description strings\n\t\t\t'expose' => 1,\n\t\t\t'auto-read-body-file' => 1,\n\t\t\t'listen' => '127.0.0.1,unix:/tmp/phpdaemon.fcgi.sock',\n\t\t\t'port' => 9000,\n\t\t\t'allowed-clients' => '127.0.0.1',\n\t\t\t'send-file' => 0,\n\t\t\t'send-file-dir' => '/dev/shm',\n\t\t\t'send-file-prefix' => 'fcgi-',\n\t\t\t'send-file-onlybycommand' => 0,\n\t\t\t'keepalive' => new Time('0s'),\n\t\t\t'chunksize' => new Size('8k'),\n\t\t\t'defaultcharset' => 'utf-8',\n\t\t\t'upload-max-size' => new Size(ini_get('upload_max_filesize')),\n\t\t];\n\t}", "public function getConfig(array $defaults = []);", "protected function addConfiguration()\n {\n $this['config'] = $this->share(\n function () {\n $user_config_file = (file_exists('phpdoc.xml'))\n ? 'phpdoc.xml'\n : 'phpdoc.dist.xml';\n\n return \\Zend\\Config\\Factory::fromFiles(\n array(\n __DIR__.'/../../data/phpdoc.tpl.xml',\n $user_config_file\n ), true\n );\n }\n );\n }", "protected function defaults() {\n\t\t\t$config = array(\n\t\t\t\t'version' => $this->version,\n\t\t\t\t'autoshowpt' => array(\n\t\t\t\t\t//'post'=> true\n\t\t\t\t),\n\t\t\t\t'usept' => array(\n\t\t\t\t\t'post' => true\n\t\t\t\t),\n\t\t\t\t'usetax' => array(),\n\t\t\t\t'autoshowrss' => false,\n\t\t\t\t'do_c2c' => 1,\n\t\t\t\t'do_t2t' => 0,\n\t\t\t\t'do_t2c' => 0,\n\t\t\t\t'do_k2c' => 0,\n\t\t\t\t'do_k2t' => 0,\n\t\t\t\t'do_x2x' => 1,\n\t\t\t\t'minscore' => 50,\n\t\t\t\t'maxresults' => 5,\n\t\t\t\t'cachetime' => 60,\n\t\t\t\t'filterpriority' => 10,\n\t\t\t\t'log' => false,\n\t\t\t\t'loglevel' => false,\n\t\t\t\t'storage' => 'postmeta',\n\t\t\t\t'storage_id' => 'better-related-',\n\t\t\t\t'querylimit' => 1000,\n\t\t\t\t't_querylimit' => 10000,\n\t\t\t\t'mtime' => time(),\n\t\t\t\t'relatedtitle' => sprintf(\n\t\t\t\t\t\"<strong>%s</strong>\",\n\t\t\t\t\t__( 'Related content:', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'relatednone' => sprintf(\n\t\t\t\t\t\"<p>%s</p>\",\n\t\t\t\t\t__( 'No related content found.', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'thanks' => 'below',\n\t\t\t\t'stylesheet' => true,\n\t\t\t\t'showdetails' => false\n\t\t\t);\n\t\t\treturn $config;\n\t\t}", "protected function getConfigDefaults() {\n\t\treturn array(\n\t\t\t// listen to\n\t\t\t'mastersocket' => 'unix:/tmp/phpDaemon-master-%x.sock',\n\t\t);\n\t}", "public function testOverwritingDefaultBackendsConfig(): void\n {\n $this->container->loadFromExtension($this->extensionAlias, [\n 'connector' => [\n 'backends' => [\n 'default' => [\n 'root' => '/foo/bar',\n 'baseUrl' => 'http://example.com/foo/bar'\n ]\n ]\n ]\n ]);\n\n $this->container->compile();\n\n $config = $this->getConfig();\n $config['backends']['default']['root'] = '/foo/bar';\n $config['backends']['default']['baseUrl'] = 'http://example.com/foo/bar';\n\n $this->assertEquals($config, $this->container->getParameter('ckfinder.connector.config'));\n }", "protected function addDefaultConfigurationForConfigGeneration() {\n if (!isset($this->configuration['disabled_field_types'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_field_type_list_builder */\n $solr_field_type_list_builder = $this->entityTypeManager->getListBuilder('solr_field_type');\n $this->configuration['disabled_field_types'] = array_keys($solr_field_type_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_caches'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_cache_list_builder */\n $solr_cache_list_builder = $this->entityTypeManager->getListBuilder('solr_cache');\n $this->configuration['disabled_caches'] = array_keys($solr_cache_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_request_handlers'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_request_handler_list_builder */\n $solr_request_handler_list_builder = $this->entityTypeManager->getListBuilder('solr_request_handler');\n $this->configuration['disabled_request_handlers'] = array_keys($solr_request_handler_list_builder->getAllNotRecommendedEntities());\n }\n\n if (!isset($this->configuration['disabled_request_dispatchers'])) {\n /** @var \\Drupal\\search_api_solr\\Controller\\AbstractSolrEntityListBuilder $solr_request_dispatcher_list_builder */\n $solr_request_dispatcher_list_builder = $this->entityTypeManager->getListBuilder('solr_request_dispatcher');\n $this->configuration['disabled_request_dispatchers'] = array_keys($solr_request_dispatcher_list_builder->getAllNotRecommendedEntities());\n }\n }", "protected function getConfigDefaults() {\n\t\treturn array(\n\t\t\t// @todo add description strings\n\t\t\t'port' => 80,\n\t\t\t'expose' => 1,\n\t\t);\n\t}", "private function getDefaultConfig() {\n\t\treturn array(\n\t\t\t'client_id' => '',\n\t\t\t'client_secret' => '',\n\t\t\t'base_url' => '',\n\t\t\t'default_type' => 'user',\n\t\t);\n\t}", "private static function defaultConfig(): array\n {\n return [\n 'base_uri' => self::$baseUri,\n 'http_errors' => false,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'User-Agent' => 'evoliz-php/' . Config::VERSION,\n ],\n 'verify' => true,\n ];\n }", "private function mergeConfig()\n\t{\n\t\t$this->mergeConfigFrom(\n\t\t\t__DIR__ . '/../config/config.php', 'l5-sms'\n\t\t);\n\t}", "private function initConfig()\n {\n return $this->config = [\n 'api' => 'https://api.gfycat.com/v1',\n ];\n }", "protected function getConfigDefaults() {\n\t\treturn array(\n\t\t\t// @todo add description strings\n\t\t\t'servers' => '127.0.0.1',\n\t\t\t'port'\t\t\t\t\t=> 6379,\n\t\t\t'maxconnperserv'\t\t=> 32,\n\t\t);\n\t}", "public static function newDefaultConfig(): self\n {\n return new static(self::_getDefaultConfig());\n }", "protected function mergeConfiguration()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/firefly.php', 'firefly'\n );\n }", "public function getDefaultSettings();", "private function mergeConfig()\n {\n $countries = $this->countryIso();\n $this->app->configure('priongeography');\n\n $this->mergeConfigFrom(\n __DIR__ . '/config/priongeography.php',\n 'priongeography'\n );\n }", "public function getConfiguration()\n {\n $configuration = parent::getConfiguration();\n $configuration['debug'] = isset($configuration['debug']) ? $configuration['debug'] : false;\n $configuration['fileUri'] = $this->container->getParameter(\"mapbender.uploads_dir\") . \"/data-store\";\n\n if (isset($configuration[\"schemes\"]) && is_array($configuration[\"schemes\"])) {\n foreach ($configuration[\"schemes\"] as $key => &$scheme) {\n if (is_string($scheme['dataStore'])) {\n $storeId = $scheme['dataStore'];\n $dataStore = $this->container->getParameter('dataStores');\n $scheme['dataStore'] = $dataStore[ $storeId ];\n $scheme['dataStore'][\"id\"] = $storeId;\n //$dataStore = new DataStore($this->container, $configuration['source']);\n }\n if (isset($scheme['formItems'])) {\n $scheme['formItems'] = $this->prepareItems($scheme['formItems']);\n }\n }\n }\n return $configuration;\n }", "public function getDefaultConfiguration()\n {\n return $this->getProperty('default_configuration');\n }", "private function mergeConfig()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/config.php', 'routecache'\n );\n }", "public function getDefaultConfigurationFileLocation() {}", "protected function mergeConfig()\n {\n $this->mergeConfigFrom(__DIR__.\"/../config/{$this->name}.php\", $this->name);\n }", "protected function _defaultConfig()\n {\n return [\n 'tooltip' => [\n 'backgroundColor' => 'rgba(0,0,0,0.8)',\n 'padding' => [8, 12, 8, 12],\n 'axisPointer' => [\n 'type' => 'line',\n 'lineStyle' => [\n 'color' => '#607D8B',\n 'width' => 1\n ],\n 'crossStyle' => [\n 'color' => '#607D8B'\n ],\n 'shadowStyle' => [\n 'color' => 'rgba(200,200,200,0.2)'\n ]\n ],\n 'textStyle' => [\n 'fontFamily' => 'Roboto, sans-serif'\n ],\n ],\n 'color' => [\n '#2ec7c9','#b6a2de','#5ab1ef','#ffb980','#d87a80',\n '#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa',\n '#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050',\n '#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'\n ],\n 'animation' => false,\n 'settings' => [\n 'height' => 420\n ],\n 'series' => []\n ];\n }", "protected function configure()\n {\n // load config\n $config = new \\Phalcon\\Config(array(\n 'base_url' => '/',\n 'static_base_url' => '/',\n ));\n\n if (file_exists(APPPATH.'config/static.php')) {\n $static = include APPPATH.'config/static.php';\n $config->merge($static);\n }\n\n if (file_exists(APPPATH.'config/setup.php')) {\n $setup = include APPPATH.'config/setup.php';\n $config->merge($setup);\n }\n\n return $config;\n }", "public function getDefaultConfig($fileName = null)\n {\n $configHelper = \\Fci_Helper_Config::getInstance();\n if (!$fileName) {\n $configHelper->load('default.xml.dist');\n } else {\n try {\n $configHelper->load($fileName . '.xml');\n } catch (ParserException $e) {\n $configHelper->load('default.xml.dist');\n }\n }\n\n $default = [\n 'file' => [\n 'path' => $configHelper->getFilePath(),\n 'delimiter' => $configHelper->getFileDelimiter(),\n 'enclosure' => $configHelper->getFileEnclosure(),\n 'archive_with_datetime' => (int)$configHelper->getArchiveWithDateTime(),\n ],\n 'general' => [\n 'reload_cache' => (int)$configHelper->getReloadCache(),\n 'disable_products' => (int)$configHelper->getDisableProducts(),\n 'delete_disabled_products' => (int)$configHelper->getDeleteDisabledProducts(),\n 'disable_conditions' => $configHelper->getDisableConditions(),\n 'delete_products_not_in_csv' => (int)$configHelper->getDeleteProductsNotInCsv(),\n 'unset_special_price' => (int)$configHelper->getUnsetSpecialPrice(),\n 'delete_all_special_prices' => (int)$configHelper->getDeleteAllSpecialPrices(),\n 'scripts' => $configHelper->getScripts(),\n ],\n 'dataprocessing' => [\n 'general' => [\n 'mode' => $configHelper->getMode(),\n 'import' => $configHelper->getImportType(),\n 'cache_lines' => $configHelper->getLinesToCache(),\n 'mappings' => $configHelper->getMappingsValue(),\n 'strip_html_tags' => (int)$configHelper->getStripHtmlTags(),\n 'import_globally' => (int)$configHelper->getImportGallery(),\n 'date_time_format' => $configHelper->getDateTimeFormat(),\n ],\n 'images' => [\n 'image_prefix' => $configHelper->getImagePrefix(),\n 'image_split' => $configHelper->getImageSeparator(),\n 'sku_fallback' => (int)$configHelper->getUseSkuImageFallback(),\n 'import_gallery' => (int)$configHelper->getImportGallery(),\n ],\n 'mandatory' => $configHelper->getMandatoryFields(),\n 'products' => [\n 'identifier' => $configHelper->getProductIdentifier(),\n 'clear_existing_websites' => (int)$configHelper->getClearExistingWebsites(),\n ],\n ],\n 'general_defaults' => [\n 'websites' => $configHelper->getWebsitesValue(),\n 'store' => $configHelper->getStoreValue(),\n ],\n 'product_defaults' => $configHelper->getProductDefaults(),\n 'category_defaults' => $configHelper->getCategoryDefaults(),\n 'category_settings' => [\n 'root_category' => $configHelper->getRootCategory(),\n 'category_separate' => $configHelper->getCategorySeparate(),\n 'sub_category_separate' => $configHelper->getSubCategorySeparate(),\n 'create_categories' => (int)$configHelper->createCategories(),\n 'default_product_position' => $configHelper->getDefaultProductPosition(),\n ],\n ];\n\n return $default;\n }", "public function getConfiguration()\n {\n $config = array(\n 'baseUrl' => $this->getScriptUrl(),\n 'locale' => $this->container->get('translator')->getLocale(),\n );\n\n if ($this->paths) {\n $config['paths'] = $this->paths;\n }\n\n if ($this->shim) {\n $config['shim'] = $this->shim;\n }\n\n if ($this->container->hasParameter('kernel.debug')\n && !$this->container->getParameter('kernel.debug')\n && $this->useAlmond) {\n $config['almond'] = true;\n }\n\n return array_merge($config, $this->options);\n }", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "public static function getDefaultConfiguration() {\n if (self::$_defaultConfiguration == null) {\n self::$_defaultConfiguration = new api_configuration();\n self::$_defaultConfiguration->defaultHeaders = \\local_evaluationcalendar_config::Instance()->api_authorization_header;\n self::$_defaultConfiguration->host = \\local_evaluationcalendar_config::Instance()->api_host;\n }\n\n return self::$_defaultConfiguration;\n }", "protected function defineConfig()\n {\n // Get config paths\n $configs = $this->config->getDirectly(__DIR__ . '/../Config/path.php')['default_config'] ?? [];\n\n // Add all of them to config collector if $configs is an array\n if (is_array($configs)) {\n foreach ($configs as $alias => $path) {\n $this->config->set($alias, $path);\n }\n }\n }", "public static function getDefaultTemplateConfig()\n\t{\n\t\treturn self::getTemplatesDir() . '/default/config.neon';\n\t}", "public static function getDefaultConfiguration()\n {\n if (is_null(self::$defaultConfiguration)) {\n self::$defaultConfiguration = new self();\n }\n return self::$defaultConfiguration;\n }", "protected function getDefaultParameters()\n {\n return array(\n 'config.directory' => __DIR__ . '/../../../../',\n );\n }", "public static function defaults($options = array())\n {\n static $config;\n\n if ($options || !$config) {\n\n $defaults = array(\n 'templates' => getcwd() . \"/templates\",\n 'extension' => '.php',\n 'variable_prefix' => null,\n 'string_template' => false\n );\n\n $config = array_replace_recursive($defaults, $options);\n }\n \n return $config;\n }", "private function getDefaultConfig()\n {\n return [\n 'auth' => $this->clientConfig->getAuthorizationArray(),\n 'headers' => $this->clientConfig->getRequestHeaders(),\n ];\n }", "public function testAppendingDefaultBackendsConfig(): void\n {\n $newBackendConfig = [\n 'name' => 'my_ftp',\n 'adapter' => 'ftp',\n 'root' => '/foo/bar',\n 'baseUrl' => 'http://example.com/foo/bar',\n 'host' => 'localhost',\n 'username' => 'user',\n 'password' => 'pass',\n ];\n\n $this->container->loadFromExtension($this->extensionAlias, [\n 'connector' => [\n 'backends' => [\n 'my_ftp' => $newBackendConfig\n ]\n ]\n ]);\n\n $this->container->compile();\n\n $config = $this->getConfig();\n\n $config['backends']['my_ftp'] = $newBackendConfig;\n\n $this->assertEquals($config, $this->container->getParameter('ckfinder.connector.config'));\n }", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "protected function getConfigDefaults() {\n\t\treturn [\n\t\t\t'dbname' => 'gamemonitor',\n\t\t];\n\t}", "public static function applyDefaultConfig()\r\n\t{\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_mainCache', array( 'enabled' => 'off', 'lifetime' => 3600 ) );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sectionCache', array( 'enabled' => 'off', 'lifetime' => 7000 ) );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_maxEntryCountByFile', 49999 );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_maxFileSize', 10485760 );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_rootCacheDir', sfConfig::get('sf_cache_dir').'/prestaSitemapPlugin' );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sitemapGeneratorClassName', 'prestaSitemapGenerator' );\r\n\t\tsfConfig::set( 'app_prestaSitemapPlugin_sitemapUrlClassName', 'prestaSitemapUrl' );\r\n\t}", "public static function config();", "protected function getConfigDefaults() {\n\t\treturn [\n\t\t\t// @todo add description strings\n\t\t\t'port' => 53,\n\t\t\t'resolvecachesize' => 128,\n\t\t\t'servers' => '',\n\t\t\t'hostsfile' => '/etc/hosts',\n\t\t\t'resolvfile' => '/etc/resolv.conf',\n\t\t\t'expose' => 1,\n\t\t];\n\t}", "protected function registerConfigs()\n {\n // Append or overwrite configs\n #config(['test' => 'hi']);\n\n // Merge configs\n #$this->mergeConfigFrom(__DIR__.'/../Config/parser.php', 'mrcore.parser');\n }", "protected function _initConfig()\n {\n parent::_initConfig();\n $this->_mergeConfig(array(\n 'get_descriptions' => false, // true to get descriptions for text sections\n ));\n }", "public static function getConfiguration();", "public function set_defaults() {\n if (!empty($this->default_settings)) {\n $this->add($this->default_settings);\n }\n return $this;\n }", "protected function getExtConf() {\n\t\t$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);\n\t\tif (!empty ($extConf)) {\n\t\t\t$this->extConf = $extConf;\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function getConfigDefaults()\n\t{\n\t\treturn array(\n\t\t\t// listen to\n\t\t\t'listen' => 'tcp://0.0.0.0',\n\t\t\t// listen port\n\t\t\t'listenport' => 55556,\n\t\t\t// max allowed packet size\n\t\t\t'maxallowedpacket' => new Daemon_ConfigEntrySize('16k'),\n\t\t\t// disabled by default\n\t\t\t'enable' => 0,\n\t\t\t// no event_timeout by default\n\t\t\t'ev_timeout' => -1\n\t\t);\n\t}", "public function defaults()\n {\n $defaults = $this->config;\n if (!isset($defaults['width'])) {\n $defaults['width'] = $defaults['default_width'];\n }\n if (!isset($defaults['height'])) {\n $defaults['height'] = $defaults['default_height'];\n }\n return $defaults;\n }", "public function getMergedConfig()\n {\n return $this->mergedConfig;\n }", "public function get_default_config() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'key' => 'name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__( 'Name', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Name', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'email',\n\t\t\t\t'type' => 'email',\n\t\t\t\t'label' => esc_html__( 'Email', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'phone',\n\t\t\t\t'type' => 'number',\n\t\t\t\t'label' => esc_html__( 'Phone', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'optional',\n\t\t\t\t'placeholder' => esc_html__( 'Phone', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'message',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'label' => esc_html__( 'Message', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Message', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t);\n\t}", "protected function addConfig()\n\t{\n\t\treturn new Config( array() );\n\t}", "public function getConfiguration();", "public function getConfiguration();", "public function getConfiguration();", "private function getExtensionConfigXml() \n\t{\n\n\t\t// path to the extensions config.xml\n\t\t$extension_config_xml_path = parent::$extension_base_dir . '/etc/config.xml';\n\n\t\tif (!file_exists($extension_config_xml_path)) {\n\t\t\t$this->displayError('Cant find path to extension config xml.');\n\t\t}\n\n\t\t$extension_config_xml = simplexml_load_file($extension_config_xml_path);\n\n\t\tparent::$extension_config_xml = $extension_config_xml;\n\n\t}", "public static function getDefaultConfiguration()\n {\n if (self::$defaultConfiguration == null) {\n self::$defaultConfiguration = new Configuration();\n }\n\n return self::$defaultConfiguration;\n }", "protected function initConfiguration(){\n $settings = array(\n 'user' => 'bitshok',\n 'widget_id' => '355763562850942976',\n 'tweets_limit' => 3,\n 'follow_btn' => 'on'\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n }", "final public static function buildDefault(): Config {\n\n\t\t// If not running in CLI, enable sandbox mode by default.\n\t\tif (!EnvInfo::isRunningInCli()) {\n\t\t\treturn new self;\n\t\t}\n\n\t\t$config = new self;\n\t\t$config->setSandboxMode(false);\n\t\t$config->setStdIoDriver(new TerminalIoDriver);\n\t\treturn $config;\n\n\t}", "abstract public function getConfig();", "public static function getDefaultConfiguration()\n {\n if (self::$defaultConfiguration === null) {\n self::$defaultConfiguration = new Configuration();\n }\n\n return self::$defaultConfiguration;\n }", "public static function getDefaultConfiguration()\n {\n if (self::$defaultConfiguration === null) {\n self::$defaultConfiguration = new Configuration();\n }\n\n return self::$defaultConfiguration;\n }", "public function getConfig($name = '', $default = null);", "private function loadConfigXml($parent) {\n\t\t$file = $parent->getParent()->getPath('extension_administrator') .\n\t\t\t\t'/config.xml';\n\t\t$defaults = $this->parseConfigFile($file);\n\t\tif ($defaults === '{}') {\n\t\t\treturn;\n\t\t}\n\n\t\t$manifest = $parent->getParent()->getManifest();\n\t\t$type = $manifest->attributes()->type;\n\n\t\ttry {\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$query = $db->getQuery(true)->select($db->quoteName(array (\n\t\t\t\t\t'extension_id', 'params' )))->from($db->quoteName('#__extensions'))->where($db->quoteName('type') .\n\t\t\t\t\t' = ' . $db->quote($type))->where($db->quoteName('element') .\n\t\t\t\t\t' = ' . $db->quote($parent->getElement()))->where($db->quoteName('name') .\n\t\t\t\t\t' = ' . $db->quote($parent->getName()));\n\t\t\t$db->setQuery($query);\n\t\t\t$row = $db->loadObject();\n\t\t\tif (! isset($row)) {\n\t\t\t\t$this->enqueueMessage(JText::_('COM_CLM_TURNIER_ERROR_CONFIG_LOAD'), 'warning');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$params = json_decode($row->params, true);\n\t\t\tif (json_last_error() == JSON_ERROR_NONE && is_array($params)) {\n\t\t\t\t$result = array_merge(json_decode($defaults, true), $params);\n\t\t\t\t$defaults = json_encode($result);\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$this->enqueueMessage($e->getMessage(), 'warning');\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->update($db->quoteName('#__extensions'));\n\t\t\t$query->set($db->quoteName('params') . ' = ' . $db->quote($defaults));\n\t\t\t$query->where($db->quoteName('extension_id') . ' = ' .\n\t\t\t\t\t$db->quote($row->extension_id));\n\n\t\t\t$db->setQuery($query);\n\t\t\t$db->execute();\n\t\t} catch (Exception $e) {\n\t\t\t$this->enqueueMessage($e->getMessage(), 'warning');\n\t\t}\n\t}", "function getDefaultImageConfiguration()\n {\n global $serendipity;\n\n if (($this->defaultImageConfigurationdefault ?? null) === null) {\n $this->defaultImageConfigurationdefault = array(\n 'defaultavatar' => ($this->get_config('defaultavatar')==''?'': $this->get_config('defaultavatar', '')),\n 'size' => $this->get_config('size', '40'),\n 'rating' => $this->get_config('rating', '-')\n );\n }\n return $this->defaultImageConfigurationdefault;\n }", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "function stage_config($key = null, $default = null)\n{\n // Requested config file\n $config = explode('.', $key)[0];\n $file = get_template_directory() . '/config' . '/' . $config . '.php';\n\n if (file_exists($file)) {\n // Get Stage defaults config\n $stage['config'] = include $file;\n\n // Set as new config \"Stage\"\n \\Roots\\config(array( \"stage.{$config}\" => $stage['config'] ));\n\n // Return the config\n return \\Roots\\config(\"stage.{$key}\", $default);\n }\n\n return \\Roots\\config($key, $default);\n}", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "function app_config($key = null, $default = NULL) {\n static $config;\n \n if (empty($config)) {\n require_once DIR_APP . '/config.php';\n }\n \n if (!is_null($key)) {\n if (isset($config[$key])) {\n return $config[$key];\n }\n return $default;\n }\n \n return $config;\n}", "public function getDefaultSettings()\n {\n return array(\n // by separating them with ':'\n 'ldelim' => '{', // tag delimiter\n 'rdelim' => '}',\n 'extension' => '.html', // template file extension\n );\n }", "public static function defaults()\n {\n $defaults = array('paths' => array(), 'namespaces' => array());\n\n $defaults['paths']['templates'] = __DIR__ . '/Templates';\n\n $defaults['paths']['commands'] = __DIR__ . '/Commands';\n\n $defaults['namespaces']['commands'] = 'Rougin\\Blueprint\\Commands';\n\n return $defaults;\n }", "protected function getConfiguration() {}", "function bdpp_default_settings() {\n\t\n\tglobal $bdpp_options;\n\t\n\t$bdpp_options = array(\n\t\t\t\t\t'post_types'\t\t\t=> array(0 => 'post'),\n\t\t\t\t\t'trend_post_types'\t\t=> array(),\n\t\t\t\t\t'sharing_enable'\t\t=> 0,\n\t\t\t\t\t'sharing'\t\t\t\t=> array(),\n\t\t\t\t\t'sharing_lbl'\t\t\t=> esc_html__('Share this', 'blog-designer-pack'),\n\t\t\t\t\t'sharing_design'\t\t=> 'design-1',\n\t\t\t\t\t'sharing_post_types'\t=> array(),\n\t\t\t\t\t'disable_font_awsm_css'\t=> 0,\n\t\t\t\t\t'disable_owl_css'\t\t=> 0,\n\t\t\t\t\t'custom_css'\t\t\t=> '',\n\t\t\t\t);\n\n\t$default_options = apply_filters('bdpp_default_options_values', $bdpp_options );\n\n\t// Update default options\n\tupdate_option( 'bdpp_opts', $default_options );\n\t\n\t// Overwrite global variable when option is update\n\t$bdpp_options = bdpp_get_settings();\n}", "protected function load_addon_config() {\n\t\t$config = [\n\t\t\t'gist' => [\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Git Updater - Gist', 'git-updater' ),\n\t\t\t\t\t'author' => __( 'Andy Fragen' ),\n\t\t\t\t\t'description' => __( 'Add GitHub Gist hosted repositories to the Git Updater plugin.', 'git-updater' ),\n\t\t\t\t\t'host' => 'github',\n\t\t\t\t\t'slug' => 'git-updater-gist/git-updater-gist.php',\n\t\t\t\t\t'uri' => 'afragen/git-updater-gist',\n\t\t\t\t\t'branch' => 'main',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'api' => 'gist',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'bitbucket' => [\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Git Updater - Bitbucket', 'git-updater' ),\n\t\t\t\t\t'author' => __( 'Andy Fragen' ),\n\t\t\t\t\t'description' => __( 'Add Bitbucket and Bitbucket Server hosted repositories to the Git Updater plugin.', 'git-updater' ),\n\t\t\t\t\t'host' => 'github',\n\t\t\t\t\t'slug' => 'git-updater-bitbucket/git-updater-bitbucket.php',\n\t\t\t\t\t'uri' => 'afragen/git-updater-bitbucket',\n\t\t\t\t\t'branch' => 'main',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'api' => 'bitbucket',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'gitlab' => [\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Git Updater - GitLab', 'git-updater' ),\n\t\t\t\t\t'author' => __( 'Andy Fragen' ),\n\t\t\t\t\t'description' => __( 'Add GitLab hosted repositories to the Git Updater plugin.', 'git-updater' ),\n\t\t\t\t\t'host' => 'github',\n\t\t\t\t\t'slug' => 'git-updater-gitlab/git-updater-gitlab.php',\n\t\t\t\t\t'uri' => 'afragen/git-updater-gitlab',\n\t\t\t\t\t'branch' => 'main',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'api' => 'gitlab',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'gitea' => [\n\t\t\t\t[\n\t\t\t\t\t'name' => __( 'Git Updater - Gitea', 'git-updater' ),\n\t\t\t\t\t'author' => __( 'Andy Fragen' ),\n\t\t\t\t\t'description' => __( 'Add Gitea hosted repositories to the Git Updater plugin.', 'git-updater' ),\n\t\t\t\t\t'host' => 'github',\n\t\t\t\t\t'slug' => 'git-updater-gitea/git-updater-gitea.php',\n\t\t\t\t\t'uri' => 'afragen/git-updater-gitea',\n\t\t\t\t\t'branch' => 'main',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'api' => 'gitea',\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\n\t\treturn $config;\n\t}", "public static function getDefaultConfig()\n {\n $config = apply_filters('quform_default_config_group', array(\n 'label' => __tr('Untitled group', 'quform'),\n 'title' => '',\n 'titleTag' => 'h4',\n 'description' => '',\n 'descriptionAbove' => '',\n 'fieldSize' => 'inherit',\n 'fieldWidth' => 'inherit',\n 'fieldWidthCustom' => '',\n 'groupStyle' => 'plain',\n 'borderColor' => '',\n 'backgroundColor' => '',\n 'labelPosition' => 'inherit',\n 'labelWidth' => '',\n 'showLabelInEmail' => false,\n 'showLabelInEntry' => false,\n 'tooltipType' => 'inherit',\n 'tooltipEvent' => 'inherit',\n 'logicEnabled' => false,\n 'logicAction' => true,\n 'logicMatch' => 'all',\n 'logicRules' => array(),\n 'styles' => array(),\n 'elements' => array()\n ));\n\n $config['type'] = 'group';\n\n return $config;\n }", "static function merge($config, $newConfigName) \n {\n if (empty($config)) {\n $config = array(); \n }\n\n if ($newConfigName != self::CONFIG_DEFAULT) {\n $newConfig = self::load($newConfigName);\n\n foreach (self::$available_setting as $key => $type) {\n if (isset($newConfig[$key]) && !isset($config[$key])) {\n $config[$key] = $newConfig[$key];\n } else if (isset($newConfig[$key]) && isset($config[$key])) {\n switch ($type) {\n case self::SETTING_TYPE_ARRAY:\n $config[$key] = array_merge($config[$key], $newConfig[$key]);\n break;\n default:\n $config[$key] = $newConfig[$key];\n break;\n } \n }\n } \n\n // Override default setting for some websites that using bad class name\n foreach ($config[self::IGNORED_CLASSES] as $key => $class) {\n if (isset($newConfig[self::OVERRIDE_CLASSES]) && in_array($class, $newConfig[self::OVERRIDE_CLASSES])) {\n unset($config[self::IGNORED_CLASSES][$key]);\n }\n }\n }\n\n return $config;\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "protected function _getConfig()\n {\n $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');\n $configArray = $bootstrap->getOptions();\n return $config = new Zend_Config($configArray);\n }", "public static function setDefaultConfig(StreamWrapperConfiguration $config) {\n static::$defaultConfig = $config;\n }" ]
[ "0.736358", "0.7275711", "0.7114066", "0.7086317", "0.7043768", "0.67724633", "0.67504126", "0.6583964", "0.65776575", "0.64758164", "0.6471749", "0.642997", "0.64287823", "0.64043087", "0.63616365", "0.63530725", "0.63326323", "0.6321696", "0.62999743", "0.6241815", "0.6236451", "0.6201516", "0.6191884", "0.61403966", "0.6139867", "0.6128816", "0.61249685", "0.6104701", "0.61000127", "0.6097254", "0.60864186", "0.606865", "0.6068279", "0.6045904", "0.60398567", "0.60398006", "0.6039772", "0.60392785", "0.60383564", "0.60350657", "0.60131276", "0.60086864", "0.5977818", "0.59675443", "0.5966143", "0.5961748", "0.59527904", "0.5951153", "0.5948808", "0.59358394", "0.593558", "0.5934944", "0.5927504", "0.5924995", "0.5904975", "0.58999956", "0.5891917", "0.58853894", "0.58722013", "0.58665067", "0.58636963", "0.58634794", "0.586215", "0.58588856", "0.58552575", "0.5854714", "0.58500886", "0.58500886", "0.58500886", "0.5827951", "0.5816776", "0.58144677", "0.58098716", "0.5794487", "0.57911325", "0.57911325", "0.5785818", "0.57797104", "0.57790476", "0.5778784", "0.5776721", "0.57767034", "0.57670295", "0.5759335", "0.57550365", "0.5747948", "0.5735576", "0.5734213", "0.5714236", "0.5712519", "0.5682992", "0.5682992", "0.5682992", "0.5682992", "0.5682992", "0.5682992", "0.5682992", "0.5682992", "0.56769943", "0.5675666" ]
0.6054971
33
Loads the symfony parsed configuration inside the resolver.
public function load(array $configuration) { $this->raw = $configuration; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadConfiguration()\n {\n // Get bundles paths\n $bundles = $this->kernel->getBundles();\n $paths = array();\n $pathInBundles = 'Resources' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'nekland_admin.yml';\n\n foreach ($bundles as $bundle) {\n $paths[] = $bundle->getPath() . DIRECTORY_SEPARATOR . $pathInBundles;\n }\n $this->configuration->setPaths($paths);\n $this->configuration->loadConfigFiles();\n }", "public function loadConfiguration(): void\n {\n $config = $this->getConfig() + $this->defaults;\n $this->setConfig($config);\n\n $cb = $this->getContainerBuilder();\n\n $routingFilePath = $config['routingFile'];\n $neonRoutesLoader = $cb->addDefinition($this->prefix('neonRoutesLoader'));\n $neonRoutesLoader->setClass(NeonRoutesLoader::class)\n ->setArguments([Helpers::expand($routingFilePath, $cb->parameters), $config['autoInternalIds']]);\n\n $neonLocalesLoader = $cb->addDefinition($this->prefix('neonLocalesLoader'));\n $neonLocalesLoader->setClass(NeonLocalesLoader::class)\n ->setArguments([Helpers::expand($routingFilePath, $cb->parameters)]);\n\n $router = $cb->addDefinition($this->prefix('router'));\n $router->setClass(Router::class)\n ->addSetup('setAsSecured', [$config['isSecured']])\n ->addSetup('setFilesExtension', [$config['extension']]);\n }", "private function load()\n {\n if ($this->sites) {\n return;\n }\n $data = Yaml::parse(file_get_contents($this->file));\n $this->sites = $data['sites'];\n }", "private function initConfig() {\n\t\t$configLoader = new ConfigLoader($this->_env);\n\n /** set config to Di container */\n $this->_di->set('config', $configLoader, TRUE);\n $this->_config = $configLoader;\n\t}", "abstract protected function loadConfig();", "public function setResolver(LoaderResolverInterface $resolver)\n {\n }", "static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}", "public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}", "public static function load()\n {\n if(!self::$loaded)\n {\n $GLOBALS['_EZMVC_SYS_CONFIG'] = require __DIR__ . '/system.config.php'; //Load config file\n $GLOBALS['_EZMVC_SYS_CONFIG'] = is_array($GLOBALS['_EZMVC_SYS_CONFIG']) ? $GLOBALS['_EZMVC_SYS_CONFIG'] : []; //Make sure its an array\n\n $GLOBALS['_EZMVC_APP_CONFIG'] = require dirname(__DIR__) . '/app/config/app.config.php';\n $GLOBALS['_EZMVC_APP_CONFIG'] = is_array($GLOBALS['_EZMVC_APP_CONFIG']) ? $GLOBALS['_EZMVC_APP_CONFIG'] : [];\n }\n }", "protected function loadConfiguration()\n {\n $configPath = __DIR__ . '/../../fixture/config/twigbridge.php';\n if (!$this->isLumen()) {\n $this->publishes([$configPath => config_path('twigbridge.php')], 'config');\n }\n $this->mergeConfigFrom($configPath, 'twigbridge');\n }", "protected function getConfigResolver()\n {\n if (is_null($this->configResolver) === false) {\n return $this->configResolver;\n }\n\n $resolver = new AttributesResolver();\n $resolver->setDefault('host', '0.0.0.0', 'string', true)\n ->setDefault('port', 4000, 'integer', true)\n ->setValidator('port', function ($value) {\n return $value >= 0;\n })\n ->setDefault('server_watch_ext', ['html'], 'array', true)\n ->setDefault('parsedown_activated', false, 'bool', true);\n\n $this->configResolver = $resolver;\n\n return $this->configResolver;\n }", "public function config() : LoaderInterface {\n return $this -> loader;\n }", "abstract protected function loadConfiguration($name);", "abstract protected function loadConfiguration(): Swagger;", "public function loadApplicationConfiguration(LoaderInterface $loader);", "public function load()\r\n {\r\n if ($this->isLoaded()) {\r\n return;\r\n }\r\n\r\n $container = new Container();\r\n\r\n $container->add('template_path', ROCKET_LL_PATH . 'views/');\r\n $container->add('plugin_basename', ROCKET_LL_BASENAME);\r\n\r\n $container->add('options', function () {\r\n return new Options('rocket_lazyload');\r\n });\r\n\r\n $container->add('event_manager', function () {\r\n return new EventManager();\r\n });\r\n\r\n $service_providers = [\r\n 'RocketLazyLoadPlugin\\ServiceProvider\\OptionServiceProvider',\r\n 'RocketLazyLoadPlugin\\ServiceProvider\\AdminServiceProvider',\r\n 'RocketLazyLoadPlugin\\ServiceProvider\\ImagifyNoticeServiceProvider',\r\n 'RocketLazyLoadPlugin\\ServiceProvider\\LazyloadServiceProvider',\r\n 'RocketLazyLoadPlugin\\ServiceProvider\\SubscribersServiceProvider',\r\n ];\r\n\r\n foreach ($service_providers as $service) {\r\n $container->addServiceProvider($service);\r\n }\r\n\r\n $subscribers = [\r\n 'RocketLazyLoadPlugin\\Subscriber\\ThirdParty\\AMPSubscriber',\r\n 'RocketLazyLoadPlugin\\Subscriber\\AdminPageSubscriber',\r\n 'RocketLazyLoadPlugin\\Subscriber\\ImagifyNoticeSubscriber',\r\n 'RocketLazyLoadPlugin\\Subscriber\\LazyloadSubscriber',\r\n ];\r\n\r\n foreach ($subscribers as $subscriber) {\r\n $container->get('event_manager')->addSubscriber($container->get($subscriber));\r\n }\r\n\r\n $this->loaded = true;\r\n }", "public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }", "public function loadContainerConfiguration(LoaderInterface $loader);", "public function load(array $configs, ContainerBuilder $container)\n {\n // TODO move this to the Configuration class as soon as it supports setting such a default\n array_unshift($configs, array(\n 'formats' => array(\n 'json' => 'fos_rest.json',\n 'xml' => 'fos_rest.xml',\n 'html' => 'fos_rest.html',\n ),\n 'force_redirects' => array(\n 'html' => true,\n ),\n ));\n\n $processor = new Processor();\n $configuration = new Configuration();\n $config = $processor->processConfiguration($configuration, $configs);\n\n $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));\n $loader->load('view.xml');\n $loader->load('routing.xml');\n\n $container->setParameter($this->getAlias().'.formats', array_keys($config['formats']));\n $container->setParameter($this->getAlias().'.default_form_key', $config['default_form_key']);\n\n foreach ($config['classes'] as $key => $value) {\n $container->setParameter($this->getAlias().'.'.$key.'.class', $value);\n }\n\n if ($config['serializer_bundle']) {\n foreach ($config['formats'] as $format => $encoder) {\n $encoder = $container->getDefinition($encoder);\n $encoder->addTag('jms_serializer.encoder', array('format' => $format));\n }\n\n $priority = count($config['normalizers']);\n foreach ($config['normalizers'] as $normalizer) {\n $normalizer = $container->getDefinition($normalizer);\n $normalizer->addTag('jms_serializer.normalizer', array('priority' => $priority--));\n }\n\n $container->setAlias('fos_rest.serializer', 'serializer');\n } else {\n $serializer = $container->getDefinition('fos_rest.serializer');\n\n $normalizers = array();\n foreach ($config['normalizers'] as $normalizer) {\n $normalizers[] = new Reference($normalizer);\n }\n $serializer->replaceArgument(0, $normalizers);\n\n $encoders = array();\n foreach ($config['formats'] as $format => $encoder) {\n $encoders[$format] = new Reference($encoder);\n }\n $serializer->replaceArgument(1, $encoders);\n }\n\n foreach ($config['force_redirects'] as $format => $code) {\n if (true === $code) {\n $config['force_redirects'][$format] = Codes::HTTP_FOUND;\n }\n }\n $container->setParameter($this->getAlias().'.force_redirects', $config['force_redirects']);\n\n foreach ($config['exception']['codes'] as $exception => $code) {\n if (is_string($code)) {\n $config['exception']['codes'][$exception] = constant(\"\\FOS\\RestBundle\\Response\\Codes::$code\");\n }\n }\n $container->setParameter($this->getAlias().'.exception.codes', $config['exception']['codes']);\n $container->setParameter($this->getAlias().'.exception.messages', $config['exception']['messages']);\n\n if (is_string($config['failed_validation'])) {\n $config['failed_validation'] = constant('\\FOS\\RestBundle\\Response\\Codes::'.$config['failed_validation']);\n }\n $container->setParameter($this->getAlias().'.failed_validation', $config['failed_validation']);\n\n if ($config['body_listener']) {\n $loader->load('body_listener.xml');\n }\n\n if (isset($config['format_listener'])) {\n $loader->load('format_listener.xml');\n $container->setParameter($this->getAlias().'.default_priorities', $config['format_listener']['default_priorities']);\n $container->setParameter($this->getAlias().'.fallback_format', $config['format_listener']['fallback_format']);\n }\n \n $container->setParameter($this->getAlias().'.routing.loader.default_format', $config['routing_loader']['default_format']);\n\n if ($config['frameworkextra_bundle']) {\n $loader->load('frameworkextra_bundle.xml');\n }\n\n foreach ($config['services'] as $key => $value) {\n if (isset($value)) {\n $container->setAlias($this->getAlias().'.'.$key, $value);\n }\n }\n }", "public function load()\n {\n $ini = APP_DIR.'config/'.ENVIRONMENT.'.ini';\n\n if(!file_exists($ini))\n Clockwork::throwError('Could not load config ('.$ini.')');\n\n $this->data = parse_ini_file($ini, true);\n \n $this->setValues();\n }", "final protected function loadAllConfigFiles(ContainerBuilder $container): void\n {\n $directory = dirname((new ReflectionObject($this))->getFileName());\n $directory = realpath(sprintf('%s/../Resources/config/services', $directory));\n\n $loader = new YamlFileLoader($container, new FileLocator($directory));\n\n foreach ($this->configs() as $config) {\n $loader->load(sprintf('%s.yaml', $config));\n }\n }", "public function testLoad(): void\n {\n $loader = new HateoasConfigLoader();\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertSame(\n [\n ServiceLocatorInterface::class => [\n ReflectionResolver::class => [\n SerializerInterface::class => JsonSerializer::class,\n HateoasMiddleware::class => HateoasMiddleware::class,\n ExpanderInterface::class => Expander::class,\n ],\n ],\n ],\n $loader->load()\n );\n }", "private function loadConfiguration()\n {\n /** @var ConfigurationManager $configurationManager */\n $configurationManager = ConfigurationManager::getInstance();\n $this->configuration = $configurationManager->getMainConfiguration();\n }", "public function registerContainerConfiguration(LoaderInterface $loader)\n {\n $loader->load(__DIR__.'/config.yml');\n }", "public function load()\n {\n foreach ($this->aMappingConfiguration as $sLinkedEntity => $aMappingSetup) {\n $this->loadMapped(new $sLinkedEntity());\n }\n }", "private function loadConfig()\n {\n\n $this->config = include(__DIR__ . '/../../config/config.php');\n\n }", "protected function loadConfig() {\n $json = new JSON();\n $viewConfig = $json->readFile(__SITE_PATH . \"\\\\config\\\\view.json\");\n $this->meta_info = $viewConfig['meta'];\n $this->js_files = $viewConfig['javascript'];\n $this->css_files = $viewConfig['css'];\n }", "public function registerContainerConfiguration(LoaderInterface $loader)\n {\n $loader->load(__DIR__.'/config/config.yml');\n }", "protected function initConfig()\n {\n $this->di->setShared('config', function () {\n $path = BASE_DIR . 'app/config/';\n\n if (!is_readable($path . 'config.php')) {\n throw new RuntimeException(\n 'Unable to read config from ' . $path . 'config.php'\n );\n }\n\n $config = include $path . 'config.php';\n\n if (is_array($config)) {\n $config = new Config($config);\n }\n\n if (!$config instanceof Config) {\n $type = gettype($config);\n if ($type == 'boolean') {\n $type .= ($type ? ' (true)' : ' (false)');\n } elseif (is_object($type)) {\n $type = get_class($type);\n }\n\n throw new RuntimeException(\n sprintf(\n 'Unable to read config file. Config must be either an array or Phalcon\\Config instance. Got %s',\n $type\n )\n );\n }\n\n if (is_readable($path . APPLICATION_ENV . '.php')) {\n $override = include_once $path . APPLICATION_ENV . '.php';\n\n if (is_array($override)) {\n $override = new Config($override);\n }\n\n if ($override instanceof Config) {\n $config->merge($override);\n }\n }\n\n return $config;\n });\n }", "public function populateLocalConfiguration() {}", "protected function initConfiguration()\n {\n if (!file_exists(self::$config_file)) {\n // get the configuration directly from CMS\n $this->getConfigurationFromCMS();\n }\n elseif ((false === (self::$config_array = json_decode(@file_get_contents(self::$config_file), true))) || !is_array(self::$config_array)) {\n throw new ConfigurationException(\"Can't read the Doctrine configuration file!\");\n }\n }", "private function loadConfig()\n {\n $base = APP_ROOT.'config/';\n $filename = $base.'app.yml';\n if (!file_exists($filename)) {\n throw new ConfigNotFoundException('The application config file '.$filename.' could not be found');\n }\n\n $config = Yaml::parseFile($filename);\n\n // Populate the environments array\n $hostname = gethostname();\n $environments = Yaml::parseFile($base.'env.yml');\n foreach ($environments as $env => $hosts) {\n foreach ($hosts as $host) {\n if (fnmatch($host, $hostname)) {\n $this->environments[] = $env;\n\n // Merge the app config for the environment\n $filename = $base.$env.'/app.yml';\n if (file_exists($filename)) {\n $envConfig = Yaml::parseFile($filename);\n $config = array_merge($config, $envConfig);\n }\n }\n }\n }\n\n // Loop through each of the config files and add them\n // to the main config array\n foreach (glob(APP_ROOT.'config/*.yml') as $file) {\n $key = str_replace('.yml', '', basename($file));\n $config[$key] = Yaml::parseFile($file);\n\n // Loop through each of the environments and merge their config\n foreach ($this->environments as $env) {\n $filename = $base.$env.'/'.$key.'.yml';\n if (file_exists($filename)) {\n $envConfig = Yaml::parseFile($filename);\n $config[$key] = array_merge($config[$key], $envConfig);\n }\n }\n }\n\n // Create and store the config object\n return $this->config = new Config($config);\n }", "public function configure()\n {\n $this->container = require __DIR__ . '/../../config/configure-services.php';\n $this->scratchSpace = vfsStream::setup('scratch')->url();\n }", "private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }", "protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }", "private function initialiseConfig()\n {\n $this->mergeConfigFrom(__DIR__ . '/..' . Settings::LARAVEL_REAL_CONFIG, Settings::LARAVEL_CONFIG_NAME);\n }", "protected function loadInternal(array $mergedConfig, ContainerBuilder $container): void\n\t{\n\t\t$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));\n\t\t$loader->load('services.yaml');\n\n\t\t$prontoMobile = $container->getDefinition('pronto_mobile.global.app');\n\t\t$prontoMobile->addMethodCall('setConfiguration', [$mergedConfig]);\n\t}", "public static function load()\n {\n $entries = Configuration::get();\n \n foreach ($entries as $entry) {\n self::$config[$entry->id] = unserialize($entry->value);\n }\n }", "protected function getRouting_Loader_YamlService()\n {\n return $this->services['routing.loader.yaml'] = new \\Symfony\\Component\\Routing\\Loader\\YamlFileLoader(${($_ = isset($this->services['file_locator']) ? $this->services['file_locator'] : $this->getFileLocatorService()) && false ?: '_'});\n }", "protected function pull()\n {\n $this->definition = array();\n \n if (file_exists(\\sfConfig::get('sf_cache_dir') . DIRECTORY_SEPARATOR . $this->file_name)) {\n $this->definition = \\sfYaml::load(\\sfConfig::get('sf_cache_dir') . DIRECTORY_SEPARATOR . $this->file_name);\n }\n }", "protected function getConfigLoader()\n\t{\n\t\treturn new FileLoader(new Filesystem, $this->defaultPath);\n\t}", "public function load(array $configs, ContainerBuilder $container)\n {\n $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));\n $loader->load('services.yml');\n $loader->load('config.yml');\n }", "public static function load()\n {\n\n // guard to check whether to init the rest api\n if (false === strpos(($_ENV['SCHEDULE_BUILDER_API'] ?? ''), 'locations')) {\n return;\n }\n\n\n add_action('rest_api_init', function () {\n // an instance of this endpoint\n $endpoint = new LocationEndpoint();\n\n register_rest_route('/schedule-builder/', '/locations', [\n 'methods' => 'GET',\n 'callback' => [$endpoint, 'findAllLocations']\n ]);\n });\n\n }", "private function loadConfiguration()\n {\n if (!Configuration::configurationIsLoaded()) {\n Configuration::loadConfiguration();\n }\n }", "public function load()\n {\n $configFilePath = $this->configFilePath();\n if (!file_exists($configFilePath)) {\n $this->hosts = [];\n } else {\n $this->hosts = $this->parser->parse(file_get_contents($configFilePath));\n }\n return $this->hosts();\n }", "public function registerContainerConfiguration(LoaderInterface $loader)\n {\n $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');\n }", "public function registerContainerConfiguration(LoaderInterface $loader)\n {\n $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');\n }", "public function load()\n {\n $parser = new ezcConfigurationIniParser( ezcConfigurationIniParser::PARSE, $this->path );\n $settings = array();\n $comments = array();\n\n foreach ( new NoRewindIterator( $parser ) as $element )\n {\n if ( $element instanceof ezcConfigurationIniItem )\n {\n switch ( $element->type )\n {\n case ezcConfigurationIniItem::GROUP_HEADER:\n $settings[$element->group] = array();\n if ( !is_null( $element->comments ) )\n {\n $comments[$element->group]['#'] = $element->comments;\n }\n break;\n\n case ezcConfigurationIniItem::SETTING:\n eval( '$settings[$element->group][$element->setting]'. $element->dimensions. ' = $element->value;' );\n if ( !is_null( $element->comments ) )\n {\n eval( '$comments[$element->group][$element->setting]'. $element->dimensions. ' = $element->comments;' );\n }\n break;\n }\n }\n if ( $element instanceof ezcConfigurationValidationItem )\n {\n throw new ezcConfigurationParseErrorException( $element->file, $element->line, $element->description );\n }\n }\n\n $this->config = new ezcConfiguration( $settings, $comments );\n return $this->config;\n }", "public function registerContainerConfiguration(LoaderInterface $loader)\n {\n $loader->load(__DIR__ . '/../config/config_'.$this->getEnvironment().'.yml');\n }", "public abstract function loadConfig($fileName);", "private function load()\n {\n if (!file_exists($this->file)) {\n throw new Exception('config file not found');\n }\n // read contents of wordpress config\n // we can not require the configuration because it requires a shit load of other files\n $this->config = file_get_contents($this->file);\n }", "public function load($content)\n\t{\n\t\t$data = Yaml::parse($content);\n\n\t\tif (!key_exists('providers', $data))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($data['providers'] as $alias => $service)\n\t\t{\n\t\t\tif (!class_exists($service['class']))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$arguments = [];\n\n\t\t\tif (key_exists('arguments', $service))\n\t\t\t{\n\t\t\t\tforeach ($service['arguments'] as $argument)\n\t\t\t\t{\n\t\t\t\t\tif (!$this->container->has($argument))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$arguments[] = $this->container->get($argument);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$reflect = new \\ReflectionClass($service['class']);\n\n\t\t\t$provider = $reflect->newInstanceArgs($arguments);\n\t\t\t$this->container->registerServiceProvider($provider, $alias);\n\t\t}\n\t}", "private function load_config() {\n $this->config = new Config();\n }", "abstract protected function loadDefinition();", "public function registerContainerConfiguration(LoaderInterface $loader)\n {\n $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.xml');\n }", "public function registerContainerConfiguration(LoaderInterface $loader)\n {\n $loader->load(__DIR__.\"/config/config_\".$this->getEnvironment().\".yml\");\n }", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "private static function loadAppConfig() {\n\t\t\t$appConfJson = file_get_contents(JIAOYU_PROJECT_HOME.\"/app/conf/config.json\");\n\t\t\ttry {\n\t\t\t\t$appConf = JsonUtils::decode($appConfJson);\n\t\t\t} catch (JsonException $e) {\n\t\t\t\tthrow new ConfigurationException(\"Error initializing app config: \".$e->getMessage());\n\t\t\t}\n\n\t\t\t// OK - now we can load up the config array from the file\n\t\t\tforeach ($appConf as $configKey => $configValue) {\n\t\t\t\tself::$config[$configKey] = $configValue;\n\t\t\t}\n\t\t}", "private function loadConfigurations(YAMLParser $parser, array $nodeConfig)\n {\n\n // $subdirectories = $this->getDirectoryList();\n\n //first load the system service configurations\n $parser->setFilePath(__SITE_PATH . '/app/config/services.yml');\n $config = $parser->loadConfig();\n\n if (is_array($config)) {\n $this->config[] = $config;\n }\n $folder = str_replace('\\\\', DIRECTORY_SEPARATOR, $nodeConfig['namespace']) . DIRECTORY_SEPARATOR . $nodeConfig['componentFolder'];\n //now load all the component configurations\n// foreach ($subdirectories as $folder) {\n// $parser->setFilePath($folder . '/config/services.yml');\n// $config = $parser->loadConfig();\n//\n// if (is_array($config)) {\n// $this->config[] = $config;\n// }\n// }\n\n $parser->setFilePath(__SITE_PATH . DIRECTORY_SEPARATOR . $folder . '/config/services.yml');\n $config = $parser->loadConfig();\n // file_put_contents(__DEBUG_OUTPUT_PATH, print_r($config, true), FILE_APPEND);\n if (is_array($config)) {\n $this->config[] = $config;\n }\n\n // file_put_contents(__DEBUG_OUTPUT_PATH, print_r($this->config, true), FILE_APPEND);\n\n // file_put_contents(__DEBUG_OUTPUT_PATH,__SITE_PATH . DIRECTORY_SEPARATOR . $folder . '/config/services.yml'.\"\\r\\n\", FILE_APPEND);\n\n }", "public function load(ContainerBuilder $container, array $config)\n {\n $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Config'));\n $loader->load('services.yml');\n }", "public function loadConfigs()\n {\n self::$country_configs = self::getCountryConfigs();\n $configs = new parent();\n self::$categories = $configs->getCategories();\n self::$site_data = self::get_site_data();\n self::$payments_name = self::setPaymentGateway();\n }", "protected function loadConfigsForRegister(): void\n {\n $shipConfigs = $this->getConfigsFromShip();\n $containersConfigs = $this->getConfigsFromContainers();\n\n $configs = array_merge($shipConfigs, $containersConfigs);\n\n foreach ($configs as $file){\n $filename = pathinfo($file, PATHINFO_FILENAME);\n $this->mergeConfigFrom($file, $filename);\n }\n }", "public function load(array $config, ContainerBuilder $container)\n {\n $configuration = new Configuration();\n $config = $this->processConfiguration($configuration, $config);\n\n $container->setParameter('konekt_courier.fancourier.api.username', $config['fancourier']['api']['username']);\n $container->setParameter('konekt_courier.fancourier.api.user_pass', $config['fancourier']['api']['user_pass']);\n $container->setParameter('konekt_courier.fancourier.api.client_id', $config['fancourier']['api']['client_id']);\n\n if (isset($config['fancourier']['package_populator_service'])) {\n $container->setParameter('konekt_courier.fancourier.package.populator.service', $config['fancourier']['package_populator_service']);\n }\n\n $container->setParameter('konekt_courier.dpd.api.username', $config['dpd']['api']['username']);\n $container->setParameter('konekt_courier.dpd.api.password', $config['dpd']['api']['password']);\n\n if (isset($config['dpd']['package_populator_service'])) {\n $container->setParameter('konekt_courier.dpd.package.populator.service', $config['dpd']['package_populator_service']);\n }\n\n $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));\n $loader->load('config.yml');\n }", "public function load(array $config, ContainerBuilder $container)\n {\n $loader = new YamlFileLoader(\n $container,\n new FileLocator(__DIR__ . '/../Resources/config/')\n );\n $loader->load('services.yml');\n }", "private function loadFiles()\n {\n $finder = new Finder();\n\n foreach (Config::get('routing_dirs') as $directory) {\n $finder\n ->files()\n ->name('*.yml')\n ->in($directory)\n ;\n\n foreach ($finder as $file) {\n $resource = $file->getRealPath();\n $this->routes = array_merge($this->routes, Yaml::parse(file_get_contents($resource)));\n }\n }\n }", "public function load_config() {\n if (!isset($this->config)) {\n $settingspluginname = 'assessmentsettings';\n $this->config = get_config(\"local_$settingspluginname\");\n }\n }", "private function configure(): void\n {\n if (!$this->app->configurationIsCached()) {\n $this->mergeConfigFrom(__DIR__ . '/../config/paket.php', 'paket');\n }\n }", "public function _initConfig() {\r\n $this->config = Yaf\\Application::app()->getConfig();\r\n Yaf\\Registry::set(\"config\", $this->config);\r\n\r\n //申明, 凡是以Foo和Local开头的类, 都是本地类\r\n $this->loader = Yaf\\Loader::getInstance();\r\n $this->loader->registerLocalNamespace([\"fly\"]);\r\n }", "public function rebuildContainer()\n {\n $container = new ContainerBuilder();\n\n $loader = new YamlFileLoader($container, new FileLocator(static::getAppDir()));\n $loader->load('config_'.$this->env.'.yml');\n\n $this->setContainer($container);\n $this->loadBundles();\n }", "public function load(array $configs, ContainerBuilder $container): void\n {\n $loader = new YamlFileLoader(\n $container,\n new FileLocator(__DIR__ . '/../Resources/config')\n );\n $loader->load('services.yml');\n }", "public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }", "protected function initContainer(): void\n {\n // reserve some ids\n $this->reserveObject('config', $this->getConfig());\n $this->reserveObject('container', $this->delegator);\n\n // resolve all objects defined in di.services\n $this->autoResolve();\n\n // resolve all object referenced in the $config\n $tree = $this->getConfig()->getTree();\n $settings = &$tree->get('');\n $this->deReference($settings);\n }", "protected function getTranslation_Loader_YmlService()\n {\n return $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader();\n }", "protected function loadInternal(array $mergedConfig, ContainerBuilder $container)\n {\n $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));\n foreach (['command', 'command_event', 'event'] as $featureName) {\n $enabled = (bool) $mergedConfig[$featureName];\n if (true === $enabled) {\n $loader->load(sprintf('%s.yml', $featureName));\n }\n $container->setParameter(sprintf('domain_driven_design.%s.enabled', $featureName), $enabled);\n }\n }", "protected function initializeConfiguration() {}", "protected static function loadConfiguration()\n {\n if (null === self::$configuration) {\n self::$configuration = Register::getRegister();\n }\n }", "public function set_resolver(Resolver $resolver);", "protected function loadSettings() {}", "protected function loadSettings() {}", "protected function loadSettings() {}", "protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void\n {\n $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));\n $container->setParameter('container.dumper.inline_class_loader', \\PHP_VERSION_ID < 70400 || $this->debug);\n $container->setParameter('container.dumper.inline_factories', true);\n $confDir = $this->getProjectDir().'/config';\n\n $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob');\n $loader->load($confDir.'/{packages}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob');\n $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob');\n $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');\n }", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }", "protected function loadParameters()\n {\n $params = Yaml::parse(file_get_contents($this->getBaseDir('Resources/data/parameters.yml')));\n if (is_array($params)) {\n foreach ($params as $paramName => $paramValue) {\n if (!$this->app->offsetExists($paramName)) {\n $this->app[$paramName] = $paramValue;\n }\n }\n }\n return $this;\n }", "public function create()\n {\n return new ConfigResolver();\n }", "public function loadConfig($data);", "public function loadConfig() {\n return (object)$this->config;\n }", "protected function load()\n {\n $moduleVars = $this->variableApi->getAll('ZikulaRoutesModule');\n \n if (isset($moduleVars['routeEntriesPerPage'])) {\n $this->setRouteEntriesPerPage($moduleVars['routeEntriesPerPage']);\n }\n }", "public function load() {\n // Load settings\n\t $this->lookup_title = $this->getProjectSetting('lookup-title');\n\t $this->lookup_header = $this->getProjectSetting('lookup-header');\n\t $this->lookup_field = $this->getProjectSetting('lookup-field');\n\t $this->lookup_event_id = $this->getProjectSetting('lookup-event-id');\n\t $this->validate_mrn = $this->getProjectSetting('validate-mrn');\n\t $this->found_action = $this->getProjectSetting('found-action');\n\t $this->repeating_event_id = $this->getProjectSetting('repeating-event-id');\n\t $this->repeating_form_name = $this->getProjectSetting('repeating-form-name');\n\t $this->is_loaded = true;\n }", "public function configureOptionsResolver(OptionsResolver $optionsResolver): OptionsResolver;", "private function __construct()\n {\n $this->loadConfigFiles($this->__config['imports']);\n $this->resolvePaths();\n }", "public function __construct() {\n $this->symfony_yaml = new Parser();\n }", "protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void\n {\n $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));\n $container->addResource(new FileResource(sprintf('%s/extra.bundles.php' , APPLICATION_LIB_PATH ) ));\n\n /**\n * Set the global parameters here\n */\n $container->setParameter('container.dumper.inline_class_loader', true);\n $container->setParameter('container.dumper.inline_factories', true);\n\n /**\n * Instruction to load the master config files\n */\n $confDir = $this->getProjectDir().'/config';\n\n $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob');\n $loader->load($confDir.'/{packages}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');\n $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob');\n $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');\n }", "public function load(array $config, ContainerBuilder $container)\n {\n $this->configure(\n $config,\n new Configuration(),\n $container,\n self::CONFIGURE_LOADER | self::CONFIGURE_DATABASE | self::CONFIGURE_PARAMETERS | self::CONFIGURE_ADMIN\n );\n\n $container->setParameter('esperanto_newsletter.subscriber', $config[0]['subscriber']);\n\n $loader = new Loader\\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));\n $loader->load('services.yml');\n }", "public function load(): ConfigStoreInterface;", "public function loadConfiguration(): void\n\t{\n\t\tif ($this->cliMode !== true) {\n\t\t\treturn;\n\t\t}\n\n\t\t$builder = $this->getContainerBuilder();\n\n\t\t$builder->addDefinition($this->prefix('password'))\n\t\t\t->setFactory(SecurityPasswordCommand::class);\n\t}", "protected function loadConfiguration()\n {\n $config_path = __DIR__ . '/../../config/tintin.php';\n\n if (!$this->isLumen()) {\n $this->publishes([\n $config_path => config_path('view.php')\n ], 'config');\n }\n\n $this->mergeConfigFrom($config_path, 'view');\n }", "protected function loadConfigManually()\n {\n $basePath = config('swoole-tcp.laravel_base_path') ?: base_path();\n if ($this->isLumen && file_exists($basePath . '/config/swoole-tcp.php')) {\n $this->getLaravel()->configure('swoole-tcp');\n }\n }", "public function load(array $config, ContainerBuilder $container)\n {\n $configuration = new Configuration();\n $config = $this->processConfiguration($configuration, $config);\n\n $container->setParameter('open_orchestra_front.template_set', $config['template_set']);\n $container->setParameter('open_orchestra_front.devices', $config['devices']);\n $container->setParameter('open_orchestra_front.device_type_field', $config['device_type_field']);\n\n $loader = new Loader\\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));\n $loader->load('services.yml');\n $loader->load('subscriber.yml');\n $loader->load('twig.yml');\n $loader->load('subquery.yml');\n $loader->load('database_routing.yml');\n $loader->load('voter.yml');\n\n $container->setAlias('templating', 'open_orchestra_front.twig.orchestra_twig_engine');\n }", "public function configure()\n\t{\n\t\t$this->dispatcher->connect('context.load_factories', array($this, 'loadExtraFactories'));\n\t}", "public function loadYamlConfig($filepath);", "public function load(array $configs, ContainerBuilder $container)\n {\n $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));\n $loader->load('services.yml');\n\n $config = $this->processConfiguration(new Configuration(), $configs);\n\n $container->setParameter('best_it.ct_product_slug_router.controller', $config['controller']);\n $container->setParameter('best_it.ct_product_slug_router.priority', $config['priority']);\n $container->setParameter('best_it.ct_product_slug_router.route', $config['route']);\n\n if (@$config['repository']) {\n $container->setAlias('best_it.ct_product_slug_router.product_repository', $config['repository']);\n }\n }" ]
[ "0.6115601", "0.60963166", "0.6091193", "0.6090177", "0.6076337", "0.58768284", "0.5802997", "0.57772124", "0.56862104", "0.565992", "0.56595993", "0.56366956", "0.56157947", "0.5578849", "0.5546092", "0.5531601", "0.5527011", "0.5525959", "0.5517519", "0.55141294", "0.5498131", "0.549471", "0.54795694", "0.54749507", "0.54631364", "0.546178", "0.5451848", "0.5416528", "0.5415368", "0.5414825", "0.53998005", "0.53701174", "0.5369825", "0.5362432", "0.5361895", "0.5361246", "0.53496027", "0.5342861", "0.53367203", "0.53296095", "0.5327718", "0.5320509", "0.53142333", "0.5306359", "0.5305647", "0.5299147", "0.5299147", "0.529906", "0.5297634", "0.5290826", "0.527491", "0.5269464", "0.5266437", "0.52624846", "0.52569574", "0.52549064", "0.5254381", "0.5240249", "0.52395654", "0.5239443", "0.52257615", "0.5225649", "0.5212326", "0.5212212", "0.5194656", "0.51945835", "0.5193531", "0.5188258", "0.51839274", "0.5178226", "0.5177805", "0.51743966", "0.5173143", "0.5170781", "0.51707053", "0.51701605", "0.5167668", "0.5166396", "0.5165507", "0.5165507", "0.51624924", "0.5158769", "0.51539606", "0.513451", "0.5133333", "0.5127305", "0.51258355", "0.5125005", "0.51225764", "0.5117034", "0.5115807", "0.51145756", "0.51066244", "0.5103721", "0.5101565", "0.5094938", "0.5081148", "0.5080771", "0.5067428", "0.505592", "0.5053012" ]
0.0
-1
Generates a NegotiationResult based on the values provided and the configuration options.
protected function resolveNegotiatedValue($value, $context) { $this->initialize(); if($value === null) { return $this->defaults[$context]; } foreach($this->parsed[$context] as $name=>$types) { foreach($types as $type) { if($value === $type) { return new NegotiationResult($name,$type); } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initialize()\n {\n if(!$this->initialized)\n {\n $configuration = $this->merge($this->raw,$this->defaultRawConfiguration());\n foreach($configuration['types'] as $type)\n {\n $this->parsed['type'][$type['name']] = $type['values'];\n $this->priorities['type'] = array_merge($this->priorities['type'],$type['values']);\n if(!isset($this->defaults['type']))\n {\n $this->defaults['type'] = new NegotiationResult($type['name'],$type['values'][0]);\n }\n }\n $this->parsed['headers'] = $configuration['headers'];\n $this->initialized = true;\n }\n return $this;\n }", "public static function output($options=array()) {\n\t\t\t\n\t\t\t// List of status codes for ease of mapping $status\n\t\t\t$status_codes = array(\n\t\t\t\t\t\t\t\t// Informational 1xx\n\t\t\t\t\t\t\t\t100 => 'Continue',\n\t\t\t\t\t\t\t\t101 => 'Switching Protocols',\n\t\t\t\t\t\t\t\t// Successful 2xx\n\t\t\t\t\t\t\t\t200 => 'OK',\n\t\t\t\t\t\t\t\t201 => 'Created',\n\t\t\t\t\t\t\t\t202 => 'Accepted',\n\t\t\t\t\t\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t\t\t\t\t\t204 => 'No Content',\n\t\t\t\t\t\t\t\t205 => 'Reset Content',\n\t\t\t\t\t\t\t\t206 => 'Partial Content',\n\t\t\t\t\t\t\t\t// Redirection 3xx\n\t\t\t\t\t\t\t\t300 => 'Multiple Choices',\n\t\t\t\t\t\t\t\t301 => 'Moved Permanently',\n\t\t\t\t\t\t\t\t302 => 'Found',\n\t\t\t\t\t\t\t\t303 => 'See Other',\n\t\t\t\t\t\t\t\t304 => 'Not Modified',\n\t\t\t\t\t\t\t\t305 => 'Use Proxy',\n\t\t\t\t\t\t\t\t307 => 'Temporary Redirect',\n\t\t\t\t\t\t\t\t// Client Error 4xx\n\t\t\t\t\t\t\t\t400 => 'Bad Request',\n\t\t\t\t\t\t\t\t401 => 'Unauthorized',\n\t\t\t\t\t\t\t\t402 => 'Payment Required',\n\t\t\t\t\t\t\t\t403 => 'Forbidden',\n\t\t\t\t\t\t\t\t404 => 'Not Found',\n\t\t\t\t\t\t\t\t405 => 'Method Not Allowed',\n\t\t\t\t\t\t\t\t406 => 'Not Acceptable',\n\t\t\t\t\t\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t\t\t\t\t\t408 => 'Request Timeout',\n\t\t\t\t\t\t\t\t409 => 'Conflict',\n\t\t\t\t\t\t\t\t410 => 'Gone',\n\t\t\t\t\t\t\t\t411 => 'Length Required',\n\t\t\t\t\t\t\t\t412 => 'Precondition Failed',\n\t\t\t\t\t\t\t\t413 => 'Request Entity Too Large',\n\t\t\t\t\t\t\t\t414 => 'Request-URI Too Long',\n\t\t\t\t\t\t\t\t415 => 'Unsupported Media Type',\n\t\t\t\t\t\t\t\t416 => 'Request Range Not Satisfiable',\n\t\t\t\t\t\t\t\t417 => 'Expectation Failed',\n\t\t\t\t\t\t\t\t// Server Error 5xx\n\t\t\t\t\t\t\t\t500 => 'Internal Server Error',\n\t\t\t\t\t\t\t\t501 => 'Not Implemented',\n\t\t\t\t\t\t\t\t502 => 'Bad Gateway',\n\t\t\t\t\t\t\t\t503 => 'Service Unavailable',\n\t\t\t\t\t\t\t\t504 => 'Gateway Timeout',\n\t\t\t\t\t\t\t\t505 => 'HTTP Version Not Supported'\n\t\t\t );\n\t\t\t\n\t\t\t// Get the description for the current status code.\n\t\t\t$status_message = $status_codes[self::$status];\n\t\t\t\n\t\t\t// Write the HTTP response status line.\n\t\t\theader('HTTP/1.1 ' . self::$status . \" $status_message\");\n\t\t\t\n\t\t\t// Write the HTTP response headers.\n\t\t\tforeach(self::$headers as $type => $header)\n\t\t\t\theader(\"$type: $header\", self::$status);\n\t\t\t\n\t\t\t// Write the HTTP response body.\n\t\t\techo(self::$body);\n\t\t}", "private function doContentNegotiation(){\n\tif(!isset($_SERVER['HTTP_ACCEPT']) && $this->default !== \"\"){\n $this->log->addInfo(\"server and default not set\");\n $this->stack = array(strtolower($this->default));\n\t}else if(!isset($_SERVER['HTTP_ACCEPT'])){\n $this->log->addInfo(\"accept not set, taking default\");\n $this->stack = array(\"html\");\n }else{\n $this->log->addInfo(\"accept is set, doing content negotiation\");\n $accept = $_SERVER['HTTP_ACCEPT'];\n $types = explode(',', $accept);\n //this removes whitespace from each type\n $types = array_map('trim', $types);\n foreach($types as $type){\n $q = 1.0;\n $qa = explode(\";q=\",$type);\n if(isset($qa[1])){\n $q = (float)$qa[1];\n }\n $type = $qa[0];\n //throw away the first part of the media type\n $typea = explode(\"/\", $type);\n if(isset($typea[1])){\n $type = $typea[1];\n }\n $type = strtolower($type);\n \n //default formatter for when it just doesn't care. Probably this is when a developer is just performing tests.\n if($type == \"*\" && $this->default !== \"\"){\n $type = strtolower($this->default);\n }else if($type == \"*\"){\n $type = \"html\";\n }\n //now add the format type to the array, if it hasn't been added yet\n if(!isset($stack[$type])){\n $stack[$type] = $q;\n }\n }\n //all that is left for us to do is sorting the array according to their q\n arsort($stack);\n $this->stack = array_keys($stack);\n }\n }", "public function doGenerateCommand()\n {\n $result = new ezcMvcResult();\n\n $videoFile = $this->VideoFile;\n\n $episodeFile = new TVEpisodeFile( $videoFile );\n $result->variables['status'] = 'ok';\n $commandGenerator = new MKVMergeCommandGenerator();\n\n // add audio + video in english, and disable existing subtitles\n foreach( $commandGenerator->addInputFile( new MKVMergeMediaInputFile( $episodeFile->path ) )\n as $track )\n {\n if ( $track instanceof MKVmergeCommandSubtitleTrack )\n {\n $track->enabled = false;\n }\n else\n {\n $track->language = 'eng';\n $track->default_track = true;\n }\n }\n // add subtitle file\n if ( $episodeFile->hasSubtitleFile )\n {\n foreach( $commandGenerator->addInputFile( new MKVMergeSubtitleInputFile( $episodeFile->subtitleFile, 'fre' ) )\n as $track )\n {\n $track->language = 'fre';\n $track->default_track = true;\n }\n }\n\n // determine best disk\n $bestFit = mmMkvManagerDiskHelper::BestTVEpisodeFit( $episodeFile->fullname, $episodeFile->fileSize );\n if ( isset( $bestFit['RecommendedDiskHasFreeSpace'] ) && $bestFit['RecommendedDiskHasFreeSpace'] === 'true' )\n $disk = $bestFit['RecommendedDisk'];\n else\n $disk = 'VIMES';\n\n $commandGenerator->setOutputFile( \"/media/storage/{$disk}/TV Shows/{$episodeFile->showName}/{$episodeFile->filename}\" );\n\n $commandObject = $commandGenerator->get();\n $commandObject->appendSymLink = true;\n\n $result->variables['command'] = $commandObject->asString();\n\n return $result;\n }", "protected function createOptions()\n {\n $isPng = ($this->getMimeTypeOfSource() == 'image/png');\n\n $this->options2 = new Options();\n $this->options2->addOptions(\n new IntegerOption('alpha-quality', 85, 0, 100),\n new BooleanOption('auto-filter', false),\n new IntegerOption('default-quality', ($isPng ? 85 : 75), 0, 100),\n new StringOption('encoding', 'auto', ['lossy', 'lossless', 'auto']),\n new BooleanOption('low-memory', false),\n new BooleanOption('log-call-arguments', false),\n new IntegerOption('max-quality', 85, 0, 100),\n new MetadataOption('metadata', 'none'),\n new IntegerOption('method', 6, 0, 6),\n new IntegerOption('near-lossless', 60, 0, 100),\n new StringOption('preset', 'none', ['none', 'default', 'photo', 'picture', 'drawing', 'icon', 'text']),\n new QualityOption('quality', ($isPng ? 85 : 'auto')),\n new IntegerOrNullOption('size-in-percentage', null, 0, 100),\n new BooleanOption('skip', false),\n new BooleanOption('use-nice', false),\n new ArrayOption('jpeg', []),\n new ArrayOption('png', [])\n );\n }", "abstract public function generateConfiguration();", "private function processOptions()\r\n {\r\n $this->response = new Response(null, 200);\r\n }", "private function generateConfig() {\n $config_json = array(\n 'version' => '1.0.0',\n 'name' => $this->gateway_name,\n 'description' => '',\n 'authors' => [],\n 'currencies' => ['USD'],\n 'signup_url' => 'https://google.com'\n );\n\n foreach($config_json as $key => $value) {\n if($key == 'authors' && isset($this->config['authors'])) {\n foreach($this->config[\"authors\"] as $config_author) {\n $config_entry = array(\n \"name\" => \"\",\n \"url\" => \"\"\n );\n \n if(isset($config_author['name'])) {\n $config_entry[\"name\"] = $config_author['name'];\n \n if(isset($config_author[\"url\"])) {\n $config_entry[\"url\"] = $config_author['url'];\n }\n $config_json[\"authors\"][] = $config_entry;\n }\n }\n }\n else {\n if(isset($this->config[$key])) {\n $config_json[$key] = $this->config[$key];\n }\n }\n }\n\n return json_encode($config_json);\n }", "private function generateSearchResult()\n {\n $this->outFiles['search_results_interface'] = [\n 'file' => $this->classes['search_results_interface']['file'],\n 'code' => $this->template->getCodeFromTemplate('ddd-cqrs/Api/SearchResultInterface', [\n 'namespace' => $this->classes['search_results_interface']['info']['namespace'],\n 'class' => $this->classes['search_results_interface']['info']['class_name'],\n 'data_interface' => $this->classes['data_interface']['class'],\n ]),\n ];\n\n $this->outFiles['search_results'] = [\n 'file' => $this->classes['search_results']['file'],\n 'code' => $this->template->getCodeFromTemplate('ddd-cqrs/Model/SearchResult', [\n 'namespace' => $this->classes['search_results']['info']['namespace'],\n 'class' => $this->classes['search_results']['info']['class_name'],\n 'interface' => $this->classes['search_results_interface']['class'],\n ]),\n ];\n }", "protected function formatResult()\n\t{\n\t\t$this->arResult['CLIENT_INFO'] = $this->clientInfo;\n\t\t$this->arResult['ERRORS'] = $this->errors;\n\n\t\t$this->arResult['AP_MANAGE_URL'] = static::PATH_AP_MANAGE;\n\n\t\t$this->arResult['CLIENT_ACCESS'] = $this->clientAccess;\n\t}", "public static function makeResultImageGenerator()\n {\n $user = static::$fm->create('User');\n $quiz = Quiz::where('topic', 'How dirty is your mind?')->first();\n $result = new QuizUserResults();\n $result->user = $user;\n $result->quiz = $quiz;\n $result->result_id = self::$testResultId;\n\n //Setting custom profile pic (a local file for faster testing)\n $result->user->photo = base_path('tests/assets/sample-profile-pic.jpg');\n $settings = (array) $result->quiz->settings;\n $settings['addUserPicInResults'] = true;\n $settings['userPicSize'] = 50;\n $settings['userPicXPos'] = 100;\n $settings['userPicYPos'] = 100;\n $result->quiz->settings = json_encode($settings);\n\n $resultImageGenerator = new ResultImageGenerator($result);\n return $resultImageGenerator;\n }", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\t\t\t\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Specials products';\r\n }\r\n $response = Configuration::updateValue('FIELD_SPECIALPLS_NBR', 6);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_VERTICAL', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MAXITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MEDIUMITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLLDELAY', 4000);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_NAVIGATION', 0);\r\n\r\n return $response;\r\n }", "private function returnConfig(){\n\t\techo '<reply action=\"ok\">';\n\t\techo $this->data->asXML();\n\t\techo '</reply>';\n\t}", "public function serverresultAction()\n {\n $boError = false;\n $model = Mage::getModel('paymentsensegateway/direct');\n $checkout = Mage::getSingleton('checkout/type_onepage');\n $szOrderID = $this->getRequest()->getPost('OrderID');\n $szMessage = $this->getRequest()->getPost('Message');\n $nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\n \n try\n {\n // finish off the transaction: if StatusCode = 0 create an order otherwise do nothing\n $checkout->saveOrderAfterRedirectedPaymentAction(true,\n $this->getRequest()->getPost('StatusCode'),\n $szMessage,\n $this->getRequest()->getPost('PreviousStatusCode'),\n $this->getRequest()->getPost('PreviousMessage'),\n $this->getRequest()->getPost('OrderID'),\n $this->getRequest()->getPost('CrossReference'));\n }\n catch (Exception $exc)\n {\n $boError = true;\n $szErrorMessage = $exc->getMessage();\n $szNotificationMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_183;\n Mage::logException($exc);\n }\n \n if($boError == true)\n {\n $this->getResponse()->setBody('StatusCode=30&Message='.$szErrorMessage);\n }\n else\n {\n $order = Mage::getModel('sales/order');\n $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n // set the quote as inactive after back from paypal\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n\n // send confirmation email to customer\n if($order->getId())\n {\n $order->sendNewOrderEmail();\n }\n \n // if the payment was successful clear the session so that if the customer navigates back to the Magento store\n // the shopping cart will be emptied rather than 'uncomplete'\n if($this->getRequest()->getPost('StatusCode') == '0')\n {\n Mage::getSingleton('checkout/session')->clear();\n \n if($nVersion >= 1410)\n {\n if($nVersion < 1600)\n {\n $model->subtractOrderedItemsFromStock($order);\n }\n $this->_updateInvoices($order, $szMessage);\n }\n }\n \n $this->getResponse()->setBody('StatusCode=0');\n }\n }", "protected function generateConfiguration()\n {\n if (!in_array($this->format, array('yml', 'xml', 'php'))) {\n return;\n }\n\n $target = sprintf(\n '%s/Resources/config/routing/%s.%s',\n $this->bundle->getPath(),\n strtolower(str_replace('\\\\', '_', $this->entity)),\n $this->format\n );\n\n $this->renderFile('rest/config/routing.'.$this->format.'.twig', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n ));\n }", "function redfish_generic_apply_conf($configuration)\n{\n global $sdid;\n global $sms_sd_ctx;\n global $sendexpect_result;\n global $apply_errors;\n global $operation;\n global $SD;\n global $SMS_RETURN_BUF;\n \n // Save the configuration applied on the router\n save_result_file($configuration, 'conf.applied');\n $SMS_OUTPUT_BUF = '';\n \n $line = get_one_line($configuration);\n while ($line !== false)\n {\n \t$line = trim($line);\n \t\n \tif (!empty($line))\n \t{\n \t\t$res = sendexpectone(__FILE__ . ':' . __LINE__, $sms_sd_ctx, $line, '');\n \t\t\n \t\t$SMS_RETURN_BUF = json_encode($res);\n \t}\n \t$line = get_one_line($configuration);\n }\n \n return SMS_OK;\n}", "protected function getResultHandler()\n {\n return new GetRecommendationResultHandler();\n }", "abstract function options();", "private function getConjoinedResult(): void\n {\n $tot_match = 0;\n $tot_indecisive = 0;\n $tot_no_match = 0;\n $matches = $this->getNeedlesResult();\n foreach ($matches as $n_key => $match) {\n if (isset($match['matching_filters'])) {\n $match[$this->config->prefix . 'filter_match_count'] = count($match['matching_filters']);\n } else {\n $match[$this->config->prefix . 'filter_match_count'] = 0;\n }\n if ($match[$this->config->prefix . 'filter_match_count'] === 1) {\n $tot_match++;\n $match = $this->getReturnValues($match);\n $match = $this->getLayerData($match);\n unset($match['matching_filters']);\n } elseif ($match[$this->config->prefix . 'filter_match_count'] > 1) {\n unset($match['matching_filters']);\n $tot_indecisive++;\n } else {\n $tot_no_match++;\n }\n $this->SearchResult->matches[$n_key] = $match;\n }\n $this->SearchResult->total_matches = $tot_match;\n $this->SearchResult->total_indecisive_matches = $tot_indecisive;\n $this->SearchResult->total_no_matches = $tot_no_match;\n }", "public function configureOptions();", "protected function run(Config $config): ResultInterface\n {\n $groups = (array) $config->get('groups');\n\n // TODO: Test me!\n $results = array_map(function (array $group): ResultInterface {\n $code = (int) $group['code'] ?? 200;\n\n $this->validator->setExpectedStatusCode($code);\n\n $urls = array_map(function (string $path): string {\n return home_url($path);\n }, $group['paths'] ?? []);\n\n return $this->validator->validate(...$urls);\n }, $groups);\n\n // TODO: Method to merge results? Or, allow returning multiple results?\n // Assume successful results don't have messages .\n $messages = array_map(function (ResultInterface $result): array {\n return $result->getMessages();\n }, $results);\n\n switch (count($messages)) {\n case 0:\n $messages = [];\n break;\n case 1:\n $messages = $messages[0];\n break;\n default:\n $messages = array_merge(...$messages);\n }\n\n $messages = array_filter($messages);\n\n if (! empty($messages)) {\n return ResultFactory::makeFailure(\n $this,\n array_merge(['***** Experimental *****', 'Something went wrong:'], $messages)\n );\n }\n\n return ResultFactory::makeSuccess($this);\n }", "public function negotiateResponseContent(string $type, IRequest $request): ContentNegotiationResult;", "public function setupOptions()\n {\n $action = new Action('generate', 'Generate fake data');\n //output adapter\n $option = new Option('o', 'output', 'Specify output adapter. Available outputs: db.[orm|odm], file.[csv|json|xml]');\n $option->setRequired(true);\n $action->addOption($option);\n\n $option = new Option('d', 'dest', 'Specify the destination point. It might be a file, or database collection or table');\n $option->setRequired(true);\n $action->addOption($option);\n\n //data specification\n $option = new Option('s', 'spec', 'Specify the file path containing data specification in JSON format');\n $option->setRequired(true);\n $action->addOption($option);\n\n //count of data\n $option = new Option('c', 'count', 'Specify the count of data to generate');\n $option->setRequired(true);\n $action->addOption($option);\n\n $this->addTaskAction($action);\n }", "public function generate() {\n try {\n /* syntax check */\n chkRequredKey($this->prm->getConf());\n chkRotDest($this->prm->getConf());\n \n /* generate routing file */\n genFunc($this->prm->getOutput());\n genRoute(\n $this->prm->getOutput(),\n $this->prm->getConf()\n );\n \n } catch (\\Exception $e) {\n throw $e;\n }\n }", "private function setupDefaults() {\n $defaults = array(\n // Indicates to the system the set of fields that will be included in the response: 3.0 is the default version. 3.1 \n // allows the merchant to utilize the Card Code feature, and is the current standard version.\n 'x_version'=>'3.1', \n \n // In order to receive a delimited response from the payment gateway, this field must be submitted with a value\n // of TRUE or the merchant has to configure a delimited response through the Merchant Interface. \n 'x_delim_data'=>'TRUE',\n \n // The character that is used to separate fields in the transaction response. The payment gateway will use the\n // character passed in this field or the value stored in the Merchant Interface if no value is passed. If this field is passed,\n // and the value is null, it will override the value stored in the Merchant Interface and there is no delimiting character in the transaction response.\n // A single symbol Ex. , (comma) | (pipe) \" (double quotes) ' (single quote) : (colon) ; (semicolon) / (forward slash) \\ (back slash) - (dash) * (star)\n 'x_delim_char'=>$this->responseDelimeter,\n \n // SIM applications use relay response. Set this to false if you are using AIM.\n 'x_relay_response'=>'FALSE',\n \n // IP address of the customer initiating the transaction. If this value is not passed, it will default to 255.255.255.255.\n 'x_customer_ip'=>$_SERVER['REMOTE_ADDR'],\n );\n $this->NVP = array_merge($this->NVP, $defaults); \n }", "function result()\n\t\t{\n\t\t\t//generate first number\n\t\t\t$number1 = new Operand(10,50);\n\t\t\t$number1->generate_number();\n\n\t\t\t//generate second number\n\t\t\t$number2 = new Operand(10,50);\n\t\t\t$number2->generate_number();\n\t\t\t\n\t\t\t//generate operator\n\t\t\t$operator = new Operator('+-*');\n\t\t\t$operator->generate_operator();\n\t\t\t\n\t\t\t//calculate result\n\t\t\t$a= $number1->number;\n\t\t\t$b= $operator->Operator;\n\t\t\t$c= $number2->number;\n\t\t\tif ($b=='+')\n\t\t\t{\n\t\t\t\t$d= $a + $c;\n\t\t\t}\n\t\t\tif ($b=='-')\n\t\t\t{\n\t\t\t\t$d= $a - $c;\n\t\t\t}\n\t\t\tif ($b=='*')\n\t\t\t{\n\t\t\t\t$d= $a * $c;\n\t\t\t}\n\t\n\t\t\t$this->expression =$a.$b.$c;\n\t\t\t$this->security_code=$d;\n\t\t\t$this->a = $a;\n\t\t\t$this->b = $b;\n\t\t\t$this->c = $c;\n\t\t}", "public function process()\n {\n // Check for required fields\n if (in_array(false, $this->required_fields)) {\n $fields = array();\n foreach ($this->required_fields as $key => $field) {\n if (!$field) {\n $fields[] = $key;\n }\n }\n throw new Kohana_Exception('payment.required', implode(', ', $fields));\n }\n\n $fields = '';\n foreach ($this->authnet_values as $key => $value) {\n $fields .= $key.'='.urlencode($value).'&';\n }\n\n $post_url = ($this->test_mode) ?\n 'https://certification.authorize.net/gateway/transact.dll' : // Test mode URL\n 'https://secure.authorize.net/gateway/transact.dll'; // Live URL\n\n $ch = curl_init($post_url);\n\n // Set custom curl options\n curl_setopt_array($ch, $this->curl_config);\n\n // Set the curl POST fields\n curl_setopt($ch, CURLOPT_POSTFIELDS, rtrim($fields, '& '));\n\n //execute post and get results\n $response = curl_exec($ch);\n \n curl_close($ch);\n \n if (!$response) {\n throw new Kohana_Exception('payment.gateway_connection_error');\n }\n\n // This could probably be done better, but it's taken right from the Authorize.net manual\n // Need testing to opimize probably\n $heading = substr_count($response, '|');\n\n for ($i=1; $i <= $heading; $i++) {\n $delimiter_position = strpos($response, '|');\n\n if ($delimiter_position !== false) {\n $response_code = substr($response, 0, $delimiter_position);\n \n $response_code = rtrim($response_code, '|');\n \n if ($response_code == '') {\n throw new Kohana_Exception('payment.gateway_connection_error');\n }\n\n switch ($i) {\n case 1:\n $this->response = (($response_code == '1') ? explode('|', $response) : false); // Approved\n\n $this->transaction = true;\n \n return $this->transaction;\n default:\n $this->transaction = false;\n \n return $this->transaction;\n }\n }\n }\n }", "public function getEntityParserOutputGenerator( ParserOptions $options ) {\n\t\t$language = $options->getUserLangObj();\n\n\t\treturn new EntityParserOutputGenerator(\n\t\t\t$this->entityViewFactory,\n\t\t\t$this->newParserOutputJsConfigBuilder(),\n\t\t\t$this->entityTitleLookup,\n\t\t\t$this->entityInfoBuilderFactory,\n\t\t\t$this->getLanguageFallbackChain( $language ),\n\t\t\t$this->templateFactory,\n\t\t\t$this->entityDataFormatProvider,\n\t\t\t$this->getDataUpdaters(),\n\t\t\t$language->getCode()\n\t\t);\n\t}", "function result()\n\t\t{\n\t\t\t//generate first number\n\t\t\t$number1 = new Operand(1,10);\n\t\t\t$number1->generate_number();\n\t\t\t\n\t\t\t//generate second number\n\t\t\t$number2 = new Operand(1,10);\n\t\t\t$number2->generate_number();\n\t\t\t\n\t\t\t//generate third number\n\t\t\t$number3 = new Operand(1,10);\n\t\t\t$number3->generate_number();\n\t\t\t\n\t\t\t//generate first operator\n\t\t\t$operator1 = new Operator('+-*');\n\t\t\t$operator1->generate_operator();\n\t\t\t\n\t\t\t//generate second operator\n\t\t\t$operator2= new Operator('+-*');\n\t\t\t$operator2->generate_operator();\n\t\t\t\n\t\t\t//calculate result\n\t\t\t$a= $number1->number;\n\t\t\t$b= $operator1->Operator;\n\t\t\t$c= $number2->number;\n\t\t\t$d= $operator2->Operator;\n\t\t\t$e= $number3->number;\n\t\t\tif ($b=='+')\n\t\t\t{\n\t\t\t\t$temp= $a + $c;\n\t\t\t}\n\t\t\tif ($b=='-')\n\t\t\t{\n\t\t\t\t$temp= $a - $c;\n\t\t\t}\n\t\t\tif ($b=='*')\n\t\t\t{\n\t\t\t\t$temp= $a * $c;\n\t\t\t}\n\n\t\t\tif ($d=='+')\n\t\t\t{\n\t\t\t\t$result= $temp + $e;\n\t\t\t}\n\t\t\tif ($d=='-')\n\t\t\t{\n\t\t\t\t$result= $temp - $e;\n\t\t\t}\n\t\t\tif ($d=='*')\n\t\t\t{\n\t\t\t\t$result= $temp * $e;\n\t\t\t}\n\t\t\t\n\t\t\t$this->expression =$a.$b.$c.$d.$e;\n\t\t\t$this->security_code=$result;\n\t\t\t$this->a = $a;\n\t\t\t$this->b = $b;\n\t\t\t$this->c = $c;\n\t\t\t$this->d = $d;\n\t\t\t$this->e = $e;\n\t\t}", "function result()\n\t\t{\t\n\t\t\t//generate first number\n\t\t\t$number1 = new Operand(1,10);\n\t\t\t$number1->generate_number();\n\n\t\t\t//generate second number\t\n\t\t\t$number2 = new Operand(1,10);\n\t\t\t$number2->generate_number();\n\t\n\t\t\t//generate operator\n\t\t\t$operator = new Operator('+-');\n\t\t\t$operator->generate_operator();\n\t\t\t\n\t\t\t//calculate result\n\t\t\t$a= $number1->number;\n\t\t\t$b= $operator->Operator;\n\t\t\t$c= $number2->number;\n\t\t\tif ($b=='+')\n\t\t\t{\n\t\t\t\t$d= $a + $c;\n\t\t\t}\n\t\t\tif ($b=='-')\n\t\t\t{\n\t\t\t\t$d= $a - $c;\n\t\t\t}\n\t\t\t\n\t\t\t$this->expression =$a.$b.$c;\n\t\t\t$this->security_code=$d;\n\t\t\t$this->a = $a;\n\t\t\t$this->b = $b;\n\t\t\t$this->c = $c;\n\t\t}", "protected function generateReturnXML($result = 0){\r\n if ($result == 1) {\r\n $this->return_code = 'SUCCESS';\r\n }\r\n if ($result == 0) {\r\n $this->return_code = 'FAIL';\r\n }\r\n \r\n //init\r\n $this->safeKeys = ['return_code', 'return_msg'];\r\n $this->feedback_return_xml = $this->ToXml();\r\n \r\n echo $this->feedback_return_xml;\r\n exit;\r\n }", "abstract public function get_frontend_gateway_options();", "protected function prepare_response()\n\t{\n\t\t$rules_code = get_optional_param('rules_code');\n\t\t$game_id = (int)get_optional_param('game_id');\n\t\t$event_id = (int)get_optional_param('event_id');\n\t\t$tournament_id = (int)get_optional_param('tournament_id');\n\t\t$club_id = (int)get_optional_param('club_id');\n\t\t$page_size = (int)get_optional_param('page_size', API_DEFAULT_PAGE_SIZE);\n\t\t$page = (int)get_optional_param('page');\n\t\t$detailed = isset($_REQUEST['detailed']) || (isset($_REQUEST['lod']) && $_REQUEST['lod'] > 0);\n\t\t\n\t\tif (!is_valid_rules_code($rules_code))\n\t\t{\n\t\t\tif ($game_id > 0)\n\t\t\t{\n\t\t\t\tlist($rules_code) = Db::record('rules', 'SELECT rules FROM games WHERE id = ?', $game_id);\n\t\t\t}\n\t\t\telse if ($event_id > 0)\n\t\t\t{\n\t\t\t\tlist($rules_code) = Db::record('rules', 'SELECT rules FROM events WHERE id = ?', $event_id);\n\t\t\t}\n\t\t\telse if ($tournament_id > 0)\n\t\t\t{\n\t\t\t\tlist($rules_code) = Db::record('rules', 'SELECT rules FROM tournaments WHERE id = ?', $tournament_id);\n\t\t\t}\n\t\t\telse if ($club_id > 0)\n\t\t\t{\n\t\t\t\tlist($rules_code) = Db::record('rules', 'SELECT rules FROM clubs WHERE id = ?', $club_id);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exc(get_label('Unknown [0]', get_label('rules')));\n\t\t\t}\n\t\t}\n\t\t$this->response['rules'] = rules_code_to_object($rules_code, $detailed);\n\t}", "public function generate() {\n\n // Loop through all defined API configurations and make Client APIs where applicable\n $configurations = APIConfiguration::getAPIConfigs();\n\n\n foreach ($configurations as $configuration) {\n\n if ($configuration->getGeneratedClients()) {\n $this->generateAPI($configuration);\n }\n\n }\n\n }", "private function createCommandLineOptions()\n {\n // PS: Available webp options for imagemagick are documented here:\n // https://imagemagick.org/script/webp.php\n\n $commandArguments = [];\n if ($this->isQualityDetectionRequiredButFailing()) {\n // quality:auto was specified, but could not be determined.\n // we cannot apply the max-quality logic, but we can provide auto quality\n // simply by not specifying the quality option.\n } else {\n $commandArguments[] = '-quality ' . escapeshellarg($this->getCalculatedQuality());\n }\n if ($this->options['encoding'] == 'lossless') {\n $commandArguments[] = '-define webp:lossless=true';\n }\n if ($this->options['low-memory']) {\n $commandArguments[] = '-define webp:low-memory=true';\n }\n if ($this->options['auto-filter'] === true) {\n $commandArguments[] = '-define webp:auto-filter=true';\n }\n if ($this->options['metadata'] == 'none') {\n $commandArguments[] = '-strip';\n }\n if ($this->options['alpha-quality'] !== 100) {\n $commandArguments[] = '-define webp:alpha-quality=' . strval($this->options['alpha-quality']);\n }\n\n // Unfortunately, near-lossless does not seem to be supported.\n // it does have a \"preprocessing\" option, which may be doing something similar\n\n $commandArguments[] = '-define webp:method=' . $this->options['method'];\n\n $commandArguments[] = escapeshellarg($this->source);\n $commandArguments[] = escapeshellarg('webp:' . $this->destination);\n\n return implode(' ', $commandArguments);\n }", "public function get_response($options = array('json' => false) ) {\n\n\t\t/* collect the response in an array ... */\n\t\t$return = array();\n\t\t\n\t\t/* access the prepared model response by the main controllers ($this->read, $this->create, ...) */\n\t\t$return = $this->parsed_model_response;\n\t\t\t\t\t\n\t\t/* add errors to the response if we have any */\n\t\tif($this->get_errors())\n\t\t\t$return = $this->get_errors();\t\n\t\t\n\t\t/* when debug is on send the whole instance */\n\t\tif($this->debugger) {\n\t\t\techo (print_r($this));\n\t\t\tdie(); \t\n\t\t}\n\t\t\n\t\t/* allow a filter to change or add stuff to the response */\n\t\t$return = $this->filter_response($return);\n\t\t\n\t\t/* get through the output options */\n\t\tif($options['json']) \n\t\t\treturn json_encode($return);\n\t\telse \n\t\t\treturn $return;\n\t}", "public function generate()\n {\n $soapClientOptions = $this->getSoapClientOptions();\n $config = $this->getGeneratorConfig($soapClientOptions);\n $generator = $this->getGenerator();\n $generator->generate($config);\n }", "public function generateResponse(){\n\n switch ($this->requestMethod) {\n\n case 'GET':\n if(isset($this->topicId)){\n\n $response = $this->getTopicById($this->topicId);\n\n }else{\n\n $response = $this->getAllTopic();\n \n } \n \n break;\n\n case 'POST':\n\n $response = $this->createTopic();\n \n break;\n \n case 'PUT':\n\n if($this->userAction === \"update_topic\"){\n $response = $this->updateTopic($this->topicId);\n }else{\n\n $response = $this->notFoundResponse();\n }\n \n break;\n\n case 'DELETE':\n if($this->userAction == \"delete_topic_info\"){\n $response = self::deleteUser($this->topicId);\n } \n \n break;\n \n default:\n $response = $this->invalidRoute();\n break;\n }\n \n echo $response['body'];\n\n }", "private function negotiateTelnetOptions(){\r\n\t\t\r\n\t\t$c = $this->getc();\r\n\t\r\n\t\tif ($c != $this->IAC){\r\n\t\t\t\r\n\t\t\tif (($c == $this->DO) || ($c == $this->DONT)){\r\n\t\t\t\t\r\n\t\t\t\t$opt = $this->getc();\r\n\t\t\t\tfwrite($this->socket, $this->IAC . $this->WONT . $opt);\r\n\t\t\t\t\r\n\t\t\t} else if (($c == $this->WILL) || ($c == $this->WONT)) {\r\n\t\t\t\t\r\n\t\t\t\t$opt = $this->getc(); \r\n\t\t\t\tfwrite($this->socket, $this->IAC . $this->DONT . $opt);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception('Error: unknown control character ' . ord($c ));\r\n\t\t\t}\r\n\t\t} else{\r\n\t\t\tthrow new Exception('Error: Something Wicked Happened');\r\n\t\t}\r\n\t\t\r\n\t\treturn self::TELNET_OK;\r\n\t}", "protected function createResultObject() {\n\t\t$result = new Result();\n\t\treturn $result;\n\t}", "abstract public function get_backend_gateway_options();", "public function execute() : ChallengeResponse {\n return $this->request($this->buildUrl());\n }", "function invoke($options)\n {\n $invoke_result = $this->_api->doRequest('POST', $this->getBaseApiPath() . '/invoke', $options);\n \n if ($invoke_result['sent_messages'])\n {\n $sent_messages = array();\n foreach ($invoke_result['sent_messages'] as $sent_message_data)\n {\n $sent_messages[] = new Telerivet_Message($this->api, $sent_message_data);\n }\n $invoke_result['sent_messages'] = $sent_messages;\n } \n return $invoke_result;\n }", "public function route(array $acceptedMediaTypes) : string\n {\n foreach ($acceptedMediaTypes as $mediaType) {\n foreach ($this->rules as $rule) {\n $rule->setMediaType($mediaType);\n\n if ($rule->isMatch()) {\n return $rule->getOutputFormat();\n }\n }\n }\n\n throw new OutOfBoundsException(\n 'no output formats match the Accepted Media Types: ' . var_export($acceptedMediaTypes, true));\n }", "private function loadNextResult()\n {\n // Create the command\n $args = $this->args;\n $command = $this->client->getCommand($this->operation, $args);\n $this->attachListeners($command, $this->listeners);\n\n // Set the next token\n if ($this->nextToken) {\n $inputArg = $this->config['input_token'];\n if (is_array($this->nextToken) && is_array($inputArg)) {\n foreach ($inputArg as $index => $arg) {\n $command[$arg] = $this->nextToken[$index];\n }\n } else {\n $command[$inputArg] = $this->nextToken;\n }\n }\n\n // Get the next result\n $this->result = $this->client->execute($command);\n $this->requestCount++;\n $this->nextToken = null;\n\n // If there is no more_results to check or more_results is true\n if ($this->config['more_results'] === null\n || $this->result->search($this->config['more_results'])\n ) {\n // Get the next token's value\n if ($key = $this->config['output_token']) {\n if (is_array($key)) {\n $this->nextToken = $this->result->search(json_encode($key));\n $this->nextToken = array_filter($this->nextToken);\n } else {\n $this->nextToken = $this->result->search($key);\n }\n }\n }\n }", "private function createCommandLineOptions()\n {\n $options = $this->options;\n\n $cmdOptions = [];\n\n // Metadata (all, exif, icc, xmp or none (default))\n // Comma-separated list of existing metadata to copy from input to output\n $cmdOptions[] = '-metadata ' . $options['metadata'];\n\n // preset. Appears first in the list as recommended in the docs\n if (!is_null($options['preset'])) {\n if ($options['preset'] != 'none') {\n $cmdOptions[] = '-preset ' . $options['preset'];\n }\n }\n\n // Size\n $addedSizeOption = false;\n if (!is_null($options['size-in-percentage'])) {\n $sizeSource = filesize($this->source);\n if ($sizeSource !== false) {\n $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);\n $cmdOptions[] = '-size ' . $targetSize;\n $addedSizeOption = true;\n }\n }\n\n // quality\n if (!$addedSizeOption) {\n $cmdOptions[] = '-q ' . $this->getCalculatedQuality();\n }\n\n // alpha-quality\n if ($this->options['alpha-quality'] !== 100) {\n $cmdOptions[] = '-alpha_q ' . escapeshellarg($this->options['alpha-quality']);\n }\n\n // Losless PNG conversion\n if ($options['encoding'] == 'lossless') {\n // No need to add -lossless when near-lossless is used\n if ($options['near-lossless'] === 100) {\n $cmdOptions[] = '-lossless';\n }\n }\n\n // Near-lossles\n if ($options['near-lossless'] !== 100) {\n // We only let near_lossless have effect when encoding is set to \"lossless\"\n // otherwise encoding=auto would not work as expected\n if ($options['encoding'] == 'lossless') {\n $cmdOptions[] ='-near_lossless ' . $options['near-lossless'];\n }\n }\n\n if ($options['auto-filter'] === true) {\n $cmdOptions[] = '-af';\n }\n\n // Built-in method option\n $cmdOptions[] = '-m ' . strval($options['method']);\n\n // Built-in low memory option\n if ($options['low-memory']) {\n $cmdOptions[] = '-low_memory';\n }\n\n // command-line-options\n if ($options['command-line-options']) {\n array_push(\n $cmdOptions,\n ...self::escapeShellArgOnCommandLineOptions($options['command-line-options'])\n );\n }\n\n // Source file\n $cmdOptions[] = escapeshellarg($this->source);\n\n // Output\n $cmdOptions[] = '-o ' . escapeshellarg($this->destination);\n\n // Redirect stderr to same place as stdout\n // https://www.brianstorti.com/understanding-shell-script-idiom-redirect/\n $cmdOptions[] = '2>&1';\n\n $commandOptions = implode(' ', $cmdOptions);\n $this->logLn('command line options:' . $commandOptions);\n\n return $commandOptions;\n }", "protected function applyOptions()\n {\n return curl_setopt_array($this->res, $this->options);\n }", "private function getMatchesFromAcceptedLanguages()\n {\n $matches = [];\n\n if ($acceptLanguages = $this->request->header('Accept-Language')) {\n $acceptLanguages = explode(',', $acceptLanguages);\n\n $generic_matches = [];\n foreach ($acceptLanguages as $option) {\n $option = array_map('trim', explode(';', $option));\n $l = $option[0];\n if (isset($option[1])) {\n $q = (float) str_replace('q=', '', $option[1]);\n } else {\n $q = null;\n // Assign default low weight for generic values\n if ($l == '*/*') {\n $q = 0.01;\n } elseif (substr($l, -1) == '*') {\n $q = 0.02;\n }\n }\n // Unweighted values, get high weight by their position in the\n // list\n $q = $q ?? 1000 - \\count($matches);\n $matches[$l] = $q;\n\n //If for some reason the Accept-Language header only sends language with country\n //we should make the language without country an accepted option, with a value\n //less than it's parent.\n $l_ops = explode('-', $l);\n array_pop($l_ops);\n while (!empty($l_ops)) {\n //The new generic option needs to be slightly less important than it's base\n $q -= 0.001;\n $op = implode('-', $l_ops);\n if (empty($generic_matches[$op]) || $generic_matches[$op] > $q) {\n $generic_matches[$op] = $q;\n }\n array_pop($l_ops);\n }\n }\n $matches = array_merge($generic_matches, $matches);\n\n arsort($matches, SORT_NUMERIC);\n }\n\n return $matches;\n }", "protected function handleResultRequest() {\n\t\t//no longer letting people in without these things. If this is\n\t\t//preventing you from doing something, you almost certainly want to be\n\t\t//somewhere else.\n\t\t$deadSession = false;\n\t\tif ( !$this->adapter->session_hasDonorData() ) {\n\t\t\t$deadSession = true;\n\t\t}\n\t\t$oid = $this->adapter->getData_Unstaged_Escaped( 'order_id' );\n\n\t\t$request = $this->getRequest();\n\t\t$referrer = $request->getHeader( 'referer' );\n\t\t$liberated = false;\n\t\tif ( $this->adapter->session_getData( 'order_status', $oid ) === 'liberated' ) {\n\t\t\t$liberated = true;\n\t\t}\n\n\t\t// XXX need to know whether we were in an iframe or not.\n\t\tglobal $wgServer;\n\t\tif ( $this->isReturnFramed() && ( strpos( $referrer, $wgServer ) === false ) && !$liberated ) {\n\t\t\t$sessionOrderStatus = $request->getSessionData( 'order_status' );\n\t\t\t$sessionOrderStatus[$oid] = 'liberated';\n\t\t\t$request->setSessionData( 'order_status', $sessionOrderStatus );\n\t\t\t$this->logger->info( \"Resultswitcher: Popping out of iframe for Order ID \" . $oid );\n\t\t\t$this->getOutput()->allowClickjacking();\n\t\t\t$this->getOutput()->addModules( 'iframe.liberator' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->setHeaders();\n\n\t\tif ( $deadSession ){\n\t\t\tif ( $this->adapter->isReturnProcessingRequired() ) {\n\t\t\t\twfHttpError( 403, 'Forbidden', wfMessage( 'donate_interface-error-http-403' )->text() );\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t'Resultswitcher: Request forbidden. No active donation in the session. ' .\n\t\t\t\t\t\"Adapter Order ID: $oid\"\n\t\t\t\t);\n\t\t\t}\n\t\t\t// If it's possible for a donation to go through without our\n\t\t\t// having to do additional processing in the result switcher,\n\t\t\t// we don't want to falsely claim it failed just because we\n\t\t\t// lost the session data. We also don't want to give any\n\t\t\t// information to scammers hitting this page with no session,\n\t\t\t// so we always show the thank you page. We don't want to do\n\t\t\t// any post-processing if we're not sure whether we actually\n\t\t\t// originated this attempt, so we return right after.\n\t\t\t$this->logger->warning(\n\t\t\t\t'Resultswitcher: session is dead, but the ' .\n\t\t\t\t'donor may have made a successful payment.'\n\t\t\t);\n\t\t\t$this->displayThankYouPage( 'dead session' );\n\t\t\treturn;\n\t\t}\n\t\t$this->logger->info( \"Resultswitcher: OK to process Order ID: \" . $oid );\n\n\t\tif ( $this->adapter->checkTokens() ) {\n\t\t\t$this->getOutput()->allowClickjacking();\n\t\t\t// FIXME: do we really need this again?\n\t\t\t$this->getOutput()->addModules( 'iframe.liberator' );\n\t\t\t// processResponse expects some data, so let's feed it all the\n\t\t\t// GET and POST vars\n\t\t\t$response = $this->getRequest()->getValues();\n\t\t\t// TODO: run the whole set of getResponseStatus, getResponseErrors\n\t\t\t// and getResponseData first. Maybe do_transaction with a\n\t\t\t// communication_type of 'incoming' and a way to provide the\n\t\t\t// adapter the GET/POST params harvested here.\n\t\t\t$this->adapter->processResponse( $response );\n\t\t\t$status = $this->adapter->getFinalStatus();\n\t\t\tswitch ( $status ) {\n\t\t\tcase FinalStatus::COMPLETE:\n\t\t\tcase FinalStatus::PENDING:\n\t\t\t\t$this->displayThankYouPage( $status );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$this->logger->info( \"Displaying fail page for final status $status\" );\n\t\t} else {\n\t\t\t$this->logger->error( \"Resultswitcher: Token Check Failed. Order ID: $oid\" );\n\t\t}\n\t\t$this->displayFailPage();\n\t}", "public function generate()\n {\n $responses = array();\n\n foreach ($this->routes as $name => $dataSource) {\n $responses = array_merge($responses, $this->generateForRoute($name, $dataSource));\n }\n\n return $responses;\n }", "private function getConfig() {\r\n\t\techo '<reply action=\"ok\">';\r\n\t\techo $this->data->asXML();\r\n\t\techo '</reply>';\r\n\t}", "public function process(){\n \n // Grab config chunk name\n $chunkName =& $this->getProperty('chunk','');\n if(!strlen($chunkName)){\n return $this->failure('No config chunk specified');\n };\n\n // Load config\n if(!$conf = $this->modx->grideditor->loadConfigChunk($chunkName)){\n return $this->failure('Invalid config chunk');\n };\n \n // Grab all resources that match the template filters\n $c = $this->modx->grideditor->get_xPDOQuery($conf);\n $resources = $this->modx->getCollection('modResource',$c);\n $filterField = $conf->filter->field;\n\n\n // Grab the field info\n if(!$field = $conf->fields[$filterField]){\n\n // Try for tv thingy\n $safeName = str_replace(array('-','.'),'_',$filterField);\n if(!$field = $conf->fields[$safeName]){\n return $this->failure(\"Invalid filter field\");\n }\n }\n\n // Grab the filter field\n $isTV = ($field->type == 'tv');\n\n // Grab the field specified from each resource\n $values = array(array('name' => $conf->filter->label, 'value'=>''));\n foreach($resources as $res){\n if($isTV){\n $val = $res->getTVValue($field->field);\n } else {\n $val = $res->get($filterField);\n };\n if(! in_array_r($val,$values) && !empty($val)){\n $values[] = array(\n 'name' => $val,\n 'value'=> $val\n );\n };\n };\n \n return $this->outputArray($values); \n }", "public function configure($options);", "public function run()\n {\n// Options are settings\n\n if ($this->command) $this->command->info('Creating Option Settings');\n\n\n $options_array = array(\n [\n 'key' => 'Landing Title',\n 'default' => \"What is trending in Kenya.\",\n 'value_type' =>Option::TYPE_STR\n ],\n [\n 'key' => 'Landing Description',\n 'default' => \"Getting all the news that are trending in Kenya.\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Contact Title',\n 'default' => \"Talk to us.\",\n 'value_type' =>Option::TYPE_STR\n ],\n [\n 'key' => 'Contact Description',\n 'default' => \"Find our contact information and contact form.\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Footer Title',\n 'default' => \"Welcome to Inatrend Kenya\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Footer Description',\n 'default' => \"\n <p>\n <small>We are here to get you the latest that is trending in Kenya.</small>\n </p>\n <div class=\\\"social-list\\\">\n <a class=\\\"social-list-item\\\" href=\\\"http://twitter.com\\\">\n <span class=\\\"icon icon-twitter\\\"></span>\n </a>\n <a class=\\\"social-list-item\\\" href=\\\"http://facebook.com\\\">\n <span class=\\\"icon icon-facebook\\\"></span>\n </a>\n <a class=\\\"social-list-item\\\" href=\\\"http://linkedin.com\\\">\n <span class=\\\"icon icon-linkedin\\\"></span>\n </a>\n </div>\n \",\n 'value_type' =>Option::TYPE_LON\n ],\n\n [\n 'key' => 'Latest Post Count',\n 'default' => 4,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Trending Post Count',\n 'default' => 4,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Trending Days Limit',\n 'default' => 30,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Limit Latest Post Per Category',\n 'default' => 6,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Primary Color',\n 'default' => '#56c8f3',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Primary Text Color',\n 'default' => '#111111',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Color',\n 'default' => '#0D325B',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Text Color',\n 'default' => '#EEEEEE',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Primary Button Color',\n 'default' => '#029ACF',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Button Color',\n 'default' => '#0D325B',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Danger Button Color',\n 'default' => '#ff0000',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Maximum Rating',\n 'default' => 10,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Default Font Size',\n 'default' => 16,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n );\n\n foreach ($options_array as $option) {\n Option::create([\n 'key' => $option['key'],\n 'default' => $option['default'],\n 'value_type' =>$option['value_type']\n ]);\n }\n }", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function getResult();", "public function execute()\n {\n if (!empty($_GET[\"responseid\"]) && !empty($_GET[\"requestid\"])) {\n $order_id = base64_decode($_GET[\"requestid\"]);\n $response_id = base64_decode($_GET[\"responseid\"]);\n\n $mode = $this->_paymentMethod->getMerchantConfig('modes');\n\n if ($mode == 'Test') {\n $mid = $this->_paymentMethod->getMerchantConfig('test_mid');\n $mkey = $this->_paymentMethod->getMerchantConfig('test_mkey');\n $client = new SoapClient(\"https://testpti.payserv.net/Paygate/ccservice.asmx?WSDL\");\n } elseif ($mode == 'Live') {\n $mid = $this->_paymentMethod->getMerchantConfig('live_mid');\n $mkey = $this->_paymentMethod->getMerchantConfig('live_mkey');\n $client = new SoapClient(\"https://ptipaygate.paynamics.net/ccservice/ccservice.asmx?WSDL\");\n }\n\n $request_id = '';\n $length = 8;\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $request_id .= $characters[rand(0, $charactersLength - 1)];\n }\n\n $merchantid = $mid;\n $requestid = $request_id;\n $org_trxid = $response_id;\n $org_trxid2 = \"\";\n $cert = $mkey;\n $data = $merchantid . $requestid . $org_trxid . $org_trxid2;\n $data = utf8_encode($data . $cert);\n\n // create signature\n $sign = hash(\"sha512\", $data);\n\n $params = array(\"merchantid\" => $merchantid,\n \"request_id\" => $requestid,\n \"org_trxid\" => $org_trxid,\n \"org_trxid2\" => $org_trxid2,\n \"signature\" => $sign);\n\n $result = $client->query($params);\n $response_code = $result->queryResult->txns->ServiceResponse->responseStatus->response_code;\n $response_message = $result->queryResult->txns->ServiceResponse->responseStatus->response_message;\n\n switch ($response_code) {\n case 'GR001':\n case 'GR002':\n case 'GR033':\n $this->getResponse()->setRedirect(\n $this->_getUrl('checkout/onepage/success')\n );\n break;\n default:\n $this->messageManager->addErrorMessage(\n __($response_message)\n );\n /** @var \\Magento\\Framework\\Controller\\Result\\Redirect $resultRedirect */\n $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);\n return $resultRedirect->setPath('checkout/cart');\n break;\n }\n\n// $this->getResponse()->setRedirect(\n// $this->_getUrl('checkout/onepage/success')\n// );\n }\n }", "public function initResponse()\n {\n switch ( Config::$mobile_mode )\n {\n case 'send':\n return $this->sendMobile();\n break;\n\n default:\n return $this->viewDefault();\n break;\n }\n }", "function consume_with_options(Request $request, $key, $use, $options) {\r\n $api_links = phpsaaswrapper()->generate_api_use($key, $use);\r\n\r\n $responses = [];\r\n\r\n $this->client = new Client;\r\n\r\n $config = new Config;\r\n $templates = [];\r\n\r\n $options = explode('+', $options);\r\n $sorted_options = [];\r\n for($i = 0; $i < count($options); $i++) {\r\n $option = $options[$i];\r\n\r\n $obj = explode('-', $option);\r\n\r\n $sorted_options[$obj[0]] = $obj[1];\r\n }\r\n\r\n foreach($api_links as $k => $v) {\r\n\r\n if(!array_key_exists($k, $templates)) {\r\n $res = $config->get('oauth.allows.' . $key . '.templates.' . $k);\r\n if(gettype($res) == 'string') {\r\n $templates[$k] = $res;\r\n } else {\r\n $templates[$k] = null;\r\n }\r\n }\r\n\r\n dd($v);\r\n\r\n $queries = explode('?', $v);\r\n if(count($queries) >= 1) {\r\n $ops = explode('&', $queries[1]);\r\n for($i = 0; $i < count($ops); $i++) {\r\n $o = $ops[$i];\r\n\r\n $obj = explode('=', $o);\r\n\r\n $sorted_options[$obj[0]] = $obj[1];\r\n }\r\n }\r\n\r\n $response = $this->client->request('GET', $v, [\r\n 'query' => $sorted_options,\r\n 'headers' => [\r\n 'accept' => '*/*',\r\n ]\r\n ])->getBody();\r\n\r\n if(!array_key_exists($k, $responses)) {\r\n $responses[$k] = [];\r\n }\r\n\r\n if(!array_key_exists('template', $responses)) {\r\n $responses[$k]['template'] = '';\r\n }\r\n\r\n if(!array_key_exists('response', $responses)) {\r\n $responses[$k]['response'] = '';\r\n }\r\n\r\n if(empty($templates[$k]) || is_null($templates[$k]) || view()->exists($templates[$k])) {\r\n $templates[$k] = null;\r\n }\r\n\r\n $responses[$k]['key'] = $key;\r\n $responses[$k]['template'] = $templates[$k];\r\n $responses[$k]['response'] = json_decode($response);\r\n }\r\n\r\n return view('consume', ['responses' => $responses, 'key' => $key, 'use' => $use]);\r\n }", "public function resultAction()\n {\n // Get the current request\n $request = $this->_board->getRequest($this->getRequest()->getParam('request_id', false));\n if (!$request) {\n return $this->_forward('noroute');\n }\n Mage::register('current_board_request', $request);\n\n // Validate (to be sure)\n $data = $this->getRequest()->getQuery();\n $errors = $request->init(new Varien_Object($data))->validate();\n if (count($errors)) {\n foreach ($errors as $error) {\n $this->_getSession()->addError($error);\n }\n return $this->_redirectReferer();\n }\n\n /*\n * Export as CSV\n */\n if ((bool) $data['export_flag']) {\n\n // Denied?\n if (!$request->canExport()) {\n return $this->_forward('denied');\n }\n\n $this->getResponse()\n ->setHttpResponseCode(200)\n ->setHeader('Pragma', 'public', true)\n ->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)\n ->setHeader('Content-type', $request->getExportMimeType(), true)\n //->setHeader('Content-Length', null, true)\n ->setHeader('Content-Disposition', 'attachment; filename=\"' . $request->getExportFilename() . '\"', true)\n ->setHeader('Last-Modified', date('r'), true)\n ->sendHeaders()\n ;\n\n try {\n $request->processExportAndDisplay();\n } catch (Exception $e) {\n Mage::getSingleton('core/session')->addError($e->getMessage());\n return $this->_redirectReferer();\n }\n exit;\n }\n\n /*\n * Display grid\n */\n // Denied?\n if (!$request->canViewResults()) {\n return $this->_forward('denied');\n }\n\n $this->loadLayout();\n $this->renderLayout();\n }", "function generateResults() {\n\n $location = './cia.xml';\n $xmlParse = simplexml_load_file($location);\n \n foreach ($xmlParse -> country as $item) {\n\n $totalPop = $item -> people -> population -> total;\n $birthRate = floatval($item -> people -> population -> birth);\n $deathRate = floatval($item -> people -> population -> death);\n $languages = strval($item -> people -> languages);\n\n if (($_GET['verpop'] >= $totalPop && $_GET['operator'] == '>') || $_GET['operator'] != '>') {\n if (($_GET['verpop'] <= $totalPop && $_GET['operator'] == '<') || $_GET['operator'] != '<') {\n if (($birthRate >= $deathRate && $_GET['less/greater'] == 'birth>') || $_GET['less/greater'] != 'birth>') {\n if (($birthRate <= $deathRate && $_GET['less/greater'] == 'death>') || $_GET['less/greater'] != 'death>') {\n if (str_contains($languages, ucfirst($_GET['lang']))) {\n\n /* Similar to the head when conditions are checked a table row is \n constructed with if statements checking what checkboxes were used */\n $htmlStr = \"<tr><td>{$item -> name}</td>\";\n if (isset($_GET['pop'])) {\n $htmlStr .= \"<td>{$totalPop}</td>\";\n }\n if (isset($_GET['birth'])) {\n $htmlStr .= \"<td>{$birthRate}</td>\";\n }\n if (isset($_GET['death'])) {\n $htmlStr .= \"<td>{$deathRate}</td>\";\n }\n $htmlStr .= '</tr>';\n print($htmlStr);\n }\n }\n }\n }\n }\n }\n }", "public function toXml() : string\n\t{\n\t\t//\tNote <AccountID> and <PassPhrase> are not enclosed in a\n\t\t//\t<CertifiedIntermediary> node, as the other requests are.\n\t\t//\tEnclosing credentials in a node was added later to other\n\t\t//\tmethods in the Label Server API and not backported.\n\t\t$ci = $this->getCertifiedIntermediary();\n\t\t$destinationAddress = $this->getDestinationAddress();\n\t\t$returnAddress = $this->getReturnAddress();\n\t\t\n\t\t$xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\";\n//\t\t<LabelRequest Test=\"YES|NO\" LabelType=\"enum string\" LabelSize=\"enum string\" ImageFormat=\"enum string\">';\n\t\t$xml .= '<LabelRequest';\n\t\tif($this->isTest()) {\n\t\t\t$xml .= ' Test=\"YES\"';\n\t\t}\n\t\tif($this->getUseCertifiedMailMail()) {\n\t\t\t$xml .= ' LabelType=\"CertifiedMail\"';\n\t\t}\n\t\tif($this->getUseDestinationConfirmMail()) {\n\t\t\t$xml .= ' LabelType=\"DestinationConfirm\"';\n\t\t}\n\t\tif(!$this->isLabelSizeDefault()) {\n\t\t\t$xml .= ' LabelSize=\"' . $this->getLabelSize() . '\"';\n\t\t}\n\t\tif(!$this->isImageFormatDefault()) {\n\t\t\t$xml .= ' ImageFormat=\"' . $this->getImageFormat() . '\"';\n\t\t}\n\t\t$xml .= '>';\n\t\t$xml .= '<RequesterID>' . htmlentities($this->getRequesterId()) . '</RequesterID>';\n\t\tif(!empty($ci->getToken())) {\t// Use Token\n\t\t\t$xml .= '<Token>' . htmlspecialchars($ci->getToken()) . '</Token>';\n\t\t} else {\t// Use credential set.\n\t\t\t$xml .= '<AccountID>' . htmlspecialchars($ci->getAccountId()) . '</AccountID>';\n\t\t\t$xml .= '<PassPhrase>' . htmlspecialchars($ci->getPassPhrase()) . '</PassPhrase>';\n\t\t}\n\t\t$xml .= '<MailClass>' . $this->mailClass . '</MailClass>';\t// no need to escape as actually enumerated value\n//\t\t$xml .= '<DateAdvance>int</DateAdvance>';\n\t\t$xml .= sprintf('<WeightOz>%.2f</WeightOz>', $this->getWeight());\n//\t\t$xml .= '<MailpieceShape>string</MailpieceShape>';\n//\t\t$xml .= '<Stealth>string</Stealth>';\n//\t\t$xml .= '<Services InsuredMail=\"string\" SignatureConfirmation=\"string\" />';\n//\t\t$xml .= '<Value>double</Value>';\n\t\t$xml .= '<PartnerCustomerID>UNUSED</PartnerCustomerID>';\n\t\t$xml .= '<PartnerTransactionID>' . htmlentities($this->getRequestId()) . '</PartnerTransactionID>';\n\t\tif($destinationAddress->getName()) {\n\t\t\t$xml .= '<ToName>' . $destinationAddress->getName() . '</ToName>';\n\t\t}\n\t\tif($destinationAddress->getCompany()) {\n\t\t\t$xml .= '<ToCompany>' . $destinationAddress->getCompany() . '</ToCompany>';\n\t\t}\n\t\t$xml .= '<ToAddress1>' . $destinationAddress->getAddressLine1() . '</ToAddress1>';\n\t\tif($destinationAddress->getAddressLine2()) {\n\t\t\t$xml .= '<ToAddress2>' . $destinationAddress->getAddressLine2() . '</ToAddress2>';\n\t\t}\n\t\tif('US' != $destinationAddress->getCountry()) {\n\t\t\t//\twe are not to use Address Line 3 or 4 with \"domestic\" labels \n\t\t\tif($destinationAddress->getAddressLine3()) {\n\t\t\t\t$xml .= '<ToAddress3>' . $destinationAddress->getAddressLine3() . '</ToAddress3>';\n\t\t\t}\n\t\t\tif($destinationAddress->getAddressLine4()) {\n\t\t\t\t$xml .= '<ToAddress4>' . $destinationAddress->getAddressLine4() . '</ToAddress4>';\n\t\t\t}\n\t\t}\n\t\t$xml .= '<ToCity>' . $destinationAddress->getCity() . '</ToCity>';\n\t\t$xml .= '<ToState>' . $destinationAddress->getState() . '</ToState>';\n\t\t$xml .= '<ToPostalCode>' . $destinationAddress->getPostalCode() . '</ToPostalCode>';\n\t\tif($destinationAddress->getDeliveryPoint()) {\n\t\t\t$xml .= '<ToDeliveryPoint>' . $destinationAddress->getDeliveryPoint() . '</ToDeliveryPoint>';\n\t\t}\n\t\tif($destinationAddress->getPhone()) {\n\t\t\t$xml .= '<ToPhone>' . $destinationAddress->getPhone() . '</ToPhone>';\n\t\t}\n\t\tif($destinationAddress->getEmail()) {\n\t\t\t$xml .= '<ToEMail>' . $destinationAddress->getEmail() . '</ToEMail>';\n\t\t}\n\t\tif($returnAddress->getCompany()) {\n\t\t\t$xml .= '<FromCompany>' . $returnAddress->getCompany() . '</FromCompany>';\n\t\t}\n\t\tif($returnAddress->getName()) {\n\t\t\t$xml .= '<FromName>' . $returnAddress->getName() . '</FromName>';\n\t\t}\n\t\t$xml .= '<ReturnAddress1>' . $returnAddress->getAddressLine1() . '</ReturnAddress1>';\n\t\tif($returnAddress->getAddressLine2()) {\n\t\t\t$xml .= '<ReturnAddress2>' . $returnAddress->getAddressLine2() . '</ReturnAddress2>';\n\t\t}\n//\t\twe are not to use Address Line 3 or 4 with \"domestic\" labels or internalional labels when a label subtype is supplied???\n//\t\tif('US' != $returnAddress->getCountry()) {\n//\t\t\tif($returnAddress->getAddressLine3()) {\n//\t\t\t\t$xml .= '<ReturnAddress3>' . $returnAddress->getAddressLine3() . '</ReturnAddress3>';\n//\t\t\t}\n//\t\t\tif($returnAddress->getAddressLine4()) {\n//\t\t\t\t$xml .= '<ReturnAddress4>' . $returnAddress->getAddressLine4() . '</ReturnAddress4>';\n//\t\t\t}\n//\t\t}\n\t\t$xml .= '<FromCity>' . $returnAddress->getCity() . '</FromCity>';\n\t\t$xml .= '<FromState>' . $returnAddress->getState() . '</FromState>';\n\t\t$xml .= '<FromPostalCode>' . $returnAddress->getPostalCode() . '</FromPostalCode>';\n\t\tif($returnAddress->getPhone()) {\n\t\t\t$xml .= '<FromPhone>' . $returnAddress->getPhone() . '</FromPhone>';\n\t\t}\n\t\tif($returnAddress->getEmail()) {\n\t\t\t$xml .= '<FromEMail>' . $returnAddress->getEmail() . '</FromEMail>';\n\t\t}\n//\t\t$xml .= '<ResponseOptions PostagePrice=\"string\"/>';\n\t\t$xml .= '</LabelRequest>';\n\t\t\n\t\treturn $xml;\n\t}", "function baseConvertorAlgo($n, $option) {\n\n\t\tswitch($option) {\n\t\t\t//Division based iterative (Euclid's Algorithm)\n\t\t\tcase 1:\n\t\t\t\twrite('You selected Base 10 to Base 2 Conversion');\n\t\t\t\t//starting the Decimal To Binary Conversion Algorithm\n\t\t\t\treturn decimalToBinary($n);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\twrite('You selected Base 2 to Base 10 Conversion');\n\t\t\t\t//starting the Binary To Decimal Conversion Algorithm\n\t\t\t\treturn binaryToDecimal($n);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\twrite('You selected Base 2 to Base 16 (HEX) Conversion');\n\t\t\t\t//starting the Decimal To HEX Conversion Algorithm\n\t\t\t\treturn decimalToHex($n);\n\t\t\t\tbreak;\t\t\n\t\t\tcase 4:\n\t\t\t\twrite('You selected Base 16 (HEX) to Base 2 Conversion');\n\t\t\t\t//starting the HEX To Decimal Conversion Algorithm\n\t\t\t\treturn hexToDecimal($n);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\n\t}", "public function getViewProvider()\n {\n return [\n [ // #0\n 'parameters' => [],\n 'expectedClass' => JsonView::class,\n ],\n [ // #1\n 'parameters' => ['format' => 'html'],\n 'expectedClass' => HtmlView::class,\n ],\n [ // #2\n 'parameters' => ['callback' => 'dave'],\n 'expectedClass' => JsonPView::class,\n ],\n [ // #3\n 'parameters' => ['format' => 'html'],\n 'expectedClass' => HtmlView::class,\n ],\n [ // #4\n 'parameters' => ['format' => 'html'],\n 'expectedClass' => HtmlView::class,\n 'accepts' => 'text/html',\n ],\n [ // #5\n 'parameters' => [],\n 'expectedClass' => JsonView::class,\n 'accepts' => 'application/json',\n ],\n [ // #6\n 'parameters' => [],\n 'expectedClass' => JsonView::class,\n 'accepts' => 'application/json,text/html',\n ],\n [ // #7\n 'parameters' => [],\n 'expectedClass' => HtmlView::class,\n 'accepts' => 'text/html,applicaton/json',\n 'view' => new \\Joindin\\Api\\View\\HtmlView(),\n // 'skip' => true // Currently we're not applying Accept correctly\n // Can @choult check what's the reason for the skip?\n ],\n [ // #8\n 'parameters' => ['format' => 'html'],\n 'expectedClass' => HtmlView::class,\n 'accepts' => 'applicaton/json,text/html',\n ],\n [ // #9\n 'parameters' => [],\n 'expectedClass' => false,\n 'accepts' => '',\n 'view' => new ApiView(),\n ],\n ];\n }", "public function serverpullresultAction()\n {\n $boError = false;\n $nStartIndex = false;\n //\n $szHashDigest = false;\n $szMerchantID = false;\n $szCrossReference = false;\n $szOrderID = false;\n //\n $nErrorNumber = false;\n $szErrorMessage = false;\n $model = Mage::getModel('paymentsensegateway/direct');\n $checkout = Mage::getSingleton('checkout/type_onepage');\n $szServerPullURL = $model->getConfigData('serverpullresultactionurl');\n $szMerchantID = $model->getConfigData('merchantid');\n $szPassword = $model->getConfigData('password');\n $hmHashMethod = $model->getConfigData('hashmethod');\n $szPreSharedKey = $model->getConfigData('presharedkey');\n $szURLVariableString = $this->getRequest()->getRequestUri();\n $nStartIndex = strpos($szURLVariableString, \"?\");\n $order = Mage::getModel('sales/order');\n $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());\n $nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\n \n if(!is_int($nStartIndex))\n {\n $szErrorMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_309;\n Mage::log(Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_309.\" Request URI: \".$szURLVariableString);\n }\n else\n {\n $szURLVariableString = substr($szURLVariableString, $nStartIndex + 1);\n $arFormVariables = PYS_PaymentFormHelper::getVariableCollectionFromString($szURLVariableString);\n \n if(!PYS_PaymentFormHelper::compareServerHashDigest($arFormVariables, $szPassword, $hmHashMethod, $szPreSharedKey))\n {\n // report an error message\n $szErrorMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_304;\n }\n else\n {\n $szOrderID = $arFormVariables[\"OrderID\"];\n $szCrossReference = $arFormVariables[\"CrossReference\"];\n $szPostFields = \"MerchantID=\".$szMerchantID.\"&Password=\".$szPassword.\"&CrossReference=\".$szCrossReference;\n \n $cCurl = curl_init();\n curl_setopt($cCurl, CURLOPT_URL, $szServerPullURL);\n curl_setopt($cCurl, CURLOPT_POST, true);\n curl_setopt($cCurl, CURLOPT_POSTFIELDS, $szPostFields);\n curl_setopt($cCurl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($cCurl, CURLOPT_ENCODING, \"UTF-8\");\n curl_setopt($cCurl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($cCurl, CURLOPT_SSL_VERIFYHOST, false);\n \n $response = curl_exec($cCurl);\n $nErrorNumber = curl_errno($cCurl);\n $szErrorMessage = curl_error($cCurl);\n curl_close($cCurl);\n \n if(is_int($nErrorNumber) &&\n $nErrorNumber > 0)\n {\n Mage::log(\"Error happened while trying to retrieve the transaction result details for a SERVER_PULL method for CrossReference: \".$szCrossReference.\". Error code: \".$nErrorNumber.\", message: \".$szErrorMessage);\n // suppress the message and use customer friendly instead\n $szErrorMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_329.\" Message: \".$szErrorMessage;\n }\n else\n {\n // synchronize of the Magento backend with the transcation result\n try\n {\n // get the response items\n $responseItems = PYS_PaymentFormHelper::getVariableCollectionFromString($response);\n \n $szStatusCode = $responseItems[\"StatusCode\"];\n $szMessage = $responseItems[\"Message\"];\n $transactionResult = $responseItems[\"TransactionResult\"];\n \n if($szStatusCode !== '0')\n {\n $szErrorMessage = Paymentsense_Paymentsensegateway_Model_Common_GlobalErrors::ERROR_381;\n $szErrorMessage .= \" Message: \".$szMessage;\n }\n else\n {\n // URL decode the transaction result variable and get the transaction result sub variables\n $transactionResult = urldecode($transactionResult);\n $transactionResult = PYS_PaymentFormHelper::getVariableCollectionFromString($transactionResult);\n // create the order item in the Magento backend\n $szStatusCode = isset($transactionResult[\"StatusCode\"]) ? $transactionResult[\"StatusCode\"] : false;\n $szMessage = isset($transactionResult[\"Message\"]) ? $transactionResult[\"Message\"] : false;\n $szPreviousStatusCode = $szStatusCode;\n $szPreviousMessage = $szMessage;\n \n $checkout->saveOrderAfterRedirectedPaymentAction(true,\n $szStatusCode,\n $szMessage,\n $szPreviousStatusCode,\n $szPreviousMessage,\n $szOrderID,\n $szCrossReference);\n }\n }\n catch(Exception $exc)\n {\n $boError = true;\n $szErrorMessage = $exc->getMessage();\n Mage::logException($exc);\n }\n }\n }\n }\n \n if($szErrorMessage)\n {\n $model->setPaymentAdditionalInformation($order->getPayment(), $szCrossReference);\n //$order->getPayment()->setTransactionId($szCrossReference);\n \n if($nVersion >= 1410)\n {\n if($order)\n {\n $orderState = 'pending_payment';\n $orderStatus = 'pys_failed_hosted_payment';\n $order->setCustomerNote(Mage::helper('paymentsensegateway')->__('Hosted Payment Failed'));\n $order->setState($orderState, $orderStatus, $szErrorMessage, false);\n $order->save();\n }\n }\n if($nVersion == 1324 || $nVersion == 1330)\n {\n Mage::getSingleton('checkout/session')->addError($szErrorMessage);\n }\n else \n {\n Mage::getSingleton('core/session')->addError($szErrorMessage);\n }\n $order->save();\n \n $this->_clearSessionVariables();\n $this->_redirect('checkout/onepage/failure');\n }\n else\n { \n // set the quote as inactive after back from paypal\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n \n // send confirmation email to customer\n if($order->getId())\n {\n $order->sendNewOrderEmail();\n }\n \n if($nVersion >= 1410)\n {\n if($nVersion < 1600)\n {\n $model->subtractOrderedItemsFromStock($order);\n }\n $this->_updateInvoices($order, $szMessage);\n }\n \n if($nVersion != 1324 && $nVersion != 1330)\n {\n Mage::getSingleton('core/session')->addSuccess('Payment Processor Response: '.$szMessage);\n }\n $this->_redirect('checkout/onepage/success', array('_secure' => true));\n }\n }", "protected function getOptions()\n\t{\n\t\t$this->options['USE_ACCOUNT_NUMBER'] = (Config\\Option::get(\"sale\", \"account_number_template\", \"\") !== \"\") ? true : false;\n\t}", "private function calcResult(): void {\n\t\tswitch($this->rndOperator) {\n\t\t\tcase self::PLUS:\n\t\t\t\t$this->result = $this->rndNumber1 + $this->rndNumber2;\n\t\t\t\tbreak;\n\t\t\tcase self::MINUS:\n\t\t\t\t// Avoid negative results\n\t\t\t\tif($this->rndNumber1 < $this->rndNumber2) {\n\t\t\t\t\t$tmp = $this->rndNumber1;\n\t\t\t\t\t$this->rndNumber1 = $this->rndNumber2;\n\t\t\t\t\t$this->rndNumber2 = $tmp;\n\t\t\t\t}\n\n\t\t\t\t$this->result = $this->rndNumber1 - $this->rndNumber2;\n\t\t\t\tbreak;\n\t\t\tcase self::MULTIPLE:\n\t\t\tdefault:\n\t\t\t\t$this->result = $this->rndNumber1 * $this->rndNumber2;\n\t\t}\n\t}", "public function execute()\n {\n $result = [\n 'success' => false,\n 'errorMessage' => '',\n ];\n\n try {\n $options = $this->getRequest()->getParams();\n\n $storeId = $options['store_switcher'] ?? 0;\n $storeGroupId = $options['store_group_switcher'] ?? 0;\n $websiteId = $options['website_switcher'] ?? 0;\n\n if ($storeId) {\n $this->storeManager->setCurrentStore($storeId);\n } elseif ($storeGroupId) {\n $storeId = $this->storeManager->getGroup($storeGroupId)->getDefaultStoreId();\n $this->storeManager->setCurrentStore($storeId);\n } elseif ($websiteId) {\n $storeGroupId = $this->storeManager->getWebsite($websiteId)->getDefaultGroupId();\n $storeId = $this->storeManager->getGroup($storeGroupId)->getDefaultStoreId();\n $this->storeManager->setCurrentStore($storeId);\n }\n\n $this->tokenProvider->regenerate();\n $result['success'] = true;\n } catch (\\Throwable $t) {\n $message = $t->getMessage();\n if ($t->getPrevious()) {\n $message .= PHP_EOL . $t->getPrevious()->getMessage();\n }\n\n $result['errorMessage'] = $this->tagFilter->filter($message);\n }\n\n /** @var \\Magento\\Framework\\Controller\\Result\\Json $resultJson */\n $resultJson = $this->resultJsonFactory->create();\n return $resultJson->setData($result);\n }", "public function getOptions()\n {\n $response = new Response();\n $options = null === $this->optionsProvider ? array() : $this->optionsProvider->getOptions();\n\n $response->setStatusCode(200);\n $response->setContent(empty($options) ? '{ }' : json_encode($options));\n $response->headers->set('Content-Type', 'application/json');\n\n return $response;\n }", "public function renderResult() {\n\t\t$this->formulaParser->setFormula($this->formula);\n\t\tforeach ($this->parameters as $key => $param) {\n\t\t\t$value = self::formatParameterValue($_POST['parameters'][$param->attributes->name]);\n\t\t\t$this->formulaParser->setParameter($param->attributes->name,$value);\n\t\t}\n\t\t$result = $this->formulaParser->getResult();\n\t\t$numDecimals = strlen(substr(strrchr($result, \".\"), 1));\n\t\t$fResult = number_format($result, $numDecimals, $this->resultDecimalSep, $this->resultThousandsSep);\n\t\techo $fResult;\n\t\twp_die();\n\t}", "private function assignDefaultResponses(): void\n {\n if ($this->operation->hasSuccessResponseCode()) {\n return;\n }\n\n if (strtolower($this->route->getAction()) == 'delete') {\n $this->operation->pushResponse(\n (new Response())\n ->setCode('204')\n ->setDescription('Resource deleted')\n );\n\n return;\n }\n\n $response = (new Response())->setCode('200');\n\n if (in_array($this->operation->getHttpMethod(), ['OPTIONS','HEAD'])) {\n $this->operation->pushResponse($response);\n\n return;\n }\n\n foreach ($this->config->getResponseContentTypes() as $mimeType) {\n $schema = (new Schema())->setDescription('');\n\n if ($mimeType == 'application/xml') {\n $schema->setXml((new Xml())->setName('response'));\n }\n\n $response->pushContent(\n (new Content())->setMimeType($mimeType)->setSchema($schema)\n );\n }\n\n $this->operation->pushResponse($response);\n }", "private function doActionGeneric()\n {\n $pluginConfig = $this->getConfig();\n\n switch ($pluginConfig['bgp-implementation']) {\n case 'openbgp':\n $bgpConfig = PfSenseConfigBlock::getInstalledPackagesConfigBlock($this->getController()->getRegistryItem('pfSenseClient'), 'openbgpdneighbors');\n break;\n case 'frr':\n $bgpConfig = PfSenseConfigBlock::getInstalledPackagesConfigBlock($this->getController()->getRegistryItem('pfSenseClient'), 'frrbgpneighbors');\n break;\n default:\n $this->log('unsupported bgp-implementation: '.$pluginConfig['bgp-implementation']);\n return false;\n break;\n }\n\n if (empty($bgpConfig->data)) {\n $bgpConfig->data = [];\n }\n\n if (empty($bgpConfig->data['config'])) {\n $bgpConfig->data['config'] = [];\n }\n\n // add/remove as necessary\n $template = $pluginConfig['options'][$pluginConfig['bgp-implementation']]['template'];\n switch ($pluginConfig['bgp-implementation']) {\n case 'openbgp':\n $defaults = [\n 'md5sigkey' => (string) $template['md5sigkey'],\n 'md5sigpass' => (string) $template['md5sigpass'],\n 'groupname' => (string) $template['groupname'],\n ];\n $template = array_merge($defaults, $template);\n $template = array_map(function ($v) {\n return $v ?: '';\n }, $template);\n break;\n case 'frr':\n $defaults = [\n \"sendcommunity\" => \"disabled\",\n ];\n $template = array_merge($defaults, $template);\n $template = array_map(function ($v) {\n return $v ?: '';\n }, $template);\n break;\n }\n\n $nodes = $this->state['nodes'];\n $neighbors = [];\n $managedNeighborsPreSave = [];\n foreach ($nodes as $node) {\n $host = 'kpc-'.KubernetesUtils::getNodeIp($node);\n $managedNeighborsPreSave[$host] = [\n 'resource' => $this->getKubernetesResourceDetails($node),\n ];\n $neighbor = $template;\n\n switch ($pluginConfig['bgp-implementation']) {\n case 'openbgp':\n $neighbor['descr'] = $host;\n $neighbor['neighbor'] = KubernetesUtils::getNodeIp($node);\n break;\n case 'frr':\n $neighbor['descr'] = $host;\n $neighbor['peer'] = KubernetesUtils::getNodeIp($node);\n break;\n }\n\n $neighbors[] = $neighbor;\n }\n\n // get store data\n $store = $this->getStore();\n if (empty($store)) {\n $store = [];\n }\n\n $store[$pluginConfig['bgp-implementation']] = $store[$pluginConfig['bgp-implementation']] ?? [];\n $store[$pluginConfig['bgp-implementation']]['managed_neighbors'] = $store[$pluginConfig['bgp-implementation']]['managed_neighbors'] ?? [];\n\n $managedNeighborNamesPreSave = @array_keys($managedNeighborsPreSave);\n $managedNeighborNames = @array_keys($store[$pluginConfig['bgp-implementation']]['managed_neighbors']);\n if (empty($managedNeighborNames)) {\n $managedNeighborNames = [];\n }\n\n // update config with new/updated items\n foreach ($neighbors as $neighbor) {\n $this->log('ensuring peer: '.$neighbor['descr']);\n Utils::putListItem($bgpConfig->data['config'], $neighbor, 'descr');\n }\n\n // remove items from config\n $toDeleteItemNames = array_diff($managedNeighborNames, $managedNeighborNamesPreSave);\n foreach ($toDeleteItemNames as $itemId) {\n $this->log('removing peer: '.$itemId);\n Utils::removeListItem($bgpConfig->data['config'], $itemId, 'descr');\n }\n\n // prep config for save\n if (empty($bgpConfig->data['config'])) {\n $bgpConfig->data = null;\n }\n\n // save newly managed configuration\n try {\n $this->savePfSenseConfigBlock($bgpConfig);\n switch ($pluginConfig['bgp-implementation']) {\n case 'openbgp':\n $this->reloadOpenbgp();\n break;\n case 'frr':\n $this->reloadFrrBgp();\n break;\n }\n $store[$pluginConfig['bgp-implementation']]['managed_neighbors'] = $managedNeighborsPreSave;\n $this->saveStore($store);\n\n return true;\n } catch (\\Exception $e) {\n $this->log('failed update/reload: '.$e->getMessage().' ('.$e->getCode().')');\n return false;\n }\n }", "public function convertResponse($values)\n {\n\t}", "public function newConfigurationOptions() {\n\n/*\n 'load' => array(\n 'type' => 'list',\n 'legacy' => 'phutil_libraries',\n 'help' => pht(\n 'A list of paths to phutil libraries that should be loaded at '.\n 'startup. This can be used to make classes available, like lint '.\n 'or unit test engines.'),\n 'default' => array(),\n 'example' => '[\"/var/arc/customlib/src\"]',\n ),\n 'editor' => array(\n 'type' => 'string',\n 'help' => pht(\n 'Command to use to invoke an interactive editor, like `%s` or `%s`. '.\n 'This setting overrides the %s environmental variable.',\n 'nano',\n 'vim',\n 'EDITOR'),\n 'example' => '\"nano\"',\n ),\n 'https.cabundle' => array(\n 'type' => 'string',\n 'help' => pht(\n \"Path to a custom CA bundle file to be used for arcanist's cURL \".\n \"calls. This is used primarily when your conduit endpoint is \".\n \"behind HTTPS signed by your organization's internal CA.\"),\n 'example' => 'support/yourca.pem',\n ),\n 'browser' => array(\n 'type' => 'string',\n 'help' => pht('Command to use to invoke a web browser.'),\n 'example' => '\"gnome-www-browser\"',\n ),\n*/\n\n\n\n return array(\n id(new ArcanistStringConfigOption())\n ->setKey('base')\n ->setSummary(pht('Ruleset for selecting commit ranges.'))\n ->setHelp(\n pht(\n 'Base commit ruleset to invoke when determining the start of a '.\n 'commit range. See \"Arcanist User Guide: Commit Ranges\" for '.\n 'details.'))\n ->setExamples(\n array(\n 'arc:amended, arc:prompt',\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('repository')\n ->setAliases(\n array(\n 'repository.callsign',\n ))\n ->setSummary(pht('Repository for the current working copy.'))\n ->setHelp(\n pht(\n 'Associate the working copy with a specific Phabricator '.\n 'repository. Normally, Arcanist can figure this association '.\n 'out on its own, but if your setup is unusual you can use '.\n 'this option to tell it what the desired value is.'))\n ->setExamples(\n array(\n 'libexample',\n 'XYZ',\n 'R123',\n '123',\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('phabricator.uri')\n ->setAliases(\n array(\n 'conduit_uri',\n 'default',\n ))\n ->setSummary(pht('Phabricator install to connect to.'))\n ->setHelp(\n pht(\n 'Associates this working copy with a specific installation of '.\n 'Phabricator.'))\n ->setExamples(\n array(\n 'https://phabricator.mycompany.com/',\n )),\n id(new ArcanistAliasesConfigOption())\n ->setKey(self::KEY_ALIASES)\n ->setDefaultValue(array())\n ->setSummary(pht('List of command aliases.'))\n ->setHelp(\n pht(\n 'Configured command aliases. Use the \"alias\" workflow to define '.\n 'aliases.')),\n id(new ArcanistPromptsConfigOption())\n ->setKey(self::KEY_PROMPTS)\n ->setDefaultValue(array())\n ->setSummary(pht('List of prompt responses.'))\n ->setHelp(\n pht(\n 'Configured prompt aliases. Use the \"prompts\" workflow to '.\n 'show prompts and responses.')),\n id(new ArcanistStringListConfigOption())\n ->setKey('arc.land.onto')\n ->setDefaultValue(array())\n ->setSummary(pht('Default list of \"onto\" refs for \"arc land\".'))\n ->setHelp(\n pht(\n 'Specifies the default behavior when \"arc land\" is run with '.\n 'no \"--onto\" flag.'))\n ->setExamples(\n array(\n '[\"master\"]',\n )),\n id(new ArcanistStringListConfigOption())\n ->setKey('pager')\n ->setDefaultValue(array())\n ->setSummary(pht('Default pager command.'))\n ->setHelp(\n pht(\n 'Specify the pager command to use when displaying '.\n 'documentation.'))\n ->setExamples(\n array(\n '[\"less\", \"-R\", \"--\"]',\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.land.onto-remote')\n ->setSummary(pht('Default list of \"onto\" remote for \"arc land\".'))\n ->setHelp(\n pht(\n 'Specifies the default behavior when \"arc land\" is run with '.\n 'no \"--onto-remote\" flag.'))\n ->setExamples(\n array(\n 'origin',\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.land.strategy')\n ->setSummary(\n pht(\n 'Configure a default merge strategy for \"arc land\".'))\n ->setHelp(\n pht(\n 'Specifies the default behavior when \"arc land\" is run with '.\n 'no \"--strategy\" flag.')),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.land.notaccepted.message')\n ->setDefaultValue(\n pht(\n 'Rejected: You should never land revision without review. '.\n 'If you know what you are doing and still want to land, add a '.\n '`FORCE_LAND=<reason>` line to the revision summary and it will be audited.'))\n ->setSummary(\n pht(\n 'Error message when attempting to land a non-accepted revision.')),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.land.buildfailures.message')\n ->setDefaultValue(\n pht(\n 'Rejected: You should not land revisions with failed or ongoing builds. '.\n 'If you know what you are doing and still want to land, add a '.\n '`ALLOW_FAILED_TESTS=<reason>` line to the revision summary and it will be audited.'))\n ->setSummary(\n pht(\n 'Error message when attempting to land a revision with failed builds.')),\n id(new ArcanistBoolConfigOption())\n ->setKey('phlq')\n ->setDefaultValue(false)\n ->setSummary(pht('PHLQ install to connect to.'))\n ->setHelp(\n pht(\n 'Use PHLQ to land changes')),\n id(new ArcanistBoolConfigOption())\n ->setKey('is.phlq')\n ->setDefaultValue(false)\n ->setSummary(pht('Internal use only'))\n ->setHelp(\n pht(\n 'Internal use only')),\n id(new ArcanistStringConfigOption())\n ->setKey('phlq.uri')\n ->setAliases(\n array(\n 'phlq_uri',\n ))\n ->setSummary(pht('PHLQ instance uri.'))\n ->setHelp(\n pht(\n 'Associates this working copy with a specific installation of '.\n 'PHLQ.'))\n ->setExamples(\n array(\n 'https://phlq/',\n )),\n id(new ArcanistStringListConfigOption())\n ->setKey('forceable.build.plan.phids')\n ->setDefaultValue(array())\n ->setAliases(\n array(\n 'forceable_build_plan_phids',\n ))\n ->setSummary(\n pht(\n 'List PHIDs of forceable build plans which can be landed with failing status with '.\n 'a `ALLOW_FAILED_TESTS=<reason>` line in revision summary and it will be audited.'))\n ->setExamples(\n array(\n [\"PHID-ABCD-abcdefghijklmnopqrst\"],\n )),\n id(new ArcanistStringListConfigOption())\n ->setKey('non-blocking.build.plan.phids')\n ->setDefaultValue(array())\n ->setAliases(\n array(\n 'non_blocking_build_plan_phids',\n ))\n ->setSummary(\n pht(\n 'List PHIDs of build plans which can be landed with failing '.\n 'status.'))\n ->setExamples(\n array(\n [\"PHID-ABCD-abcdefghijklmnopqrst\"],\n )),\n id(new ArcanistStringListConfigOption())\n ->setKey('lint.build.plan.phids')\n ->setDefaultValue(array())\n ->setAliases(\n array(\n 'lint_build_plan_phids',\n ))\n ->setSummary(\n pht(\n 'List PHIDs of lint build plans which can be landed with failing '.\n 'status.'))\n ->setExamples(\n array(\n [\"PHID-ABCD-abcdefghijklmnopqrst\"],\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.upgrade.message')\n ->setDefaultValue(\n pht('Arc is managed by your employer.'))\n ->setSummary(\n pht('Message shown when arc upgrade command is called.')),\n );\n }", "protected function getRelayProxyConfigsRequest()\n {\n\n $resourcePath = '/account/relay-auto-configs';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\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('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "private function getOptionsResolver()\n {\n if (null === self::$optionsResolver) {\n $classExists = function ($class) {\n if (!class_exists($class)) {\n throw new InvalidOptionsException(sprintf('Class %s does not exists.', $class));\n }\n return true;\n };\n $classExistsAndImplements = function($class, $interface) use ($classExists) {\n $classExists($class);\n if (!in_array($interface, class_implements($class))) {\n throw new InvalidOptionsException(sprintf('Class %s must implement %s.', $class, $interface));\n }\n return true;\n };\n $validOperator = function ($class) use ($classExistsAndImplements) {\n return $classExistsAndImplements($class, self::OPERATOR_INTERFACE);\n };\n $validController = function ($class) use ($classExistsAndImplements) {\n return $classExistsAndImplements($class, self::CONTROLLER_INTERFACE);\n };\n $validForm = function ($class) use ($classExistsAndImplements) {\n return $classExistsAndImplements($class, self::FORM_INTERFACE);\n };\n $validTable = function ($class) use ($classExistsAndImplements) {\n return $classExistsAndImplements($class, self::TABLE_INTERFACE);\n };\n $validEvent = function ($class) use ($classExistsAndImplements) {\n if (null === $class) {\n return true;\n }\n return $classExistsAndImplements($class, self::EVENT_INTERFACE);\n };\n\n self::$optionsResolver = new OptionsResolver();\n /** @noinspection PhpUnusedParameterInspection */\n self::$optionsResolver\n ->setDefaults([\n 'entity' => null,\n 'repository' => null,\n 'operator' => self::DEFAULT_OPERATOR,\n 'controller' => self::DEFAULT_CONTROLLER,\n 'templates' => null,\n 'form' => null,\n 'table' => null,\n 'event' => null,\n 'parent' => null,\n 'translation' => null,\n ])\n\n ->setAllowedTypes('entity', 'string')\n ->setAllowedTypes('repository', ['null', 'string'])\n ->setAllowedTypes('operator', 'string')\n ->setAllowedTypes('controller', 'string')\n ->setAllowedTypes('templates', ['null', 'string', 'array'])\n ->setAllowedTypes('form', 'string')\n ->setAllowedTypes('table', 'string')\n ->setAllowedTypes('event', ['null', 'string'])\n ->setAllowedTypes('parent', ['null', 'string'])\n ->setAllowedTypes('translation', ['null', 'array'])\n\n ->setAllowedValues('entity', $classExists)\n ->setAllowedValues('operator', $validOperator)\n ->setAllowedValues('controller', $validController)\n ->setAllowedValues('form', $validForm)\n ->setAllowedValues('table', $validTable)\n ->setAllowedValues('event', $validEvent)\n\n ->setNormalizer('repository', function($options, $value) use ($classExistsAndImplements) {\n $translatable = is_array($options['translation']);\n $interface = $translatable ? self::TRANSLATABLE_REPOSITORY_INTERFACE : self::REPOSITORY_INTERFACE;\n if (null === $value) {\n if ($translatable) {\n $value = self::TRANSLATABLE_DEFAULT_REPOSITORY;\n } else {\n $value = self::DEFAULT_REPOSITORY;\n }\n }\n $classExistsAndImplements($value, $interface);\n return $value;\n })\n ->setNormalizer('translation', function ($options, $value) use ($classExistsAndImplements) {\n if (is_array($value)) {\n if (!array_key_exists('entity', $value)) {\n throw new InvalidOptionsException('translation.entity must be defined.');\n }\n if (!array_key_exists('fields', $value)) {\n throw new InvalidOptionsException('translation.fields must be defined.');\n }\n if (!is_array($value['fields']) || empty($value['fields'])) {\n throw new InvalidOptionsException('translation.fields can\\'t be empty.');\n }\n if (!array_key_exists('repository', $value)) {\n $value['repository'] = self::DEFAULT_REPOSITORY;\n }\n $classExistsAndImplements($value['repository'], self::REPOSITORY_INTERFACE);\n }\n return $value;\n })\n // TODO templates normalization ?\n ;\n }\n return self::$optionsResolver;\n }", "private function getMatchesFromAcceptedLanguages()\n {\n $matches = [];\n\n if ($acceptLanguages = \\Request::header('Accept-Language')) {\n $acceptLanguages = explode(',', $acceptLanguages);\n\n $generic_matches = [];\n foreach ($acceptLanguages as $option) {\n $option = array_map('trim', explode(';', $option));\n $l = $option[0];\n if (isset($option[1])) {\n $q = (float)str_replace('q=', '', $option[1]);\n } else {\n $q = null;\n // Assign default low weight for generic values\n if ($l == '*/*') {\n $q = 0.01;\n } elseif (substr($l, -1) == '*') {\n $q = 0.02;\n }\n }\n // Unweighted values, get high weight by their position in the list\n $q = (isset($q) ? $q : 1000) - count($matches);\n $matches[$l] = $q;\n\n // If for some reason the Accept-Language header only sends language with country\n // we should make the language without country an accepted option, with a value\n // less than it's parent.\n $l_ops = explode('-', $l);\n array_pop($l_ops);\n while (!empty($l_ops)) {\n // The new generic option needs to be slightly less important than it's base\n $q -= 0.001;\n $op = implode('-', $l_ops);\n if (empty($generic_matches[$op]) || $generic_matches[$op] > $q) {\n $generic_matches[$op] = $q;\n }\n array_pop($l_ops);\n }\n }\n $matches = array_merge($generic_matches, $matches);\n\n arsort($matches, SORT_NUMERIC);\n }\n\n return $matches;\n }", "public function execute() {\n if(isset($_POST) && count($_POST)) {\n (new FormService)->handleSubmit('bowlingConfig');\n }\n $bowlingConfig = (new SessionService)->get('bowlingConfig');\n if($bowlingConfig) {\n return (new TemplateService)->bowling($bowlingConfig) . (new TemplateService)->scoringForm();\n }\n if(!$bowlingConfig) {\n return (new TemplateService)->userConfig();\n }\n }", "public function convertResponse($values)\n {\n\n\t}", "public function resultsOptions()\n {\n if ($this->getRaw()->getResultsOptions() == null) {\n $this->getRaw()->setResultsOptions(\n new OpenAPI\\Model\\EntityCollectionParameters()\n );\n }\n return new ResultsOptions($this->getRaw()->getResultsOptions());\n }", "public function init($options = array())\n {\n if (is_array($options)) {\n if (!empty($options['output'])) {\n $this->_output = $options['output'];\n } else {\n $this->_output = 'html';\n }\n \n if (isset($options['width']) && is_int($options['width'])) {\n $this->_width = $options['width'];\n } else {\n $this->_width = 200; \n }\n\n if (!empty($options['length'])) {\n $this->_length = $options['length'];\n } else {\n $this->_length = 6;\n }\n \n if (!isset($options['phrase']) || empty($options['phrase'])) {\n $phraseoptions = (isset($options['phraseOptions']) && is_array($options['phraseOptions'])) ? $options['phraseOptions'] : array();\n $this->_createPhrase($phraseoptions);\n } else {\n $this->_phrase = $options['phrase'];\n }\n }\n \n\t\tif (isset($options['options']['style']) && !empty($options['options']['style']) && is_array($options['options']['style'])) {\n $this->_style = $options['options']['style'];\n }\n \n if (!isset($this->_style['padding']) || empty($this->_style['padding'])) {\n $this->_style['padding'] = '5px'; \n }\n \n if (isset($options['options']['font_file']) && !empty($options['options']['font_file'])) {\n if (is_array($options['options']['font_file'])) {\n $this->_font = $options['options']['font_file'][array_rand($options['options']['font_file'])];\n } else {\n $this->_font = $options['options']['font_file'];\n }\n }\n }", "public function routeOptions();", "public function index()\n\t{\n\t\t/*\n\t\t|\tnot a logical function since GramStainResult\n\t\t|\tshould be specific to a particular result\n\t\t*/\n\t}", "public function optionsAction(): Response\n {\n $response = new Response();\n\n $response->headers->set('Allow', 'GET, OPTIONS');\n\n return $response;\n }", "public function optionsAction(): Response\n {\n $response = new Response();\n\n $response->headers->set('Allow', 'GET, OPTIONS');\n\n return $response;\n }", "public function index()\n\t{\n $limit = Input::has('limit') ? Input::get('limit') : Config::get('app.laragento.defaults.pagination.limit');\n $offset = Input::has('offset') ? Input::get('offset') : Config::get('app.laragento.defaults.pagination.offset');\n\n //todo: generic\n $resourceQuery = Laragento\\CoreConfig::take($limit)->skip($offset);\n\n $select = array('config_id as id', 'scope', 'path', 'value');\n\n $resourceQuery->select($select);\n\n $configs = $resourceQuery->get();\n\n $outputConfigs = array();\n\n foreach($configs as $config){\n $outputConfigs[] = $config->prepareOutput($this->apiVersion);\n }\n\n return Response::json($outputConfigs);\n\n }", "public function providerCreate()\n {\n $data = array(\n // None.\n array(null, null, '\\\\UnicornFail\\\\PhpOption\\\\None'),\n\n // SomeFloat.\n array('3.33', 3.33, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array('-42.9', -42.9, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array('-9.25', -9.25, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array(3.33, 3.33, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array(-42.9, -42.9, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n array(-9.25, -9.25, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeFloat'),\n\n // SomeInteger.\n array(0, 0, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeInteger'),\n array(1, 1, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeInteger'),\n array('0', 0, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeInteger'),\n array('1', 1, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeInteger'),\n\n // SomeBoolean.\n array(true, true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array(false, false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('on', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('ON', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('off', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('OFF', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('true', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('TRUE', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('false', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('FALSE', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('yes', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('YES', true, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('no', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n array('NO', false, '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeBoolean'),\n\n // SomeArray.\n array(array(), array(), '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeArray'),\n array(array(1, 2, 3), array(1, 2, 3), '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeArray'),\n array('foo,bar,baz', array('foo', 'bar', 'baz'), '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeArray'),\n array('foo=bar,baz=quz', array('foo' => 'bar', 'baz' => 'quz'), '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeArray'),\n\n // SomeString.\n array('', '', '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeString'),\n array('string', 'string', '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeString'),\n array('foo=bar', 'foo=bar', '\\\\UnicornFail\\\\PhpOption\\\\Some\\\\SomeString'),\n );\n\n $index = 0;\n return array_combine(array_map(function ($item) use (&$index) {\n $item = array_map(function ($value) {\n if (is_string($value) && (is_callable($value) || class_exists($value))) {\n $parts = explode('\\\\', $value);\n return array_pop($parts);\n }\n return json_encode($value);\n }, $item);\n $label = implode(' : ', array_merge(array('#' . $index++), $item));\n return $label;\n }, $data), $data);\n }", "public function testReturnsRateMethodWithEstablishedParamsForCollectRatesMethod()\n {\n $carrier = $this->expected()->getCarrier();\n $configTitle = $this->expected()->getConfigTitle();\n $method = $this->expected()->getMethodName();\n $price = $this->expected()->getPrice();\n\n $modelCarrierMock = $this->getModelMock('oggetto_shipping/carrier', ['getConfigData']);\n\n $modelCarrierMock->expects($this->once())\n ->method('getConfigData')\n ->with('title')\n ->willReturn($configTitle);\n\n $this->replaceByMock('model', 'oggetto_shipping/carrier', $modelCarrierMock);\n\n\n $modelRateMethodMock = $this->getModelMock('shipping/rate_result_method', [\n 'setCarrier', 'setCarrierTitle',\n 'setMethod', 'setMethodTitle',\n 'setPrice', 'setCost'\n ]);\n\n $modelRateMethodMock->expects($this->once())\n ->method('setCarrier')\n ->with($carrier);\n\n $modelRateMethodMock->expects($this->once())\n ->method('setCarrierTitle')\n ->with($configTitle);\n\n $modelRateMethodMock->expects($this->once())\n ->method('setMethod')\n ->with($method);\n\n $modelRateMethodMock->expects($this->once())\n ->method('setMethodTitle')\n ->with(ucfirst($method));\n\n $modelRateMethodMock->expects($this->once())\n ->method('setPrice')\n ->with($price);\n\n $modelRateMethodMock->expects($this->once())\n ->method('setCost')\n ->with($price);\n\n $this->replaceByMock('model', 'shipping/rate_result_method', $modelRateMethodMock);\n\n $this->assertEquals($modelRateMethodMock, $modelCarrierMock->getRateMethod($method, $price));\n }", "public function doGenerateMergeCommand()\n {\n $result = new ezcMvcResult;\n $command = MKVMergeTVCommandGenerator::generate( $this->VideoFile );\n\n $result->variables['command'] = (string)$command->command;\n return $result;\n }", "public function toXML()\r\n\t{\r\n\t\t// pass any configuration options defined as type=pass to the xml\r\n\t\t\r\n\t\t$source = explode('/', $this->config_file);\r\n\t\t$source = array_pop($source);\r\n\r\n\t\t$objConfigXml = new \\DOMDocument( );\r\n\t\t$objConfigXml->loadXML( \"<config source=\\\"$source\\\" />\" );\r\n\t\t\t\r\n\t\tforeach ( $this->getPass() as $key => $value )\r\n\t\t{\r\n\t\t\tif ($value instanceof \\SimpleXMLElement) \r\n\t\t\t{\r\n\t\t\t\t// just spit it back out again as XML\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t$objElement = $objConfigXml->createElement($key);\r\n\t\t\t\t$objConfigXml->documentElement->appendChild( $objElement );\r\n\t\t\t\t\r\n\t\t\t\tforeach ($value->children() as $child) \r\n\t\t\t\t{\r\n\t\t\t\t\t// need to convert to DOMDocument.\r\n\t\t\t\t\t$domValue = dom_import_simplexml($child);\r\n\t\t\t\t\t$domValue = $objConfigXml->importNode($domValue, true);\r\n\t\t\t\t\t$objElement->appendChild($domValue);\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t// simple string value\r\n\t\t\t\t\r\n\t\t\t\t$objElement = $objConfigXml->createElement( $key, Parser::escapeXml($value) );\r\n\t\t\t\t$objConfigXml->documentElement->appendChild( $objElement );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $objConfigXml;\r\n\t}", "protected function determineAgumentClassifications()\n {\n $result = new DefaultsWithDescriptions();\n $params = $this->reflection->getParameters();\n $optionsFromParameters = $this->determineOptionsFromParameters();\n if ($this->lastParameterIsOptionsArray()) {\n array_pop($params);\n }\n while (!empty($params) && ($params[0]->getType() != null) && ($params[0]->getType() instanceof \\ReflectionNamedType) && !($params[0]->getType()->isBuiltin())) {\n $param = array_shift($params);\n $injectedClass = $param->getType()->getName();\n array_unshift($this->injectedClasses, $injectedClass);\n }\n foreach ($params as $param) {\n $this->parameterMap[$param->name] = false;\n $this->addParameterToResult($result, $param);\n }\n return $result;\n }", "abstract public function buildUri($options);", "protected function wrapResults($outputs)\n {\n return new Google_ComputeEngine_Routes_GetRoute_Results($outputs);\n }", "protected function createRegularPaymentXML()\n {\n $security_data = $this->makeSecurityData();\n $hash_data = $this->makeHashData($security_data);\n\n $nodes = [\n 'GVPSRequest' => [\n 'Mode' => $this->mode,\n 'Version' => 'v0.01',\n 'Terminal' => [\n 'ProvUserID' => $this->account->username,\n 'UserID' => $this->account->username,\n 'HashData' => $hash_data,\n 'ID' => $this->account->terminal_id,\n 'MerchantID' => $this->account->client_id,\n ],\n 'Customer' => [\n 'IPAddress' => $this->order->ip,\n 'EmailAddress' => $this->order->email,\n ],\n 'Card' => [\n 'Number' => $this->card->number,\n 'ExpireDate' => $this->card->month . $this->card->year,\n 'CVV2' => $this->card->cvv,\n ],\n 'Order' => [\n 'OrderID' => $this->order->id,\n 'GroupID' => '',\n 'AddressList' => [\n 'Address' => [\n 'Type' => 'S',\n 'Name' => $this->order->name,\n 'LastName' => '',\n 'Company' => '',\n 'Text' => '',\n 'District' => '',\n 'City' => '',\n 'PostalCode' => '',\n 'Country' => '',\n 'PhoneNumber' => '',\n ],\n ],\n ],\n 'Transaction' => [\n 'Type' => $this->type,\n 'InstallmentCnt' => $this->order->installment > 1 ? $this->order->installment : '',\n 'Amount' => $this->amountFormat($this->order->amount),\n 'CurrencyCode' => $this->order->currency,\n 'CardholderPresentCode' => '0',\n 'MotoInd' => 'N',\n 'Description' => '',\n 'OriginalRetrefNum' => '',\n ],\n ]\n ];\n\n return $this->createXML($nodes);\n }" ]
[ "0.50932235", "0.44757518", "0.44504178", "0.44391856", "0.44092762", "0.4406019", "0.43244046", "0.43134257", "0.43047613", "0.42979324", "0.42766747", "0.42515922", "0.42505875", "0.4245649", "0.42223153", "0.4213374", "0.41792318", "0.4158132", "0.41507235", "0.41425627", "0.4131602", "0.41255042", "0.41175434", "0.41150326", "0.4093837", "0.4093632", "0.40933222", "0.40912792", "0.40860215", "0.40784886", "0.40591392", "0.40469313", "0.40318584", "0.40316316", "0.40230614", "0.40228504", "0.40224445", "0.400591", "0.40000013", "0.3999768", "0.39853042", "0.39798808", "0.39777392", "0.39729664", "0.39704195", "0.3961257", "0.3956026", "0.39544275", "0.3953479", "0.39439842", "0.39436427", "0.39432314", "0.39416856", "0.39411572", "0.3940171", "0.3940171", "0.3940171", "0.3940171", "0.3940171", "0.3940171", "0.3940171", "0.3940171", "0.39379433", "0.393384", "0.39290777", "0.39220226", "0.39193714", "0.39163935", "0.39158335", "0.39109564", "0.39088643", "0.39070767", "0.39070332", "0.39043292", "0.39022434", "0.38915172", "0.38895956", "0.38893542", "0.38888124", "0.3886688", "0.3874062", "0.3873665", "0.38703758", "0.38612464", "0.38579872", "0.385528", "0.38472888", "0.38424605", "0.38422304", "0.38412383", "0.38412383", "0.38405555", "0.38367674", "0.38341266", "0.38332722", "0.38298094", "0.38284945", "0.38271153", "0.38258228", "0.38229978" ]
0.42076224
16
Returns a resolved header. The method accepts dashes and underscores as well.
protected function getHeader($header) { $this->initialize(); $header = str_replace('-','_',$header); return isset($this->parsed['headers'][$header]) ? $this->parsed['headers'][$header] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeader(string $header): string;", "public function getHeader(string $name): string;", "public function getHeader($header)\n {\n foreach ($this->headers as $key => $value)\n {\n if (str_replace('-', '_', strtolower($key)) == str_replace('-', '_', strtolower($header)))\n {\n return $value;\n }\n }\n }", "public function getHeader();", "public function getHeader();", "public function getHeader();", "public function getHeader(string $name);", "protected function _parseHeader() {}", "public function getHeader($headerName);", "#[Pure]\n public function getHeader($header) {}", "public function getHeader(): string\n {\n return $this->header;\n }", "public function getAuthorizationHeader()\n {\n // from the request, try to fall back to our own non-standard header\n $names = ['authorization', 'arengu-authorization'];\n\n // https://bugs.php.net/bug.php?id=72915\n // https://github.com/symfony/symfony/issues/19693\n // https://datatracker.ietf.org/doc/html/rfc3875#section-9.2\n foreach ($names as $lower) {\n $upper = strtoupper($lower);\n $prefixed = 'HTTP_' . str_replace('-', '_', $upper);\n\n // fpm/cli\n if (!empty($_SERVER[$prefixed])) {\n return $_SERVER[$prefixed];\n }\n \n // old cgi?\n if (!empty($_SERVER[$upper])) {\n return $_SERVER[$upper];\n }\n\n // apache\n $apache_headers = $this->getApacheHeaders();\n\n if (!empty($apache_headers[$lower])) {\n return $apache_headers[$lower];\n }\n }\n\n return '';\n }", "public function GetHeader()\n {\n return $this->HeaderName;\n }", "public function getHeader() {\n }", "#[Pure]\nfunction http_parse_headers($header) {}", "public function getHeader($name);", "function get_header($name = \\null, $args = array())\n {\n }", "public function getHttpHeader($header)\n\t\t{\n\t\t\t//are we using PHP-flavored headers?\n\t\t\tif (strpos($header, '_') === false) {\n\t\t\t\t$header = str_replace('-', '_', $header);\n\t\t\t\t$header = strtoupper($header);\n\t\t\t}\n\n\t\t\t//test the alternate, too\n\t\t\t$altHeader = 'HTTP_' . $header;\n\n\t\t\t//Test both the regular and the HTTP_ prefix\n\t\t\tif (isset($this->httpHeaders[$header])) {\n\t\t\t\treturn $this->httpHeaders[$header];\n\t\t\t} elseif (isset($this->httpHeaders[$altHeader])) {\n\t\t\t\treturn $this->httpHeaders[$altHeader];\n\t\t\t}\n\t\t}", "public function getHeader($headerKey);", "public function getHeaderValue();", "function getHeader($ch, $header) {\n $i = strpos($header, ':');\n if (!empty($i)) {\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n $value = trim(substr($header, $i + 2));\n $this->http_header[$key] = $value;\n }\n return strlen($header);\n }", "public function getHeaderRaw(string $name): string;", "public function _header( $key, $value = null ) {\n\t\tif ( null === $value ) {\n\t\t\treturn $key;\n\t\t}\n\n\t\t$key = str_replace( ' ', '-', ucwords( str_replace( ' - ', ' ', $key ) ) );\n\n\t\treturn \"$key: $value\";\n\t}", "public function getHeader($key);", "public function getHeader($header) {\n\n $normalized = strtolower($header);\n\n if (isset($this->headers[$normalized])) {\n return $this->headers[$normalized]['value'];\n }\n\n return '';\n\n }", "public function get_header() {\n $this->do_header();\n return $this->c_header;\n }", "public function header($name) {\n return isset($this->headers[$name])? $this->headers[ucfirst($name)] : null;\n }", "public function get_header() {\n\t\tif (!isset($this->header)) {\n\t\t\t$this->get_array();\n\t\t}\n\t\treturn $this->header;\n\t}", "private function header($name = '')\r\n {\r\n static $header = null;\r\n\r\n if (is_null($header)) {\r\n $header = [];\r\n $server = $_SERVER;\r\n\r\n foreach ($server as $key => $val) {\r\n if (0 === strpos($key, 'HTTP_')) {\r\n $key = str_replace('_', '-', strtolower(substr($key, 5)));\r\n $header[$key] = $val;\r\n }\r\n }\r\n\r\n if (isset($server['CONTENT_TYPE'])) {\r\n $header['content-type'] = $server['CONTENT_TYPE'];\r\n }\r\n\r\n if (isset($server['CONTENT_LENGTH'])) {\r\n $header['content-length'] = $server['CONTENT_LENGTH'];\r\n }\r\n\r\n $header = array_change_key_case($header);\r\n }\r\n\r\n if ('' === $name) {\r\n return $header;\r\n }\r\n\r\n $name = str_replace('_', '-', strtolower($name));\r\n\r\n return $header[$name] ?? null;\r\n }", "function get_header()\n\t{\n\t\treturn $this->header;\n\t}", "public function get_header($key)\n {\n }", "function getresponseheader($header = false){\n $headers = $this->getLastResponseHeaders();\n foreach ($headers as $head){\n if ( is_integer(strpos ($head, $header) )){\n $hstart = strpos ($head, \": \");\n $head = trim(substr($head,$hstart+2,100));\n return $head;\n }\n }\n }", "public function getHeader($name = null) {}", "public static function getHeader()\n {\n return self::$_header;\n }", "public function getHeader($name)\n {\n }", "public function getHeader($name)\n {\n }", "function GetHeader() {\n return ($this->ses['response']['header']);\n }", "public function getFullHeader()\n {\n }", "function getHeader($ch, $header) {\r\n\t\t$i = strpos($header, ':');\r\n\t\tif (!empty($i)) {\r\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r\n\t\t\t$value = trim(substr($header, $i + 2));\r\n\t\t\t$this->http_header[$key] = $value;\r\n\t\t}\t\t\r\n\t\treturn strlen($header);\r\n\t}", "public function getHeader() {\n return $this->Header;\n }", "public static function getHeader($name = null) {}", "static function extractHeader($header,$alternate=null)\n {\n if (function_exists('apache_request_headers')) {\n $request_headers = apache_request_headers();\n if (array_key_exists($header, $request_headers)) {\n return $request_headers[$header];\n }else if(!($alternate===null) && array_key_exists($alternate,$request_headers))\n return $request_headers[$alternate];\n } else {\n $request_headers = $_SERVER;\n }\n\n $conv_header = 'HTTP_' . strtoupper(preg_replace('/-/', '_', $header));\n if (array_key_exists($conv_header, $request_headers)) {\n return $request_headers[$conv_header];\n } else {\n if (array_key_exists(strtoupper($header), $request_headers)) {\n return $request_headers[strtoupper($header)];\n } else {\n return '';\n }\n }\n }", "function getHeader($ch, $header) {\n $i = strpos($header, ':');\n if (!empty($i)) {\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n $value = trim(substr($header, $i + 2));\n $this->http_header[$key] = $value;\n }\n return strlen($header);\n }", "public function getHeader ()\n {\n return $this->header;\n }", "function getHeader($ch, $header) {\n\t\t$i = strpos($header, ':');\n\t\tif (!empty($i)) {\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t$this->http_header[$key] = $value;\n\t\t}\n\t\treturn strlen($header);\n\t}", "public function getHeader()\n {\n return $this->Header;\n }", "function _parseHeader($header) {\n\n\t\tif (is_array($header)) {\n\t\t\tforeach ($header as $field => $value) {\n\t\t\t\tunset($header[$field]);\n\t\t\t\t$field = strtolower($field);\n\t\t\t\tpreg_match_all('/(?:^|(?<=-))[a-z]/U', $field, $offsets, PREG_OFFSET_CAPTURE);\n\n\t\t\t\tforeach ($offsets[0] as $offset) {\n\t\t\t\t\t$field = substr_replace($field, strtoupper($offset[0]), $offset[1], 1);\n\t\t\t\t}\n\t\t\t\t$header[$field] = $value;\n\t\t\t}\n\t\t\treturn $header;\n\t\t} elseif (!is_string($header)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tpreg_match_all(\"/(.+):(.+)(?:(?<![\\t ])\" . $this->line_break . \"|\\$)/Uis\", $header, $matches, PREG_SET_ORDER);\n\n\t\t$header = array();\n\t\tforeach ($matches as $match) {\n\t\t\tlist(, $field, $value) = $match;\n\n\t\t\t$value = trim($value);\n\t\t\t$value = preg_replace(\"/[\\t ]\\r\\n/\", \"\\r\\n\", $value);\n\n\t\t\t$field = $this->_unescapeToken($field);\n\n\t\t\t$field = strtolower($field);\n\t\t\tpreg_match_all('/(?:^|(?<=-))[a-z]/U', $field, $offsets, PREG_OFFSET_CAPTURE);\n\t\t\tforeach ($offsets[0] as $offset) {\n\t\t\t\t$field = substr_replace($field, strtoupper($offset[0]), $offset[1], 1);\n\t\t\t}\n\n\t\t\tif (!isset($header[$field])) {\n\t\t\t\t$header[$field] = $value;\n\t\t\t} else {\n\t\t\t\t$header[$field] = array_merge((array) $header[$field], (array) $value);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $header;\n\t}", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function header()\n\t{\n\t\t$header = Request::current()->headers();\n\t\treturn $header;\n\t}", "public function getHeaderValue()\n {\n }", "function getHeader($ch, $header) {\r\n $i = strpos($header, ':');\r\n if (!empty($i)) {\r\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r\n $value = trim(substr($header, $i + 2));\r\n $this->http_header[$key] = $value;\r\n }\r\n return strlen($header);\r\n }", "function getHeader($ch, $header) {\n\t\t\t$i = strpos($header, ':');\n\t\t\tif (!empty($i)) {\n\t\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t\t$this->http_header[$key] = $value;\n\t\t\t}\n\t\t\treturn strlen($header);\n\t\t}", "public function getHeader($header)\n {\n // Try to get it from the $_SERVER array first\n $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header));\n if (isset($_SERVER[$temp])) {\n return $_SERVER[$temp];\n }\n\n // This seems to be the only way to get the Authorization header on\n // Apache\n if (function_exists('apache_request_headers')) {\n $headers = apache_request_headers();\n if (isset($headers[$header])) {\n return $headers[$header];\n }\n $header = strtolower($header);\n foreach ($headers as $key => $value) {\n if (strtolower($key) == $header) {\n return $value;\n }\n }\n }\n\n return false;\n }", "function getHeader($ch, $header) {\n\t\t$i = strpos($header, ':');\n\t\tif (!empty($i)) {\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n\t\t\t$value = trim(substr($header, $i + 2));\n\t\t\t$this->http_header[$key] = $value;\n\t\t}\n\t\t\n\t\treturn strlen($header);\n\t}", "function getHeader()\n {\n return (string) $this->_sHeader;\n }", "function getHeader()\n {\n return (string) $this->_sHeader;\n }", "public function getHeader() {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->httpHeader;\n }", "public function getHeader()\n {\n return $this->content['header'];\n }", "public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }", "public function getHeader($name)\n {\n if (preg_match('/^'.$name.': (.*)$/m',$this->response,$result))\n {\n return trim($result[1]);\n }\n else\n {\n return false;\n }\n }", "public function getHeader($header)\n {\n // Try to get it from the $_SERVER array first\n $temp = 'HTTP_' . strtoupper(str_replace('-', '_', $header));\n if(!empty($_SERVER[$temp])) return $_SERVER[$temp];\n\n // This seems to be the only way to get the Authorization header on Apache\n if (function_exists('apache_request_headers'))\n {\n $headers = apache_request_headers();\n if(!empty($headers[$header])) return $headers[$header];\n }\n return null;\n }", "public function get_header(string $p_name) {\n $orig_name = $this->get_header_name($p_name);\n\n return $this->headers[$orig_name] ?? null;\n\n }", "public function compileHeader()\r\r\n {\r\r\n $header = [];\r\r\n foreach($this->requestHeaders as $k => $v) {\r\r\n $header[] = $k . ': ' . $v;\r\r\n }\r\r\n\r\r\n return implode(\"\\r\\n\", $header);\r\r\n }", "#[Pure]\nfunction http_match_request_header($header, $value, $match_case = null) {}", "protected function getHeader(string $key): string\n {\n $key = strtolower($key);\n\n return isset($this->headers[$key]) ? $this->headers[$key] : \"\";\n }", "public function getAuthorizationHeader() \n {\n $headers = null;\n \n if (isset($_SERVER['Authorization'])) {\n $headers = trim($_SERVER['Authorization']);\n }\n else if (isset($_SERVER['HTTP_AUTHORIZATION'])) {\n $headers = trim($_SERVER['HTTP_AUTHORIZATION']);\n } elseif (function_exists('apache_request_headers')) {\n $apacheHeaders = apache_request_headers();\n \n $apacheHeaders = array_combine(array_map('ucwords', array_keys($apacheHeaders)), array_values($apacheHeaders));\n if (isset($apacheHeaders['Authorization'])) {\n $headers = trim($apacheHeaders['Authorization']);\n }\n }\n \n //echo (\"Headers: \" . $headers .\"\\n\"); //debug\n return $headers;\n }", "public function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "public static function getAuthorizationHeader(): ?string {\r\n\r\n $header = null;\r\n\r\n if(true === isset($_SERVER['Authorization'])) {\r\n $header = trim($_SERVER['Authorization']);\r\n }\r\n\r\n //Nginx or fast CGI\r\n elseif(true === isset($_SERVER['HTTP_AUTHORIZATION'])) {\r\n $header = trim($_SERVER['HTTP_AUTHORIZATION']);\r\n }\r\n\r\n //Apache\r\n elseif(true === function_exists('apache_request_headers')) {\r\n\r\n $requestHeaders = apache_request_headers();\r\n\r\n //Server-side fix for bug in old Android versions (a nice side-effect of this fix means we don't care about capitalization for Authorization)\r\n $requestHeaders = array_combine(array_map('ucwords', array_keys($requestHeaders)), array_values($requestHeaders));\r\n\r\n if(true === isset($requestHeaders['Authorization'])) {\r\n $header = trim($requestHeaders['Authorization']);\r\n }\r\n }\r\n\r\n return $header;\r\n }", "private function api_get_auth_header(array $headers) {\n foreach ($headers as $header) {\n if( substr( $header, 0, 14 ) === \"Authorization:\" ) {\n return $header;\n }\n }\n return '';\n }", "public function header($key)\n {\n if (isset($this->headers[$key])) {\n return $this->headers[$key];\n }\n return null;\n }", "public function getHeader() {\n return (isset($this->header)) ? $this->header : '';\n }", "function curl_header(&$curl, $header) {\n return curl_headers($curl, [$header]);\n}", "function getHeader($ch, $header) {\n\t\t$i = strpos ( $header, ':' );\n\t\tif (! empty ( $i )) {\n\t\t\t$key = str_replace ( '-', '_', strtolower ( substr ( $header, 0, $i ) ) );\n\t\t\t$value = trim ( substr ( $header, $i + 2 ) );\n\t\t\t$this->http_header [$key] = $value;\n\t\t}\n\t\treturn strlen ( $header );\n\t}", "function getHeader($name){\n\t\t$name = strtoupper($name);\n\t\tforeach(array_keys($this->_Headers) as $_key){\n\t\t\tif(strtoupper($_key)== strtoupper($name)){\n\t\t\t\treturn $this->_Headers[$_key];\n\t\t\t}\n\t\t}\n\t}", "public function getHeaderString() {\n return $this->getPayload(FALSE);\n }", "protected function makeHeader()\n {\n $header = '';\n foreach(self::$headers as $k => $v) {\n $header .= $k . \": \" . $v . \"\\r\\n\";\n }\n\n return $header;\n }", "public function getHeader() {\r\n return $this->__header;\r\n }", "public function getHeader($key){\n $key = FW_String::strtolower($key);\n \n if($this->getHeader($key)){\n return $this->header[$key];\n }\n \n return null;\n }", "public function getTokenHeaderKey(): string\n {\n return 'Authorization';\n }", "private function compileHeader()\n\t\t{\n\t\t\t$query = @$this->getUrl(\"query\");\n\t\t\t$url = $this->getUrl(\"path\") . ($query == null ? null : \"?{$query}\");\n\t\t\t\n\t\t\t// Set data length\n\t\t\tif(($length = strlen($this->getBody())) > 0)\n\t\t\t\t$this->_headers->set(new HttpHeaderItem(\"Content-Length\", $length));\n\t\t\t\n\t\t\t// Sort and build header\n\t\t\t$headers = $this->convertHeadersToAssocArray($this->_headers);\n\t\t\tarsort($headers);\n\t\t\t\n\t\t\t$header = $this->getMethod() . \" {$url} \" . $this->getProtocolVersion() . self::HTTP_SEPERATOR;\n\t\t\t$header .= $this->mergeAssocArray(\": \", self::HTTP_SEPERATOR, $headers);\n\t\t\t\n\t\t\t// Return generated header\n\t\t\treturn $header . self::HTTP_DOUBLE_SEPERATOR;\n\t\t}", "public function getHeader($key) {\n if (isset($this->httpHeaders[$key])) {\n return $this->httpHeaders[$key];\n }\n return null;\n }", "public static function getHeader($header)\n {\n $headers = static::getHeaders();\n $header = strtolower($header);\n\n if (true !== array_key_exists($header, $headers)) {\n return null;\n }\n\n return $headers[$header];\n }", "public function getHeader(){\n\t\treturn $this->header;\n\t}", "public function header($name = null){\n return Route::headers($name);\n }", "public function getHeaderValue() {\n return (\n $this->name.'='.\n ($this->value === '' ? 'deleted' : $this->value).\n ($this->expires !== 0 ? '; expires='.gmdate('D, d-M-Y H:i:s \\G\\M\\T', $this->expires) : '').\n ($this->path !== '' ? '; path='.$this->path : '').\n ($this->domain !== '' ? '; domain='.$this->domain : '').\n ($this->secure ? '; secure' : '')\n );\n }", "public function get_header()\n\t{\n\t\t$header\t\t=\t$this->lang->get_line( \"controller_title\", $this->table );\n\t\tif ( !$header )\n\t\t{\n\t\t\t$header\t\t=\t( substr( strtolower( get_class( $this ) ), 0, strrpos( strtolower( get_class( $this ) ), \"_\" , -1 ) ) );\n\t\t\t$controller\t=\t$this->singlepack->get_controller( $header );\n\t\t\tif ( !$controller )\n\t\t\t{\n\t\t\t\treturn ucfirst( substr( strtolower( get_class( $this ) ), 0, strrpos( strtolower( get_class( $this ) ), \"_\" , -1 ) ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $controller->nome; // str_replace( '_', ' ', $header );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $header;\n\t\t}\n\t}", "public function getHeader()\n {\n return $this->getFilename();\n }", "function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "public function requestheader() {\n return $this->info['request_header'];\n }", "private function normalizeHeader(string $header): string\n {\n return ucwords($header, '-');\n }", "public function header() {\n return $this->header;\n }", "protected function get_header_name(string $p_name): string {\n return $this->header_map[strtolower($p_name)] ?? $p_name;\n }", "public function getExternalHeader()\n {\n $parts = explode('\\\\', $this->namespace);\n return 'ext/' . strtolower($parts[0] . DIRECTORY_SEPARATOR . str_replace('\\\\', DIRECTORY_SEPARATOR, $this->namespace) . DIRECTORY_SEPARATOR . $this->name) . '.zep';\n }", "public function __get($name)\n {\n $name = strtolower(preg_replace('/([A-Z])/', '-$1', $name));\n\n return isset($this->headers[$name]) ? $this->headers[$name] : NULL;\n }", "private static function getHeaders() {\n\t\t$_hdr=array();\n\t\tforeach ($_SERVER as $_key=>$_val)\n\t\t\tif (substr($_key,0,5)=='HTTP_') {\n\t\t\t\t$_hdr[preg_replace_callback(\n\t\t\t\t\t'/\\w+\\b/',\n\t\t\t\t\tfunction($_word) {\n\t\t\t\t\t\treturn ucfirst(strtolower($_word[0]));\n\t\t\t\t\t},\n\t\t\t\t\tstr_replace('_','-',substr($_key,5))\n\t\t\t\t)]=$_val;\n\t\t\t}\n\t\treturn $_hdr;\n\t}" ]
[ "0.7525669", "0.68599313", "0.6848127", "0.6826382", "0.6826382", "0.6826382", "0.6708433", "0.66917855", "0.66518945", "0.6643946", "0.6635199", "0.6633369", "0.65857875", "0.6575575", "0.6561596", "0.6509082", "0.64715135", "0.6466595", "0.64596653", "0.64577746", "0.64465", "0.64212334", "0.6400973", "0.6374588", "0.636638", "0.6357398", "0.6349526", "0.6347675", "0.63352895", "0.6318727", "0.6315848", "0.63066125", "0.6303803", "0.6290726", "0.6271703", "0.6271703", "0.6253889", "0.62512416", "0.6234433", "0.6203088", "0.6202562", "0.62018955", "0.62005466", "0.6200448", "0.61840814", "0.61808926", "0.6180286", "0.6179578", "0.6179578", "0.6179578", "0.6179578", "0.6179578", "0.61662316", "0.6159635", "0.6159347", "0.61593235", "0.61515576", "0.61515313", "0.61459285", "0.61459285", "0.613718", "0.6120134", "0.6109019", "0.6107007", "0.6107007", "0.60960084", "0.60884744", "0.6085708", "0.6063475", "0.6061491", "0.60573125", "0.60546404", "0.60483223", "0.6037344", "0.6033968", "0.6031379", "0.602446", "0.60217893", "0.6009723", "0.60078746", "0.60076874", "0.6003011", "0.59903044", "0.5987779", "0.5970396", "0.59600157", "0.59573793", "0.5956391", "0.5952228", "0.59457374", "0.59359974", "0.5931346", "0.5927536", "0.5924379", "0.5921973", "0.5897918", "0.58891755", "0.5882651", "0.58721197", "0.5864944" ]
0.6784575
6
Returns the content type of the request based on the configuration and the header values
public function resolveContentType(Request $request) { $this->initialize(); if($this->_contentType !== null) { return $this->_contentType; } if($this->negotiationEnabled) { $this->_contentType = $this->resolveNegotiatedValue( $this->negotiation->negotiateType( is_array($this->priorities['type']) ? $this->priorities['type'] : [], $request->headers->get($this->getHeader('content-type')) ), 'type' ); if($this->_contentType !== null) { return $this->_contentType; } } return $this->defaults['type']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_content_type() {\n\n\t $ct = $this->content_types();\n\t $a = trim(reset(explode(',',$_SERVER['HTTP_ACCEPT'])));\n\t \n\t\theader('Content-type:'.$a); // Set header\n\t\n\t if (array_key_exists($a,$ct)) return $ct[$a];\n\t // throw error\n\t throw new Exception('Content type unknown - '.$a);\n\t \n }", "public function determineContentType()\n {\n // step 1: are we in a browser at all?\n if (!isset($_SERVER))\n {\n // no, so we must be a console app\n return App_Request::CT_CONSOLE;\n }\n\n // TODO: detect content negotiation properly\n return App_Request::CT_XHTML;\n }", "public function get_content_type()\n {\n }", "public function getWantedType() {\n $accepts = $this->getHeaders('Accept');\n\n $accept = trim(explode(',', $accepts)[0]);\n\n $key = array_search($accept, self::$contentTypes);\n\n return $key ? $key : $accept;\n }", "public function contentType() {\n\t\treturn $this->getHeader('Content-Type');\n\t}", "public function contentType()\n {\n return $this->header('Content-Type');\n }", "public function get_response_content_type()\n {\n // Return.\n \n return $this->response_content_type;\n }", "public function getContentType()\n\t{\n\t\treturn isset($this->_response['headers']['content-type']) ? $this->_response['headers']['content-type'] : null;\n\t}", "public function getContentType()\n {\n return $this->getHttpHeader('Content-Type', $this->options['content_type']);\n }", "public function getContentType()\n {\n return $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTTYPE];\n }", "protected function getContentType() {\n\t\tforeach ( headers_list() as $header ) {\n\t\t\tif ( preg_match( '#^content-type: (\\w+/\\w+);?#i', $header, $m ) ) {\n\t\t\t\treturn $m[1];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "static function getContentType()\n\t{\n\t\t$headerContentType = isset($_SERVER[ 'CONTENT_TYPE' ]) ? $_SERVER[ 'CONTENT_TYPE' ] : '';\n\t\tlist($contentType) = explode(';', $headerContentType);\n\t return strtolower(trim($contentType));\n\t}", "public function getContentType()\n {\n return $this->getHeader(self::HEADER_CONTENT_TYPE);\n }", "private function getContentType() {\n return (is_array($this->curlInfo) && isset($this->curlInfo['content_type'])) ? $this->curlInfo['content_type'] : ContentType::JSON;\n }", "public function getContentType()\n {\n return $this->getHeaderFieldModel('Content-Type');\n }", "function http_send_content_type($content_type = null) {}", "public function GetBodyType() {\n\n return isset($this->Headers['CONTENT-TYPE'])\n ? trim(explode(';', $this->Headers['CONTENT-TYPE'])[0])\n : ''; // maybe 'application/octet-stream' as default?\n }", "public function getcontentType();", "public function getContentType()\n {\n $result = $this->getHeader('Content-Type');\n\n return $result ? $result[0] : null;\n }", "public function contenttype() {\n return $this->info['content_type'];\n }", "public function getResponseContentType(){\n return $this->contentType;\n }", "public function getContentType()\n {\n if (isset($_SERVER[\"CONTENT_TYPE\"])) {\n return $_SERVER[\"CONTENT_TYPE\"];\n } elseif (isset($_SERVER[\"HTTP_CONTENT_TYPE\"])) {\n //fix bug https://bugs.php.net/bug.php?id=66606\n return $_SERVER[\"HTTP_CONTENT_TYPE\"];\n }\n\n return null;\n }", "public function getPreferredContentType()\n\t{\n\t\t$accept = explode(',', $this->getHeader('Accept'));\n\t\tforeach ($accept as $mimeType) {\n\t\t\tforeach ($this->formats as $formatMime) {\n\t\t\t\tif (Strings::contains($mimeType, $formatMime)) {\n\t\t\t\t\treturn $formatMime;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn NULL;\n\t}", "public function getRespContentType()\n {\n return curl_getinfo($this->res, CURLINFO_CONTENT_TYPE);\n }", "public function getContentType(): string\n {\n return $this->getHeaderClaim('cty');\n }", "public function get_content_type( $type ) {\n $content_type = \"text/plain\";\n switch($type){\n case 'csv':\n $content_type = \"text/csv\";\n break;\n case 'txt':\n default:\n $break;\n }\n return $content_type;\n }", "public function getAcceptableContentTypes()\n {\n if ($this->_contentTypes === null) {\n if (isset($_SERVER['HTTP_ACCEPT'])) {\n $this->_contentTypes = $this->parseAcceptHeader($_SERVER['HTTP_ACCEPT']);\n } else {\n $this->_contentTypes = [];\n }\n }\n\n return $this->_contentTypes;\n }", "public function getContentType(): ?string\n {\n $header = $this->response->getHeaderLine('Content-Type');\n\n return $header === '' ? null : $header;\n }", "protected function getContentType() : string\n {\n return implode(',', (array) $this->httpResponse->getHeader('Content-Type'));\n }", "public function negotiateRequestContent(string $type, IRequest $request): ContentNegotiationResult;", "public function getResponseContentType()\n {\n return $this->responseContentType;\n }", "public function getRequestType()\n {\n return $this->getParameter('requestType') ?: $this->requestType;\n }", "public static function getContentType(): string\n {\n return static::CONTENT_TYPE;\n }", "public static function getContentType() {}", "public function getType() {\n /* could not have header */\n return $this->payload->getFormatType();\n }", "public function setContentType($val){ return $this->setHeader('Content-Type',$val); }", "protected function getRequestType()\r\n {\r\n return array_key_exists('StatusCode', $this->request_data) && is_numeric($this->request_data['StatusCode'])\r\n ? self::REQ_NOTIFICATION\r\n : self::REQ_CUSTOMER_REDIRECT;\r\n }", "public function getContentType(string $format = Header::FORMAT_RAW)\n {\n $value = $this->header_fields['Content-Type'] ?? null;\n if ($format === Header::FORMAT_RAW || empty($value))\n return $value;\n\n $type = $value['type'];\n $keywords = $value['parameters'];\n\n $values = [$type];\n foreach ($keywords as $key => $value)\n $values[] = sprintf('%s=\"%s\"', $key, $this->wrap($value));\n\n return 'Content-Type: ' . implode(';' . self::EOL_FOLD, $values);\n }", "protected function determineContentType(ServerRequestInterface $request)\n {\n $acceptHeader = $request->getHeaderLine('Accept');\n $selectedContentTypes = array_intersect(explode(',', $acceptHeader), $this->knownContentTypes);\n\n if (count($selectedContentTypes)) {\n return reset($selectedContentTypes);\n }\n\n // handle +json and +xml specially\n if (preg_match('/\\+(json|xml)/', $acceptHeader, $matches)) {\n $mediaType = 'application/'.$matches[1];\n if (in_array($mediaType, $this->knownContentTypes)) {\n return $mediaType;\n }\n }\n\n return 'text/html';\n }", "function http_negotiate_content_type(array $supported, ?array &$result = null) {}", "public function contentType();", "public function getContentType()\n\t{\n\t\t$contentType = $this->get(\"Content-Type\");\n\t\tif ($contentType !== null)\n\t\t{\n\t\t\t$parts = explode(\";\", $contentType);\n\n\t\t\t// RFC 2045 says: \"The type, subtype, and parameter names are not case-sensitive.\"\n\t\t\treturn strtolower(trim($parts[0]));\n\t\t}\n\n\t\treturn null;\n\t}", "public function negotiateResponseContent(string $type, IRequest $request): ContentNegotiationResult;", "function getContentType();", "public function getType()\r\n\t{\r\n\t\t//TODO: Parse the raw response header info for content type\r\n\t\t//EXAMPLE OF RETURNED DATA FROM $this->_solrResponse->getRawResponseHeaders()\r\n\t\t/*\r\n\t\t\"HTTP/1.1 200 OK\r\n\t\tContent-Type: text/xml; charset=utf-8\r\n\t\tContent-Length: 764\r\n\t\tServer: Jetty(6.1.3)\r\n\r\n\t\t\"\r\n\t\t*/\r\n\t\t\r\n\t\treturn 'text/xml';\r\n\t}", "public static function getContentType() {\n\t\treturn isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null;\n\t}", "public function getHeaders()\n {\n switch ($this->request->ext) {\n case 'jpg':\n case 'jpeg':\n $this->response->headerController->headerField('Content-Type', 'image/jpg');\n break;\n case 'png':\n $this->response->headerController->headerField('Content-Type', 'image/png');\n break;\n case 'gif':\n $this->response->headerController->headerField('Content-Type', 'image/gif');\n break;\n }\n }", "private function getContentType(Request $request)\n {\n return 1 === preg_match(\n '/\\/incc\\/([0-9]{4}\\/[0-9]{2}\\/[0-9]{2}\\/.*|post)/',\n $request->server()->get('REQUEST_URI')\n ) ? Page::TYPE_POST : Page::TYPE_PAGE;\n }", "private function getTypeOfRequest() {\n\t\t\n\t\t// If this is a POST request, likely it's Google, but let's check to confirm\n\t\tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\t\t\ttry {\n\t\t\t\t$json = file_get_contents($this->inputStream);\n\t\t\t\t$action = json_decode($json, true);\n\t\t\t\tif ($action == '' or $action == null) {\n\t\t\t\t\treturn 'other';\n }\n // Confirm that this request matches the projectID // TODO\n\t\t\t\t$this->decodedWebhook = $action; // Make the webhook JSON available to the class\n\t\t\t\treturn 'webhook';\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\treturn 'other';\n\t\t\t}\n\t\t}\n return 'other'; // Else, just return something else\n\t}", "public function getContentType()\n {\n $contentType = Config::get('view.content-type');\n return ($contentType !== null) ? $contentType : $this->contentType;\n }", "public function getContentType();", "public function getContentType();", "public function getContentType();", "public function getContentType();", "public function getContentType();", "public function getContentType();", "public function getContentType();", "public function getContentType();", "public function getContentType();", "public function getAcceptableContentTypes(): array\n {\n if (null !== $this->acceptableContentTypes) {\n return $this->acceptableContentTypes;\n }\n\n return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->header('accept'))->all());\n }", "public function acceptableContentTypes() {\n\t\t$accept = $this->getHeader('Accept');\n\t\treturn $accept === null ? array() : self::parseNegotiation($accept);\n\t}", "public function get_content_type() {\n return $this->content_type;\n }", "abstract public function getContentType();", "public function testPreferredContentTypeOfReturnsADesiredFormatIfItIsAccepted()\n {\n $server = [\n 'HTTP_ACCEPT' => 'text/text,application/xhtml+xml,application/json;q=0.9,*/*;q=0.8',\n ];\n $request = new Request($this->config, $server);\n\n $result = $request->preferredContentTypeOutOf(\n ['text/html', 'application/json']\n );\n\n $this->assertEquals('application/json', $result);\n\n $result = $request->preferredContentTypeOutOf();\n\n $this->assertEquals('application/json', $result);\n }", "public function getClientMediaType() {}", "public function getContentType(): string;", "protected function _setContentType() {\n\t\tif (in_array($this->_status, array(304, 204))) {\n\t\t\treturn;\n\t\t}\n\t\t$whitelist = array(\n\t\t\t'application/javascript', 'application/json', 'application/xml', 'application/rss+xml'\n\t\t);\n\n\t\t$charset = false;\n\t\tif ($this->_charset &&\n\t\t\t(strpos($this->_contentType, 'text/') === 0 || in_array($this->_contentType, $whitelist))\n\t\t) {\n\t\t\t$charset = true;\n\t\t}\n\n\t\tif ($charset) {\n\t\t\t$this->header('Content-Type', \"{$this->_contentType}; charset={$this->_charset}\");\n\t\t} else {\n\t\t\t$this->header('Content-Type', \"{$this->_contentType}\");\n\t\t}\n\t}", "public function getContentType()\n {\n }", "public function getRequestType()\n {\n return $this->requestType;\n }", "function diversity_get_header_content_type( $content_type, $obj ) {\n\tif ( $obj instanceof WP_Post ) {\n\t\t$post_type = $obj->post_type;\n\n\t\tif ( $post_type === 'post' ) {\n\t\t\t$content_type = 'post';\n\t\t}\n\t}\n\n\treturn $content_type;\n}", "public function getContentType()\n {\n return $this->info->content_type;\n }", "public function content_type() {\n\t\treturn \"application/vnd.ms-excel\";\n\t}", "function getContentType() {\n\t\treturn $this->getData('content_type');\n\t}", "function curl_content_type($curl) {\n $content_type = curl_info($curl, CURLINFO_CONTENT_TYPE);\n\n if (is_null($content_type)) {\n error('Failed to determine document content type for ' . spy($curl) . '.');\n }\n\n return $content_type;\n}", "public function getRequestType()\n {\n return $this->_requestType;\n }", "public function getContentType () {\r\n\t\treturn $this->content_type;\r\n\t}", "public function resolveAcceptType(Request $request)\n {\n $this->initialize();\n if($this->_acceptType !== null)\n {\n return $this->_acceptType;\n }\n if($this->negotiationEnabled)\n {\n $this->_acceptType = $this->resolveNegotiatedValue(\n $this->negotiation->negotiateType(\n is_array($this->priorities['type']) ? $this->priorities['type'] : [],\n $request->headers->get($this->getHeader('accept-type'))\n ),\n 'type'\n );\n if($this->_acceptType !== null)\n {\n return $this->_acceptType;\n }\n }\n return $this->defaults['type'];\n }", "public function getContentType() { return $this->content_type; }", "protected function determineContentTypeByHeaders(array $headers)\n\t{\n\t\tif (isset($headers['content_type'])) {\n\t\t\tif (stripos($headers['content_type'], 'json') !== false) {\n\t\t\t\treturn self::CONTENT_TYPE_JSON;\n\t\t\t}\n\t\t\tif (stripos($headers['content_type'], 'urlencoded') !== false) {\n\t\t\t\treturn self::CONTENT_TYPE_URLENCODED;\n\t\t\t}\n\t\t\tif (stripos($headers['content_type'], 'xml') !== false) {\n\t\t\t\treturn self::CONTENT_TYPE_XML;\n\t\t\t}\n\t\t}\n\t\treturn self::CONTENT_TYPE_AUTO;\n\t}", "public function type($type = null) {\n\t\tif ($type === false) {\n\t\t\tunset($this->headers['Content-Type']);\n\t\t\t$this->_type = false;\n\t\t\treturn;\n\t\t}\n\t\t$media = $this->_classes['media'];\n\n\t\tif (!$type && $this->_type) {\n\t\t\treturn $this->_type;\n\t\t}\n\t\t$headers = $this->headers + ['Content-Type' => null];\n\t\t$type = $type ?: $headers['Content-Type'];\n\n\t\tif (!$type) {\n\t\t\treturn;\n\t\t}\n\t\t$header = $type;\n\n\t\tif (!$data = $media::type($type)) {\n\t\t\t$this->headers('Content-Type', $type);\n\t\t\treturn ($this->_type = $type);\n\t\t}\n\t\tif (is_string($data)) {\n\t\t\t$type = $data;\n\t\t} elseif (!empty($data['content'])) {\n\t\t\t$header = is_string($data['content']) ? $data['content'] : reset($data['content']);\n\t\t}\n\t\t$this->headers('Content-Type', $header);\n\t\treturn ($this->_type = $type);\n\t}", "public function getContentType()\n {\n return $this->get(self::_CONTENT_TYPE);\n }", "public function selectHeaderContentType($content_type) {\n if (count($content_type) === 0 or ( count($content_type) === 1 and $content_type[0] === '')) {\n return 'application/json';\n } elseif (preg_grep(\"/application\\/json/i\", $content_type)) {\n return 'application/json';\n } else {\n return implode(',', $content_type);\n }\n }", "public function getResponseType()\n {\n return $this->_requestType;\n }", "public abstract function getContentType();", "public abstract function getContentType();", "protected function _getAcceptFormat() {\n if ($this->getFormat() === 'xml') {\n return 'Accept: application/xml';\n }\n\n return 'Accept: application/json';\n }", "protected function setContentTypes()\n\t{\n\t\t// Some temporary examples\n\t\t$content_types = array(\n\t\t\t'text/html' => 'html',\n\t\t\t'application/json' => 'js',\n\t\t\t'application/xml' => 'xml',\n\t\t);\n\n\t\t$accept = $_SERVER['HTTP_ACCEPT'];\n\n\t\t$accept = explode(',', $accept);\n\t\tforeach ($accept as $key => $value) {\n\t\t\t$accept[$key] = explode(';', $accept[$key]);\n\n\t\t\t/*\n\t\t\t*\tTODO:\n\t\t\t*\tParse q value and sort array.\n\t\t\t*/\n\n\t\t\t$type = $accept[$key][0];\n\t\t\tif (isset($content_types[$type])) {\n\t\t\t\t$this->request['accept'][$type] = $content_types[$type];\n\t\t\t}\n\t\t}\n\t}", "public function getContentType() {\n\t \t return $this->contentType;\n\t }", "public function responseType ();", "public function getContentType() {\n return $this->content_type;\n }", "public function getRfc2822ContentType(): string;", "function get_content_type($url){\n\t\t\t\t\t\t$mime_types = array(\n\t\t\t\t\t\t\t\"pdf\"=>\"application/pdf\"\n\t\t\t\t\t\t\t,\"exe\"=>\"application/octet-stream\"\n\t\t\t\t\t\t\t,\"zip\"=>\"application/zip\"\n\t\t\t\t\t\t\t,\"docx\"=>\"application/msword\"\n\t\t\t\t\t\t\t,\"doc\"=>\"application/msword\"\n\t\t\t\t\t\t\t,\"xls\"=>\"application/vnd.ms-excel\"\n\t\t\t\t\t\t\t,\"ppt\"=>\"application/vnd.ms-powerpoint\"\n\t\t\t\t\t\t\t,\"gif\"=>\"image/gif\"\n\t\t\t\t\t\t\t,\"png\"=>\"image/png\"\n\t\t\t\t\t\t ,\"ico\"=>\"image/ico\"\n\t\t\t\t\t\t ,\"jpeg\"=>\"image/jpg\"\n\t\t\t\t\t\t ,\"jpg\"=>\"image/jpg\"\n\t\t\t\t\t\t ,\"mp3\"=>\"audio/mpeg\"\n\t\t\t\t\t\t ,\"wav\"=>\"audio/x-wav\"\n\t\t\t\t\t\t ,\"mpeg\"=>\"video/mpeg\"\n\t\t\t\t\t\t ,\"mpg\"=>\"video/mpeg\"\n\t\t\t\t\t\t ,\"mpe\"=>\"video/mpeg\"\n\t\t\t\t\t\t ,\"mov\"=>\"video/quicktime\"\n\t\t\t\t\t\t ,\"avi\"=>\"video/x-msvideo\"\n\t\t\t\t\t\t ,\"3gp\"=>\"video/3gpp\"\n\t\t\t\t\t\t ,\"css\"=>\"text/css\"\n\t\t\t\t\t\t ,\"jsc\"=>\"application/javascript\"\n\t\t\t\t\t\t ,\"js\"=>\"application/javascript\"\n\t\t\t\t\t\t ,\"php\"=>\"text/html\"\n\t\t\t\t\t\t ,\"htm\"=>\"text/html\"\n\t\t\t\t\t\t ,\"html\"=>\"text/html\"\n\t\t\t\t\t\t ,\"xml\"=>\"application/xml\"\n\t\t\t\t\t\t \n\t\t\t\t\t\t);\n\t\t\t\t\t\t$var = explode('.', $url);\n\t\t\t\t\t\t$extension = strtolower(end($var));\n\t\t\t\t\t\tif(isset($mime_types[$extension])){\n\t\t\t\t\t\t return $mime_types[$extension];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\treturn 'other';\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public function getContentType(): string\n {\n return $this->contentType;\n }", "public function getContentType(): string\n {\n return $this->contentType;\n }", "public function getMimetype();", "function headerType() {\r\n \r\n If($this->from === TRUE){\r\n $this->from=\"no-reply@\".constant(\"HOST\");\r\n }elseif(empty($this->from)){\r\n $this->from=\"no-reply@\".constant(\"HOST\");\r\n }\r\n $this->headers = \"From: {$this->from}\\r\\n\";\r\n $this->headers.= \"MIME-Version: 1.0\\r\\n\";\r\n switch ($this->type) {\r\n default :\r\n\r\n $this->headers.= \"Content-Type: multipart/alternative; boundary={$this->boundary}\\r\\n\";\r\n\r\n //html version\r\n $this->headers .= \"\\n--{$this->boundary}\\n\";\r\n $this->headers .= \"Content-type: text/html; charset={$this->charset}\\r\\n\";\r\n $this->headers .= $this->body;\r\n\r\n //text version\r\n $this->headers .= \"\\n--{$this->boundary}\"; // beginning \\n added to separate previous content\r\n $this->headers .= \"Content-type: text/plain; charset={$this->charset}\\r\\n\";\r\n $this->headers .= $this->body;\r\n\r\n break;\r\n case \"html\":\r\n $this->headers .= \"Content-type: text/html; charset={$this->charset}\\r\\n\";\r\n break;\r\n case \"text\":\r\n $this->headers .= \"Content-type: text/plain; charset={$this->charset}\\r\\n\";\r\n break;\r\n }\r\n }", "public function getType(): string\n {\n return $this->getHeaderClaim('typ');\n }", "function get_content_type($html_test){\n\t\tif($html_test){\n\t\t\t$this->content_type = 'text/html';\n\t\t}else{\n\t\t\t$this->content_type = 'text/plain';\n\t\t}\n\t}", "protected function detectType(MvcEvent $e)\n {\n // Skip if already set\n if (null !== $this->type) {\n return $this->type;\n }\n // Default as regular request\n $this->type = '';\n\n\n $request = $e->getRequest();\n // AJAX\n if ($request->isXmlHttpRequest()) {\n $this->type = 'ajax';\n // Flash\n } elseif ($request->isFlashRequest()) {\n $this->type = 'flash';\n }\n\n $headers = $request->getHeaders();\n if (!$headers->has('accept')) {\n return $this->type;\n }\n $accept = $headers->get('Accept');\n\n // Json\n if (($match = $accept->match(\n 'application/json, application/javascript'\n )) != false\n ) {\n $typeString = $match->getTypeString();\n if ('application/json' == $typeString\n || 'application/javascript' == $typeString\n ) {\n $this->type = 'json';\n }\n // Feed\n } elseif (($match = $accept->match(\n 'application/rss+xml, application/atom+xml'\n )) != false\n ) {\n $typeString = $match->getTypeString();\n if ('application/rss+xml' == $typeString\n || 'application/atom+xml' == $typeString\n ) {\n $this->type = 'feed';\n }\n }\n\n return $this->type;\n }", "public function getMimeTypes()\n {\n return explode(';', $this->response->getHeader('Content-Type')[0]);\n }" ]
[ "0.74477875", "0.738685", "0.7370415", "0.735849", "0.7298891", "0.7235673", "0.71844727", "0.7028118", "0.70188946", "0.69513553", "0.68961316", "0.6847535", "0.6790989", "0.678865", "0.6748721", "0.6720873", "0.66900635", "0.66724586", "0.6616281", "0.6609297", "0.6587644", "0.6565197", "0.65541166", "0.6525213", "0.65159285", "0.65046215", "0.64579105", "0.64462566", "0.6437843", "0.64117455", "0.6406215", "0.6405894", "0.6392818", "0.6383421", "0.63796437", "0.6370848", "0.6358069", "0.63509905", "0.63435084", "0.6333001", "0.6328198", "0.6320419", "0.6315596", "0.63142437", "0.6310629", "0.62974745", "0.624574", "0.6225011", "0.6224113", "0.6200868", "0.62008405", "0.62008405", "0.62008405", "0.62008405", "0.62008405", "0.62008405", "0.62008405", "0.62008405", "0.62008405", "0.6186755", "0.6178224", "0.61757314", "0.61555076", "0.6148634", "0.6146156", "0.6143649", "0.61416197", "0.61352074", "0.61015844", "0.60812163", "0.6072059", "0.60682505", "0.606109", "0.60591906", "0.6047699", "0.60345304", "0.60276556", "0.6020007", "0.60117424", "0.6010052", "0.60019225", "0.5986665", "0.59820944", "0.5980737", "0.5980737", "0.5962064", "0.59530145", "0.5932157", "0.59195155", "0.5891153", "0.58888435", "0.5864078", "0.5863714", "0.5863714", "0.5862457", "0.58571255", "0.58555686", "0.583723", "0.58370787", "0.58169204" ]
0.64021903
32